UNPKG

548 kBJavaScriptView Raw
1(function webpackUniversalModuleDefinition(root, factory) {
2 if(typeof exports === 'object' && typeof module === 'object')
3 module.exports = factory(require("react"), require("react-dom"));
4 else if(typeof define === 'function' && define.amd)
5 define(["react", "react-dom"], factory);
6 else if(typeof exports === 'object')
7 exports["ReactBootstrap"] = factory(require("react"), require("react-dom"));
8 else
9 root["ReactBootstrap"] = factory(root["React"], root["ReactDOM"]);
10})(self, (__WEBPACK_EXTERNAL_MODULE__787__, __WEBPACK_EXTERNAL_MODULE__156__) => {
11return /******/ (() => { // webpackBootstrap
12/******/ var __webpack_modules__ = ({
13
14/***/ 814:
15/***/ ((module, exports) => {
16
17var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
18 Copyright (c) 2018 Jed Watson.
19 Licensed under the MIT License (MIT), see
20 http://jedwatson.github.io/classnames
21*/
22/* global define */
23
24(function () {
25 'use strict';
26
27 var hasOwn = {}.hasOwnProperty;
28 var nativeCodeString = '[native code]';
29 function classNames() {
30 var classes = [];
31 for (var i = 0; i < arguments.length; i++) {
32 var arg = arguments[i];
33 if (!arg) continue;
34 var argType = typeof arg;
35 if (argType === 'string' || argType === 'number') {
36 classes.push(arg);
37 } else if (Array.isArray(arg)) {
38 if (arg.length) {
39 var inner = classNames.apply(null, arg);
40 if (inner) {
41 classes.push(inner);
42 }
43 }
44 } else if (argType === 'object') {
45 if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
46 classes.push(arg.toString());
47 continue;
48 }
49 for (var key in arg) {
50 if (hasOwn.call(arg, key) && arg[key]) {
51 classes.push(key);
52 }
53 }
54 }
55 }
56 return classes.join(' ');
57 }
58 if ( true && module.exports) {
59 classNames.default = classNames;
60 module.exports = classNames;
61 } else if (true) {
62 // register as 'classnames', consistent with npm package name
63 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
64 return classNames;
65 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
66 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
67 } else {}
68})();
69
70/***/ }),
71
72/***/ 286:
73/***/ ((module) => {
74
75"use strict";
76/**
77 * Copyright (c) 2013-present, Facebook, Inc.
78 *
79 * This source code is licensed under the MIT license found in the
80 * LICENSE file in the root directory of this source tree.
81 */
82
83
84
85/**
86 * Use invariant() to assert state which your program assumes to be true.
87 *
88 * Provide sprintf-style format (only %s is supported) and arguments
89 * to provide information about what broke and what you were
90 * expecting.
91 *
92 * The invariant message will be stripped in production, but the invariant
93 * will remain to ensure logic does not differ in production.
94 */
95var invariant = function (condition, format, a, b, c, d, e, f) {
96 if (false) {}
97 if (!condition) {
98 var error;
99 if (format === undefined) {
100 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
101 } else {
102 var args = [a, b, c, d, e, f];
103 var argIndex = 0;
104 error = new Error(format.replace(/%s/g, function () {
105 return args[argIndex++];
106 }));
107 error.name = 'Invariant Violation';
108 }
109 error.framesToPop = 1; // we don't care about invariant's own frame
110 throw error;
111 }
112};
113module.exports = invariant;
114
115/***/ }),
116
117/***/ 946:
118/***/ ((module, exports, __webpack_require__) => {
119
120"use strict";
121
122
123Object.defineProperty(exports, "__esModule", ({
124 value: true
125}));
126exports["default"] = all;
127var _createChainableTypeChecker = __webpack_require__(844);
128var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
129function _interopRequireDefault(obj) {
130 return obj && obj.__esModule ? obj : {
131 default: obj
132 };
133}
134function all() {
135 for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {
136 validators[_key] = arguments[_key];
137 }
138 function allPropTypes() {
139 for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
140 args[_key2] = arguments[_key2];
141 }
142 var error = null;
143 validators.forEach(function (validator) {
144 if (error != null) {
145 return;
146 }
147 var result = validator.apply(undefined, args);
148 if (result != null) {
149 error = result;
150 }
151 });
152 return error;
153 }
154 return (0, _createChainableTypeChecker2.default)(allPropTypes);
155}
156module.exports = exports['default'];
157
158/***/ }),
159
160/***/ 964:
161/***/ ((module, exports, __webpack_require__) => {
162
163"use strict";
164
165
166Object.defineProperty(exports, "__esModule", ({
167 value: true
168}));
169var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
170 return typeof obj;
171} : function (obj) {
172 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
173};
174var _react = __webpack_require__(787);
175var _react2 = _interopRequireDefault(_react);
176var _createChainableTypeChecker = __webpack_require__(844);
177var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
178function _interopRequireDefault(obj) {
179 return obj && obj.__esModule ? obj : {
180 default: obj
181 };
182}
183function validate(props, propName, componentName, location, propFullName) {
184 var propValue = props[propName];
185 var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);
186 if (_react2.default.isValidElement(propValue)) {
187 return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement. You can usually obtain a ReactComponent or DOMElement ' + 'from a ReactElement by attaching a ref to it.');
188 }
189 if ((propType !== 'object' || typeof propValue.render !== 'function') && propValue.nodeType !== 1) {
190 return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement.');
191 }
192 return null;
193}
194exports["default"] = (0, _createChainableTypeChecker2.default)(validate);
195module.exports = exports['default'];
196
197/***/ }),
198
199/***/ 647:
200/***/ ((module, exports, __webpack_require__) => {
201
202"use strict";
203
204
205Object.defineProperty(exports, "__esModule", ({
206 value: true
207}));
208exports["default"] = deprecated;
209var _warning = __webpack_require__(459);
210var _warning2 = _interopRequireDefault(_warning);
211function _interopRequireDefault(obj) {
212 return obj && obj.__esModule ? obj : {
213 default: obj
214 };
215}
216var warned = {};
217function deprecated(validator, reason) {
218 return function validate(props, propName, componentName, location, propFullName) {
219 var componentNameSafe = componentName || '<<anonymous>>';
220 var propFullNameSafe = propFullName || propName;
221 if (props[propName] != null) {
222 var messageKey = componentName + '.' + propName;
223 (0, _warning2.default)(warned[messageKey], 'The ' + location + ' `' + propFullNameSafe + '` of ' + ('`' + componentNameSafe + '` is deprecated. ' + reason + '.'));
224 warned[messageKey] = true;
225 }
226 for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {
227 args[_key - 5] = arguments[_key];
228 }
229 return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));
230 };
231}
232
233/* eslint-disable no-underscore-dangle */
234function _resetWarned() {
235 warned = {};
236}
237deprecated._resetWarned = _resetWarned;
238/* eslint-enable no-underscore-dangle */
239
240module.exports = exports['default'];
241
242/***/ }),
243
244/***/ 835:
245/***/ ((module, exports, __webpack_require__) => {
246
247"use strict";
248
249
250Object.defineProperty(exports, "__esModule", ({
251 value: true
252}));
253var _react = __webpack_require__(787);
254var _react2 = _interopRequireDefault(_react);
255var _reactIs = __webpack_require__(532);
256var _createChainableTypeChecker = __webpack_require__(844);
257var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
258function _interopRequireDefault(obj) {
259 return obj && obj.__esModule ? obj : {
260 default: obj
261 };
262}
263function elementType(props, propName, componentName, location, propFullName) {
264 var propValue = props[propName];
265 if (_react2.default.isValidElement(propValue)) {
266 return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`,expected an element type (a string ') + ', component class, or function component).');
267 }
268 if (!(0, _reactIs.isValidElementType)(propValue)) {
269 return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + ', component class, or function component).');
270 }
271 return null;
272}
273exports["default"] = (0, _createChainableTypeChecker2.default)(elementType);
274module.exports = exports['default'];
275
276/***/ }),
277
278/***/ 517:
279/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
280
281"use strict";
282var __webpack_unused_export__;
283
284
285__webpack_unused_export__ = ({
286 value: true
287});
288__webpack_unused_export__ = exports.nm = __webpack_unused_export__ = exports.ax = __webpack_unused_export__ = undefined;
289var _all = __webpack_require__(946);
290var _all2 = _interopRequireDefault(_all);
291var _componentOrElement = __webpack_require__(964);
292var _componentOrElement2 = _interopRequireDefault(_componentOrElement);
293var _deprecated = __webpack_require__(647);
294var _deprecated2 = _interopRequireDefault(_deprecated);
295var _elementType = __webpack_require__(835);
296var _elementType2 = _interopRequireDefault(_elementType);
297var _isRequiredForA11y = __webpack_require__(422);
298var _isRequiredForA11y2 = _interopRequireDefault(_isRequiredForA11y);
299function _interopRequireDefault(obj) {
300 return obj && obj.__esModule ? obj : {
301 default: obj
302 };
303}
304__webpack_unused_export__ = _all2.default;
305exports.ax = _componentOrElement2.default;
306__webpack_unused_export__ = _deprecated2.default;
307exports.nm = _elementType2.default;
308__webpack_unused_export__ = _isRequiredForA11y2.default;
309
310/***/ }),
311
312/***/ 422:
313/***/ ((module, exports) => {
314
315"use strict";
316
317
318Object.defineProperty(exports, "__esModule", ({
319 value: true
320}));
321exports["default"] = isRequiredForA11y;
322function isRequiredForA11y(validator) {
323 return function validate(props, propName, componentName, location, propFullName) {
324 var componentNameSafe = componentName || '<<anonymous>>';
325 var propFullNameSafe = propFullName || propName;
326 if (props[propName] == null) {
327 return new Error('The ' + location + ' `' + propFullNameSafe + '` is required to make ' + ('`' + componentNameSafe + '` accessible for users of assistive ') + 'technologies such as screen readers.');
328 }
329 for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {
330 args[_key - 5] = arguments[_key];
331 }
332 return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));
333 };
334}
335module.exports = exports['default'];
336
337/***/ }),
338
339/***/ 844:
340/***/ ((module, exports) => {
341
342"use strict";
343
344
345Object.defineProperty(exports, "__esModule", ({
346 value: true
347}));
348exports["default"] = createChainableTypeChecker;
349/**
350 * Copyright 2013-present, Facebook, Inc.
351 * All rights reserved.
352 *
353 * This source code is licensed under the BSD-style license found in the
354 * LICENSE file in the root directory of this source tree. An additional grant
355 * of patent rights can be found in the PATENTS file in the same directory.
356 */
357
358// Mostly taken from ReactPropTypes.
359
360function createChainableTypeChecker(validate) {
361 function checkType(isRequired, props, propName, componentName, location, propFullName) {
362 var componentNameSafe = componentName || '<<anonymous>>';
363 var propFullNameSafe = propFullName || propName;
364 if (props[propName] == null) {
365 if (isRequired) {
366 return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));
367 }
368 return null;
369 }
370 for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {
371 args[_key - 6] = arguments[_key];
372 }
373 return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));
374 }
375 var chainedCheckType = checkType.bind(null, false);
376 chainedCheckType.isRequired = checkType.bind(null, true);
377 return chainedCheckType;
378}
379module.exports = exports['default'];
380
381/***/ }),
382
383/***/ 428:
384/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
385
386"use strict";
387/**
388 * Copyright (c) 2013-present, Facebook, Inc.
389 *
390 * This source code is licensed under the MIT license found in the
391 * LICENSE file in the root directory of this source tree.
392 */
393
394
395
396var ReactPropTypesSecret = __webpack_require__(134);
397function emptyFunction() {}
398function emptyFunctionWithReset() {}
399emptyFunctionWithReset.resetWarningCache = emptyFunction;
400module.exports = function () {
401 function shim(props, propName, componentName, location, propFullName, secret) {
402 if (secret === ReactPropTypesSecret) {
403 // It is still safe when called from React.
404 return;
405 }
406 var err = new Error('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');
407 err.name = 'Invariant Violation';
408 throw err;
409 }
410 ;
411 shim.isRequired = shim;
412 function getShim() {
413 return shim;
414 }
415 ;
416 // Important!
417 // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
418 var ReactPropTypes = {
419 array: shim,
420 bigint: shim,
421 bool: shim,
422 func: shim,
423 number: shim,
424 object: shim,
425 string: shim,
426 symbol: shim,
427 any: shim,
428 arrayOf: getShim,
429 element: shim,
430 elementType: shim,
431 instanceOf: getShim,
432 node: shim,
433 objectOf: getShim,
434 oneOf: getShim,
435 oneOfType: getShim,
436 shape: getShim,
437 exact: getShim,
438 checkPropTypes: emptyFunctionWithReset,
439 resetWarningCache: emptyFunction
440 };
441 ReactPropTypes.PropTypes = ReactPropTypes;
442 return ReactPropTypes;
443};
444
445/***/ }),
446
447/***/ 526:
448/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
449
450/**
451 * Copyright (c) 2013-present, Facebook, Inc.
452 *
453 * This source code is licensed under the MIT license found in the
454 * LICENSE file in the root directory of this source tree.
455 */
456
457if (false) { var throwOnDirectAccess, ReactIs; } else {
458 // By explicitly using `prop-types` you are opting into new production behavior.
459 // http://fb.me/prop-types-in-prod
460 module.exports = __webpack_require__(428)();
461}
462
463/***/ }),
464
465/***/ 134:
466/***/ ((module) => {
467
468"use strict";
469/**
470 * Copyright (c) 2013-present, Facebook, Inc.
471 *
472 * This source code is licensed under the MIT license found in the
473 * LICENSE file in the root directory of this source tree.
474 */
475
476
477
478var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
479module.exports = ReactPropTypesSecret;
480
481/***/ }),
482
483/***/ 15:
484/***/ ((__unused_webpack_module, exports) => {
485
486"use strict";
487/** @license React v16.13.1
488 * react-is.production.min.js
489 *
490 * Copyright (c) Facebook, Inc. and its affiliates.
491 *
492 * This source code is licensed under the MIT license found in the
493 * LICENSE file in the root directory of this source tree.
494 */
495
496
497
498var b = "function" === typeof Symbol && Symbol.for,
499 c = b ? Symbol.for("react.element") : 60103,
500 d = b ? Symbol.for("react.portal") : 60106,
501 e = b ? Symbol.for("react.fragment") : 60107,
502 f = b ? Symbol.for("react.strict_mode") : 60108,
503 g = b ? Symbol.for("react.profiler") : 60114,
504 h = b ? Symbol.for("react.provider") : 60109,
505 k = b ? Symbol.for("react.context") : 60110,
506 l = b ? Symbol.for("react.async_mode") : 60111,
507 m = b ? Symbol.for("react.concurrent_mode") : 60111,
508 n = b ? Symbol.for("react.forward_ref") : 60112,
509 p = b ? Symbol.for("react.suspense") : 60113,
510 q = b ? Symbol.for("react.suspense_list") : 60120,
511 r = b ? Symbol.for("react.memo") : 60115,
512 t = b ? Symbol.for("react.lazy") : 60116,
513 v = b ? Symbol.for("react.block") : 60121,
514 w = b ? Symbol.for("react.fundamental") : 60117,
515 x = b ? Symbol.for("react.responder") : 60118,
516 y = b ? Symbol.for("react.scope") : 60119;
517function z(a) {
518 if ("object" === typeof a && null !== a) {
519 var u = a.$$typeof;
520 switch (u) {
521 case c:
522 switch (a = a.type, a) {
523 case l:
524 case m:
525 case e:
526 case g:
527 case f:
528 case p:
529 return a;
530 default:
531 switch (a = a && a.$$typeof, a) {
532 case k:
533 case n:
534 case t:
535 case r:
536 case h:
537 return a;
538 default:
539 return u;
540 }
541 }
542 case d:
543 return u;
544 }
545 }
546}
547function A(a) {
548 return z(a) === m;
549}
550exports.AsyncMode = l;
551exports.ConcurrentMode = m;
552exports.ContextConsumer = k;
553exports.ContextProvider = h;
554exports.Element = c;
555exports.ForwardRef = n;
556exports.Fragment = e;
557exports.Lazy = t;
558exports.Memo = r;
559exports.Portal = d;
560exports.Profiler = g;
561exports.StrictMode = f;
562exports.Suspense = p;
563exports.isAsyncMode = function (a) {
564 return A(a) || z(a) === l;
565};
566exports.isConcurrentMode = A;
567exports.isContextConsumer = function (a) {
568 return z(a) === k;
569};
570exports.isContextProvider = function (a) {
571 return z(a) === h;
572};
573exports.isElement = function (a) {
574 return "object" === typeof a && null !== a && a.$$typeof === c;
575};
576exports.isForwardRef = function (a) {
577 return z(a) === n;
578};
579exports.isFragment = function (a) {
580 return z(a) === e;
581};
582exports.isLazy = function (a) {
583 return z(a) === t;
584};
585exports.isMemo = function (a) {
586 return z(a) === r;
587};
588exports.isPortal = function (a) {
589 return z(a) === d;
590};
591exports.isProfiler = function (a) {
592 return z(a) === g;
593};
594exports.isStrictMode = function (a) {
595 return z(a) === f;
596};
597exports.isSuspense = function (a) {
598 return z(a) === p;
599};
600exports.isValidElementType = function (a) {
601 return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
602};
603exports.typeOf = z;
604
605/***/ }),
606
607/***/ 532:
608/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
609
610"use strict";
611
612
613if (true) {
614 module.exports = __webpack_require__(15);
615} else {}
616
617/***/ }),
618
619/***/ 955:
620/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
621
622"use strict";
623/** @license React v16.14.0
624 * react-jsx-dev-runtime.production.min.js
625 *
626 * Copyright (c) Facebook, Inc. and its affiliates.
627 *
628 * This source code is licensed under the MIT license found in the
629 * LICENSE file in the root directory of this source tree.
630 */
631
632
633__webpack_require__(787);
634exports.Fragment = 60107;
635if ("function" === typeof Symbol && Symbol.for) {
636 var a = Symbol.for;
637 exports.Fragment = a("react.fragment");
638}
639exports.jsxDEV = void 0;
640
641/***/ }),
642
643/***/ 356:
644/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
645
646"use strict";
647/** @license React v16.14.0
648 * react-jsx-runtime.production.min.js
649 *
650 * Copyright (c) Facebook, Inc. and its affiliates.
651 *
652 * This source code is licensed under the MIT license found in the
653 * LICENSE file in the root directory of this source tree.
654 */
655
656
657var f = __webpack_require__(787),
658 g = 60103;
659exports.Fragment = 60107;
660if ("function" === typeof Symbol && Symbol.for) {
661 var h = Symbol.for;
662 g = h("react.element");
663 exports.Fragment = h("react.fragment");
664}
665var m = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
666 n = Object.prototype.hasOwnProperty,
667 p = {
668 key: !0,
669 ref: !0,
670 __self: !0,
671 __source: !0
672 };
673function q(c, a, k) {
674 var b,
675 d = {},
676 e = null,
677 l = null;
678 void 0 !== k && (e = "" + k);
679 void 0 !== a.key && (e = "" + a.key);
680 void 0 !== a.ref && (l = a.ref);
681 for (b in a) n.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
682 if (c && c.defaultProps) for (b in a = c.defaultProps, a) void 0 === d[b] && (d[b] = a[b]);
683 return {
684 $$typeof: g,
685 type: c,
686 key: e,
687 ref: l,
688 props: d,
689 _owner: m.current
690 };
691}
692exports.jsx = q;
693exports.jsxs = q;
694
695/***/ }),
696
697/***/ 485:
698/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
699
700"use strict";
701
702
703if (true) {
704 module.exports = __webpack_require__(955);
705} else {}
706
707/***/ }),
708
709/***/ 373:
710/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
711
712"use strict";
713
714
715if (true) {
716 module.exports = __webpack_require__(356);
717} else {}
718
719/***/ }),
720
721/***/ 459:
722/***/ ((module) => {
723
724"use strict";
725/**
726 * Copyright (c) 2014-present, Facebook, Inc.
727 *
728 * This source code is licensed under the MIT license found in the
729 * LICENSE file in the root directory of this source tree.
730 */
731
732
733
734/**
735 * Similar to invariant but only logs a warning if the condition is not met.
736 * This can be used to log issues in development environments in critical
737 * paths. Removing the logging code for production environments will keep the
738 * same logic and follow the same code paths.
739 */
740var __DEV__ = "production" !== 'production';
741var warning = function () {};
742if (__DEV__) {
743 var printWarning = function printWarning(format, args) {
744 var len = arguments.length;
745 args = new Array(len > 1 ? len - 1 : 0);
746 for (var key = 1; key < len; key++) {
747 args[key - 1] = arguments[key];
748 }
749 var argIndex = 0;
750 var message = 'Warning: ' + format.replace(/%s/g, function () {
751 return args[argIndex++];
752 });
753 if (typeof console !== 'undefined') {
754 console.error(message);
755 }
756 try {
757 // --- Welcome to debugging React ---
758 // This error was thrown as a convenience so that you can use this stack
759 // to find the callsite that caused this warning to fire.
760 throw new Error(message);
761 } catch (x) {}
762 };
763 warning = function (condition, format, args) {
764 var len = arguments.length;
765 args = new Array(len > 2 ? len - 2 : 0);
766 for (var key = 2; key < len; key++) {
767 args[key - 2] = arguments[key];
768 }
769 if (format === undefined) {
770 throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
771 }
772 if (!condition) {
773 printWarning.apply(null, [format].concat(args));
774 }
775 };
776}
777module.exports = warning;
778
779/***/ }),
780
781/***/ 787:
782/***/ ((module) => {
783
784"use strict";
785module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
786
787/***/ }),
788
789/***/ 156:
790/***/ ((module) => {
791
792"use strict";
793module.exports = __WEBPACK_EXTERNAL_MODULE__156__;
794
795/***/ })
796
797/******/ });
798/************************************************************************/
799/******/ // The module cache
800/******/ var __webpack_module_cache__ = {};
801/******/
802/******/ // The require function
803/******/ function __webpack_require__(moduleId) {
804/******/ // Check if module is in cache
805/******/ var cachedModule = __webpack_module_cache__[moduleId];
806/******/ if (cachedModule !== undefined) {
807/******/ return cachedModule.exports;
808/******/ }
809/******/ // Create a new module (and put it into the cache)
810/******/ var module = __webpack_module_cache__[moduleId] = {
811/******/ // no module.id needed
812/******/ // no module.loaded needed
813/******/ exports: {}
814/******/ };
815/******/
816/******/ // Execute the module function
817/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
818/******/
819/******/ // Return the exports of the module
820/******/ return module.exports;
821/******/ }
822/******/
823/************************************************************************/
824/******/ /* webpack/runtime/compat get default export */
825/******/ (() => {
826/******/ // getDefaultExport function for compatibility with non-harmony modules
827/******/ __webpack_require__.n = (module) => {
828/******/ var getter = module && module.__esModule ?
829/******/ () => (module['default']) :
830/******/ () => (module);
831/******/ __webpack_require__.d(getter, { a: getter });
832/******/ return getter;
833/******/ };
834/******/ })();
835/******/
836/******/ /* webpack/runtime/define property getters */
837/******/ (() => {
838/******/ // define getter functions for harmony exports
839/******/ __webpack_require__.d = (exports, definition) => {
840/******/ for(var key in definition) {
841/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
842/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
843/******/ }
844/******/ }
845/******/ };
846/******/ })();
847/******/
848/******/ /* webpack/runtime/global */
849/******/ (() => {
850/******/ __webpack_require__.g = (function() {
851/******/ if (typeof globalThis === 'object') return globalThis;
852/******/ try {
853/******/ return this || new Function('return this')();
854/******/ } catch (e) {
855/******/ if (typeof window === 'object') return window;
856/******/ }
857/******/ })();
858/******/ })();
859/******/
860/******/ /* webpack/runtime/hasOwnProperty shorthand */
861/******/ (() => {
862/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
863/******/ })();
864/******/
865/******/ /* webpack/runtime/make namespace object */
866/******/ (() => {
867/******/ // define __esModule on exports
868/******/ __webpack_require__.r = (exports) => {
869/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
870/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
871/******/ }
872/******/ Object.defineProperty(exports, '__esModule', { value: true });
873/******/ };
874/******/ })();
875/******/
876/************************************************************************/
877var __webpack_exports__ = {};
878// This entry need to be wrapped in an IIFE because it need to be in strict mode.
879(() => {
880"use strict";
881// ESM COMPAT FLAG
882__webpack_require__.r(__webpack_exports__);
883
884// EXPORTS
885__webpack_require__.d(__webpack_exports__, {
886 Accordion: () => (/* reexport */ src_Accordion),
887 AccordionButton: () => (/* reexport */ src_AccordionButton),
888 AccordionCollapse: () => (/* reexport */ src_AccordionCollapse),
889 AccordionContext: () => (/* reexport */ AccordionContext),
890 AccordionHeader: () => (/* reexport */ src_AccordionHeader),
891 AccordionItem: () => (/* reexport */ src_AccordionItem),
892 Alert: () => (/* reexport */ src_Alert),
893 AlertHeading: () => (/* reexport */ src_AlertHeading),
894 AlertLink: () => (/* reexport */ src_AlertLink),
895 Anchor: () => (/* reexport */ src_Anchor),
896 Badge: () => (/* reexport */ src_Badge),
897 Breadcrumb: () => (/* reexport */ src_Breadcrumb),
898 BreadcrumbItem: () => (/* reexport */ src_BreadcrumbItem),
899 Button: () => (/* reexport */ src_Button),
900 ButtonGroup: () => (/* reexport */ src_ButtonGroup),
901 ButtonToolbar: () => (/* reexport */ src_ButtonToolbar),
902 Card: () => (/* reexport */ src_Card),
903 CardBody: () => (/* reexport */ src_CardBody),
904 CardFooter: () => (/* reexport */ src_CardFooter),
905 CardGroup: () => (/* reexport */ src_CardGroup),
906 CardHeader: () => (/* reexport */ src_CardHeader),
907 CardImg: () => (/* reexport */ src_CardImg),
908 CardImgOverlay: () => (/* reexport */ src_CardImgOverlay),
909 CardLink: () => (/* reexport */ src_CardLink),
910 CardSubtitle: () => (/* reexport */ src_CardSubtitle),
911 CardText: () => (/* reexport */ src_CardText),
912 CardTitle: () => (/* reexport */ src_CardTitle),
913 Carousel: () => (/* reexport */ src_Carousel),
914 CarouselCaption: () => (/* reexport */ src_CarouselCaption),
915 CarouselItem: () => (/* reexport */ src_CarouselItem),
916 CloseButton: () => (/* reexport */ src_CloseButton),
917 Col: () => (/* reexport */ src_Col),
918 Collapse: () => (/* reexport */ src_Collapse),
919 Container: () => (/* reexport */ src_Container),
920 Dropdown: () => (/* reexport */ src_Dropdown),
921 DropdownButton: () => (/* reexport */ src_DropdownButton),
922 DropdownDivider: () => (/* reexport */ src_DropdownDivider),
923 DropdownHeader: () => (/* reexport */ src_DropdownHeader),
924 DropdownItem: () => (/* reexport */ src_DropdownItem),
925 DropdownItemText: () => (/* reexport */ src_DropdownItemText),
926 DropdownMenu: () => (/* reexport */ src_DropdownMenu),
927 DropdownToggle: () => (/* reexport */ src_DropdownToggle),
928 Fade: () => (/* reexport */ src_Fade),
929 Figure: () => (/* reexport */ src_Figure),
930 FigureCaption: () => (/* reexport */ src_FigureCaption),
931 FigureImage: () => (/* reexport */ src_FigureImage),
932 FloatingLabel: () => (/* reexport */ src_FloatingLabel),
933 Form: () => (/* reexport */ src_Form),
934 FormCheck: () => (/* reexport */ src_FormCheck),
935 FormControl: () => (/* reexport */ src_FormControl),
936 FormFloating: () => (/* reexport */ src_FormFloating),
937 FormGroup: () => (/* reexport */ src_FormGroup),
938 FormLabel: () => (/* reexport */ src_FormLabel),
939 FormSelect: () => (/* reexport */ src_FormSelect),
940 FormText: () => (/* reexport */ src_FormText),
941 Image: () => (/* reexport */ src_Image),
942 InputGroup: () => (/* reexport */ src_InputGroup),
943 ListGroup: () => (/* reexport */ src_ListGroup),
944 ListGroupItem: () => (/* reexport */ src_ListGroupItem),
945 Modal: () => (/* reexport */ src_Modal),
946 ModalBody: () => (/* reexport */ src_ModalBody),
947 ModalDialog: () => (/* reexport */ src_ModalDialog),
948 ModalFooter: () => (/* reexport */ src_ModalFooter),
949 ModalHeader: () => (/* reexport */ src_ModalHeader),
950 ModalTitle: () => (/* reexport */ src_ModalTitle),
951 Nav: () => (/* reexport */ src_Nav),
952 NavDropdown: () => (/* reexport */ src_NavDropdown),
953 NavItem: () => (/* reexport */ src_NavItem),
954 NavLink: () => (/* reexport */ src_NavLink),
955 Navbar: () => (/* reexport */ src_Navbar),
956 NavbarBrand: () => (/* reexport */ src_NavbarBrand),
957 NavbarCollapse: () => (/* reexport */ src_NavbarCollapse),
958 NavbarOffcanvas: () => (/* reexport */ src_NavbarOffcanvas),
959 NavbarText: () => (/* reexport */ src_NavbarText),
960 NavbarToggle: () => (/* reexport */ src_NavbarToggle),
961 Offcanvas: () => (/* reexport */ src_Offcanvas),
962 OffcanvasBody: () => (/* reexport */ src_OffcanvasBody),
963 OffcanvasHeader: () => (/* reexport */ src_OffcanvasHeader),
964 OffcanvasTitle: () => (/* reexport */ src_OffcanvasTitle),
965 OffcanvasToggling: () => (/* reexport */ src_OffcanvasToggling),
966 Overlay: () => (/* reexport */ src_Overlay),
967 OverlayTrigger: () => (/* reexport */ src_OverlayTrigger),
968 PageItem: () => (/* reexport */ src_PageItem),
969 Pagination: () => (/* reexport */ src_Pagination),
970 Placeholder: () => (/* reexport */ src_Placeholder),
971 PlaceholderButton: () => (/* reexport */ src_PlaceholderButton),
972 Popover: () => (/* reexport */ src_Popover),
973 PopoverBody: () => (/* reexport */ src_PopoverBody),
974 PopoverHeader: () => (/* reexport */ src_PopoverHeader),
975 ProgressBar: () => (/* reexport */ src_ProgressBar),
976 Ratio: () => (/* reexport */ src_Ratio),
977 Row: () => (/* reexport */ src_Row),
978 SSRProvider: () => (/* reexport */ SSRProvider),
979 Spinner: () => (/* reexport */ src_Spinner),
980 SplitButton: () => (/* reexport */ src_SplitButton),
981 Stack: () => (/* reexport */ src_Stack),
982 Tab: () => (/* reexport */ src_Tab),
983 TabContainer: () => (/* reexport */ src_TabContainer),
984 TabContent: () => (/* reexport */ src_TabContent),
985 TabPane: () => (/* reexport */ src_TabPane),
986 Table: () => (/* reexport */ src_Table),
987 Tabs: () => (/* reexport */ src_Tabs),
988 ThemeProvider: () => (/* reexport */ src_ThemeProvider),
989 Toast: () => (/* reexport */ src_Toast),
990 ToastBody: () => (/* reexport */ src_ToastBody),
991 ToastContainer: () => (/* reexport */ src_ToastContainer),
992 ToastHeader: () => (/* reexport */ src_ToastHeader),
993 ToggleButton: () => (/* reexport */ src_ToggleButton),
994 ToggleButtonGroup: () => (/* reexport */ src_ToggleButtonGroup),
995 Tooltip: () => (/* reexport */ src_Tooltip),
996 useAccordionButton: () => (/* reexport */ useAccordionButton)
997});
998
999// EXTERNAL MODULE: ./node_modules/classnames/index.js
1000var classnames = __webpack_require__(814);
1001var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
1002// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
1003var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(787);
1004var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
1005// EXTERNAL MODULE: ./node_modules/prop-types/index.js
1006var prop_types = __webpack_require__(526);
1007var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
1008;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
1009function extends_extends() {
1010 extends_extends = Object.assign ? Object.assign.bind() : function (target) {
1011 for (var i = 1; i < arguments.length; i++) {
1012 var source = arguments[i];
1013 for (var key in source) {
1014 if (Object.prototype.hasOwnProperty.call(source, key)) {
1015 target[key] = source[key];
1016 }
1017 }
1018 }
1019 return target;
1020 };
1021 return extends_extends.apply(this, arguments);
1022}
1023;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
1024function objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(source, excluded) {
1025 if (source == null) return {};
1026 var target = {};
1027 var sourceKeys = Object.keys(source);
1028 var key, i;
1029 for (i = 0; i < sourceKeys.length; i++) {
1030 key = sourceKeys[i];
1031 if (excluded.indexOf(key) >= 0) continue;
1032 target[key] = source[key];
1033 }
1034 return target;
1035}
1036// EXTERNAL MODULE: ./node_modules/invariant/browser.js
1037var browser = __webpack_require__(286);
1038var browser_default = /*#__PURE__*/__webpack_require__.n(browser);
1039;// CONCATENATED MODULE: ./node_modules/uncontrollable/lib/esm/utils.js
1040
1041var noop = function noop() {};
1042function readOnlyPropType(handler, name) {
1043 return function (props, propName) {
1044 if (props[propName] !== undefined) {
1045 if (!props[handler]) {
1046 return new Error("You have provided a `" + propName + "` prop to `" + name + "` " + ("without an `" + handler + "` handler prop. This will render a read-only field. ") + ("If the field should be mutable use `" + defaultKey(propName) + "`. ") + ("Otherwise, set `" + handler + "`."));
1047 }
1048 }
1049 };
1050}
1051function uncontrolledPropTypes(controlledValues, displayName) {
1052 var propTypes = {};
1053 Object.keys(controlledValues).forEach(function (prop) {
1054 // add default propTypes for folks that use runtime checks
1055 propTypes[defaultKey(prop)] = noop;
1056 if (false) { var handler; }
1057 });
1058 return propTypes;
1059}
1060function isProp(props, prop) {
1061 return props[prop] !== undefined;
1062}
1063function defaultKey(key) {
1064 return 'default' + key.charAt(0).toUpperCase() + key.substr(1);
1065}
1066/**
1067 * Copyright (c) 2013-present, Facebook, Inc.
1068 * All rights reserved.
1069 *
1070 * This source code is licensed under the BSD-style license found in the
1071 * LICENSE file in the root directory of this source tree. An additional grant
1072 * of patent rights can be found in the PATENTS file in the same directory.
1073 */
1074
1075function canAcceptRef(component) {
1076 return !!component && (typeof component !== 'function' || component.prototype && component.prototype.isReactComponent);
1077}
1078;// CONCATENATED MODULE: ./node_modules/uncontrollable/lib/esm/hook.js
1079
1080
1081function _toPropertyKey(arg) {
1082 var key = _toPrimitive(arg, "string");
1083 return typeof key === "symbol" ? key : String(key);
1084}
1085function _toPrimitive(input, hint) {
1086 if (typeof input !== "object" || input === null) return input;
1087 var prim = input[Symbol.toPrimitive];
1088 if (prim !== undefined) {
1089 var res = prim.call(input, hint || "default");
1090 if (typeof res !== "object") return res;
1091 throw new TypeError("@@toPrimitive must return a primitive value.");
1092 }
1093 return (hint === "string" ? String : Number)(input);
1094}
1095
1096
1097function useUncontrolledProp(propValue, defaultValue, handler) {
1098 var wasPropRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(propValue !== undefined);
1099 var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(defaultValue),
1100 stateValue = _useState[0],
1101 setState = _useState[1];
1102 var isProp = propValue !== undefined;
1103 var wasProp = wasPropRef.current;
1104 wasPropRef.current = isProp;
1105 /**
1106 * If a prop switches from controlled to Uncontrolled
1107 * reset its value to the defaultValue
1108 */
1109
1110 if (!isProp && wasProp && stateValue !== defaultValue) {
1111 setState(defaultValue);
1112 }
1113 return [isProp ? propValue : stateValue, (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (value) {
1114 for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1115 args[_key - 1] = arguments[_key];
1116 }
1117 if (handler) handler.apply(void 0, [value].concat(args));
1118 setState(value);
1119 }, [handler])];
1120}
1121
1122function useUncontrolled(props, config) {
1123 return Object.keys(config).reduce(function (result, fieldName) {
1124 var _extends2;
1125 var _ref = result,
1126 defaultValue = _ref[defaultKey(fieldName)],
1127 propsValue = _ref[fieldName],
1128 rest = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_ref, [defaultKey(fieldName), fieldName].map(_toPropertyKey));
1129 var handlerName = config[fieldName];
1130 var _useUncontrolledProp = useUncontrolledProp(propsValue, defaultValue, props[handlerName]),
1131 value = _useUncontrolledProp[0],
1132 handler = _useUncontrolledProp[1];
1133 return extends_extends({}, rest, (_extends2 = {}, _extends2[fieldName] = value, _extends2[handlerName] = handler, _extends2));
1134 }, props);
1135}
1136;// CONCATENATED MODULE: ./node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js
1137/**
1138 * Copyright (c) 2013-present, Facebook, Inc.
1139 *
1140 * This source code is licensed under the MIT license found in the
1141 * LICENSE file in the root directory of this source tree.
1142 */
1143
1144function componentWillMount() {
1145 // Call this.constructor.gDSFP to support sub-classes.
1146 var state = this.constructor.getDerivedStateFromProps(this.props, this.state);
1147 if (state !== null && state !== undefined) {
1148 this.setState(state);
1149 }
1150}
1151function componentWillReceiveProps(nextProps) {
1152 // Call this.constructor.gDSFP to support sub-classes.
1153 // Use the setState() updater to ensure state isn't stale in certain edge cases.
1154 function updater(prevState) {
1155 var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
1156 return state !== null && state !== undefined ? state : null;
1157 }
1158 // Binding "this" is important for shallow renderer support.
1159 this.setState(updater.bind(this));
1160}
1161function componentWillUpdate(nextProps, nextState) {
1162 try {
1163 var prevProps = this.props;
1164 var prevState = this.state;
1165 this.props = nextProps;
1166 this.state = nextState;
1167 this.__reactInternalSnapshotFlag = true;
1168 this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(prevProps, prevState);
1169 } finally {
1170 this.props = prevProps;
1171 this.state = prevState;
1172 }
1173}
1174
1175// React may warn about cWM/cWRP/cWU methods being deprecated.
1176// Add a flag to suppress these warnings for this special case.
1177componentWillMount.__suppressDeprecationWarning = true;
1178componentWillReceiveProps.__suppressDeprecationWarning = true;
1179componentWillUpdate.__suppressDeprecationWarning = true;
1180function react_lifecycles_compat_es_polyfill(Component) {
1181 var prototype = Component.prototype;
1182 if (!prototype || !prototype.isReactComponent) {
1183 throw new Error('Can only polyfill class components');
1184 }
1185 if (typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function') {
1186 return Component;
1187 }
1188
1189 // If new component APIs are defined, "unsafe" lifecycles won't be called.
1190 // Error if any of these lifecycles are present,
1191 // Because they would work differently between older and newer (16.3+) versions of React.
1192 var foundWillMountName = null;
1193 var foundWillReceivePropsName = null;
1194 var foundWillUpdateName = null;
1195 if (typeof prototype.componentWillMount === 'function') {
1196 foundWillMountName = 'componentWillMount';
1197 } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {
1198 foundWillMountName = 'UNSAFE_componentWillMount';
1199 }
1200 if (typeof prototype.componentWillReceiveProps === 'function') {
1201 foundWillReceivePropsName = 'componentWillReceiveProps';
1202 } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {
1203 foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
1204 }
1205 if (typeof prototype.componentWillUpdate === 'function') {
1206 foundWillUpdateName = 'componentWillUpdate';
1207 } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {
1208 foundWillUpdateName = 'UNSAFE_componentWillUpdate';
1209 }
1210 if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
1211 var componentName = Component.displayName || Component.name;
1212 var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
1213 throw Error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' + (foundWillMountName !== null ? '\n ' + foundWillMountName : '') + (foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '') + (foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') + '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks');
1214 }
1215
1216 // React <= 16.2 does not support static getDerivedStateFromProps.
1217 // As a workaround, use cWM and cWRP to invoke the new static lifecycle.
1218 // Newer versions of React will ignore these lifecycles if gDSFP exists.
1219 if (typeof Component.getDerivedStateFromProps === 'function') {
1220 prototype.componentWillMount = componentWillMount;
1221 prototype.componentWillReceiveProps = componentWillReceiveProps;
1222 }
1223
1224 // React <= 16.2 does not support getSnapshotBeforeUpdate.
1225 // As a workaround, use cWU to invoke the new lifecycle.
1226 // Newer versions of React will ignore that lifecycle if gSBU exists.
1227 if (typeof prototype.getSnapshotBeforeUpdate === 'function') {
1228 if (typeof prototype.componentDidUpdate !== 'function') {
1229 throw new Error('Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype');
1230 }
1231 prototype.componentWillUpdate = componentWillUpdate;
1232 var componentDidUpdate = prototype.componentDidUpdate;
1233 prototype.componentDidUpdate = function componentDidUpdatePolyfill(prevProps, prevState, maybeSnapshot) {
1234 // 16.3+ will not execute our will-update method;
1235 // It will pass a snapshot value to did-update though.
1236 // Older versions will require our polyfilled will-update value.
1237 // We need to handle both cases, but can't just check for the presence of "maybeSnapshot",
1238 // Because for <= 15.x versions this might be a "prevContext" object.
1239 // We also can't just check "__reactInternalSnapshot",
1240 // Because get-snapshot might return a falsy value.
1241 // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.
1242 var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot;
1243 componentDidUpdate.call(this, prevProps, prevState, snapshot);
1244 };
1245 }
1246 return Component;
1247}
1248
1249;// CONCATENATED MODULE: ./node_modules/uncontrollable/lib/esm/uncontrollable.js
1250
1251
1252
1253var _jsxFileName = "/Users/jquense/src/uncontrollable/src/uncontrollable.js";
1254
1255
1256
1257
1258function uncontrollable(Component, controlledValues, methods) {
1259 if (methods === void 0) {
1260 methods = [];
1261 }
1262 var displayName = Component.displayName || Component.name || 'Component';
1263 var canAcceptRef = Utils.canAcceptRef(Component);
1264 var controlledProps = Object.keys(controlledValues);
1265 var PROPS_TO_OMIT = controlledProps.map(Utils.defaultKey);
1266 !(canAcceptRef || !methods.length) ? false ? 0 : invariant(false) : void 0;
1267 var UncontrolledComponent = /*#__PURE__*/
1268 function (_React$Component) {
1269 _inheritsLoose(UncontrolledComponent, _React$Component);
1270 function UncontrolledComponent() {
1271 var _this;
1272 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1273 args[_key] = arguments[_key];
1274 }
1275 _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
1276 _this.handlers = Object.create(null);
1277 controlledProps.forEach(function (propName) {
1278 var handlerName = controlledValues[propName];
1279 var handleChange = function handleChange(value) {
1280 if (_this.props[handlerName]) {
1281 var _this$props;
1282 _this._notifying = true;
1283 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1284 args[_key2 - 1] = arguments[_key2];
1285 }
1286 (_this$props = _this.props)[handlerName].apply(_this$props, [value].concat(args));
1287 _this._notifying = false;
1288 }
1289 if (!_this.unmounted) _this.setState(function (_ref) {
1290 var _extends2;
1291 var values = _ref.values;
1292 return {
1293 values: _extends(Object.create(null), values, (_extends2 = {}, _extends2[propName] = value, _extends2))
1294 };
1295 });
1296 };
1297 _this.handlers[handlerName] = handleChange;
1298 });
1299 if (methods.length) _this.attachRef = function (ref) {
1300 _this.inner = ref;
1301 };
1302 var values = Object.create(null);
1303 controlledProps.forEach(function (key) {
1304 values[key] = _this.props[Utils.defaultKey(key)];
1305 });
1306 _this.state = {
1307 values: values,
1308 prevProps: {}
1309 };
1310 return _this;
1311 }
1312 var _proto = UncontrolledComponent.prototype;
1313 _proto.shouldComponentUpdate = function shouldComponentUpdate() {
1314 //let setState trigger the update
1315 return !this._notifying;
1316 };
1317 UncontrolledComponent.getDerivedStateFromProps = function getDerivedStateFromProps(props, _ref2) {
1318 var values = _ref2.values,
1319 prevProps = _ref2.prevProps;
1320 var nextState = {
1321 values: _extends(Object.create(null), values),
1322 prevProps: {}
1323 };
1324 controlledProps.forEach(function (key) {
1325 /**
1326 * If a prop switches from controlled to Uncontrolled
1327 * reset its value to the defaultValue
1328 */
1329 nextState.prevProps[key] = props[key];
1330 if (!Utils.isProp(props, key) && Utils.isProp(prevProps, key)) {
1331 nextState.values[key] = props[Utils.defaultKey(key)];
1332 }
1333 });
1334 return nextState;
1335 };
1336 _proto.componentWillUnmount = function componentWillUnmount() {
1337 this.unmounted = true;
1338 };
1339 _proto.render = function render() {
1340 var _this2 = this;
1341 var _this$props2 = this.props,
1342 innerRef = _this$props2.innerRef,
1343 props = _objectWithoutPropertiesLoose(_this$props2, ["innerRef"]);
1344 PROPS_TO_OMIT.forEach(function (prop) {
1345 delete props[prop];
1346 });
1347 var newProps = {};
1348 controlledProps.forEach(function (propName) {
1349 var propValue = _this2.props[propName];
1350 newProps[propName] = propValue !== undefined ? propValue : _this2.state.values[propName];
1351 });
1352 return React.createElement(Component, _extends({}, props, newProps, this.handlers, {
1353 ref: innerRef || this.attachRef
1354 }));
1355 };
1356 return UncontrolledComponent;
1357 }(React.Component);
1358 polyfill(UncontrolledComponent);
1359 UncontrolledComponent.displayName = "Uncontrolled(" + displayName + ")";
1360 UncontrolledComponent.propTypes = _extends({
1361 innerRef: function innerRef() {}
1362 }, Utils.uncontrolledPropTypes(controlledValues, displayName));
1363 methods.forEach(function (method) {
1364 UncontrolledComponent.prototype[method] = function $proxiedMethod() {
1365 var _this$inner;
1366 return (_this$inner = this.inner)[method].apply(_this$inner, arguments);
1367 };
1368 });
1369 var WrappedComponent = UncontrolledComponent;
1370 if (React.forwardRef) {
1371 WrappedComponent = React.forwardRef(function (props, ref) {
1372 return React.createElement(UncontrolledComponent, _extends({}, props, {
1373 innerRef: ref,
1374 __source: {
1375 fileName: _jsxFileName,
1376 lineNumber: 128
1377 },
1378 __self: this
1379 }));
1380 });
1381 WrappedComponent.propTypes = UncontrolledComponent.propTypes;
1382 }
1383 WrappedComponent.ControlledComponent = Component;
1384 /**
1385 * useful when wrapping a Component and you want to control
1386 * everything
1387 */
1388
1389 WrappedComponent.deferControlTo = function (newComponent, additions, nextMethods) {
1390 if (additions === void 0) {
1391 additions = {};
1392 }
1393 return uncontrollable(newComponent, _extends({}, controlledValues, additions), nextMethods);
1394 };
1395 return WrappedComponent;
1396}
1397;// CONCATENATED MODULE: ./node_modules/uncontrollable/lib/esm/index.js
1398
1399
1400// EXTERNAL MODULE: ./node_modules/react/jsx-dev-runtime.js
1401var jsx_dev_runtime = __webpack_require__(485);
1402;// CONCATENATED MODULE: ./src/ThemeProvider.tsx
1403var ThemeProvider_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ThemeProvider.tsx";
1404
1405
1406
1407
1408const DEFAULT_BREAKPOINTS = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
1409const DEFAULT_MIN_BREAKPOINT = 'xs';
1410const ThemeContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
1411 prefixes: {},
1412 breakpoints: DEFAULT_BREAKPOINTS,
1413 minBreakpoint: DEFAULT_MIN_BREAKPOINT
1414});
1415const {
1416 Consumer,
1417 Provider
1418} = ThemeContext;
1419function ThemeProvider({
1420 prefixes = {},
1421 breakpoints = DEFAULT_BREAKPOINTS,
1422 minBreakpoint = DEFAULT_MIN_BREAKPOINT,
1423 dir,
1424 children
1425}) {
1426 const contextValue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
1427 prefixes: {
1428 ...prefixes
1429 },
1430 breakpoints,
1431 minBreakpoint,
1432 dir
1433 }), [prefixes, breakpoints, minBreakpoint, dir]);
1434 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Provider, {
1435 value: contextValue,
1436 children: children
1437 }, void 0, false, {
1438 fileName: ThemeProvider_jsxFileName,
1439 lineNumber: 43,
1440 columnNumber: 10
1441 }, this);
1442}
1443ThemeProvider.propTypes = {
1444 /**
1445 * An object mapping of Bootstrap component classes that
1446 * map to a custom class.
1447 *
1448 * **Note: Changing prefixes is an escape hatch and generally
1449 * shouldn't be used.**
1450 *
1451 * For more information, see [here](/getting-started/theming/#prefixing-components).
1452 */
1453 prefixes: (prop_types_default()).object,
1454 /**
1455 * An array of breakpoints that your application supports.
1456 * Defaults to the standard Bootstrap breakpoints.
1457 */
1458 breakpoints: prop_types_default().arrayOf((prop_types_default()).string),
1459 /**
1460 * The minimum breakpoint used by your application.
1461 * Defaults to the smallest of the standard Bootstrap breakpoints.
1462 */
1463 minBreakpoint: (prop_types_default()).string,
1464 /**
1465 * Indicates the directionality of the application's text.
1466 *
1467 * Use `rtl` to set text as "right to left".
1468 */
1469 dir: (prop_types_default()).string
1470};
1471function useBootstrapPrefix(prefix, defaultPrefix) {
1472 const {
1473 prefixes
1474 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ThemeContext);
1475 return prefix || prefixes[defaultPrefix] || defaultPrefix;
1476}
1477function useBootstrapBreakpoints() {
1478 const {
1479 breakpoints
1480 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ThemeContext);
1481 return breakpoints;
1482}
1483function useBootstrapMinBreakpoint() {
1484 const {
1485 minBreakpoint
1486 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ThemeContext);
1487 return minBreakpoint;
1488}
1489function useIsRTL() {
1490 const {
1491 dir
1492 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ThemeContext);
1493 return dir === 'rtl';
1494}
1495function createBootstrapComponent(Component, opts) {
1496 if (typeof opts === 'string') opts = {
1497 prefix: opts
1498 };
1499 const isClassy = Component.prototype && Component.prototype.isReactComponent;
1500 // If it's a functional component make sure we don't break it with a ref
1501 const {
1502 prefix,
1503 forwardRefAs = isClassy ? 'ref' : 'innerRef'
1504 } = opts;
1505 const Wrapped = /*#__PURE__*/React.forwardRef(({
1506 ...props
1507 }, ref) => {
1508 props[forwardRefAs] = ref;
1509 const bsPrefix = useBootstrapPrefix(props.bsPrefix, prefix);
1510 return /*#__PURE__*/_jsxDEV(Component, {
1511 ...props,
1512 bsPrefix: bsPrefix
1513 }, void 0, false, {
1514 fileName: ThemeProvider_jsxFileName,
1515 lineNumber: 111,
1516 columnNumber: 14
1517 }, this);
1518 });
1519 Wrapped.displayName = `Bootstrap(${Component.displayName || Component.name})`;
1520 return Wrapped;
1521}
1522
1523/* harmony default export */ const src_ThemeProvider = (ThemeProvider);
1524;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/ownerDocument.js
1525/**
1526 * Returns the owner document of a given element.
1527 *
1528 * @param node the element
1529 */
1530function ownerDocument(node) {
1531 return node && node.ownerDocument || document;
1532}
1533;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/ownerWindow.js
1534
1535/**
1536 * Returns the owner window of a given element.
1537 *
1538 * @param node the element
1539 */
1540
1541function ownerWindow(node) {
1542 var doc = ownerDocument(node);
1543 return doc && doc.defaultView || window;
1544}
1545;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/getComputedStyle.js
1546
1547/**
1548 * Returns one or all computed style properties of an element.
1549 *
1550 * @param node the element
1551 * @param psuedoElement the style property
1552 */
1553
1554function getComputedStyle_getComputedStyle(node, psuedoElement) {
1555 return ownerWindow(node).getComputedStyle(node, psuedoElement);
1556}
1557;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/hyphenate.js
1558var rUpper = /([A-Z])/g;
1559function hyphenate(string) {
1560 return string.replace(rUpper, '-$1').toLowerCase();
1561}
1562;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/hyphenateStyle.js
1563/**
1564 * Copyright 2013-2014, Facebook, Inc.
1565 * All rights reserved.
1566 * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js
1567 */
1568
1569var msPattern = /^ms-/;
1570function hyphenateStyleName(string) {
1571 return hyphenate(string).replace(msPattern, '-ms-');
1572}
1573;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/isTransform.js
1574var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;
1575function isTransform(value) {
1576 return !!(value && supportedTransforms.test(value));
1577}
1578;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/css.js
1579
1580
1581
1582function style(node, property) {
1583 var css = '';
1584 var transforms = '';
1585 if (typeof property === 'string') {
1586 return node.style.getPropertyValue(hyphenateStyleName(property)) || getComputedStyle_getComputedStyle(node).getPropertyValue(hyphenateStyleName(property));
1587 }
1588 Object.keys(property).forEach(function (key) {
1589 var value = property[key];
1590 if (!value && value !== 0) {
1591 node.style.removeProperty(hyphenateStyleName(key));
1592 } else if (isTransform(key)) {
1593 transforms += key + "(" + value + ") ";
1594 } else {
1595 css += hyphenateStyleName(key) + ": " + value + ";";
1596 }
1597 });
1598 if (transforms) {
1599 css += "transform: " + transforms + ";";
1600 }
1601 node.style.cssText += ";" + css;
1602}
1603/* harmony default export */ const css = (style);
1604;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
1605function _setPrototypeOf(o, p) {
1606 _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
1607 o.__proto__ = p;
1608 return o;
1609 };
1610 return _setPrototypeOf(o, p);
1611}
1612;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
1613
1614function inheritsLoose_inheritsLoose(subClass, superClass) {
1615 subClass.prototype = Object.create(superClass.prototype);
1616 subClass.prototype.constructor = subClass;
1617 _setPrototypeOf(subClass, superClass);
1618}
1619// EXTERNAL MODULE: external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"}
1620var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_ = __webpack_require__(156);
1621var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default = /*#__PURE__*/__webpack_require__.n(external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_);
1622;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/config.js
1623/* harmony default export */ const config = ({
1624 disabled: false
1625});
1626;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/TransitionGroupContext.js
1627
1628/* harmony default export */ const TransitionGroupContext = (external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null));
1629;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/utils/reflow.js
1630var forceReflow = function forceReflow(node) {
1631 return node.scrollTop;
1632};
1633;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/Transition.js
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643var UNMOUNTED = 'unmounted';
1644var EXITED = 'exited';
1645var ENTERING = 'entering';
1646var ENTERED = 'entered';
1647var EXITING = 'exiting';
1648/**
1649 * The Transition component lets you describe a transition from one component
1650 * state to another _over time_ with a simple declarative API. Most commonly
1651 * it's used to animate the mounting and unmounting of a component, but can also
1652 * be used to describe in-place transition states as well.
1653 *
1654 * ---
1655 *
1656 * **Note**: `Transition` is a platform-agnostic base component. If you're using
1657 * transitions in CSS, you'll probably want to use
1658 * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)
1659 * instead. It inherits all the features of `Transition`, but contains
1660 * additional features necessary to play nice with CSS transitions (hence the
1661 * name of the component).
1662 *
1663 * ---
1664 *
1665 * By default the `Transition` component does not alter the behavior of the
1666 * component it renders, it only tracks "enter" and "exit" states for the
1667 * components. It's up to you to give meaning and effect to those states. For
1668 * example we can add styles to a component when it enters or exits:
1669 *
1670 * ```jsx
1671 * import { Transition } from 'react-transition-group';
1672 *
1673 * const duration = 300;
1674 *
1675 * const defaultStyle = {
1676 * transition: `opacity ${duration}ms ease-in-out`,
1677 * opacity: 0,
1678 * }
1679 *
1680 * const transitionStyles = {
1681 * entering: { opacity: 1 },
1682 * entered: { opacity: 1 },
1683 * exiting: { opacity: 0 },
1684 * exited: { opacity: 0 },
1685 * };
1686 *
1687 * const Fade = ({ in: inProp }) => (
1688 * <Transition in={inProp} timeout={duration}>
1689 * {state => (
1690 * <div style={{
1691 * ...defaultStyle,
1692 * ...transitionStyles[state]
1693 * }}>
1694 * I'm a fade Transition!
1695 * </div>
1696 * )}
1697 * </Transition>
1698 * );
1699 * ```
1700 *
1701 * There are 4 main states a Transition can be in:
1702 * - `'entering'`
1703 * - `'entered'`
1704 * - `'exiting'`
1705 * - `'exited'`
1706 *
1707 * Transition state is toggled via the `in` prop. When `true` the component
1708 * begins the "Enter" stage. During this stage, the component will shift from
1709 * its current transition state, to `'entering'` for the duration of the
1710 * transition and then to the `'entered'` stage once it's complete. Let's take
1711 * the following example (we'll use the
1712 * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):
1713 *
1714 * ```jsx
1715 * function App() {
1716 * const [inProp, setInProp] = useState(false);
1717 * return (
1718 * <div>
1719 * <Transition in={inProp} timeout={500}>
1720 * {state => (
1721 * // ...
1722 * )}
1723 * </Transition>
1724 * <button onClick={() => setInProp(true)}>
1725 * Click to Enter
1726 * </button>
1727 * </div>
1728 * );
1729 * }
1730 * ```
1731 *
1732 * When the button is clicked the component will shift to the `'entering'` state
1733 * and stay there for 500ms (the value of `timeout`) before it finally switches
1734 * to `'entered'`.
1735 *
1736 * When `in` is `false` the same thing happens except the state moves from
1737 * `'exiting'` to `'exited'`.
1738 */
1739
1740var Transition = /*#__PURE__*/function (_React$Component) {
1741 inheritsLoose_inheritsLoose(Transition, _React$Component);
1742 function Transition(props, context) {
1743 var _this;
1744 _this = _React$Component.call(this, props, context) || this;
1745 var parentGroup = context; // In the context of a TransitionGroup all enters are really appears
1746
1747 var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
1748 var initialStatus;
1749 _this.appearStatus = null;
1750 if (props.in) {
1751 if (appear) {
1752 initialStatus = EXITED;
1753 _this.appearStatus = ENTERING;
1754 } else {
1755 initialStatus = ENTERED;
1756 }
1757 } else {
1758 if (props.unmountOnExit || props.mountOnEnter) {
1759 initialStatus = UNMOUNTED;
1760 } else {
1761 initialStatus = EXITED;
1762 }
1763 }
1764 _this.state = {
1765 status: initialStatus
1766 };
1767 _this.nextCallback = null;
1768 return _this;
1769 }
1770 Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
1771 var nextIn = _ref.in;
1772 if (nextIn && prevState.status === UNMOUNTED) {
1773 return {
1774 status: EXITED
1775 };
1776 }
1777 return null;
1778 } // getSnapshotBeforeUpdate(prevProps) {
1779 // let nextStatus = null
1780 // if (prevProps !== this.props) {
1781 // const { status } = this.state
1782 // if (this.props.in) {
1783 // if (status !== ENTERING && status !== ENTERED) {
1784 // nextStatus = ENTERING
1785 // }
1786 // } else {
1787 // if (status === ENTERING || status === ENTERED) {
1788 // nextStatus = EXITING
1789 // }
1790 // }
1791 // }
1792 // return { nextStatus }
1793 // }
1794 ;
1795
1796 var _proto = Transition.prototype;
1797 _proto.componentDidMount = function componentDidMount() {
1798 this.updateStatus(true, this.appearStatus);
1799 };
1800 _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
1801 var nextStatus = null;
1802 if (prevProps !== this.props) {
1803 var status = this.state.status;
1804 if (this.props.in) {
1805 if (status !== ENTERING && status !== ENTERED) {
1806 nextStatus = ENTERING;
1807 }
1808 } else {
1809 if (status === ENTERING || status === ENTERED) {
1810 nextStatus = EXITING;
1811 }
1812 }
1813 }
1814 this.updateStatus(false, nextStatus);
1815 };
1816 _proto.componentWillUnmount = function componentWillUnmount() {
1817 this.cancelNextCallback();
1818 };
1819 _proto.getTimeouts = function getTimeouts() {
1820 var timeout = this.props.timeout;
1821 var exit, enter, appear;
1822 exit = enter = appear = timeout;
1823 if (timeout != null && typeof timeout !== 'number') {
1824 exit = timeout.exit;
1825 enter = timeout.enter; // TODO: remove fallback for next major
1826
1827 appear = timeout.appear !== undefined ? timeout.appear : enter;
1828 }
1829 return {
1830 exit: exit,
1831 enter: enter,
1832 appear: appear
1833 };
1834 };
1835 _proto.updateStatus = function updateStatus(mounting, nextStatus) {
1836 if (mounting === void 0) {
1837 mounting = false;
1838 }
1839 if (nextStatus !== null) {
1840 // nextStatus will always be ENTERING or EXITING.
1841 this.cancelNextCallback();
1842 if (nextStatus === ENTERING) {
1843 if (this.props.unmountOnExit || this.props.mountOnEnter) {
1844 var node = this.props.nodeRef ? this.props.nodeRef.current : external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749
1845 // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.
1846 // To make the animation happen, we have to separate each rendering and avoid being processed as batched.
1847
1848 if (node) forceReflow(node);
1849 }
1850 this.performEnter(mounting);
1851 } else {
1852 this.performExit();
1853 }
1854 } else if (this.props.unmountOnExit && this.state.status === EXITED) {
1855 this.setState({
1856 status: UNMOUNTED
1857 });
1858 }
1859 };
1860 _proto.performEnter = function performEnter(mounting) {
1861 var _this2 = this;
1862 var enter = this.props.enter;
1863 var appearing = this.context ? this.context.isMounting : mounting;
1864 var _ref2 = this.props.nodeRef ? [appearing] : [external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this), appearing],
1865 maybeNode = _ref2[0],
1866 maybeAppearing = _ref2[1];
1867 var timeouts = this.getTimeouts();
1868 var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED
1869 // if we are mounting and running this it means appear _must_ be set
1870
1871 if (!mounting && !enter || config.disabled) {
1872 this.safeSetState({
1873 status: ENTERED
1874 }, function () {
1875 _this2.props.onEntered(maybeNode);
1876 });
1877 return;
1878 }
1879 this.props.onEnter(maybeNode, maybeAppearing);
1880 this.safeSetState({
1881 status: ENTERING
1882 }, function () {
1883 _this2.props.onEntering(maybeNode, maybeAppearing);
1884 _this2.onTransitionEnd(enterTimeout, function () {
1885 _this2.safeSetState({
1886 status: ENTERED
1887 }, function () {
1888 _this2.props.onEntered(maybeNode, maybeAppearing);
1889 });
1890 });
1891 });
1892 };
1893 _proto.performExit = function performExit() {
1894 var _this3 = this;
1895 var exit = this.props.exit;
1896 var timeouts = this.getTimeouts();
1897 var maybeNode = this.props.nodeRef ? undefined : external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this); // no exit animation skip right to EXITED
1898
1899 if (!exit || config.disabled) {
1900 this.safeSetState({
1901 status: EXITED
1902 }, function () {
1903 _this3.props.onExited(maybeNode);
1904 });
1905 return;
1906 }
1907 this.props.onExit(maybeNode);
1908 this.safeSetState({
1909 status: EXITING
1910 }, function () {
1911 _this3.props.onExiting(maybeNode);
1912 _this3.onTransitionEnd(timeouts.exit, function () {
1913 _this3.safeSetState({
1914 status: EXITED
1915 }, function () {
1916 _this3.props.onExited(maybeNode);
1917 });
1918 });
1919 });
1920 };
1921 _proto.cancelNextCallback = function cancelNextCallback() {
1922 if (this.nextCallback !== null) {
1923 this.nextCallback.cancel();
1924 this.nextCallback = null;
1925 }
1926 };
1927 _proto.safeSetState = function safeSetState(nextState, callback) {
1928 // This shouldn't be necessary, but there are weird race conditions with
1929 // setState callbacks and unmounting in testing, so always make sure that
1930 // we can cancel any pending setState callbacks after we unmount.
1931 callback = this.setNextCallback(callback);
1932 this.setState(nextState, callback);
1933 };
1934 _proto.setNextCallback = function setNextCallback(callback) {
1935 var _this4 = this;
1936 var active = true;
1937 this.nextCallback = function (event) {
1938 if (active) {
1939 active = false;
1940 _this4.nextCallback = null;
1941 callback(event);
1942 }
1943 };
1944 this.nextCallback.cancel = function () {
1945 active = false;
1946 };
1947 return this.nextCallback;
1948 };
1949 _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {
1950 this.setNextCallback(handler);
1951 var node = this.props.nodeRef ? this.props.nodeRef.current : external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this);
1952 var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
1953 if (!node || doesNotHaveTimeoutOrListener) {
1954 setTimeout(this.nextCallback, 0);
1955 return;
1956 }
1957 if (this.props.addEndListener) {
1958 var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],
1959 maybeNode = _ref3[0],
1960 maybeNextCallback = _ref3[1];
1961 this.props.addEndListener(maybeNode, maybeNextCallback);
1962 }
1963 if (timeout != null) {
1964 setTimeout(this.nextCallback, timeout);
1965 }
1966 };
1967 _proto.render = function render() {
1968 var status = this.state.status;
1969 if (status === UNMOUNTED) {
1970 return null;
1971 }
1972 var _this$props = this.props,
1973 children = _this$props.children,
1974 _in = _this$props.in,
1975 _mountOnEnter = _this$props.mountOnEnter,
1976 _unmountOnExit = _this$props.unmountOnExit,
1977 _appear = _this$props.appear,
1978 _enter = _this$props.enter,
1979 _exit = _this$props.exit,
1980 _timeout = _this$props.timeout,
1981 _addEndListener = _this$props.addEndListener,
1982 _onEnter = _this$props.onEnter,
1983 _onEntering = _this$props.onEntering,
1984 _onEntered = _this$props.onEntered,
1985 _onExit = _this$props.onExit,
1986 _onExiting = _this$props.onExiting,
1987 _onExited = _this$props.onExited,
1988 _nodeRef = _this$props.nodeRef,
1989 childProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
1990 return /*#__PURE__*/(
1991 // allows for nested Transitions
1992 external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TransitionGroupContext.Provider, {
1993 value: null
1994 }, typeof children === 'function' ? children(status, childProps) : external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.only(children), childProps))
1995 );
1996 };
1997 return Transition;
1998}((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component);
1999Transition.contextType = TransitionGroupContext;
2000Transition.propTypes = false ? 0 : {}; // Name the function so it is clearer in the documentation
2001
2002function Transition_noop() {}
2003Transition.defaultProps = {
2004 in: false,
2005 mountOnEnter: false,
2006 unmountOnExit: false,
2007 appear: false,
2008 enter: true,
2009 exit: true,
2010 onEnter: Transition_noop,
2011 onEntering: Transition_noop,
2012 onEntered: Transition_noop,
2013 onExit: Transition_noop,
2014 onExiting: Transition_noop,
2015 onExited: Transition_noop
2016};
2017Transition.UNMOUNTED = UNMOUNTED;
2018Transition.EXITED = EXITED;
2019Transition.ENTERING = ENTERING;
2020Transition.ENTERED = ENTERED;
2021Transition.EXITING = EXITING;
2022/* harmony default export */ const esm_Transition = (Transition);
2023;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/canUseDOM.js
2024/* harmony default export */ const canUseDOM = (!!(typeof window !== 'undefined' && window.document && window.document.createElement));
2025;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/addEventListener.js
2026/* eslint-disable no-return-assign */
2027
2028var optionsSupported = false;
2029var onceSupported = false;
2030try {
2031 var options = {
2032 get passive() {
2033 return optionsSupported = true;
2034 },
2035 get once() {
2036 // eslint-disable-next-line no-multi-assign
2037 return onceSupported = optionsSupported = true;
2038 }
2039 };
2040 if (canUseDOM) {
2041 window.addEventListener('test', options, options);
2042 window.removeEventListener('test', options, true);
2043 }
2044} catch (e) {
2045 /* */
2046}
2047
2048/**
2049 * An `addEventListener` ponyfill, supports the `once` option
2050 *
2051 * @param node the element
2052 * @param eventName the event name
2053 * @param handle the handler
2054 * @param options event options
2055 */
2056function addEventListener(node, eventName, handler, options) {
2057 if (options && typeof options !== 'boolean' && !onceSupported) {
2058 var once = options.once,
2059 capture = options.capture;
2060 var wrappedHandler = handler;
2061 if (!onceSupported && once) {
2062 wrappedHandler = handler.__once || function onceHandler(event) {
2063 this.removeEventListener(eventName, onceHandler, capture);
2064 handler.call(this, event);
2065 };
2066 handler.__once = wrappedHandler;
2067 }
2068 node.addEventListener(eventName, wrappedHandler, optionsSupported ? options : capture);
2069 }
2070 node.addEventListener(eventName, handler, options);
2071}
2072/* harmony default export */ const esm_addEventListener = (addEventListener);
2073;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/removeEventListener.js
2074/**
2075 * A `removeEventListener` ponyfill
2076 *
2077 * @param node the element
2078 * @param eventName the event name
2079 * @param handle the handler
2080 * @param options event options
2081 */
2082function removeEventListener(node, eventName, handler, options) {
2083 var capture = options && typeof options !== 'boolean' ? options.capture : options;
2084 node.removeEventListener(eventName, handler, capture);
2085 if (handler.__once) {
2086 node.removeEventListener(eventName, handler.__once, capture);
2087 }
2088}
2089/* harmony default export */ const esm_removeEventListener = (removeEventListener);
2090;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/listen.js
2091
2092
2093function listen(node, eventName, handler, options) {
2094 esm_addEventListener(node, eventName, handler, options);
2095 return function () {
2096 esm_removeEventListener(node, eventName, handler, options);
2097 };
2098}
2099/* harmony default export */ const esm_listen = (listen);
2100;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/triggerEvent.js
2101/**
2102 * Triggers an event on a given element.
2103 *
2104 * @param node the element
2105 * @param eventName the event name to trigger
2106 * @param bubbles whether the event should bubble up
2107 * @param cancelable whether the event should be cancelable
2108 */
2109function triggerEvent(node, eventName, bubbles, cancelable) {
2110 if (bubbles === void 0) {
2111 bubbles = false;
2112 }
2113 if (cancelable === void 0) {
2114 cancelable = true;
2115 }
2116 if (node) {
2117 var event = document.createEvent('HTMLEvents');
2118 event.initEvent(eventName, bubbles, cancelable);
2119 node.dispatchEvent(event);
2120 }
2121}
2122;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/transitionEnd.js
2123
2124
2125
2126function parseDuration(node) {
2127 var str = css(node, 'transitionDuration') || '';
2128 var mult = str.indexOf('ms') === -1 ? 1000 : 1;
2129 return parseFloat(str) * mult;
2130}
2131function emulateTransitionEnd(element, duration, padding) {
2132 if (padding === void 0) {
2133 padding = 5;
2134 }
2135 var called = false;
2136 var handle = setTimeout(function () {
2137 if (!called) triggerEvent(element, 'transitionend', true);
2138 }, duration + padding);
2139 var remove = esm_listen(element, 'transitionend', function () {
2140 called = true;
2141 }, {
2142 once: true
2143 });
2144 return function () {
2145 clearTimeout(handle);
2146 remove();
2147 };
2148}
2149function transitionEnd(element, handler, duration, padding) {
2150 if (duration == null) duration = parseDuration(element) || 0;
2151 var removeEmulate = emulateTransitionEnd(element, duration, padding);
2152 var remove = esm_listen(element, 'transitionend', handler);
2153 return function () {
2154 removeEmulate();
2155 remove();
2156 };
2157}
2158;// CONCATENATED MODULE: ./src/transitionEndListener.ts
2159
2160
2161function transitionEndListener_parseDuration(node, property) {
2162 const str = css(node, property) || '';
2163 const mult = str.indexOf('ms') === -1 ? 1000 : 1;
2164 return parseFloat(str) * mult;
2165}
2166function transitionEndListener(element, handler) {
2167 const duration = transitionEndListener_parseDuration(element, 'transitionDuration');
2168 const delay = transitionEndListener_parseDuration(element, 'transitionDelay');
2169 const remove = transitionEnd(element, e => {
2170 if (e.target === element) {
2171 remove();
2172 handler(e);
2173 }
2174 }, duration + delay);
2175}
2176;// CONCATENATED MODULE: ./src/createChainedFunction.tsx
2177/**
2178 * Safe chained function
2179 *
2180 * Will only create a new function if needed,
2181 * otherwise will pass back existing functions or null.
2182 *
2183 * @param {function} functions to chain
2184 * @returns {function|null}
2185 */
2186function createChainedFunction(...funcs) {
2187 return funcs.filter(f => f != null).reduce((acc, f) => {
2188 if (typeof f !== 'function') {
2189 throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');
2190 }
2191 if (acc === null) return f;
2192 return function chainedFunction(...args) {
2193 // @ts-ignore
2194 acc.apply(this, args);
2195 // @ts-ignore
2196 f.apply(this, args);
2197 };
2198 }, null);
2199}
2200/* harmony default export */ const src_createChainedFunction = (createChainedFunction);
2201;// CONCATENATED MODULE: ./src/triggerBrowserReflow.tsx
2202// reading a dimension prop will cause the browser to recalculate,
2203// which will let our animations work
2204function triggerBrowserReflow(node) {
2205 // eslint-disable-next-line @typescript-eslint/no-unused-expressions
2206 node.offsetHeight;
2207}
2208;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMergedRefs.js
2209
2210var toFnRef = function toFnRef(ref) {
2211 return !ref || typeof ref === 'function' ? ref : function (value) {
2212 ref.current = value;
2213 };
2214};
2215function mergeRefs(refA, refB) {
2216 var a = toFnRef(refA);
2217 var b = toFnRef(refB);
2218 return function (value) {
2219 if (a) a(value);
2220 if (b) b(value);
2221 };
2222}
2223/**
2224 * Create and returns a single callback ref composed from two other Refs.
2225 *
2226 * ```tsx
2227 * const Button = React.forwardRef((props, ref) => {
2228 * const [element, attachRef] = useCallbackRef<HTMLButtonElement>();
2229 * const mergedRef = useMergedRefs(ref, attachRef);
2230 *
2231 * return <button ref={mergedRef} {...props}/>
2232 * })
2233 * ```
2234 *
2235 * @param refA A Callback or mutable Ref
2236 * @param refB A Callback or mutable Ref
2237 * @category refs
2238 */
2239
2240function useMergedRefs(refA, refB) {
2241 return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
2242 return mergeRefs(refA, refB);
2243 }, [refA, refB]);
2244}
2245/* harmony default export */ const esm_useMergedRefs = (useMergedRefs);
2246;// CONCATENATED MODULE: ./src/safeFindDOMNode.ts
2247
2248function safeFindDOMNode(componentOrElement) {
2249 if (componentOrElement && 'setState' in componentOrElement) {
2250 return external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(componentOrElement);
2251 }
2252 return componentOrElement != null ? componentOrElement : null;
2253}
2254;// CONCATENATED MODULE: ./src/TransitionWrapper.tsx
2255var TransitionWrapper_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/TransitionWrapper.tsx";
2256
2257
2258
2259
2260
2261// Normalizes Transition callbacks when nodeRef is used.
2262const TransitionWrapper = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(({
2263 onEnter,
2264 onEntering,
2265 onEntered,
2266 onExit,
2267 onExiting,
2268 onExited,
2269 addEndListener,
2270 children,
2271 childRef,
2272 ...props
2273}, ref) => {
2274 const nodeRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
2275 const mergedRef = esm_useMergedRefs(nodeRef, childRef);
2276 const attachRef = r => {
2277 mergedRef(safeFindDOMNode(r));
2278 };
2279 const normalize = callback => param => {
2280 if (callback && nodeRef.current) {
2281 callback(nodeRef.current, param);
2282 }
2283 };
2284
2285 /* eslint-disable react-hooks/exhaustive-deps */
2286 const handleEnter = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(normalize(onEnter), [onEnter]);
2287 const handleEntering = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(normalize(onEntering), [onEntering]);
2288 const handleEntered = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(normalize(onEntered), [onEntered]);
2289 const handleExit = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(normalize(onExit), [onExit]);
2290 const handleExiting = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(normalize(onExiting), [onExiting]);
2291 const handleExited = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(normalize(onExited), [onExited]);
2292 const handleAddEndListener = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(normalize(addEndListener), [addEndListener]);
2293 /* eslint-enable react-hooks/exhaustive-deps */
2294
2295 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Transition, {
2296 ref: ref,
2297 ...props,
2298 onEnter: handleEnter,
2299 onEntered: handleEntered,
2300 onEntering: handleEntering,
2301 onExit: handleExit,
2302 onExited: handleExited,
2303 onExiting: handleExiting,
2304 addEndListener: handleAddEndListener,
2305 nodeRef: nodeRef,
2306 children: typeof children === 'function' ? (status, innerProps) =>
2307 // TODO: Types for RTG missing innerProps, so need to cast.
2308 children(status, {
2309 ...innerProps,
2310 ref: attachRef
2311 }) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, {
2312 ref: attachRef
2313 })
2314 }, void 0, false, {
2315 fileName: TransitionWrapper_jsxFileName,
2316 lineNumber: 66,
2317 columnNumber: 7
2318 }, undefined);
2319});
2320/* harmony default export */ const src_TransitionWrapper = (TransitionWrapper);
2321;// CONCATENATED MODULE: ./src/Collapse.tsx
2322var Collapse_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Collapse.tsx";
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333const MARGINS = {
2334 height: ['marginTop', 'marginBottom'],
2335 width: ['marginLeft', 'marginRight']
2336};
2337function getDefaultDimensionValue(dimension, elem) {
2338 const offset = `offset${dimension[0].toUpperCase()}${dimension.slice(1)}`;
2339 const value = elem[offset];
2340 const margins = MARGINS[dimension];
2341 return value +
2342 // @ts-ignore
2343 parseInt(css(elem, margins[0]), 10) +
2344 // @ts-ignore
2345 parseInt(css(elem, margins[1]), 10);
2346}
2347const collapseStyles = {
2348 [EXITED]: 'collapse',
2349 [EXITING]: 'collapsing',
2350 [ENTERING]: 'collapsing',
2351 [ENTERED]: 'collapse show'
2352};
2353const propTypes = {
2354 /**
2355 * Show the component; triggers the expand or collapse animation
2356 */
2357 in: (prop_types_default()).bool,
2358 /**
2359 * Wait until the first "enter" transition to mount the component (add it to the DOM)
2360 */
2361 mountOnEnter: (prop_types_default()).bool,
2362 /**
2363 * Unmount the component (remove it from the DOM) when it is collapsed
2364 */
2365 unmountOnExit: (prop_types_default()).bool,
2366 /**
2367 * Run the expand animation when the component mounts, if it is initially
2368 * shown
2369 */
2370 appear: (prop_types_default()).bool,
2371 /**
2372 * Duration of the collapse animation in milliseconds, to ensure that
2373 * finishing callbacks are fired even if the original browser transition end
2374 * events are canceled
2375 */
2376 timeout: (prop_types_default()).number,
2377 /**
2378 * Callback fired before the component expands
2379 */
2380 onEnter: (prop_types_default()).func,
2381 /**
2382 * Callback fired after the component starts to expand
2383 */
2384 onEntering: (prop_types_default()).func,
2385 /**
2386 * Callback fired after the component has expanded
2387 */
2388 onEntered: (prop_types_default()).func,
2389 /**
2390 * Callback fired before the component collapses
2391 */
2392 onExit: (prop_types_default()).func,
2393 /**
2394 * Callback fired after the component starts to collapse
2395 */
2396 onExiting: (prop_types_default()).func,
2397 /**
2398 * Callback fired after the component has collapsed
2399 */
2400 onExited: (prop_types_default()).func,
2401 /**
2402 * The dimension used when collapsing, or a function that returns the
2403 * dimension
2404 */
2405 dimension: prop_types_default().oneOfType([prop_types_default().oneOf(['height', 'width']), (prop_types_default()).func]),
2406 /**
2407 * Function that returns the height or width of the animating DOM node
2408 *
2409 * Allows for providing some custom logic for how much the Collapse component
2410 * should animate in its specified dimension. Called with the current
2411 * dimension prop value and the DOM node.
2412 *
2413 * @default element.offsetWidth | element.offsetHeight
2414 */
2415 getDimensionValue: (prop_types_default()).func,
2416 /**
2417 * ARIA role of collapsible element
2418 */
2419 role: (prop_types_default()).string,
2420 /**
2421 * You must provide a single JSX child element to this component and that element cannot be a \<React.Fragment\>
2422 */
2423 children: (prop_types_default()).element.isRequired
2424};
2425const Collapse = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(({
2426 onEnter,
2427 onEntering,
2428 onEntered,
2429 onExit,
2430 onExiting,
2431 className,
2432 children,
2433 dimension = 'height',
2434 in: inProp = false,
2435 timeout = 300,
2436 mountOnEnter = false,
2437 unmountOnExit = false,
2438 appear = false,
2439 getDimensionValue = getDefaultDimensionValue,
2440 ...props
2441}, ref) => {
2442 /* Compute dimension */
2443 const computedDimension = typeof dimension === 'function' ? dimension() : dimension;
2444
2445 /* -- Expanding -- */
2446 const handleEnter = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => src_createChainedFunction(elem => {
2447 elem.style[computedDimension] = '0';
2448 }, onEnter), [computedDimension, onEnter]);
2449 const handleEntering = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => src_createChainedFunction(elem => {
2450 const scroll = `scroll${computedDimension[0].toUpperCase()}${computedDimension.slice(1)}`;
2451 elem.style[computedDimension] = `${elem[scroll]}px`;
2452 }, onEntering), [computedDimension, onEntering]);
2453 const handleEntered = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => src_createChainedFunction(elem => {
2454 elem.style[computedDimension] = null;
2455 }, onEntered), [computedDimension, onEntered]);
2456
2457 /* -- Collapsing -- */
2458 const handleExit = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => src_createChainedFunction(elem => {
2459 elem.style[computedDimension] = `${getDimensionValue(computedDimension, elem)}px`;
2460 triggerBrowserReflow(elem);
2461 }, onExit), [onExit, getDimensionValue, computedDimension]);
2462 const handleExiting = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => src_createChainedFunction(elem => {
2463 elem.style[computedDimension] = null;
2464 }, onExiting), [computedDimension, onExiting]);
2465 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_TransitionWrapper, {
2466 ref: ref,
2467 addEndListener: transitionEndListener,
2468 ...props,
2469 "aria-expanded": props.role ? inProp : null,
2470 onEnter: handleEnter,
2471 onEntering: handleEntering,
2472 onEntered: handleEntered,
2473 onExit: handleExit,
2474 onExiting: handleExiting,
2475 childRef: children.ref,
2476 in: inProp,
2477 timeout: timeout,
2478 mountOnEnter: mountOnEnter,
2479 unmountOnExit: unmountOnExit,
2480 appear: appear,
2481 children: (state, innerProps) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, {
2482 ...innerProps,
2483 className: classnames_default()(className, children.props.className, collapseStyles[state], computedDimension === 'width' && 'collapse-horizontal')
2484 })
2485 }, void 0, false, {
2486 fileName: Collapse_jsxFileName,
2487 lineNumber: 222,
2488 columnNumber: 7
2489 }, undefined);
2490});
2491
2492// @ts-ignore
2493Collapse.propTypes = propTypes;
2494/* harmony default export */ const src_Collapse = (Collapse);
2495;// CONCATENATED MODULE: ./src/AccordionContext.ts
2496
2497function isAccordionItemSelected(activeEventKey, eventKey) {
2498 return Array.isArray(activeEventKey) ? activeEventKey.includes(eventKey) : activeEventKey === eventKey;
2499}
2500const context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
2501context.displayName = 'AccordionContext';
2502/* harmony default export */ const AccordionContext = (context);
2503;// CONCATENATED MODULE: ./src/AccordionCollapse.tsx
2504var AccordionCollapse_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AccordionCollapse.tsx";
2505
2506
2507
2508
2509
2510
2511
2512
2513const AccordionCollapse_propTypes = {
2514 /** Set a custom element for this component */
2515 as: (prop_types_default()).elementType,
2516 /**
2517 * A key that corresponds to the toggler that triggers this collapse's expand or collapse.
2518 */
2519 eventKey: (prop_types_default()).string.isRequired,
2520 /** Children prop should only contain a single child, and is enforced as such */
2521 children: (prop_types_default()).element.isRequired
2522};
2523
2524/**
2525 * This component accepts all of [`Collapse`'s props](/docs/utilities/transitions#collapse-1).
2526 */
2527const AccordionCollapse = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
2528 as: Component = 'div',
2529 bsPrefix,
2530 className,
2531 children,
2532 eventKey,
2533 ...props
2534}, ref) => {
2535 const {
2536 activeEventKey
2537 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AccordionContext);
2538 bsPrefix = useBootstrapPrefix(bsPrefix, 'accordion-collapse');
2539 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Collapse, {
2540 ref: ref,
2541 in: isAccordionItemSelected(activeEventKey, eventKey),
2542 ...props,
2543 className: classnames_default()(className, bsPrefix),
2544 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
2545 children: external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.only(children)
2546 }, void 0, false, {
2547 fileName: AccordionCollapse_jsxFileName,
2548 lineNumber: 56,
2549 columnNumber: 9
2550 }, undefined)
2551 }, void 0, false, {
2552 fileName: AccordionCollapse_jsxFileName,
2553 lineNumber: 50,
2554 columnNumber: 7
2555 }, undefined);
2556});
2557AccordionCollapse.propTypes = AccordionCollapse_propTypes;
2558AccordionCollapse.displayName = 'AccordionCollapse';
2559/* harmony default export */ const src_AccordionCollapse = (AccordionCollapse);
2560;// CONCATENATED MODULE: ./src/AccordionItemContext.ts
2561
2562const AccordionItemContext_context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
2563 eventKey: ''
2564});
2565AccordionItemContext_context.displayName = 'AccordionItemContext';
2566/* harmony default export */ const AccordionItemContext = (AccordionItemContext_context);
2567;// CONCATENATED MODULE: ./src/AccordionBody.tsx
2568var AccordionBody_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AccordionBody.tsx";
2569
2570
2571
2572
2573
2574
2575
2576
2577const AccordionBody_propTypes = {
2578 /** Set a custom element for this component */
2579 as: (prop_types_default()).elementType,
2580 /** @default 'accordion-body' */
2581 bsPrefix: (prop_types_default()).string,
2582 /**
2583 * Callback fired before the component expands
2584 */
2585 onEnter: (prop_types_default()).func,
2586 /**
2587 * Callback fired after the component starts to expand
2588 */
2589 onEntering: (prop_types_default()).func,
2590 /**
2591 * Callback fired after the component has expanded
2592 */
2593 onEntered: (prop_types_default()).func,
2594 /**
2595 * Callback fired before the component collapses
2596 */
2597 onExit: (prop_types_default()).func,
2598 /**
2599 * Callback fired after the component starts to collapse
2600 */
2601 onExiting: (prop_types_default()).func,
2602 /**
2603 * Callback fired after the component has collapsed
2604 */
2605 onExited: (prop_types_default()).func
2606};
2607const AccordionBody = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
2608 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
2609 as: Component = 'div',
2610 bsPrefix,
2611 className,
2612 onEnter,
2613 onEntering,
2614 onEntered,
2615 onExit,
2616 onExiting,
2617 onExited,
2618 ...props
2619}, ref) => {
2620 bsPrefix = useBootstrapPrefix(bsPrefix, 'accordion-body');
2621 const {
2622 eventKey
2623 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AccordionItemContext);
2624 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_AccordionCollapse, {
2625 eventKey: eventKey,
2626 onEnter: onEnter,
2627 onEntering: onEntering,
2628 onEntered: onEntered,
2629 onExit: onExit,
2630 onExiting: onExiting,
2631 onExited: onExited,
2632 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
2633 ref: ref,
2634 ...props,
2635 className: classnames_default()(className, bsPrefix)
2636 }, void 0, false, {
2637 fileName: AccordionBody_jsxFileName,
2638 lineNumber: 80,
2639 columnNumber: 11
2640 }, undefined)
2641 }, void 0, false, {
2642 fileName: AccordionBody_jsxFileName,
2643 lineNumber: 71,
2644 columnNumber: 9
2645 }, undefined);
2646});
2647AccordionBody.propTypes = AccordionBody_propTypes;
2648AccordionBody.displayName = 'AccordionBody';
2649/* harmony default export */ const src_AccordionBody = (AccordionBody);
2650;// CONCATENATED MODULE: ./src/AccordionButton.tsx
2651var AccordionButton_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AccordionButton.tsx";
2652
2653
2654
2655
2656
2657
2658
2659
2660const AccordionButton_propTypes = {
2661 /** Set a custom element for this component */
2662 as: (prop_types_default()).elementType,
2663 /** @default 'accordion-button' */
2664 bsPrefix: (prop_types_default()).string,
2665 /** A callback function for when this component is clicked */
2666 onClick: (prop_types_default()).func
2667};
2668function useAccordionButton(eventKey, onClick) {
2669 const {
2670 activeEventKey,
2671 onSelect,
2672 alwaysOpen
2673 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AccordionContext);
2674 return e => {
2675 /*
2676 Compare the event key in context with the given event key.
2677 If they are the same, then collapse the component.
2678 */
2679 let eventKeyPassed = eventKey === activeEventKey ? null : eventKey;
2680 if (alwaysOpen) {
2681 if (Array.isArray(activeEventKey)) {
2682 if (activeEventKey.includes(eventKey)) {
2683 eventKeyPassed = activeEventKey.filter(k => k !== eventKey);
2684 } else {
2685 eventKeyPassed = [...activeEventKey, eventKey];
2686 }
2687 } else {
2688 // activeEventKey is undefined.
2689 eventKeyPassed = [eventKey];
2690 }
2691 }
2692 onSelect == null ? void 0 : onSelect(eventKeyPassed, e);
2693 onClick == null ? void 0 : onClick(e);
2694 };
2695}
2696const AccordionButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
2697 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
2698 as: Component = 'button',
2699 bsPrefix,
2700 className,
2701 onClick,
2702 ...props
2703}, ref) => {
2704 bsPrefix = useBootstrapPrefix(bsPrefix, 'accordion-button');
2705 const {
2706 eventKey
2707 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AccordionItemContext);
2708 const accordionOnClick = useAccordionButton(eventKey, onClick);
2709 const {
2710 activeEventKey
2711 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(AccordionContext);
2712 if (Component === 'button') {
2713 props.type = 'button';
2714 }
2715 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
2716 ref: ref,
2717 onClick: accordionOnClick,
2718 ...props,
2719 "aria-expanded": Array.isArray(activeEventKey) ? activeEventKey.includes(eventKey) : eventKey === activeEventKey,
2720 className: classnames_default()(className, bsPrefix, !isAccordionItemSelected(activeEventKey, eventKey) && 'collapsed')
2721 }, void 0, false, {
2722 fileName: AccordionButton_jsxFileName,
2723 lineNumber: 86,
2724 columnNumber: 7
2725 }, undefined);
2726});
2727AccordionButton.propTypes = AccordionButton_propTypes;
2728AccordionButton.displayName = 'AccordionButton';
2729/* harmony default export */ const src_AccordionButton = (AccordionButton);
2730;// CONCATENATED MODULE: ./src/AccordionHeader.tsx
2731var AccordionHeader_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AccordionHeader.tsx";
2732
2733
2734
2735
2736
2737
2738const AccordionHeader_propTypes = {
2739 /** Set a custom element for this component */
2740 as: (prop_types_default()).elementType,
2741 /** @default 'accordion-header' */
2742 bsPrefix: (prop_types_default()).string,
2743 /** Click handler for the `AccordionButton` element */
2744 onClick: (prop_types_default()).func
2745};
2746const AccordionHeader = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
2747 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
2748 as: Component = 'h2',
2749 bsPrefix,
2750 className,
2751 children,
2752 onClick,
2753 ...props
2754}, ref) => {
2755 bsPrefix = useBootstrapPrefix(bsPrefix, 'accordion-header');
2756 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
2757 ref: ref,
2758 ...props,
2759 className: classnames_default()(className, bsPrefix),
2760 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_AccordionButton, {
2761 onClick: onClick,
2762 children: children
2763 }, void 0, false, {
2764 fileName: AccordionHeader_jsxFileName,
2765 lineNumber: 47,
2766 columnNumber: 9
2767 }, undefined)
2768 }, void 0, false, {
2769 fileName: AccordionHeader_jsxFileName,
2770 lineNumber: 42,
2771 columnNumber: 7
2772 }, undefined);
2773});
2774AccordionHeader.propTypes = AccordionHeader_propTypes;
2775AccordionHeader.displayName = 'AccordionHeader';
2776/* harmony default export */ const src_AccordionHeader = (AccordionHeader);
2777;// CONCATENATED MODULE: ./src/AccordionItem.tsx
2778var AccordionItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AccordionItem.tsx";
2779
2780
2781
2782
2783
2784
2785
2786const AccordionItem_propTypes = {
2787 /** Set a custom element for this component */
2788 as: (prop_types_default()).elementType,
2789 /** @default 'accordion-item' */
2790 bsPrefix: (prop_types_default()).string,
2791 /**
2792 * A unique key used to control this item's collapse/expand.
2793 * @required
2794 */
2795 eventKey: (prop_types_default()).string.isRequired
2796};
2797const AccordionItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
2798 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
2799 as: Component = 'div',
2800 bsPrefix,
2801 className,
2802 eventKey,
2803 ...props
2804}, ref) => {
2805 bsPrefix = useBootstrapPrefix(bsPrefix, 'accordion-item');
2806 const contextValue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
2807 eventKey
2808 }), [eventKey]);
2809 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(AccordionItemContext.Provider, {
2810 value: contextValue,
2811 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
2812 ref: ref,
2813 ...props,
2814 className: classnames_default()(className, bsPrefix)
2815 }, void 0, false, {
2816 fileName: AccordionItem_jsxFileName,
2817 lineNumber: 54,
2818 columnNumber: 11
2819 }, undefined)
2820 }, void 0, false, {
2821 fileName: AccordionItem_jsxFileName,
2822 lineNumber: 53,
2823 columnNumber: 9
2824 }, undefined);
2825});
2826AccordionItem.propTypes = AccordionItem_propTypes;
2827AccordionItem.displayName = 'AccordionItem';
2828/* harmony default export */ const src_AccordionItem = (AccordionItem);
2829;// CONCATENATED MODULE: ./src/Accordion.tsx
2830var Accordion_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Accordion.tsx";
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844const Accordion_propTypes = {
2845 /** Set a custom element for this component */
2846 as: (prop_types_default()).elementType,
2847 /** @default 'accordion' */
2848 bsPrefix: (prop_types_default()).string,
2849 /** The current active key that corresponds to the currently expanded card */
2850 activeKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).array]),
2851 /** The default active key that is expanded on start */
2852 defaultActiveKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).array]),
2853 /**
2854 * Callback fired when the active item changes.
2855 *
2856 * ```js
2857 * (eventKey: string | string[] | null, event: Object) => void
2858 * ```
2859 *
2860 * @controllable activeIndex
2861 */
2862 onSelect: (prop_types_default()).func,
2863 /** Renders accordion edge-to-edge with its parent container */
2864 flush: (prop_types_default()).bool,
2865 /** Allow accordion items to stay open when another item is opened */
2866 alwaysOpen: (prop_types_default()).bool
2867};
2868const Accordion = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
2869 const {
2870 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
2871 as: Component = 'div',
2872 activeKey,
2873 bsPrefix,
2874 className,
2875 onSelect,
2876 flush,
2877 alwaysOpen,
2878 ...controlledProps
2879 } = useUncontrolled(props, {
2880 activeKey: 'onSelect'
2881 });
2882 const prefix = useBootstrapPrefix(bsPrefix, 'accordion');
2883 const contextValue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
2884 activeEventKey: activeKey,
2885 onSelect,
2886 alwaysOpen
2887 }), [activeKey, onSelect, alwaysOpen]);
2888 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(AccordionContext.Provider, {
2889 value: contextValue,
2890 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
2891 ref: ref,
2892 ...controlledProps,
2893 className: classnames_default()(className, prefix, flush && `${prefix}-flush`)
2894 }, void 0, false, {
2895 fileName: Accordion_jsxFileName,
2896 lineNumber: 87,
2897 columnNumber: 9
2898 }, undefined)
2899 }, void 0, false, {
2900 fileName: Accordion_jsxFileName,
2901 lineNumber: 86,
2902 columnNumber: 7
2903 }, undefined);
2904});
2905Accordion.displayName = 'Accordion';
2906Accordion.propTypes = Accordion_propTypes;
2907/* harmony default export */ const src_Accordion = (Object.assign(Accordion, {
2908 Button: src_AccordionButton,
2909 Collapse: src_AccordionCollapse,
2910 Item: src_AccordionItem,
2911 Header: src_AccordionHeader,
2912 Body: src_AccordionBody
2913}));
2914// EXTERNAL MODULE: ./node_modules/prop-types-extra/lib/index.js
2915var lib = __webpack_require__(517);
2916;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useCommittedRef.js
2917
2918/**
2919 * Creates a `Ref` whose value is updated in an effect, ensuring the most recent
2920 * value is the one rendered with. Generally only required for Concurrent mode usage
2921 * where previous work in `render()` may be discarded before being used.
2922 *
2923 * This is safe to access in an event handler.
2924 *
2925 * @param value The `Ref` value
2926 */
2927
2928function useCommittedRef_useCommittedRef(value) {
2929 var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value);
2930 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
2931 ref.current = value;
2932 }, [value]);
2933 return ref;
2934}
2935/* harmony default export */ const esm_useCommittedRef = (useCommittedRef_useCommittedRef);
2936;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useEventCallback.js
2937
2938
2939function useEventCallback(fn) {
2940 var ref = esm_useCommittedRef(fn);
2941 return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
2942 return ref.current && ref.current.apply(ref, arguments);
2943 }, [ref]);
2944}
2945;// CONCATENATED MODULE: ./src/divWithClassName.tsx
2946var divWithClassName_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/divWithClassName.tsx";
2947
2948
2949
2950/* harmony default export */ const divWithClassName = (className => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((p, ref) => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
2951 ...p,
2952 ref: ref,
2953 className: classnames_default()(p.className, className)
2954}, void 0, false, {
2955 fileName: divWithClassName_jsxFileName,
2956 lineNumber: 6,
2957 columnNumber: 5
2958}, undefined)));
2959;// CONCATENATED MODULE: ./src/AlertHeading.tsx
2960var AlertHeading_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AlertHeading.tsx";
2961
2962
2963
2964
2965
2966const DivStyledAsH4 = divWithClassName('h4');
2967DivStyledAsH4.displayName = 'DivStyledAsH4';
2968const AlertHeading = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
2969 className,
2970 bsPrefix,
2971 as: Component = DivStyledAsH4,
2972 ...props
2973}, ref) => {
2974 bsPrefix = useBootstrapPrefix(bsPrefix, 'alert-heading');
2975 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
2976 ref: ref,
2977 className: classnames_default()(className, bsPrefix),
2978 ...props
2979 }, void 0, false, {
2980 fileName: AlertHeading_jsxFileName,
2981 lineNumber: 19,
2982 columnNumber: 9
2983 }, undefined);
2984});
2985AlertHeading.displayName = 'AlertHeading';
2986/* harmony default export */ const src_AlertHeading = (AlertHeading);
2987;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useCallbackRef.js
2988
2989/**
2990 * A convenience hook around `useState` designed to be paired with
2991 * the component [callback ref](https://reactjs.org/docs/refs-and-the-dom.html#callback-refs) api.
2992 * Callback refs are useful over `useRef()` when you need to respond to the ref being set
2993 * instead of lazily accessing it in an effect.
2994 *
2995 * ```ts
2996 * const [element, attachRef] = useCallbackRef<HTMLDivElement>()
2997 *
2998 * useEffect(() => {
2999 * if (!element) return
3000 *
3001 * const calendar = new FullCalendar.Calendar(element)
3002 *
3003 * return () => {
3004 * calendar.destroy()
3005 * }
3006 * }, [element])
3007 *
3008 * return <div ref={attachRef} />
3009 * ```
3010 *
3011 * @category refs
3012 */
3013
3014function useCallbackRef() {
3015 return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
3016}
3017;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useEventListener.js
3018
3019
3020
3021/**
3022 * Attaches an event handler outside directly to specified DOM element
3023 * bypassing the react synthetic event system.
3024 *
3025 * @param element The target to listen for events on
3026 * @param event The DOM event name
3027 * @param handler An event handler
3028 * @param capture Whether or not to listen during the capture event phase
3029 */
3030function useEventListener_useEventListener(eventTarget, event, listener, capture) {
3031 if (capture === void 0) {
3032 capture = false;
3033 }
3034 var handler = useEventCallback(listener);
3035 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
3036 var target = typeof eventTarget === 'function' ? eventTarget() : eventTarget;
3037 target.addEventListener(event, handler, capture);
3038 return function () {
3039 return target.removeEventListener(event, handler, capture);
3040 };
3041 }, [eventTarget]);
3042}
3043;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useGlobalListener.js
3044
3045
3046
3047/**
3048 * Attaches an event handler outside directly to the `document`,
3049 * bypassing the react synthetic event system.
3050 *
3051 * ```ts
3052 * useGlobalListener('keydown', (event) => {
3053 * console.log(event.key)
3054 * })
3055 * ```
3056 *
3057 * @param event The DOM event name
3058 * @param handler An event handler
3059 * @param capture Whether or not to listen during the capture event phase
3060 */
3061function useGlobalListener(event, handler, capture) {
3062 if (capture === void 0) {
3063 capture = false;
3064 }
3065 var documentTarget = useCallback(function () {
3066 return document;
3067 }, []);
3068 return useEventListener(documentTarget, event, handler, capture);
3069}
3070;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useInterval.js
3071
3072
3073/**
3074 * Creates a `setInterval` that is properly cleaned up when a component unmounted
3075 *
3076 * ```tsx
3077 * function Timer() {
3078 * const [timer, setTimer] = useState(0)
3079 * useInterval(() => setTimer(i => i + 1), 1000)
3080 *
3081 * return <span>{timer} seconds past</span>
3082 * }
3083 * ```
3084 *
3085 * @param fn an function run on each interval
3086 * @param ms The milliseconds duration of the interval
3087 */
3088
3089function useInterval(fn, ms, paused, runImmediately) {
3090 if (paused === void 0) {
3091 paused = false;
3092 }
3093 if (runImmediately === void 0) {
3094 runImmediately = false;
3095 }
3096 var handle;
3097 var fnRef = useCommittedRef(fn); // this ref is necessary b/c useEffect will sometimes miss a paused toggle
3098 // orphaning a setTimeout chain in the aether, so relying on it's refresh logic is not reliable.
3099
3100 var pausedRef = useCommittedRef(paused);
3101 var tick = function tick() {
3102 if (pausedRef.current) return;
3103 fnRef.current();
3104 schedule(); // eslint-disable-line no-use-before-define
3105 };
3106
3107 var schedule = function schedule() {
3108 clearTimeout(handle);
3109 handle = setTimeout(tick, ms);
3110 };
3111 useEffect(function () {
3112 if (runImmediately) {
3113 tick();
3114 } else {
3115 schedule();
3116 }
3117 return function () {
3118 return clearTimeout(handle);
3119 };
3120 }, [paused, runImmediately]);
3121}
3122/* harmony default export */ const esm_useInterval = ((/* unused pure expression or super */ null && (useInterval)));
3123;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useRafInterval.js
3124
3125
3126function useRafInterval(fn, ms, paused) {
3127 if (paused === void 0) {
3128 paused = false;
3129 }
3130 var handle;
3131 var start = new Date().getTime();
3132 var fnRef = useCommittedRef(fn); // this ref is necessary b/c useEffect will sometimes miss a paused toggle
3133 // orphaning a setTimeout chain in the aether, so relying on it's refresh logic is not reliable.
3134
3135 var pausedRef = useCommittedRef(paused);
3136 function loop() {
3137 var current = new Date().getTime();
3138 var delta = current - start;
3139 if (pausedRef.current) return;
3140 if (delta >= ms && fnRef.current) {
3141 fnRef.current();
3142 start = new Date().getTime();
3143 }
3144 cancelAnimationFrame(handle);
3145 handle = requestAnimationFrame(loop);
3146 }
3147 useEffect(function () {
3148 handle = requestAnimationFrame(loop);
3149 return function () {
3150 return cancelAnimationFrame(handle);
3151 };
3152 }, []);
3153}
3154/* harmony default export */ const esm_useRafInterval = ((/* unused pure expression or super */ null && (useRafInterval)));
3155;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMergeState.js
3156function useMergeState_extends() {
3157 useMergeState_extends = Object.assign || function (target) {
3158 for (var i = 1; i < arguments.length; i++) {
3159 var source = arguments[i];
3160 for (var key in source) {
3161 if (Object.prototype.hasOwnProperty.call(source, key)) {
3162 target[key] = source[key];
3163 }
3164 }
3165 }
3166 return target;
3167 };
3168 return useMergeState_extends.apply(this, arguments);
3169}
3170
3171
3172/**
3173 * Mimics a React class component's state model, of having a single unified
3174 * `state` object and an updater that merges updates into the existing state, as
3175 * opposed to replacing it.
3176 *
3177 * ```js
3178 * const [state, setState] = useMergeState({ name: 'Betsy', age: 24 })
3179 *
3180 * setState({ name: 'Johan' }) // { name: 'Johan', age: 24 }
3181 *
3182 * setState(state => ({ age: state.age + 10 })) // { name: 'Johan', age: 34 }
3183 * ```
3184 *
3185 * @param initialState The initial state object
3186 */
3187function useMergeState_useMergeState(initialState) {
3188 var _useState = useState(initialState),
3189 state = _useState[0],
3190 setState = _useState[1];
3191 var updater = useCallback(function (update) {
3192 if (update === null) return;
3193 if (typeof update === 'function') {
3194 setState(function (state) {
3195 var nextState = update(state);
3196 return nextState == null ? state : useMergeState_extends({}, state, nextState);
3197 });
3198 } else {
3199 setState(function (state) {
3200 return useMergeState_extends({}, state, update);
3201 });
3202 }
3203 }, [setState]);
3204 return [state, updater];
3205}
3206;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMergeStateFromProps.js
3207
3208function useMergeStateFromProps(props, gDSFP, initialState) {
3209 var _useMergeState = useMergeState(initialState),
3210 state = _useMergeState[0],
3211 setState = _useMergeState[1];
3212 var nextState = gDSFP(props, state);
3213 if (nextState !== null) setState(nextState);
3214 return [state, setState];
3215}
3216;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMounted.js
3217
3218/**
3219 * Track whether a component is current mounted. Generally less preferable than
3220 * properlly canceling effects so they don't run after a component is unmounted,
3221 * but helpful in cases where that isn't feasible, such as a `Promise` resolution.
3222 *
3223 * @returns a function that returns the current isMounted state of the component
3224 *
3225 * ```ts
3226 * const [data, setData] = useState(null)
3227 * const isMounted = useMounted()
3228 *
3229 * useEffect(() => {
3230 * fetchdata().then((newData) => {
3231 * if (isMounted()) {
3232 * setData(newData);
3233 * }
3234 * })
3235 * })
3236 * ```
3237 */
3238
3239function useMounted() {
3240 var mounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true);
3241 var isMounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(function () {
3242 return mounted.current;
3243 });
3244 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
3245 mounted.current = true;
3246 return function () {
3247 mounted.current = false;
3248 };
3249 }, []);
3250 return isMounted.current;
3251}
3252;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/usePrevious.js
3253
3254/**
3255 * Store the last of some value. Tracked via a `Ref` only updating it
3256 * after the component renders.
3257 *
3258 * Helpful if you need to compare a prop value to it's previous value during render.
3259 *
3260 * ```ts
3261 * function Component(props) {
3262 * const lastProps = usePrevious(props)
3263 *
3264 * if (lastProps.foo !== props.foo)
3265 * resetValueFromProps(props.foo)
3266 * }
3267 * ```
3268 *
3269 * @param value the value to track
3270 */
3271
3272function usePrevious(value) {
3273 var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
3274 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
3275 ref.current = value;
3276 });
3277 return ref.current;
3278}
3279;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useImage.js
3280
3281
3282/**
3283 * Fetch and load an image for programatic use such as in a `<canvas>` element.
3284 *
3285 * @param imageOrUrl The `HtmlImageElement` or image url to load
3286 * @param crossOrigin The `crossorigin` attribute to set
3287 *
3288 * ```ts
3289 * const { image, error } = useImage('/static/kittens.png')
3290 * const ref = useRef<HTMLCanvasElement>()
3291 *
3292 * useEffect(() => {
3293 * const ctx = ref.current.getContext('2d')
3294 *
3295 * if (image) {
3296 * ctx.drawImage(image, 0, 0)
3297 * }
3298 * }, [ref, image])
3299 *
3300 * return (
3301 * <>
3302 * {error && "there was a problem loading the image"}
3303 * <canvas ref={ref} />
3304 * </>
3305 * ```
3306 */
3307function useImage(imageOrUrl, crossOrigin) {
3308 var _useState = useState({
3309 image: null,
3310 error: null
3311 }),
3312 state = _useState[0],
3313 setState = _useState[1];
3314 useEffect(function () {
3315 if (!imageOrUrl) return undefined;
3316 var image;
3317 if (typeof imageOrUrl === 'string') {
3318 image = new Image();
3319 if (crossOrigin) image.crossOrigin = crossOrigin;
3320 image.src = imageOrUrl;
3321 } else {
3322 image = imageOrUrl;
3323 if (image.complete && image.naturalHeight > 0) {
3324 setState({
3325 image: image,
3326 error: null
3327 });
3328 return;
3329 }
3330 }
3331 function onLoad() {
3332 setState({
3333 image: image,
3334 error: null
3335 });
3336 }
3337 function onError(error) {
3338 setState({
3339 image: image,
3340 error: error
3341 });
3342 }
3343 image.addEventListener('load', onLoad);
3344 image.addEventListener('error', onError);
3345 return function () {
3346 image.removeEventListener('load', onLoad);
3347 image.removeEventListener('error', onError);
3348 };
3349 }, [imageOrUrl, crossOrigin]);
3350 return state;
3351}
3352;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useIsomorphicEffect.js
3353
3354var isReactNative = typeof __webpack_require__.g !== 'undefined' &&
3355// @ts-ignore
3356__webpack_require__.g.navigator &&
3357// @ts-ignore
3358__webpack_require__.g.navigator.product === 'ReactNative';
3359var isDOM = typeof document !== 'undefined';
3360/**
3361 * Is `useLayoutEffect` in a DOM or React Native environment, otherwise resolves to useEffect
3362 * Only useful to avoid the console warning.
3363 *
3364 * PREFER `useEffect` UNLESS YOU KNOW WHAT YOU ARE DOING.
3365 *
3366 * @category effects
3367 */
3368
3369/* harmony default export */ const useIsomorphicEffect = (isDOM || isReactNative ? external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect : external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect);
3370;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useResizeObserver.js
3371
3372
3373var targetMap = new WeakMap();
3374var resizeObserver;
3375function getResizeObserver() {
3376 // eslint-disable-next-line no-return-assign
3377 return resizeObserver = resizeObserver || new window.ResizeObserver(function (entries) {
3378 entries.forEach(function (entry) {
3379 var handler = targetMap.get(entry.target);
3380 if (handler) handler(entry.contentRect);
3381 });
3382 });
3383}
3384/**
3385 * Efficiently observe size changes on an element. Depends on the `ResizeObserver` api,
3386 * and polyfills are needed in older browsers.
3387 *
3388 * ```ts
3389 * const [ref, attachRef] = useCallbackRef(null);
3390 *
3391 * const rect = useResizeObserver(ref);
3392 *
3393 * return (
3394 * <div ref={attachRef}>
3395 * {JSON.stringify(rect)}
3396 * </div>
3397 * )
3398 * ```
3399 *
3400 * @param element The DOM element to observe
3401 */
3402
3403function useResizeObserver(element) {
3404 var _useState = useState(null),
3405 rect = _useState[0],
3406 setRect = _useState[1];
3407 useEffect(function () {
3408 if (!element) return;
3409 getResizeObserver().observe(element);
3410 setRect(element.getBoundingClientRect());
3411 targetMap.set(element, function (rect) {
3412 setRect(rect);
3413 });
3414 return function () {
3415 targetMap.delete(element);
3416 };
3417 }, [element]);
3418 return rect;
3419}
3420;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/index.js
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
3436var jsx_runtime = __webpack_require__(373);
3437;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/Button.js
3438const _excluded = ["as", "disabled"];
3439function Button_objectWithoutPropertiesLoose(source, excluded) {
3440 if (source == null) return {};
3441 var target = {};
3442 var sourceKeys = Object.keys(source);
3443 var key, i;
3444 for (i = 0; i < sourceKeys.length; i++) {
3445 key = sourceKeys[i];
3446 if (excluded.indexOf(key) >= 0) continue;
3447 target[key] = source[key];
3448 }
3449 return target;
3450}
3451
3452
3453function isTrivialHref(href) {
3454 return !href || href.trim() === '#';
3455}
3456function useButtonProps({
3457 tagName,
3458 disabled,
3459 href,
3460 target,
3461 rel,
3462 role,
3463 onClick,
3464 tabIndex = 0,
3465 type
3466}) {
3467 if (!tagName) {
3468 if (href != null || target != null || rel != null) {
3469 tagName = 'a';
3470 } else {
3471 tagName = 'button';
3472 }
3473 }
3474 const meta = {
3475 tagName
3476 };
3477 if (tagName === 'button') {
3478 return [{
3479 type: type || 'button',
3480 disabled
3481 }, meta];
3482 }
3483 const handleClick = event => {
3484 if (disabled || tagName === 'a' && isTrivialHref(href)) {
3485 event.preventDefault();
3486 }
3487 if (disabled) {
3488 event.stopPropagation();
3489 return;
3490 }
3491 onClick == null ? void 0 : onClick(event);
3492 };
3493 const handleKeyDown = event => {
3494 if (event.key === ' ') {
3495 event.preventDefault();
3496 handleClick(event);
3497 }
3498 };
3499 if (tagName === 'a') {
3500 // Ensure there's a href so Enter can trigger anchor button.
3501 href || (href = '#');
3502 if (disabled) {
3503 href = undefined;
3504 }
3505 }
3506 return [{
3507 role: role != null ? role : 'button',
3508 // explicitly undefined so that it overrides the props disabled in a spread
3509 // e.g. <Tag {...props} {...hookProps} />
3510 disabled: undefined,
3511 tabIndex: disabled ? undefined : tabIndex,
3512 href,
3513 target: tagName === 'a' ? target : undefined,
3514 'aria-disabled': !disabled ? undefined : disabled,
3515 rel: tagName === 'a' ? rel : undefined,
3516 onClick: handleClick,
3517 onKeyDown: handleKeyDown
3518 }, meta];
3519}
3520const Button = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((_ref, ref) => {
3521 let {
3522 as: asProp,
3523 disabled
3524 } = _ref,
3525 props = Button_objectWithoutPropertiesLoose(_ref, _excluded);
3526 const [buttonProps, {
3527 tagName: Component
3528 }] = useButtonProps(Object.assign({
3529 tagName: asProp,
3530 disabled
3531 }, props));
3532 return /*#__PURE__*/(0,jsx_runtime.jsx)(Component, Object.assign({}, props, buttonProps, {
3533 ref: ref
3534 }));
3535});
3536Button.displayName = 'Button';
3537/* harmony default export */ const esm_Button = (Button);
3538;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/Anchor.js
3539const Anchor_excluded = ["onKeyDown"];
3540function Anchor_objectWithoutPropertiesLoose(source, excluded) {
3541 if (source == null) return {};
3542 var target = {};
3543 var sourceKeys = Object.keys(source);
3544 var key, i;
3545 for (i = 0; i < sourceKeys.length; i++) {
3546 key = sourceKeys[i];
3547 if (excluded.indexOf(key) >= 0) continue;
3548 target[key] = source[key];
3549 }
3550 return target;
3551}
3552/* eslint-disable jsx-a11y/no-static-element-interactions */
3553/* eslint-disable jsx-a11y/anchor-has-content */
3554
3555
3556
3557
3558
3559function Anchor_isTrivialHref(href) {
3560 return !href || href.trim() === '#';
3561}
3562/**
3563 * An generic `<a>` component that covers a few A11y cases, ensuring that
3564 * cases where the `href` is missing or trivial like "#" are treated like buttons.
3565 */
3566const Anchor = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((_ref, ref) => {
3567 let {
3568 onKeyDown
3569 } = _ref,
3570 props = Anchor_objectWithoutPropertiesLoose(_ref, Anchor_excluded);
3571 const [buttonProps] = useButtonProps(Object.assign({
3572 tagName: 'a'
3573 }, props));
3574 const handleKeyDown = useEventCallback(e => {
3575 buttonProps.onKeyDown(e);
3576 onKeyDown == null ? void 0 : onKeyDown(e);
3577 });
3578 if (Anchor_isTrivialHref(props.href) || props.role === 'button') {
3579 return /*#__PURE__*/(0,jsx_runtime.jsx)("a", Object.assign({
3580 ref: ref
3581 }, props, buttonProps, {
3582 onKeyDown: handleKeyDown
3583 }));
3584 }
3585 return /*#__PURE__*/(0,jsx_runtime.jsx)("a", Object.assign({
3586 ref: ref
3587 }, props, {
3588 onKeyDown: onKeyDown
3589 }));
3590});
3591Anchor.displayName = 'Anchor';
3592/* harmony default export */ const esm_Anchor = (Anchor);
3593;// CONCATENATED MODULE: ./src/AlertLink.tsx
3594var AlertLink_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AlertLink.tsx";
3595
3596
3597
3598
3599
3600const AlertLink = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
3601 className,
3602 bsPrefix,
3603 as: Component = esm_Anchor,
3604 ...props
3605}, ref) => {
3606 bsPrefix = useBootstrapPrefix(bsPrefix, 'alert-link');
3607 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
3608 ref: ref,
3609 className: classnames_default()(className, bsPrefix),
3610 ...props
3611 }, void 0, false, {
3612 fileName: AlertLink_jsxFileName,
3613 lineNumber: 16,
3614 columnNumber: 9
3615 }, undefined);
3616});
3617AlertLink.displayName = 'AlertLink';
3618/* harmony default export */ const src_AlertLink = (AlertLink);
3619;// CONCATENATED MODULE: ./src/Fade.tsx
3620var Fade_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Fade.tsx";
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630const Fade_propTypes = {
3631 /**
3632 * Show the component; triggers the fade in or fade out animation
3633 */
3634 in: (prop_types_default()).bool,
3635 /**
3636 * Wait until the first "enter" transition to mount the component (add it to the DOM)
3637 */
3638 mountOnEnter: (prop_types_default()).bool,
3639 /**
3640 * Unmount the component (remove it from the DOM) when it is faded out
3641 */
3642 unmountOnExit: (prop_types_default()).bool,
3643 /**
3644 * Run the fade in animation when the component mounts, if it is initially
3645 * shown
3646 */
3647 appear: (prop_types_default()).bool,
3648 /**
3649 * Duration of the fade animation in milliseconds, to ensure that finishing
3650 * callbacks are fired even if the original browser transition end events are
3651 * canceled
3652 */
3653 timeout: (prop_types_default()).number,
3654 /**
3655 * Callback fired before the component fades in
3656 */
3657 onEnter: (prop_types_default()).func,
3658 /**
3659 * Callback fired after the component starts to fade in
3660 */
3661 onEntering: (prop_types_default()).func,
3662 /**
3663 * Callback fired after the has component faded in
3664 */
3665 onEntered: (prop_types_default()).func,
3666 /**
3667 * Callback fired before the component fades out
3668 */
3669 onExit: (prop_types_default()).func,
3670 /**
3671 * Callback fired after the component starts to fade out
3672 */
3673 onExiting: (prop_types_default()).func,
3674 /**
3675 * Callback fired after the component has faded out
3676 */
3677 onExited: (prop_types_default()).func,
3678 /**
3679 * You must provide a single JSX child element to this component and that element cannot be a \<React.Fragment\>
3680 */
3681 children: (prop_types_default()).element.isRequired,
3682 /**
3683 * Applies additional specified classes during the transition. Takes an object
3684 * where the keys correspond to the Transition status
3685 */
3686 transitionClasses: (prop_types_default()).object
3687};
3688const fadeStyles = {
3689 [ENTERING]: 'show',
3690 [ENTERED]: 'show'
3691};
3692const Fade = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
3693 className,
3694 children,
3695 transitionClasses = {},
3696 onEnter,
3697 ...rest
3698}, ref) => {
3699 const props = {
3700 in: false,
3701 timeout: 300,
3702 mountOnEnter: false,
3703 unmountOnExit: false,
3704 appear: false,
3705 ...rest
3706 };
3707 const handleEnter = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((node, isAppearing) => {
3708 triggerBrowserReflow(node);
3709 onEnter == null ? void 0 : onEnter(node, isAppearing);
3710 }, [onEnter]);
3711 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_TransitionWrapper, {
3712 ref: ref,
3713 addEndListener: transitionEndListener,
3714 ...props,
3715 onEnter: handleEnter,
3716 childRef: children.ref,
3717 children: (status, innerProps) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(children, {
3718 ...innerProps,
3719 className: classnames_default()('fade', className, children.props.className, fadeStyles[status], transitionClasses[status])
3720 })
3721 }, void 0, false, {
3722 fileName: Fade_jsxFileName,
3723 lineNumber: 117,
3724 columnNumber: 7
3725 }, undefined);
3726});
3727Fade.propTypes = Fade_propTypes;
3728Fade.displayName = 'Fade';
3729/* harmony default export */ const src_Fade = (Fade);
3730;// CONCATENATED MODULE: ./src/CloseButton.tsx
3731var CloseButton_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CloseButton.tsx";
3732
3733
3734
3735
3736const CloseButton_propTypes = {
3737 /** An accessible label indicating the relevant information about the Close Button. */
3738 'aria-label': (prop_types_default()).string,
3739 /** A callback fired after the Close Button is clicked. */
3740 onClick: (prop_types_default()).func,
3741 /**
3742 * Render different color variant for the button.
3743 *
3744 * Omitting this will render the default dark color.
3745 */
3746 variant: prop_types_default().oneOf(['white'])
3747};
3748const CloseButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
3749 className,
3750 variant,
3751 'aria-label': ariaLabel = 'Close',
3752 ...props
3753}, ref) => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("button", {
3754 ref: ref,
3755 type: "button",
3756 className: classnames_default()('btn-close', variant && `btn-close-${variant}`, className),
3757 "aria-label": ariaLabel,
3758 ...props
3759}, void 0, false, {
3760 fileName: CloseButton_jsxFileName,
3761 lineNumber: 32,
3762 columnNumber: 5
3763}, undefined));
3764CloseButton.displayName = 'CloseButton';
3765CloseButton.propTypes = CloseButton_propTypes;
3766/* harmony default export */ const src_CloseButton = (CloseButton);
3767;// CONCATENATED MODULE: ./src/Alert.tsx
3768var Alert_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Alert.tsx";
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781const Alert_propTypes = {
3782 /**
3783 * @default 'alert'
3784 */
3785 bsPrefix: (prop_types_default()).string,
3786 /**
3787 * The Alert visual variant
3788 *
3789 * @type {'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light'}
3790 */
3791 variant: (prop_types_default()).string,
3792 /**
3793 * Renders a properly aligned dismiss button, as well as
3794 * adding extra horizontal padding to the Alert.
3795 */
3796 dismissible: (prop_types_default()).bool,
3797 /**
3798 * Controls the visual state of the Alert.
3799 *
3800 * @controllable onClose
3801 */
3802 show: (prop_types_default()).bool,
3803 /**
3804 * Callback fired when alert is closed.
3805 *
3806 * @controllable show
3807 */
3808 onClose: (prop_types_default()).func,
3809 /**
3810 * Sets the text for alert close button.
3811 */
3812 closeLabel: (prop_types_default()).string,
3813 /**
3814 * Sets the variant for close button.
3815 */
3816 closeVariant: prop_types_default().oneOf(['white']),
3817 /**
3818 * Animate the alert dismissal. Defaults to using `<Fade>` animation or use
3819 * `false` to disable. A custom `react-transition-group` Transition can also
3820 * be provided.
3821 */
3822 transition: prop_types_default().oneOfType([(prop_types_default()).bool, lib/* elementType */.nm])
3823};
3824const Alert = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((uncontrolledProps, ref) => {
3825 const {
3826 bsPrefix,
3827 show = true,
3828 closeLabel = 'Close alert',
3829 closeVariant,
3830 className,
3831 children,
3832 variant = 'primary',
3833 onClose,
3834 dismissible,
3835 transition = src_Fade,
3836 ...props
3837 } = useUncontrolled(uncontrolledProps, {
3838 show: 'onClose'
3839 });
3840 const prefix = useBootstrapPrefix(bsPrefix, 'alert');
3841 const handleClose = useEventCallback(e => {
3842 if (onClose) {
3843 onClose(false, e);
3844 }
3845 });
3846 const Transition = transition === true ? src_Fade : transition;
3847 const alert = /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
3848 role: "alert",
3849 ...(!Transition ? props : undefined),
3850 ref: ref,
3851 className: classnames_default()(className, prefix, variant && `${prefix}-${variant}`, dismissible && `${prefix}-dismissible`),
3852 children: [dismissible && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_CloseButton, {
3853 onClick: handleClose,
3854 "aria-label": closeLabel,
3855 variant: closeVariant
3856 }, void 0, false, {
3857 fileName: Alert_jsxFileName,
3858 lineNumber: 115,
3859 columnNumber: 11
3860 }, undefined), children]
3861 }, void 0, true, {
3862 fileName: Alert_jsxFileName,
3863 lineNumber: 103,
3864 columnNumber: 7
3865 }, undefined);
3866 if (!Transition) return show ? alert : null;
3867 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Transition, {
3868 unmountOnExit: true,
3869 ...props,
3870 ref: undefined,
3871 in: show,
3872 children: alert
3873 }, void 0, false, {
3874 fileName: Alert_jsxFileName,
3875 lineNumber: 128,
3876 columnNumber: 7
3877 }, undefined);
3878});
3879Alert.displayName = 'Alert';
3880Alert.propTypes = Alert_propTypes;
3881/* harmony default export */ const src_Alert = (Object.assign(Alert, {
3882 Link: src_AlertLink,
3883 Heading: src_AlertHeading
3884}));
3885;// CONCATENATED MODULE: ./src/Anchor.tsx
3886
3887/* harmony default export */ const src_Anchor = (esm_Anchor);
3888;// CONCATENATED MODULE: ./src/Badge.tsx
3889var Badge_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Badge.tsx";
3890
3891
3892
3893
3894
3895const Badge_propTypes = {
3896 /** @default 'badge' */
3897 bsPrefix: (prop_types_default()).string,
3898 /**
3899 * The visual style of the badge
3900 *
3901 * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'light'|'dark')}
3902 */
3903 bg: (prop_types_default()).string,
3904 /**
3905 * Add the `pill` modifier to make badges more rounded with
3906 * some additional horizontal padding
3907 */
3908 pill: (prop_types_default()).bool,
3909 /**
3910 * Sets badge text color
3911 *
3912 * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'light'|'dark')}
3913 */
3914 text: (prop_types_default()).string,
3915 /** @default span */
3916 as: (prop_types_default()).elementType
3917};
3918const Badge = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
3919 bsPrefix,
3920 bg = 'primary',
3921 pill = false,
3922 text,
3923 className,
3924 as: Component = 'span',
3925 ...props
3926}, ref) => {
3927 const prefix = useBootstrapPrefix(bsPrefix, 'badge');
3928 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
3929 ref: ref,
3930 ...props,
3931 className: classnames_default()(className, prefix, pill && `rounded-pill`, text && `text-${text}`, bg && `bg-${bg}`)
3932 }, void 0, false, {
3933 fileName: Badge_jsxFileName,
3934 lineNumber: 61,
3935 columnNumber: 9
3936 }, undefined);
3937});
3938Badge.displayName = 'Badge';
3939Badge.propTypes = Badge_propTypes;
3940/* harmony default export */ const src_Badge = (Badge);
3941;// CONCATENATED MODULE: ./src/BreadcrumbItem.tsx
3942var BreadcrumbItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/BreadcrumbItem.tsx";
3943
3944
3945
3946
3947
3948
3949const BreadcrumbItem_propTypes = {
3950 /**
3951 * @default 'breadcrumb-item'
3952 */
3953 bsPrefix: (prop_types_default()).string,
3954 /**
3955 * Adds a visual "active" state to a Breadcrumb
3956 * Item and disables the link.
3957 */
3958 active: (prop_types_default()).bool,
3959 /**
3960 * `href` attribute for the inner `a` element
3961 */
3962 href: (prop_types_default()).string,
3963 /**
3964 * You can use a custom element type for this component's inner link.
3965 */
3966 linkAs: (prop_types_default()).elementType,
3967 /**
3968 * `title` attribute for the inner `a` element
3969 */
3970 title: (prop_types_default()).node,
3971 /**
3972 * `target` attribute for the inner `a` element
3973 */
3974 target: (prop_types_default()).string,
3975 /**
3976 * Additional props passed as-is to the underlying link for non-active items.
3977 */
3978 linkProps: (prop_types_default()).object,
3979 as: (prop_types_default()).elementType
3980};
3981const BreadcrumbItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
3982 bsPrefix,
3983 active = false,
3984 children,
3985 className,
3986 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
3987 as: Component = 'li',
3988 linkAs: LinkComponent = esm_Anchor,
3989 linkProps = {},
3990 href,
3991 title,
3992 target,
3993 ...props
3994}, ref) => {
3995 const prefix = useBootstrapPrefix(bsPrefix, 'breadcrumb-item');
3996 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
3997 ref: ref,
3998 ...props,
3999 className: classnames_default()(prefix, className, {
4000 active
4001 }),
4002 "aria-current": active ? 'page' : undefined,
4003 children: active ? children : /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(LinkComponent, {
4004 ...linkProps,
4005 href: href,
4006 title: title,
4007 target: target,
4008 children: children
4009 }, void 0, false, {
4010 fileName: BreadcrumbItem_jsxFileName,
4011 lineNumber: 86,
4012 columnNumber: 11
4013 }, undefined)
4014 }, void 0, false, {
4015 fileName: BreadcrumbItem_jsxFileName,
4016 lineNumber: 77,
4017 columnNumber: 7
4018 }, undefined);
4019});
4020BreadcrumbItem.displayName = 'BreadcrumbItem';
4021BreadcrumbItem.propTypes = BreadcrumbItem_propTypes;
4022/* harmony default export */ const src_BreadcrumbItem = (BreadcrumbItem);
4023;// CONCATENATED MODULE: ./src/Breadcrumb.tsx
4024var Breadcrumb_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Breadcrumb.tsx";
4025
4026
4027
4028
4029
4030
4031const Breadcrumb_propTypes = {
4032 /**
4033 * @default 'breadcrumb'
4034 */
4035 bsPrefix: (prop_types_default()).string,
4036 /**
4037 * ARIA label for the nav element
4038 * https://www.w3.org/TR/wai-aria-practices/#breadcrumb
4039 */
4040 label: (prop_types_default()).string,
4041 /**
4042 * Additional props passed as-is to the underlying `<ol>` element
4043 */
4044 listProps: (prop_types_default()).object,
4045 as: (prop_types_default()).elementType
4046};
4047const Breadcrumb = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4048 bsPrefix,
4049 className,
4050 listProps = {},
4051 children,
4052 label = 'breadcrumb',
4053 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
4054 as: Component = 'nav',
4055 ...props
4056}, ref) => {
4057 const prefix = useBootstrapPrefix(bsPrefix, 'breadcrumb');
4058 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4059 "aria-label": label,
4060 className: className,
4061 ref: ref,
4062 ...props,
4063 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("ol", {
4064 ...listProps,
4065 className: classnames_default()(prefix, listProps == null ? void 0 : listProps.className),
4066 children: children
4067 }, void 0, false, {
4068 fileName: Breadcrumb_jsxFileName,
4069 lineNumber: 60,
4070 columnNumber: 11
4071 }, undefined)
4072 }, void 0, false, {
4073 fileName: Breadcrumb_jsxFileName,
4074 lineNumber: 54,
4075 columnNumber: 9
4076 }, undefined);
4077});
4078Breadcrumb.displayName = 'Breadcrumb';
4079Breadcrumb.propTypes = Breadcrumb_propTypes;
4080/* harmony default export */ const src_Breadcrumb = (Object.assign(Breadcrumb, {
4081 Item: src_BreadcrumbItem
4082}));
4083;// CONCATENATED MODULE: ./src/Button.tsx
4084var Button_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Button.tsx";
4085
4086
4087
4088
4089
4090
4091const Button_propTypes = {
4092 /**
4093 * @default 'btn'
4094 */
4095 bsPrefix: (prop_types_default()).string,
4096 /**
4097 * One or more button variant combinations
4098 *
4099 * buttons may be one of a variety of visual variants such as:
4100 *
4101 * `'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', 'link'`
4102 *
4103 * as well as "outline" versions (prefixed by 'outline-*')
4104 *
4105 * `'outline-primary', 'outline-secondary', 'outline-success', 'outline-danger', 'outline-warning', 'outline-info', 'outline-dark', 'outline-light'`
4106 */
4107 variant: (prop_types_default()).string,
4108 /**
4109 * Callback fired when the button is clicked.
4110 */
4111 onClick: (prop_types_default()).func,
4112 /**
4113 * Specifies a large or small button.
4114 *
4115 * @type ('sm'|'lg')
4116 */
4117 size: (prop_types_default()).string,
4118 /** Manually set the visual state of the button to `:active` */
4119 active: (prop_types_default()).bool,
4120 /**
4121 * Disables the Button, preventing mouse events,
4122 * even if the underlying component is an `<a>` element
4123 */
4124 disabled: (prop_types_default()).bool,
4125 /** Providing a `href` will render an `<a>` element, _styled_ as a button. */
4126 href: (prop_types_default()).string,
4127 /**
4128 * Defines HTML button type attribute.
4129 *
4130 * @default 'button'
4131 */
4132 type: prop_types_default().oneOf(['button', 'reset', 'submit', null]),
4133 as: (prop_types_default()).elementType
4134};
4135const Button_Button = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4136 as,
4137 bsPrefix,
4138 variant = 'primary',
4139 size,
4140 active = false,
4141 disabled = false,
4142 className,
4143 ...props
4144}, ref) => {
4145 const prefix = useBootstrapPrefix(bsPrefix, 'btn');
4146 const [buttonProps, {
4147 tagName
4148 }] = useButtonProps({
4149 tagName: as,
4150 disabled,
4151 ...props
4152 });
4153 const Component = tagName;
4154 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4155 ...buttonProps,
4156 ...props,
4157 ref: ref,
4158 disabled: disabled,
4159 className: classnames_default()(className, prefix, active && 'active', variant && `${prefix}-${variant}`, size && `${prefix}-${size}`, props.href && disabled && 'disabled')
4160 }, void 0, false, {
4161 fileName: Button_jsxFileName,
4162 lineNumber: 100,
4163 columnNumber: 9
4164 }, undefined);
4165});
4166Button_Button.displayName = 'Button';
4167Button_Button.propTypes = Button_propTypes;
4168/* harmony default export */ const src_Button = (Button_Button);
4169;// CONCATENATED MODULE: ./src/ButtonGroup.tsx
4170var ButtonGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ButtonGroup.tsx";
4171
4172
4173
4174
4175
4176const ButtonGroup_propTypes = {
4177 /**
4178 * @default 'btn-group'
4179 */
4180 bsPrefix: (prop_types_default()).string,
4181 /**
4182 * Sets the size for all Buttons in the group.
4183 *
4184 * @type ('sm'|'lg')
4185 */
4186 size: (prop_types_default()).string,
4187 /** Make the set of Buttons appear vertically stacked. */
4188 vertical: (prop_types_default()).bool,
4189 /**
4190 * An ARIA role describing the button group. Usually the default
4191 * "group" role is fine. An `aria-label` or `aria-labelledby`
4192 * prop is also recommended.
4193 */
4194 role: (prop_types_default()).string,
4195 as: (prop_types_default()).elementType
4196};
4197const ButtonGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4198 bsPrefix,
4199 size,
4200 vertical = false,
4201 className,
4202 role = 'group',
4203 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
4204 as: Component = 'div',
4205 ...rest
4206}, ref) => {
4207 const prefix = useBootstrapPrefix(bsPrefix, 'btn-group');
4208 let baseClass = prefix;
4209 if (vertical) baseClass = `${prefix}-vertical`;
4210 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4211 ...rest,
4212 ref: ref,
4213 role: role,
4214 className: classnames_default()(className, baseClass, size && `${prefix}-${size}`)
4215 }, void 0, false, {
4216 fileName: ButtonGroup_jsxFileName,
4217 lineNumber: 62,
4218 columnNumber: 9
4219 }, undefined);
4220});
4221ButtonGroup.displayName = 'ButtonGroup';
4222ButtonGroup.propTypes = ButtonGroup_propTypes;
4223/* harmony default export */ const src_ButtonGroup = (ButtonGroup);
4224;// CONCATENATED MODULE: ./src/ButtonToolbar.tsx
4225var ButtonToolbar_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ButtonToolbar.tsx";
4226
4227
4228
4229
4230
4231const ButtonToolbar_propTypes = {
4232 /**
4233 * @default 'btn-toolbar'
4234 */
4235 bsPrefix: (prop_types_default()).string,
4236 /**
4237 * The ARIA role describing the button toolbar. Generally the default
4238 * "toolbar" role is correct. An `aria-label` or `aria-labelledby`
4239 * prop is also recommended.
4240 */
4241 role: (prop_types_default()).string
4242};
4243const ButtonToolbar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4244 bsPrefix,
4245 className,
4246 role = 'toolbar',
4247 ...props
4248}, ref) => {
4249 const prefix = useBootstrapPrefix(bsPrefix, 'btn-toolbar');
4250 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
4251 ...props,
4252 ref: ref,
4253 className: classnames_default()(className, prefix),
4254 role: role
4255 }, void 0, false, {
4256 fileName: ButtonToolbar_jsxFileName,
4257 lineNumber: 32,
4258 columnNumber: 7
4259 }, undefined);
4260});
4261ButtonToolbar.displayName = 'ButtonToolbar';
4262ButtonToolbar.propTypes = ButtonToolbar_propTypes;
4263/* harmony default export */ const src_ButtonToolbar = (ButtonToolbar);
4264;// CONCATENATED MODULE: ./src/CardBody.tsx
4265var CardBody_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CardBody.tsx";
4266
4267
4268
4269
4270const CardBody = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4271 className,
4272 bsPrefix,
4273 as: Component = 'div',
4274 ...props
4275}, ref) => {
4276 bsPrefix = useBootstrapPrefix(bsPrefix, 'card-body');
4277 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4278 ref: ref,
4279 className: classnames_default()(className, bsPrefix),
4280 ...props
4281 }, void 0, false, {
4282 fileName: CardBody_jsxFileName,
4283 lineNumber: 15,
4284 columnNumber: 9
4285 }, undefined);
4286});
4287CardBody.displayName = 'CardBody';
4288/* harmony default export */ const src_CardBody = (CardBody);
4289;// CONCATENATED MODULE: ./src/CardFooter.tsx
4290var CardFooter_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CardFooter.tsx";
4291
4292
4293
4294
4295const CardFooter = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4296 className,
4297 bsPrefix,
4298 as: Component = 'div',
4299 ...props
4300}, ref) => {
4301 bsPrefix = useBootstrapPrefix(bsPrefix, 'card-footer');
4302 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4303 ref: ref,
4304 className: classnames_default()(className, bsPrefix),
4305 ...props
4306 }, void 0, false, {
4307 fileName: CardFooter_jsxFileName,
4308 lineNumber: 15,
4309 columnNumber: 9
4310 }, undefined);
4311});
4312CardFooter.displayName = 'CardFooter';
4313/* harmony default export */ const src_CardFooter = (CardFooter);
4314;// CONCATENATED MODULE: ./src/CardHeaderContext.tsx
4315
4316const CardHeaderContext_context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
4317CardHeaderContext_context.displayName = 'CardHeaderContext';
4318/* harmony default export */ const CardHeaderContext = (CardHeaderContext_context);
4319;// CONCATENATED MODULE: ./src/CardHeader.tsx
4320var CardHeader_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CardHeader.tsx";
4321
4322
4323
4324
4325
4326
4327
4328const CardHeader_propTypes = {
4329 /**
4330 * @default 'card-header'
4331 */
4332 bsPrefix: (prop_types_default()).string,
4333 as: (prop_types_default()).elementType
4334};
4335const CardHeader = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4336 bsPrefix,
4337 className,
4338 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
4339 as: Component = 'div',
4340 ...props
4341}, ref) => {
4342 const prefix = useBootstrapPrefix(bsPrefix, 'card-header');
4343 const contextValue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
4344 cardHeaderBsPrefix: prefix
4345 }), [prefix]);
4346 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(CardHeaderContext.Provider, {
4347 value: contextValue,
4348 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4349 ref: ref,
4350 ...props,
4351 className: classnames_default()(className, prefix)
4352 }, void 0, false, {
4353 fileName: CardHeader_jsxFileName,
4354 lineNumber: 45,
4355 columnNumber: 11
4356 }, undefined)
4357 }, void 0, false, {
4358 fileName: CardHeader_jsxFileName,
4359 lineNumber: 44,
4360 columnNumber: 9
4361 }, undefined);
4362});
4363CardHeader.displayName = 'CardHeader';
4364CardHeader.propTypes = CardHeader_propTypes;
4365/* harmony default export */ const src_CardHeader = (CardHeader);
4366;// CONCATENATED MODULE: ./src/CardImg.tsx
4367var CardImg_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CardImg.tsx";
4368
4369
4370
4371
4372
4373const CardImg_propTypes = {
4374 /**
4375 * @default 'card-img'
4376 */
4377 bsPrefix: (prop_types_default()).string,
4378 /**
4379 * Defines image position inside
4380 * the card.
4381 *
4382 * @type {('top'|'bottom')}
4383 */
4384 variant: prop_types_default().oneOf(['top', 'bottom']),
4385 as: (prop_types_default()).elementType
4386};
4387const CardImg = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(
4388// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
4389({
4390 bsPrefix,
4391 className,
4392 variant,
4393 as: Component = 'img',
4394 ...props
4395}, ref) => {
4396 const prefix = useBootstrapPrefix(bsPrefix, 'card-img');
4397 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4398 ref: ref,
4399 className: classnames_default()(variant ? `${prefix}-${variant}` : prefix, className),
4400 ...props
4401 }, void 0, false, {
4402 fileName: CardImg_jsxFileName,
4403 lineNumber: 47,
4404 columnNumber: 9
4405 }, undefined);
4406});
4407CardImg.displayName = 'CardImg';
4408CardImg.propTypes = CardImg_propTypes;
4409/* harmony default export */ const src_CardImg = (CardImg);
4410;// CONCATENATED MODULE: ./src/CardImgOverlay.tsx
4411var CardImgOverlay_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CardImgOverlay.tsx";
4412
4413
4414
4415
4416const CardImgOverlay = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4417 className,
4418 bsPrefix,
4419 as: Component = 'div',
4420 ...props
4421}, ref) => {
4422 bsPrefix = useBootstrapPrefix(bsPrefix, 'card-img-overlay');
4423 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4424 ref: ref,
4425 className: classnames_default()(className, bsPrefix),
4426 ...props
4427 }, void 0, false, {
4428 fileName: CardImgOverlay_jsxFileName,
4429 lineNumber: 17,
4430 columnNumber: 7
4431 }, undefined);
4432});
4433CardImgOverlay.displayName = 'CardImgOverlay';
4434/* harmony default export */ const src_CardImgOverlay = (CardImgOverlay);
4435;// CONCATENATED MODULE: ./src/CardLink.tsx
4436var CardLink_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CardLink.tsx";
4437
4438
4439
4440
4441const CardLink = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4442 className,
4443 bsPrefix,
4444 as: Component = 'a',
4445 ...props
4446}, ref) => {
4447 bsPrefix = useBootstrapPrefix(bsPrefix, 'card-link');
4448 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4449 ref: ref,
4450 className: classnames_default()(className, bsPrefix),
4451 ...props
4452 }, void 0, false, {
4453 fileName: CardLink_jsxFileName,
4454 lineNumber: 15,
4455 columnNumber: 9
4456 }, undefined);
4457});
4458CardLink.displayName = 'CardLink';
4459/* harmony default export */ const src_CardLink = (CardLink);
4460;// CONCATENATED MODULE: ./src/CardSubtitle.tsx
4461var CardSubtitle_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CardSubtitle.tsx";
4462
4463
4464
4465
4466
4467const DivStyledAsH6 = divWithClassName('h6');
4468const CardSubtitle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4469 className,
4470 bsPrefix,
4471 as: Component = DivStyledAsH6,
4472 ...props
4473}, ref) => {
4474 bsPrefix = useBootstrapPrefix(bsPrefix, 'card-subtitle');
4475 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4476 ref: ref,
4477 className: classnames_default()(className, bsPrefix),
4478 ...props
4479 }, void 0, false, {
4480 fileName: CardSubtitle_jsxFileName,
4481 lineNumber: 18,
4482 columnNumber: 9
4483 }, undefined);
4484});
4485CardSubtitle.displayName = 'CardSubtitle';
4486/* harmony default export */ const src_CardSubtitle = (CardSubtitle);
4487;// CONCATENATED MODULE: ./src/CardText.tsx
4488var CardText_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CardText.tsx";
4489
4490
4491
4492
4493const CardText = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4494 className,
4495 bsPrefix,
4496 as: Component = 'p',
4497 ...props
4498}, ref) => {
4499 bsPrefix = useBootstrapPrefix(bsPrefix, 'card-text');
4500 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4501 ref: ref,
4502 className: classnames_default()(className, bsPrefix),
4503 ...props
4504 }, void 0, false, {
4505 fileName: CardText_jsxFileName,
4506 lineNumber: 15,
4507 columnNumber: 9
4508 }, undefined);
4509});
4510CardText.displayName = 'CardText';
4511/* harmony default export */ const src_CardText = (CardText);
4512;// CONCATENATED MODULE: ./src/CardTitle.tsx
4513var CardTitle_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CardTitle.tsx";
4514
4515
4516
4517
4518
4519const DivStyledAsH5 = divWithClassName('h5');
4520const CardTitle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4521 className,
4522 bsPrefix,
4523 as: Component = DivStyledAsH5,
4524 ...props
4525}, ref) => {
4526 bsPrefix = useBootstrapPrefix(bsPrefix, 'card-title');
4527 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4528 ref: ref,
4529 className: classnames_default()(className, bsPrefix),
4530 ...props
4531 }, void 0, false, {
4532 fileName: CardTitle_jsxFileName,
4533 lineNumber: 18,
4534 columnNumber: 9
4535 }, undefined);
4536});
4537CardTitle.displayName = 'CardTitle';
4538/* harmony default export */ const src_CardTitle = (CardTitle);
4539;// CONCATENATED MODULE: ./src/Card.tsx
4540var Card_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Card.tsx";
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555const Card_propTypes = {
4556 /**
4557 * @default 'card'
4558 */
4559 bsPrefix: (prop_types_default()).string,
4560 /**
4561 * Sets card background
4562 *
4563 * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'dark'|'light')}
4564 */
4565 bg: (prop_types_default()).string,
4566 /**
4567 * Sets card text color
4568 *
4569 * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'dark'|'light'|'white'|'muted')}
4570 */
4571 text: (prop_types_default()).string,
4572 /**
4573 * Sets card border color
4574 *
4575 * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'dark'|'light')}
4576 */
4577 border: (prop_types_default()).string,
4578 /**
4579 * When this prop is set, it creates a Card with a Card.Body inside
4580 * passing the children directly to it
4581 */
4582 body: (prop_types_default()).bool,
4583 as: (prop_types_default()).elementType
4584};
4585const Card = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4586 bsPrefix,
4587 className,
4588 bg,
4589 text,
4590 border,
4591 body = false,
4592 children,
4593 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
4594 as: Component = 'div',
4595 ...props
4596}, ref) => {
4597 const prefix = useBootstrapPrefix(bsPrefix, 'card');
4598 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4599 ref: ref,
4600 ...props,
4601 className: classnames_default()(className, prefix, bg && `bg-${bg}`, text && `text-${text}`, border && `border-${border}`),
4602 children: body ? /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_CardBody, {
4603 children: children
4604 }, void 0, false, {
4605 fileName: Card_jsxFileName,
4606 lineNumber: 96,
4607 columnNumber: 17
4608 }, undefined) : children
4609 }, void 0, false, {
4610 fileName: Card_jsxFileName,
4611 lineNumber: 85,
4612 columnNumber: 7
4613 }, undefined);
4614});
4615Card.displayName = 'Card';
4616Card.propTypes = Card_propTypes;
4617/* harmony default export */ const src_Card = (Object.assign(Card, {
4618 Img: src_CardImg,
4619 Title: src_CardTitle,
4620 Subtitle: src_CardSubtitle,
4621 Body: src_CardBody,
4622 Link: src_CardLink,
4623 Text: src_CardText,
4624 Header: src_CardHeader,
4625 Footer: src_CardFooter,
4626 ImgOverlay: src_CardImgOverlay
4627}));
4628;// CONCATENATED MODULE: ./src/CardGroup.tsx
4629var CardGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CardGroup.tsx";
4630
4631
4632
4633
4634const CardGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4635 className,
4636 bsPrefix,
4637 as: Component = 'div',
4638 ...props
4639}, ref) => {
4640 bsPrefix = useBootstrapPrefix(bsPrefix, 'card-group');
4641 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4642 ref: ref,
4643 className: classnames_default()(className, bsPrefix),
4644 ...props
4645 }, void 0, false, {
4646 fileName: CardGroup_jsxFileName,
4647 lineNumber: 15,
4648 columnNumber: 9
4649 }, undefined);
4650});
4651CardGroup.displayName = 'CardGroup';
4652/* harmony default export */ const src_CardGroup = (CardGroup);
4653;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useUpdateEffect.js
4654
4655/**
4656 * Runs an effect only when the dependencies have changed, skipping the
4657 * initial "on mount" run. Caution, if the dependency list never changes,
4658 * the effect is **never run**
4659 *
4660 * ```ts
4661 * const ref = useRef<HTMLInput>(null);
4662 *
4663 * // focuses an element only if the focus changes, and not on mount
4664 * useUpdateEffect(() => {
4665 * const element = ref.current?.children[focusedIdx] as HTMLElement
4666 *
4667 * element?.focus()
4668 *
4669 * }, [focusedIndex])
4670 * ```
4671 * @param effect An effect to run on mount
4672 *
4673 * @category effects
4674 */
4675
4676function useUpdateEffect(fn, deps) {
4677 var isFirst = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true);
4678 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
4679 if (isFirst.current) {
4680 isFirst.current = false;
4681 return;
4682 }
4683 return fn();
4684 }, deps);
4685}
4686/* harmony default export */ const esm_useUpdateEffect = (useUpdateEffect);
4687;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useUpdatedRef.js
4688
4689/**
4690 * Returns a ref that is immediately updated with the new value
4691 *
4692 * @param value The Ref value
4693 * @category refs
4694 */
4695
4696function useUpdatedRef(value) {
4697 var valueRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(value);
4698 valueRef.current = value;
4699 return valueRef;
4700}
4701;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useWillUnmount.js
4702
4703
4704/**
4705 * Attach a callback that fires when a component unmounts
4706 *
4707 * @param fn Handler to run when the component unmounts
4708 * @category effects
4709 */
4710
4711function useWillUnmount(fn) {
4712 var onUnmount = useUpdatedRef(fn);
4713 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
4714 return function () {
4715 return onUnmount.current();
4716 };
4717 }, []);
4718}
4719;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useTimeout.js
4720
4721
4722
4723/*
4724 * Browsers including Internet Explorer, Chrome, Safari, and Firefox store the
4725 * delay as a 32-bit signed integer internally. This causes an integer overflow
4726 * when using delays larger than 2,147,483,647 ms (about 24.8 days),
4727 * resulting in the timeout being executed immediately.
4728 *
4729 * via: https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout
4730 */
4731
4732var MAX_DELAY_MS = Math.pow(2, 31) - 1;
4733function setChainedTimeout(handleRef, fn, timeoutAtMs) {
4734 var delayMs = timeoutAtMs - Date.now();
4735 handleRef.current = delayMs <= MAX_DELAY_MS ? setTimeout(fn, delayMs) : setTimeout(function () {
4736 return setChainedTimeout(handleRef, fn, timeoutAtMs);
4737 }, MAX_DELAY_MS);
4738}
4739/**
4740 * Returns a controller object for setting a timeout that is properly cleaned up
4741 * once the component unmounts. New timeouts cancel and replace existing ones.
4742 *
4743 *
4744 *
4745 * ```tsx
4746 * const { set, clear } = useTimeout();
4747 * const [hello, showHello] = useState(false);
4748 * //Display hello after 5 seconds
4749 * set(() => showHello(true), 5000);
4750 * return (
4751 * <div className="App">
4752 * {hello ? <h3>Hello</h3> : null}
4753 * </div>
4754 * );
4755 * ```
4756 */
4757
4758function useTimeout() {
4759 var isMounted = useMounted(); // types are confused between node and web here IDK
4760
4761 var handleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
4762 useWillUnmount(function () {
4763 return clearTimeout(handleRef.current);
4764 });
4765 return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
4766 var clear = function clear() {
4767 return clearTimeout(handleRef.current);
4768 };
4769 function set(fn, delayMs) {
4770 if (delayMs === void 0) {
4771 delayMs = 0;
4772 }
4773 if (!isMounted()) return;
4774 clear();
4775 if (delayMs <= MAX_DELAY_MS) {
4776 // For simplicity, if the timeout is short, just set a normal timeout.
4777 handleRef.current = setTimeout(fn, delayMs);
4778 } else {
4779 setChainedTimeout(handleRef, fn, Date.now() + delayMs);
4780 }
4781 }
4782 return {
4783 set: set,
4784 clear: clear
4785 };
4786 }, []);
4787}
4788;// CONCATENATED MODULE: ./src/CarouselCaption.tsx
4789var CarouselCaption_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CarouselCaption.tsx";
4790
4791
4792
4793
4794const CarouselCaption = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4795 className,
4796 bsPrefix,
4797 as: Component = 'div',
4798 ...props
4799}, ref) => {
4800 bsPrefix = useBootstrapPrefix(bsPrefix, 'carousel-caption');
4801 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4802 ref: ref,
4803 className: classnames_default()(className, bsPrefix),
4804 ...props
4805 }, void 0, false, {
4806 fileName: CarouselCaption_jsxFileName,
4807 lineNumber: 17,
4808 columnNumber: 7
4809 }, undefined);
4810});
4811CarouselCaption.displayName = 'CarouselCaption';
4812/* harmony default export */ const src_CarouselCaption = (CarouselCaption);
4813;// CONCATENATED MODULE: ./src/CarouselItem.tsx
4814var CarouselItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/CarouselItem.tsx";
4815
4816
4817
4818
4819
4820const CarouselItem_propTypes = {
4821 /** Set a custom element for this component */
4822 as: (prop_types_default()).elementType,
4823 /** @default 'carousel-item' */
4824 bsPrefix: (prop_types_default()).string,
4825 /** The amount of time to delay between automatically cycling this specific item. Will default to the Carousel's `interval` prop value if none is specified. */
4826 interval: (prop_types_default()).number
4827};
4828const CarouselItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
4829 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
4830 as: Component = 'div',
4831 bsPrefix,
4832 className,
4833 ...props
4834}, ref) => {
4835 const finalClassName = classnames_default()(className, useBootstrapPrefix(bsPrefix, 'carousel-item'));
4836 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
4837 ref: ref,
4838 ...props,
4839 className: finalClassName
4840 }, void 0, false, {
4841 fileName: CarouselItem_jsxFileName,
4842 lineNumber: 40,
4843 columnNumber: 14
4844 }, undefined);
4845});
4846CarouselItem.displayName = 'CarouselItem';
4847CarouselItem.propTypes = CarouselItem_propTypes;
4848/* harmony default export */ const src_CarouselItem = (CarouselItem);
4849;// CONCATENATED MODULE: ./src/ElementChildren.tsx
4850
4851
4852/**
4853 * Iterates through children that are typically specified as `props.children`,
4854 * but only maps over children that are "valid elements".
4855 *
4856 * The mapFunction provided index will be normalised to the components mapped,
4857 * so an invalid component would not increase the index.
4858 *
4859 */
4860function map(children, func) {
4861 let index = 0;
4862 return external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.map(children, child => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(child) ? func(child, index++) : child);
4863}
4864
4865/**
4866 * Iterates through children that are "valid elements".
4867 *
4868 * The provided forEachFunc(child, index) will be called for each
4869 * leaf child with the index reflecting the position relative to "valid components".
4870 */
4871function forEach(children, func) {
4872 let index = 0;
4873 external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.forEach(children, child => {
4874 if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(child)) func(child, index++);
4875 });
4876}
4877
4878/**
4879 * Finds whether a component's `children` prop includes a React element of the
4880 * specified type.
4881 */
4882function hasChildOfType(children, type) {
4883 return external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.toArray(children).some(child => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(child) && child.type === type);
4884}
4885
4886;// CONCATENATED MODULE: ./src/Carousel.tsx
4887var Carousel_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Carousel.tsx";
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907const SWIPE_THRESHOLD = 40;
4908const Carousel_propTypes = {
4909 /**
4910 * @default 'carousel'
4911 */
4912 bsPrefix: (prop_types_default()).string,
4913 as: (prop_types_default()).elementType,
4914 /**
4915 * Enables animation on the Carousel as it transitions between slides.
4916 */
4917 slide: (prop_types_default()).bool,
4918 /** Animates slides with a crossfade animation instead of the default slide animation */
4919 fade: (prop_types_default()).bool,
4920 /**
4921 * Show the Carousel previous and next arrows for changing the current slide
4922 */
4923 controls: (prop_types_default()).bool,
4924 /**
4925 * Show a set of slide position indicators
4926 */
4927 indicators: (prop_types_default()).bool,
4928 /**
4929 * An array of labels for the indicators. Defaults to "Slide #" if not provided.
4930 */
4931 indicatorLabels: (prop_types_default()).array,
4932 /**
4933 * Controls the current visible slide
4934 *
4935 * @controllable onSelect
4936 */
4937 activeIndex: (prop_types_default()).number,
4938 /**
4939 * Callback fired when the active item changes.
4940 *
4941 * ```js
4942 * (eventKey: number, event: Object | null) => void
4943 * ```
4944 *
4945 * @controllable activeIndex
4946 */
4947 onSelect: (prop_types_default()).func,
4948 /**
4949 * Callback fired when a slide transition starts.
4950 *
4951 * ```js
4952 * (eventKey: number, direction: 'left' | 'right') => void
4953 */
4954 onSlide: (prop_types_default()).func,
4955 /**
4956 * Callback fired when a slide transition ends.
4957 *
4958 * ```js
4959 * (eventKey: number, direction: 'left' | 'right') => void
4960 */
4961 onSlid: (prop_types_default()).func,
4962 /**
4963 * The amount of time to delay between automatically cycling an item. If `null`, carousel will not automatically cycle.
4964 */
4965 interval: prop_types_default().oneOfType([(prop_types_default()).number, prop_types_default().oneOf([null])]),
4966 /** Whether the carousel should react to keyboard events. */
4967 keyboard: (prop_types_default()).bool,
4968 /**
4969 * If set to `"hover"`, pauses the cycling of the carousel on `mouseenter` and resumes the cycling of the carousel on `mouseleave`. If set to `false`, hovering over the carousel won't pause it.
4970 *
4971 * On touch-enabled devices, when set to `"hover"`, cycling will pause on `touchend` (once the user finished interacting with the carousel) for two intervals, before automatically resuming. Note that this is in addition to the above mouse behavior.
4972 */
4973 pause: prop_types_default().oneOf(['hover', false]),
4974 /** Whether the carousel should cycle continuously or have hard stops. */
4975 wrap: (prop_types_default()).bool,
4976 /**
4977 * Whether the carousel should support left/right swipe interactions on touchscreen devices.
4978 */
4979 touch: (prop_types_default()).bool,
4980 /** Override the default button icon for the "previous" control */
4981 prevIcon: (prop_types_default()).node,
4982 /**
4983 * Label shown to screen readers only, can be used to show the previous element
4984 * in the carousel.
4985 * Set to null to deactivate.
4986 */
4987 prevLabel: (prop_types_default()).string,
4988 /** Override the default button icon for the "next" control */
4989 nextIcon: (prop_types_default()).node,
4990 /**
4991 * Label shown to screen readers only, can be used to show the next element
4992 * in the carousel.
4993 * Set to null to deactivate.
4994 */
4995 nextLabel: (prop_types_default()).string,
4996 /**
4997 * Color variant that controls the colors of the controls, indicators
4998 * and captions.
4999 */
5000 variant: prop_types_default().oneOf(['dark'])
5001};
5002function isVisible(element) {
5003 if (!element || !element.style || !element.parentNode || !element.parentNode.style) {
5004 return false;
5005 }
5006 const elementStyle = getComputedStyle(element);
5007 return elementStyle.display !== 'none' && elementStyle.visibility !== 'hidden' && getComputedStyle(element.parentNode).display !== 'none';
5008}
5009const Carousel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
5010 defaultActiveIndex = 0,
5011 ...uncontrolledProps
5012}, ref) => {
5013 const {
5014 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
5015 as: Component = 'div',
5016 bsPrefix,
5017 slide = true,
5018 fade = false,
5019 controls = true,
5020 indicators = true,
5021 indicatorLabels = [],
5022 activeIndex,
5023 onSelect,
5024 onSlide,
5025 onSlid,
5026 interval = 5000,
5027 keyboard = true,
5028 onKeyDown,
5029 pause = 'hover',
5030 onMouseOver,
5031 onMouseOut,
5032 wrap = true,
5033 touch = true,
5034 onTouchStart,
5035 onTouchMove,
5036 onTouchEnd,
5037 prevIcon = /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
5038 "aria-hidden": "true",
5039 className: "carousel-control-prev-icon"
5040 }, void 0, false, {
5041 fileName: Carousel_jsxFileName,
5042 lineNumber: 225,
5043 columnNumber: 11
5044 }, undefined),
5045 prevLabel = 'Previous',
5046 nextIcon = /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
5047 "aria-hidden": "true",
5048 className: "carousel-control-next-icon"
5049 }, void 0, false, {
5050 fileName: Carousel_jsxFileName,
5051 lineNumber: 229,
5052 columnNumber: 11
5053 }, undefined),
5054 nextLabel = 'Next',
5055 variant,
5056 className,
5057 children,
5058 ...props
5059 } = useUncontrolled({
5060 defaultActiveIndex,
5061 ...uncontrolledProps
5062 }, {
5063 activeIndex: 'onSelect'
5064 });
5065 const prefix = useBootstrapPrefix(bsPrefix, 'carousel');
5066 const isRTL = useIsRTL();
5067 const nextDirectionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
5068 const [direction, setDirection] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)('next');
5069 const [paused, setPaused] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
5070 const [isSliding, setIsSliding] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
5071 const [renderedActiveIndex, setRenderedActiveIndex] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(activeIndex || 0);
5072 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
5073 if (!isSliding && activeIndex !== renderedActiveIndex) {
5074 if (nextDirectionRef.current) {
5075 setDirection(nextDirectionRef.current);
5076 } else {
5077 setDirection((activeIndex || 0) > renderedActiveIndex ? 'next' : 'prev');
5078 }
5079 if (slide) {
5080 setIsSliding(true);
5081 }
5082 setRenderedActiveIndex(activeIndex || 0);
5083 }
5084 }, [activeIndex, isSliding, renderedActiveIndex, slide]);
5085 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
5086 if (nextDirectionRef.current) {
5087 nextDirectionRef.current = null;
5088 }
5089 });
5090 let numChildren = 0;
5091 let activeChildInterval;
5092
5093 // Iterate to grab all of the children's interval values
5094 // (and count them, too)
5095 forEach(children, (child, index) => {
5096 ++numChildren;
5097 if (index === activeIndex) {
5098 activeChildInterval = child.props.interval;
5099 }
5100 });
5101 const activeChildIntervalRef = esm_useCommittedRef(activeChildInterval);
5102 const prev = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(event => {
5103 if (isSliding) {
5104 return;
5105 }
5106 let nextActiveIndex = renderedActiveIndex - 1;
5107 if (nextActiveIndex < 0) {
5108 if (!wrap) {
5109 return;
5110 }
5111 nextActiveIndex = numChildren - 1;
5112 }
5113 nextDirectionRef.current = 'prev';
5114 onSelect == null ? void 0 : onSelect(nextActiveIndex, event);
5115 }, [isSliding, renderedActiveIndex, onSelect, wrap, numChildren]);
5116
5117 // This is used in the setInterval, so it should not invalidate.
5118 const next = useEventCallback(event => {
5119 if (isSliding) {
5120 return;
5121 }
5122 let nextActiveIndex = renderedActiveIndex + 1;
5123 if (nextActiveIndex >= numChildren) {
5124 if (!wrap) {
5125 return;
5126 }
5127 nextActiveIndex = 0;
5128 }
5129 nextDirectionRef.current = 'next';
5130 onSelect == null ? void 0 : onSelect(nextActiveIndex, event);
5131 });
5132 const elementRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
5133 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, () => ({
5134 element: elementRef.current,
5135 prev,
5136 next
5137 }));
5138
5139 // This is used in the setInterval, so it should not invalidate.
5140 const nextWhenVisible = useEventCallback(() => {
5141 if (!document.hidden && isVisible(elementRef.current)) {
5142 if (isRTL) {
5143 prev();
5144 } else {
5145 next();
5146 }
5147 }
5148 });
5149 const slideDirection = direction === 'next' ? 'start' : 'end';
5150 esm_useUpdateEffect(() => {
5151 if (slide) {
5152 // These callbacks will be handled by the <Transition> callbacks.
5153 return;
5154 }
5155 onSlide == null ? void 0 : onSlide(renderedActiveIndex, slideDirection);
5156 onSlid == null ? void 0 : onSlid(renderedActiveIndex, slideDirection);
5157 }, [renderedActiveIndex]);
5158 const orderClassName = `${prefix}-item-${direction}`;
5159 const directionalClassName = `${prefix}-item-${slideDirection}`;
5160 const handleEnter = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(node => {
5161 triggerBrowserReflow(node);
5162 onSlide == null ? void 0 : onSlide(renderedActiveIndex, slideDirection);
5163 }, [onSlide, renderedActiveIndex, slideDirection]);
5164 const handleEntered = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => {
5165 setIsSliding(false);
5166 onSlid == null ? void 0 : onSlid(renderedActiveIndex, slideDirection);
5167 }, [onSlid, renderedActiveIndex, slideDirection]);
5168 const handleKeyDown = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(event => {
5169 if (keyboard && !/input|textarea/i.test(event.target.tagName)) {
5170 switch (event.key) {
5171 case 'ArrowLeft':
5172 event.preventDefault();
5173 if (isRTL) {
5174 next(event);
5175 } else {
5176 prev(event);
5177 }
5178 return;
5179 case 'ArrowRight':
5180 event.preventDefault();
5181 if (isRTL) {
5182 prev(event);
5183 } else {
5184 next(event);
5185 }
5186 return;
5187 default:
5188 }
5189 }
5190 onKeyDown == null ? void 0 : onKeyDown(event);
5191 }, [keyboard, onKeyDown, prev, next, isRTL]);
5192 const handleMouseOver = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(event => {
5193 if (pause === 'hover') {
5194 setPaused(true);
5195 }
5196 onMouseOver == null ? void 0 : onMouseOver(event);
5197 }, [pause, onMouseOver]);
5198 const handleMouseOut = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(event => {
5199 setPaused(false);
5200 onMouseOut == null ? void 0 : onMouseOut(event);
5201 }, [onMouseOut]);
5202 const touchStartXRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
5203 const touchDeltaXRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
5204 const touchUnpauseTimeout = useTimeout();
5205 const handleTouchStart = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(event => {
5206 touchStartXRef.current = event.touches[0].clientX;
5207 touchDeltaXRef.current = 0;
5208 if (pause === 'hover') {
5209 setPaused(true);
5210 }
5211 onTouchStart == null ? void 0 : onTouchStart(event);
5212 }, [pause, onTouchStart]);
5213 const handleTouchMove = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(event => {
5214 if (event.touches && event.touches.length > 1) {
5215 touchDeltaXRef.current = 0;
5216 } else {
5217 touchDeltaXRef.current = event.touches[0].clientX - touchStartXRef.current;
5218 }
5219 onTouchMove == null ? void 0 : onTouchMove(event);
5220 }, [onTouchMove]);
5221 const handleTouchEnd = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(event => {
5222 if (touch) {
5223 const touchDeltaX = touchDeltaXRef.current;
5224 if (Math.abs(touchDeltaX) > SWIPE_THRESHOLD) {
5225 if (touchDeltaX > 0) {
5226 prev(event);
5227 } else {
5228 next(event);
5229 }
5230 }
5231 }
5232 if (pause === 'hover') {
5233 touchUnpauseTimeout.set(() => {
5234 setPaused(false);
5235 }, interval || undefined);
5236 }
5237 onTouchEnd == null ? void 0 : onTouchEnd(event);
5238 }, [touch, pause, prev, next, touchUnpauseTimeout, interval, onTouchEnd]);
5239 const shouldPlay = interval != null && !paused && !isSliding;
5240 const intervalHandleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
5241 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
5242 var _ref, _activeChildIntervalR;
5243 if (!shouldPlay) {
5244 return undefined;
5245 }
5246 const nextFunc = isRTL ? prev : next;
5247 intervalHandleRef.current = window.setInterval(document.visibilityState ? nextWhenVisible : nextFunc, (_ref = (_activeChildIntervalR = activeChildIntervalRef.current) != null ? _activeChildIntervalR : interval) != null ? _ref : undefined);
5248 return () => {
5249 if (intervalHandleRef.current !== null) {
5250 clearInterval(intervalHandleRef.current);
5251 }
5252 };
5253 }, [shouldPlay, prev, next, activeChildIntervalRef, interval, nextWhenVisible, isRTL]);
5254 const indicatorOnClicks = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => indicators && Array.from({
5255 length: numChildren
5256 }, (_, index) => event => {
5257 onSelect == null ? void 0 : onSelect(index, event);
5258 }), [indicators, numChildren, onSelect]);
5259 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
5260 ref: elementRef,
5261 ...props,
5262 onKeyDown: handleKeyDown,
5263 onMouseOver: handleMouseOver,
5264 onMouseOut: handleMouseOut,
5265 onTouchStart: handleTouchStart,
5266 onTouchMove: handleTouchMove,
5267 onTouchEnd: handleTouchEnd,
5268 className: classnames_default()(className, prefix, slide && 'slide', fade && `${prefix}-fade`, variant && `${prefix}-${variant}`),
5269 children: [indicators && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
5270 className: `${prefix}-indicators`,
5271 children: map(children, (_, index) => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("button", {
5272 type: "button",
5273 "data-bs-target": "" // Bootstrap requires this in their css.
5274 ,
5275 "aria-label": indicatorLabels != null && indicatorLabels.length ? indicatorLabels[index] : `Slide ${index + 1}`,
5276 className: index === renderedActiveIndex ? 'active' : undefined,
5277 onClick: indicatorOnClicks ? indicatorOnClicks[index] : undefined,
5278 "aria-current": index === renderedActiveIndex
5279 }, index, false, {
5280 fileName: Carousel_jsxFileName,
5281 lineNumber: 548,
5282 columnNumber: 17
5283 }, undefined))
5284 }, void 0, false, {
5285 fileName: Carousel_jsxFileName,
5286 lineNumber: 546,
5287 columnNumber: 13
5288 }, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
5289 className: `${prefix}-inner`,
5290 children: map(children, (child, index) => {
5291 const isActive = index === renderedActiveIndex;
5292 return slide ? /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_TransitionWrapper, {
5293 in: isActive,
5294 onEnter: isActive ? handleEnter : undefined,
5295 onEntered: isActive ? handleEntered : undefined,
5296 addEndListener: transitionEndListener,
5297 children: (status, innerProps) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(child, {
5298 ...innerProps,
5299 className: classnames_default()(child.props.className, isActive && status !== 'entered' && orderClassName, (status === 'entered' || status === 'exiting') && 'active', (status === 'entering' || status === 'exiting') && directionalClassName)
5300 })
5301 }, void 0, false, {
5302 fileName: Carousel_jsxFileName,
5303 lineNumber: 574,
5304 columnNumber: 17
5305 }, undefined) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(child, {
5306 className: classnames_default()(child.props.className, isActive && 'active')
5307 });
5308 })
5309 }, void 0, false, {
5310 fileName: Carousel_jsxFileName,
5311 lineNumber: 569,
5312 columnNumber: 11
5313 }, undefined), controls && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(jsx_dev_runtime.Fragment, {
5314 children: [(wrap || activeIndex !== 0) && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Anchor, {
5315 className: `${prefix}-control-prev`,
5316 onClick: prev,
5317 children: [prevIcon, prevLabel && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
5318 className: "visually-hidden",
5319 children: prevLabel
5320 }, void 0, false, {
5321 fileName: Carousel_jsxFileName,
5322 lineNumber: 614,
5323 columnNumber: 21
5324 }, undefined)]
5325 }, void 0, true, {
5326 fileName: Carousel_jsxFileName,
5327 lineNumber: 611,
5328 columnNumber: 17
5329 }, undefined), (wrap || activeIndex !== numChildren - 1) && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Anchor, {
5330 className: `${prefix}-control-next`,
5331 onClick: next,
5332 children: [nextIcon, nextLabel && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
5333 className: "visually-hidden",
5334 children: nextLabel
5335 }, void 0, false, {
5336 fileName: Carousel_jsxFileName,
5337 lineNumber: 622,
5338 columnNumber: 21
5339 }, undefined)]
5340 }, void 0, true, {
5341 fileName: Carousel_jsxFileName,
5342 lineNumber: 619,
5343 columnNumber: 17
5344 }, undefined)]
5345 }, void 0, true)]
5346 }, void 0, true, {
5347 fileName: Carousel_jsxFileName,
5348 lineNumber: 528,
5349 columnNumber: 9
5350 }, undefined);
5351});
5352Carousel.displayName = 'Carousel';
5353Carousel.propTypes = Carousel_propTypes;
5354/* harmony default export */ const src_Carousel = (Object.assign(Carousel, {
5355 Caption: src_CarouselCaption,
5356 Item: src_CarouselItem
5357}));
5358;// CONCATENATED MODULE: ./src/Col.tsx
5359var Col_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Col.tsx";
5360
5361
5362
5363
5364
5365const colSize = prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).number, (prop_types_default()).string, prop_types_default().oneOf(['auto'])]);
5366const stringOrNumber = prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]);
5367const column = prop_types_default().oneOfType([colSize, prop_types_default().shape({
5368 size: colSize,
5369 order: stringOrNumber,
5370 offset: stringOrNumber
5371})]);
5372const Col_propTypes = {
5373 /**
5374 * @default 'col'
5375 */
5376 bsPrefix: (prop_types_default()).string,
5377 as: (prop_types_default()).elementType,
5378 /**
5379 * The number of columns to span on extra small devices (<576px)
5380 *
5381 * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })}
5382 */
5383 xs: column,
5384 /**
5385 * The number of columns to span on small devices (≥576px)
5386 *
5387 * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })}
5388 */
5389 sm: column,
5390 /**
5391 * The number of columns to span on medium devices (≥768px)
5392 *
5393 * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })}
5394 */
5395 md: column,
5396 /**
5397 * The number of columns to span on large devices (≥992px)
5398 *
5399 * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })}
5400 */
5401 lg: column,
5402 /**
5403 * The number of columns to span on extra large devices (≥1200px)
5404 *
5405 * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })}
5406 */
5407 xl: column,
5408 /**
5409 * The number of columns to span on extra extra large devices (≥1400px)
5410 *
5411 * @type {(boolean|"auto"|number|{ span: boolean|"auto"|number, offset: number, order: "first"|"last"|number })}
5412 */
5413 xxl: column
5414};
5415function useCol({
5416 as,
5417 bsPrefix,
5418 className,
5419 ...props
5420}) {
5421 bsPrefix = useBootstrapPrefix(bsPrefix, 'col');
5422 const breakpoints = useBootstrapBreakpoints();
5423 const minBreakpoint = useBootstrapMinBreakpoint();
5424 const spans = [];
5425 const classes = [];
5426 breakpoints.forEach(brkPoint => {
5427 const propValue = props[brkPoint];
5428 delete props[brkPoint];
5429 let span;
5430 let offset;
5431 let order;
5432 if (typeof propValue === 'object' && propValue != null) {
5433 ({
5434 span,
5435 offset,
5436 order
5437 } = propValue);
5438 } else {
5439 span = propValue;
5440 }
5441 const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';
5442 if (span) spans.push(span === true ? `${bsPrefix}${infix}` : `${bsPrefix}${infix}-${span}`);
5443 if (order != null) classes.push(`order${infix}-${order}`);
5444 if (offset != null) classes.push(`offset${infix}-${offset}`);
5445 });
5446 return [{
5447 ...props,
5448 className: classnames_default()(className, ...spans, ...classes)
5449 }, {
5450 as,
5451 bsPrefix,
5452 spans
5453 }];
5454}
5455const Col = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(
5456// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
5457(props, ref) => {
5458 const [{
5459 className,
5460 ...colProps
5461 }, {
5462 as: Component = 'div',
5463 bsPrefix,
5464 spans
5465 }] = useCol(props);
5466 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
5467 ...colProps,
5468 ref: ref,
5469 className: classnames_default()(className, !spans.length && bsPrefix)
5470 }, void 0, false, {
5471 fileName: Col_jsxFileName,
5472 lineNumber: 184,
5473 columnNumber: 7
5474 }, undefined);
5475});
5476Col.displayName = 'Col';
5477Col.propTypes = Col_propTypes;
5478/* harmony default export */ const src_Col = (Col);
5479;// CONCATENATED MODULE: ./src/Container.tsx
5480var Container_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Container.tsx";
5481
5482
5483
5484
5485
5486const Container_propTypes = {
5487 /**
5488 * @default 'container'
5489 */
5490 bsPrefix: (prop_types_default()).string,
5491 /**
5492 * Allow the Container to fill all of its available horizontal space.
5493 * @type {(true|"sm"|"md"|"lg"|"xl"|"xxl")}
5494 */
5495 fluid: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).string]),
5496 /**
5497 * You can use a custom element for this component
5498 */
5499 as: (prop_types_default()).elementType
5500};
5501const Container = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
5502 bsPrefix,
5503 fluid = false,
5504 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
5505 as: Component = 'div',
5506 className,
5507 ...props
5508}, ref) => {
5509 const prefix = useBootstrapPrefix(bsPrefix, 'container');
5510 const suffix = typeof fluid === 'string' ? `-${fluid}` : '-fluid';
5511 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
5512 ref: ref,
5513 ...props,
5514 className: classnames_default()(className, fluid ? `${prefix}${suffix}` : prefix)
5515 }, void 0, false, {
5516 fileName: Container_jsxFileName,
5517 lineNumber: 47,
5518 columnNumber: 9
5519 }, undefined);
5520});
5521Container.displayName = 'Container';
5522Container.propTypes = Container_propTypes;
5523/* harmony default export */ const src_Container = (Container);
5524;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/querySelectorAll.js
5525var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);
5526/**
5527 * Runs `querySelectorAll` on a given element.
5528 *
5529 * @param element the element
5530 * @param selector the selector
5531 */
5532
5533function qsa(element, selector) {
5534 return toArray(element.querySelectorAll(selector));
5535}
5536;// CONCATENATED MODULE: ./node_modules/@restart/ui/node_modules/uncontrollable/lib/esm/index.js
5537function esm_objectWithoutPropertiesLoose(source, excluded) {
5538 if (source == null) return {};
5539 var target = {};
5540 var sourceKeys = Object.keys(source);
5541 var key, i;
5542 for (i = 0; i < sourceKeys.length; i++) {
5543 key = sourceKeys[i];
5544 if (excluded.indexOf(key) >= 0) continue;
5545 target[key] = source[key];
5546 }
5547 return target;
5548}
5549function esm_toPropertyKey(arg) {
5550 var key = esm_toPrimitive(arg, "string");
5551 return typeof key === "symbol" ? key : String(key);
5552}
5553function esm_toPrimitive(input, hint) {
5554 if (typeof input !== "object" || input === null) return input;
5555 var prim = input[Symbol.toPrimitive];
5556 if (prim !== undefined) {
5557 var res = prim.call(input, hint || "default");
5558 if (typeof res !== "object") return res;
5559 throw new TypeError("@@toPrimitive must return a primitive value.");
5560 }
5561 return (hint === "string" ? String : Number)(input);
5562}
5563
5564function esm_defaultKey(key) {
5565 return 'default' + key.charAt(0).toUpperCase() + key.substr(1);
5566}
5567function esm_useUncontrolledProp(propValue, defaultValue, handler) {
5568 const wasPropRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(propValue !== undefined);
5569 const [stateValue, setState] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(defaultValue);
5570 const isProp = propValue !== undefined;
5571 const wasProp = wasPropRef.current;
5572 wasPropRef.current = isProp;
5573
5574 /**
5575 * If a prop switches from controlled to Uncontrolled
5576 * reset its value to the defaultValue
5577 */
5578 if (!isProp && wasProp && stateValue !== defaultValue) {
5579 setState(defaultValue);
5580 }
5581 return [isProp ? propValue : stateValue, (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((value, ...args) => {
5582 if (handler) handler(value, ...args);
5583 setState(value);
5584 }, [handler])];
5585}
5586
5587function esm_useUncontrolled(props, config) {
5588 return Object.keys(config).reduce((result, fieldName) => {
5589 const _ref = result,
5590 _defaultKey = esm_defaultKey(fieldName),
5591 {
5592 [_defaultKey]: defaultValue,
5593 [fieldName]: propsValue
5594 } = _ref,
5595 rest = esm_objectWithoutPropertiesLoose(_ref, [_defaultKey, fieldName].map(esm_toPropertyKey));
5596 const handlerName = config[fieldName];
5597 const [value, handler] = esm_useUncontrolledProp(propsValue, defaultValue, props[handlerName]);
5598 return Object.assign({}, rest, {
5599 [fieldName]: value,
5600 [handlerName]: handler
5601 });
5602 }, props);
5603}
5604;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useForceUpdate.js
5605
5606/**
5607 * Returns a function that triggers a component update. the hook equivalent to
5608 * `this.forceUpdate()` in a class component. In most cases using a state value directly
5609 * is preferable but may be required in some advanced usages of refs for interop or
5610 * when direct DOM manipulation is required.
5611 *
5612 * ```ts
5613 * const forceUpdate = useForceUpdate();
5614 *
5615 * const updateOnClick = useCallback(() => {
5616 * forceUpdate()
5617 * }, [forceUpdate])
5618 *
5619 * return <button type="button" onClick={updateOnClick}>Hi there</button>
5620 * ```
5621 */
5622
5623function useForceUpdate() {
5624 // The toggling state value is designed to defeat React optimizations for skipping
5625 // updates when they are stricting equal to the last state value
5626 var _useReducer = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer)(function (state) {
5627 return !state;
5628 }, false),
5629 dispatch = _useReducer[1];
5630 return dispatch;
5631}
5632;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/DropdownContext.js
5633
5634const DropdownContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
5635/* harmony default export */ const esm_DropdownContext = (DropdownContext);
5636;// CONCATENATED MODULE: ./node_modules/dequal/dist/index.mjs
5637var has = Object.prototype.hasOwnProperty;
5638
5639function find(iter, tar, key) {
5640 for (key of iter.keys()) {
5641 if (dequal(key, tar)) return key;
5642 }
5643}
5644
5645function dequal(foo, bar) {
5646 var ctor, len, tmp;
5647 if (foo === bar) return true;
5648
5649 if (foo && bar && (ctor=foo.constructor) === bar.constructor) {
5650 if (ctor === Date) return foo.getTime() === bar.getTime();
5651 if (ctor === RegExp) return foo.toString() === bar.toString();
5652
5653 if (ctor === Array) {
5654 if ((len=foo.length) === bar.length) {
5655 while (len-- && dequal(foo[len], bar[len]));
5656 }
5657 return len === -1;
5658 }
5659
5660 if (ctor === Set) {
5661 if (foo.size !== bar.size) {
5662 return false;
5663 }
5664 for (len of foo) {
5665 tmp = len;
5666 if (tmp && typeof tmp === 'object') {
5667 tmp = find(bar, tmp);
5668 if (!tmp) return false;
5669 }
5670 if (!bar.has(tmp)) return false;
5671 }
5672 return true;
5673 }
5674
5675 if (ctor === Map) {
5676 if (foo.size !== bar.size) {
5677 return false;
5678 }
5679 for (len of foo) {
5680 tmp = len[0];
5681 if (tmp && typeof tmp === 'object') {
5682 tmp = find(bar, tmp);
5683 if (!tmp) return false;
5684 }
5685 if (!dequal(len[1], bar.get(tmp))) {
5686 return false;
5687 }
5688 }
5689 return true;
5690 }
5691
5692 if (ctor === ArrayBuffer) {
5693 foo = new Uint8Array(foo);
5694 bar = new Uint8Array(bar);
5695 } else if (ctor === DataView) {
5696 if ((len=foo.byteLength) === bar.byteLength) {
5697 while (len-- && foo.getInt8(len) === bar.getInt8(len));
5698 }
5699 return len === -1;
5700 }
5701
5702 if (ArrayBuffer.isView(foo)) {
5703 if ((len=foo.byteLength) === bar.byteLength) {
5704 while (len-- && foo[len] === bar[len]);
5705 }
5706 return len === -1;
5707 }
5708
5709 if (!ctor || typeof foo === 'object') {
5710 len = 0;
5711 for (ctor in foo) {
5712 if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
5713 if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
5714 }
5715 return Object.keys(bar).length === len;
5716 }
5717 }
5718
5719 return foo !== foo && bar !== bar;
5720}
5721
5722;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useSafeState.js
5723
5724
5725function useSafeState(state) {
5726 var isMounted = useMounted();
5727 return [state[0], (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (nextState) {
5728 if (!isMounted()) return;
5729 return state[1](nextState);
5730 }, [isMounted, state[1]])];
5731}
5732/* harmony default export */ const esm_useSafeState = (useSafeState);
5733;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getBasePlacement.js
5734
5735function getBasePlacement(placement) {
5736 return placement.split('-')[0];
5737}
5738;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindow.js
5739function getWindow(node) {
5740 if (node == null) {
5741 return window;
5742 }
5743 if (node.toString() !== '[object Window]') {
5744 var ownerDocument = node.ownerDocument;
5745 return ownerDocument ? ownerDocument.defaultView || window : window;
5746 }
5747 return node;
5748}
5749;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js
5750
5751function isElement(node) {
5752 var OwnElement = getWindow(node).Element;
5753 return node instanceof OwnElement || node instanceof Element;
5754}
5755function isHTMLElement(node) {
5756 var OwnElement = getWindow(node).HTMLElement;
5757 return node instanceof OwnElement || node instanceof HTMLElement;
5758}
5759function isShadowRoot(node) {
5760 // IE 11 has no ShadowRoot
5761 if (typeof ShadowRoot === 'undefined') {
5762 return false;
5763 }
5764 var OwnElement = getWindow(node).ShadowRoot;
5765 return node instanceof OwnElement || node instanceof ShadowRoot;
5766}
5767
5768;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/math.js
5769var math_max = Math.max;
5770var math_min = Math.min;
5771var round = Math.round;
5772;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/userAgent.js
5773function getUAString() {
5774 var uaData = navigator.userAgentData;
5775 if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {
5776 return uaData.brands.map(function (item) {
5777 return item.brand + "/" + item.version;
5778 }).join(' ');
5779 }
5780 return navigator.userAgent;
5781}
5782;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js
5783
5784function isLayoutViewport() {
5785 return !/^((?!chrome|android).)*safari/i.test(getUAString());
5786}
5787;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js
5788
5789
5790
5791
5792function getBoundingClientRect(element, includeScale, isFixedStrategy) {
5793 if (includeScale === void 0) {
5794 includeScale = false;
5795 }
5796 if (isFixedStrategy === void 0) {
5797 isFixedStrategy = false;
5798 }
5799 var clientRect = element.getBoundingClientRect();
5800 var scaleX = 1;
5801 var scaleY = 1;
5802 if (includeScale && isHTMLElement(element)) {
5803 scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
5804 scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
5805 }
5806 var _ref = isElement(element) ? getWindow(element) : window,
5807 visualViewport = _ref.visualViewport;
5808 var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
5809 var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
5810 var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
5811 var width = clientRect.width / scaleX;
5812 var height = clientRect.height / scaleY;
5813 return {
5814 width: width,
5815 height: height,
5816 top: y,
5817 right: x + width,
5818 bottom: y + height,
5819 left: x,
5820 x: x,
5821 y: y
5822 };
5823}
5824;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js
5825 // Returns the layout rect of an element relative to its offsetParent. Layout
5826// means it doesn't take into account transforms.
5827
5828function getLayoutRect(element) {
5829 var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
5830 // Fixes https://github.com/popperjs/popper-core/issues/1223
5831
5832 var width = element.offsetWidth;
5833 var height = element.offsetHeight;
5834 if (Math.abs(clientRect.width - width) <= 1) {
5835 width = clientRect.width;
5836 }
5837 if (Math.abs(clientRect.height - height) <= 1) {
5838 height = clientRect.height;
5839 }
5840 return {
5841 x: element.offsetLeft,
5842 y: element.offsetTop,
5843 width: width,
5844 height: height
5845 };
5846}
5847;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/contains.js
5848
5849function contains(parent, child) {
5850 var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
5851
5852 if (parent.contains(child)) {
5853 return true;
5854 } // then fallback to custom implementation with Shadow DOM support
5855 else if (rootNode && isShadowRoot(rootNode)) {
5856 var next = child;
5857 do {
5858 if (next && parent.isSameNode(next)) {
5859 return true;
5860 } // $FlowFixMe[prop-missing]: need a better way to handle this...
5861
5862 next = next.parentNode || next.host;
5863 } while (next);
5864 } // Give up, the result is false
5865
5866 return false;
5867}
5868;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js
5869function getNodeName(element) {
5870 return element ? (element.nodeName || '').toLowerCase() : null;
5871}
5872;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js
5873
5874function dom_utils_getComputedStyle_getComputedStyle(element) {
5875 return getWindow(element).getComputedStyle(element);
5876}
5877;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js
5878
5879function isTableElement(element) {
5880 return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
5881}
5882;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js
5883
5884function getDocumentElement(element) {
5885 // $FlowFixMe[incompatible-return]: assume body is always available
5886 return ((isElement(element) ? element.ownerDocument :
5887 // $FlowFixMe[prop-missing]
5888 element.document) || window.document).documentElement;
5889}
5890;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js
5891
5892
5893
5894function getParentNode(element) {
5895 if (getNodeName(element) === 'html') {
5896 return element;
5897 }
5898 return (
5899 // this is a quicker (but less type safe) way to save quite some bytes from the bundle
5900 // $FlowFixMe[incompatible-return]
5901 // $FlowFixMe[prop-missing]
5902 element.assignedSlot ||
5903 // step into the shadow DOM of the parent of a slotted node
5904 element.parentNode || (
5905 // DOM Element detected
5906 isShadowRoot(element) ? element.host : null) ||
5907 // ShadowRoot detected
5908 // $FlowFixMe[incompatible-call]: HTMLElement is a Node
5909 getDocumentElement(element) // fallback
5910 );
5911}
5912;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js
5913
5914
5915
5916
5917
5918
5919
5920function getTrueOffsetParent(element) {
5921 if (!isHTMLElement(element) ||
5922 // https://github.com/popperjs/popper-core/issues/837
5923 dom_utils_getComputedStyle_getComputedStyle(element).position === 'fixed') {
5924 return null;
5925 }
5926 return element.offsetParent;
5927} // `.offsetParent` reports `null` for fixed elements, while absolute elements
5928// return the containing block
5929
5930function getContainingBlock(element) {
5931 var isFirefox = /firefox/i.test(getUAString());
5932 var isIE = /Trident/i.test(getUAString());
5933 if (isIE && isHTMLElement(element)) {
5934 // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
5935 var elementCss = dom_utils_getComputedStyle_getComputedStyle(element);
5936 if (elementCss.position === 'fixed') {
5937 return null;
5938 }
5939 }
5940 var currentNode = getParentNode(element);
5941 if (isShadowRoot(currentNode)) {
5942 currentNode = currentNode.host;
5943 }
5944 while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
5945 var css = dom_utils_getComputedStyle_getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
5946 // create a containing block.
5947 // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
5948
5949 if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
5950 return currentNode;
5951 } else {
5952 currentNode = currentNode.parentNode;
5953 }
5954 }
5955 return null;
5956} // Gets the closest ancestor positioned element. Handles some edge cases,
5957// such as table ancestors and cross browser bugs.
5958
5959function getOffsetParent(element) {
5960 var window = getWindow(element);
5961 var offsetParent = getTrueOffsetParent(element);
5962 while (offsetParent && isTableElement(offsetParent) && dom_utils_getComputedStyle_getComputedStyle(offsetParent).position === 'static') {
5963 offsetParent = getTrueOffsetParent(offsetParent);
5964 }
5965 if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && dom_utils_getComputedStyle_getComputedStyle(offsetParent).position === 'static')) {
5966 return window;
5967 }
5968 return offsetParent || getContainingBlock(element) || window;
5969}
5970;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js
5971function getMainAxisFromPlacement(placement) {
5972 return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
5973}
5974;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/within.js
5975
5976function within(min, value, max) {
5977 return math_max(min, math_min(value, max));
5978}
5979function withinMaxClamp(min, value, max) {
5980 var v = within(min, value, max);
5981 return v > max ? max : v;
5982}
5983;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js
5984function getFreshSideObject() {
5985 return {
5986 top: 0,
5987 right: 0,
5988 bottom: 0,
5989 left: 0
5990 };
5991}
5992;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js
5993
5994function mergePaddingObject(paddingObject) {
5995 return Object.assign({}, getFreshSideObject(), paddingObject);
5996}
5997;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/expandToHashMap.js
5998function expandToHashMap(value, keys) {
5999 return keys.reduce(function (hashMap, key) {
6000 hashMap[key] = value;
6001 return hashMap;
6002 }, {});
6003}
6004;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/enums.js
6005var enums_top = 'top';
6006var bottom = 'bottom';
6007var right = 'right';
6008var left = 'left';
6009var auto = 'auto';
6010var basePlacements = [enums_top, bottom, right, left];
6011var start = 'start';
6012var end = 'end';
6013var clippingParents = 'clippingParents';
6014var viewport = 'viewport';
6015var popper = 'popper';
6016var reference = 'reference';
6017var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
6018 return acc.concat([placement + "-" + start, placement + "-" + end]);
6019}, []);
6020var enums_placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
6021 return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
6022}, []); // modifiers that need to read the DOM
6023
6024var beforeRead = 'beforeRead';
6025var read = 'read';
6026var afterRead = 'afterRead'; // pure-logic modifiers
6027
6028var beforeMain = 'beforeMain';
6029var main = 'main';
6030var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
6031
6032var beforeWrite = 'beforeWrite';
6033var write = 'write';
6034var afterWrite = 'afterWrite';
6035var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
6036;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/arrow.js
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046 // eslint-disable-next-line import/no-unused-modules
6047
6048var toPaddingObject = function toPaddingObject(padding, state) {
6049 padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
6050 placement: state.placement
6051 })) : padding;
6052 return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
6053};
6054function arrow(_ref) {
6055 var _state$modifiersData$;
6056 var state = _ref.state,
6057 name = _ref.name,
6058 options = _ref.options;
6059 var arrowElement = state.elements.arrow;
6060 var popperOffsets = state.modifiersData.popperOffsets;
6061 var basePlacement = getBasePlacement(state.placement);
6062 var axis = getMainAxisFromPlacement(basePlacement);
6063 var isVertical = [left, right].indexOf(basePlacement) >= 0;
6064 var len = isVertical ? 'height' : 'width';
6065 if (!arrowElement || !popperOffsets) {
6066 return;
6067 }
6068 var paddingObject = toPaddingObject(options.padding, state);
6069 var arrowRect = getLayoutRect(arrowElement);
6070 var minProp = axis === 'y' ? enums_top : left;
6071 var maxProp = axis === 'y' ? bottom : right;
6072 var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
6073 var startDiff = popperOffsets[axis] - state.rects.reference[axis];
6074 var arrowOffsetParent = getOffsetParent(arrowElement);
6075 var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
6076 var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
6077 // outside of the popper bounds
6078
6079 var min = paddingObject[minProp];
6080 var max = clientSize - arrowRect[len] - paddingObject[maxProp];
6081 var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
6082 var offset = within(min, center, max); // Prevents breaking syntax highlighting...
6083
6084 var axisProp = axis;
6085 state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
6086}
6087function effect(_ref2) {
6088 var state = _ref2.state,
6089 options = _ref2.options;
6090 var _options$element = options.element,
6091 arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;
6092 if (arrowElement == null) {
6093 return;
6094 } // CSS selector
6095
6096 if (typeof arrowElement === 'string') {
6097 arrowElement = state.elements.popper.querySelector(arrowElement);
6098 if (!arrowElement) {
6099 return;
6100 }
6101 }
6102 if (false) {}
6103 if (!contains(state.elements.popper, arrowElement)) {
6104 if (false) {}
6105 return;
6106 }
6107 state.elements.arrow = arrowElement;
6108} // eslint-disable-next-line import/no-unused-modules
6109
6110/* harmony default export */ const modifiers_arrow = ({
6111 name: 'arrow',
6112 enabled: true,
6113 phase: 'main',
6114 fn: arrow,
6115 effect: effect,
6116 requires: ['popperOffsets'],
6117 requiresIfExists: ['preventOverflow']
6118});
6119;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getVariation.js
6120function getVariation(placement) {
6121 return placement.split('-')[1];
6122}
6123;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/computeStyles.js
6124
6125
6126
6127
6128
6129
6130
6131 // eslint-disable-next-line import/no-unused-modules
6132
6133var unsetSides = {
6134 top: 'auto',
6135 right: 'auto',
6136 bottom: 'auto',
6137 left: 'auto'
6138}; // Round the offsets to the nearest suitable subpixel based on the DPR.
6139// Zooming can change the DPR, but it seems to report a value that will
6140// cleanly divide the values into the appropriate subpixels.
6141
6142function roundOffsetsByDPR(_ref, win) {
6143 var x = _ref.x,
6144 y = _ref.y;
6145 var dpr = win.devicePixelRatio || 1;
6146 return {
6147 x: round(x * dpr) / dpr || 0,
6148 y: round(y * dpr) / dpr || 0
6149 };
6150}
6151function mapToStyles(_ref2) {
6152 var _Object$assign2;
6153 var popper = _ref2.popper,
6154 popperRect = _ref2.popperRect,
6155 placement = _ref2.placement,
6156 variation = _ref2.variation,
6157 offsets = _ref2.offsets,
6158 position = _ref2.position,
6159 gpuAcceleration = _ref2.gpuAcceleration,
6160 adaptive = _ref2.adaptive,
6161 roundOffsets = _ref2.roundOffsets,
6162 isFixed = _ref2.isFixed;
6163 var _offsets$x = offsets.x,
6164 x = _offsets$x === void 0 ? 0 : _offsets$x,
6165 _offsets$y = offsets.y,
6166 y = _offsets$y === void 0 ? 0 : _offsets$y;
6167 var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
6168 x: x,
6169 y: y
6170 }) : {
6171 x: x,
6172 y: y
6173 };
6174 x = _ref3.x;
6175 y = _ref3.y;
6176 var hasX = offsets.hasOwnProperty('x');
6177 var hasY = offsets.hasOwnProperty('y');
6178 var sideX = left;
6179 var sideY = enums_top;
6180 var win = window;
6181 if (adaptive) {
6182 var offsetParent = getOffsetParent(popper);
6183 var heightProp = 'clientHeight';
6184 var widthProp = 'clientWidth';
6185 if (offsetParent === getWindow(popper)) {
6186 offsetParent = getDocumentElement(popper);
6187 if (dom_utils_getComputedStyle_getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {
6188 heightProp = 'scrollHeight';
6189 widthProp = 'scrollWidth';
6190 }
6191 } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
6192
6193 offsetParent = offsetParent;
6194 if (placement === enums_top || (placement === left || placement === right) && variation === end) {
6195 sideY = bottom;
6196 var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height :
6197 // $FlowFixMe[prop-missing]
6198 offsetParent[heightProp];
6199 y -= offsetY - popperRect.height;
6200 y *= gpuAcceleration ? 1 : -1;
6201 }
6202 if (placement === left || (placement === enums_top || placement === bottom) && variation === end) {
6203 sideX = right;
6204 var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width :
6205 // $FlowFixMe[prop-missing]
6206 offsetParent[widthProp];
6207 x -= offsetX - popperRect.width;
6208 x *= gpuAcceleration ? 1 : -1;
6209 }
6210 }
6211 var commonStyles = Object.assign({
6212 position: position
6213 }, adaptive && unsetSides);
6214 var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
6215 x: x,
6216 y: y
6217 }, getWindow(popper)) : {
6218 x: x,
6219 y: y
6220 };
6221 x = _ref4.x;
6222 y = _ref4.y;
6223 if (gpuAcceleration) {
6224 var _Object$assign;
6225 return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
6226 }
6227 return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
6228}
6229function computeStyles(_ref5) {
6230 var state = _ref5.state,
6231 options = _ref5.options;
6232 var _options$gpuAccelerat = options.gpuAcceleration,
6233 gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
6234 _options$adaptive = options.adaptive,
6235 adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
6236 _options$roundOffsets = options.roundOffsets,
6237 roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
6238 if (false) { var transitionProperty; }
6239 var commonStyles = {
6240 placement: getBasePlacement(state.placement),
6241 variation: getVariation(state.placement),
6242 popper: state.elements.popper,
6243 popperRect: state.rects.popper,
6244 gpuAcceleration: gpuAcceleration,
6245 isFixed: state.options.strategy === 'fixed'
6246 };
6247 if (state.modifiersData.popperOffsets != null) {
6248 state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
6249 offsets: state.modifiersData.popperOffsets,
6250 position: state.options.strategy,
6251 adaptive: adaptive,
6252 roundOffsets: roundOffsets
6253 })));
6254 }
6255 if (state.modifiersData.arrow != null) {
6256 state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
6257 offsets: state.modifiersData.arrow,
6258 position: 'absolute',
6259 adaptive: false,
6260 roundOffsets: roundOffsets
6261 })));
6262 }
6263 state.attributes.popper = Object.assign({}, state.attributes.popper, {
6264 'data-popper-placement': state.placement
6265 });
6266} // eslint-disable-next-line import/no-unused-modules
6267
6268/* harmony default export */ const modifiers_computeStyles = ({
6269 name: 'computeStyles',
6270 enabled: true,
6271 phase: 'beforeWrite',
6272 fn: computeStyles,
6273 data: {}
6274});
6275;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/eventListeners.js
6276 // eslint-disable-next-line import/no-unused-modules
6277
6278var passive = {
6279 passive: true
6280};
6281function eventListeners_effect(_ref) {
6282 var state = _ref.state,
6283 instance = _ref.instance,
6284 options = _ref.options;
6285 var _options$scroll = options.scroll,
6286 scroll = _options$scroll === void 0 ? true : _options$scroll,
6287 _options$resize = options.resize,
6288 resize = _options$resize === void 0 ? true : _options$resize;
6289 var window = getWindow(state.elements.popper);
6290 var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
6291 if (scroll) {
6292 scrollParents.forEach(function (scrollParent) {
6293 scrollParent.addEventListener('scroll', instance.update, passive);
6294 });
6295 }
6296 if (resize) {
6297 window.addEventListener('resize', instance.update, passive);
6298 }
6299 return function () {
6300 if (scroll) {
6301 scrollParents.forEach(function (scrollParent) {
6302 scrollParent.removeEventListener('scroll', instance.update, passive);
6303 });
6304 }
6305 if (resize) {
6306 window.removeEventListener('resize', instance.update, passive);
6307 }
6308 };
6309} // eslint-disable-next-line import/no-unused-modules
6310
6311/* harmony default export */ const eventListeners = ({
6312 name: 'eventListeners',
6313 enabled: true,
6314 phase: 'write',
6315 fn: function fn() {},
6316 effect: eventListeners_effect,
6317 data: {}
6318});
6319;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js
6320var hash = {
6321 left: 'right',
6322 right: 'left',
6323 bottom: 'top',
6324 top: 'bottom'
6325};
6326function getOppositePlacement(placement) {
6327 return placement.replace(/left|right|bottom|top/g, function (matched) {
6328 return hash[matched];
6329 });
6330}
6331;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js
6332var getOppositeVariationPlacement_hash = {
6333 start: 'end',
6334 end: 'start'
6335};
6336function getOppositeVariationPlacement(placement) {
6337 return placement.replace(/start|end/g, function (matched) {
6338 return getOppositeVariationPlacement_hash[matched];
6339 });
6340}
6341;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js
6342
6343function getWindowScroll(node) {
6344 var win = getWindow(node);
6345 var scrollLeft = win.pageXOffset;
6346 var scrollTop = win.pageYOffset;
6347 return {
6348 scrollLeft: scrollLeft,
6349 scrollTop: scrollTop
6350 };
6351}
6352;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js
6353
6354
6355
6356function getWindowScrollBarX(element) {
6357 // If <html> has a CSS width greater than the viewport, then this will be
6358 // incorrect for RTL.
6359 // Popper 1 is broken in this case and never had a bug report so let's assume
6360 // it's not an issue. I don't think anyone ever specifies width on <html>
6361 // anyway.
6362 // Browsers where the left scrollbar doesn't cause an issue report `0` for
6363 // this (e.g. Edge 2019, IE11, Safari)
6364 return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
6365}
6366;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js
6367
6368
6369
6370
6371function getViewportRect(element, strategy) {
6372 var win = getWindow(element);
6373 var html = getDocumentElement(element);
6374 var visualViewport = win.visualViewport;
6375 var width = html.clientWidth;
6376 var height = html.clientHeight;
6377 var x = 0;
6378 var y = 0;
6379 if (visualViewport) {
6380 width = visualViewport.width;
6381 height = visualViewport.height;
6382 var layoutViewport = isLayoutViewport();
6383 if (layoutViewport || !layoutViewport && strategy === 'fixed') {
6384 x = visualViewport.offsetLeft;
6385 y = visualViewport.offsetTop;
6386 }
6387 }
6388 return {
6389 width: width,
6390 height: height,
6391 x: x + getWindowScrollBarX(element),
6392 y: y
6393 };
6394}
6395;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js
6396
6397
6398
6399
6400 // Gets the entire size of the scrollable document area, even extending outside
6401// of the `<html>` and `<body>` rect bounds if horizontally scrollable
6402
6403function getDocumentRect(element) {
6404 var _element$ownerDocumen;
6405 var html = getDocumentElement(element);
6406 var winScroll = getWindowScroll(element);
6407 var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
6408 var width = math_max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
6409 var height = math_max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
6410 var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
6411 var y = -winScroll.scrollTop;
6412 if (dom_utils_getComputedStyle_getComputedStyle(body || html).direction === 'rtl') {
6413 x += math_max(html.clientWidth, body ? body.clientWidth : 0) - width;
6414 }
6415 return {
6416 width: width,
6417 height: height,
6418 x: x,
6419 y: y
6420 };
6421}
6422;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js
6423
6424function isScrollParent(element) {
6425 // Firefox wants us to check `-x` and `-y` variations as well
6426 var _getComputedStyle = dom_utils_getComputedStyle_getComputedStyle(element),
6427 overflow = _getComputedStyle.overflow,
6428 overflowX = _getComputedStyle.overflowX,
6429 overflowY = _getComputedStyle.overflowY;
6430 return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
6431}
6432;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js
6433
6434
6435
6436
6437function getScrollParent(node) {
6438 if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
6439 // $FlowFixMe[incompatible-return]: assume body is always available
6440 return node.ownerDocument.body;
6441 }
6442 if (isHTMLElement(node) && isScrollParent(node)) {
6443 return node;
6444 }
6445 return getScrollParent(getParentNode(node));
6446}
6447;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js
6448
6449
6450
6451
6452/*
6453given a DOM element, return the list of all scroll parents, up the list of ancesors
6454until we get to the top window object. This list is what we attach scroll listeners
6455to, because if any of these parent elements scroll, we'll need to re-calculate the
6456reference element's position.
6457*/
6458
6459function listScrollParents(element, list) {
6460 var _element$ownerDocumen;
6461 if (list === void 0) {
6462 list = [];
6463 }
6464 var scrollParent = getScrollParent(element);
6465 var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
6466 var win = getWindow(scrollParent);
6467 var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
6468 var updatedList = list.concat(target);
6469 return isBody ? updatedList :
6470 // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
6471 updatedList.concat(listScrollParents(getParentNode(target)));
6472}
6473;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/rectToClientRect.js
6474function rectToClientRect(rect) {
6475 return Object.assign({}, rect, {
6476 left: rect.x,
6477 top: rect.y,
6478 right: rect.x + rect.width,
6479 bottom: rect.y + rect.height
6480 });
6481}
6482;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497function getInnerBoundingClientRect(element, strategy) {
6498 var rect = getBoundingClientRect(element, false, strategy === 'fixed');
6499 rect.top = rect.top + element.clientTop;
6500 rect.left = rect.left + element.clientLeft;
6501 rect.bottom = rect.top + element.clientHeight;
6502 rect.right = rect.left + element.clientWidth;
6503 rect.width = element.clientWidth;
6504 rect.height = element.clientHeight;
6505 rect.x = rect.left;
6506 rect.y = rect.top;
6507 return rect;
6508}
6509function getClientRectFromMixedType(element, clippingParent, strategy) {
6510 return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
6511} // A "clipping parent" is an overflowable container with the characteristic of
6512// clipping (or hiding) overflowing elements with a position different from
6513// `initial`
6514
6515function getClippingParents(element) {
6516 var clippingParents = listScrollParents(getParentNode(element));
6517 var canEscapeClipping = ['absolute', 'fixed'].indexOf(dom_utils_getComputedStyle_getComputedStyle(element).position) >= 0;
6518 var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
6519 if (!isElement(clipperElement)) {
6520 return [];
6521 } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
6522
6523 return clippingParents.filter(function (clippingParent) {
6524 return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
6525 });
6526} // Gets the maximum area that the element is visible in due to any number of
6527// clipping parents
6528
6529function getClippingRect(element, boundary, rootBoundary, strategy) {
6530 var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
6531 var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
6532 var firstClippingParent = clippingParents[0];
6533 var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
6534 var rect = getClientRectFromMixedType(element, clippingParent, strategy);
6535 accRect.top = math_max(rect.top, accRect.top);
6536 accRect.right = math_min(rect.right, accRect.right);
6537 accRect.bottom = math_min(rect.bottom, accRect.bottom);
6538 accRect.left = math_max(rect.left, accRect.left);
6539 return accRect;
6540 }, getClientRectFromMixedType(element, firstClippingParent, strategy));
6541 clippingRect.width = clippingRect.right - clippingRect.left;
6542 clippingRect.height = clippingRect.bottom - clippingRect.top;
6543 clippingRect.x = clippingRect.left;
6544 clippingRect.y = clippingRect.top;
6545 return clippingRect;
6546}
6547;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeOffsets.js
6548
6549
6550
6551
6552function computeOffsets(_ref) {
6553 var reference = _ref.reference,
6554 element = _ref.element,
6555 placement = _ref.placement;
6556 var basePlacement = placement ? getBasePlacement(placement) : null;
6557 var variation = placement ? getVariation(placement) : null;
6558 var commonX = reference.x + reference.width / 2 - element.width / 2;
6559 var commonY = reference.y + reference.height / 2 - element.height / 2;
6560 var offsets;
6561 switch (basePlacement) {
6562 case enums_top:
6563 offsets = {
6564 x: commonX,
6565 y: reference.y - element.height
6566 };
6567 break;
6568 case bottom:
6569 offsets = {
6570 x: commonX,
6571 y: reference.y + reference.height
6572 };
6573 break;
6574 case right:
6575 offsets = {
6576 x: reference.x + reference.width,
6577 y: commonY
6578 };
6579 break;
6580 case left:
6581 offsets = {
6582 x: reference.x - element.width,
6583 y: commonY
6584 };
6585 break;
6586 default:
6587 offsets = {
6588 x: reference.x,
6589 y: reference.y
6590 };
6591 }
6592 var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
6593 if (mainAxis != null) {
6594 var len = mainAxis === 'y' ? 'height' : 'width';
6595 switch (variation) {
6596 case start:
6597 offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
6598 break;
6599 case end:
6600 offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
6601 break;
6602 default:
6603 }
6604 }
6605 return offsets;
6606}
6607;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/detectOverflow.js
6608
6609
6610
6611
6612
6613
6614
6615
6616 // eslint-disable-next-line import/no-unused-modules
6617
6618function detectOverflow(state, options) {
6619 if (options === void 0) {
6620 options = {};
6621 }
6622 var _options = options,
6623 _options$placement = _options.placement,
6624 placement = _options$placement === void 0 ? state.placement : _options$placement,
6625 _options$strategy = _options.strategy,
6626 strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,
6627 _options$boundary = _options.boundary,
6628 boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
6629 _options$rootBoundary = _options.rootBoundary,
6630 rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
6631 _options$elementConte = _options.elementContext,
6632 elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
6633 _options$altBoundary = _options.altBoundary,
6634 altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
6635 _options$padding = _options.padding,
6636 padding = _options$padding === void 0 ? 0 : _options$padding;
6637 var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
6638 var altContext = elementContext === popper ? reference : popper;
6639 var popperRect = state.rects.popper;
6640 var element = state.elements[altBoundary ? altContext : elementContext];
6641 var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
6642 var referenceClientRect = getBoundingClientRect(state.elements.reference);
6643 var popperOffsets = computeOffsets({
6644 reference: referenceClientRect,
6645 element: popperRect,
6646 strategy: 'absolute',
6647 placement: placement
6648 });
6649 var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
6650 var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
6651 // 0 or negative = within the clipping rect
6652
6653 var overflowOffsets = {
6654 top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
6655 bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
6656 left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
6657 right: elementClientRect.right - clippingClientRect.right + paddingObject.right
6658 };
6659 var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
6660
6661 if (elementContext === popper && offsetData) {
6662 var offset = offsetData[placement];
6663 Object.keys(overflowOffsets).forEach(function (key) {
6664 var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
6665 var axis = [enums_top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
6666 overflowOffsets[key] += offset[axis] * multiply;
6667 });
6668 }
6669 return overflowOffsets;
6670}
6671;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js
6672
6673
6674
6675
6676function computeAutoPlacement(state, options) {
6677 if (options === void 0) {
6678 options = {};
6679 }
6680 var _options = options,
6681 placement = _options.placement,
6682 boundary = _options.boundary,
6683 rootBoundary = _options.rootBoundary,
6684 padding = _options.padding,
6685 flipVariations = _options.flipVariations,
6686 _options$allowedAutoP = _options.allowedAutoPlacements,
6687 allowedAutoPlacements = _options$allowedAutoP === void 0 ? enums_placements : _options$allowedAutoP;
6688 var variation = getVariation(placement);
6689 var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
6690 return getVariation(placement) === variation;
6691 }) : basePlacements;
6692 var allowedPlacements = placements.filter(function (placement) {
6693 return allowedAutoPlacements.indexOf(placement) >= 0;
6694 });
6695 if (allowedPlacements.length === 0) {
6696 allowedPlacements = placements;
6697 if (false) {}
6698 } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
6699
6700 var overflows = allowedPlacements.reduce(function (acc, placement) {
6701 acc[placement] = detectOverflow(state, {
6702 placement: placement,
6703 boundary: boundary,
6704 rootBoundary: rootBoundary,
6705 padding: padding
6706 })[getBasePlacement(placement)];
6707 return acc;
6708 }, {});
6709 return Object.keys(overflows).sort(function (a, b) {
6710 return overflows[a] - overflows[b];
6711 });
6712}
6713;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/flip.js
6714
6715
6716
6717
6718
6719
6720 // eslint-disable-next-line import/no-unused-modules
6721
6722function getExpandedFallbackPlacements(placement) {
6723 if (getBasePlacement(placement) === auto) {
6724 return [];
6725 }
6726 var oppositePlacement = getOppositePlacement(placement);
6727 return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
6728}
6729function flip(_ref) {
6730 var state = _ref.state,
6731 options = _ref.options,
6732 name = _ref.name;
6733 if (state.modifiersData[name]._skip) {
6734 return;
6735 }
6736 var _options$mainAxis = options.mainAxis,
6737 checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
6738 _options$altAxis = options.altAxis,
6739 checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
6740 specifiedFallbackPlacements = options.fallbackPlacements,
6741 padding = options.padding,
6742 boundary = options.boundary,
6743 rootBoundary = options.rootBoundary,
6744 altBoundary = options.altBoundary,
6745 _options$flipVariatio = options.flipVariations,
6746 flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
6747 allowedAutoPlacements = options.allowedAutoPlacements;
6748 var preferredPlacement = state.options.placement;
6749 var basePlacement = getBasePlacement(preferredPlacement);
6750 var isBasePlacement = basePlacement === preferredPlacement;
6751 var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
6752 var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
6753 return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
6754 placement: placement,
6755 boundary: boundary,
6756 rootBoundary: rootBoundary,
6757 padding: padding,
6758 flipVariations: flipVariations,
6759 allowedAutoPlacements: allowedAutoPlacements
6760 }) : placement);
6761 }, []);
6762 var referenceRect = state.rects.reference;
6763 var popperRect = state.rects.popper;
6764 var checksMap = new Map();
6765 var makeFallbackChecks = true;
6766 var firstFittingPlacement = placements[0];
6767 for (var i = 0; i < placements.length; i++) {
6768 var placement = placements[i];
6769 var _basePlacement = getBasePlacement(placement);
6770 var isStartVariation = getVariation(placement) === start;
6771 var isVertical = [enums_top, bottom].indexOf(_basePlacement) >= 0;
6772 var len = isVertical ? 'width' : 'height';
6773 var overflow = detectOverflow(state, {
6774 placement: placement,
6775 boundary: boundary,
6776 rootBoundary: rootBoundary,
6777 altBoundary: altBoundary,
6778 padding: padding
6779 });
6780 var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : enums_top;
6781 if (referenceRect[len] > popperRect[len]) {
6782 mainVariationSide = getOppositePlacement(mainVariationSide);
6783 }
6784 var altVariationSide = getOppositePlacement(mainVariationSide);
6785 var checks = [];
6786 if (checkMainAxis) {
6787 checks.push(overflow[_basePlacement] <= 0);
6788 }
6789 if (checkAltAxis) {
6790 checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
6791 }
6792 if (checks.every(function (check) {
6793 return check;
6794 })) {
6795 firstFittingPlacement = placement;
6796 makeFallbackChecks = false;
6797 break;
6798 }
6799 checksMap.set(placement, checks);
6800 }
6801 if (makeFallbackChecks) {
6802 // `2` may be desired in some cases – research later
6803 var numberOfChecks = flipVariations ? 3 : 1;
6804 var _loop = function _loop(_i) {
6805 var fittingPlacement = placements.find(function (placement) {
6806 var checks = checksMap.get(placement);
6807 if (checks) {
6808 return checks.slice(0, _i).every(function (check) {
6809 return check;
6810 });
6811 }
6812 });
6813 if (fittingPlacement) {
6814 firstFittingPlacement = fittingPlacement;
6815 return "break";
6816 }
6817 };
6818 for (var _i = numberOfChecks; _i > 0; _i--) {
6819 var _ret = _loop(_i);
6820 if (_ret === "break") break;
6821 }
6822 }
6823 if (state.placement !== firstFittingPlacement) {
6824 state.modifiersData[name]._skip = true;
6825 state.placement = firstFittingPlacement;
6826 state.reset = true;
6827 }
6828} // eslint-disable-next-line import/no-unused-modules
6829
6830/* harmony default export */ const modifiers_flip = ({
6831 name: 'flip',
6832 enabled: true,
6833 phase: 'main',
6834 fn: flip,
6835 requiresIfExists: ['offset'],
6836 data: {
6837 _skip: false
6838 }
6839});
6840;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/hide.js
6841
6842
6843function getSideOffsets(overflow, rect, preventedOffsets) {
6844 if (preventedOffsets === void 0) {
6845 preventedOffsets = {
6846 x: 0,
6847 y: 0
6848 };
6849 }
6850 return {
6851 top: overflow.top - rect.height - preventedOffsets.y,
6852 right: overflow.right - rect.width + preventedOffsets.x,
6853 bottom: overflow.bottom - rect.height + preventedOffsets.y,
6854 left: overflow.left - rect.width - preventedOffsets.x
6855 };
6856}
6857function isAnySideFullyClipped(overflow) {
6858 return [enums_top, right, bottom, left].some(function (side) {
6859 return overflow[side] >= 0;
6860 });
6861}
6862function hide(_ref) {
6863 var state = _ref.state,
6864 name = _ref.name;
6865 var referenceRect = state.rects.reference;
6866 var popperRect = state.rects.popper;
6867 var preventedOffsets = state.modifiersData.preventOverflow;
6868 var referenceOverflow = detectOverflow(state, {
6869 elementContext: 'reference'
6870 });
6871 var popperAltOverflow = detectOverflow(state, {
6872 altBoundary: true
6873 });
6874 var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
6875 var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
6876 var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
6877 var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
6878 state.modifiersData[name] = {
6879 referenceClippingOffsets: referenceClippingOffsets,
6880 popperEscapeOffsets: popperEscapeOffsets,
6881 isReferenceHidden: isReferenceHidden,
6882 hasPopperEscaped: hasPopperEscaped
6883 };
6884 state.attributes.popper = Object.assign({}, state.attributes.popper, {
6885 'data-popper-reference-hidden': isReferenceHidden,
6886 'data-popper-escaped': hasPopperEscaped
6887 });
6888} // eslint-disable-next-line import/no-unused-modules
6889
6890/* harmony default export */ const modifiers_hide = ({
6891 name: 'hide',
6892 enabled: true,
6893 phase: 'main',
6894 requiresIfExists: ['preventOverflow'],
6895 fn: hide
6896});
6897;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/offset.js
6898
6899 // eslint-disable-next-line import/no-unused-modules
6900
6901function distanceAndSkiddingToXY(placement, rects, offset) {
6902 var basePlacement = getBasePlacement(placement);
6903 var invertDistance = [left, enums_top].indexOf(basePlacement) >= 0 ? -1 : 1;
6904 var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
6905 placement: placement
6906 })) : offset,
6907 skidding = _ref[0],
6908 distance = _ref[1];
6909 skidding = skidding || 0;
6910 distance = (distance || 0) * invertDistance;
6911 return [left, right].indexOf(basePlacement) >= 0 ? {
6912 x: distance,
6913 y: skidding
6914 } : {
6915 x: skidding,
6916 y: distance
6917 };
6918}
6919function offset(_ref2) {
6920 var state = _ref2.state,
6921 options = _ref2.options,
6922 name = _ref2.name;
6923 var _options$offset = options.offset,
6924 offset = _options$offset === void 0 ? [0, 0] : _options$offset;
6925 var data = enums_placements.reduce(function (acc, placement) {
6926 acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
6927 return acc;
6928 }, {});
6929 var _data$state$placement = data[state.placement],
6930 x = _data$state$placement.x,
6931 y = _data$state$placement.y;
6932 if (state.modifiersData.popperOffsets != null) {
6933 state.modifiersData.popperOffsets.x += x;
6934 state.modifiersData.popperOffsets.y += y;
6935 }
6936 state.modifiersData[name] = data;
6937} // eslint-disable-next-line import/no-unused-modules
6938
6939/* harmony default export */ const modifiers_offset = ({
6940 name: 'offset',
6941 enabled: true,
6942 phase: 'main',
6943 requires: ['popperOffsets'],
6944 fn: offset
6945});
6946;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js
6947
6948function popperOffsets(_ref) {
6949 var state = _ref.state,
6950 name = _ref.name;
6951 // Offsets are the actual position the popper needs to have to be
6952 // properly positioned near its reference element
6953 // This is the most basic placement, and will be adjusted by
6954 // the modifiers in the next step
6955 state.modifiersData[name] = computeOffsets({
6956 reference: state.rects.reference,
6957 element: state.rects.popper,
6958 strategy: 'absolute',
6959 placement: state.placement
6960 });
6961} // eslint-disable-next-line import/no-unused-modules
6962
6963/* harmony default export */ const modifiers_popperOffsets = ({
6964 name: 'popperOffsets',
6965 enabled: true,
6966 phase: 'read',
6967 fn: popperOffsets,
6968 data: {}
6969});
6970;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/getAltAxis.js
6971function getAltAxis(axis) {
6972 return axis === 'x' ? 'y' : 'x';
6973}
6974;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986function preventOverflow(_ref) {
6987 var state = _ref.state,
6988 options = _ref.options,
6989 name = _ref.name;
6990 var _options$mainAxis = options.mainAxis,
6991 checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
6992 _options$altAxis = options.altAxis,
6993 checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
6994 boundary = options.boundary,
6995 rootBoundary = options.rootBoundary,
6996 altBoundary = options.altBoundary,
6997 padding = options.padding,
6998 _options$tether = options.tether,
6999 tether = _options$tether === void 0 ? true : _options$tether,
7000 _options$tetherOffset = options.tetherOffset,
7001 tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
7002 var overflow = detectOverflow(state, {
7003 boundary: boundary,
7004 rootBoundary: rootBoundary,
7005 padding: padding,
7006 altBoundary: altBoundary
7007 });
7008 var basePlacement = getBasePlacement(state.placement);
7009 var variation = getVariation(state.placement);
7010 var isBasePlacement = !variation;
7011 var mainAxis = getMainAxisFromPlacement(basePlacement);
7012 var altAxis = getAltAxis(mainAxis);
7013 var popperOffsets = state.modifiersData.popperOffsets;
7014 var referenceRect = state.rects.reference;
7015 var popperRect = state.rects.popper;
7016 var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
7017 placement: state.placement
7018 })) : tetherOffset;
7019 var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
7020 mainAxis: tetherOffsetValue,
7021 altAxis: tetherOffsetValue
7022 } : Object.assign({
7023 mainAxis: 0,
7024 altAxis: 0
7025 }, tetherOffsetValue);
7026 var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
7027 var data = {
7028 x: 0,
7029 y: 0
7030 };
7031 if (!popperOffsets) {
7032 return;
7033 }
7034 if (checkMainAxis) {
7035 var _offsetModifierState$;
7036 var mainSide = mainAxis === 'y' ? enums_top : left;
7037 var altSide = mainAxis === 'y' ? bottom : right;
7038 var len = mainAxis === 'y' ? 'height' : 'width';
7039 var offset = popperOffsets[mainAxis];
7040 var min = offset + overflow[mainSide];
7041 var max = offset - overflow[altSide];
7042 var additive = tether ? -popperRect[len] / 2 : 0;
7043 var minLen = variation === start ? referenceRect[len] : popperRect[len];
7044 var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
7045 // outside the reference bounds
7046
7047 var arrowElement = state.elements.arrow;
7048 var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
7049 width: 0,
7050 height: 0
7051 };
7052 var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();
7053 var arrowPaddingMin = arrowPaddingObject[mainSide];
7054 var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want
7055 // to include its full size in the calculation. If the reference is small
7056 // and near the edge of a boundary, the popper can overflow even if the
7057 // reference is not overflowing as well (e.g. virtual elements with no
7058 // width or height)
7059
7060 var arrowLen = within(0, referenceRect[len], arrowRect[len]);
7061 var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
7062 var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
7063 var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
7064 var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
7065 var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
7066 var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
7067 var tetherMax = offset + maxOffset - offsetModifierValue;
7068 var preventedOffset = within(tether ? math_min(min, tetherMin) : min, offset, tether ? math_max(max, tetherMax) : max);
7069 popperOffsets[mainAxis] = preventedOffset;
7070 data[mainAxis] = preventedOffset - offset;
7071 }
7072 if (checkAltAxis) {
7073 var _offsetModifierState$2;
7074 var _mainSide = mainAxis === 'x' ? enums_top : left;
7075 var _altSide = mainAxis === 'x' ? bottom : right;
7076 var _offset = popperOffsets[altAxis];
7077 var _len = altAxis === 'y' ? 'height' : 'width';
7078 var _min = _offset + overflow[_mainSide];
7079 var _max = _offset - overflow[_altSide];
7080 var isOriginSide = [enums_top, left].indexOf(basePlacement) !== -1;
7081 var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
7082 var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
7083 var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
7084 var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
7085 popperOffsets[altAxis] = _preventedOffset;
7086 data[altAxis] = _preventedOffset - _offset;
7087 }
7088 state.modifiersData[name] = data;
7089} // eslint-disable-next-line import/no-unused-modules
7090
7091/* harmony default export */ const modifiers_preventOverflow = ({
7092 name: 'preventOverflow',
7093 enabled: true,
7094 phase: 'main',
7095 fn: preventOverflow,
7096 requiresIfExists: ['offset']
7097});
7098;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js
7099function getHTMLElementScroll(element) {
7100 return {
7101 scrollLeft: element.scrollLeft,
7102 scrollTop: element.scrollTop
7103 };
7104}
7105;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js
7106
7107
7108
7109
7110function getNodeScroll(node) {
7111 if (node === getWindow(node) || !isHTMLElement(node)) {
7112 return getWindowScroll(node);
7113 } else {
7114 return getHTMLElementScroll(node);
7115 }
7116}
7117;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js
7118
7119
7120
7121
7122
7123
7124
7125
7126function isElementScaled(element) {
7127 var rect = element.getBoundingClientRect();
7128 var scaleX = round(rect.width) / element.offsetWidth || 1;
7129 var scaleY = round(rect.height) / element.offsetHeight || 1;
7130 return scaleX !== 1 || scaleY !== 1;
7131} // Returns the composite rect of an element relative to its offsetParent.
7132// Composite means it takes into account transforms as well as layout.
7133
7134function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
7135 if (isFixed === void 0) {
7136 isFixed = false;
7137 }
7138 var isOffsetParentAnElement = isHTMLElement(offsetParent);
7139 var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
7140 var documentElement = getDocumentElement(offsetParent);
7141 var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
7142 var scroll = {
7143 scrollLeft: 0,
7144 scrollTop: 0
7145 };
7146 var offsets = {
7147 x: 0,
7148 y: 0
7149 };
7150 if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
7151 if (getNodeName(offsetParent) !== 'body' ||
7152 // https://github.com/popperjs/popper-core/issues/1078
7153 isScrollParent(documentElement)) {
7154 scroll = getNodeScroll(offsetParent);
7155 }
7156 if (isHTMLElement(offsetParent)) {
7157 offsets = getBoundingClientRect(offsetParent, true);
7158 offsets.x += offsetParent.clientLeft;
7159 offsets.y += offsetParent.clientTop;
7160 } else if (documentElement) {
7161 offsets.x = getWindowScrollBarX(documentElement);
7162 }
7163 }
7164 return {
7165 x: rect.left + scroll.scrollLeft - offsets.x,
7166 y: rect.top + scroll.scrollTop - offsets.y,
7167 width: rect.width,
7168 height: rect.height
7169 };
7170}
7171;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/orderModifiers.js
7172 // source: https://stackoverflow.com/questions/49875255
7173
7174function order(modifiers) {
7175 var map = new Map();
7176 var visited = new Set();
7177 var result = [];
7178 modifiers.forEach(function (modifier) {
7179 map.set(modifier.name, modifier);
7180 }); // On visiting object, check for its dependencies and visit them recursively
7181
7182 function sort(modifier) {
7183 visited.add(modifier.name);
7184 var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
7185 requires.forEach(function (dep) {
7186 if (!visited.has(dep)) {
7187 var depModifier = map.get(dep);
7188 if (depModifier) {
7189 sort(depModifier);
7190 }
7191 }
7192 });
7193 result.push(modifier);
7194 }
7195 modifiers.forEach(function (modifier) {
7196 if (!visited.has(modifier.name)) {
7197 // check for visited object
7198 sort(modifier);
7199 }
7200 });
7201 return result;
7202}
7203function orderModifiers(modifiers) {
7204 // order based on dependencies
7205 var orderedModifiers = order(modifiers); // order based on phase
7206
7207 return modifierPhases.reduce(function (acc, phase) {
7208 return acc.concat(orderedModifiers.filter(function (modifier) {
7209 return modifier.phase === phase;
7210 }));
7211 }, []);
7212}
7213;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/debounce.js
7214function debounce(fn) {
7215 var pending;
7216 return function () {
7217 if (!pending) {
7218 pending = new Promise(function (resolve) {
7219 Promise.resolve().then(function () {
7220 pending = undefined;
7221 resolve(fn());
7222 });
7223 });
7224 }
7225 return pending;
7226 };
7227}
7228;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/mergeByName.js
7229function mergeByName(modifiers) {
7230 var merged = modifiers.reduce(function (merged, current) {
7231 var existing = merged[current.name];
7232 merged[current.name] = existing ? Object.assign({}, existing, current, {
7233 options: Object.assign({}, existing.options, current.options),
7234 data: Object.assign({}, existing.data, current.data)
7235 }) : current;
7236 return merged;
7237 }, {}); // IE11 does not support Object.values
7238
7239 return Object.keys(merged).map(function (key) {
7240 return merged[key];
7241 });
7242}
7243;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/createPopper.js
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
7259var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';
7260var DEFAULT_OPTIONS = {
7261 placement: 'bottom',
7262 modifiers: [],
7263 strategy: 'absolute'
7264};
7265function areValidElements() {
7266 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
7267 args[_key] = arguments[_key];
7268 }
7269 return !args.some(function (element) {
7270 return !(element && typeof element.getBoundingClientRect === 'function');
7271 });
7272}
7273function popperGenerator(generatorOptions) {
7274 if (generatorOptions === void 0) {
7275 generatorOptions = {};
7276 }
7277 var _generatorOptions = generatorOptions,
7278 _generatorOptions$def = _generatorOptions.defaultModifiers,
7279 defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
7280 _generatorOptions$def2 = _generatorOptions.defaultOptions,
7281 defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
7282 return function createPopper(reference, popper, options) {
7283 if (options === void 0) {
7284 options = defaultOptions;
7285 }
7286 var state = {
7287 placement: 'bottom',
7288 orderedModifiers: [],
7289 options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
7290 modifiersData: {},
7291 elements: {
7292 reference: reference,
7293 popper: popper
7294 },
7295 attributes: {},
7296 styles: {}
7297 };
7298 var effectCleanupFns = [];
7299 var isDestroyed = false;
7300 var instance = {
7301 state: state,
7302 setOptions: function setOptions(setOptionsAction) {
7303 var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
7304 cleanupModifierEffects();
7305 state.options = Object.assign({}, defaultOptions, state.options, options);
7306 state.scrollParents = {
7307 reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
7308 popper: listScrollParents(popper)
7309 }; // Orders the modifiers based on their dependencies and `phase`
7310 // properties
7311
7312 var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
7313
7314 state.orderedModifiers = orderedModifiers.filter(function (m) {
7315 return m.enabled;
7316 }); // Validate the provided modifiers so that the consumer will get warned
7317 // if one of the modifiers is invalid for any reason
7318
7319 if (false) { var _getComputedStyle, marginTop, marginRight, marginBottom, marginLeft, flipModifier, modifiers; }
7320 runModifierEffects();
7321 return instance.update();
7322 },
7323 // Sync update – it will always be executed, even if not necessary. This
7324 // is useful for low frequency updates where sync behavior simplifies the
7325 // logic.
7326 // For high frequency updates (e.g. `resize` and `scroll` events), always
7327 // prefer the async Popper#update method
7328 forceUpdate: function forceUpdate() {
7329 if (isDestroyed) {
7330 return;
7331 }
7332 var _state$elements = state.elements,
7333 reference = _state$elements.reference,
7334 popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
7335 // anymore
7336
7337 if (!areValidElements(reference, popper)) {
7338 if (false) {}
7339 return;
7340 } // Store the reference and popper rects to be read by modifiers
7341
7342 state.rects = {
7343 reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
7344 popper: getLayoutRect(popper)
7345 }; // Modifiers have the ability to reset the current update cycle. The
7346 // most common use case for this is the `flip` modifier changing the
7347 // placement, which then needs to re-run all the modifiers, because the
7348 // logic was previously ran for the previous placement and is therefore
7349 // stale/incorrect
7350
7351 state.reset = false;
7352 state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
7353 // is filled with the initial data specified by the modifier. This means
7354 // it doesn't persist and is fresh on each update.
7355 // To ensure persistent data, use `${name}#persistent`
7356
7357 state.orderedModifiers.forEach(function (modifier) {
7358 return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
7359 });
7360 var __debug_loops__ = 0;
7361 for (var index = 0; index < state.orderedModifiers.length; index++) {
7362 if (false) {}
7363 if (state.reset === true) {
7364 state.reset = false;
7365 index = -1;
7366 continue;
7367 }
7368 var _state$orderedModifie = state.orderedModifiers[index],
7369 fn = _state$orderedModifie.fn,
7370 _state$orderedModifie2 = _state$orderedModifie.options,
7371 _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
7372 name = _state$orderedModifie.name;
7373 if (typeof fn === 'function') {
7374 state = fn({
7375 state: state,
7376 options: _options,
7377 name: name,
7378 instance: instance
7379 }) || state;
7380 }
7381 }
7382 },
7383 // Async and optimistically optimized update – it will not be executed if
7384 // not necessary (debounced to run at most once-per-tick)
7385 update: debounce(function () {
7386 return new Promise(function (resolve) {
7387 instance.forceUpdate();
7388 resolve(state);
7389 });
7390 }),
7391 destroy: function destroy() {
7392 cleanupModifierEffects();
7393 isDestroyed = true;
7394 }
7395 };
7396 if (!areValidElements(reference, popper)) {
7397 if (false) {}
7398 return instance;
7399 }
7400 instance.setOptions(options).then(function (state) {
7401 if (!isDestroyed && options.onFirstUpdate) {
7402 options.onFirstUpdate(state);
7403 }
7404 }); // Modifiers have the ability to execute arbitrary code before the first
7405 // update cycle runs. They will be executed in the same order as the update
7406 // cycle. This is useful when a modifier adds some persistent data that
7407 // other modifiers need to use, but the modifier is run after the dependent
7408 // one.
7409
7410 function runModifierEffects() {
7411 state.orderedModifiers.forEach(function (_ref3) {
7412 var name = _ref3.name,
7413 _ref3$options = _ref3.options,
7414 options = _ref3$options === void 0 ? {} : _ref3$options,
7415 effect = _ref3.effect;
7416 if (typeof effect === 'function') {
7417 var cleanupFn = effect({
7418 state: state,
7419 name: name,
7420 instance: instance,
7421 options: options
7422 });
7423 var noopFn = function noopFn() {};
7424 effectCleanupFns.push(cleanupFn || noopFn);
7425 }
7426 });
7427 }
7428 function cleanupModifierEffects() {
7429 effectCleanupFns.forEach(function (fn) {
7430 return fn();
7431 });
7432 effectCleanupFns = [];
7433 }
7434 return instance;
7435 };
7436}
7437var createPopper = /*#__PURE__*/(/* unused pure expression or super */ null && (popperGenerator())); // eslint-disable-next-line import/no-unused-modules
7438
7439
7440;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/popper.js
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452// For the common JS build we will turn this file into a bundle with no imports.
7453// This is b/c the Popper lib is all esm files, and would break in a common js only environment
7454const popper_createPopper = popperGenerator({
7455 defaultModifiers: [modifiers_hide, modifiers_popperOffsets, modifiers_computeStyles, eventListeners, modifiers_offset, modifiers_flip, modifiers_preventOverflow, modifiers_arrow]
7456});
7457
7458;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/usePopper.js
7459const usePopper_excluded = ["enabled", "placement", "strategy", "modifiers"];
7460function usePopper_objectWithoutPropertiesLoose(source, excluded) {
7461 if (source == null) return {};
7462 var target = {};
7463 var sourceKeys = Object.keys(source);
7464 var key, i;
7465 for (i = 0; i < sourceKeys.length; i++) {
7466 key = sourceKeys[i];
7467 if (excluded.indexOf(key) >= 0) continue;
7468 target[key] = source[key];
7469 }
7470 return target;
7471}
7472
7473
7474
7475
7476const disabledApplyStylesModifier = {
7477 name: 'applyStyles',
7478 enabled: false,
7479 phase: 'afterWrite',
7480 fn: () => undefined
7481};
7482
7483// until docjs supports type exports...
7484
7485const ariaDescribedByModifier = {
7486 name: 'ariaDescribedBy',
7487 enabled: true,
7488 phase: 'afterWrite',
7489 effect: ({
7490 state
7491 }) => () => {
7492 const {
7493 reference,
7494 popper
7495 } = state.elements;
7496 if ('removeAttribute' in reference) {
7497 const ids = (reference.getAttribute('aria-describedby') || '').split(',').filter(id => id.trim() !== popper.id);
7498 if (!ids.length) reference.removeAttribute('aria-describedby');else reference.setAttribute('aria-describedby', ids.join(','));
7499 }
7500 },
7501 fn: ({
7502 state
7503 }) => {
7504 var _popper$getAttribute;
7505 const {
7506 popper,
7507 reference
7508 } = state.elements;
7509 const role = (_popper$getAttribute = popper.getAttribute('role')) == null ? void 0 : _popper$getAttribute.toLowerCase();
7510 if (popper.id && role === 'tooltip' && 'setAttribute' in reference) {
7511 const ids = reference.getAttribute('aria-describedby');
7512 if (ids && ids.split(',').indexOf(popper.id) !== -1) {
7513 return;
7514 }
7515 reference.setAttribute('aria-describedby', ids ? `${ids},${popper.id}` : popper.id);
7516 }
7517 }
7518};
7519const EMPTY_MODIFIERS = [];
7520/**
7521 * Position an element relative some reference element using Popper.js
7522 *
7523 * @param referenceElement
7524 * @param popperElement
7525 * @param {object} options
7526 * @param {object=} options.modifiers Popper.js modifiers
7527 * @param {boolean=} options.enabled toggle the popper functionality on/off
7528 * @param {string=} options.placement The popper element placement relative to the reference element
7529 * @param {string=} options.strategy the positioning strategy
7530 * @param {function=} options.onCreate called when the popper is created
7531 * @param {function=} options.onUpdate called when the popper is updated
7532 *
7533 * @returns {UsePopperState} The popper state
7534 */
7535function usePopper(referenceElement, popperElement, _ref = {}) {
7536 let {
7537 enabled = true,
7538 placement = 'bottom',
7539 strategy = 'absolute',
7540 modifiers = EMPTY_MODIFIERS
7541 } = _ref,
7542 config = usePopper_objectWithoutPropertiesLoose(_ref, usePopper_excluded);
7543 const prevModifiers = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(modifiers);
7544 const popperInstanceRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
7545 const update = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => {
7546 var _popperInstanceRef$cu;
7547 (_popperInstanceRef$cu = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu.update();
7548 }, []);
7549 const forceUpdate = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => {
7550 var _popperInstanceRef$cu2;
7551 (_popperInstanceRef$cu2 = popperInstanceRef.current) == null ? void 0 : _popperInstanceRef$cu2.forceUpdate();
7552 }, []);
7553 const [popperState, setState] = esm_useSafeState((0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
7554 placement,
7555 update,
7556 forceUpdate,
7557 attributes: {},
7558 styles: {
7559 popper: {},
7560 arrow: {}
7561 }
7562 }));
7563 const updateModifier = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
7564 name: 'updateStateModifier',
7565 enabled: true,
7566 phase: 'write',
7567 requires: ['computeStyles'],
7568 fn: ({
7569 state
7570 }) => {
7571 const styles = {};
7572 const attributes = {};
7573 Object.keys(state.elements).forEach(element => {
7574 styles[element] = state.styles[element];
7575 attributes[element] = state.attributes[element];
7576 });
7577 setState({
7578 state,
7579 styles,
7580 attributes,
7581 update,
7582 forceUpdate,
7583 placement: state.placement
7584 });
7585 }
7586 }), [update, forceUpdate, setState]);
7587 const nextModifiers = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
7588 if (!dequal(prevModifiers.current, modifiers)) {
7589 prevModifiers.current = modifiers;
7590 }
7591 return prevModifiers.current;
7592 }, [modifiers]);
7593 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
7594 if (!popperInstanceRef.current || !enabled) return;
7595 popperInstanceRef.current.setOptions({
7596 placement,
7597 strategy,
7598 modifiers: [...nextModifiers, updateModifier, disabledApplyStylesModifier]
7599 });
7600 }, [strategy, placement, updateModifier, enabled, nextModifiers]);
7601 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
7602 if (!enabled || referenceElement == null || popperElement == null) {
7603 return undefined;
7604 }
7605 popperInstanceRef.current = popper_createPopper(referenceElement, popperElement, Object.assign({}, config, {
7606 placement,
7607 strategy,
7608 modifiers: [...nextModifiers, ariaDescribedByModifier, updateModifier]
7609 }));
7610 return () => {
7611 if (popperInstanceRef.current != null) {
7612 popperInstanceRef.current.destroy();
7613 popperInstanceRef.current = undefined;
7614 setState(s => Object.assign({}, s, {
7615 attributes: {},
7616 styles: {
7617 popper: {}
7618 }
7619 }));
7620 }
7621 };
7622 // This is only run once to _create_ the popper
7623 // eslint-disable-next-line react-hooks/exhaustive-deps
7624 }, [enabled, referenceElement, popperElement]);
7625 return popperState;
7626}
7627/* harmony default export */ const esm_usePopper = (usePopper);
7628;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/contains.js
7629/* eslint-disable no-bitwise, no-cond-assign */
7630
7631/**
7632 * Checks if an element contains another given element.
7633 *
7634 * @param context the context element
7635 * @param node the element to check
7636 */
7637function contains_contains(context, node) {
7638 // HTML DOM and SVG DOM may have different support levels,
7639 // so we need to check on context instead of a document root element.
7640 if (context.contains) return context.contains(node);
7641 if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16);
7642}
7643// EXTERNAL MODULE: ./node_modules/warning/warning.js
7644var warning = __webpack_require__(459);
7645var warning_default = /*#__PURE__*/__webpack_require__.n(warning);
7646;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/useClickOutside.js
7647
7648
7649
7650
7651
7652
7653const useClickOutside_noop = () => {};
7654function isLeftClickEvent(event) {
7655 return event.button === 0;
7656}
7657function isModifiedEvent(event) {
7658 return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
7659}
7660const getRefTarget = ref => ref && ('current' in ref ? ref.current : ref);
7661const InitialTriggerEvents = {
7662 click: 'mousedown',
7663 mouseup: 'mousedown',
7664 pointerup: 'pointerdown'
7665};
7666
7667/**
7668 * The `useClickOutside` hook registers your callback on the document that fires
7669 * when a pointer event is registered outside of the provided ref or element.
7670 *
7671 * @param {Ref<HTMLElement>| HTMLElement} ref The element boundary
7672 * @param {function} onClickOutside
7673 * @param {object=} options
7674 * @param {boolean=} options.disabled
7675 * @param {string=} options.clickTrigger The DOM event name (click, mousedown, etc) to attach listeners on
7676 */
7677function useClickOutside(ref, onClickOutside = useClickOutside_noop, {
7678 disabled,
7679 clickTrigger = 'click'
7680} = {}) {
7681 const preventMouseClickOutsideRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
7682 const waitingForTrigger = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
7683 const handleMouseCapture = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(e => {
7684 const currentTarget = getRefTarget(ref);
7685 warning_default()(!!currentTarget, 'ClickOutside captured a close event but does not have a ref to compare it to. ' + 'useClickOutside(), should be passed a ref that resolves to a DOM node');
7686 preventMouseClickOutsideRef.current = !currentTarget || isModifiedEvent(e) || !isLeftClickEvent(e) || !!contains_contains(currentTarget, e.target) || waitingForTrigger.current;
7687 waitingForTrigger.current = false;
7688 }, [ref]);
7689 const handleInitialMouse = useEventCallback(e => {
7690 const currentTarget = getRefTarget(ref);
7691 if (currentTarget && contains_contains(currentTarget, e.target)) {
7692 waitingForTrigger.current = true;
7693 }
7694 });
7695 const handleMouse = useEventCallback(e => {
7696 if (!preventMouseClickOutsideRef.current) {
7697 onClickOutside(e);
7698 }
7699 });
7700 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
7701 var _ownerWindow$event, _ownerWindow$parent;
7702 if (disabled || ref == null) return undefined;
7703 const doc = ownerDocument(getRefTarget(ref));
7704 const ownerWindow = doc.defaultView || window;
7705
7706 // Store the current event to avoid triggering handlers immediately
7707 // For things rendered in an iframe, the event might originate on the parent window
7708 // so we should fall back to that global event if the local one doesn't exist
7709 // https://github.com/facebook/react/issues/20074
7710 let currentEvent = (_ownerWindow$event = ownerWindow.event) != null ? _ownerWindow$event : (_ownerWindow$parent = ownerWindow.parent) == null ? void 0 : _ownerWindow$parent.event;
7711 let removeInitialTriggerListener = null;
7712 if (InitialTriggerEvents[clickTrigger]) {
7713 removeInitialTriggerListener = esm_listen(doc, InitialTriggerEvents[clickTrigger], handleInitialMouse, true);
7714 }
7715
7716 // Use capture for this listener so it fires before React's listener, to
7717 // avoid false positives in the contains() check below if the target DOM
7718 // element is removed in the React mouse callback.
7719 const removeMouseCaptureListener = esm_listen(doc, clickTrigger, handleMouseCapture, true);
7720 const removeMouseListener = esm_listen(doc, clickTrigger, e => {
7721 // skip if this event is the same as the one running when we added the handlers
7722 if (e === currentEvent) {
7723 currentEvent = undefined;
7724 return;
7725 }
7726 handleMouse(e);
7727 });
7728 let mobileSafariHackListeners = [];
7729 if ('ontouchstart' in doc.documentElement) {
7730 mobileSafariHackListeners = [].slice.call(doc.body.children).map(el => esm_listen(el, 'mousemove', useClickOutside_noop));
7731 }
7732 return () => {
7733 removeInitialTriggerListener == null ? void 0 : removeInitialTriggerListener();
7734 removeMouseCaptureListener();
7735 removeMouseListener();
7736 mobileSafariHackListeners.forEach(remove => remove());
7737 };
7738 }, [ref, disabled, clickTrigger, handleMouseCapture, handleInitialMouse, handleMouse]);
7739}
7740/* harmony default export */ const esm_useClickOutside = (useClickOutside);
7741;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/mergeOptionsWithPopperConfig.js
7742function toModifierMap(modifiers) {
7743 const result = {};
7744 if (!Array.isArray(modifiers)) {
7745 return modifiers || result;
7746 }
7747
7748 // eslint-disable-next-line no-unused-expressions
7749 modifiers == null ? void 0 : modifiers.forEach(m => {
7750 result[m.name] = m;
7751 });
7752 return result;
7753}
7754function toModifierArray(map = {}) {
7755 if (Array.isArray(map)) return map;
7756 return Object.keys(map).map(k => {
7757 map[k].name = k;
7758 return map[k];
7759 });
7760}
7761function mergeOptionsWithPopperConfig({
7762 enabled,
7763 enableEvents,
7764 placement,
7765 flip,
7766 offset,
7767 fixed,
7768 containerPadding,
7769 arrowElement,
7770 popperConfig = {}
7771}) {
7772 var _modifiers$eventListe, _modifiers$preventOve, _modifiers$preventOve2, _modifiers$offset, _modifiers$arrow;
7773 const modifiers = toModifierMap(popperConfig.modifiers);
7774 return Object.assign({}, popperConfig, {
7775 placement,
7776 enabled,
7777 strategy: fixed ? 'fixed' : popperConfig.strategy,
7778 modifiers: toModifierArray(Object.assign({}, modifiers, {
7779 eventListeners: {
7780 enabled: enableEvents,
7781 options: (_modifiers$eventListe = modifiers.eventListeners) == null ? void 0 : _modifiers$eventListe.options
7782 },
7783 preventOverflow: Object.assign({}, modifiers.preventOverflow, {
7784 options: containerPadding ? Object.assign({
7785 padding: containerPadding
7786 }, (_modifiers$preventOve = modifiers.preventOverflow) == null ? void 0 : _modifiers$preventOve.options) : (_modifiers$preventOve2 = modifiers.preventOverflow) == null ? void 0 : _modifiers$preventOve2.options
7787 }),
7788 offset: {
7789 options: Object.assign({
7790 offset
7791 }, (_modifiers$offset = modifiers.offset) == null ? void 0 : _modifiers$offset.options)
7792 },
7793 arrow: Object.assign({}, modifiers.arrow, {
7794 enabled: !!arrowElement,
7795 options: Object.assign({}, (_modifiers$arrow = modifiers.arrow) == null ? void 0 : _modifiers$arrow.options, {
7796 element: arrowElement
7797 })
7798 }),
7799 flip: Object.assign({
7800 enabled: !!flip
7801 }, modifiers.flip)
7802 }))
7803 });
7804}
7805;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/DropdownMenu.js
7806const DropdownMenu_excluded = ["children"];
7807function DropdownMenu_objectWithoutPropertiesLoose(source, excluded) {
7808 if (source == null) return {};
7809 var target = {};
7810 var sourceKeys = Object.keys(source);
7811 var key, i;
7812 for (i = 0; i < sourceKeys.length; i++) {
7813 key = sourceKeys[i];
7814 if (excluded.indexOf(key) >= 0) continue;
7815 target[key] = source[key];
7816 }
7817 return target;
7818}
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828const DropdownMenu_noop = () => {};
7829
7830/**
7831 * @memberOf Dropdown
7832 * @param {object} options
7833 * @param {boolean} options.flip Automatically adjust the menu `drop` position based on viewport edge detection
7834 * @param {[number, number]} options.offset Define an offset distance between the Menu and the Toggle
7835 * @param {boolean} options.show Display the menu manually, ignored in the context of a `Dropdown`
7836 * @param {boolean} options.usePopper opt in/out of using PopperJS to position menus. When disabled you must position it yourself.
7837 * @param {string} options.rootCloseEvent The pointer event to listen for when determining "clicks outside" the menu for triggering a close.
7838 * @param {object} options.popperConfig Options passed to the [`usePopper`](/api/usePopper) hook.
7839 */
7840function useDropdownMenu(options = {}) {
7841 const context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_DropdownContext);
7842 const [arrowElement, attachArrowRef] = useCallbackRef();
7843 const hasShownRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
7844 const {
7845 flip,
7846 offset,
7847 rootCloseEvent,
7848 fixed = false,
7849 placement: placementOverride,
7850 popperConfig = {},
7851 enableEventListeners = true,
7852 usePopper: shouldUsePopper = !!context
7853 } = options;
7854 const show = (context == null ? void 0 : context.show) == null ? !!options.show : context.show;
7855 if (show && !hasShownRef.current) {
7856 hasShownRef.current = true;
7857 }
7858 const handleClose = e => {
7859 context == null ? void 0 : context.toggle(false, e);
7860 };
7861 const {
7862 placement,
7863 setMenu,
7864 menuElement,
7865 toggleElement
7866 } = context || {};
7867 const popper = esm_usePopper(toggleElement, menuElement, mergeOptionsWithPopperConfig({
7868 placement: placementOverride || placement || 'bottom-start',
7869 enabled: shouldUsePopper,
7870 enableEvents: enableEventListeners == null ? show : enableEventListeners,
7871 offset,
7872 flip,
7873 fixed,
7874 arrowElement,
7875 popperConfig
7876 }));
7877 const menuProps = Object.assign({
7878 ref: setMenu || DropdownMenu_noop,
7879 'aria-labelledby': toggleElement == null ? void 0 : toggleElement.id
7880 }, popper.attributes.popper, {
7881 style: popper.styles.popper
7882 });
7883 const metadata = {
7884 show,
7885 placement,
7886 hasShown: hasShownRef.current,
7887 toggle: context == null ? void 0 : context.toggle,
7888 popper: shouldUsePopper ? popper : null,
7889 arrowProps: shouldUsePopper ? Object.assign({
7890 ref: attachArrowRef
7891 }, popper.attributes.arrow, {
7892 style: popper.styles.arrow
7893 }) : {}
7894 };
7895 esm_useClickOutside(menuElement, handleClose, {
7896 clickTrigger: rootCloseEvent,
7897 disabled: !show
7898 });
7899 return [menuProps, metadata];
7900}
7901const defaultProps = {
7902 usePopper: true
7903};
7904/**
7905 * Also exported as `<Dropdown.Menu>` from `Dropdown`.
7906 *
7907 * @displayName DropdownMenu
7908 * @memberOf Dropdown
7909 */
7910function DropdownMenu(_ref) {
7911 let {
7912 children
7913 } = _ref,
7914 options = DropdownMenu_objectWithoutPropertiesLoose(_ref, DropdownMenu_excluded);
7915 const [props, meta] = useDropdownMenu(options);
7916 return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
7917 children: children(props, meta)
7918 });
7919}
7920DropdownMenu.displayName = 'DropdownMenu';
7921DropdownMenu.defaultProps = defaultProps;
7922
7923/** @component */
7924/* harmony default export */ const esm_DropdownMenu = (DropdownMenu);
7925;// CONCATENATED MODULE: ./node_modules/@react-aria/ssr/dist/import.mjs
7926
7927
7928/*
7929 * Copyright 2020 Adobe. All rights reserved.
7930 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
7931 * you may not use this file except in compliance with the License. You may obtain a copy
7932 * of the License at http://www.apache.org/licenses/LICENSE-2.0
7933 *
7934 * Unless required by applicable law or agreed to in writing, software distributed under
7935 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
7936 * OF ANY KIND, either express or implied. See the License for the specific language
7937 * governing permissions and limitations under the License.
7938 */ /*
7939 * Copyright 2020 Adobe. All rights reserved.
7940 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
7941 * you may not use this file except in compliance with the License. You may obtain a copy
7942 * of the License at http://www.apache.org/licenses/LICENSE-2.0
7943 *
7944 * Unless required by applicable law or agreed to in writing, software distributed under
7945 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
7946 * OF ANY KIND, either express or implied. See the License for the specific language
7947 * governing permissions and limitations under the License.
7948 */ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is
7949// guarded by a check that it only runs on the client side.
7950// eslint-disable-next-line rulesdir/useLayoutEffectRule
7951
7952// Default context value to use in case there is no SSRProvider. This is fine for
7953// client-only apps. In order to support multiple copies of React Aria potentially
7954// being on the page at once, the prefix is set to a random number. SSRProvider
7955// will reset this to zero for consistency between server and client, so in the
7956// SSR case multiple copies of React Aria is not supported.
7957const $704cf1d3b684cc5c$var$defaultContext = {
7958 prefix: String(Math.round(Math.random() * 10000000000)),
7959 current: 0,
7960 isSSR: false
7961};
7962const $704cf1d3b684cc5c$var$SSRContext = /*#__PURE__*/ (0, external_root_React_commonjs2_react_commonjs_react_amd_react_).createContext($704cf1d3b684cc5c$var$defaultContext);
7963function $704cf1d3b684cc5c$export$9f8ac96af4b1b2ae(props) {
7964 let cur = (0, external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)($704cf1d3b684cc5c$var$SSRContext);
7965 let counter = $704cf1d3b684cc5c$var$useCounter(cur === $704cf1d3b684cc5c$var$defaultContext);
7966 let [isSSR, setIsSSR] = (0, external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(true);
7967 let value = (0, external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(()=>({
7968 // If this is the first SSRProvider, start with an empty string prefix, otherwise
7969 // append and increment the counter.
7970 prefix: cur === $704cf1d3b684cc5c$var$defaultContext ? "" : `${cur.prefix}-${counter}`,
7971 current: 0,
7972 isSSR: isSSR
7973 }), [
7974 cur,
7975 counter,
7976 isSSR
7977 ]);
7978 // If on the client, and the component was initially server rendered,
7979 // then schedule a layout effect to update the component after hydration.
7980 if (typeof window !== "undefined") // This if statement technically breaks the rules of hooks, but is safe
7981 // because the condition never changes after mounting.
7982 // eslint-disable-next-line react-hooks/rules-of-hooks
7983 (0, external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(()=>{
7984 setIsSSR(false);
7985 }, []);
7986 return /*#__PURE__*/ (0, external_root_React_commonjs2_react_commonjs_react_amd_react_).createElement($704cf1d3b684cc5c$var$SSRContext.Provider, {
7987 value: value
7988 }, props.children);
7989}
7990let $704cf1d3b684cc5c$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
7991let $704cf1d3b684cc5c$var$componentIds = new WeakMap();
7992function $704cf1d3b684cc5c$var$useCounter(isDisabled = false) {
7993 let ctx = (0, external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)($704cf1d3b684cc5c$var$SSRContext);
7994 let ref = (0, external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
7995 if (ref.current === null && !isDisabled) {
7996 var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner;
7997 // In strict mode, React renders components twice, and the ref will be reset to null on the second render.
7998 // This means our id counter will be incremented twice instead of once. This is a problem because on the
7999 // server, components are only rendered once and so ids generated on the server won't match the client.
8000 // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this
8001 // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.
8002 // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.
8003 // To ensure that we only increment the global counter once, we store the starting id for this component in
8004 // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.
8005 // Since React runs the second render immediately after the first, this is safe.
8006 // @ts-ignore
8007 let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (0, external_root_React_commonjs2_react_commonjs_react_amd_react_).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;
8008 if (currentOwner) {
8009 let prevComponentValue = $704cf1d3b684cc5c$var$componentIds.get(currentOwner);
8010 if (prevComponentValue == null) // On the first render, and first call to useId, store the id and state in our weak map.
8011 $704cf1d3b684cc5c$var$componentIds.set(currentOwner, {
8012 id: ctx.current,
8013 state: currentOwner.memoizedState
8014 });
8015 else if (currentOwner.memoizedState !== prevComponentValue.state) {
8016 // On the second render, the memoizedState gets reset by React.
8017 // Reset the counter, and remove from the weak map so we don't
8018 // do this for subsequent useId calls.
8019 ctx.current = prevComponentValue.id;
8020 $704cf1d3b684cc5c$var$componentIds.delete(currentOwner);
8021 }
8022 }
8023 ref.current = ++ctx.current;
8024 }
8025 return ref.current;
8026}
8027function $704cf1d3b684cc5c$export$619500959fc48b26(defaultId) {
8028 let ctx = (0, external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)($704cf1d3b684cc5c$var$SSRContext);
8029 // If we are rendering in a non-DOM environment, and there's no SSRProvider,
8030 // provide a warning to hint to the developer to add one.
8031 if (ctx === $704cf1d3b684cc5c$var$defaultContext && !$704cf1d3b684cc5c$var$canUseDOM) console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
8032 let counter = $704cf1d3b684cc5c$var$useCounter(!!defaultId);
8033 return defaultId || `react-aria${ctx.prefix}-${counter}`;
8034}
8035function $704cf1d3b684cc5c$export$535bd6ca7f90a273() {
8036 let cur = (0, $89yE2$useContext)($704cf1d3b684cc5c$var$SSRContext);
8037 return cur.isSSR;
8038}
8039
8040
8041
8042
8043
8044//# sourceMappingURL=module.js.map
8045
8046;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/DropdownToggle.js
8047
8048
8049
8050
8051
8052
8053const isRoleMenu = el => {
8054 var _el$getAttribute;
8055 return ((_el$getAttribute = el.getAttribute('role')) == null ? void 0 : _el$getAttribute.toLowerCase()) === 'menu';
8056};
8057const DropdownToggle_noop = () => {};
8058
8059/**
8060 * Wires up Dropdown toggle functionality, returning a set a props to attach
8061 * to the element that functions as the dropdown toggle (generally a button).
8062 *
8063 * @memberOf Dropdown
8064 */
8065function useDropdownToggle() {
8066 const id = $704cf1d3b684cc5c$export$619500959fc48b26();
8067 const {
8068 show = false,
8069 toggle = DropdownToggle_noop,
8070 setToggle,
8071 menuElement
8072 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_DropdownContext) || {};
8073 const handleClick = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(e => {
8074 toggle(!show, e);
8075 }, [show, toggle]);
8076 const props = {
8077 id,
8078 ref: setToggle || DropdownToggle_noop,
8079 onClick: handleClick,
8080 'aria-expanded': !!show
8081 };
8082
8083 // This is maybe better down in an effect, but
8084 // the component is going to update anyway when the menu element
8085 // is set so might return new props.
8086 if (menuElement && isRoleMenu(menuElement)) {
8087 props['aria-haspopup'] = true;
8088 }
8089 return [props, {
8090 show,
8091 toggle
8092 }];
8093}
8094/**
8095 * Also exported as `<Dropdown.Toggle>` from `Dropdown`.
8096 *
8097 * @displayName DropdownToggle
8098 * @memberOf Dropdown
8099 */
8100function DropdownToggle({
8101 children
8102}) {
8103 const [props, meta] = useDropdownToggle();
8104 return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
8105 children: children(props, meta)
8106 });
8107}
8108DropdownToggle.displayName = 'DropdownToggle';
8109
8110/** @component */
8111/* harmony default export */ const esm_DropdownToggle = (DropdownToggle);
8112;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/SelectableContext.js
8113
8114const SelectableContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
8115const makeEventKey = (eventKey, href = null) => {
8116 if (eventKey != null) return String(eventKey);
8117 return href || null;
8118};
8119/* harmony default export */ const esm_SelectableContext = (SelectableContext);
8120;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/NavContext.js
8121
8122const NavContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
8123NavContext.displayName = 'NavContext';
8124/* harmony default export */ const esm_NavContext = (NavContext);
8125;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/DataKey.js
8126const ATTRIBUTE_PREFIX = `data-rr-ui-`;
8127const PROPERTY_PREFIX = `rrUi`;
8128function dataAttr(property) {
8129 return `${ATTRIBUTE_PREFIX}${property}`;
8130}
8131function dataProp(property) {
8132 return `${PROPERTY_PREFIX}${property}`;
8133}
8134;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/DropdownItem.js
8135const DropdownItem_excluded = ["eventKey", "disabled", "onClick", "active", "as"];
8136function DropdownItem_objectWithoutPropertiesLoose(source, excluded) {
8137 if (source == null) return {};
8138 var target = {};
8139 var sourceKeys = Object.keys(source);
8140 var key, i;
8141 for (i = 0; i < sourceKeys.length; i++) {
8142 key = sourceKeys[i];
8143 if (excluded.indexOf(key) >= 0) continue;
8144 target[key] = source[key];
8145 }
8146 return target;
8147}
8148
8149
8150
8151
8152
8153
8154
8155
8156/**
8157 * Create a dropdown item. Returns a set of props for the dropdown item component
8158 * including an `onClick` handler that prevents selection when the item is disabled
8159 */
8160function useDropdownItem({
8161 key,
8162 href,
8163 active,
8164 disabled,
8165 onClick
8166}) {
8167 const onSelectCtx = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_SelectableContext);
8168 const navContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_NavContext);
8169 const {
8170 activeKey
8171 } = navContext || {};
8172 const eventKey = makeEventKey(key, href);
8173 const isActive = active == null && key != null ? makeEventKey(activeKey) === eventKey : active;
8174 const handleClick = useEventCallback(event => {
8175 if (disabled) return;
8176 onClick == null ? void 0 : onClick(event);
8177 if (onSelectCtx && !event.isPropagationStopped()) {
8178 onSelectCtx(eventKey, event);
8179 }
8180 });
8181 return [{
8182 onClick: handleClick,
8183 'aria-disabled': disabled || undefined,
8184 'aria-selected': isActive,
8185 [dataAttr('dropdown-item')]: ''
8186 }, {
8187 isActive
8188 }];
8189}
8190const DropdownItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((_ref, ref) => {
8191 let {
8192 eventKey,
8193 disabled,
8194 onClick,
8195 active,
8196 as: Component = esm_Button
8197 } = _ref,
8198 props = DropdownItem_objectWithoutPropertiesLoose(_ref, DropdownItem_excluded);
8199 const [dropdownItemProps] = useDropdownItem({
8200 key: eventKey,
8201 href: props.href,
8202 disabled,
8203 onClick,
8204 active
8205 });
8206 return /*#__PURE__*/(0,jsx_runtime.jsx)(Component, Object.assign({}, props, {
8207 ref: ref
8208 }, dropdownItemProps));
8209});
8210DropdownItem.displayName = 'DropdownItem';
8211/* harmony default export */ const esm_DropdownItem = (DropdownItem);
8212;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/useWindow.js
8213
8214
8215const Context = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)(canUseDOM ? window : undefined);
8216const WindowProvider = Context.Provider;
8217
8218/**
8219 * The document "window" placed in React context. Helpful for determining
8220 * SSR context, or when rendering into an iframe.
8221 *
8222 * @returns the current window
8223 */
8224function useWindow() {
8225 return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(Context);
8226}
8227;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/Dropdown.js
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245function useRefWithUpdate() {
8246 const forceUpdate = useForceUpdate();
8247 const ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
8248 const attachRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(element => {
8249 ref.current = element;
8250 // ensure that a menu set triggers an update for consumers
8251 forceUpdate();
8252 }, [forceUpdate]);
8253 return [ref, attachRef];
8254}
8255
8256/**
8257 * @displayName Dropdown
8258 * @public
8259 */
8260function Dropdown({
8261 defaultShow,
8262 show: rawShow,
8263 onSelect,
8264 onToggle: rawOnToggle,
8265 itemSelector = `* [${dataAttr('dropdown-item')}]`,
8266 focusFirstItemOnShow,
8267 placement = 'bottom-start',
8268 children
8269}) {
8270 const window = useWindow();
8271 const [show, onToggle] = esm_useUncontrolledProp(rawShow, defaultShow, rawOnToggle);
8272
8273 // We use normal refs instead of useCallbackRef in order to populate the
8274 // the value as quickly as possible, otherwise the effect to focus the element
8275 // may run before the state value is set
8276 const [menuRef, setMenu] = useRefWithUpdate();
8277 const menuElement = menuRef.current;
8278 const [toggleRef, setToggle] = useRefWithUpdate();
8279 const toggleElement = toggleRef.current;
8280 const lastShow = usePrevious(show);
8281 const lastSourceEvent = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
8282 const focusInDropdown = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
8283 const onSelectCtx = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_SelectableContext);
8284 const toggle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((nextShow, event, source = event == null ? void 0 : event.type) => {
8285 onToggle(nextShow, {
8286 originalEvent: event,
8287 source
8288 });
8289 }, [onToggle]);
8290 const handleSelect = useEventCallback((key, event) => {
8291 onSelect == null ? void 0 : onSelect(key, event);
8292 toggle(false, event, 'select');
8293 if (!event.isPropagationStopped()) {
8294 onSelectCtx == null ? void 0 : onSelectCtx(key, event);
8295 }
8296 });
8297 const context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
8298 toggle,
8299 placement,
8300 show,
8301 menuElement,
8302 toggleElement,
8303 setMenu,
8304 setToggle
8305 }), [toggle, placement, show, menuElement, toggleElement, setMenu, setToggle]);
8306 if (menuElement && lastShow && !show) {
8307 focusInDropdown.current = menuElement.contains(menuElement.ownerDocument.activeElement);
8308 }
8309 const focusToggle = useEventCallback(() => {
8310 if (toggleElement && toggleElement.focus) {
8311 toggleElement.focus();
8312 }
8313 });
8314 const maybeFocusFirst = useEventCallback(() => {
8315 const type = lastSourceEvent.current;
8316 let focusType = focusFirstItemOnShow;
8317 if (focusType == null) {
8318 focusType = menuRef.current && isRoleMenu(menuRef.current) ? 'keyboard' : false;
8319 }
8320 if (focusType === false || focusType === 'keyboard' && !/^key.+$/.test(type)) {
8321 return;
8322 }
8323 const first = qsa(menuRef.current, itemSelector)[0];
8324 if (first && first.focus) first.focus();
8325 });
8326 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
8327 if (show) maybeFocusFirst();else if (focusInDropdown.current) {
8328 focusInDropdown.current = false;
8329 focusToggle();
8330 }
8331 // only `show` should be changing
8332 }, [show, focusInDropdown, focusToggle, maybeFocusFirst]);
8333 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
8334 lastSourceEvent.current = null;
8335 });
8336 const getNextFocusedChild = (current, offset) => {
8337 if (!menuRef.current) return null;
8338 const items = qsa(menuRef.current, itemSelector);
8339 let index = items.indexOf(current) + offset;
8340 index = Math.max(0, Math.min(index, items.length));
8341 return items[index];
8342 };
8343 useEventListener_useEventListener((0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => window.document, [window]), 'keydown', event => {
8344 var _menuRef$current, _toggleRef$current;
8345 const {
8346 key
8347 } = event;
8348 const target = event.target;
8349 const fromMenu = (_menuRef$current = menuRef.current) == null ? void 0 : _menuRef$current.contains(target);
8350 const fromToggle = (_toggleRef$current = toggleRef.current) == null ? void 0 : _toggleRef$current.contains(target);
8351
8352 // Second only to https://github.com/twbs/bootstrap/blob/8cfbf6933b8a0146ac3fbc369f19e520bd1ebdac/js/src/dropdown.js#L400
8353 // in inscrutability
8354 const isInput = /input|textarea/i.test(target.tagName);
8355 if (isInput && (key === ' ' || key !== 'Escape' && fromMenu || key === 'Escape' && target.type === 'search')) {
8356 return;
8357 }
8358 if (!fromMenu && !fromToggle) {
8359 return;
8360 }
8361 if (key === 'Tab' && (!menuRef.current || !show)) {
8362 return;
8363 }
8364 lastSourceEvent.current = event.type;
8365 const meta = {
8366 originalEvent: event,
8367 source: event.type
8368 };
8369 switch (key) {
8370 case 'ArrowUp':
8371 {
8372 const next = getNextFocusedChild(target, -1);
8373 if (next && next.focus) next.focus();
8374 event.preventDefault();
8375 return;
8376 }
8377 case 'ArrowDown':
8378 event.preventDefault();
8379 if (!show) {
8380 onToggle(true, meta);
8381 } else {
8382 const next = getNextFocusedChild(target, 1);
8383 if (next && next.focus) next.focus();
8384 }
8385 return;
8386 case 'Tab':
8387 // on keydown the target is the element being tabbed FROM, we need that
8388 // to know if this event is relevant to this dropdown (e.g. in this menu).
8389 // On `keyup` the target is the element being tagged TO which we use to check
8390 // if focus has left the menu
8391 esm_addEventListener(target.ownerDocument, 'keyup', e => {
8392 var _menuRef$current2;
8393 if (e.key === 'Tab' && !e.target || !((_menuRef$current2 = menuRef.current) != null && _menuRef$current2.contains(e.target))) {
8394 onToggle(false, meta);
8395 }
8396 }, {
8397 once: true
8398 });
8399 break;
8400 case 'Escape':
8401 if (key === 'Escape') {
8402 event.preventDefault();
8403 event.stopPropagation();
8404 }
8405 onToggle(false, meta);
8406 break;
8407 default:
8408 }
8409 });
8410 return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_SelectableContext.Provider, {
8411 value: handleSelect,
8412 children: /*#__PURE__*/(0,jsx_runtime.jsx)(esm_DropdownContext.Provider, {
8413 value: context,
8414 children: children
8415 })
8416 });
8417}
8418Dropdown.displayName = 'Dropdown';
8419Dropdown.Menu = esm_DropdownMenu;
8420Dropdown.Toggle = esm_DropdownToggle;
8421Dropdown.Item = esm_DropdownItem;
8422/* harmony default export */ const esm_Dropdown = (Dropdown);
8423;// CONCATENATED MODULE: ./src/DropdownContext.ts
8424
8425const DropdownContext_DropdownContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
8426DropdownContext_DropdownContext.displayName = 'DropdownContext';
8427/* harmony default export */ const src_DropdownContext = (DropdownContext_DropdownContext);
8428;// CONCATENATED MODULE: ./src/DropdownDivider.tsx
8429var DropdownDivider_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownDivider.tsx";
8430
8431
8432
8433
8434const DropdownDivider = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
8435 className,
8436 bsPrefix,
8437 as: Component = 'hr',
8438 role = 'separator',
8439 ...props
8440}, ref) => {
8441 bsPrefix = useBootstrapPrefix(bsPrefix, 'dropdown-divider');
8442 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
8443 ref: ref,
8444 className: classnames_default()(className, bsPrefix),
8445 role: role,
8446 ...props
8447 }, void 0, false, {
8448 fileName: DropdownDivider_jsxFileName,
8449 lineNumber: 20,
8450 columnNumber: 7
8451 }, undefined);
8452});
8453DropdownDivider.displayName = 'DropdownDivider';
8454/* harmony default export */ const src_DropdownDivider = (DropdownDivider);
8455;// CONCATENATED MODULE: ./src/DropdownHeader.tsx
8456var DropdownHeader_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownHeader.tsx";
8457
8458
8459
8460
8461const DropdownHeader = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
8462 className,
8463 bsPrefix,
8464 as: Component = 'div',
8465 role = 'heading',
8466 ...props
8467}, ref) => {
8468 bsPrefix = useBootstrapPrefix(bsPrefix, 'dropdown-header');
8469 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
8470 ref: ref,
8471 className: classnames_default()(className, bsPrefix),
8472 role: role,
8473 ...props
8474 }, void 0, false, {
8475 fileName: DropdownHeader_jsxFileName,
8476 lineNumber: 20,
8477 columnNumber: 7
8478 }, undefined);
8479});
8480DropdownHeader.displayName = 'DropdownHeader';
8481/* harmony default export */ const src_DropdownHeader = (DropdownHeader);
8482;// CONCATENATED MODULE: ./src/DropdownItem.tsx
8483var DropdownItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownItem.tsx";
8484
8485
8486
8487
8488
8489
8490
8491const DropdownItem_propTypes = {
8492 /** @default 'dropdown-item' */
8493 bsPrefix: (prop_types_default()).string,
8494 /**
8495 * Highlight the menu item as active.
8496 */
8497 active: (prop_types_default()).bool,
8498 /**
8499 * Disable the menu item, making it unselectable.
8500 */
8501 disabled: (prop_types_default()).bool,
8502 /**
8503 * Value passed to the `onSelect` handler, useful for identifying the selected menu item.
8504 */
8505 eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
8506 /**
8507 * HTML `href` attribute corresponding to `a.href`.
8508 */
8509 href: (prop_types_default()).string,
8510 /**
8511 * Callback fired when the menu item is clicked.
8512 */
8513 onClick: (prop_types_default()).func,
8514 as: (prop_types_default()).elementType
8515};
8516const DropdownItem_DropdownItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
8517 bsPrefix,
8518 className,
8519 eventKey,
8520 disabled = false,
8521 onClick,
8522 active,
8523 as: Component = esm_Anchor,
8524 ...props
8525}, ref) => {
8526 const prefix = useBootstrapPrefix(bsPrefix, 'dropdown-item');
8527 const [dropdownItemProps, meta] = useDropdownItem({
8528 key: eventKey,
8529 href: props.href,
8530 disabled,
8531 onClick,
8532 active
8533 });
8534 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
8535 ...props,
8536 ...dropdownItemProps,
8537 ref: ref,
8538 className: classnames_default()(className, prefix, meta.isActive && 'active', disabled && 'disabled')
8539 }, void 0, false, {
8540 fileName: DropdownItem_jsxFileName,
8541 lineNumber: 73,
8542 columnNumber: 9
8543 }, undefined);
8544});
8545DropdownItem_DropdownItem.displayName = 'DropdownItem';
8546DropdownItem_DropdownItem.propTypes = DropdownItem_propTypes;
8547/* harmony default export */ const src_DropdownItem = (DropdownItem_DropdownItem);
8548;// CONCATENATED MODULE: ./src/DropdownItemText.tsx
8549var DropdownItemText_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownItemText.tsx";
8550
8551
8552
8553
8554const DropdownItemText = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
8555 className,
8556 bsPrefix,
8557 as: Component = 'span',
8558 ...props
8559}, ref) => {
8560 bsPrefix = useBootstrapPrefix(bsPrefix, 'dropdown-item-text');
8561 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
8562 ref: ref,
8563 className: classnames_default()(className, bsPrefix),
8564 ...props
8565 }, void 0, false, {
8566 fileName: DropdownItemText_jsxFileName,
8567 lineNumber: 17,
8568 columnNumber: 7
8569 }, undefined);
8570});
8571DropdownItemText.displayName = 'DropdownItemText';
8572/* harmony default export */ const src_DropdownItemText = (DropdownItemText);
8573;// CONCATENATED MODULE: ./src/InputGroupContext.tsx
8574
8575const InputGroupContext_context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
8576InputGroupContext_context.displayName = 'InputGroupContext';
8577/* harmony default export */ const InputGroupContext = (InputGroupContext_context);
8578;// CONCATENATED MODULE: ./src/NavbarContext.tsx
8579
8580
8581// TODO: check
8582
8583const NavbarContext_context = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
8584NavbarContext_context.displayName = 'NavbarContext';
8585/* harmony default export */ const NavbarContext = (NavbarContext_context);
8586;// CONCATENATED MODULE: ./src/useWrappedRefWithWarning.tsx
8587
8588
8589
8590function useWrappedRefWithWarning(ref, componentName) {
8591 // @ts-ignore
8592 if (true) return ref;
8593
8594 // eslint-disable-next-line react-hooks/rules-of-hooks
8595 const warningRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(refValue => {
8596 !(refValue == null || !refValue.isReactComponent) ? false ? 0 : browser_default()(false) : void 0;
8597 }, [componentName]);
8598 // eslint-disable-next-line react-hooks/rules-of-hooks
8599 return esm_useMergedRefs(warningRef, ref);
8600}
8601;// CONCATENATED MODULE: ./src/types.tsx
8602
8603const alignDirection = prop_types_default().oneOf(['start', 'end']);
8604const alignPropType = prop_types_default().oneOfType([alignDirection, prop_types_default().shape({
8605 sm: alignDirection
8606}), prop_types_default().shape({
8607 md: alignDirection
8608}), prop_types_default().shape({
8609 lg: alignDirection
8610}), prop_types_default().shape({
8611 xl: alignDirection
8612}), prop_types_default().shape({
8613 xxl: alignDirection
8614}), (prop_types_default()).object]);
8615;// CONCATENATED MODULE: ./src/DropdownMenu.tsx
8616var DropdownMenu_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownMenu.tsx";
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632const DropdownMenu_propTypes = {
8633 /**
8634 * @default 'dropdown-menu'
8635 */
8636 bsPrefix: (prop_types_default()).string,
8637 /** Controls the visibility of the Dropdown menu */
8638 show: (prop_types_default()).bool,
8639 /** Whether to render the dropdown menu in the DOM before the first time it is shown */
8640 renderOnMount: (prop_types_default()).bool,
8641 /** Have the dropdown switch to it's opposite placement when necessary to stay on screen. */
8642 flip: (prop_types_default()).bool,
8643 /**
8644 * Aligns the dropdown menu to the specified side of the container. You can also align
8645 * the menu responsively for breakpoints starting at `sm` and up. The alignment
8646 * direction will affect the specified breakpoint or larger.
8647 *
8648 * *Note: Using responsive alignment will disable Popper usage for positioning.*
8649 *
8650 * @type {"start"|"end"|{ sm: "start"|"end" }|{ md: "start"|"end" }|{ lg: "start"|"end" }|{ xl: "start"|"end"}|{ xxl: "start"|"end"} }
8651 */
8652 align: alignPropType,
8653 /**
8654 * Which event when fired outside the component will cause it to be closed
8655 *
8656 * *Note: For custom dropdown components, you will have to pass the
8657 * `rootCloseEvent` to `<RootCloseWrapper>` in your custom dropdown menu
8658 * component ([similarly to how it is implemented in `<Dropdown.Menu>`](https://github.com/react-bootstrap/react-bootstrap/blob/v0.31.5/src/DropdownMenu.js#L115-L119)).*
8659 */
8660 rootCloseEvent: prop_types_default().oneOf(['click', 'mousedown']),
8661 /**
8662 * Control the rendering of the DropdownMenu. All non-menu props
8663 * (listed here) are passed through to the `as` Component.
8664 *
8665 * If providing a custom, non DOM, component. the `show`, `close` and `align` props
8666 * are also injected and should be handled appropriately.
8667 */
8668 as: (prop_types_default()).elementType,
8669 /**
8670 * A set of popper options and props passed directly to Popper.
8671 */
8672 popperConfig: (prop_types_default()).object,
8673 /**
8674 * Menu color variant.
8675 *
8676 * Omitting this will use the default light color.
8677 */
8678 variant: (prop_types_default()).string
8679};
8680function getDropdownMenuPlacement(alignEnd, dropDirection, isRTL) {
8681 const topStart = isRTL ? 'top-end' : 'top-start';
8682 const topEnd = isRTL ? 'top-start' : 'top-end';
8683 const bottomStart = isRTL ? 'bottom-end' : 'bottom-start';
8684 const bottomEnd = isRTL ? 'bottom-start' : 'bottom-end';
8685 const leftStart = isRTL ? 'right-start' : 'left-start';
8686 const leftEnd = isRTL ? 'right-end' : 'left-end';
8687 const rightStart = isRTL ? 'left-start' : 'right-start';
8688 const rightEnd = isRTL ? 'left-end' : 'right-end';
8689 let placement = alignEnd ? bottomEnd : bottomStart;
8690 if (dropDirection === 'up') placement = alignEnd ? topEnd : topStart;else if (dropDirection === 'end') placement = alignEnd ? rightEnd : rightStart;else if (dropDirection === 'start') placement = alignEnd ? leftEnd : leftStart;else if (dropDirection === 'down-centered') placement = 'bottom';else if (dropDirection === 'up-centered') placement = 'top';
8691 return placement;
8692}
8693const DropdownMenu_DropdownMenu = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
8694 bsPrefix,
8695 className,
8696 align,
8697 rootCloseEvent,
8698 flip = true,
8699 show: showProps,
8700 renderOnMount,
8701 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
8702 as: Component = 'div',
8703 popperConfig,
8704 variant,
8705 ...props
8706}, ref) => {
8707 let alignEnd = false;
8708 const isNavbar = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NavbarContext);
8709 const prefix = useBootstrapPrefix(bsPrefix, 'dropdown-menu');
8710 const {
8711 align: contextAlign,
8712 drop,
8713 isRTL
8714 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_DropdownContext);
8715 align = align || contextAlign;
8716 const isInputGroup = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(InputGroupContext);
8717 const alignClasses = [];
8718 if (align) {
8719 if (typeof align === 'object') {
8720 const keys = Object.keys(align);
8721 false ? 0 : void 0;
8722 if (keys.length) {
8723 const brkPoint = keys[0];
8724 const direction = align[brkPoint];
8725
8726 // .dropdown-menu-end is required for responsively aligning
8727 // left in addition to align left classes.
8728 alignEnd = direction === 'start';
8729 alignClasses.push(`${prefix}-${brkPoint}-${direction}`);
8730 }
8731 } else if (align === 'end') {
8732 alignEnd = true;
8733 }
8734 }
8735 const placement = getDropdownMenuPlacement(alignEnd, drop, isRTL);
8736 const [menuProps, {
8737 hasShown,
8738 popper,
8739 show,
8740 toggle
8741 }] = useDropdownMenu({
8742 flip,
8743 rootCloseEvent,
8744 show: showProps,
8745 usePopper: !isNavbar && alignClasses.length === 0,
8746 offset: [0, 2],
8747 popperConfig,
8748 placement
8749 });
8750 menuProps.ref = esm_useMergedRefs(useWrappedRefWithWarning(ref, 'DropdownMenu'), menuProps.ref);
8751 useIsomorphicEffect(() => {
8752 // Popper's initial position for the menu is incorrect when
8753 // renderOnMount=true. Need to call update() to correct it.
8754 if (show) popper == null ? void 0 : popper.update();
8755 }, [show]);
8756 if (!hasShown && !renderOnMount && !isInputGroup) return null;
8757
8758 // For custom components provide additional, non-DOM, props;
8759 if (typeof Component !== 'string') {
8760 menuProps.show = show;
8761 menuProps.close = () => toggle == null ? void 0 : toggle(false);
8762 menuProps.align = align;
8763 }
8764 let style = props.style;
8765 if (popper != null && popper.placement) {
8766 // we don't need the default popper style,
8767 // menus are display: none when not shown.
8768 style = {
8769 ...props.style,
8770 ...menuProps.style
8771 };
8772 props['x-placement'] = popper.placement;
8773 }
8774 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
8775 ...props,
8776 ...menuProps,
8777 style: style
8778 // Bootstrap css requires this data attrib to style responsive menus.
8779 ,
8780 ...((alignClasses.length || isNavbar) && {
8781 'data-bs-popper': 'static'
8782 }),
8783 className: classnames_default()(className, prefix, show && 'show', alignEnd && `${prefix}-end`, variant && `${prefix}-${variant}`, ...alignClasses)
8784 }, void 0, false, {
8785 fileName: DropdownMenu_jsxFileName,
8786 lineNumber: 207,
8787 columnNumber: 9
8788 }, undefined);
8789});
8790DropdownMenu_DropdownMenu.displayName = 'DropdownMenu';
8791DropdownMenu_DropdownMenu.propTypes = DropdownMenu_propTypes;
8792/* harmony default export */ const src_DropdownMenu = (DropdownMenu_DropdownMenu);
8793;// CONCATENATED MODULE: ./src/DropdownToggle.tsx
8794var DropdownToggle_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownToggle.tsx";
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806const DropdownToggle_propTypes = {
8807 /**
8808 * @default 'dropdown-toggle'
8809 */
8810 bsPrefix: (prop_types_default()).string,
8811 /**
8812 * An html id attribute, necessary for assistive technologies, such as screen readers.
8813 * @type {string|number}
8814 */
8815 id: (prop_types_default()).string,
8816 split: (prop_types_default()).bool,
8817 as: (prop_types_default()).elementType,
8818 /**
8819 * to passthrough to the underlying button or whatever from DropdownButton
8820 * @private
8821 */
8822 childBsPrefix: (prop_types_default()).string
8823};
8824const DropdownToggle_DropdownToggle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
8825 bsPrefix,
8826 split,
8827 className,
8828 childBsPrefix,
8829 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
8830 as: Component = src_Button,
8831 ...props
8832}, ref) => {
8833 const prefix = useBootstrapPrefix(bsPrefix, 'dropdown-toggle');
8834 const dropdownContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_DropdownContext);
8835 if (childBsPrefix !== undefined) {
8836 props.bsPrefix = childBsPrefix;
8837 }
8838 const [toggleProps] = useDropdownToggle();
8839 toggleProps.ref = esm_useMergedRefs(toggleProps.ref, useWrappedRefWithWarning(ref, 'DropdownToggle'));
8840
8841 // This intentionally forwards size and variant (if set) to the
8842 // underlying component, to allow it to render size and style variants.
8843 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
8844 className: classnames_default()(className, prefix, split && `${prefix}-split`, (dropdownContext == null ? void 0 : dropdownContext.show) && 'show'),
8845 ...toggleProps,
8846 ...props
8847 }, void 0, false, {
8848 fileName: DropdownToggle_jsxFileName,
8849 lineNumber: 81,
8850 columnNumber: 7
8851 }, undefined);
8852});
8853DropdownToggle_DropdownToggle.displayName = 'DropdownToggle';
8854DropdownToggle_DropdownToggle.propTypes = DropdownToggle_propTypes;
8855/* harmony default export */ const src_DropdownToggle = (DropdownToggle_DropdownToggle);
8856;// CONCATENATED MODULE: ./src/Dropdown.tsx
8857var Dropdown_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Dropdown.tsx";
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876const Dropdown_propTypes = {
8877 /** @default 'dropdown' */
8878 bsPrefix: (prop_types_default()).string,
8879 /**
8880 * Determines the direction and location of the Menu in relation to it's Toggle.
8881 */
8882 drop: prop_types_default().oneOf(['up', 'up-centered', 'start', 'end', 'down', 'down-centered']),
8883 as: (prop_types_default()).elementType,
8884 /**
8885 * Aligns the dropdown menu to the specified side of the Dropdown toggle. You can
8886 * also align the menu responsively for breakpoints starting at `sm` and up.
8887 * The alignment direction will affect the specified breakpoint or larger.
8888 *
8889 * *Note: Using responsive alignment will disable Popper usage for positioning.*
8890 *
8891 * @type {"start"|"end"|{ sm: "start"|"end" }|{ md: "start"|"end" }|{ lg: "start"|"end" }|{ xl: "start"|"end"}|{ xxl: "start"|"end"} }
8892 */
8893 align: alignPropType,
8894 /**
8895 * Whether or not the Dropdown is visible.
8896 *
8897 * @controllable onToggle
8898 */
8899 show: (prop_types_default()).bool,
8900 /**
8901 * A callback fired when the Dropdown wishes to change visibility. Called with the requested
8902 * `show` value, the DOM event, and the source that fired it: `'click'`,`'keydown'`,`'rootClose'`, or `'select'`.
8903 *
8904 * ```js
8905 * function(
8906 * nextShow: boolean,
8907 * meta: ToggleMetadata,
8908 * ): void
8909 * ```
8910 *
8911 * @controllable show
8912 */
8913 onToggle: (prop_types_default()).func,
8914 /**
8915 * A callback fired when a menu item is selected.
8916 *
8917 * ```js
8918 * (eventKey: any, event: Object) => any
8919 * ```
8920 */
8921 onSelect: (prop_types_default()).func,
8922 /**
8923 * Controls the focus behavior for when the Dropdown is opened. Set to
8924 * `true` to always focus the first menu item, `keyboard` to focus only when
8925 * navigating via the keyboard, or `false` to disable completely
8926 *
8927 * The Default behavior is `false` **unless** the Menu has a `role="menu"`
8928 * where it will default to `keyboard` to match the recommended [ARIA Authoring practices](https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton).
8929 */
8930 focusFirstItemOnShow: prop_types_default().oneOf([false, true, 'keyboard']),
8931 /** @private */
8932 navbar: (prop_types_default()).bool,
8933 /**
8934 * Controls the auto close behaviour of the dropdown when clicking outside of
8935 * the button or the list.
8936 */
8937 autoClose: prop_types_default().oneOf([true, 'outside', 'inside', false])
8938};
8939const Dropdown_Dropdown = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((pProps, ref) => {
8940 const {
8941 bsPrefix,
8942 drop = 'down',
8943 show,
8944 className,
8945 align = 'start',
8946 onSelect,
8947 onToggle,
8948 focusFirstItemOnShow,
8949 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
8950 as: Component = 'div',
8951 navbar: _4,
8952 autoClose = true,
8953 ...props
8954 } = useUncontrolled(pProps, {
8955 show: 'onToggle'
8956 });
8957 const isInputGroup = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(InputGroupContext);
8958 const prefix = useBootstrapPrefix(bsPrefix, 'dropdown');
8959 const isRTL = useIsRTL();
8960 const isClosingPermitted = source => {
8961 // autoClose=false only permits close on button click
8962 if (autoClose === false) return source === 'click';
8963
8964 // autoClose=inside doesn't permit close on rootClose
8965 if (autoClose === 'inside') return source !== 'rootClose';
8966
8967 // autoClose=outside doesn't permit close on select
8968 if (autoClose === 'outside') return source !== 'select';
8969 return true;
8970 };
8971 const handleToggle = useEventCallback((nextShow, meta) => {
8972 if (meta.originalEvent.currentTarget === document && (meta.source !== 'keydown' || meta.originalEvent.key === 'Escape')) meta.source = 'rootClose';
8973 if (isClosingPermitted(meta.source)) onToggle == null ? void 0 : onToggle(nextShow, meta);
8974 });
8975 const alignEnd = align === 'end';
8976 const placement = getDropdownMenuPlacement(alignEnd, drop, isRTL);
8977 const contextValue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
8978 align,
8979 drop,
8980 isRTL
8981 }), [align, drop, isRTL]);
8982 const directionClasses = {
8983 down: prefix,
8984 'down-centered': `${prefix}-center`,
8985 up: 'dropup',
8986 'up-centered': 'dropup-center dropup',
8987 end: 'dropend',
8988 start: 'dropstart'
8989 };
8990 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_DropdownContext.Provider, {
8991 value: contextValue,
8992 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Dropdown, {
8993 placement: placement,
8994 show: show,
8995 onSelect: onSelect,
8996 onToggle: handleToggle,
8997 focusFirstItemOnShow: focusFirstItemOnShow,
8998 itemSelector: `.${prefix}-item:not(.disabled):not(:disabled)`,
8999 children: isInputGroup ? props.children : /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
9000 ...props,
9001 ref: ref,
9002 className: classnames_default()(className, show && 'show', directionClasses[drop])
9003 }, void 0, false, {
9004 fileName: Dropdown_jsxFileName,
9005 lineNumber: 195,
9006 columnNumber: 13
9007 }, undefined)
9008 }, void 0, false, {
9009 fileName: Dropdown_jsxFileName,
9010 lineNumber: 184,
9011 columnNumber: 9
9012 }, undefined)
9013 }, void 0, false, {
9014 fileName: Dropdown_jsxFileName,
9015 lineNumber: 183,
9016 columnNumber: 7
9017 }, undefined);
9018});
9019Dropdown_Dropdown.displayName = 'Dropdown';
9020Dropdown_Dropdown.propTypes = Dropdown_propTypes;
9021/* harmony default export */ const src_Dropdown = (Object.assign(Dropdown_Dropdown, {
9022 Toggle: src_DropdownToggle,
9023 Menu: src_DropdownMenu,
9024 Item: src_DropdownItem,
9025 ItemText: src_DropdownItemText,
9026 Divider: src_DropdownDivider,
9027 Header: src_DropdownHeader
9028}));
9029;// CONCATENATED MODULE: ./src/DropdownButton.tsx
9030var DropdownButton_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/DropdownButton.tsx";
9031
9032
9033
9034
9035
9036
9037
9038const DropdownButton_propTypes = {
9039 /**
9040 * An html id attribute for the Toggle button, necessary for assistive technologies, such as screen readers.
9041 * @type {string}
9042 */
9043 id: (prop_types_default()).string,
9044 /** An `href` passed to the Toggle component */
9045 href: (prop_types_default()).string,
9046 /** An `onClick` handler passed to the Toggle component */
9047 onClick: (prop_types_default()).func,
9048 /** The content of the non-toggle Button. */
9049 title: (prop_types_default()).node.isRequired,
9050 /** Disables both Buttons */
9051 disabled: (prop_types_default()).bool,
9052 /**
9053 * Aligns the dropdown menu.
9054 *
9055 * _see [DropdownMenu](#dropdown-menu-props) for more details_
9056 *
9057 * @type {"start"|"end"|{ sm: "start"|"end" }|{ md: "start"|"end" }|{ lg: "start"|"end" }|{ xl: "start"|"end"}|{ xxl: "start"|"end"} }
9058 */
9059 align: alignPropType,
9060 /** An ARIA accessible role applied to the Menu component. When set to 'menu', The dropdown */
9061 menuRole: (prop_types_default()).string,
9062 /** Whether to render the dropdown menu in the DOM before the first time it is shown */
9063 renderMenuOnMount: (prop_types_default()).bool,
9064 /**
9065 * Which event when fired outside the component will cause it to be closed.
9066 *
9067 * _see [DropdownMenu](#dropdown-menu-props) for more details_
9068 */
9069 rootCloseEvent: (prop_types_default()).string,
9070 /**
9071 * Menu color variant.
9072 *
9073 * Omitting this will use the default light color.
9074 */
9075 menuVariant: prop_types_default().oneOf(['dark']),
9076 /**
9077 * Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to
9078 * Popper.js's flip [docs](https://popper.js.org/docs/v2/modifiers/flip/).
9079 *
9080 */
9081 flip: (prop_types_default()).bool,
9082 /** @ignore */
9083 bsPrefix: (prop_types_default()).string,
9084 /** @ignore */
9085 variant: (prop_types_default()).string,
9086 /** @ignore */
9087 size: (prop_types_default()).string
9088};
9089
9090/**
9091 * A convenience component for simple or general use dropdowns. Renders a `Button` toggle and all `children`
9092 * are passed directly to the default `Dropdown.Menu`. This component accepts all of
9093 * [`Dropdown`'s props](#dropdown-props).
9094 *
9095 * _All unknown props are passed through to the `Dropdown` component._ Only
9096 * the Button `variant`, `size` and `bsPrefix` props are passed to the toggle,
9097 * along with menu-related props are passed to the `Dropdown.Menu`
9098 */
9099const DropdownButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
9100 title,
9101 children,
9102 bsPrefix,
9103 rootCloseEvent,
9104 variant,
9105 size,
9106 menuRole,
9107 renderMenuOnMount,
9108 disabled,
9109 href,
9110 id,
9111 menuVariant,
9112 flip,
9113 ...props
9114}, ref) => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Dropdown, {
9115 ref: ref,
9116 ...props,
9117 children: [/*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_DropdownToggle, {
9118 id: id,
9119 href: href,
9120 size: size,
9121 variant: variant,
9122 disabled: disabled,
9123 childBsPrefix: bsPrefix,
9124 children: title
9125 }, void 0, false, {
9126 fileName: DropdownButton_jsxFileName,
9127 lineNumber: 118,
9128 columnNumber: 7
9129 }, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_DropdownMenu, {
9130 role: menuRole,
9131 renderOnMount: renderMenuOnMount,
9132 rootCloseEvent: rootCloseEvent,
9133 variant: menuVariant,
9134 flip: flip,
9135 children: children
9136 }, void 0, false, {
9137 fileName: DropdownButton_jsxFileName,
9138 lineNumber: 128,
9139 columnNumber: 7
9140 }, undefined)]
9141}, void 0, true, {
9142 fileName: DropdownButton_jsxFileName,
9143 lineNumber: 117,
9144 columnNumber: 5
9145}, undefined));
9146DropdownButton.displayName = 'DropdownButton';
9147DropdownButton.propTypes = DropdownButton_propTypes;
9148/* harmony default export */ const src_DropdownButton = (DropdownButton);
9149;// CONCATENATED MODULE: ./src/Image.tsx
9150var Image_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Image.tsx";
9151
9152
9153
9154
9155
9156const Image_propTypes = {
9157 /**
9158 * @default 'img'
9159 */
9160 bsPrefix: (prop_types_default()).string,
9161 /**
9162 * Sets image as fluid image.
9163 */
9164 fluid: (prop_types_default()).bool,
9165 /**
9166 * Sets image shape as rounded.
9167 */
9168 rounded: (prop_types_default()).bool,
9169 /**
9170 * Sets image shape as circle.
9171 */
9172 roundedCircle: (prop_types_default()).bool,
9173 /**
9174 * Sets image shape as thumbnail.
9175 */
9176 thumbnail: (prop_types_default()).bool
9177};
9178const Image_Image = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
9179 bsPrefix,
9180 className,
9181 fluid = false,
9182 rounded = false,
9183 roundedCircle = false,
9184 thumbnail = false,
9185 ...props
9186}, ref) => {
9187 bsPrefix = useBootstrapPrefix(bsPrefix, 'img');
9188 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("img", {
9189 // eslint-disable-line jsx-a11y/alt-text
9190 ref: ref,
9191 ...props,
9192 className: classnames_default()(className, fluid && `${bsPrefix}-fluid`, rounded && `rounded`, roundedCircle && `rounded-circle`, thumbnail && `${bsPrefix}-thumbnail`)
9193 }, void 0, false, {
9194 fileName: Image_jsxFileName,
9195 lineNumber: 58,
9196 columnNumber: 7
9197 }, undefined);
9198});
9199Image_Image.displayName = 'Image';
9200Image_Image.propTypes = Image_propTypes;
9201/* harmony default export */ const src_Image = (Image_Image);
9202;// CONCATENATED MODULE: ./src/FigureImage.tsx
9203var FigureImage_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FigureImage.tsx";
9204
9205
9206
9207
9208const FigureImage = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
9209 className,
9210 fluid = true,
9211 ...props
9212}, ref) => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Image, {
9213 ref: ref,
9214 ...props,
9215 fluid: fluid,
9216 className: classnames_default()(className, 'figure-img')
9217}, void 0, false, {
9218 fileName: FigureImage_jsxFileName,
9219 lineNumber: 8,
9220 columnNumber: 5
9221}, undefined));
9222FigureImage.displayName = 'FigureImage';
9223FigureImage.propTypes = Image_propTypes;
9224/* harmony default export */ const src_FigureImage = (FigureImage);
9225;// CONCATENATED MODULE: ./src/FigureCaption.tsx
9226var FigureCaption_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FigureCaption.tsx";
9227
9228
9229
9230
9231const FigureCaption = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
9232 className,
9233 bsPrefix,
9234 as: Component = 'figcaption',
9235 ...props
9236}, ref) => {
9237 bsPrefix = useBootstrapPrefix(bsPrefix, 'figure-caption');
9238 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
9239 ref: ref,
9240 className: classnames_default()(className, bsPrefix),
9241 ...props
9242 }, void 0, false, {
9243 fileName: FigureCaption_jsxFileName,
9244 lineNumber: 17,
9245 columnNumber: 7
9246 }, undefined);
9247});
9248FigureCaption.displayName = 'FigureCaption';
9249/* harmony default export */ const src_FigureCaption = (FigureCaption);
9250;// CONCATENATED MODULE: ./src/Figure.tsx
9251var Figure_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Figure.tsx";
9252
9253
9254
9255
9256
9257
9258const Figure = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
9259 className,
9260 bsPrefix,
9261 as: Component = 'figure',
9262 ...props
9263}, ref) => {
9264 bsPrefix = useBootstrapPrefix(bsPrefix, 'figure');
9265 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
9266 ref: ref,
9267 className: classnames_default()(className, bsPrefix),
9268 ...props
9269 }, void 0, false, {
9270 fileName: Figure_jsxFileName,
9271 lineNumber: 17,
9272 columnNumber: 9
9273 }, undefined);
9274});
9275Figure.displayName = 'Figure';
9276/* harmony default export */ const src_Figure = (Object.assign(Figure, {
9277 Image: src_FigureImage,
9278 Caption: src_FigureCaption
9279}));
9280;// CONCATENATED MODULE: ./src/Feedback.tsx
9281var Feedback_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Feedback.tsx";
9282
9283
9284
9285
9286const Feedback_propTypes = {
9287 /**
9288 * Specify whether the feedback is for valid or invalid fields
9289 *
9290 * @type {('valid'|'invalid')}
9291 */
9292 type: (prop_types_default()).string,
9293 /** Display feedback as a tooltip. */
9294 tooltip: (prop_types_default()).bool,
9295 as: (prop_types_default()).elementType
9296};
9297const Feedback = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(
9298// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
9299({
9300 as: Component = 'div',
9301 className,
9302 type = 'valid',
9303 tooltip = false,
9304 ...props
9305}, ref) => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
9306 ...props,
9307 ref: ref,
9308 className: classnames_default()(className, `${type}-${tooltip ? 'tooltip' : 'feedback'}`)
9309}, void 0, false, {
9310 fileName: Feedback_jsxFileName,
9311 lineNumber: 45,
9312 columnNumber: 7
9313}, undefined));
9314Feedback.displayName = 'Feedback';
9315Feedback.propTypes = Feedback_propTypes;
9316/* harmony default export */ const src_Feedback = (Feedback);
9317;// CONCATENATED MODULE: ./src/FormContext.tsx
9318
9319
9320// TODO
9321
9322const FormContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({});
9323/* harmony default export */ const src_FormContext = (FormContext);
9324;// CONCATENATED MODULE: ./src/FormCheckInput.tsx
9325var FormCheckInput_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormCheckInput.tsx";
9326
9327
9328
9329
9330
9331
9332
9333const FormCheckInput_propTypes = {
9334 /**
9335 * @default 'form-check-input'
9336 */
9337 bsPrefix: (prop_types_default()).string,
9338 /**
9339 * The underlying HTML element to use when rendering the FormCheckInput.
9340 *
9341 * @type {('input'|elementType)}
9342 */
9343 as: (prop_types_default()).elementType,
9344 /** A HTML id attribute, necessary for proper form accessibility. */
9345 id: (prop_types_default()).string,
9346 /** The type of checkable. */
9347 type: prop_types_default().oneOf(['radio', 'checkbox']).isRequired,
9348 /** Manually style the input as valid */
9349 isValid: (prop_types_default()).bool,
9350 /** Manually style the input as invalid */
9351 isInvalid: (prop_types_default()).bool
9352};
9353const FormCheckInput = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
9354 id,
9355 bsPrefix,
9356 className,
9357 type = 'checkbox',
9358 isValid = false,
9359 isInvalid = false,
9360 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
9361 as: Component = 'input',
9362 ...props
9363}, ref) => {
9364 const {
9365 controlId
9366 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext);
9367 bsPrefix = useBootstrapPrefix(bsPrefix, 'form-check-input');
9368 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
9369 ...props,
9370 ref: ref,
9371 type: type,
9372 id: id || controlId,
9373 className: classnames_default()(className, bsPrefix, isValid && 'is-valid', isInvalid && 'is-invalid')
9374 }, void 0, false, {
9375 fileName: FormCheckInput_jsxFileName,
9376 lineNumber: 67,
9377 columnNumber: 7
9378 }, undefined);
9379});
9380FormCheckInput.displayName = 'FormCheckInput';
9381FormCheckInput.propTypes = FormCheckInput_propTypes;
9382/* harmony default export */ const src_FormCheckInput = (FormCheckInput);
9383;// CONCATENATED MODULE: ./src/FormCheckLabel.tsx
9384var FormCheckLabel_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormCheckLabel.tsx";
9385
9386
9387
9388
9389
9390
9391
9392const FormCheckLabel_propTypes = {
9393 /**
9394 * @default 'form-check-label'
9395 */
9396 bsPrefix: (prop_types_default()).string,
9397 /** The HTML for attribute for associating the label with an input */
9398 htmlFor: (prop_types_default()).string
9399};
9400const FormCheckLabel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
9401 bsPrefix,
9402 className,
9403 htmlFor,
9404 ...props
9405}, ref) => {
9406 const {
9407 controlId
9408 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext);
9409 bsPrefix = useBootstrapPrefix(bsPrefix, 'form-check-label');
9410 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("label", {
9411 ...props,
9412 ref: ref,
9413 htmlFor: htmlFor || controlId,
9414 className: classnames_default()(className, bsPrefix)
9415 }, void 0, false, {
9416 fileName: FormCheckLabel_jsxFileName,
9417 lineNumber: 31,
9418 columnNumber: 7
9419 }, undefined);
9420});
9421FormCheckLabel.displayName = 'FormCheckLabel';
9422FormCheckLabel.propTypes = FormCheckLabel_propTypes;
9423/* harmony default export */ const src_FormCheckLabel = (FormCheckLabel);
9424;// CONCATENATED MODULE: ./src/FormCheck.tsx
9425var FormCheck_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormCheck.tsx";
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438const FormCheck_propTypes = {
9439 /**
9440 * @default 'form-check'
9441 */
9442 bsPrefix: (prop_types_default()).string,
9443 /**
9444 * bsPrefix override for the base switch class.
9445 *
9446 * @default 'form-switch'
9447 */
9448 bsSwitchPrefix: (prop_types_default()).string,
9449 /**
9450 * The FormCheck `ref` will be forwarded to the underlying input element,
9451 * which means it will be a DOM node, when resolved.
9452 *
9453 * @type {ReactRef}
9454 * @alias ref
9455 */
9456 _ref: (prop_types_default()).any,
9457 /**
9458 * The underlying HTML element to use when rendering the FormCheck.
9459 *
9460 * @type {('input'|elementType)}
9461 */
9462 as: (prop_types_default()).elementType,
9463 /**
9464 * A HTML id attribute, necessary for proper form accessibility.
9465 * An id is recommended for allowing label clicks to toggle the check control.
9466 *
9467 * This is **required** when `type="switch"` due to how they are rendered.
9468 */
9469 id: (prop_types_default()).string,
9470 /**
9471 * Provide a function child to manually handle the layout of the FormCheck's inner components.
9472 *
9473 * ```jsx
9474 * <FormCheck>
9475 * <FormCheck.Input isInvalid type={radio} />
9476 * <FormCheck.Label>Allow us to contact you?</FormCheck.Label>
9477 * <Feedback type="invalid">Yo this is required</Feedback>
9478 * </FormCheck>
9479 * ```
9480 */
9481 children: (prop_types_default()).node,
9482 /**
9483 * Groups controls horizontally with other `FormCheck`s.
9484 */
9485 inline: (prop_types_default()).bool,
9486 /**
9487 * Put your checkboxes, radios, and switches on the opposite side.
9488 */
9489 reverse: (prop_types_default()).bool,
9490 /**
9491 * Disables the control.
9492 */
9493 disabled: (prop_types_default()).bool,
9494 /**
9495 * `title` attribute for the underlying `FormCheckLabel`.
9496 */
9497 title: (prop_types_default()).string,
9498 /**
9499 * Label for the control.
9500 */
9501 label: (prop_types_default()).node,
9502 /**
9503 * The type of checkable.
9504 * @type {('radio' | 'checkbox' | 'switch')}
9505 */
9506 type: prop_types_default().oneOf(['radio', 'checkbox', 'switch']),
9507 /** Manually style the input as valid */
9508 isValid: (prop_types_default()).bool,
9509 /** Manually style the input as invalid */
9510 isInvalid: (prop_types_default()).bool,
9511 /** Display feedback as a tooltip. */
9512 feedbackTooltip: (prop_types_default()).bool,
9513 /** A message to display when the input is in a validation state */
9514 feedback: (prop_types_default()).node
9515};
9516const FormCheck = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
9517 id,
9518 bsPrefix,
9519 bsSwitchPrefix,
9520 inline = false,
9521 reverse = false,
9522 disabled = false,
9523 isValid = false,
9524 isInvalid = false,
9525 feedbackTooltip = false,
9526 feedback,
9527 feedbackType,
9528 className,
9529 style,
9530 title = '',
9531 type = 'checkbox',
9532 label,
9533 children,
9534 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
9535 as = 'input',
9536 ...props
9537}, ref) => {
9538 bsPrefix = useBootstrapPrefix(bsPrefix, 'form-check');
9539 bsSwitchPrefix = useBootstrapPrefix(bsSwitchPrefix, 'form-switch');
9540 const {
9541 controlId
9542 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext);
9543 const innerFormContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
9544 controlId: id || controlId
9545 }), [controlId, id]);
9546 const hasLabel = !children && label != null && label !== false || hasChildOfType(children, src_FormCheckLabel);
9547 const input = /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_FormCheckInput, {
9548 ...props,
9549 type: type === 'switch' ? 'checkbox' : type,
9550 ref: ref,
9551 isValid: isValid,
9552 isInvalid: isInvalid,
9553 disabled: disabled,
9554 as: as
9555 }, void 0, false, {
9556 fileName: FormCheck_jsxFileName,
9557 lineNumber: 168,
9558 columnNumber: 9
9559 }, undefined);
9560 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_FormContext.Provider, {
9561 value: innerFormContext,
9562 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
9563 style: style,
9564 className: classnames_default()(className, hasLabel && bsPrefix, inline && `${bsPrefix}-inline`, reverse && `${bsPrefix}-reverse`, type === 'switch' && bsSwitchPrefix),
9565 children: children || /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(jsx_dev_runtime.Fragment, {
9566 children: [input, hasLabel && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_FormCheckLabel, {
9567 title: title,
9568 children: label
9569 }, void 0, false, {
9570 fileName: FormCheck_jsxFileName,
9571 lineNumber: 195,
9572 columnNumber: 19
9573 }, undefined), feedback && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Feedback, {
9574 type: feedbackType,
9575 tooltip: feedbackTooltip,
9576 children: feedback
9577 }, void 0, false, {
9578 fileName: FormCheck_jsxFileName,
9579 lineNumber: 198,
9580 columnNumber: 19
9581 }, undefined)]
9582 }, void 0, true)
9583 }, void 0, false, {
9584 fileName: FormCheck_jsxFileName,
9585 lineNumber: 181,
9586 columnNumber: 11
9587 }, undefined)
9588 }, void 0, false, {
9589 fileName: FormCheck_jsxFileName,
9590 lineNumber: 180,
9591 columnNumber: 9
9592 }, undefined);
9593});
9594FormCheck.displayName = 'FormCheck';
9595FormCheck.propTypes = FormCheck_propTypes;
9596/* harmony default export */ const src_FormCheck = (Object.assign(FormCheck, {
9597 Input: src_FormCheckInput,
9598 Label: src_FormCheckLabel
9599}));
9600;// CONCATENATED MODULE: ./src/FormControl.tsx
9601var FormControl_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormControl.tsx";
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611const FormControl_propTypes = {
9612 /**
9613 * @default {'form-control'}
9614 */
9615 bsPrefix: (prop_types_default()).string,
9616 /**
9617 * The FormControl `ref` will be forwarded to the underlying input element,
9618 * which means unless `as` is a composite component,
9619 * it will be a DOM node, when resolved.
9620 *
9621 * @type {ReactRef}
9622 * @alias ref
9623 */
9624 _ref: (prop_types_default()).any,
9625 /**
9626 * Input size variants
9627 *
9628 * @type {('sm'|'lg')}
9629 */
9630 size: (prop_types_default()).string,
9631 /**
9632 * The size attribute of the underlying HTML element.
9633 * Specifies the visible width in characters if `as` is `'input'`.
9634 */
9635 htmlSize: (prop_types_default()).number,
9636 /**
9637 * The underlying HTML element to use when rendering the FormControl.
9638 *
9639 * @type {('input'|'textarea'|elementType)}
9640 */
9641 as: (prop_types_default()).elementType,
9642 /**
9643 * Render the input as plain text. Generally used along side `readOnly`.
9644 */
9645 plaintext: (prop_types_default()).bool,
9646 /** Make the control readonly */
9647 readOnly: (prop_types_default()).bool,
9648 /** Make the control disabled */
9649 disabled: (prop_types_default()).bool,
9650 /**
9651 * The `value` attribute of underlying input
9652 *
9653 * @controllable onChange
9654 * */
9655 value: prop_types_default().oneOfType([(prop_types_default()).string, prop_types_default().arrayOf((prop_types_default()).string), (prop_types_default()).number]),
9656 /** A callback fired when the `value` prop changes */
9657 onChange: (prop_types_default()).func,
9658 /**
9659 * The HTML input `type`, which is only relevant if `as` is `'input'` (the default).
9660 */
9661 type: (prop_types_default()).string,
9662 /**
9663 * Uses `controlId` from `<FormGroup>` if not explicitly specified.
9664 */
9665 id: (prop_types_default()).string,
9666 /** Add "valid" validation styles to the control */
9667 isValid: (prop_types_default()).bool,
9668 /** Add "invalid" validation styles to the control and accompanying label */
9669 isInvalid: (prop_types_default()).bool
9670};
9671const FormControl = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
9672 bsPrefix,
9673 type,
9674 size,
9675 htmlSize,
9676 id,
9677 className,
9678 isValid = false,
9679 isInvalid = false,
9680 plaintext,
9681 readOnly,
9682 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
9683 as: Component = 'input',
9684 ...props
9685}, ref) => {
9686 const {
9687 controlId
9688 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext);
9689 bsPrefix = useBootstrapPrefix(bsPrefix, 'form-control');
9690 false ? 0 : void 0;
9691 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
9692 ...props,
9693 type: type,
9694 size: htmlSize,
9695 ref: ref,
9696 readOnly: readOnly,
9697 id: id || controlId,
9698 className: classnames_default()(className, plaintext ? `${bsPrefix}-plaintext` : bsPrefix, size && `${bsPrefix}-${size}`, type === 'color' && `${bsPrefix}-color`, isValid && 'is-valid', isInvalid && 'is-invalid')
9699 }, void 0, false, {
9700 fileName: FormControl_jsxFileName,
9701 lineNumber: 135,
9702 columnNumber: 9
9703 }, undefined);
9704});
9705FormControl.displayName = 'FormControl';
9706FormControl.propTypes = FormControl_propTypes;
9707/* harmony default export */ const src_FormControl = (Object.assign(FormControl, {
9708 Feedback: src_Feedback
9709}));
9710;// CONCATENATED MODULE: ./src/FormFloating.tsx
9711var FormFloating_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormFloating.tsx";
9712
9713
9714
9715
9716const FormFloating = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
9717 className,
9718 bsPrefix,
9719 as: Component = 'div',
9720 ...props
9721}, ref) => {
9722 bsPrefix = useBootstrapPrefix(bsPrefix, 'form-floating');
9723 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
9724 ref: ref,
9725 className: classnames_default()(className, bsPrefix),
9726 ...props
9727 }, void 0, false, {
9728 fileName: FormFloating_jsxFileName,
9729 lineNumber: 15,
9730 columnNumber: 9
9731 }, undefined);
9732});
9733FormFloating.displayName = 'FormFloating';
9734/* harmony default export */ const src_FormFloating = (FormFloating);
9735;// CONCATENATED MODULE: ./src/FormGroup.tsx
9736var FormGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormGroup.tsx";
9737
9738
9739
9740
9741
9742const FormGroup_propTypes = {
9743 as: (prop_types_default()).elementType,
9744 /**
9745 * Sets `id` on `<FormControl>` and `htmlFor` on `<FormGroup.Label>`.
9746 */
9747 controlId: (prop_types_default()).string,
9748 /**
9749 * The FormGroup `ref` will be forwarded to the underlying element.
9750 * Unless the FormGroup is rendered `as` a composite component,
9751 * it will be a DOM node, when resolved.
9752 *
9753 * @type {ReactRef}
9754 * @alias ref
9755 */
9756 _ref: (prop_types_default()).any
9757};
9758const FormGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
9759 controlId,
9760 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
9761 as: Component = 'div',
9762 ...props
9763}, ref) => {
9764 const context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
9765 controlId
9766 }), [controlId]);
9767 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_FormContext.Provider, {
9768 value: context,
9769 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
9770 ...props,
9771 ref: ref
9772 }, void 0, false, {
9773 fileName: FormGroup_jsxFileName,
9774 lineNumber: 48,
9775 columnNumber: 11
9776 }, undefined)
9777 }, void 0, false, {
9778 fileName: FormGroup_jsxFileName,
9779 lineNumber: 47,
9780 columnNumber: 9
9781 }, undefined);
9782});
9783FormGroup.displayName = 'FormGroup';
9784FormGroup.propTypes = FormGroup_propTypes;
9785/* harmony default export */ const src_FormGroup = (FormGroup);
9786;// CONCATENATED MODULE: ./src/FormLabel.tsx
9787var FormLabel_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormLabel.tsx";
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797const FormLabel_propTypes = {
9798 /**
9799 * @default 'form-label'
9800 */
9801 bsPrefix: (prop_types_default()).string,
9802 /**
9803 * Uses `controlId` from `<FormGroup>` if not explicitly specified.
9804 */
9805 htmlFor: (prop_types_default()).string,
9806 /**
9807 * Renders the FormLabel as a `<Col>` component (accepting all the same props),
9808 * as well as adding additional styling for horizontal forms.
9809 */
9810 column: prop_types_default().oneOfType([(prop_types_default()).bool, prop_types_default().oneOf(['sm', 'lg'])]),
9811 /**
9812 * The FormLabel `ref` will be forwarded to the underlying element.
9813 * Unless the FormLabel is rendered `as` a composite component,
9814 * it will be a DOM node, when resolved.
9815 *
9816 * @type {ReactRef}
9817 * @alias ref
9818 */
9819 _ref: (prop_types_default()).any,
9820 /**
9821 * Hides the label visually while still allowing it to be
9822 * read by assistive technologies.
9823 */
9824 visuallyHidden: (prop_types_default()).bool,
9825 /** Set a custom element for this component */
9826 as: (prop_types_default()).elementType
9827};
9828const FormLabel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
9829 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
9830 as: Component = 'label',
9831 bsPrefix,
9832 column = false,
9833 visuallyHidden = false,
9834 className,
9835 htmlFor,
9836 ...props
9837}, ref) => {
9838 const {
9839 controlId
9840 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext);
9841 bsPrefix = useBootstrapPrefix(bsPrefix, 'form-label');
9842 let columnClass = 'col-form-label';
9843 if (typeof column === 'string') columnClass = `${columnClass} ${columnClass}-${column}`;
9844 const classes = classnames_default()(className, bsPrefix, visuallyHidden && 'visually-hidden', column && columnClass);
9845 false ? 0 : void 0;
9846 htmlFor = htmlFor || controlId;
9847 if (column) return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Col, {
9848 ref: ref,
9849 as: "label",
9850 className: classes,
9851 htmlFor: htmlFor,
9852 ...props
9853 }, void 0, false, {
9854 fileName: FormLabel_jsxFileName,
9855 lineNumber: 104,
9856 columnNumber: 11
9857 }, undefined);
9858 return (
9859 /*#__PURE__*/
9860 // eslint-disable-next-line jsx-a11y/label-has-for, jsx-a11y/label-has-associated-control
9861 (0,jsx_dev_runtime.jsxDEV)(Component, {
9862 ref: ref,
9863 className: classes,
9864 htmlFor: htmlFor,
9865 ...props
9866 }, void 0, false, {
9867 fileName: FormLabel_jsxFileName,
9868 lineNumber: 115,
9869 columnNumber: 9
9870 }, undefined)
9871 );
9872});
9873FormLabel.displayName = 'FormLabel';
9874FormLabel.propTypes = FormLabel_propTypes;
9875/* harmony default export */ const src_FormLabel = (FormLabel);
9876;// CONCATENATED MODULE: ./src/FormRange.tsx
9877var FormRange_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormRange.tsx";
9878
9879
9880
9881
9882
9883
9884
9885const FormRange_propTypes = {
9886 /**
9887 * @default {'form-range'}
9888 */
9889 bsPrefix: (prop_types_default()).string,
9890 /** Make the control disabled */
9891 disabled: (prop_types_default()).bool,
9892 /**
9893 * The `value` attribute of underlying input
9894 *
9895 * @controllable onChange
9896 * */
9897 value: prop_types_default().oneOfType([(prop_types_default()).string, prop_types_default().arrayOf((prop_types_default()).string.isRequired), (prop_types_default()).number]),
9898 /** A callback fired when the `value` prop changes */
9899 onChange: (prop_types_default()).func,
9900 /**
9901 * Uses `controlId` from `<FormGroup>` if not explicitly specified.
9902 */
9903 id: (prop_types_default()).string
9904};
9905const FormRange = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
9906 bsPrefix,
9907 className,
9908 id,
9909 ...props
9910}, ref) => {
9911 const {
9912 controlId
9913 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext);
9914 bsPrefix = useBootstrapPrefix(bsPrefix, 'form-range');
9915 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("input", {
9916 ...props,
9917 type: "range",
9918 ref: ref,
9919 className: classnames_default()(className, bsPrefix),
9920 id: id || controlId
9921 }, void 0, false, {
9922 fileName: FormRange_jsxFileName,
9923 lineNumber: 48,
9924 columnNumber: 7
9925 }, undefined);
9926});
9927FormRange.displayName = 'FormRange';
9928FormRange.propTypes = FormRange_propTypes;
9929/* harmony default export */ const src_FormRange = (FormRange);
9930;// CONCATENATED MODULE: ./src/FormSelect.tsx
9931var FormSelect_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormSelect.tsx";
9932
9933
9934
9935
9936
9937
9938
9939const FormSelect_propTypes = {
9940 /**
9941 * @default {'form-select'}
9942 */
9943 bsPrefix: (prop_types_default()).string,
9944 /**
9945 * Size variants
9946 *
9947 * @type {('sm'|'lg')}
9948 */
9949 size: (prop_types_default()).string,
9950 /**
9951 * The size attribute of the underlying HTML element.
9952 * Specifies the number of visible options.
9953 */
9954 htmlSize: (prop_types_default()).number,
9955 /** Make the control disabled */
9956 disabled: (prop_types_default()).bool,
9957 /**
9958 * The `value` attribute of underlying input
9959 *
9960 * @controllable onChange
9961 * */
9962 value: prop_types_default().oneOfType([(prop_types_default()).string, prop_types_default().arrayOf((prop_types_default()).string), (prop_types_default()).number]),
9963 /** A callback fired when the `value` prop changes */
9964 onChange: (prop_types_default()).func,
9965 /** Add "valid" validation styles to the control */
9966 isValid: (prop_types_default()).bool,
9967 /** Add "invalid" validation styles to the control and accompanying label */
9968 isInvalid: (prop_types_default()).bool
9969};
9970const FormSelect = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
9971 bsPrefix,
9972 size,
9973 htmlSize,
9974 className,
9975 isValid = false,
9976 isInvalid = false,
9977 id,
9978 ...props
9979}, ref) => {
9980 const {
9981 controlId
9982 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_FormContext);
9983 bsPrefix = useBootstrapPrefix(bsPrefix, 'form-select');
9984 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("select", {
9985 ...props,
9986 size: htmlSize,
9987 ref: ref,
9988 className: classnames_default()(className, bsPrefix, size && `${bsPrefix}-${size}`, isValid && `is-valid`, isInvalid && `is-invalid`),
9989 id: id || controlId
9990 }, void 0, false, {
9991 fileName: FormSelect_jsxFileName,
9992 lineNumber: 80,
9993 columnNumber: 9
9994 }, undefined);
9995});
9996FormSelect.displayName = 'FormSelect';
9997FormSelect.propTypes = FormSelect_propTypes;
9998/* harmony default export */ const src_FormSelect = (FormSelect);
9999;// CONCATENATED MODULE: ./src/FormText.tsx
10000var FormText_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FormText.tsx";
10001
10002
10003
10004
10005
10006const FormText_propTypes = {
10007 /** @default 'form-text' */
10008 bsPrefix: (prop_types_default()).string,
10009 /**
10010 * The FormText `ref` will be forwarded to the underlying element.
10011 * Unless the FormText is rendered `as` a composite component,
10012 * it will be a DOM node, when resolved.
10013 *
10014 * @type {ReactRef}
10015 * @alias ref
10016 */
10017 _ref: (prop_types_default()).any,
10018 /**
10019 * A convenience prop for add the `text-muted` class,
10020 * since it's so commonly used here.
10021 */
10022 muted: (prop_types_default()).bool,
10023 as: (prop_types_default()).elementType
10024};
10025const FormText = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(
10026// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
10027({
10028 bsPrefix,
10029 className,
10030 as: Component = 'small',
10031 muted,
10032 ...props
10033}, ref) => {
10034 bsPrefix = useBootstrapPrefix(bsPrefix, 'form-text');
10035 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
10036 ...props,
10037 ref: ref,
10038 className: classnames_default()(className, bsPrefix, muted && 'text-muted')
10039 }, void 0, false, {
10040 fileName: FormText_jsxFileName,
10041 lineNumber: 48,
10042 columnNumber: 9
10043 }, undefined);
10044});
10045FormText.displayName = 'FormText';
10046FormText.propTypes = FormText_propTypes;
10047/* harmony default export */ const src_FormText = (FormText);
10048;// CONCATENATED MODULE: ./src/Switch.tsx
10049var Switch_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Switch.tsx";
10050
10051
10052
10053const Switch = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_FormCheck, {
10054 ...props,
10055 ref: ref,
10056 type: "switch"
10057}, void 0, false, {
10058 fileName: Switch_jsxFileName,
10059 lineNumber: 9,
10060 columnNumber: 5
10061}, undefined));
10062Switch.displayName = 'Switch';
10063/* harmony default export */ const src_Switch = (Object.assign(Switch, {
10064 Input: src_FormCheck.Input,
10065 Label: src_FormCheck.Label
10066}));
10067;// CONCATENATED MODULE: ./src/FloatingLabel.tsx
10068var FloatingLabel_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/FloatingLabel.tsx";
10069
10070
10071
10072
10073
10074
10075const FloatingLabel_propTypes = {
10076 as: (prop_types_default()).elementType,
10077 /**
10078 * Sets `id` on `<FormControl>` and `htmlFor` on `<label>`.
10079 */
10080 controlId: (prop_types_default()).string,
10081 /**
10082 * Form control label.
10083 */
10084 label: (prop_types_default()).node.isRequired
10085};
10086const FloatingLabel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
10087 bsPrefix,
10088 className,
10089 children,
10090 controlId,
10091 label,
10092 ...props
10093}, ref) => {
10094 bsPrefix = useBootstrapPrefix(bsPrefix, 'form-floating');
10095 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_FormGroup, {
10096 ref: ref,
10097 className: classnames_default()(className, bsPrefix),
10098 controlId: controlId,
10099 ...props,
10100 children: [children, /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("label", {
10101 htmlFor: controlId,
10102 children: label
10103 }, void 0, false, {
10104 fileName: FloatingLabel_jsxFileName,
10105 lineNumber: 41,
10106 columnNumber: 11
10107 }, undefined)]
10108 }, void 0, true, {
10109 fileName: FloatingLabel_jsxFileName,
10110 lineNumber: 34,
10111 columnNumber: 9
10112 }, undefined);
10113});
10114FloatingLabel.displayName = 'FloatingLabel';
10115FloatingLabel.propTypes = FloatingLabel_propTypes;
10116/* harmony default export */ const src_FloatingLabel = (FloatingLabel);
10117;// CONCATENATED MODULE: ./src/Form.tsx
10118var Form_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Form.tsx";
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133const Form_propTypes = {
10134 /**
10135 * The Form `ref` will be forwarded to the underlying element,
10136 * which means, unless it's rendered `as` a composite component,
10137 * it will be a DOM node, when resolved.
10138 *
10139 * @type {ReactRef}
10140 * @alias ref
10141 */
10142 _ref: (prop_types_default()).any,
10143 /**
10144 * Mark a form as having been validated. Setting it to `true` will
10145 * toggle any validation styles on the forms elements.
10146 */
10147 validated: (prop_types_default()).bool,
10148 as: (prop_types_default()).elementType
10149};
10150const Form = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
10151 className,
10152 validated,
10153 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
10154 as: Component = 'form',
10155 ...props
10156}, ref) => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
10157 ...props,
10158 ref: ref,
10159 className: classnames_default()(className, validated && 'was-validated')
10160}, void 0, false, {
10161 fileName: Form_jsxFileName,
10162 lineNumber: 53,
10163 columnNumber: 7
10164}, undefined));
10165Form.displayName = 'Form';
10166Form.propTypes = Form_propTypes;
10167/* harmony default export */ const src_Form = (Object.assign(Form, {
10168 Group: src_FormGroup,
10169 Control: src_FormControl,
10170 Floating: src_FormFloating,
10171 Check: src_FormCheck,
10172 Switch: src_Switch,
10173 Label: src_FormLabel,
10174 Text: src_FormText,
10175 Range: src_FormRange,
10176 Select: src_FormSelect,
10177 FloatingLabel: src_FloatingLabel
10178}));
10179;// CONCATENATED MODULE: ./src/InputGroupText.tsx
10180var InputGroupText_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/InputGroupText.tsx";
10181
10182
10183
10184
10185const InputGroupText = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
10186 className,
10187 bsPrefix,
10188 as: Component = 'span',
10189 ...props
10190}, ref) => {
10191 bsPrefix = useBootstrapPrefix(bsPrefix, 'input-group-text');
10192 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
10193 ref: ref,
10194 className: classnames_default()(className, bsPrefix),
10195 ...props
10196 }, void 0, false, {
10197 fileName: InputGroupText_jsxFileName,
10198 lineNumber: 17,
10199 columnNumber: 7
10200 }, undefined);
10201});
10202InputGroupText.displayName = 'InputGroupText';
10203/* harmony default export */ const src_InputGroupText = (InputGroupText);
10204;// CONCATENATED MODULE: ./src/InputGroup.tsx
10205var InputGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/InputGroup.tsx";
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215const InputGroupCheckbox = props => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_InputGroupText, {
10216 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_FormCheckInput, {
10217 type: "checkbox",
10218 ...props
10219 }, void 0, false, {
10220 fileName: InputGroup_jsxFileName,
10221 lineNumber: 15,
10222 columnNumber: 5
10223 }, undefined)
10224}, void 0, false, {
10225 fileName: InputGroup_jsxFileName,
10226 lineNumber: 14,
10227 columnNumber: 3
10228}, undefined);
10229const InputGroupRadio = props => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_InputGroupText, {
10230 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_FormCheckInput, {
10231 type: "radio",
10232 ...props
10233 }, void 0, false, {
10234 fileName: InputGroup_jsxFileName,
10235 lineNumber: 21,
10236 columnNumber: 5
10237 }, undefined)
10238}, void 0, false, {
10239 fileName: InputGroup_jsxFileName,
10240 lineNumber: 20,
10241 columnNumber: 3
10242}, undefined);
10243const InputGroup_propTypes = {
10244 /** @default 'input-group' */
10245 bsPrefix: (prop_types_default()).string,
10246 /**
10247 * Control the size of buttons and form elements from the top-level.
10248 *
10249 * @type {('sm'|'lg')}
10250 */
10251 size: (prop_types_default()).string,
10252 /**
10253 * Handles the input's rounded corners when using form validation.
10254 *
10255 * Use this when your input group contains both an input and feedback element.
10256 */
10257 hasValidation: (prop_types_default()).bool,
10258 as: (prop_types_default()).elementType
10259};
10260const InputGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
10261 bsPrefix,
10262 size,
10263 hasValidation,
10264 className,
10265 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
10266 as: Component = 'div',
10267 ...props
10268}, ref) => {
10269 bsPrefix = useBootstrapPrefix(bsPrefix, 'input-group');
10270
10271 // Intentionally an empty object. Used in detecting if a dropdown
10272 // exists under an input group.
10273 const contextValue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({}), []);
10274 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(InputGroupContext.Provider, {
10275 value: contextValue,
10276 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
10277 ref: ref,
10278 ...props,
10279 className: classnames_default()(className, bsPrefix, size && `${bsPrefix}-${size}`, hasValidation && 'has-validation')
10280 }, void 0, false, {
10281 fileName: InputGroup_jsxFileName,
10282 lineNumber: 75,
10283 columnNumber: 11
10284 }, undefined)
10285 }, void 0, false, {
10286 fileName: InputGroup_jsxFileName,
10287 lineNumber: 74,
10288 columnNumber: 9
10289 }, undefined);
10290});
10291InputGroup.propTypes = InputGroup_propTypes;
10292InputGroup.displayName = 'InputGroup';
10293/* harmony default export */ const src_InputGroup = (Object.assign(InputGroup, {
10294 Text: src_InputGroupText,
10295 Radio: InputGroupRadio,
10296 Checkbox: InputGroupCheckbox
10297}));
10298;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/TabContext.js
10299
10300const TabContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
10301/* harmony default export */ const esm_TabContext = (TabContext);
10302;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/NavItem.js
10303const NavItem_excluded = ["as", "active", "eventKey"];
10304function NavItem_objectWithoutPropertiesLoose(source, excluded) {
10305 if (source == null) return {};
10306 var target = {};
10307 var sourceKeys = Object.keys(source);
10308 var key, i;
10309 for (i = 0; i < sourceKeys.length; i++) {
10310 key = sourceKeys[i];
10311 if (excluded.indexOf(key) >= 0) continue;
10312 target[key] = source[key];
10313 }
10314 return target;
10315}
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325function useNavItem({
10326 key,
10327 onClick,
10328 active,
10329 id,
10330 role,
10331 disabled
10332}) {
10333 const parentOnSelect = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_SelectableContext);
10334 const navContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_NavContext);
10335 const tabContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_TabContext);
10336 let isActive = active;
10337 const props = {
10338 role
10339 };
10340 if (navContext) {
10341 if (!role && navContext.role === 'tablist') props.role = 'tab';
10342 const contextControllerId = navContext.getControllerId(key != null ? key : null);
10343 const contextControlledId = navContext.getControlledId(key != null ? key : null);
10344
10345 // @ts-ignore
10346 props[dataAttr('event-key')] = key;
10347 props.id = contextControllerId || id;
10348 isActive = active == null && key != null ? navContext.activeKey === key : active;
10349
10350 /**
10351 * Simplified scenario for `mountOnEnter`.
10352 *
10353 * While it would make sense to keep 'aria-controls' for tabs that have been mounted at least
10354 * once, it would also complicate the code quite a bit, for very little gain.
10355 * The following implementation is probably good enough.
10356 *
10357 * @see https://github.com/react-restart/ui/pull/40#issuecomment-1009971561
10358 */
10359 if (isActive || !(tabContext != null && tabContext.unmountOnExit) && !(tabContext != null && tabContext.mountOnEnter)) props['aria-controls'] = contextControlledId;
10360 }
10361 if (props.role === 'tab') {
10362 props['aria-selected'] = isActive;
10363 if (!isActive) {
10364 props.tabIndex = -1;
10365 }
10366 if (disabled) {
10367 props.tabIndex = -1;
10368 props['aria-disabled'] = true;
10369 }
10370 }
10371 props.onClick = useEventCallback(e => {
10372 if (disabled) return;
10373 onClick == null ? void 0 : onClick(e);
10374 if (key == null) {
10375 return;
10376 }
10377 if (parentOnSelect && !e.isPropagationStopped()) {
10378 parentOnSelect(key, e);
10379 }
10380 });
10381 return [props, {
10382 isActive
10383 }];
10384}
10385const NavItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((_ref, ref) => {
10386 let {
10387 as: Component = esm_Button,
10388 active,
10389 eventKey
10390 } = _ref,
10391 options = NavItem_objectWithoutPropertiesLoose(_ref, NavItem_excluded);
10392 const [props, meta] = useNavItem(Object.assign({
10393 key: makeEventKey(eventKey, options.href),
10394 active
10395 }, options));
10396
10397 // @ts-ignore
10398 props[dataAttr('active')] = meta.isActive;
10399 return /*#__PURE__*/(0,jsx_runtime.jsx)(Component, Object.assign({}, options, props, {
10400 ref: ref
10401 }));
10402});
10403NavItem.displayName = 'NavItem';
10404/* harmony default export */ const esm_NavItem = (NavItem);
10405;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/Nav.js
10406const Nav_excluded = ["as", "onSelect", "activeKey", "role", "onKeyDown"];
10407function Nav_objectWithoutPropertiesLoose(source, excluded) {
10408 if (source == null) return {};
10409 var target = {};
10410 var sourceKeys = Object.keys(source);
10411 var key, i;
10412 for (i = 0; i < sourceKeys.length; i++) {
10413 key = sourceKeys[i];
10414 if (excluded.indexOf(key) >= 0) continue;
10415 target[key] = source[key];
10416 }
10417 return target;
10418}
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430// eslint-disable-next-line @typescript-eslint/no-empty-function
10431const Nav_noop = () => {};
10432const EVENT_KEY_ATTR = dataAttr('event-key');
10433const Nav = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((_ref, ref) => {
10434 let {
10435 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
10436 as: Component = 'div',
10437 onSelect,
10438 activeKey,
10439 role,
10440 onKeyDown
10441 } = _ref,
10442 props = Nav_objectWithoutPropertiesLoose(_ref, Nav_excluded);
10443 // A ref and forceUpdate for refocus, b/c we only want to trigger when needed
10444 // and don't want to reset the set in the effect
10445 const forceUpdate = useForceUpdate();
10446 const needsRefocusRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
10447 const parentOnSelect = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_SelectableContext);
10448 const tabContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_TabContext);
10449 let getControlledId, getControllerId;
10450 if (tabContext) {
10451 role = role || 'tablist';
10452 activeKey = tabContext.activeKey;
10453 // TODO: do we need to duplicate these?
10454 getControlledId = tabContext.getControlledId;
10455 getControllerId = tabContext.getControllerId;
10456 }
10457 const listNode = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
10458 const getNextActiveTab = offset => {
10459 const currentListNode = listNode.current;
10460 if (!currentListNode) return null;
10461 const items = qsa(currentListNode, `[${EVENT_KEY_ATTR}]:not([aria-disabled=true])`);
10462 const activeChild = currentListNode.querySelector('[aria-selected=true]');
10463 if (!activeChild || activeChild !== document.activeElement) return null;
10464 const index = items.indexOf(activeChild);
10465 if (index === -1) return null;
10466 let nextIndex = index + offset;
10467 if (nextIndex >= items.length) nextIndex = 0;
10468 if (nextIndex < 0) nextIndex = items.length - 1;
10469 return items[nextIndex];
10470 };
10471 const handleSelect = (key, event) => {
10472 if (key == null) return;
10473 onSelect == null ? void 0 : onSelect(key, event);
10474 parentOnSelect == null ? void 0 : parentOnSelect(key, event);
10475 };
10476 const handleKeyDown = event => {
10477 onKeyDown == null ? void 0 : onKeyDown(event);
10478 if (!tabContext) {
10479 return;
10480 }
10481 let nextActiveChild;
10482 switch (event.key) {
10483 case 'ArrowLeft':
10484 case 'ArrowUp':
10485 nextActiveChild = getNextActiveTab(-1);
10486 break;
10487 case 'ArrowRight':
10488 case 'ArrowDown':
10489 nextActiveChild = getNextActiveTab(1);
10490 break;
10491 default:
10492 return;
10493 }
10494 if (!nextActiveChild) return;
10495 event.preventDefault();
10496 handleSelect(nextActiveChild.dataset[dataProp('EventKey')] || null, event);
10497 needsRefocusRef.current = true;
10498 forceUpdate();
10499 };
10500 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
10501 if (listNode.current && needsRefocusRef.current) {
10502 const activeChild = listNode.current.querySelector(`[${EVENT_KEY_ATTR}][aria-selected=true]`);
10503 activeChild == null ? void 0 : activeChild.focus();
10504 }
10505 needsRefocusRef.current = false;
10506 });
10507 const mergedRef = esm_useMergedRefs(ref, listNode);
10508 return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_SelectableContext.Provider, {
10509 value: handleSelect,
10510 children: /*#__PURE__*/(0,jsx_runtime.jsx)(esm_NavContext.Provider, {
10511 value: {
10512 role,
10513 // used by NavLink to determine it's role
10514 activeKey: makeEventKey(activeKey),
10515 getControlledId: getControlledId || Nav_noop,
10516 getControllerId: getControllerId || Nav_noop
10517 },
10518 children: /*#__PURE__*/(0,jsx_runtime.jsx)(Component, Object.assign({}, props, {
10519 onKeyDown: handleKeyDown,
10520 ref: mergedRef,
10521 role: role
10522 }))
10523 })
10524 });
10525});
10526Nav.displayName = 'Nav';
10527/* harmony default export */ const esm_Nav = (Object.assign(Nav, {
10528 Item: esm_NavItem
10529}));
10530;// CONCATENATED MODULE: ./src/ListGroupItem.tsx
10531var ListGroupItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ListGroupItem.tsx";
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541const ListGroupItem_propTypes = {
10542 /**
10543 * @default 'list-group-item'
10544 */
10545 bsPrefix: (prop_types_default()).string,
10546 /**
10547 * Sets contextual classes for list item.
10548 * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'dark'|'light')}
10549 */
10550 variant: (prop_types_default()).string,
10551 /**
10552 * Marks a ListGroupItem as actionable, applying additional hover, active and disabled styles
10553 * for links and buttons.
10554 */
10555 action: (prop_types_default()).bool,
10556 /**
10557 * Sets list item as active.
10558 */
10559 active: (prop_types_default()).bool,
10560 /**
10561 * Sets list item state as disabled.
10562 */
10563 disabled: (prop_types_default()).bool,
10564 eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
10565 /** A callback function for when this component is clicked. */
10566 onClick: (prop_types_default()).func,
10567 /** Providing a `href` and setting `action` to `true`, it will render the ListGroup.Item as an `<a>` element (unless `as` is provided). */
10568 href: (prop_types_default()).string,
10569 /**
10570 * You can use a custom element type for this component. For none `action` items, items render as `li`.
10571 * For actions the default is an anchor or button element depending on whether a `href` is provided.
10572 *
10573 * @default {'div' | 'a' | 'button'}
10574 */
10575 as: (prop_types_default()).elementType
10576};
10577const ListGroupItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
10578 bsPrefix,
10579 active,
10580 disabled,
10581 eventKey,
10582 className,
10583 variant,
10584 action,
10585 as,
10586 ...props
10587}, ref) => {
10588 bsPrefix = useBootstrapPrefix(bsPrefix, 'list-group-item');
10589 const [navItemProps, meta] = useNavItem({
10590 key: makeEventKey(eventKey, props.href),
10591 active,
10592 ...props
10593 });
10594 const handleClick = useEventCallback(event => {
10595 if (disabled) {
10596 event.preventDefault();
10597 event.stopPropagation();
10598 return;
10599 }
10600 navItemProps.onClick(event);
10601 });
10602 if (disabled && props.tabIndex === undefined) {
10603 props.tabIndex = -1;
10604 props['aria-disabled'] = true;
10605 }
10606
10607 // eslint-disable-next-line no-nested-ternary
10608 const Component = as || (action ? props.href ? 'a' : 'button' : 'div');
10609 false ? 0 : void 0;
10610 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
10611 ref: ref,
10612 ...props,
10613 ...navItemProps,
10614 onClick: handleClick,
10615 className: classnames_default()(className, bsPrefix, meta.isActive && 'active', disabled && 'disabled', variant && `${bsPrefix}-${variant}`, action && `${bsPrefix}-action`)
10616 }, void 0, false, {
10617 fileName: ListGroupItem_jsxFileName,
10618 lineNumber: 113,
10619 columnNumber: 9
10620 }, undefined);
10621});
10622ListGroupItem.propTypes = ListGroupItem_propTypes;
10623ListGroupItem.displayName = 'ListGroupItem';
10624/* harmony default export */ const src_ListGroupItem = (ListGroupItem);
10625;// CONCATENATED MODULE: ./src/ListGroup.tsx
10626var ListGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ListGroup.tsx";
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636const ListGroup_propTypes = {
10637 /**
10638 * @default 'list-group'
10639 */
10640 bsPrefix: (prop_types_default()).string,
10641 /**
10642 * Adds a variant to the list-group
10643 *
10644 * @type {('flush')}
10645 */
10646 variant: prop_types_default().oneOf(['flush']),
10647 /**
10648 * Changes the flow of the list group items from vertical to horizontal.
10649 * A value of `null` (the default) sets it to vertical for all breakpoints;
10650 * Just including the prop sets it for all breakpoints, while `{sm|md|lg|xl|xxl}`
10651 * makes the list group horizontal starting at that breakpoint’s `min-width`.
10652 * @type {(true|'sm'|'md'|'lg'|'xl'|'xxl')}
10653 */
10654 horizontal: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).string]),
10655 /**
10656 * Generate numbered list items.
10657 */
10658 numbered: (prop_types_default()).bool,
10659 /**
10660 * You can use a custom element type for this component.
10661 */
10662 as: (prop_types_default()).elementType
10663};
10664const ListGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
10665 const {
10666 className,
10667 bsPrefix: initialBsPrefix,
10668 variant,
10669 horizontal,
10670 numbered,
10671 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
10672 as = 'div',
10673 ...controlledProps
10674 } = useUncontrolled(props, {
10675 activeKey: 'onSelect'
10676 });
10677 const bsPrefix = useBootstrapPrefix(initialBsPrefix, 'list-group');
10678 let horizontalVariant;
10679 if (horizontal) {
10680 horizontalVariant = horizontal === true ? 'horizontal' : `horizontal-${horizontal}`;
10681 }
10682 false ? 0 : void 0;
10683 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Nav, {
10684 ref: ref,
10685 ...controlledProps,
10686 as: as,
10687 className: classnames_default()(className, bsPrefix, variant && `${bsPrefix}-${variant}`, horizontalVariant && `${bsPrefix}-${horizontalVariant}`, numbered && `${bsPrefix}-numbered`)
10688 }, void 0, false, {
10689 fileName: ListGroup_jsxFileName,
10690 lineNumber: 81,
10691 columnNumber: 7
10692 }, undefined);
10693});
10694ListGroup.propTypes = ListGroup_propTypes;
10695ListGroup.displayName = 'ListGroup';
10696/* harmony default export */ const src_ListGroup = (Object.assign(ListGroup, {
10697 Item: src_ListGroupItem
10698}));
10699;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/scrollbarSize.js
10700
10701var size;
10702function scrollbarSize(recalc) {
10703 if (!size && size !== 0 || recalc) {
10704 if (canUseDOM) {
10705 var scrollDiv = document.createElement('div');
10706 scrollDiv.style.position = 'absolute';
10707 scrollDiv.style.top = '-9999px';
10708 scrollDiv.style.width = '50px';
10709 scrollDiv.style.height = '50px';
10710 scrollDiv.style.overflow = 'scroll';
10711 document.body.appendChild(scrollDiv);
10712 size = scrollDiv.offsetWidth - scrollDiv.clientWidth;
10713 document.body.removeChild(scrollDiv);
10714 }
10715 }
10716 return size;
10717}
10718;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/activeElement.js
10719
10720/**
10721 * Returns the actively focused element safely.
10722 *
10723 * @param doc the document to check
10724 */
10725
10726function activeElement(doc) {
10727 if (doc === void 0) {
10728 doc = ownerDocument();
10729 }
10730
10731 // Support: IE 9 only
10732 // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
10733 try {
10734 var active = doc.activeElement; // IE11 returns a seemingly empty object in some cases when accessing
10735 // document.activeElement from an <iframe>
10736
10737 if (!active || !active.nodeName) return null;
10738 return active;
10739 } catch (e) {
10740 /* ie throws if no active element */
10741 return doc.body;
10742 }
10743}
10744;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/getScrollbarWidth.js
10745/**
10746 * Get the width of the vertical window scrollbar if it's visible
10747 */
10748function getBodyScrollbarWidth(ownerDocument = document) {
10749 const window = ownerDocument.defaultView;
10750 return Math.abs(window.innerWidth - ownerDocument.documentElement.clientWidth);
10751}
10752;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/ModalManager.js
10753
10754
10755
10756const OPEN_DATA_ATTRIBUTE = dataAttr('modal-open');
10757
10758/**
10759 * Manages a stack of Modals as well as ensuring
10760 * body scrolling is is disabled and padding accounted for
10761 */
10762class ModalManager {
10763 constructor({
10764 ownerDocument,
10765 handleContainerOverflow = true,
10766 isRTL = false
10767 } = {}) {
10768 this.handleContainerOverflow = handleContainerOverflow;
10769 this.isRTL = isRTL;
10770 this.modals = [];
10771 this.ownerDocument = ownerDocument;
10772 }
10773 getScrollbarWidth() {
10774 return getBodyScrollbarWidth(this.ownerDocument);
10775 }
10776 getElement() {
10777 return (this.ownerDocument || document).body;
10778 }
10779 setModalAttributes(_modal) {
10780 // For overriding
10781 }
10782 removeModalAttributes(_modal) {
10783 // For overriding
10784 }
10785 setContainerStyle(containerState) {
10786 const style = {
10787 overflow: 'hidden'
10788 };
10789
10790 // we are only interested in the actual `style` here
10791 // because we will override it
10792 const paddingProp = this.isRTL ? 'paddingLeft' : 'paddingRight';
10793 const container = this.getElement();
10794 containerState.style = {
10795 overflow: container.style.overflow,
10796 [paddingProp]: container.style[paddingProp]
10797 };
10798 if (containerState.scrollBarWidth) {
10799 // use computed style, here to get the real padding
10800 // to add our scrollbar width
10801 style[paddingProp] = `${parseInt(css(container, paddingProp) || '0', 10) + containerState.scrollBarWidth}px`;
10802 }
10803 container.setAttribute(OPEN_DATA_ATTRIBUTE, '');
10804 css(container, style);
10805 }
10806 reset() {
10807 [...this.modals].forEach(m => this.remove(m));
10808 }
10809 removeContainerStyle(containerState) {
10810 const container = this.getElement();
10811 container.removeAttribute(OPEN_DATA_ATTRIBUTE);
10812 Object.assign(container.style, containerState.style);
10813 }
10814 add(modal) {
10815 let modalIdx = this.modals.indexOf(modal);
10816 if (modalIdx !== -1) {
10817 return modalIdx;
10818 }
10819 modalIdx = this.modals.length;
10820 this.modals.push(modal);
10821 this.setModalAttributes(modal);
10822 if (modalIdx !== 0) {
10823 return modalIdx;
10824 }
10825 this.state = {
10826 scrollBarWidth: this.getScrollbarWidth(),
10827 style: {}
10828 };
10829 if (this.handleContainerOverflow) {
10830 this.setContainerStyle(this.state);
10831 }
10832 return modalIdx;
10833 }
10834 remove(modal) {
10835 const modalIdx = this.modals.indexOf(modal);
10836 if (modalIdx === -1) {
10837 return;
10838 }
10839 this.modals.splice(modalIdx, 1);
10840
10841 // if that was the last modal in a container,
10842 // clean up the container
10843 if (!this.modals.length && this.handleContainerOverflow) {
10844 this.removeContainerStyle(this.state);
10845 }
10846 this.removeModalAttributes(modal);
10847 }
10848 isTopModal(modal) {
10849 return !!this.modals.length && this.modals[this.modals.length - 1] === modal;
10850 }
10851}
10852/* harmony default export */ const esm_ModalManager = (ModalManager);
10853;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/useWaitForDOMRef.js
10854
10855
10856
10857
10858const resolveContainerRef = (ref, document) => {
10859 if (!canUseDOM) return null;
10860 if (ref == null) return (document || ownerDocument()).body;
10861 if (typeof ref === 'function') ref = ref();
10862 if (ref && 'current' in ref) ref = ref.current;
10863 if (ref && ('nodeType' in ref || ref.getBoundingClientRect)) return ref;
10864 return null;
10865};
10866function useWaitForDOMRef(ref, onResolved) {
10867 const window = useWindow();
10868 const [resolvedRef, setRef] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(() => resolveContainerRef(ref, window == null ? void 0 : window.document));
10869 if (!resolvedRef) {
10870 const earlyRef = resolveContainerRef(ref);
10871 if (earlyRef) setRef(earlyRef);
10872 }
10873 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
10874 if (onResolved && resolvedRef) {
10875 onResolved(resolvedRef);
10876 }
10877 }, [onResolved, resolvedRef]);
10878 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
10879 const nextRef = resolveContainerRef(ref);
10880 if (nextRef !== resolvedRef) {
10881 setRef(nextRef);
10882 }
10883 }, [ref, resolvedRef]);
10884 return resolvedRef;
10885}
10886;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/NoopTransition.js
10887
10888
10889
10890function NoopTransition({
10891 children,
10892 in: inProp,
10893 onExited,
10894 mountOnEnter,
10895 unmountOnExit
10896}) {
10897 const ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
10898 const hasEnteredRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(inProp);
10899 const handleExited = useEventCallback(onExited);
10900 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
10901 if (inProp) hasEnteredRef.current = true;else {
10902 handleExited(ref.current);
10903 }
10904 }, [inProp, handleExited]);
10905 const combinedRef = esm_useMergedRefs(ref, children.ref);
10906 const child = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(children, {
10907 ref: combinedRef
10908 });
10909 if (inProp) return child;
10910 if (unmountOnExit) {
10911 return null;
10912 }
10913 if (!hasEnteredRef.current && mountOnEnter) {
10914 return null;
10915 }
10916 return child;
10917}
10918/* harmony default export */ const esm_NoopTransition = (NoopTransition);
10919;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/ImperativeTransition.js
10920
10921
10922
10923
10924
10925
10926function useTransition({
10927 in: inProp,
10928 onTransition
10929}) {
10930 const ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
10931 const isInitialRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true);
10932 const handleTransition = useEventCallback(onTransition);
10933 useIsomorphicEffect(() => {
10934 if (!ref.current) {
10935 return undefined;
10936 }
10937 let stale = false;
10938 handleTransition({
10939 in: inProp,
10940 element: ref.current,
10941 initial: isInitialRef.current,
10942 isStale: () => stale
10943 });
10944 return () => {
10945 stale = true;
10946 };
10947 }, [inProp, handleTransition]);
10948 useIsomorphicEffect(() => {
10949 isInitialRef.current = false;
10950 // this is for strict mode
10951 return () => {
10952 isInitialRef.current = true;
10953 };
10954 }, []);
10955 return ref;
10956}
10957/**
10958 * Adapts an imperative transition function to a subset of the RTG `<Transition>` component API.
10959 *
10960 * ImperativeTransition does not support mounting options or `appear` at the moment, meaning
10961 * that it always acts like: `mountOnEnter={true} unmountOnExit={true} appear={true}`
10962 */
10963function ImperativeTransition({
10964 children,
10965 in: inProp,
10966 onExited,
10967 onEntered,
10968 transition
10969}) {
10970 const [exited, setExited] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(!inProp);
10971
10972 // TODO: I think this needs to be in an effect
10973 if (inProp && exited) {
10974 setExited(false);
10975 }
10976 const ref = useTransition({
10977 in: !!inProp,
10978 onTransition: options => {
10979 const onFinish = () => {
10980 if (options.isStale()) return;
10981 if (options.in) {
10982 onEntered == null ? void 0 : onEntered(options.element, options.initial);
10983 } else {
10984 setExited(true);
10985 onExited == null ? void 0 : onExited(options.element);
10986 }
10987 };
10988 Promise.resolve(transition(options)).then(onFinish, error => {
10989 if (!options.in) setExited(true);
10990 throw error;
10991 });
10992 }
10993 });
10994 const combinedRef = esm_useMergedRefs(ref, children.ref);
10995 return exited && !inProp ? null : /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(children, {
10996 ref: combinedRef
10997 });
10998}
10999function renderTransition(Component, runTransition, props) {
11000 if (Component) {
11001 return /*#__PURE__*/(0,jsx_runtime.jsx)(Component, Object.assign({}, props));
11002 }
11003 if (runTransition) {
11004 return /*#__PURE__*/(0,jsx_runtime.jsx)(ImperativeTransition, Object.assign({}, props, {
11005 transition: runTransition
11006 }));
11007 }
11008 return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_NoopTransition, Object.assign({}, props));
11009}
11010;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/utils.js
11011/* eslint-disable import/prefer-default-export */
11012function isEscKey(e) {
11013 return e.code === 'Escape' || e.keyCode === 27;
11014}
11015;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/Modal.js
11016const Modal_excluded = ["show", "role", "className", "style", "children", "backdrop", "keyboard", "onBackdropClick", "onEscapeKeyDown", "transition", "runTransition", "backdropTransition", "runBackdropTransition", "autoFocus", "enforceFocus", "restoreFocus", "restoreFocusOptions", "renderDialog", "renderBackdrop", "manager", "container", "onShow", "onHide", "onExit", "onExited", "onExiting", "onEnter", "onEntering", "onEntered"];
11017function Modal_objectWithoutPropertiesLoose(source, excluded) {
11018 if (source == null) return {};
11019 var target = {};
11020 var sourceKeys = Object.keys(source);
11021 var key, i;
11022 for (i = 0; i < sourceKeys.length; i++) {
11023 key = sourceKeys[i];
11024 if (excluded.indexOf(key) >= 0) continue;
11025 target[key] = source[key];
11026 }
11027 return target;
11028}
11029/* eslint-disable @typescript-eslint/no-use-before-define, react/prop-types */
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050let manager;
11051function getManager(window) {
11052 if (!manager) manager = new esm_ModalManager({
11053 ownerDocument: window == null ? void 0 : window.document
11054 });
11055 return manager;
11056}
11057function useModalManager(provided) {
11058 const window = useWindow();
11059 const modalManager = provided || getManager(window);
11060 const modal = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
11061 dialog: null,
11062 backdrop: null
11063 });
11064 return Object.assign(modal.current, {
11065 add: () => modalManager.add(modal.current),
11066 remove: () => modalManager.remove(modal.current),
11067 isTopModal: () => modalManager.isTopModal(modal.current),
11068 setDialogRef: (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(ref => {
11069 modal.current.dialog = ref;
11070 }, []),
11071 setBackdropRef: (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(ref => {
11072 modal.current.backdrop = ref;
11073 }, [])
11074 });
11075}
11076const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)((_ref, ref) => {
11077 let {
11078 show = false,
11079 role = 'dialog',
11080 className,
11081 style,
11082 children,
11083 backdrop = true,
11084 keyboard = true,
11085 onBackdropClick,
11086 onEscapeKeyDown,
11087 transition,
11088 runTransition,
11089 backdropTransition,
11090 runBackdropTransition,
11091 autoFocus = true,
11092 enforceFocus = true,
11093 restoreFocus = true,
11094 restoreFocusOptions,
11095 renderDialog,
11096 renderBackdrop = props => /*#__PURE__*/(0,jsx_runtime.jsx)("div", Object.assign({}, props)),
11097 manager: providedManager,
11098 container: containerRef,
11099 onShow,
11100 onHide = () => {},
11101 onExit,
11102 onExited,
11103 onExiting,
11104 onEnter,
11105 onEntering,
11106 onEntered
11107 } = _ref,
11108 rest = Modal_objectWithoutPropertiesLoose(_ref, Modal_excluded);
11109 const ownerWindow = useWindow();
11110 const container = useWaitForDOMRef(containerRef);
11111 const modal = useModalManager(providedManager);
11112 const isMounted = useMounted();
11113 const prevShow = usePrevious(show);
11114 const [exited, setExited] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(!show);
11115 const lastFocusRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
11116 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref, () => modal, [modal]);
11117 if (canUseDOM && !prevShow && show) {
11118 lastFocusRef.current = activeElement(ownerWindow == null ? void 0 : ownerWindow.document);
11119 }
11120
11121 // TODO: I think this needs to be in an effect
11122 if (show && exited) {
11123 setExited(false);
11124 }
11125 const handleShow = useEventCallback(() => {
11126 modal.add();
11127 removeKeydownListenerRef.current = esm_listen(document, 'keydown', handleDocumentKeyDown);
11128 removeFocusListenerRef.current = esm_listen(document, 'focus',
11129 // the timeout is necessary b/c this will run before the new modal is mounted
11130 // and so steals focus from it
11131 () => setTimeout(handleEnforceFocus), true);
11132 if (onShow) {
11133 onShow();
11134 }
11135
11136 // autofocus after onShow to not trigger a focus event for previous
11137 // modals before this one is shown.
11138 if (autoFocus) {
11139 var _modal$dialog$ownerDo, _modal$dialog;
11140 const currentActiveElement = activeElement((_modal$dialog$ownerDo = (_modal$dialog = modal.dialog) == null ? void 0 : _modal$dialog.ownerDocument) != null ? _modal$dialog$ownerDo : ownerWindow == null ? void 0 : ownerWindow.document);
11141 if (modal.dialog && currentActiveElement && !contains_contains(modal.dialog, currentActiveElement)) {
11142 lastFocusRef.current = currentActiveElement;
11143 modal.dialog.focus();
11144 }
11145 }
11146 });
11147 const handleHide = useEventCallback(() => {
11148 modal.remove();
11149 removeKeydownListenerRef.current == null ? void 0 : removeKeydownListenerRef.current();
11150 removeFocusListenerRef.current == null ? void 0 : removeFocusListenerRef.current();
11151 if (restoreFocus) {
11152 var _lastFocusRef$current;
11153 // Support: <=IE11 doesn't support `focus()` on svg elements (RB: #917)
11154 (_lastFocusRef$current = lastFocusRef.current) == null ? void 0 : _lastFocusRef$current.focus == null ? void 0 : _lastFocusRef$current.focus(restoreFocusOptions);
11155 lastFocusRef.current = null;
11156 }
11157 });
11158
11159 // TODO: try and combine these effects: https://github.com/react-bootstrap/react-overlays/pull/794#discussion_r409954120
11160
11161 // Show logic when:
11162 // - show is `true` _and_ `container` has resolved
11163 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
11164 if (!show || !container) return;
11165 handleShow();
11166 }, [show, container, /* should never change: */handleShow]);
11167
11168 // Hide cleanup logic when:
11169 // - `exited` switches to true
11170 // - component unmounts;
11171 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
11172 if (!exited) return;
11173 handleHide();
11174 }, [exited, handleHide]);
11175 useWillUnmount(() => {
11176 handleHide();
11177 });
11178
11179 // --------------------------------
11180
11181 const handleEnforceFocus = useEventCallback(() => {
11182 if (!enforceFocus || !isMounted() || !modal.isTopModal()) {
11183 return;
11184 }
11185 const currentActiveElement = activeElement(ownerWindow == null ? void 0 : ownerWindow.document);
11186 if (modal.dialog && currentActiveElement && !contains_contains(modal.dialog, currentActiveElement)) {
11187 modal.dialog.focus();
11188 }
11189 });
11190 const handleBackdropClick = useEventCallback(e => {
11191 if (e.target !== e.currentTarget) {
11192 return;
11193 }
11194 onBackdropClick == null ? void 0 : onBackdropClick(e);
11195 if (backdrop === true) {
11196 onHide();
11197 }
11198 });
11199 const handleDocumentKeyDown = useEventCallback(e => {
11200 if (keyboard && isEscKey(e) && modal.isTopModal()) {
11201 onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(e);
11202 if (!e.defaultPrevented) {
11203 onHide();
11204 }
11205 }
11206 });
11207 const removeFocusListenerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
11208 const removeKeydownListenerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
11209 const handleHidden = (...args) => {
11210 setExited(true);
11211 onExited == null ? void 0 : onExited(...args);
11212 };
11213 if (!container) {
11214 return null;
11215 }
11216 const dialogProps = Object.assign({
11217 role,
11218 ref: modal.setDialogRef,
11219 // apparently only works on the dialog role element
11220 'aria-modal': role === 'dialog' ? true : undefined
11221 }, rest, {
11222 style,
11223 className,
11224 tabIndex: -1
11225 });
11226 let dialog = renderDialog ? renderDialog(dialogProps) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", Object.assign({}, dialogProps, {
11227 children: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(children, {
11228 role: 'document'
11229 })
11230 }));
11231 dialog = renderTransition(transition, runTransition, {
11232 unmountOnExit: true,
11233 mountOnEnter: true,
11234 appear: true,
11235 in: !!show,
11236 onExit,
11237 onExiting,
11238 onExited: handleHidden,
11239 onEnter,
11240 onEntering,
11241 onEntered,
11242 children: dialog
11243 });
11244 let backdropElement = null;
11245 if (backdrop) {
11246 backdropElement = renderBackdrop({
11247 ref: modal.setBackdropRef,
11248 onClick: handleBackdropClick
11249 });
11250 backdropElement = renderTransition(backdropTransition, runBackdropTransition, {
11251 in: !!show,
11252 appear: true,
11253 mountOnEnter: true,
11254 unmountOnExit: true,
11255 children: backdropElement
11256 });
11257 }
11258 return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
11259 children: /*#__PURE__*/external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().createPortal( /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
11260 children: [backdropElement, dialog]
11261 }), container)
11262 });
11263});
11264Modal.displayName = 'Modal';
11265/* harmony default export */ const esm_Modal = (Object.assign(Modal, {
11266 Manager: esm_ModalManager
11267}));
11268;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/hasClass.js
11269/**
11270 * Checks if a given element has a CSS class.
11271 *
11272 * @param element the element
11273 * @param className the CSS class name
11274 */
11275function hasClass(element, className) {
11276 if (element.classList) return !!className && element.classList.contains(className);
11277 return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
11278}
11279;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/addClass.js
11280
11281/**
11282 * Adds a CSS class to a given element.
11283 *
11284 * @param element the element
11285 * @param className the CSS class name
11286 */
11287
11288function addClass(element, className) {
11289 if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + " " + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + " " + className);
11290}
11291;// CONCATENATED MODULE: ./node_modules/dom-helpers/esm/removeClass.js
11292function replaceClassName(origClass, classToRemove) {
11293 return origClass.replace(new RegExp("(^|\\s)" + classToRemove + "(?:\\s|$)", 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
11294}
11295/**
11296 * Removes a CSS class from a given element.
11297 *
11298 * @param element the element
11299 * @param className the CSS class name
11300 */
11301
11302function removeClass(element, className) {
11303 if (element.classList) {
11304 element.classList.remove(className);
11305 } else if (typeof element.className === 'string') {
11306 element.className = replaceClassName(element.className, className);
11307 } else {
11308 element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));
11309 }
11310}
11311;// CONCATENATED MODULE: ./src/BootstrapModalManager.tsx
11312
11313
11314
11315
11316
11317const Selector = {
11318 FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
11319 STICKY_CONTENT: '.sticky-top',
11320 NAVBAR_TOGGLER: '.navbar-toggler'
11321};
11322class BootstrapModalManager extends esm_ModalManager {
11323 adjustAndStore(prop, element, adjust) {
11324 const actual = element.style[prop];
11325 // TODO: DOMStringMap and CSSStyleDeclaration aren't strictly compatible
11326 // @ts-ignore
11327 element.dataset[prop] = actual;
11328 css(element, {
11329 [prop]: `${parseFloat(css(element, prop)) + adjust}px`
11330 });
11331 }
11332 restore(prop, element) {
11333 const value = element.dataset[prop];
11334 if (value !== undefined) {
11335 delete element.dataset[prop];
11336 css(element, {
11337 [prop]: value
11338 });
11339 }
11340 }
11341 setContainerStyle(containerState) {
11342 super.setContainerStyle(containerState);
11343 const container = this.getElement();
11344 addClass(container, 'modal-open');
11345 if (!containerState.scrollBarWidth) return;
11346 const paddingProp = this.isRTL ? 'paddingLeft' : 'paddingRight';
11347 const marginProp = this.isRTL ? 'marginLeft' : 'marginRight';
11348 qsa(container, Selector.FIXED_CONTENT).forEach(el => this.adjustAndStore(paddingProp, el, containerState.scrollBarWidth));
11349 qsa(container, Selector.STICKY_CONTENT).forEach(el => this.adjustAndStore(marginProp, el, -containerState.scrollBarWidth));
11350 qsa(container, Selector.NAVBAR_TOGGLER).forEach(el => this.adjustAndStore(marginProp, el, containerState.scrollBarWidth));
11351 }
11352 removeContainerStyle(containerState) {
11353 super.removeContainerStyle(containerState);
11354 const container = this.getElement();
11355 removeClass(container, 'modal-open');
11356 const paddingProp = this.isRTL ? 'paddingLeft' : 'paddingRight';
11357 const marginProp = this.isRTL ? 'marginLeft' : 'marginRight';
11358 qsa(container, Selector.FIXED_CONTENT).forEach(el => this.restore(paddingProp, el));
11359 qsa(container, Selector.STICKY_CONTENT).forEach(el => this.restore(marginProp, el));
11360 qsa(container, Selector.NAVBAR_TOGGLER).forEach(el => this.restore(marginProp, el));
11361 }
11362}
11363let sharedManager;
11364function getSharedManager(options) {
11365 if (!sharedManager) sharedManager = new BootstrapModalManager(options);
11366 return sharedManager;
11367}
11368/* harmony default export */ const src_BootstrapModalManager = (BootstrapModalManager);
11369;// CONCATENATED MODULE: ./src/ModalBody.tsx
11370var ModalBody_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ModalBody.tsx";
11371
11372
11373
11374
11375const ModalBody = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
11376 className,
11377 bsPrefix,
11378 as: Component = 'div',
11379 ...props
11380}, ref) => {
11381 bsPrefix = useBootstrapPrefix(bsPrefix, 'modal-body');
11382 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
11383 ref: ref,
11384 className: classnames_default()(className, bsPrefix),
11385 ...props
11386 }, void 0, false, {
11387 fileName: ModalBody_jsxFileName,
11388 lineNumber: 15,
11389 columnNumber: 9
11390 }, undefined);
11391});
11392ModalBody.displayName = 'ModalBody';
11393/* harmony default export */ const src_ModalBody = (ModalBody);
11394;// CONCATENATED MODULE: ./src/ModalContext.tsx
11395
11396const ModalContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
11397 // eslint-disable-next-line @typescript-eslint/no-empty-function
11398 onHide() {}
11399});
11400/* harmony default export */ const src_ModalContext = (ModalContext);
11401;// CONCATENATED MODULE: ./src/ModalDialog.tsx
11402var ModalDialog_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ModalDialog.tsx";
11403
11404
11405
11406
11407
11408const ModalDialog_propTypes = {
11409 /** @default 'modal' */
11410 bsPrefix: (prop_types_default()).string,
11411 contentClassName: (prop_types_default()).string,
11412 /**
11413 * Render a large, extra large or small modal.
11414 *
11415 * @type ('sm'|'lg'|'xl')
11416 */
11417 size: (prop_types_default()).string,
11418 /**
11419 * Renders a fullscreen modal. Specifying a breakpoint will render the modal
11420 * as fullscreen __below__ the breakpoint size.
11421 *
11422 * @type (true|'sm-down'|'md-down'|'lg-down'|'xl-down'|'xxl-down')
11423 */
11424 fullscreen: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).string]),
11425 /**
11426 * Specify whether the Component should be vertically centered
11427 */
11428 centered: (prop_types_default()).bool,
11429 /**
11430 * Allows scrolling the `<Modal.Body>` instead of the entire Modal when overflowing.
11431 */
11432 scrollable: (prop_types_default()).bool
11433};
11434const ModalDialog = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
11435 bsPrefix,
11436 className,
11437 contentClassName,
11438 centered,
11439 size,
11440 fullscreen,
11441 children,
11442 scrollable,
11443 ...props
11444}, ref) => {
11445 bsPrefix = useBootstrapPrefix(bsPrefix, 'modal');
11446 const dialogClass = `${bsPrefix}-dialog`;
11447 const fullScreenClass = typeof fullscreen === 'string' ? `${bsPrefix}-fullscreen-${fullscreen}` : `${bsPrefix}-fullscreen`;
11448 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
11449 ...props,
11450 ref: ref,
11451 className: classnames_default()(dialogClass, className, size && `${bsPrefix}-${size}`, centered && `${dialogClass}-centered`, scrollable && `${dialogClass}-scrollable`, fullscreen && fullScreenClass),
11452 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
11453 className: classnames_default()(`${bsPrefix}-content`, contentClassName),
11454 children: children
11455 }, void 0, false, {
11456 fileName: ModalDialog_jsxFileName,
11457 lineNumber: 93,
11458 columnNumber: 9
11459 }, undefined)
11460 }, void 0, false, {
11461 fileName: ModalDialog_jsxFileName,
11462 lineNumber: 81,
11463 columnNumber: 7
11464 }, undefined);
11465});
11466ModalDialog.displayName = 'ModalDialog';
11467ModalDialog.propTypes = ModalDialog_propTypes;
11468/* harmony default export */ const src_ModalDialog = (ModalDialog);
11469;// CONCATENATED MODULE: ./src/ModalFooter.tsx
11470var ModalFooter_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ModalFooter.tsx";
11471
11472
11473
11474
11475const ModalFooter = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
11476 className,
11477 bsPrefix,
11478 as: Component = 'div',
11479 ...props
11480}, ref) => {
11481 bsPrefix = useBootstrapPrefix(bsPrefix, 'modal-footer');
11482 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
11483 ref: ref,
11484 className: classnames_default()(className, bsPrefix),
11485 ...props
11486 }, void 0, false, {
11487 fileName: ModalFooter_jsxFileName,
11488 lineNumber: 15,
11489 columnNumber: 9
11490 }, undefined);
11491});
11492ModalFooter.displayName = 'ModalFooter';
11493/* harmony default export */ const src_ModalFooter = (ModalFooter);
11494;// CONCATENATED MODULE: ./src/AbstractModalHeader.tsx
11495var AbstractModalHeader_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/AbstractModalHeader.tsx";
11496
11497
11498
11499
11500
11501
11502
11503const AbstractModalHeader_propTypes = {
11504 /**
11505 * Provides an accessible label for the close
11506 * button. It is used for Assistive Technology when the label text is not
11507 * readable.
11508 */
11509 closeLabel: (prop_types_default()).string,
11510 /**
11511 * Sets the variant for close button.
11512 */
11513 closeVariant: prop_types_default().oneOf(['white']),
11514 /**
11515 * Specify whether the Component should contain a close button
11516 */
11517 closeButton: (prop_types_default()).bool,
11518 /**
11519 * A Callback fired when the close button is clicked. If used directly inside
11520 * a ModalContext, the onHide will automatically be propagated up
11521 * to the parent `onHide`.
11522 */
11523 onHide: (prop_types_default()).func
11524};
11525const AbstractModalHeader = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
11526 closeLabel = 'Close',
11527 closeVariant,
11528 closeButton = false,
11529 onHide,
11530 children,
11531 ...props
11532}, ref) => {
11533 const context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_ModalContext);
11534 const handleClick = useEventCallback(() => {
11535 context == null ? void 0 : context.onHide();
11536 onHide == null ? void 0 : onHide();
11537 });
11538 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
11539 ref: ref,
11540 ...props,
11541 children: [children, closeButton && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_CloseButton, {
11542 "aria-label": closeLabel,
11543 variant: closeVariant,
11544 onClick: handleClick
11545 }, void 0, false, {
11546 fileName: AbstractModalHeader_jsxFileName,
11547 lineNumber: 69,
11548 columnNumber: 11
11549 }, undefined)]
11550 }, void 0, true, {
11551 fileName: AbstractModalHeader_jsxFileName,
11552 lineNumber: 65,
11553 columnNumber: 7
11554 }, undefined);
11555});
11556AbstractModalHeader.propTypes = AbstractModalHeader_propTypes;
11557/* harmony default export */ const src_AbstractModalHeader = (AbstractModalHeader);
11558;// CONCATENATED MODULE: ./src/ModalHeader.tsx
11559var ModalHeader_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ModalHeader.tsx";
11560
11561
11562
11563
11564
11565
11566const ModalHeader_propTypes = {
11567 /**
11568 * @default 'modal-header'
11569 */
11570 bsPrefix: (prop_types_default()).string,
11571 /**
11572 * Provides an accessible label for the close
11573 * button. It is used for Assistive Technology when the label text is not
11574 * readable.
11575 */
11576 closeLabel: (prop_types_default()).string,
11577 /**
11578 * Sets the variant for close button.
11579 */
11580 closeVariant: prop_types_default().oneOf(['white']),
11581 /**
11582 * Specify whether the Component should contain a close button
11583 */
11584 closeButton: (prop_types_default()).bool,
11585 /**
11586 * A Callback fired when the close button is clicked. If used directly inside
11587 * a Modal component, the onHide will automatically be propagated up to the
11588 * parent Modal `onHide`.
11589 */
11590 onHide: (prop_types_default()).func
11591};
11592const ModalHeader = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
11593 bsPrefix,
11594 className,
11595 closeLabel = 'Close',
11596 closeButton = false,
11597 ...props
11598}, ref) => {
11599 bsPrefix = useBootstrapPrefix(bsPrefix, 'modal-header');
11600 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_AbstractModalHeader, {
11601 ref: ref,
11602 ...props,
11603 className: classnames_default()(className, bsPrefix),
11604 closeLabel: closeLabel,
11605 closeButton: closeButton
11606 }, void 0, false, {
11607 fileName: ModalHeader_jsxFileName,
11608 lineNumber: 59,
11609 columnNumber: 7
11610 }, undefined);
11611});
11612ModalHeader.displayName = 'ModalHeader';
11613ModalHeader.propTypes = ModalHeader_propTypes;
11614/* harmony default export */ const src_ModalHeader = (ModalHeader);
11615;// CONCATENATED MODULE: ./src/ModalTitle.tsx
11616var ModalTitle_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ModalTitle.tsx";
11617
11618
11619
11620
11621
11622const ModalTitle_DivStyledAsH4 = divWithClassName('h4');
11623const ModalTitle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
11624 className,
11625 bsPrefix,
11626 as: Component = ModalTitle_DivStyledAsH4,
11627 ...props
11628}, ref) => {
11629 bsPrefix = useBootstrapPrefix(bsPrefix, 'modal-title');
11630 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
11631 ref: ref,
11632 className: classnames_default()(className, bsPrefix),
11633 ...props
11634 }, void 0, false, {
11635 fileName: ModalTitle_jsxFileName,
11636 lineNumber: 18,
11637 columnNumber: 9
11638 }, undefined);
11639});
11640ModalTitle.displayName = 'ModalTitle';
11641/* harmony default export */ const src_ModalTitle = (ModalTitle);
11642;// CONCATENATED MODULE: ./src/Modal.tsx
11643var Modal_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Modal.tsx";
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669const Modal_propTypes = {
11670 /**
11671 * @default 'modal'
11672 */
11673 bsPrefix: (prop_types_default()).string,
11674 /**
11675 * Render a large, extra large or small modal.
11676 * When not provided, the modal is rendered with medium (default) size.
11677 * @type ('sm'|'lg'|'xl')
11678 */
11679 size: (prop_types_default()).string,
11680 /**
11681 * Renders a fullscreen modal. Specifying a breakpoint will render the modal
11682 * as fullscreen __below__ the breakpoint size.
11683 *
11684 * @type (true|'sm-down'|'md-down'|'lg-down'|'xl-down'|'xxl-down')
11685 */
11686 fullscreen: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).string]),
11687 /**
11688 * vertically center the Dialog in the window
11689 */
11690 centered: (prop_types_default()).bool,
11691 /**
11692 * Include a backdrop component. Specify 'static' for a backdrop that doesn't
11693 * trigger an "onHide" when clicked.
11694 */
11695 backdrop: prop_types_default().oneOf(['static', true, false]),
11696 /**
11697 * Add an optional extra class name to .modal-backdrop
11698 * It could end up looking like class="modal-backdrop foo-modal-backdrop in".
11699 */
11700 backdropClassName: (prop_types_default()).string,
11701 /**
11702 * Close the modal when escape key is pressed
11703 */
11704 keyboard: (prop_types_default()).bool,
11705 /**
11706 * Allows scrolling the `<Modal.Body>` instead of the entire Modal when overflowing.
11707 */
11708 scrollable: (prop_types_default()).bool,
11709 /**
11710 * Open and close the Modal with a slide and fade animation.
11711 */
11712 animation: (prop_types_default()).bool,
11713 /**
11714 * A css class to apply to the Modal dialog DOM node.
11715 */
11716 dialogClassName: (prop_types_default()).string,
11717 /**
11718 * Add an optional extra class name to .modal-content
11719 */
11720 contentClassName: (prop_types_default()).string,
11721 /**
11722 * A Component type that provides the modal content Markup. This is a useful
11723 * prop when you want to use your own styles and markup to create a custom
11724 * modal component.
11725 */
11726 dialogAs: (prop_types_default()).elementType,
11727 /**
11728 * When `true` The modal will automatically shift focus to itself when it
11729 * opens, and replace it to the last focused element when it closes.
11730 * Generally this should never be set to false as it makes the Modal less
11731 * accessible to assistive technologies, like screen-readers.
11732 */
11733 autoFocus: (prop_types_default()).bool,
11734 /**
11735 * When `true` The modal will prevent focus from leaving the Modal while
11736 * open. Consider leaving the default value here, as it is necessary to make
11737 * the Modal work well with assistive technologies, such as screen readers.
11738 */
11739 enforceFocus: (prop_types_default()).bool,
11740 /**
11741 * When `true` The modal will restore focus to previously focused element once
11742 * modal is hidden
11743 */
11744 restoreFocus: (prop_types_default()).bool,
11745 /**
11746 * Options passed to focus function when `restoreFocus` is set to `true`
11747 *
11748 * @link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#Parameters
11749 */
11750 restoreFocusOptions: prop_types_default().shape({
11751 preventScroll: (prop_types_default()).bool
11752 }),
11753 /**
11754 * When `true` The modal will show itself.
11755 */
11756 show: (prop_types_default()).bool,
11757 /**
11758 * A callback fired when the Modal is opening.
11759 */
11760 onShow: (prop_types_default()).func,
11761 /**
11762 * A callback fired when the header closeButton or non-static backdrop is
11763 * clicked. Required if either are specified.
11764 */
11765 onHide: (prop_types_default()).func,
11766 /**
11767 * A callback fired when the escape key, if specified in `keyboard`, is pressed.
11768 */
11769 onEscapeKeyDown: (prop_types_default()).func,
11770 /**
11771 * Callback fired before the Modal transitions in
11772 */
11773 onEnter: (prop_types_default()).func,
11774 /**
11775 * Callback fired as the Modal begins to transition in
11776 */
11777 onEntering: (prop_types_default()).func,
11778 /**
11779 * Callback fired after the Modal finishes transitioning in
11780 */
11781 onEntered: (prop_types_default()).func,
11782 /**
11783 * Callback fired right before the Modal transitions out
11784 */
11785 onExit: (prop_types_default()).func,
11786 /**
11787 * Callback fired as the Modal begins to transition out
11788 */
11789 onExiting: (prop_types_default()).func,
11790 /**
11791 * Callback fired after the Modal finishes transitioning out
11792 */
11793 onExited: (prop_types_default()).func,
11794 /**
11795 * A ModalManager instance used to track and manage the state of open
11796 * Modals. Useful when customizing how modals interact within a container
11797 */
11798 manager: (prop_types_default()).object,
11799 /**
11800 * @private
11801 */
11802 container: (prop_types_default()).any,
11803 'aria-labelledby': (prop_types_default()).string,
11804 'aria-describedby': (prop_types_default()).string,
11805 'aria-label': (prop_types_default()).string
11806};
11807
11808/* eslint-disable no-use-before-define, react/no-multi-comp */
11809function DialogTransition(props) {
11810 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Fade, {
11811 ...props,
11812 timeout: null
11813 }, void 0, false, {
11814 fileName: Modal_jsxFileName,
11815 lineNumber: 227,
11816 columnNumber: 10
11817 }, this);
11818}
11819function BackdropTransition(props) {
11820 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Fade, {
11821 ...props,
11822 timeout: null
11823 }, void 0, false, {
11824 fileName: Modal_jsxFileName,
11825 lineNumber: 231,
11826 columnNumber: 10
11827 }, this);
11828}
11829
11830/* eslint-enable no-use-before-define */
11831const Modal_Modal = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
11832 bsPrefix,
11833 className,
11834 style,
11835 dialogClassName,
11836 contentClassName,
11837 children,
11838 dialogAs: Dialog = src_ModalDialog,
11839 'aria-labelledby': ariaLabelledby,
11840 'aria-describedby': ariaDescribedby,
11841 'aria-label': ariaLabel,
11842 /* BaseModal props */
11843
11844 show = false,
11845 animation = true,
11846 backdrop = true,
11847 keyboard = true,
11848 onEscapeKeyDown,
11849 onShow,
11850 onHide,
11851 container,
11852 autoFocus = true,
11853 enforceFocus = true,
11854 restoreFocus = true,
11855 restoreFocusOptions,
11856 onEntered,
11857 onExit,
11858 onExiting,
11859 onEnter,
11860 onEntering,
11861 onExited,
11862 backdropClassName,
11863 manager: propsManager,
11864 ...props
11865}, ref) => {
11866 const [modalStyle, setStyle] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({});
11867 const [animateStaticModal, setAnimateStaticModal] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
11868 const waitingForMouseUpRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
11869 const ignoreBackdropClickRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
11870 const removeStaticModalAnimationRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
11871 const [modal, setModalRef] = useCallbackRef();
11872 const mergedRef = esm_useMergedRefs(ref, setModalRef);
11873 const handleHide = useEventCallback(onHide);
11874 const isRTL = useIsRTL();
11875 bsPrefix = useBootstrapPrefix(bsPrefix, 'modal');
11876 const modalContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
11877 onHide: handleHide
11878 }), [handleHide]);
11879 function getModalManager() {
11880 if (propsManager) return propsManager;
11881 return getSharedManager({
11882 isRTL
11883 });
11884 }
11885 function updateDialogStyle(node) {
11886 if (!canUseDOM) return;
11887 const containerIsOverflowing = getModalManager().getScrollbarWidth() > 0;
11888 const modalIsOverflowing = node.scrollHeight > ownerDocument(node).documentElement.clientHeight;
11889 setStyle({
11890 paddingRight: containerIsOverflowing && !modalIsOverflowing ? scrollbarSize() : undefined,
11891 paddingLeft: !containerIsOverflowing && modalIsOverflowing ? scrollbarSize() : undefined
11892 });
11893 }
11894 const handleWindowResize = useEventCallback(() => {
11895 if (modal) {
11896 updateDialogStyle(modal.dialog);
11897 }
11898 });
11899 useWillUnmount(() => {
11900 esm_removeEventListener(window, 'resize', handleWindowResize);
11901 removeStaticModalAnimationRef.current == null ? void 0 : removeStaticModalAnimationRef.current();
11902 });
11903
11904 // We prevent the modal from closing during a drag by detecting where the
11905 // click originates from. If it starts in the modal and then ends outside
11906 // don't close.
11907 const handleDialogMouseDown = () => {
11908 waitingForMouseUpRef.current = true;
11909 };
11910 const handleMouseUp = e => {
11911 if (waitingForMouseUpRef.current && modal && e.target === modal.dialog) {
11912 ignoreBackdropClickRef.current = true;
11913 }
11914 waitingForMouseUpRef.current = false;
11915 };
11916 const handleStaticModalAnimation = () => {
11917 setAnimateStaticModal(true);
11918 removeStaticModalAnimationRef.current = transitionEnd(modal.dialog, () => {
11919 setAnimateStaticModal(false);
11920 });
11921 };
11922 const handleStaticBackdropClick = e => {
11923 if (e.target !== e.currentTarget) {
11924 return;
11925 }
11926 handleStaticModalAnimation();
11927 };
11928 const handleClick = e => {
11929 if (backdrop === 'static') {
11930 handleStaticBackdropClick(e);
11931 return;
11932 }
11933 if (ignoreBackdropClickRef.current || e.target !== e.currentTarget) {
11934 ignoreBackdropClickRef.current = false;
11935 return;
11936 }
11937 onHide == null ? void 0 : onHide();
11938 };
11939 const handleEscapeKeyDown = e => {
11940 if (keyboard) {
11941 onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(e);
11942 } else {
11943 // Call preventDefault to stop modal from closing in @restart/ui.
11944 e.preventDefault();
11945 if (backdrop === 'static') {
11946 // Play static modal animation.
11947 handleStaticModalAnimation();
11948 }
11949 }
11950 };
11951 const handleEnter = (node, isAppearing) => {
11952 if (node) {
11953 updateDialogStyle(node);
11954 }
11955 onEnter == null ? void 0 : onEnter(node, isAppearing);
11956 };
11957 const handleExit = node => {
11958 removeStaticModalAnimationRef.current == null ? void 0 : removeStaticModalAnimationRef.current();
11959 onExit == null ? void 0 : onExit(node);
11960 };
11961 const handleEntering = (node, isAppearing) => {
11962 onEntering == null ? void 0 : onEntering(node, isAppearing);
11963
11964 // FIXME: This should work even when animation is disabled.
11965 esm_addEventListener(window, 'resize', handleWindowResize);
11966 };
11967 const handleExited = node => {
11968 if (node) node.style.display = ''; // RHL removes it sometimes
11969 onExited == null ? void 0 : onExited(node);
11970
11971 // FIXME: This should work even when animation is disabled.
11972 esm_removeEventListener(window, 'resize', handleWindowResize);
11973 };
11974 const renderBackdrop = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(backdropProps => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
11975 ...backdropProps,
11976 className: classnames_default()(`${bsPrefix}-backdrop`, backdropClassName, !animation && 'show')
11977 }, void 0, false, {
11978 fileName: Modal_jsxFileName,
11979 lineNumber: 426,
11980 columnNumber: 11
11981 }, undefined), [animation, backdropClassName, bsPrefix]);
11982 const baseModalStyle = {
11983 ...style,
11984 ...modalStyle
11985 };
11986
11987 // If `display` is not set to block, autoFocus inside the modal fails
11988 // https://github.com/react-bootstrap/react-bootstrap/issues/5102
11989 baseModalStyle.display = 'block';
11990 const renderDialog = dialogProps => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
11991 role: "dialog",
11992 ...dialogProps,
11993 style: baseModalStyle,
11994 className: classnames_default()(className, bsPrefix, animateStaticModal && `${bsPrefix}-static`, !animation && 'show'),
11995 onClick: backdrop ? handleClick : undefined,
11996 onMouseUp: handleMouseUp,
11997 "aria-label": ariaLabel,
11998 "aria-labelledby": ariaLabelledby,
11999 "aria-describedby": ariaDescribedby,
12000 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Dialog, {
12001 ...props,
12002 onMouseDown: handleDialogMouseDown,
12003 className: dialogClassName,
12004 contentClassName: contentClassName,
12005 children: children
12006 }, void 0, false, {
12007 fileName: Modal_jsxFileName,
12008 lineNumber: 463,
12009 columnNumber: 11
12010 }, undefined)
12011 }, void 0, false, {
12012 fileName: Modal_jsxFileName,
12013 lineNumber: 445,
12014 columnNumber: 9
12015 }, undefined);
12016 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_ModalContext.Provider, {
12017 value: modalContext,
12018 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Modal, {
12019 show: show,
12020 ref: mergedRef,
12021 backdrop: backdrop,
12022 container: container,
12023 keyboard: true // Always set true - see handleEscapeKeyDown
12024 ,
12025 autoFocus: autoFocus,
12026 enforceFocus: enforceFocus,
12027 restoreFocus: restoreFocus,
12028 restoreFocusOptions: restoreFocusOptions,
12029 onEscapeKeyDown: handleEscapeKeyDown,
12030 onShow: onShow,
12031 onHide: onHide,
12032 onEnter: handleEnter,
12033 onEntering: handleEntering,
12034 onEntered: onEntered,
12035 onExit: handleExit,
12036 onExiting: onExiting,
12037 onExited: handleExited,
12038 manager: getModalManager(),
12039 transition: animation ? DialogTransition : undefined,
12040 backdropTransition: animation ? BackdropTransition : undefined,
12041 renderBackdrop: renderBackdrop,
12042 renderDialog: renderDialog
12043 }, void 0, false, {
12044 fileName: Modal_jsxFileName,
12045 lineNumber: 476,
12046 columnNumber: 11
12047 }, undefined)
12048 }, void 0, false, {
12049 fileName: Modal_jsxFileName,
12050 lineNumber: 475,
12051 columnNumber: 9
12052 }, undefined);
12053});
12054Modal_Modal.displayName = 'Modal';
12055Modal_Modal.propTypes = Modal_propTypes;
12056/* harmony default export */ const src_Modal = (Object.assign(Modal_Modal, {
12057 Body: src_ModalBody,
12058 Header: src_ModalHeader,
12059 Title: src_ModalTitle,
12060 Footer: src_ModalFooter,
12061 Dialog: src_ModalDialog,
12062 TRANSITION_DURATION: 300,
12063 BACKDROP_TRANSITION_DURATION: 150
12064}));
12065// EXTERNAL MODULE: ./node_modules/prop-types-extra/lib/all.js
12066var lib_all = __webpack_require__(946);
12067var all_default = /*#__PURE__*/__webpack_require__.n(lib_all);
12068;// CONCATENATED MODULE: ./src/NavItem.tsx
12069var NavItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavItem.tsx";
12070
12071
12072
12073
12074const NavItem_NavItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
12075 className,
12076 bsPrefix,
12077 as: Component = 'div',
12078 ...props
12079}, ref) => {
12080 bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-item');
12081 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
12082 ref: ref,
12083 className: classnames_default()(className, bsPrefix),
12084 ...props
12085 }, void 0, false, {
12086 fileName: NavItem_jsxFileName,
12087 lineNumber: 15,
12088 columnNumber: 9
12089 }, undefined);
12090});
12091NavItem_NavItem.displayName = 'NavItem';
12092/* harmony default export */ const src_NavItem = (NavItem_NavItem);
12093;// CONCATENATED MODULE: ./src/NavLink.tsx
12094var NavLink_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavLink.tsx";
12095
12096
12097
12098
12099
12100
12101
12102
12103const NavLink_propTypes = {
12104 /**
12105 * @default 'nav-link'
12106 */
12107 bsPrefix: (prop_types_default()).string,
12108 /**
12109 * The active state of the NavItem item.
12110 */
12111 active: (prop_types_default()).bool,
12112 /**
12113 * The disabled state of the NavItem item.
12114 */
12115 disabled: (prop_types_default()).bool,
12116 /**
12117 * The ARIA role for the `NavLink`, In the context of a 'tablist' parent Nav,
12118 * the role defaults to 'tab'
12119 * */
12120 role: (prop_types_default()).string,
12121 /** The HTML href attribute for the `NavLink` */
12122 href: (prop_types_default()).string,
12123 /**
12124 * Uniquely identifies the `NavItem` amongst its siblings,
12125 * used to determine and control the active state of the parent `Nav`
12126 */
12127 eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
12128 /** @default 'a' */
12129 as: (prop_types_default()).elementType
12130};
12131const NavLink = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
12132 bsPrefix,
12133 className,
12134 as: Component = esm_Anchor,
12135 active,
12136 eventKey,
12137 disabled = false,
12138 ...props
12139}, ref) => {
12140 bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-link');
12141 const [navItemProps, meta] = useNavItem({
12142 key: makeEventKey(eventKey, props.href),
12143 active,
12144 disabled,
12145 ...props
12146 });
12147 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
12148 ...props,
12149 ...navItemProps,
12150 ref: ref,
12151 disabled: disabled,
12152 className: classnames_default()(className, bsPrefix, disabled && 'disabled', meta.isActive && 'active')
12153 }, void 0, false, {
12154 fileName: NavLink_jsxFileName,
12155 lineNumber: 76,
12156 columnNumber: 9
12157 }, undefined);
12158});
12159NavLink.displayName = 'NavLink';
12160NavLink.propTypes = NavLink_propTypes;
12161/* harmony default export */ const src_NavLink = (NavLink);
12162;// CONCATENATED MODULE: ./src/Nav.tsx
12163var Nav_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Nav.tsx";
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177const Nav_propTypes = {
12178 /**
12179 * @default 'nav'
12180 */
12181 bsPrefix: (prop_types_default()).string,
12182 /** @private */
12183 navbarBsPrefix: (prop_types_default()).string,
12184 /** @private */
12185 cardHeaderBsPrefix: (prop_types_default()).string,
12186 /**
12187 * The visual variant of the nav items.
12188 *
12189 * @type {('tabs'| 'pills' | 'underline')}
12190 */
12191 variant: (prop_types_default()).string,
12192 /**
12193 * Marks the NavItem with a matching `eventKey` (or `href` if present) as active.
12194 */
12195 activeKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
12196 /**
12197 * The default active key that is selected on start.
12198 */
12199 defaultActiveKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
12200 /**
12201 * Have all `NavItem`s proportionately fill all available width.
12202 */
12203 fill: (prop_types_default()).bool,
12204 /**
12205 * Have all `NavItem`s evenly fill all available width.
12206 *
12207 * @type {boolean}
12208 */
12209 justify: all_default()((prop_types_default()).bool, ({
12210 justify,
12211 navbar
12212 }) => justify && navbar ? Error('justify navbar `Nav`s are not supported') : null),
12213 /**
12214 * A callback fired when a NavItem is selected.
12215 *
12216 * ```js
12217 * function (
12218 * Any eventKey,
12219 * SyntheticEvent event?
12220 * )
12221 * ```
12222 */
12223 onSelect: (prop_types_default()).func,
12224 /**
12225 * ARIA role for the Nav, in the context of a TabContainer, the default will
12226 * be set to "tablist", but can be overridden by the Nav when set explicitly.
12227 *
12228 * When the role is "tablist", NavLink focus is managed according to
12229 * the ARIA authoring practices for tabs:
12230 * https://www.w3.org/TR/2013/WD-wai-aria-practices-20130307/#tabpanel
12231 */
12232 role: (prop_types_default()).string,
12233 /**
12234 * Apply styling an alignment for use in a Navbar. This prop will be set
12235 * automatically when the Nav is used inside a Navbar.
12236 */
12237 navbar: (prop_types_default()).bool,
12238 /**
12239 * Enable vertical scrolling within the toggleable contents of a collapsed Navbar.
12240 */
12241 navbarScroll: (prop_types_default()).bool,
12242 as: (prop_types_default()).elementType,
12243 /** @private */
12244 onKeyDown: (prop_types_default()).func
12245};
12246const Nav_Nav = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((uncontrolledProps, ref) => {
12247 const {
12248 as = 'div',
12249 bsPrefix: initialBsPrefix,
12250 variant,
12251 fill = false,
12252 justify = false,
12253 navbar,
12254 navbarScroll,
12255 className,
12256 activeKey,
12257 ...props
12258 } = useUncontrolled(uncontrolledProps, {
12259 activeKey: 'onSelect'
12260 });
12261 const bsPrefix = useBootstrapPrefix(initialBsPrefix, 'nav');
12262 let navbarBsPrefix;
12263 let cardHeaderBsPrefix;
12264 let isNavbar = false;
12265 const navbarContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NavbarContext);
12266 const cardHeaderContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(CardHeaderContext);
12267 if (navbarContext) {
12268 navbarBsPrefix = navbarContext.bsPrefix;
12269 isNavbar = navbar == null ? true : navbar;
12270 } else if (cardHeaderContext) {
12271 ({
12272 cardHeaderBsPrefix
12273 } = cardHeaderContext);
12274 }
12275 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Nav, {
12276 as: as,
12277 ref: ref,
12278 activeKey: activeKey,
12279 className: classnames_default()(className, {
12280 [bsPrefix]: !isNavbar,
12281 [`${navbarBsPrefix}-nav`]: isNavbar,
12282 [`${navbarBsPrefix}-nav-scroll`]: isNavbar && navbarScroll,
12283 [`${cardHeaderBsPrefix}-${variant}`]: !!cardHeaderBsPrefix,
12284 [`${bsPrefix}-${variant}`]: !!variant,
12285 [`${bsPrefix}-fill`]: fill,
12286 [`${bsPrefix}-justified`]: justify
12287 }),
12288 ...props
12289 }, void 0, false, {
12290 fileName: Nav_jsxFileName,
12291 lineNumber: 143,
12292 columnNumber: 5
12293 }, undefined);
12294});
12295Nav_Nav.displayName = 'Nav';
12296Nav_Nav.propTypes = Nav_propTypes;
12297/* harmony default export */ const src_Nav = (Object.assign(Nav_Nav, {
12298 Item: src_NavItem,
12299 Link: src_NavLink
12300}));
12301;// CONCATENATED MODULE: ./src/NavbarBrand.tsx
12302var NavbarBrand_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavbarBrand.tsx";
12303
12304
12305
12306
12307
12308const NavbarBrand_propTypes = {
12309 /** @default 'navbar' */
12310 bsPrefix: (prop_types_default()).string,
12311 /**
12312 * An href, when provided the Brand will render as an `<a>` element (unless `as` is provided).
12313 */
12314 href: (prop_types_default()).string,
12315 /**
12316 * Set a custom element for this component.
12317 */
12318 as: (prop_types_default()).elementType
12319};
12320const NavbarBrand = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
12321 bsPrefix,
12322 className,
12323 as,
12324 ...props
12325}, ref) => {
12326 bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar-brand');
12327 const Component = as || (props.href ? 'a' : 'span');
12328 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
12329 ...props,
12330 ref: ref,
12331 className: classnames_default()(className, bsPrefix)
12332 }, void 0, false, {
12333 fileName: NavbarBrand_jsxFileName,
12334 lineNumber: 37,
12335 columnNumber: 9
12336 }, undefined);
12337});
12338NavbarBrand.displayName = 'NavbarBrand';
12339NavbarBrand.propTypes = NavbarBrand_propTypes;
12340/* harmony default export */ const src_NavbarBrand = (NavbarBrand);
12341;// CONCATENATED MODULE: ./src/NavbarCollapse.tsx
12342var NavbarCollapse_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavbarCollapse.tsx";
12343
12344
12345
12346
12347
12348
12349
12350const NavbarCollapse_propTypes = {
12351 /** @default 'navbar-collapse' */
12352 bsPrefix: (prop_types_default()).string
12353};
12354const NavbarCollapse = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
12355 children,
12356 bsPrefix,
12357 ...props
12358}, ref) => {
12359 bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar-collapse');
12360 const context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NavbarContext);
12361 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Collapse, {
12362 in: !!(context && context.expanded),
12363 ...props,
12364 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
12365 ref: ref,
12366 className: bsPrefix,
12367 children: children
12368 }, void 0, false, {
12369 fileName: NavbarCollapse_jsxFileName,
12370 lineNumber: 27,
12371 columnNumber: 9
12372 }, undefined)
12373 }, void 0, false, {
12374 fileName: NavbarCollapse_jsxFileName,
12375 lineNumber: 26,
12376 columnNumber: 7
12377 }, undefined);
12378});
12379NavbarCollapse.displayName = 'NavbarCollapse';
12380NavbarCollapse.propTypes = NavbarCollapse_propTypes;
12381/* harmony default export */ const src_NavbarCollapse = (NavbarCollapse);
12382;// CONCATENATED MODULE: ./src/NavbarToggle.tsx
12383var NavbarToggle_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavbarToggle.tsx";
12384
12385
12386
12387
12388
12389
12390
12391
12392const NavbarToggle_propTypes = {
12393 /** @default 'navbar-toggler' */
12394 bsPrefix: (prop_types_default()).string,
12395 /** An accessible ARIA label for the toggler button. */
12396 label: (prop_types_default()).string,
12397 /** @private */
12398 onClick: (prop_types_default()).func,
12399 /**
12400 * The toggle content. When empty, the default toggle will be rendered.
12401 */
12402 children: (prop_types_default()).node,
12403 as: (prop_types_default()).elementType
12404};
12405const NavbarToggle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
12406 bsPrefix,
12407 className,
12408 children,
12409 label = 'Toggle navigation',
12410 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
12411 as: Component = 'button',
12412 onClick,
12413 ...props
12414}, ref) => {
12415 bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar-toggler');
12416 const {
12417 onToggle,
12418 expanded
12419 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NavbarContext) || {};
12420 const handleClick = useEventCallback(e => {
12421 if (onClick) onClick(e);
12422 if (onToggle) onToggle();
12423 });
12424 if (Component === 'button') {
12425 props.type = 'button';
12426 }
12427 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
12428 ...props,
12429 ref: ref,
12430 onClick: handleClick,
12431 "aria-label": label,
12432 className: classnames_default()(className, bsPrefix, !expanded && 'collapsed'),
12433 children: children || /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
12434 className: `${bsPrefix}-icon`
12435 }, void 0, false, {
12436 fileName: NavbarToggle_jsxFileName,
12437 lineNumber: 73,
12438 columnNumber: 22
12439 }, undefined)
12440 }, void 0, false, {
12441 fileName: NavbarToggle_jsxFileName,
12442 lineNumber: 66,
12443 columnNumber: 7
12444 }, undefined);
12445});
12446NavbarToggle.displayName = 'NavbarToggle';
12447NavbarToggle.propTypes = NavbarToggle_propTypes;
12448/* harmony default export */ const src_NavbarToggle = (NavbarToggle);
12449;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMediaQuery.js
12450
12451
12452var matchersByWindow = new WeakMap();
12453var getMatcher = function getMatcher(query, targetWindow) {
12454 if (!query || !targetWindow) return undefined;
12455 var matchers = matchersByWindow.get(targetWindow) || new Map();
12456 matchersByWindow.set(targetWindow, matchers);
12457 var mql = matchers.get(query);
12458 if (!mql) {
12459 mql = targetWindow.matchMedia(query);
12460 mql.refCount = 0;
12461 matchers.set(mql.media, mql);
12462 }
12463 return mql;
12464};
12465/**
12466 * Match a media query and get updates as the match changes. The media string is
12467 * passed directly to `window.matchMedia` and run as a Layout Effect, so initial
12468 * matches are returned before the browser has a chance to paint.
12469 *
12470 * ```tsx
12471 * function Page() {
12472 * const isWide = useMediaQuery('min-width: 1000px')
12473 *
12474 * return isWide ? "very wide" : 'not so wide'
12475 * }
12476 * ```
12477 *
12478 * Media query lists are also reused globally, hook calls for the same query
12479 * will only create a matcher once under the hood.
12480 *
12481 * @param query A media query
12482 * @param targetWindow The window to match against, uses the globally available one as a default.
12483 */
12484
12485function useMediaQuery(query, targetWindow) {
12486 if (targetWindow === void 0) {
12487 targetWindow = typeof window === 'undefined' ? undefined : window;
12488 }
12489 var mql = getMatcher(query, targetWindow);
12490 var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(function () {
12491 return mql ? mql.matches : false;
12492 }),
12493 matches = _useState[0],
12494 setMatches = _useState[1];
12495 useIsomorphicEffect(function () {
12496 var mql = getMatcher(query, targetWindow);
12497 if (!mql) {
12498 return setMatches(false);
12499 }
12500 var matchers = matchersByWindow.get(targetWindow);
12501 var handleChange = function handleChange() {
12502 setMatches(mql.matches);
12503 };
12504 mql.refCount++;
12505 mql.addListener(handleChange);
12506 handleChange();
12507 return function () {
12508 mql.removeListener(handleChange);
12509 mql.refCount--;
12510 if (mql.refCount <= 0) {
12511 matchers == null ? void 0 : matchers.delete(mql.media);
12512 }
12513 mql = undefined;
12514 };
12515 }, [query]);
12516 return matches;
12517}
12518;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useBreakpoint.js
12519
12520
12521
12522/**
12523 * Create a responsive hook we a set of breakpoint names and widths.
12524 * You can use any valid css units as well as a numbers (for pixels).
12525 *
12526 * **NOTE:** The object key order is important! it's assumed to be in order from smallest to largest
12527 *
12528 * ```ts
12529 * const useBreakpoint = createBreakpointHook({
12530 * xs: 0,
12531 * sm: 576,
12532 * md: 768,
12533 * lg: 992,
12534 * xl: 1200,
12535 * })
12536 * ```
12537 *
12538 * **Watch out!** using string values will sometimes construct media queries using css `calc()` which
12539 * is NOT supported in media queries by all browsers at the moment. use numbers for
12540 * the widest range of browser support.
12541 *
12542 * @param breakpointValues A object hash of names to breakpoint dimensions
12543 */
12544function createBreakpointHook(breakpointValues) {
12545 var names = Object.keys(breakpointValues);
12546 function and(query, next) {
12547 if (query === next) {
12548 return next;
12549 }
12550 return query ? query + " and " + next : next;
12551 }
12552 function getNext(breakpoint) {
12553 return names[Math.min(names.indexOf(breakpoint) + 1, names.length - 1)];
12554 }
12555 function getMaxQuery(breakpoint) {
12556 var next = getNext(breakpoint);
12557 var value = breakpointValues[next];
12558 if (typeof value === 'number') value = value - 0.2 + "px";else value = "calc(" + value + " - 0.2px)";
12559 return "(max-width: " + value + ")";
12560 }
12561 function getMinQuery(breakpoint) {
12562 var value = breakpointValues[breakpoint];
12563 if (typeof value === 'number') {
12564 value = value + "px";
12565 }
12566 return "(min-width: " + value + ")";
12567 }
12568 /**
12569 * Match a set of breakpoints
12570 *
12571 * ```tsx
12572 * const MidSizeOnly = () => {
12573 * const isMid = useBreakpoint({ lg: 'down', sm: 'up' });
12574 *
12575 * if (isMid) return <div>On a Reasonable sized Screen!</div>
12576 * return null;
12577 * }
12578 * ```
12579 * @param breakpointMap An object map of breakpoints and directions, queries are constructed using "and" to join
12580 * breakpoints together
12581 * @param window Optionally specify the target window to match against (useful when rendering into iframes)
12582 */
12583
12584 function useBreakpoint(breakpointOrMap, direction, window) {
12585 var breakpointMap;
12586 if (typeof breakpointOrMap === 'object') {
12587 breakpointMap = breakpointOrMap;
12588 window = direction;
12589 direction = true;
12590 } else {
12591 var _breakpointMap;
12592 direction = direction || true;
12593 breakpointMap = (_breakpointMap = {}, _breakpointMap[breakpointOrMap] = direction, _breakpointMap);
12594 }
12595 var query = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
12596 return Object.entries(breakpointMap).reduce(function (query, _ref) {
12597 var key = _ref[0],
12598 direction = _ref[1];
12599 if (direction === 'up' || direction === true) {
12600 query = and(query, getMinQuery(key));
12601 }
12602 if (direction === 'down' || direction === true) {
12603 query = and(query, getMaxQuery(key));
12604 }
12605 return query;
12606 }, '');
12607 }, [JSON.stringify(breakpointMap)]);
12608 return useMediaQuery(query, window);
12609 }
12610 return useBreakpoint;
12611}
12612var useBreakpoint = createBreakpointHook({
12613 xs: 0,
12614 sm: 576,
12615 md: 768,
12616 lg: 992,
12617 xl: 1200,
12618 xxl: 1400
12619});
12620/* harmony default export */ const esm_useBreakpoint = (useBreakpoint);
12621;// CONCATENATED MODULE: ./src/OffcanvasBody.tsx
12622var OffcanvasBody_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/OffcanvasBody.tsx";
12623
12624
12625
12626
12627const OffcanvasBody = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
12628 className,
12629 bsPrefix,
12630 as: Component = 'div',
12631 ...props
12632}, ref) => {
12633 bsPrefix = useBootstrapPrefix(bsPrefix, 'offcanvas-body');
12634 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
12635 ref: ref,
12636 className: classnames_default()(className, bsPrefix),
12637 ...props
12638 }, void 0, false, {
12639 fileName: OffcanvasBody_jsxFileName,
12640 lineNumber: 15,
12641 columnNumber: 9
12642 }, undefined);
12643});
12644OffcanvasBody.displayName = 'OffcanvasBody';
12645/* harmony default export */ const src_OffcanvasBody = (OffcanvasBody);
12646;// CONCATENATED MODULE: ./src/OffcanvasToggling.tsx
12647var OffcanvasToggling_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/OffcanvasToggling.tsx";
12648
12649
12650
12651
12652
12653
12654
12655
12656const OffcanvasToggling_propTypes = {
12657 /**
12658 * Show the component; triggers the fade in or fade out animation
12659 */
12660 in: (prop_types_default()).bool,
12661 /**
12662 * Wait until the first "enter" transition to mount the component (add it to the DOM)
12663 */
12664 mountOnEnter: (prop_types_default()).bool,
12665 /**
12666 * Unmount the component (remove it from the DOM) when it is faded out
12667 */
12668 unmountOnExit: (prop_types_default()).bool,
12669 /**
12670 * Run the fade in animation when the component mounts, if it is initially
12671 * shown
12672 */
12673 appear: (prop_types_default()).bool,
12674 /**
12675 * Duration of the fade animation in milliseconds, to ensure that finishing
12676 * callbacks are fired even if the original browser transition end events are
12677 * canceled
12678 */
12679 timeout: (prop_types_default()).number,
12680 /**
12681 * Callback fired before the component fades in
12682 */
12683 onEnter: (prop_types_default()).func,
12684 /**
12685 * Callback fired after the component starts to fade in
12686 */
12687 onEntering: (prop_types_default()).func,
12688 /**
12689 * Callback fired after the has component faded in
12690 */
12691 onEntered: (prop_types_default()).func,
12692 /**
12693 * Callback fired before the component fades out
12694 */
12695 onExit: (prop_types_default()).func,
12696 /**
12697 * Callback fired after the component starts to fade out
12698 */
12699 onExiting: (prop_types_default()).func,
12700 /**
12701 * Callback fired after the component has faded out
12702 */
12703 onExited: (prop_types_default()).func
12704};
12705const transitionStyles = {
12706 [ENTERING]: 'show',
12707 [ENTERED]: 'show'
12708};
12709const OffcanvasToggling = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
12710 bsPrefix,
12711 className,
12712 children,
12713 in: inProp = false,
12714 mountOnEnter = false,
12715 unmountOnExit = false,
12716 appear = false,
12717 ...props
12718}, ref) => {
12719 bsPrefix = useBootstrapPrefix(bsPrefix, 'offcanvas');
12720 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_TransitionWrapper, {
12721 ref: ref,
12722 addEndListener: transitionEndListener,
12723 in: inProp,
12724 mountOnEnter: mountOnEnter,
12725 unmountOnExit: unmountOnExit,
12726 appear: appear,
12727 ...props,
12728 childRef: children.ref,
12729 children: (status, innerProps) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(children, {
12730 ...innerProps,
12731 className: classnames_default()(className, children.props.className, (status === ENTERING || status === EXITING) && `${bsPrefix}-toggling`, transitionStyles[status])
12732 })
12733 }, void 0, false, {
12734 fileName: OffcanvasToggling_jsxFileName,
12735 lineNumber: 108,
12736 columnNumber: 7
12737 }, undefined);
12738});
12739OffcanvasToggling.propTypes = OffcanvasToggling_propTypes;
12740OffcanvasToggling.displayName = 'OffcanvasToggling';
12741/* harmony default export */ const src_OffcanvasToggling = (OffcanvasToggling);
12742;// CONCATENATED MODULE: ./src/OffcanvasHeader.tsx
12743var OffcanvasHeader_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/OffcanvasHeader.tsx";
12744
12745
12746
12747
12748
12749
12750const OffcanvasHeader_propTypes = {
12751 /**
12752 * @default 'offcanvas-header'
12753 */
12754 bsPrefix: (prop_types_default()).string,
12755 /**
12756 * Provides an accessible label for the close
12757 * button. It is used for Assistive Technology when the label text is not
12758 * readable.
12759 */
12760 closeLabel: (prop_types_default()).string,
12761 /**
12762 * Sets the variant for close button.
12763 */
12764 closeVariant: prop_types_default().oneOf(['white']),
12765 /**
12766 * Specify whether the Component should contain a close button
12767 */
12768 closeButton: (prop_types_default()).bool,
12769 /**
12770 * A Callback fired when the close button is clicked. If used directly inside
12771 * a Offcanvas component, the onHide will automatically be propagated up to the
12772 * parent Offcanvas `onHide`.
12773 */
12774 onHide: (prop_types_default()).func
12775};
12776const OffcanvasHeader = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
12777 bsPrefix,
12778 className,
12779 closeLabel = 'Close',
12780 closeButton = false,
12781 ...props
12782}, ref) => {
12783 bsPrefix = useBootstrapPrefix(bsPrefix, 'offcanvas-header');
12784 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_AbstractModalHeader, {
12785 ref: ref,
12786 ...props,
12787 className: classnames_default()(className, bsPrefix),
12788 closeLabel: closeLabel,
12789 closeButton: closeButton
12790 }, void 0, false, {
12791 fileName: OffcanvasHeader_jsxFileName,
12792 lineNumber: 59,
12793 columnNumber: 7
12794 }, undefined);
12795});
12796OffcanvasHeader.displayName = 'OffcanvasHeader';
12797OffcanvasHeader.propTypes = OffcanvasHeader_propTypes;
12798/* harmony default export */ const src_OffcanvasHeader = (OffcanvasHeader);
12799;// CONCATENATED MODULE: ./src/OffcanvasTitle.tsx
12800var OffcanvasTitle_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/OffcanvasTitle.tsx";
12801
12802
12803
12804
12805
12806const OffcanvasTitle_DivStyledAsH5 = divWithClassName('h5');
12807const OffcanvasTitle = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
12808 className,
12809 bsPrefix,
12810 as: Component = OffcanvasTitle_DivStyledAsH5,
12811 ...props
12812}, ref) => {
12813 bsPrefix = useBootstrapPrefix(bsPrefix, 'offcanvas-title');
12814 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
12815 ref: ref,
12816 className: classnames_default()(className, bsPrefix),
12817 ...props
12818 }, void 0, false, {
12819 fileName: OffcanvasTitle_jsxFileName,
12820 lineNumber: 20,
12821 columnNumber: 7
12822 }, undefined);
12823});
12824OffcanvasTitle.displayName = 'OffcanvasTitle';
12825/* harmony default export */ const src_OffcanvasTitle = (OffcanvasTitle);
12826;// CONCATENATED MODULE: ./src/Offcanvas.tsx
12827var Offcanvas_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Offcanvas.tsx";
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846const Offcanvas_propTypes = {
12847 /**
12848 * @default 'offcanvas'
12849 */
12850 bsPrefix: (prop_types_default()).string,
12851 /**
12852 * Include a backdrop component. Specify 'static' for a backdrop that doesn't
12853 * trigger an "onHide" when clicked.
12854 */
12855 backdrop: prop_types_default().oneOf(['static', true, false]),
12856 /**
12857 * Add an optional extra class name to .offcanvas-backdrop.
12858 */
12859 backdropClassName: (prop_types_default()).string,
12860 /**
12861 * Closes the offcanvas when escape key is pressed.
12862 */
12863 keyboard: (prop_types_default()).bool,
12864 /**
12865 * Allow body scrolling while offcanvas is open.
12866 */
12867 scroll: (prop_types_default()).bool,
12868 /**
12869 * Which side of the viewport the offcanvas will appear from.
12870 */
12871 placement: prop_types_default().oneOf(['start', 'end', 'top', 'bottom']),
12872 /**
12873 * Hide content outside the viewport from a specified breakpoint and down.
12874 * @type {("sm"|"md"|"lg"|"xl"|"xxl")}
12875 */
12876 responsive: (prop_types_default()).string,
12877 /**
12878 * When `true` The offcanvas will automatically shift focus to itself when it
12879 * opens, and replace it to the last focused element when it closes.
12880 * Generally this should never be set to false as it makes the offcanvas less
12881 * accessible to assistive technologies, like screen-readers.
12882 */
12883 autoFocus: (prop_types_default()).bool,
12884 /**
12885 * When `true` The offcanvas will prevent focus from leaving the offcanvas while
12886 * open. Consider leaving the default value here, as it is necessary to make
12887 * the offcanvas work well with assistive technologies, such as screen readers.
12888 */
12889 enforceFocus: (prop_types_default()).bool,
12890 /**
12891 * When `true` The offcanvas will restore focus to previously focused element once
12892 * offcanvas is hidden
12893 */
12894 restoreFocus: (prop_types_default()).bool,
12895 /**
12896 * Options passed to focus function when `restoreFocus` is set to `true`
12897 *
12898 * @link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#Parameters
12899 */
12900 restoreFocusOptions: prop_types_default().shape({
12901 preventScroll: (prop_types_default()).bool
12902 }),
12903 /**
12904 * When `true` The offcanvas will show itself.
12905 */
12906 show: (prop_types_default()).bool,
12907 /**
12908 * A callback fired when the offcanvas is opening.
12909 */
12910 onShow: (prop_types_default()).func,
12911 /**
12912 * A callback fired when the header closeButton or backdrop is
12913 * clicked. Required if either are specified.
12914 */
12915 onHide: (prop_types_default()).func,
12916 /**
12917 * A callback fired when the escape key, if specified in `keyboard`, is pressed.
12918 */
12919 onEscapeKeyDown: (prop_types_default()).func,
12920 /**
12921 * Callback fired before the offcanvas transitions in
12922 */
12923 onEnter: (prop_types_default()).func,
12924 /**
12925 * Callback fired as the offcanvas begins to transition in
12926 */
12927 onEntering: (prop_types_default()).func,
12928 /**
12929 * Callback fired after the offcanvas finishes transitioning in
12930 */
12931 onEntered: (prop_types_default()).func,
12932 /**
12933 * Callback fired right before the offcanvas transitions out
12934 */
12935 onExit: (prop_types_default()).func,
12936 /**
12937 * Callback fired as the offcanvas begins to transition out
12938 */
12939 onExiting: (prop_types_default()).func,
12940 /**
12941 * Callback fired after the offcanvas finishes transitioning out
12942 */
12943 onExited: (prop_types_default()).func,
12944 /**
12945 * @private
12946 */
12947 container: (prop_types_default()).any,
12948 /**
12949 * For internal use to render static node from NavbarOffcanvas.
12950 *
12951 * @private
12952 */
12953 renderStaticNode: (prop_types_default()).bool,
12954 'aria-labelledby': (prop_types_default()).string
12955};
12956function Offcanvas_DialogTransition(props) {
12957 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_OffcanvasToggling, {
12958 ...props
12959 }, void 0, false, {
12960 fileName: Offcanvas_jsxFileName,
12961 lineNumber: 191,
12962 columnNumber: 10
12963 }, this);
12964}
12965function Offcanvas_BackdropTransition(props) {
12966 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Fade, {
12967 ...props
12968 }, void 0, false, {
12969 fileName: Offcanvas_jsxFileName,
12970 lineNumber: 195,
12971 columnNumber: 10
12972 }, this);
12973}
12974const Offcanvas = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
12975 bsPrefix,
12976 className,
12977 children,
12978 'aria-labelledby': ariaLabelledby,
12979 placement = 'start',
12980 responsive,
12981 /* BaseModal props */
12982
12983 show = false,
12984 backdrop = true,
12985 keyboard = true,
12986 scroll = false,
12987 onEscapeKeyDown,
12988 onShow,
12989 onHide,
12990 container,
12991 autoFocus = true,
12992 enforceFocus = true,
12993 restoreFocus = true,
12994 restoreFocusOptions,
12995 onEntered,
12996 onExit,
12997 onExiting,
12998 onEnter,
12999 onEntering,
13000 onExited,
13001 backdropClassName,
13002 manager: propsManager,
13003 renderStaticNode = false,
13004 ...props
13005}, ref) => {
13006 const modalManager = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
13007 bsPrefix = useBootstrapPrefix(bsPrefix, 'offcanvas');
13008 const {
13009 onToggle
13010 } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NavbarContext) || {};
13011 const [showOffcanvas, setShowOffcanvas] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false);
13012 const hideResponsiveOffcanvas = esm_useBreakpoint(responsive || 'xs', 'up');
13013 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
13014 // Handles the case where screen is resized while the responsive
13015 // offcanvas is shown. If `responsive` not provided, just use `show`.
13016 setShowOffcanvas(responsive ? show && !hideResponsiveOffcanvas : show);
13017 }, [show, responsive, hideResponsiveOffcanvas]);
13018 const handleHide = useEventCallback(() => {
13019 onToggle == null ? void 0 : onToggle();
13020 onHide == null ? void 0 : onHide();
13021 });
13022 const modalContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
13023 onHide: handleHide
13024 }), [handleHide]);
13025 function getModalManager() {
13026 if (propsManager) return propsManager;
13027 if (scroll) {
13028 // Have to use a different modal manager since the shared
13029 // one handles overflow.
13030 if (!modalManager.current) modalManager.current = new src_BootstrapModalManager({
13031 handleContainerOverflow: false
13032 });
13033 return modalManager.current;
13034 }
13035 return getSharedManager();
13036 }
13037 const handleEnter = (node, ...args) => {
13038 if (node) node.style.visibility = 'visible';
13039 onEnter == null ? void 0 : onEnter(node, ...args);
13040 };
13041 const handleExited = (node, ...args) => {
13042 if (node) node.style.visibility = '';
13043 onExited == null ? void 0 : onExited(...args);
13044 };
13045 const renderBackdrop = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(backdropProps => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
13046 ...backdropProps,
13047 className: classnames_default()(`${bsPrefix}-backdrop`, backdropClassName)
13048 }, void 0, false, {
13049 fileName: Offcanvas_jsxFileName,
13050 lineNumber: 291,
13051 columnNumber: 11
13052 }, undefined), [backdropClassName, bsPrefix]);
13053 const renderDialog = dialogProps => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
13054 ...dialogProps,
13055 ...props,
13056 className: classnames_default()(className, responsive ? `${bsPrefix}-${responsive}` : bsPrefix, `${bsPrefix}-${placement}`),
13057 "aria-labelledby": ariaLabelledby,
13058 children: children
13059 }, void 0, false, {
13060 fileName: Offcanvas_jsxFileName,
13061 lineNumber: 300,
13062 columnNumber: 9
13063 }, undefined);
13064 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(jsx_dev_runtime.Fragment, {
13065 children: [!showOffcanvas && (responsive || renderStaticNode) && renderDialog({}), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_ModalContext.Provider, {
13066 value: modalContext,
13067 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Modal, {
13068 show: showOffcanvas,
13069 ref: ref,
13070 backdrop: backdrop,
13071 container: container,
13072 keyboard: keyboard,
13073 autoFocus: autoFocus,
13074 enforceFocus: enforceFocus && !scroll,
13075 restoreFocus: restoreFocus,
13076 restoreFocusOptions: restoreFocusOptions,
13077 onEscapeKeyDown: onEscapeKeyDown,
13078 onShow: onShow,
13079 onHide: handleHide,
13080 onEnter: handleEnter,
13081 onEntering: onEntering,
13082 onEntered: onEntered,
13083 onExit: onExit,
13084 onExiting: onExiting,
13085 onExited: handleExited,
13086 manager: getModalManager(),
13087 transition: Offcanvas_DialogTransition,
13088 backdropTransition: Offcanvas_BackdropTransition,
13089 renderBackdrop: renderBackdrop,
13090 renderDialog: renderDialog
13091 }, void 0, false, {
13092 fileName: Offcanvas_jsxFileName,
13093 lineNumber: 328,
13094 columnNumber: 13
13095 }, undefined)
13096 }, void 0, false, {
13097 fileName: Offcanvas_jsxFileName,
13098 lineNumber: 327,
13099 columnNumber: 11
13100 }, undefined)]
13101 }, void 0, true);
13102});
13103Offcanvas.displayName = 'Offcanvas';
13104Offcanvas.propTypes = Offcanvas_propTypes;
13105/* harmony default export */ const src_Offcanvas = (Object.assign(Offcanvas, {
13106 Body: src_OffcanvasBody,
13107 Header: src_OffcanvasHeader,
13108 Title: src_OffcanvasTitle
13109}));
13110;// CONCATENATED MODULE: ./src/NavbarOffcanvas.tsx
13111var NavbarOffcanvas_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavbarOffcanvas.tsx";
13112
13113
13114
13115
13116
13117const NavbarOffcanvas = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
13118 const context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NavbarContext);
13119 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Offcanvas, {
13120 ref: ref,
13121 show: !!(context != null && context.expanded),
13122 ...props,
13123 renderStaticNode: true
13124 }, void 0, false, {
13125 fileName: NavbarOffcanvas_jsxFileName,
13126 lineNumber: 13,
13127 columnNumber: 7
13128 }, undefined);
13129});
13130NavbarOffcanvas.displayName = 'NavbarOffcanvas';
13131/* harmony default export */ const src_NavbarOffcanvas = (NavbarOffcanvas);
13132;// CONCATENATED MODULE: ./src/NavbarText.tsx
13133var NavbarText_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavbarText.tsx";
13134
13135
13136
13137
13138const NavbarText = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
13139 className,
13140 bsPrefix,
13141 as: Component = 'span',
13142 ...props
13143}, ref) => {
13144 bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar-text');
13145 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
13146 ref: ref,
13147 className: classnames_default()(className, bsPrefix),
13148 ...props
13149 }, void 0, false, {
13150 fileName: NavbarText_jsxFileName,
13151 lineNumber: 15,
13152 columnNumber: 9
13153 }, undefined);
13154});
13155NavbarText.displayName = 'NavbarText';
13156/* harmony default export */ const src_NavbarText = (NavbarText);
13157;// CONCATENATED MODULE: ./src/Navbar.tsx
13158var Navbar_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Navbar.tsx";
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173const Navbar_propTypes = {
13174 /** @default 'navbar' */
13175 bsPrefix: (prop_types_default()).string,
13176 /**
13177 * The general visual variant a the Navbar.
13178 * Use in combination with the `bg` prop, `background-color` utilities,
13179 * or your own background styles.
13180 *
13181 * @type {('light'|'dark')}
13182 */
13183 variant: (prop_types_default()).string,
13184 /**
13185 * The breakpoint, below which, the Navbar will collapse.
13186 * When `true` the Navbar will always be expanded regardless of screen size.
13187 */
13188 expand: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).string]),
13189 /**
13190 * A convenience prop for adding `bg-*` utility classes since they are so commonly used here.
13191 * `light` and `dark` are common choices but any `bg-*` class is supported, including any custom ones you might define.
13192 *
13193 * Pairs nicely with the `variant` prop.
13194 */
13195 bg: (prop_types_default()).string,
13196 /**
13197 * Create a fixed navbar along the top or bottom of the screen, that scrolls with the
13198 * page. A convenience prop for the `fixed-*` positioning classes.
13199 */
13200 fixed: prop_types_default().oneOf(['top', 'bottom']),
13201 /**
13202 * Position the navbar at the top of the viewport, but only after scrolling past it.
13203 * A convenience prop for the `sticky-top` positioning class.
13204 *
13205 * __Not supported in <= IE11 and other older browsers without a polyfill__
13206 */
13207 sticky: prop_types_default().oneOf(['top']),
13208 /**
13209 * Set a custom element for this component.
13210 */
13211 as: (prop_types_default()).elementType,
13212 /**
13213 * A callback fired when the `<Navbar>` body collapses or expands. Fired when
13214 * a `<Navbar.Toggle>` is clicked and called with the new `expanded`
13215 * boolean value.
13216 *
13217 * @controllable expanded
13218 */
13219 onToggle: (prop_types_default()).func,
13220 /**
13221 * A callback fired when a descendant of a child `<Nav>` is selected. Should
13222 * be used to execute complex closing or other miscellaneous actions desired
13223 * after selecting a descendant of `<Nav>`. Does nothing if no `<Nav>` or `<Nav>`
13224 * descendants exist. The callback is called with an eventKey, which is a
13225 * prop from the selected `<Nav>` descendant, and an event.
13226 *
13227 * ```js
13228 * function (
13229 * eventKey: mixed,
13230 * event?: SyntheticEvent
13231 * )
13232 * ```
13233 *
13234 * For basic closing behavior after all `<Nav>` descendant onSelect events in
13235 * mobile viewports, try using collapseOnSelect.
13236 *
13237 * Note: If you are manually closing the navbar using this `OnSelect` prop,
13238 * ensure that you are setting `expanded` to false and not *toggling* between
13239 * true and false.
13240 */
13241 onSelect: (prop_types_default()).func,
13242 /**
13243 * Toggles `expanded` to `false` after the onSelect event of a descendant of a
13244 * child `<Nav>` fires. Does nothing if no `<Nav>` or `<Nav>` descendants exist.
13245 *
13246 * Manually controlling `expanded` via the onSelect callback is recommended instead,
13247 * for more complex operations that need to be executed after
13248 * the `select` event of `<Nav>` descendants.
13249 */
13250 collapseOnSelect: (prop_types_default()).bool,
13251 /**
13252 * Controls the visibility of the navbar body
13253 *
13254 * @controllable onToggle
13255 */
13256 expanded: (prop_types_default()).bool,
13257 /**
13258 * The ARIA role for the navbar, will default to 'navigation' for
13259 * Navbars whose `as` is something other than `<nav>`.
13260 *
13261 * @default 'navigation'
13262 */
13263 role: (prop_types_default()).string
13264};
13265const Navbar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
13266 const {
13267 bsPrefix: initialBsPrefix,
13268 expand = true,
13269 variant = 'light',
13270 bg,
13271 fixed,
13272 sticky,
13273 className,
13274 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
13275 as: Component = 'nav',
13276 expanded,
13277 onToggle,
13278 onSelect,
13279 collapseOnSelect = false,
13280 ...controlledProps
13281 } = useUncontrolled(props, {
13282 expanded: 'onToggle'
13283 });
13284 const bsPrefix = useBootstrapPrefix(initialBsPrefix, 'navbar');
13285 const handleCollapse = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((...args) => {
13286 onSelect == null ? void 0 : onSelect(...args);
13287 if (collapseOnSelect && expanded) {
13288 onToggle == null ? void 0 : onToggle(false);
13289 }
13290 }, [onSelect, collapseOnSelect, expanded, onToggle]);
13291
13292 // will result in some false positives but that seems better
13293 // than false negatives. strict `undefined` check allows explicit
13294 // "nulling" of the role if the user really doesn't want one
13295 if (controlledProps.role === undefined && Component !== 'nav') {
13296 controlledProps.role = 'navigation';
13297 }
13298 let expandClass = `${bsPrefix}-expand`;
13299 if (typeof expand === 'string') expandClass = `${expandClass}-${expand}`;
13300 const navbarContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
13301 onToggle: () => onToggle == null ? void 0 : onToggle(!expanded),
13302 bsPrefix,
13303 expanded: !!expanded,
13304 expand
13305 }), [bsPrefix, expanded, expand, onToggle]);
13306 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(NavbarContext.Provider, {
13307 value: navbarContext,
13308 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_SelectableContext.Provider, {
13309 value: handleCollapse,
13310 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
13311 ref: ref,
13312 ...controlledProps,
13313 className: classnames_default()(className, bsPrefix, expand && expandClass, variant && `${bsPrefix}-${variant}`, bg && `bg-${bg}`, sticky && `sticky-${sticky}`, fixed && `fixed-${fixed}`)
13314 }, void 0, false, {
13315 fileName: Navbar_jsxFileName,
13316 lineNumber: 191,
13317 columnNumber: 11
13318 }, undefined)
13319 }, void 0, false, {
13320 fileName: Navbar_jsxFileName,
13321 lineNumber: 190,
13322 columnNumber: 9
13323 }, undefined)
13324 }, void 0, false, {
13325 fileName: Navbar_jsxFileName,
13326 lineNumber: 189,
13327 columnNumber: 7
13328 }, undefined);
13329});
13330Navbar.propTypes = Navbar_propTypes;
13331Navbar.displayName = 'Navbar';
13332/* harmony default export */ const src_Navbar = (Object.assign(Navbar, {
13333 Brand: src_NavbarBrand,
13334 Collapse: src_NavbarCollapse,
13335 Offcanvas: src_NavbarOffcanvas,
13336 Text: src_NavbarText,
13337 Toggle: src_NavbarToggle
13338}));
13339;// CONCATENATED MODULE: ./src/NavDropdown.tsx
13340var NavDropdown_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/NavDropdown.tsx";
13341
13342
13343
13344
13345
13346
13347
13348const NavDropdown_propTypes = {
13349 /**
13350 * An html id attribute for the Toggle button, necessary for assistive technologies, such as screen readers.
13351 * @type {string}
13352 */
13353 id: (prop_types_default()).string,
13354 /** An `onClick` handler passed to the Toggle component */
13355 onClick: (prop_types_default()).func,
13356 /** The content of the non-toggle Button. */
13357 title: (prop_types_default()).node.isRequired,
13358 /** Disables the toggle NavLink */
13359 disabled: (prop_types_default()).bool,
13360 /** Style the toggle NavLink as active */
13361 active: (prop_types_default()).bool,
13362 /** An ARIA accessible role applied to the Menu component. When set to 'menu', The dropdown */
13363 menuRole: (prop_types_default()).string,
13364 /** Whether to render the dropdown menu in the DOM before the first time it is shown */
13365 renderMenuOnMount: (prop_types_default()).bool,
13366 /**
13367 * Which event when fired outside the component will cause it to be closed.
13368 *
13369 * _see [DropdownMenu](#menu-props) for more details_
13370 */
13371 rootCloseEvent: (prop_types_default()).string,
13372 /**
13373 * Menu color variant.
13374 *
13375 * Omitting this will use the default light color.
13376 */
13377 menuVariant: prop_types_default().oneOf(['dark']),
13378 /** @ignore */
13379 bsPrefix: (prop_types_default()).string
13380};
13381const NavDropdown = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
13382 id,
13383 title,
13384 children,
13385 bsPrefix,
13386 className,
13387 rootCloseEvent,
13388 menuRole,
13389 disabled,
13390 active,
13391 renderMenuOnMount,
13392 menuVariant,
13393 ...props
13394}, ref) => {
13395 /* NavItem has no additional logic, it's purely presentational. Can set nav item class here to support "as" */
13396 const navItemPrefix = useBootstrapPrefix(undefined, 'nav-item');
13397 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Dropdown, {
13398 ref: ref,
13399 ...props,
13400 className: classnames_default()(className, navItemPrefix),
13401 children: [/*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Dropdown.Toggle, {
13402 id: id,
13403 eventKey: null,
13404 active: active,
13405 disabled: disabled,
13406 childBsPrefix: bsPrefix,
13407 as: src_NavLink,
13408 children: title
13409 }, void 0, false, {
13410 fileName: NavDropdown_jsxFileName,
13411 lineNumber: 92,
13412 columnNumber: 11
13413 }, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Dropdown.Menu, {
13414 role: menuRole,
13415 renderOnMount: renderMenuOnMount,
13416 rootCloseEvent: rootCloseEvent,
13417 variant: menuVariant,
13418 children: children
13419 }, void 0, false, {
13420 fileName: NavDropdown_jsxFileName,
13421 lineNumber: 103,
13422 columnNumber: 11
13423 }, undefined)]
13424 }, void 0, true, {
13425 fileName: NavDropdown_jsxFileName,
13426 lineNumber: 87,
13427 columnNumber: 9
13428 }, undefined);
13429});
13430NavDropdown.displayName = 'NavDropdown';
13431NavDropdown.propTypes = NavDropdown_propTypes;
13432/* harmony default export */ const src_NavDropdown = (Object.assign(NavDropdown, {
13433 Item: src_Dropdown.Item,
13434 ItemText: src_Dropdown.ItemText,
13435 Divider: src_Dropdown.Divider,
13436 Header: src_Dropdown.Header
13437}));
13438;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/useRootClose.js
13439
13440
13441
13442
13443
13444
13445const useRootClose_noop = () => {};
13446/**
13447 * The `useRootClose` hook registers your callback on the document
13448 * when rendered. Powers the `<Overlay/>` component. This is used achieve modal
13449 * style behavior where your callback is triggered when the user tries to
13450 * interact with the rest of the document or hits the `esc` key.
13451 *
13452 * @param {Ref<HTMLElement>| HTMLElement} ref The element boundary
13453 * @param {function} onRootClose
13454 * @param {object=} options
13455 * @param {boolean=} options.disabled
13456 * @param {string=} options.clickTrigger The DOM event name (click, mousedown, etc) to attach listeners on
13457 */
13458function useRootClose(ref, onRootClose, {
13459 disabled,
13460 clickTrigger
13461} = {}) {
13462 const onClose = onRootClose || useRootClose_noop;
13463 esm_useClickOutside(ref, onClose, {
13464 disabled,
13465 clickTrigger
13466 });
13467 const handleKeyUp = useEventCallback(e => {
13468 if (isEscKey(e)) {
13469 onClose(e);
13470 }
13471 });
13472 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
13473 if (disabled || ref == null) return undefined;
13474 const doc = ownerDocument(getRefTarget(ref));
13475
13476 // Store the current event to avoid triggering handlers immediately
13477 // https://github.com/facebook/react/issues/20074
13478 let currentEvent = (doc.defaultView || window).event;
13479 const removeKeyupListener = esm_listen(doc, 'keyup', e => {
13480 // skip if this event is the same as the one running when we added the handlers
13481 if (e === currentEvent) {
13482 currentEvent = undefined;
13483 return;
13484 }
13485 handleKeyUp(e);
13486 });
13487 return () => {
13488 removeKeyupListener();
13489 };
13490 }, [ref, disabled, handleKeyUp]);
13491}
13492/* harmony default export */ const esm_useRootClose = (useRootClose);
13493;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/Overlay.js
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504/**
13505 * Built on top of `Popper.js`, the overlay component is
13506 * great for custom tooltip overlays.
13507 */
13508const Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, outerRef) => {
13509 const {
13510 flip,
13511 offset,
13512 placement,
13513 containerPadding,
13514 popperConfig = {},
13515 transition: Transition,
13516 runTransition
13517 } = props;
13518 const [rootElement, attachRef] = useCallbackRef();
13519 const [arrowElement, attachArrowRef] = useCallbackRef();
13520 const mergedRef = esm_useMergedRefs(attachRef, outerRef);
13521 const container = useWaitForDOMRef(props.container);
13522 const target = useWaitForDOMRef(props.target);
13523 const [exited, setExited] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(!props.show);
13524 const popper = esm_usePopper(target, rootElement, mergeOptionsWithPopperConfig({
13525 placement,
13526 enableEvents: !!props.show,
13527 containerPadding: containerPadding || 5,
13528 flip,
13529 offset,
13530 arrowElement,
13531 popperConfig
13532 }));
13533
13534 // TODO: I think this needs to be in an effect
13535 if (props.show && exited) {
13536 setExited(false);
13537 }
13538 const handleHidden = (...args) => {
13539 setExited(true);
13540 if (props.onExited) {
13541 props.onExited(...args);
13542 }
13543 };
13544
13545 // Don't un-render the overlay while it's transitioning out.
13546 const mountOverlay = props.show || !exited;
13547 esm_useRootClose(rootElement, props.onHide, {
13548 disabled: !props.rootClose || props.rootCloseDisabled,
13549 clickTrigger: props.rootCloseEvent
13550 });
13551 if (!mountOverlay) {
13552 // Don't bother showing anything if we don't have to.
13553 return null;
13554 }
13555 const {
13556 onExit,
13557 onExiting,
13558 onEnter,
13559 onEntering,
13560 onEntered
13561 } = props;
13562 let child = props.children(Object.assign({}, popper.attributes.popper, {
13563 style: popper.styles.popper,
13564 ref: mergedRef
13565 }), {
13566 popper,
13567 placement,
13568 show: !!props.show,
13569 arrowProps: Object.assign({}, popper.attributes.arrow, {
13570 style: popper.styles.arrow,
13571 ref: attachArrowRef
13572 })
13573 });
13574 child = renderTransition(Transition, runTransition, {
13575 in: !!props.show,
13576 appear: true,
13577 mountOnEnter: true,
13578 unmountOnExit: true,
13579 children: child,
13580 onExit,
13581 onExiting,
13582 onExited: handleHidden,
13583 onEnter,
13584 onEntering,
13585 onEntered
13586 });
13587 return container ? /*#__PURE__*/external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().createPortal(child, container) : null;
13588});
13589Overlay.displayName = 'Overlay';
13590/* harmony default export */ const esm_Overlay = (Overlay);
13591;// CONCATENATED MODULE: ./src/PopoverHeader.tsx
13592var PopoverHeader_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/PopoverHeader.tsx";
13593
13594
13595
13596
13597const PopoverHeader = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
13598 className,
13599 bsPrefix,
13600 as: Component = 'div',
13601 ...props
13602}, ref) => {
13603 bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-header');
13604 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
13605 ref: ref,
13606 className: classnames_default()(className, bsPrefix),
13607 ...props
13608 }, void 0, false, {
13609 fileName: PopoverHeader_jsxFileName,
13610 lineNumber: 15,
13611 columnNumber: 9
13612 }, undefined);
13613});
13614PopoverHeader.displayName = 'PopoverHeader';
13615/* harmony default export */ const src_PopoverHeader = (PopoverHeader);
13616;// CONCATENATED MODULE: ./src/PopoverBody.tsx
13617var PopoverBody_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/PopoverBody.tsx";
13618
13619
13620
13621
13622const PopoverBody = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
13623 className,
13624 bsPrefix,
13625 as: Component = 'div',
13626 ...props
13627}, ref) => {
13628 bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-body');
13629 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
13630 ref: ref,
13631 className: classnames_default()(className, bsPrefix),
13632 ...props
13633 }, void 0, false, {
13634 fileName: PopoverBody_jsxFileName,
13635 lineNumber: 15,
13636 columnNumber: 9
13637 }, undefined);
13638});
13639PopoverBody.displayName = 'PopoverBody';
13640/* harmony default export */ const src_PopoverBody = (PopoverBody);
13641;// CONCATENATED MODULE: ./src/helpers.ts
13642
13643class BsPrefixComponent extends external_root_React_commonjs2_react_commonjs_react_amd_react_.Component {}
13644
13645// Need to use this instead of typeof Component to get proper type checking.
13646
13647function getOverlayDirection(placement, isRTL) {
13648 let bsDirection = placement;
13649 if (placement === 'left') {
13650 bsDirection = isRTL ? 'end' : 'start';
13651 } else if (placement === 'right') {
13652 bsDirection = isRTL ? 'start' : 'end';
13653 }
13654 return bsDirection;
13655}
13656;// CONCATENATED MODULE: ./src/getInitialPopperStyles.ts
13657function getInitialPopperStyles(position = 'absolute') {
13658 return {
13659 position,
13660 top: '0',
13661 left: '0',
13662 opacity: '0',
13663 pointerEvents: 'none'
13664 };
13665}
13666;// CONCATENATED MODULE: ./src/Popover.tsx
13667var Popover_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Popover.tsx";
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677const Popover_propTypes = {
13678 /**
13679 * @default 'popover'
13680 */
13681 bsPrefix: (prop_types_default()).string,
13682 /**
13683 * An html id attribute, necessary for accessibility
13684 * @type {string}
13685 * @required
13686 */
13687 id: (prop_types_default()).string,
13688 /**
13689 * Sets the direction the Popover is positioned towards.
13690 *
13691 * > This is generally provided by the `Overlay` component positioning the popover
13692 */
13693 placement: prop_types_default().oneOf(['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']),
13694 /**
13695 * An Overlay injected set of props for positioning the popover arrow.
13696 *
13697 * > This is generally provided by the `Overlay` component positioning the popover
13698 */
13699 arrowProps: prop_types_default().shape({
13700 ref: (prop_types_default()).any,
13701 style: (prop_types_default()).object
13702 }),
13703 /**
13704 * When this prop is set, it creates a Popover with a Popover.Body inside
13705 * passing the children directly to it
13706 */
13707 body: (prop_types_default()).bool,
13708 /**
13709 * Whether or not Popper has done its initial measurement and positioning.
13710 */
13711 hasDoneInitialMeasure: (prop_types_default()).bool,
13712 /** @private */
13713 popper: (prop_types_default()).object,
13714 /** @private */
13715 show: (prop_types_default()).bool
13716};
13717const Popover = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
13718 bsPrefix,
13719 placement = 'right',
13720 className,
13721 style,
13722 children,
13723 body,
13724 arrowProps,
13725 hasDoneInitialMeasure,
13726 popper,
13727 show,
13728 ...props
13729}, ref) => {
13730 const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'popover');
13731 const isRTL = useIsRTL();
13732 const [primaryPlacement] = (placement == null ? void 0 : placement.split('-')) || [];
13733 const bsDirection = getOverlayDirection(primaryPlacement, isRTL);
13734 let computedStyle = style;
13735 if (show && !hasDoneInitialMeasure) {
13736 computedStyle = {
13737 ...style,
13738 ...getInitialPopperStyles(popper == null ? void 0 : popper.strategy)
13739 };
13740 }
13741 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
13742 ref: ref,
13743 role: "tooltip",
13744 style: computedStyle,
13745 "x-placement": primaryPlacement,
13746 className: classnames_default()(className, decoratedBsPrefix, primaryPlacement && `bs-popover-${bsDirection}`),
13747 ...props,
13748 children: [/*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
13749 className: "popover-arrow",
13750 ...arrowProps
13751 }, void 0, false, {
13752 fileName: Popover_jsxFileName,
13753 lineNumber: 131,
13754 columnNumber: 9
13755 }, undefined), body ? /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_PopoverBody, {
13756 children: children
13757 }, void 0, false, {
13758 fileName: Popover_jsxFileName,
13759 lineNumber: 132,
13760 columnNumber: 17
13761 }, undefined) : children]
13762 }, void 0, true, {
13763 fileName: Popover_jsxFileName,
13764 lineNumber: 119,
13765 columnNumber: 7
13766 }, undefined);
13767});
13768Popover.propTypes = Popover_propTypes;
13769/* harmony default export */ const src_Popover = (Object.assign(Popover, {
13770 Header: src_PopoverHeader,
13771 Body: src_PopoverBody,
13772 // Default popover offset.
13773 // https://github.com/twbs/bootstrap/blob/5c32767e0e0dbac2d934bcdee03719a65d3f1187/js/src/popover.js#L28
13774 POPPER_OFFSET: [0, 8]
13775}));
13776;// CONCATENATED MODULE: ./src/Tooltip.tsx
13777var Tooltip_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Tooltip.tsx";
13778
13779
13780
13781
13782
13783
13784
13785const Tooltip_propTypes = {
13786 /**
13787 * @default 'tooltip'
13788 */
13789 bsPrefix: (prop_types_default()).string,
13790 /**
13791 * An html id attribute, necessary for accessibility
13792 * @type {string}
13793 * @required
13794 */
13795 id: (prop_types_default()).string,
13796 /**
13797 * Sets the direction the Tooltip is positioned towards.
13798 *
13799 * > This is generally provided by the `Overlay` component positioning the tooltip
13800 */
13801 placement: prop_types_default().oneOf(['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']),
13802 /**
13803 * An Overlay injected set of props for positioning the tooltip arrow.
13804 *
13805 * > This is generally provided by the `Overlay` component positioning the tooltip
13806 *
13807 * @type {{ ref: ReactRef, style: Object }}
13808 */
13809 arrowProps: prop_types_default().shape({
13810 ref: (prop_types_default()).any,
13811 style: (prop_types_default()).object
13812 }),
13813 /**
13814 * Whether or not Popper has done its initial measurement and positioning.
13815 */
13816 hasDoneInitialMeasure: (prop_types_default()).bool,
13817 /** @private */
13818 popper: (prop_types_default()).object,
13819 /** @private */
13820 show: (prop_types_default()).any
13821};
13822const Tooltip = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
13823 bsPrefix,
13824 placement = 'right',
13825 className,
13826 style,
13827 children,
13828 arrowProps,
13829 hasDoneInitialMeasure,
13830 popper,
13831 show,
13832 ...props
13833}, ref) => {
13834 bsPrefix = useBootstrapPrefix(bsPrefix, 'tooltip');
13835 const isRTL = useIsRTL();
13836 const [primaryPlacement] = (placement == null ? void 0 : placement.split('-')) || [];
13837 const bsDirection = getOverlayDirection(primaryPlacement, isRTL);
13838 let computedStyle = style;
13839 if (show && !hasDoneInitialMeasure) {
13840 computedStyle = {
13841 ...style,
13842 ...getInitialPopperStyles(popper == null ? void 0 : popper.strategy)
13843 };
13844 }
13845 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
13846 ref: ref,
13847 style: computedStyle,
13848 role: "tooltip",
13849 "x-placement": primaryPlacement,
13850 className: classnames_default()(className, bsPrefix, `bs-tooltip-${bsDirection}`),
13851 ...props,
13852 children: [/*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
13853 className: "tooltip-arrow",
13854 ...arrowProps
13855 }, void 0, false, {
13856 fileName: Tooltip_jsxFileName,
13857 lineNumber: 119,
13858 columnNumber: 9
13859 }, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
13860 className: `${bsPrefix}-inner`,
13861 children: children
13862 }, void 0, false, {
13863 fileName: Tooltip_jsxFileName,
13864 lineNumber: 120,
13865 columnNumber: 9
13866 }, undefined)]
13867 }, void 0, true, {
13868 fileName: Tooltip_jsxFileName,
13869 lineNumber: 111,
13870 columnNumber: 7
13871 }, undefined);
13872});
13873Tooltip.propTypes = Tooltip_propTypes;
13874Tooltip.displayName = 'Tooltip';
13875/* harmony default export */ const src_Tooltip = (Object.assign(Tooltip, {
13876 // Default tooltip offset.
13877 // https://github.com/twbs/bootstrap/blob/beca2a6c7f6bc88b6449339fc76edcda832c59e5/js/src/tooltip.js#L65
13878 TOOLTIP_OFFSET: [0, 6]
13879}));
13880;// CONCATENATED MODULE: ./src/useOverlayOffset.tsx
13881
13882
13883
13884
13885
13886
13887// This is meant for internal use.
13888// This applies a custom offset to the overlay if it's a popover or tooltip.
13889function useOverlayOffset(customOffset) {
13890 const overlayRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
13891 const popoverClass = useBootstrapPrefix(undefined, 'popover');
13892 const tooltipClass = useBootstrapPrefix(undefined, 'tooltip');
13893 const offset = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
13894 name: 'offset',
13895 options: {
13896 offset: () => {
13897 if (customOffset) {
13898 return customOffset;
13899 }
13900 if (overlayRef.current) {
13901 if (hasClass(overlayRef.current, popoverClass)) {
13902 return src_Popover.POPPER_OFFSET;
13903 }
13904 if (hasClass(overlayRef.current, tooltipClass)) {
13905 return src_Tooltip.TOOLTIP_OFFSET;
13906 }
13907 }
13908 return [0, 0];
13909 }
13910 }
13911 }), [customOffset, popoverClass, tooltipClass]);
13912 return [overlayRef, [offset]];
13913}
13914;// CONCATENATED MODULE: ./src/Overlay.tsx
13915var Overlay_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Overlay.tsx";
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929const Overlay_propTypes = {
13930 /**
13931 * A component instance, DOM node, or function that returns either.
13932 * The `container` element will have the Overlay appended to it via a React portal.
13933 */
13934 container: prop_types_default().oneOfType([lib/* componentOrElement */.ax, (prop_types_default()).func]),
13935 /**
13936 * A component instance, DOM node, or function that returns either.
13937 * The overlay will be positioned in relation to the `target`
13938 */
13939 target: prop_types_default().oneOfType([lib/* componentOrElement */.ax, (prop_types_default()).func]),
13940 /**
13941 * Set the visibility of the Overlay
13942 */
13943 show: (prop_types_default()).bool,
13944 /**
13945 * A set of popper options and props passed directly to Popper.
13946 */
13947 popperConfig: (prop_types_default()).object,
13948 /**
13949 * Specify whether the overlay should trigger onHide when the user clicks outside the overlay
13950 */
13951 rootClose: (prop_types_default()).bool,
13952 /**
13953 * Specify event for triggering a "root close" toggle.
13954 */
13955 rootCloseEvent: prop_types_default().oneOf(['click', 'mousedown']),
13956 /**
13957 * A callback invoked by the overlay when it wishes to be hidden. Required if
13958 * `rootClose` is specified.
13959 */
13960 onHide: (prop_types_default()).func,
13961 /**
13962 * Animate the entering and exiting of the Overlay. `true` will use the `<Fade>` transition,
13963 * or a custom react-transition-group `<Transition>` component can be provided.
13964 */
13965 transition: prop_types_default().oneOfType([(prop_types_default()).bool, lib/* elementType */.nm]),
13966 /**
13967 * Callback fired before the Overlay transitions in
13968 */
13969 onEnter: (prop_types_default()).func,
13970 /**
13971 * Callback fired as the Overlay begins to transition in
13972 */
13973 onEntering: (prop_types_default()).func,
13974 /**
13975 * Callback fired after the Overlay finishes transitioning in
13976 */
13977 onEntered: (prop_types_default()).func,
13978 /**
13979 * Callback fired right before the Overlay transitions out
13980 */
13981 onExit: (prop_types_default()).func,
13982 /**
13983 * Callback fired as the Overlay begins to transition out
13984 */
13985 onExiting: (prop_types_default()).func,
13986 /**
13987 * Callback fired after the Overlay finishes transitioning out
13988 */
13989 onExited: (prop_types_default()).func,
13990 /**
13991 * The placement of the Overlay in relation to it's `target`.
13992 */
13993 placement: prop_types_default().oneOf(['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'])
13994};
13995function wrapRefs(props, arrowProps) {
13996 const {
13997 ref
13998 } = props;
13999 const {
14000 ref: aRef
14001 } = arrowProps;
14002 props.ref = ref.__wrapped || (ref.__wrapped = r => ref(safeFindDOMNode(r)));
14003 arrowProps.ref = aRef.__wrapped || (aRef.__wrapped = r => aRef(safeFindDOMNode(r)));
14004}
14005const Overlay_Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
14006 children: overlay,
14007 transition = src_Fade,
14008 popperConfig = {},
14009 rootClose = false,
14010 placement = 'top',
14011 show: outerShow = false,
14012 ...outerProps
14013}, outerRef) => {
14014 const popperRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
14015 const [firstRenderedState, setFirstRenderedState] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null);
14016 const [ref, modifiers] = useOverlayOffset(outerProps.offset);
14017 const mergedRef = esm_useMergedRefs(outerRef, ref);
14018 const actualTransition = transition === true ? src_Fade : transition || undefined;
14019 const handleFirstUpdate = useEventCallback(state => {
14020 setFirstRenderedState(state);
14021 popperConfig == null ? void 0 : popperConfig.onFirstUpdate == null ? void 0 : popperConfig.onFirstUpdate(state);
14022 });
14023 useIsomorphicEffect(() => {
14024 if (firstRenderedState && outerProps.target) {
14025 // Must wait for target element to resolve before updating popper.
14026 popperRef.current.scheduleUpdate == null ? void 0 : popperRef.current.scheduleUpdate();
14027 }
14028 }, [firstRenderedState, outerProps.target]);
14029 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
14030 if (!outerShow) {
14031 setFirstRenderedState(null);
14032 }
14033 }, [outerShow]);
14034 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Overlay, {
14035 ...outerProps,
14036 ref: mergedRef,
14037 popperConfig: {
14038 ...popperConfig,
14039 modifiers: modifiers.concat(popperConfig.modifiers || []),
14040 onFirstUpdate: handleFirstUpdate
14041 },
14042 transition: actualTransition,
14043 rootClose: rootClose,
14044 placement: placement,
14045 show: outerShow,
14046 children: (overlayProps, {
14047 arrowProps,
14048 popper: popperObj,
14049 show
14050 }) => {
14051 var _popperObj$state, _popperObj$state$modi;
14052 wrapRefs(overlayProps, arrowProps);
14053 // Need to get placement from popper object, handling case when overlay is flipped using 'flip' prop
14054 const updatedPlacement = popperObj == null ? void 0 : popperObj.placement;
14055 const popper = Object.assign(popperRef.current, {
14056 state: popperObj == null ? void 0 : popperObj.state,
14057 scheduleUpdate: popperObj == null ? void 0 : popperObj.update,
14058 placement: updatedPlacement,
14059 outOfBoundaries: (popperObj == null ? void 0 : (_popperObj$state = popperObj.state) == null ? void 0 : (_popperObj$state$modi = _popperObj$state.modifiersData.hide) == null ? void 0 : _popperObj$state$modi.isReferenceHidden) || false,
14060 strategy: popperConfig.strategy
14061 });
14062 const hasDoneInitialMeasure = !!firstRenderedState;
14063 if (typeof overlay === 'function') return overlay({
14064 ...overlayProps,
14065 placement: updatedPlacement,
14066 show,
14067 ...(!transition && show && {
14068 className: 'show'
14069 }),
14070 popper,
14071 arrowProps,
14072 hasDoneInitialMeasure
14073 });
14074 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(overlay, {
14075 ...overlayProps,
14076 placement: updatedPlacement,
14077 arrowProps,
14078 popper,
14079 hasDoneInitialMeasure,
14080 className: classnames_default()(overlay.props.className, !transition && show && 'show'),
14081 style: {
14082 ...overlay.props.style,
14083 ...overlayProps.style
14084 }
14085 });
14086 }
14087 }, void 0, false, {
14088 fileName: Overlay_jsxFileName,
14089 lineNumber: 195,
14090 columnNumber: 7
14091 }, undefined);
14092});
14093Overlay_Overlay.displayName = 'Overlay';
14094Overlay_Overlay.propTypes = Overlay_propTypes;
14095/* harmony default export */ const src_Overlay = (Overlay_Overlay);
14096;// CONCATENATED MODULE: ./src/OverlayTrigger.tsx
14097var OverlayTrigger_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/OverlayTrigger.tsx";
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110function normalizeDelay(delay) {
14111 return delay && typeof delay === 'object' ? delay : {
14112 show: delay,
14113 hide: delay
14114 };
14115}
14116
14117// Simple implementation of mouseEnter and mouseLeave.
14118// React's built version is broken: https://github.com/facebook/react/issues/4251
14119// for cases when the trigger is disabled and mouseOut/Over can cause flicker
14120// moving from one child element to another.
14121function handleMouseOverOut(
14122// eslint-disable-next-line @typescript-eslint/no-shadow
14123handler, args, relatedNative) {
14124 const [e] = args;
14125 const target = e.currentTarget;
14126 const related = e.relatedTarget || e.nativeEvent[relatedNative];
14127 if ((!related || related !== target) && !contains_contains(target, related)) {
14128 handler(...args);
14129 }
14130}
14131const triggerType = prop_types_default().oneOf(['click', 'hover', 'focus']);
14132const OverlayTrigger_propTypes = {
14133 children: prop_types_default().oneOfType([(prop_types_default()).element, (prop_types_default()).func]).isRequired,
14134 /**
14135 * Specify which action or actions trigger Overlay visibility
14136 *
14137 * The `click` trigger ignores the configured `delay`.
14138 *
14139 * @type {'hover' | 'click' |'focus' | Array<'hover' | 'click' |'focus'>}
14140 */
14141 trigger: prop_types_default().oneOfType([triggerType, prop_types_default().arrayOf(triggerType)]),
14142 /**
14143 * A millisecond delay amount to show and hide the Overlay once triggered
14144 */
14145 delay: prop_types_default().oneOfType([(prop_types_default()).number, prop_types_default().shape({
14146 show: (prop_types_default()).number,
14147 hide: (prop_types_default()).number
14148 })]),
14149 /**
14150 * The visibility of the Overlay. `show` is a _controlled_ prop so should be paired
14151 * with `onToggle` to avoid breaking user interactions.
14152 *
14153 * Manually toggling `show` does **not** wait for `delay` to change the visibility.
14154 *
14155 * @controllable onToggle
14156 */
14157 show: (prop_types_default()).bool,
14158 /**
14159 * The initial visibility state of the Overlay.
14160 */
14161 defaultShow: (prop_types_default()).bool,
14162 /**
14163 * A callback that fires when the user triggers a change in tooltip visibility.
14164 *
14165 * `onToggle` is called with the desired next `show`, and generally should be passed
14166 * back to the `show` prop. `onToggle` fires _after_ the configured `delay`
14167 *
14168 * @controllable `show`
14169 */
14170 onToggle: (prop_types_default()).func,
14171 /**
14172 The initial flip state of the Overlay.
14173 */
14174 flip: (prop_types_default()).bool,
14175 /**
14176 * An element or text to overlay next to the target.
14177 */
14178 overlay: prop_types_default().oneOfType([(prop_types_default()).func, (prop_types_default()).element.isRequired]),
14179 /**
14180 * A Popper.js config object passed to the the underlying popper instance.
14181 */
14182 popperConfig: (prop_types_default()).object,
14183 // Overridden props from `<Overlay>`.
14184 /**
14185 * @private
14186 */
14187 target: prop_types_default().oneOf([null]),
14188 /**
14189 * @private
14190 */
14191 onHide: prop_types_default().oneOf([null]),
14192 /**
14193 * The placement of the Overlay in relation to it's `target`.
14194 */
14195 placement: prop_types_default().oneOf(['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'])
14196};
14197function OverlayTrigger({
14198 trigger = ['hover', 'focus'],
14199 overlay,
14200 children,
14201 popperConfig = {},
14202 show: propsShow,
14203 defaultShow = false,
14204 onToggle,
14205 delay: propsDelay,
14206 placement,
14207 flip = placement && placement.indexOf('auto') !== -1,
14208 ...props
14209}) {
14210 const triggerNodeRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
14211 const mergedRef = esm_useMergedRefs(triggerNodeRef, children.ref);
14212 const timeout = useTimeout();
14213 const hoverStateRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)('');
14214 const [show, setShow] = useUncontrolledProp(propsShow, defaultShow, onToggle);
14215 const delay = normalizeDelay(propsDelay);
14216 const {
14217 onFocus,
14218 onBlur,
14219 onClick
14220 } = typeof children !== 'function' ? external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.only(children).props : {};
14221 const attachRef = r => {
14222 mergedRef(safeFindDOMNode(r));
14223 };
14224 const handleShow = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => {
14225 timeout.clear();
14226 hoverStateRef.current = 'show';
14227 if (!delay.show) {
14228 setShow(true);
14229 return;
14230 }
14231 timeout.set(() => {
14232 if (hoverStateRef.current === 'show') setShow(true);
14233 }, delay.show);
14234 }, [delay.show, setShow, timeout]);
14235 const handleHide = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => {
14236 timeout.clear();
14237 hoverStateRef.current = 'hide';
14238 if (!delay.hide) {
14239 setShow(false);
14240 return;
14241 }
14242 timeout.set(() => {
14243 if (hoverStateRef.current === 'hide') setShow(false);
14244 }, delay.hide);
14245 }, [delay.hide, setShow, timeout]);
14246 const handleFocus = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((...args) => {
14247 handleShow();
14248 onFocus == null ? void 0 : onFocus(...args);
14249 }, [handleShow, onFocus]);
14250 const handleBlur = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((...args) => {
14251 handleHide();
14252 onBlur == null ? void 0 : onBlur(...args);
14253 }, [handleHide, onBlur]);
14254 const handleClick = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((...args) => {
14255 setShow(!show);
14256 onClick == null ? void 0 : onClick(...args);
14257 }, [onClick, setShow, show]);
14258 const handleMouseOver = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((...args) => {
14259 handleMouseOverOut(handleShow, args, 'fromElement');
14260 }, [handleShow]);
14261 const handleMouseOut = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((...args) => {
14262 handleMouseOverOut(handleHide, args, 'toElement');
14263 }, [handleHide]);
14264 const triggers = trigger == null ? [] : [].concat(trigger);
14265 const triggerProps = {
14266 ref: attachRef
14267 };
14268 if (triggers.indexOf('click') !== -1) {
14269 triggerProps.onClick = handleClick;
14270 }
14271 if (triggers.indexOf('focus') !== -1) {
14272 triggerProps.onFocus = handleFocus;
14273 triggerProps.onBlur = handleBlur;
14274 }
14275 if (triggers.indexOf('hover') !== -1) {
14276 false ? 0 : void 0;
14277 triggerProps.onMouseOver = handleMouseOver;
14278 triggerProps.onMouseOut = handleMouseOut;
14279 }
14280 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(jsx_dev_runtime.Fragment, {
14281 children: [typeof children === 'function' ? children(triggerProps) : /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(children, triggerProps), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Overlay, {
14282 ...props,
14283 show: show,
14284 onHide: handleHide,
14285 flip: flip,
14286 placement: placement,
14287 popperConfig: popperConfig,
14288 target: triggerNodeRef.current,
14289 children: overlay
14290 }, void 0, false, {
14291 fileName: OverlayTrigger_jsxFileName,
14292 lineNumber: 297,
14293 columnNumber: 7
14294 }, this)]
14295 }, void 0, true);
14296}
14297OverlayTrigger.propTypes = OverlayTrigger_propTypes;
14298/* harmony default export */ const src_OverlayTrigger = (OverlayTrigger);
14299;// CONCATENATED MODULE: ./src/PageItem.tsx
14300var PageItem_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/PageItem.tsx";
14301/* eslint-disable react/no-multi-comp */
14302
14303
14304
14305
14306
14307const PageItem_propTypes = {
14308 /** Disables the PageItem */
14309 disabled: (prop_types_default()).bool,
14310 /** Styles PageItem as active, and renders a `<span>` instead of an `<a>`. */
14311 active: (prop_types_default()).bool,
14312 /** An accessible label indicating the active state. */
14313 activeLabel: (prop_types_default()).string,
14314 /** The HTML href attribute for the `PageItem`. */
14315 href: (prop_types_default()).string,
14316 /** A callback function for when this component is clicked. */
14317 onClick: (prop_types_default()).func,
14318 /** custom style for the inner component of the PageItem */
14319 linkStyle: (prop_types_default()).object,
14320 /** custom className for the inner component of the PageItem */
14321 linkClassName: (prop_types_default()).string
14322};
14323const PageItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
14324 active = false,
14325 disabled = false,
14326 className,
14327 style,
14328 activeLabel = '(current)',
14329 children,
14330 linkStyle,
14331 linkClassName,
14332 ...props
14333}, ref) => {
14334 const Component = active || disabled ? 'span' : esm_Anchor;
14335 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("li", {
14336 ref: ref,
14337 style: style,
14338 className: classnames_default()(className, 'page-item', {
14339 active,
14340 disabled
14341 }),
14342 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
14343 className: classnames_default()('page-link', linkClassName),
14344 style: linkStyle,
14345 ...props,
14346 children: [children, active && activeLabel && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
14347 className: "visually-hidden",
14348 children: activeLabel
14349 }, void 0, false, {
14350 fileName: PageItem_jsxFileName,
14351 lineNumber: 73,
14352 columnNumber: 15
14353 }, undefined)]
14354 }, void 0, true, {
14355 fileName: PageItem_jsxFileName,
14356 lineNumber: 66,
14357 columnNumber: 11
14358 }, undefined)
14359 }, void 0, false, {
14360 fileName: PageItem_jsxFileName,
14361 lineNumber: 61,
14362 columnNumber: 9
14363 }, undefined);
14364});
14365PageItem.propTypes = PageItem_propTypes;
14366PageItem.displayName = 'PageItem';
14367/* harmony default export */ const src_PageItem = (PageItem);
14368function createButton(name, defaultValue, label = name) {
14369 const Button = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
14370 children,
14371 ...props
14372 }, ref) => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(PageItem, {
14373 ...props,
14374 ref: ref,
14375 children: [/*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
14376 "aria-hidden": "true",
14377 children: children || defaultValue
14378 }, void 0, false, {
14379 fileName: PageItem_jsxFileName,
14380 lineNumber: 90,
14381 columnNumber: 9
14382 }, this), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
14383 className: "visually-hidden",
14384 children: label
14385 }, void 0, false, {
14386 fileName: PageItem_jsxFileName,
14387 lineNumber: 91,
14388 columnNumber: 9
14389 }, this)]
14390 }, void 0, true, {
14391 fileName: PageItem_jsxFileName,
14392 lineNumber: 89,
14393 columnNumber: 7
14394 }, this));
14395 Button.displayName = name;
14396 return Button;
14397}
14398const First = createButton('First', '«');
14399const Prev = createButton('Prev', '‹', 'Previous');
14400const Ellipsis = createButton('Ellipsis', '…', 'More');
14401const Next = createButton('Next', '›');
14402const Last = createButton('Last', '»');
14403;// CONCATENATED MODULE: ./src/Pagination.tsx
14404var Pagination_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Pagination.tsx";
14405
14406
14407
14408
14409
14410
14411const Pagination_propTypes = {
14412 /**
14413 * @default 'pagination'
14414 * */
14415 bsPrefix: (prop_types_default()).string,
14416 /**
14417 * Sets the size of all PageItems.
14418 *
14419 * @type {('sm'|'lg')}
14420 */
14421 size: prop_types_default().oneOf(['sm', 'lg'])
14422};
14423const Pagination = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
14424 bsPrefix,
14425 className,
14426 size,
14427 ...props
14428}, ref) => {
14429 const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'pagination');
14430 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("ul", {
14431 ref: ref,
14432 ...props,
14433 className: classnames_default()(className, decoratedBsPrefix, size && `${decoratedBsPrefix}-${size}`)
14434 }, void 0, false, {
14435 fileName: Pagination_jsxFileName,
14436 lineNumber: 35,
14437 columnNumber: 7
14438 }, undefined);
14439});
14440Pagination.propTypes = Pagination_propTypes;
14441Pagination.displayName = 'Pagination';
14442/* harmony default export */ const src_Pagination = (Object.assign(Pagination, {
14443 First: First,
14444 Prev: Prev,
14445 Ellipsis: Ellipsis,
14446 Item: src_PageItem,
14447 Next: Next,
14448 Last: Last
14449}));
14450;// CONCATENATED MODULE: ./src/usePlaceholder.ts
14451
14452
14453
14454function usePlaceholder({
14455 animation,
14456 bg,
14457 bsPrefix,
14458 size,
14459 ...props
14460}) {
14461 bsPrefix = useBootstrapPrefix(bsPrefix, 'placeholder');
14462 const [{
14463 className,
14464 ...colProps
14465 }] = useCol(props);
14466 return {
14467 ...colProps,
14468 className: classnames_default()(className, animation ? `${bsPrefix}-${animation}` : bsPrefix, size && `${bsPrefix}-${size}`, bg && `bg-${bg}`)
14469 };
14470}
14471;// CONCATENATED MODULE: ./src/PlaceholderButton.tsx
14472var PlaceholderButton_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/PlaceholderButton.tsx";
14473
14474
14475
14476
14477
14478const PlaceholderButton_propTypes = {
14479 /**
14480 * @default 'placeholder'
14481 */
14482 bsPrefix: (prop_types_default()).string,
14483 /**
14484 * Changes the animation of the placeholder.
14485 */
14486 animation: prop_types_default().oneOf(['glow', 'wave']),
14487 size: prop_types_default().oneOf(['xs', 'sm', 'lg']),
14488 /**
14489 * Button variant.
14490 */
14491 variant: (prop_types_default()).string
14492};
14493const PlaceholderButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
14494 const placeholderProps = usePlaceholder(props);
14495 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Button, {
14496 ...placeholderProps,
14497 ref: ref,
14498 disabled: true,
14499 tabIndex: -1
14500 }, void 0, false, {
14501 fileName: PlaceholderButton_jsxFileName,
14502 lineNumber: 38,
14503 columnNumber: 12
14504 }, undefined);
14505});
14506PlaceholderButton.displayName = 'PlaceholderButton';
14507PlaceholderButton.propTypes = PlaceholderButton_propTypes;
14508/* harmony default export */ const src_PlaceholderButton = (PlaceholderButton);
14509;// CONCATENATED MODULE: ./src/Placeholder.tsx
14510var Placeholder_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Placeholder.tsx";
14511
14512
14513
14514
14515
14516const Placeholder_propTypes = {
14517 /**
14518 * @default 'placeholder'
14519 */
14520 bsPrefix: (prop_types_default()).string,
14521 /**
14522 * Changes the animation of the placeholder.
14523 *
14524 * @type ('glow'|'wave')
14525 */
14526 animation: (prop_types_default()).string,
14527 /**
14528 * Change the background color of the placeholder.
14529 *
14530 * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'light'|'dark')}
14531 */
14532 bg: (prop_types_default()).string,
14533 /**
14534 * Component size variations.
14535 *
14536 * @type ('xs'|'sm'|'lg')
14537 */
14538 size: (prop_types_default()).string
14539};
14540const Placeholder = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
14541 as: Component = 'span',
14542 ...props
14543}, ref) => {
14544 const placeholderProps = usePlaceholder(props);
14545 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
14546 ...placeholderProps,
14547 ref: ref
14548 }, void 0, false, {
14549 fileName: Placeholder_jsxFileName,
14550 lineNumber: 42,
14551 columnNumber: 14
14552 }, undefined);
14553});
14554Placeholder.displayName = 'Placeholder';
14555Placeholder.propTypes = Placeholder_propTypes;
14556/* harmony default export */ const src_Placeholder = (Object.assign(Placeholder, {
14557 Button: src_PlaceholderButton
14558}));
14559;// CONCATENATED MODULE: ./src/ProgressBar.tsx
14560var ProgressBar_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ProgressBar.tsx";
14561
14562
14563
14564
14565
14566
14567
14568const ROUND_PRECISION = 1000;
14569
14570/**
14571 * Validate that children, if any, are instances of `ProgressBar`.
14572 */
14573function onlyProgressBar(props, propName, componentName) {
14574 const children = props[propName];
14575 if (!children) {
14576 return null;
14577 }
14578 let error = null;
14579 external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.forEach(children, child => {
14580 if (error) {
14581 return;
14582 }
14583
14584 /**
14585 * Compare types in a way that works with libraries that patch and proxy
14586 * components like react-hot-loader.
14587 *
14588 * see https://github.com/gaearon/react-hot-loader#checking-element-types
14589 */
14590 // eslint-disable-next-line @typescript-eslint/no-use-before-define
14591 const element = /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(ProgressBar, {}, void 0, false, {
14592 fileName: ProgressBar_jsxFileName,
14593 lineNumber: 50,
14594 columnNumber: 21
14595 }, this);
14596 if (child.type === element.type) return;
14597 const childType = child.type;
14598 const childIdentifier = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement(child) ? childType.displayName || childType.name || childType : child;
14599 error = new Error(`Children of ${componentName} can contain only ProgressBar ` + `components. Found ${childIdentifier}.`);
14600 });
14601 return error;
14602}
14603const ProgressBar_propTypes = {
14604 /**
14605 * Minimum value progress can begin from
14606 */
14607 min: (prop_types_default()).number,
14608 /**
14609 * Current value of progress
14610 */
14611 now: (prop_types_default()).number,
14612 /**
14613 * Maximum value progress can reach
14614 */
14615 max: (prop_types_default()).number,
14616 /**
14617 * Show label that represents visual percentage.
14618 * EG. 60%
14619 */
14620 label: (prop_types_default()).node,
14621 /**
14622 * Hide's the label visually.
14623 */
14624 visuallyHidden: (prop_types_default()).bool,
14625 /**
14626 * Uses a gradient to create a striped effect.
14627 */
14628 striped: (prop_types_default()).bool,
14629 /**
14630 * Animate's the stripes from right to left
14631 */
14632 animated: (prop_types_default()).bool,
14633 /**
14634 * @private
14635 * @default 'progress-bar'
14636 */
14637 bsPrefix: (prop_types_default()).string,
14638 /**
14639 * Sets the background class of the progress bar.
14640 *
14641 * @type ('success'|'danger'|'warning'|'info')
14642 */
14643 variant: (prop_types_default()).string,
14644 /**
14645 * Child elements (only allows elements of type <ProgressBar />)
14646 */
14647 children: onlyProgressBar,
14648 /**
14649 * @private
14650 */
14651 isChild: (prop_types_default()).bool
14652};
14653function getPercentage(now, min, max) {
14654 const percentage = (now - min) / (max - min) * 100;
14655 return Math.round(percentage * ROUND_PRECISION) / ROUND_PRECISION;
14656}
14657function renderProgressBar({
14658 min,
14659 now,
14660 max,
14661 label,
14662 visuallyHidden,
14663 striped,
14664 animated,
14665 className,
14666 style,
14667 variant,
14668 bsPrefix,
14669 ...props
14670}, ref) {
14671 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
14672 ref: ref,
14673 ...props,
14674 role: "progressbar",
14675 className: classnames_default()(className, `${bsPrefix}-bar`, {
14676 [`bg-${variant}`]: variant,
14677 [`${bsPrefix}-bar-animated`]: animated,
14678 [`${bsPrefix}-bar-striped`]: animated || striped
14679 }),
14680 style: {
14681 width: `${getPercentage(now, min, max)}%`,
14682 ...style
14683 },
14684 "aria-valuenow": now,
14685 "aria-valuemin": min,
14686 "aria-valuemax": max,
14687 children: visuallyHidden ? /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
14688 className: "visually-hidden",
14689 children: label
14690 }, void 0, false, {
14691 fileName: ProgressBar_jsxFileName,
14692 lineNumber: 165,
14693 columnNumber: 9
14694 }, this) : label
14695 }, void 0, false, {
14696 fileName: ProgressBar_jsxFileName,
14697 lineNumber: 150,
14698 columnNumber: 5
14699 }, this);
14700}
14701renderProgressBar.propTypes = ProgressBar_propTypes;
14702const ProgressBar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
14703 isChild = false,
14704 ...rest
14705}, ref) => {
14706 const props = {
14707 min: 0,
14708 max: 100,
14709 animated: false,
14710 visuallyHidden: false,
14711 striped: false,
14712 ...rest
14713 };
14714 props.bsPrefix = useBootstrapPrefix(props.bsPrefix, 'progress');
14715 if (isChild) {
14716 return renderProgressBar(props, ref);
14717 }
14718 const {
14719 min,
14720 now,
14721 max,
14722 label,
14723 visuallyHidden,
14724 striped,
14725 animated,
14726 bsPrefix,
14727 variant,
14728 className,
14729 children,
14730 ...wrapperProps
14731 } = props;
14732 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
14733 ref: ref,
14734 ...wrapperProps,
14735 className: classnames_default()(className, bsPrefix),
14736 children: children ? map(children, child => /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(child, {
14737 isChild: true
14738 })) : renderProgressBar({
14739 min,
14740 now,
14741 max,
14742 label,
14743 visuallyHidden,
14744 striped,
14745 animated,
14746 bsPrefix,
14747 variant
14748 }, ref)
14749 }, void 0, false, {
14750 fileName: ProgressBar_jsxFileName,
14751 lineNumber: 208,
14752 columnNumber: 7
14753 }, undefined);
14754});
14755ProgressBar.displayName = 'ProgressBar';
14756ProgressBar.propTypes = ProgressBar_propTypes;
14757/* harmony default export */ const src_ProgressBar = (ProgressBar);
14758;// CONCATENATED MODULE: ./src/Ratio.tsx
14759var Ratio_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Ratio.tsx";
14760
14761
14762
14763
14764
14765const Ratio_propTypes = {
14766 /**
14767 * @default 'ratio'
14768 */
14769 bsPrefix: (prop_types_default()).string,
14770 /**
14771 * This component requires a single child element
14772 */
14773 children: (prop_types_default()).element.isRequired,
14774 /**
14775 * Set the aspect ratio of the embed. A fraction or a percentage can also
14776 * be used to create custom aspect ratios.
14777 */
14778 aspectRatio: prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string])
14779};
14780function toPercent(num) {
14781 if (num <= 0) return '100%';
14782 if (num < 1) return `${num * 100}%`;
14783 return `${num}%`;
14784}
14785const Ratio = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
14786 bsPrefix,
14787 className,
14788 children,
14789 aspectRatio = '1x1',
14790 style,
14791 ...props
14792}, ref) => {
14793 bsPrefix = useBootstrapPrefix(bsPrefix, 'ratio');
14794 const isCustomRatio = typeof aspectRatio === 'number';
14795 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
14796 ref: ref,
14797 ...props,
14798 style: {
14799 ...style,
14800 ...(isCustomRatio && {
14801 '--bs-aspect-ratio': toPercent(aspectRatio)
14802 })
14803 },
14804 className: classnames_default()(bsPrefix, className, !isCustomRatio && `${bsPrefix}-${aspectRatio}`),
14805 children: external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.only(children)
14806 }, void 0, false, {
14807 fileName: Ratio_jsxFileName,
14808 lineNumber: 50,
14809 columnNumber: 7
14810 }, undefined);
14811});
14812Ratio.propTypes = Ratio_propTypes;
14813/* harmony default export */ const src_Ratio = (Ratio);
14814;// CONCATENATED MODULE: ./src/Row.tsx
14815var Row_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Row.tsx";
14816
14817
14818
14819
14820
14821const rowColWidth = prop_types_default().oneOfType([(prop_types_default()).number, (prop_types_default()).string]);
14822const rowColumns = prop_types_default().oneOfType([rowColWidth, prop_types_default().shape({
14823 cols: rowColWidth
14824})]);
14825const Row_propTypes = {
14826 /**
14827 * @default 'row'
14828 */
14829 bsPrefix: (prop_types_default()).string,
14830 as: (prop_types_default()).elementType,
14831 /**
14832 * The number of columns that will fit next to each other on extra small devices (<576px).
14833 * Use `auto` to give columns their natural widths.
14834 *
14835 * @type {(number|'auto'|{ cols: number|'auto' })}
14836 */
14837 xs: rowColumns,
14838 /**
14839 * The number of columns that will fit next to each other on small devices (≥576px).
14840 * Use `auto` to give columns their natural widths.
14841 *
14842 * @type {(number|'auto'|{ cols: number|'auto' })}
14843 */
14844 sm: rowColumns,
14845 /**
14846 * The number of columns that will fit next to each other on medium devices (≥768px).
14847 * Use `auto` to give columns their natural widths.
14848 *
14849 * @type {(number|'auto'|{ cols: number|'auto' })}
14850 */
14851 md: rowColumns,
14852 /**
14853 * The number of columns that will fit next to each other on large devices (≥992px).
14854 * Use `auto` to give columns their natural widths.
14855 *
14856 * @type {(number|'auto'|{ cols: number|'auto' })}
14857 */
14858 lg: rowColumns,
14859 /**
14860 * The number of columns that will fit next to each other on extra large devices (≥1200px).
14861 * Use `auto` to give columns their natural widths.
14862 *
14863 * @type {(number|'auto'|{ cols: number|'auto' })}
14864 */
14865 xl: rowColumns,
14866 /**
14867 * The number of columns that will fit next to each other on extra extra large devices (≥1400px).
14868 * Use `auto` to give columns their natural widths.
14869 *
14870 * @type {(number|'auto'|{ cols: number|'auto' })}
14871 */
14872 xxl: rowColumns
14873};
14874const Row = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
14875 bsPrefix,
14876 className,
14877 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
14878 as: Component = 'div',
14879 ...props
14880}, ref) => {
14881 const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'row');
14882 const breakpoints = useBootstrapBreakpoints();
14883 const minBreakpoint = useBootstrapMinBreakpoint();
14884 const sizePrefix = `${decoratedBsPrefix}-cols`;
14885 const classes = [];
14886 breakpoints.forEach(brkPoint => {
14887 const propValue = props[brkPoint];
14888 delete props[brkPoint];
14889 let cols;
14890 if (propValue != null && typeof propValue === 'object') {
14891 ({
14892 cols
14893 } = propValue);
14894 } else {
14895 cols = propValue;
14896 }
14897 const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';
14898 if (cols != null) classes.push(`${sizePrefix}${infix}-${cols}`);
14899 });
14900 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
14901 ref: ref,
14902 ...props,
14903 className: classnames_default()(className, decoratedBsPrefix, ...classes)
14904 }, void 0, false, {
14905 fileName: Row_jsxFileName,
14906 lineNumber: 146,
14907 columnNumber: 7
14908 }, undefined);
14909});
14910Row.displayName = 'Row';
14911Row.propTypes = Row_propTypes;
14912/* harmony default export */ const src_Row = (Row);
14913;// CONCATENATED MODULE: ./src/Spinner.tsx
14914var Spinner_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Spinner.tsx";
14915
14916
14917
14918
14919
14920const Spinner_propTypes = {
14921 /**
14922 * @default 'spinner'
14923 */
14924 bsPrefix: (prop_types_default()).string,
14925 /**
14926 * The visual color style of the spinner
14927 *
14928 * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'light'|'dark')}
14929 */
14930 variant: (prop_types_default()).string,
14931 /**
14932 * Changes the animation style of the spinner.
14933 *
14934 * @type {('border'|'grow')}
14935 * @default true
14936 */
14937 animation: prop_types_default().oneOf(['border', 'grow']).isRequired,
14938 /**
14939 * Component size variations.
14940 *
14941 * @type {('sm')}
14942 */
14943 size: (prop_types_default()).string,
14944 /**
14945 * This component may be used to wrap child elements or components.
14946 */
14947 children: (prop_types_default()).element,
14948 /**
14949 * An ARIA accessible role applied to the Menu component. This should generally be set to 'status'
14950 */
14951 role: (prop_types_default()).string,
14952 /**
14953 * @default div
14954 */
14955 as: (prop_types_default()).elementType
14956};
14957const Spinner = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
14958 bsPrefix,
14959 variant,
14960 animation = 'border',
14961 size,
14962 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
14963 as: Component = 'div',
14964 className,
14965 ...props
14966}, ref) => {
14967 bsPrefix = useBootstrapPrefix(bsPrefix, 'spinner');
14968 const bsSpinnerPrefix = `${bsPrefix}-${animation}`;
14969 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
14970 ref: ref,
14971 ...props,
14972 className: classnames_default()(className, bsSpinnerPrefix, size && `${bsSpinnerPrefix}-${size}`, variant && `text-${variant}`)
14973 }, void 0, false, {
14974 fileName: Spinner_jsxFileName,
14975 lineNumber: 79,
14976 columnNumber: 9
14977 }, undefined);
14978});
14979Spinner.propTypes = Spinner_propTypes;
14980Spinner.displayName = 'Spinner';
14981/* harmony default export */ const src_Spinner = (Spinner);
14982;// CONCATENATED MODULE: ./src/SplitButton.tsx
14983var SplitButton_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/SplitButton.tsx";
14984
14985
14986
14987
14988
14989
14990
14991const SplitButton_propTypes = {
14992 /**
14993 * An html id attribute for the Toggle button, necessary for assistive technologies, such as screen readers.
14994 * @type {string}
14995 * @required
14996 */
14997 id: (prop_types_default()).string,
14998 /**
14999 * Accessible label for the toggle; the value of `title` if not specified.
15000 */
15001 toggleLabel: (prop_types_default()).string,
15002 /** An `href` passed to the non-toggle Button */
15003 href: (prop_types_default()).string,
15004 /** An anchor `target` passed to the non-toggle Button */
15005 target: (prop_types_default()).string,
15006 /** An `onClick` handler passed to the non-toggle Button */
15007 onClick: (prop_types_default()).func,
15008 /** The content of the non-toggle Button. */
15009 title: (prop_types_default()).node.isRequired,
15010 /** A `type` passed to the non-toggle Button */
15011 type: (prop_types_default()).string,
15012 /** Disables both Buttons */
15013 disabled: (prop_types_default()).bool,
15014 /**
15015 * Aligns the dropdown menu.
15016 *
15017 * _see [DropdownMenu](#dropdown-menu-props) for more details_
15018 *
15019 * @type {"start"|"end"|{ sm: "start"|"end" }|{ md: "start"|"end" }|{ lg: "start"|"end" }|{ xl: "start"|"end"}|{ xxl: "start"|"end"} }
15020 */
15021 align: alignPropType,
15022 /** An ARIA accessible role applied to the Menu component. When set to 'menu', The dropdown */
15023 menuRole: (prop_types_default()).string,
15024 /** Whether to render the dropdown menu in the DOM before the first time it is shown */
15025 renderMenuOnMount: (prop_types_default()).bool,
15026 /**
15027 * Which event when fired outside the component will cause it to be closed.
15028 *
15029 * _see [DropdownMenu](#dropdown-menu-props) for more details_
15030 */
15031 rootCloseEvent: (prop_types_default()).string,
15032 /**
15033 * Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to
15034 * Popper.js's flip [docs](https://popper.js.org/docs/v2/modifiers/flip/).
15035 *
15036 */
15037 flip: (prop_types_default()).bool,
15038 /** @ignore */
15039 bsPrefix: (prop_types_default()).string,
15040 /** @ignore */
15041 variant: (prop_types_default()).string,
15042 /** @ignore */
15043 size: (prop_types_default()).string
15044};
15045
15046/**
15047 * A convenience component for simple or general use split button dropdowns. Renders a
15048 * `ButtonGroup` containing a `Button` and a `Button` toggle for the `Dropdown`. All `children`
15049 * are passed directly to the default `Dropdown.Menu`. This component accepts all of [`Dropdown`'s
15050 * props](#dropdown-props).
15051 *
15052 * _All unknown props are passed through to the `Dropdown` component._
15053 * The Button `variant`, `size` and `bsPrefix` props are passed to the button and toggle,
15054 * and menu-related props are passed to the `Dropdown.Menu`
15055 */
15056const SplitButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
15057 id,
15058 bsPrefix,
15059 size,
15060 variant,
15061 title,
15062 type = 'button',
15063 toggleLabel = 'Toggle dropdown',
15064 children,
15065 onClick,
15066 href,
15067 target,
15068 menuRole,
15069 renderMenuOnMount,
15070 rootCloseEvent,
15071 flip,
15072 ...props
15073}, ref) => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Dropdown, {
15074 ref: ref,
15075 ...props,
15076 as: src_ButtonGroup,
15077 children: [/*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Button, {
15078 size: size,
15079 variant: variant,
15080 disabled: props.disabled,
15081 bsPrefix: bsPrefix,
15082 href: href,
15083 target: target,
15084 onClick: onClick,
15085 type: type,
15086 children: title
15087 }, void 0, false, {
15088 fileName: SplitButton_jsxFileName,
15089 lineNumber: 126,
15090 columnNumber: 7
15091 }, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Dropdown.Toggle, {
15092 split: true,
15093 id: id,
15094 size: size,
15095 variant: variant,
15096 disabled: props.disabled,
15097 childBsPrefix: bsPrefix,
15098 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
15099 className: "visually-hidden",
15100 children: toggleLabel
15101 }, void 0, false, {
15102 fileName: SplitButton_jsxFileName,
15103 lineNumber: 146,
15104 columnNumber: 9
15105 }, undefined)
15106 }, void 0, false, {
15107 fileName: SplitButton_jsxFileName,
15108 lineNumber: 138,
15109 columnNumber: 7
15110 }, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Dropdown.Menu, {
15111 role: menuRole,
15112 renderOnMount: renderMenuOnMount,
15113 rootCloseEvent: rootCloseEvent,
15114 flip: flip,
15115 children: children
15116 }, void 0, false, {
15117 fileName: SplitButton_jsxFileName,
15118 lineNumber: 149,
15119 columnNumber: 7
15120 }, undefined)]
15121}, void 0, true, {
15122 fileName: SplitButton_jsxFileName,
15123 lineNumber: 125,
15124 columnNumber: 5
15125}, undefined));
15126SplitButton.propTypes = SplitButton_propTypes;
15127SplitButton.displayName = 'SplitButton';
15128/* harmony default export */ const src_SplitButton = (SplitButton);
15129;// CONCATENATED MODULE: ./src/SSRProvider.ts
15130
15131/* harmony default export */ const SSRProvider = ($704cf1d3b684cc5c$export$9f8ac96af4b1b2ae);
15132;// CONCATENATED MODULE: ./src/createUtilityClasses.ts
15133
15134
15135function responsivePropType(propType) {
15136 return prop_types_default().oneOfType([propType, prop_types_default().shape({
15137 xs: propType,
15138 sm: propType,
15139 md: propType,
15140 lg: propType,
15141 xl: propType,
15142 xxl: propType
15143 })]);
15144}
15145function createUtilityClassName(utilityValues, breakpoints = DEFAULT_BREAKPOINTS, minBreakpoint = DEFAULT_MIN_BREAKPOINT) {
15146 const classes = [];
15147 Object.entries(utilityValues).forEach(([utilName, utilValue]) => {
15148 if (utilValue != null) {
15149 if (typeof utilValue === 'object') {
15150 breakpoints.forEach(brkPoint => {
15151 const bpValue = utilValue[brkPoint];
15152 if (bpValue != null) {
15153 const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';
15154 classes.push(`${utilName}${infix}-${bpValue}`);
15155 }
15156 });
15157 } else {
15158 classes.push(`${utilName}-${utilValue}`);
15159 }
15160 }
15161 });
15162 return classes;
15163}
15164;// CONCATENATED MODULE: ./src/Stack.tsx
15165var Stack_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Stack.tsx";
15166
15167
15168
15169
15170
15171
15172const Stack_propTypes = {
15173 /**
15174 * Change the underlying component CSS base class name and modifier class names prefix.
15175 * **This is an escape hatch** for working with heavily customized bootstrap css.
15176 *
15177 * Defaults to `hstack` if direction is `horizontal` or `vstack` if direction
15178 * is `vertical`.
15179 *
15180 * @default 'hstack | vstack'
15181 */
15182 bsPrefix: (prop_types_default()).string,
15183 /**
15184 * Sets the spacing between each item. Valid values are `0-5`.
15185 */
15186 gap: responsivePropType((prop_types_default()).number)
15187};
15188const Stack = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
15189 as: Component = 'div',
15190 bsPrefix,
15191 className,
15192 direction,
15193 gap,
15194 ...props
15195}, ref) => {
15196 bsPrefix = useBootstrapPrefix(bsPrefix, direction === 'horizontal' ? 'hstack' : 'vstack');
15197 const breakpoints = useBootstrapBreakpoints();
15198 const minBreakpoint = useBootstrapMinBreakpoint();
15199 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
15200 ...props,
15201 ref: ref,
15202 className: classnames_default()(className, bsPrefix, ...createUtilityClassName({
15203 gap
15204 }, breakpoints, minBreakpoint))
15205 }, void 0, false, {
15206 fileName: Stack_jsxFileName,
15207 lineNumber: 57,
15208 columnNumber: 9
15209 }, undefined);
15210});
15211Stack.displayName = 'Stack';
15212Stack.propTypes = Stack_propTypes;
15213/* harmony default export */ const src_Stack = (Stack);
15214;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/TabPanel.js
15215const TabPanel_excluded = ["active", "eventKey", "mountOnEnter", "transition", "unmountOnExit", "role", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited"],
15216 _excluded2 = ["activeKey", "getControlledId", "getControllerId"],
15217 _excluded3 = ["as"];
15218function TabPanel_objectWithoutPropertiesLoose(source, excluded) {
15219 if (source == null) return {};
15220 var target = {};
15221 var sourceKeys = Object.keys(source);
15222 var key, i;
15223 for (i = 0; i < sourceKeys.length; i++) {
15224 key = sourceKeys[i];
15225 if (excluded.indexOf(key) >= 0) continue;
15226 target[key] = source[key];
15227 }
15228 return target;
15229}
15230
15231
15232
15233
15234
15235
15236function useTabPanel(_ref) {
15237 let {
15238 active,
15239 eventKey,
15240 mountOnEnter,
15241 transition,
15242 unmountOnExit,
15243 role = 'tabpanel',
15244 onEnter,
15245 onEntering,
15246 onEntered,
15247 onExit,
15248 onExiting,
15249 onExited
15250 } = _ref,
15251 props = TabPanel_objectWithoutPropertiesLoose(_ref, TabPanel_excluded);
15252 const context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_TabContext);
15253 if (!context) return [Object.assign({}, props, {
15254 role
15255 }), {
15256 eventKey,
15257 isActive: active,
15258 mountOnEnter,
15259 transition,
15260 unmountOnExit,
15261 onEnter,
15262 onEntering,
15263 onEntered,
15264 onExit,
15265 onExiting,
15266 onExited
15267 }];
15268 const {
15269 activeKey,
15270 getControlledId,
15271 getControllerId
15272 } = context,
15273 rest = TabPanel_objectWithoutPropertiesLoose(context, _excluded2);
15274 const key = makeEventKey(eventKey);
15275 return [Object.assign({}, props, {
15276 role,
15277 id: getControlledId(eventKey),
15278 'aria-labelledby': getControllerId(eventKey)
15279 }), {
15280 eventKey,
15281 isActive: active == null && key != null ? makeEventKey(activeKey) === key : active,
15282 transition: transition || rest.transition,
15283 mountOnEnter: mountOnEnter != null ? mountOnEnter : rest.mountOnEnter,
15284 unmountOnExit: unmountOnExit != null ? unmountOnExit : rest.unmountOnExit,
15285 onEnter,
15286 onEntering,
15287 onEntered,
15288 onExit,
15289 onExiting,
15290 onExited
15291 }];
15292}
15293const TabPanel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(
15294// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
15295(_ref2, ref) => {
15296 let {
15297 as: Component = 'div'
15298 } = _ref2,
15299 props = TabPanel_objectWithoutPropertiesLoose(_ref2, _excluded3);
15300 const [tabPanelProps, {
15301 isActive,
15302 onEnter,
15303 onEntering,
15304 onEntered,
15305 onExit,
15306 onExiting,
15307 onExited,
15308 mountOnEnter,
15309 unmountOnExit,
15310 transition: Transition = esm_NoopTransition
15311 }] = useTabPanel(props);
15312 // We provide an empty the TabContext so `<Nav>`s in `<TabPanel>`s don't
15313 // conflict with the top level one.
15314 return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_TabContext.Provider, {
15315 value: null,
15316 children: /*#__PURE__*/(0,jsx_runtime.jsx)(esm_SelectableContext.Provider, {
15317 value: null,
15318 children: /*#__PURE__*/(0,jsx_runtime.jsx)(Transition, {
15319 in: isActive,
15320 onEnter: onEnter,
15321 onEntering: onEntering,
15322 onEntered: onEntered,
15323 onExit: onExit,
15324 onExiting: onExiting,
15325 onExited: onExited,
15326 mountOnEnter: mountOnEnter,
15327 unmountOnExit: unmountOnExit,
15328 children: /*#__PURE__*/(0,jsx_runtime.jsx)(Component, Object.assign({}, tabPanelProps, {
15329 ref: ref,
15330 hidden: !isActive,
15331 "aria-hidden": !isActive
15332 }))
15333 })
15334 })
15335 });
15336});
15337TabPanel.displayName = 'TabPanel';
15338/* harmony default export */ const esm_TabPanel = (TabPanel);
15339;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/Tabs.js
15340
15341
15342
15343
15344
15345
15346
15347
15348const Tabs = props => {
15349 const {
15350 id: userId,
15351 generateChildId: generateCustomChildId,
15352 onSelect: propsOnSelect,
15353 activeKey: propsActiveKey,
15354 defaultActiveKey,
15355 transition,
15356 mountOnEnter,
15357 unmountOnExit,
15358 children
15359 } = props;
15360 const [activeKey, onSelect] = esm_useUncontrolledProp(propsActiveKey, defaultActiveKey, propsOnSelect);
15361 const id = $704cf1d3b684cc5c$export$619500959fc48b26(userId);
15362 const generateChildId = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => generateCustomChildId || ((key, type) => id ? `${id}-${type}-${key}` : null), [id, generateCustomChildId]);
15363 const tabContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
15364 onSelect,
15365 activeKey,
15366 transition,
15367 mountOnEnter: mountOnEnter || false,
15368 unmountOnExit: unmountOnExit || false,
15369 getControlledId: key => generateChildId(key, 'tabpane'),
15370 getControllerId: key => generateChildId(key, 'tab')
15371 }), [onSelect, activeKey, transition, mountOnEnter, unmountOnExit, generateChildId]);
15372 return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_TabContext.Provider, {
15373 value: tabContext,
15374 children: /*#__PURE__*/(0,jsx_runtime.jsx)(esm_SelectableContext.Provider, {
15375 value: onSelect || null,
15376 children: children
15377 })
15378 });
15379};
15380Tabs.Panel = esm_TabPanel;
15381/* harmony default export */ const esm_Tabs = (Tabs);
15382;// CONCATENATED MODULE: ./src/getTabTransitionComponent.ts
15383
15384
15385function getTabTransitionComponent(transition) {
15386 if (typeof transition === 'boolean') {
15387 return transition ? src_Fade : esm_NoopTransition;
15388 }
15389 return transition;
15390}
15391;// CONCATENATED MODULE: ./src/TabContainer.tsx
15392var TabContainer_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/TabContainer.tsx";
15393
15394
15395
15396
15397
15398const TabContainer_propTypes = {
15399 /**
15400 * HTML id attribute, required if no `generateChildId` prop
15401 * is specified.
15402 *
15403 * @type {string}
15404 */
15405 id: (prop_types_default()).string,
15406 /**
15407 * Sets a default animation strategy for all children `<TabPane>`s.
15408 * Defaults to `<Fade>` animation; else, use `false` to disable, or a
15409 * custom react-transition-group `<Transition/>` component.
15410 *
15411 * @type {{Transition | false}}
15412 * @default {Fade}
15413 */
15414 transition: prop_types_default().oneOfType([prop_types_default().oneOf([false]), (prop_types_default()).elementType]),
15415 /**
15416 * Wait until the first "enter" transition to mount tabs (add them to the DOM)
15417 */
15418 mountOnEnter: (prop_types_default()).bool,
15419 /**
15420 * Unmount tabs (remove it from the DOM) when they are no longer visible
15421 */
15422 unmountOnExit: (prop_types_default()).bool,
15423 /**
15424 * A function that takes an `eventKey` and `type` and returns a unique id for
15425 * child tab `<NavItem>`s and `<TabPane>`s. The function _must_ be a pure
15426 * function, meaning it should always return the _same_ id for the same set
15427 * of inputs. The default value requires that an `id` to be set for the
15428 * `<TabContainer>`.
15429 *
15430 * The `type` argument will either be `"tab"` or `"pane"`.
15431 *
15432 * @defaultValue (eventKey, type) => `${props.id}-${type}-${eventKey}`
15433 */
15434 generateChildId: (prop_types_default()).func,
15435 /**
15436 * A callback fired when a tab is selected.
15437 *
15438 * @controllable activeKey
15439 */
15440 onSelect: (prop_types_default()).func,
15441 /**
15442 * The `eventKey` of the currently active tab.
15443 *
15444 * @controllable onSelect
15445 */
15446 activeKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number])
15447};
15448const TabContainer = ({
15449 transition,
15450 ...props
15451}) => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Tabs, {
15452 ...props,
15453 transition: getTabTransitionComponent(transition)
15454}, void 0, false, {
15455 fileName: TabContainer_jsxFileName,
15456 lineNumber: 71,
15457 columnNumber: 3
15458}, undefined);
15459TabContainer.propTypes = TabContainer_propTypes;
15460TabContainer.displayName = 'TabContainer';
15461/* harmony default export */ const src_TabContainer = (TabContainer);
15462;// CONCATENATED MODULE: ./src/TabContent.tsx
15463var TabContent_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/TabContent.tsx";
15464
15465
15466
15467
15468const TabContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
15469 className,
15470 bsPrefix,
15471 as: Component = 'div',
15472 ...props
15473}, ref) => {
15474 bsPrefix = useBootstrapPrefix(bsPrefix, 'tab-content');
15475 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
15476 ref: ref,
15477 className: classnames_default()(className, bsPrefix),
15478 ...props
15479 }, void 0, false, {
15480 fileName: TabContent_jsxFileName,
15481 lineNumber: 15,
15482 columnNumber: 9
15483 }, undefined);
15484});
15485TabContent.displayName = 'TabContent';
15486/* harmony default export */ const src_TabContent = (TabContent);
15487;// CONCATENATED MODULE: ./src/TabPane.tsx
15488var TabPane_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/TabPane.tsx";
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499const TabPane_propTypes = {
15500 /**
15501 * @default 'tab-pane'
15502 */
15503 bsPrefix: (prop_types_default()).string,
15504 as: (prop_types_default()).elementType,
15505 /**
15506 * A key that associates the `TabPane` with it's controlling `NavLink`.
15507 */
15508 eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
15509 /**
15510 * Toggles the active state of the TabPane, this is generally controlled by a
15511 * TabContainer.
15512 */
15513 active: (prop_types_default()).bool,
15514 /**
15515 * Use animation when showing or hiding `<TabPane>`s. Defaults to `<Fade>`
15516 * animation, else use `false` to disable or a react-transition-group
15517 * `<Transition/>` component.
15518 */
15519 transition: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).elementType]),
15520 /**
15521 * Transition onEnter callback when animation is not `false`
15522 */
15523 onEnter: (prop_types_default()).func,
15524 /**
15525 * Transition onEntering callback when animation is not `false`
15526 */
15527 onEntering: (prop_types_default()).func,
15528 /**
15529 * Transition onEntered callback when animation is not `false`
15530 */
15531 onEntered: (prop_types_default()).func,
15532 /**
15533 * Transition onExit callback when animation is not `false`
15534 */
15535 onExit: (prop_types_default()).func,
15536 /**
15537 * Transition onExiting callback when animation is not `false`
15538 */
15539 onExiting: (prop_types_default()).func,
15540 /**
15541 * Transition onExited callback when animation is not `false`
15542 */
15543 onExited: (prop_types_default()).func,
15544 /**
15545 * Wait until the first "enter" transition to mount the tab (add it to the DOM)
15546 */
15547 mountOnEnter: (prop_types_default()).bool,
15548 /**
15549 * Unmount the tab (remove it from the DOM) when it is no longer visible
15550 */
15551 unmountOnExit: (prop_types_default()).bool,
15552 /** @ignore * */
15553 id: (prop_types_default()).string,
15554 /** @ignore * */
15555 'aria-labelledby': (prop_types_default()).string
15556};
15557const TabPane = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
15558 bsPrefix,
15559 transition,
15560 ...props
15561}, ref) => {
15562 const [{
15563 className,
15564 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
15565 as: Component = 'div',
15566 ...rest
15567 }, {
15568 isActive,
15569 onEnter,
15570 onEntering,
15571 onEntered,
15572 onExit,
15573 onExiting,
15574 onExited,
15575 mountOnEnter,
15576 unmountOnExit,
15577 transition: Transition = src_Fade
15578 }] = useTabPanel({
15579 ...props,
15580 transition: getTabTransitionComponent(transition)
15581 });
15582 const prefix = useBootstrapPrefix(bsPrefix, 'tab-pane');
15583
15584 // We provide an empty the TabContext so `<Nav>`s in `<TabPanel>`s don't
15585 // conflict with the top level one.
15586 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_TabContext.Provider, {
15587 value: null,
15588 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_SelectableContext.Provider, {
15589 value: null,
15590 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Transition, {
15591 in: isActive,
15592 onEnter: onEnter,
15593 onEntering: onEntering,
15594 onEntered: onEntered,
15595 onExit: onExit,
15596 onExiting: onExiting,
15597 onExited: onExited,
15598 mountOnEnter: mountOnEnter,
15599 unmountOnExit: unmountOnExit,
15600 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
15601 ...rest,
15602 ref: ref,
15603 className: classnames_default()(className, prefix, isActive && 'active')
15604 }, void 0, false, {
15605 fileName: TabPane_jsxFileName,
15606 lineNumber: 146,
15607 columnNumber: 15
15608 }, undefined)
15609 }, void 0, false, {
15610 fileName: TabPane_jsxFileName,
15611 lineNumber: 135,
15612 columnNumber: 13
15613 }, undefined)
15614 }, void 0, false, {
15615 fileName: TabPane_jsxFileName,
15616 lineNumber: 134,
15617 columnNumber: 11
15618 }, undefined)
15619 }, void 0, false, {
15620 fileName: TabPane_jsxFileName,
15621 lineNumber: 133,
15622 columnNumber: 9
15623 }, undefined);
15624});
15625TabPane.displayName = 'TabPane';
15626TabPane.propTypes = TabPane_propTypes;
15627/* harmony default export */ const src_TabPane = (TabPane);
15628;// CONCATENATED MODULE: ./src/Tab.tsx
15629
15630
15631
15632
15633/* eslint-disable react/no-unused-prop-types */
15634const Tab_propTypes = {
15635 eventKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
15636 /**
15637 * Content for the tab title.
15638 */
15639 title: (prop_types_default()).node.isRequired,
15640 /**
15641 * The disabled state of the tab.
15642 */
15643 disabled: (prop_types_default()).bool,
15644 /**
15645 * Class to pass to the underlying nav link.
15646 */
15647 tabClassName: (prop_types_default()).string,
15648 /**
15649 * Object containing attributes to pass to underlying nav link.
15650 */
15651 tabAttrs: (prop_types_default()).object
15652};
15653const Tab = () => {
15654 throw new Error('ReactBootstrap: The `Tab` component is not meant to be rendered! ' + "It's an abstract component that is only valid as a direct Child of the `Tabs` Component. " + 'For custom tabs components use TabPane and TabsContainer directly');
15655};
15656Tab.propTypes = Tab_propTypes;
15657/* harmony default export */ const src_Tab = (Object.assign(Tab, {
15658 Container: src_TabContainer,
15659 Content: src_TabContent,
15660 Pane: src_TabPane
15661}));
15662;// CONCATENATED MODULE: ./src/Table.tsx
15663var Table_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Table.tsx";
15664
15665
15666
15667
15668
15669const Table_propTypes = {
15670 /**
15671 * @default 'table'
15672 */
15673 bsPrefix: (prop_types_default()).string,
15674 /**
15675 * Adds zebra-striping to any table row within the `<tbody>`.
15676 * Use `columns` to add zebra-striping to any table column.
15677 */
15678 striped: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).string]),
15679 /**
15680 * Adds borders on all sides of the table and cells.
15681 */
15682 bordered: (prop_types_default()).bool,
15683 /**
15684 * Removes all borders on the table and cells, including table header.
15685 */
15686 borderless: (prop_types_default()).bool,
15687 /**
15688 * Enable a hover state on table rows within a `<tbody>`.
15689 */
15690 hover: (prop_types_default()).bool,
15691 /**
15692 * Make tables more compact by cutting cell padding in half by setting
15693 * size as `sm`.
15694 */
15695 size: (prop_types_default()).string,
15696 /**
15697 * Invert the colors of the table — with light text on dark backgrounds
15698 * by setting variant as `dark`.
15699 */
15700 variant: (prop_types_default()).string,
15701 /**
15702 * Responsive tables allow tables to be scrolled horizontally with ease.
15703 * Across every breakpoint, use `responsive` for horizontally
15704 * scrolling tables. Responsive tables are wrapped automatically in a `div`.
15705 * Use `responsive="sm"`, `responsive="md"`, `responsive="lg"`, or
15706 * `responsive="xl"` as needed to create responsive tables up to
15707 * a particular breakpoint. From that breakpoint and up, the table will
15708 * behave normally and not scroll horizontally.
15709 */
15710 responsive: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).string])
15711};
15712const Table = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
15713 bsPrefix,
15714 className,
15715 striped,
15716 bordered,
15717 borderless,
15718 hover,
15719 size,
15720 variant,
15721 responsive,
15722 ...props
15723}, ref) => {
15724 const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'table');
15725 const classes = classnames_default()(className, decoratedBsPrefix, variant && `${decoratedBsPrefix}-${variant}`, size && `${decoratedBsPrefix}-${size}`, striped && `${decoratedBsPrefix}-${typeof striped === 'string' ? `striped-${striped}` : 'striped'}`, bordered && `${decoratedBsPrefix}-bordered`, borderless && `${decoratedBsPrefix}-borderless`, hover && `${decoratedBsPrefix}-hover`);
15726 const table = /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("table", {
15727 ...props,
15728 className: classes,
15729 ref: ref
15730 }, void 0, false, {
15731 fileName: Table_jsxFileName,
15732 lineNumber: 103,
15733 columnNumber: 19
15734 }, undefined);
15735 if (responsive) {
15736 let responsiveClass = `${decoratedBsPrefix}-responsive`;
15737 if (typeof responsive === 'string') {
15738 responsiveClass = `${responsiveClass}-${responsive}`;
15739 }
15740 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
15741 className: responsiveClass,
15742 children: table
15743 }, void 0, false, {
15744 fileName: Table_jsxFileName,
15745 lineNumber: 110,
15746 columnNumber: 14
15747 }, undefined);
15748 }
15749 return table;
15750});
15751Table.propTypes = Table_propTypes;
15752/* harmony default export */ const src_Table = (Table);
15753;// CONCATENATED MODULE: ./src/Tabs.tsx
15754var Tabs_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Tabs.tsx";
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767const Tabs_propTypes = {
15768 /**
15769 * Mark the Tab with a matching `eventKey` as active.
15770 *
15771 * @controllable onSelect
15772 */
15773 activeKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
15774 /** The default active key that is selected on start */
15775 defaultActiveKey: prop_types_default().oneOfType([(prop_types_default()).string, (prop_types_default()).number]),
15776 /**
15777 * Navigation style
15778 *
15779 * @type {('tabs'| 'pills' | 'underline')}
15780 */
15781 variant: (prop_types_default()).string,
15782 /**
15783 * Sets a default animation strategy for all children `<TabPane>`s.<tbcont
15784 *
15785 * Defaults to `<Fade>` animation, else use `false` to disable or a
15786 * react-transition-group `<Transition/>` component.
15787 *
15788 * @type {Transition | false}
15789 * @default {Fade}
15790 */
15791 transition: prop_types_default().oneOfType([prop_types_default().oneOf([false]), (prop_types_default()).elementType]),
15792 /**
15793 * HTML id attribute, required if no `generateChildId` prop
15794 * is specified.
15795 *
15796 * @type {string}
15797 */
15798 id: (prop_types_default()).string,
15799 /**
15800 * Callback fired when a Tab is selected.
15801 *
15802 * ```js
15803 * function (
15804 * Any eventKey,
15805 * SyntheticEvent event?
15806 * )
15807 * ```
15808 *
15809 * @controllable activeKey
15810 */
15811 onSelect: (prop_types_default()).func,
15812 /**
15813 * Wait until the first "enter" transition to mount tabs (add them to the DOM)
15814 */
15815 mountOnEnter: (prop_types_default()).bool,
15816 /**
15817 * Unmount tabs (remove it from the DOM) when it is no longer visible
15818 */
15819 unmountOnExit: (prop_types_default()).bool,
15820 /**
15821 * Have all `Tabs`s proportionately fill all available width.
15822 */
15823 fill: (prop_types_default()).bool,
15824 /**
15825 * Have all `Tab`s evenly fill all available width.
15826 */
15827 justify: (prop_types_default()).bool
15828};
15829function getDefaultActiveKey(children) {
15830 let defaultActiveKey;
15831 forEach(children, child => {
15832 if (defaultActiveKey == null) {
15833 defaultActiveKey = child.props.eventKey;
15834 }
15835 });
15836 return defaultActiveKey;
15837}
15838function renderTab(child) {
15839 const {
15840 title,
15841 eventKey,
15842 disabled,
15843 tabClassName,
15844 tabAttrs,
15845 id
15846 } = child.props;
15847 if (title == null) {
15848 return null;
15849 }
15850 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_NavItem, {
15851 as: "li",
15852 role: "presentation",
15853 children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_NavLink, {
15854 as: "button",
15855 type: "button",
15856 eventKey: eventKey,
15857 disabled: disabled,
15858 id: id,
15859 className: tabClassName,
15860 ...tabAttrs,
15861 children: title
15862 }, void 0, false, {
15863 fileName: Tabs_jsxFileName,
15864 lineNumber: 116,
15865 columnNumber: 7
15866 }, this)
15867 }, void 0, false, {
15868 fileName: Tabs_jsxFileName,
15869 lineNumber: 115,
15870 columnNumber: 5
15871 }, this);
15872}
15873const Tabs_Tabs = props => {
15874 const {
15875 id,
15876 onSelect,
15877 transition,
15878 mountOnEnter = false,
15879 unmountOnExit = false,
15880 variant = 'tabs',
15881 children,
15882 activeKey = getDefaultActiveKey(children),
15883 ...controlledProps
15884 } = useUncontrolled(props, {
15885 activeKey: 'onSelect'
15886 });
15887 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Tabs, {
15888 id: id,
15889 activeKey: activeKey,
15890 onSelect: onSelect,
15891 transition: getTabTransitionComponent(transition),
15892 mountOnEnter: mountOnEnter,
15893 unmountOnExit: unmountOnExit,
15894 children: [/*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Nav, {
15895 ...controlledProps,
15896 role: "tablist",
15897 as: "ul",
15898 variant: variant,
15899 children: map(children, renderTab)
15900 }, void 0, false, {
15901 fileName: Tabs_jsxFileName,
15902 lineNumber: 155,
15903 columnNumber: 7
15904 }, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_TabContent, {
15905 children: map(children, child => {
15906 const childProps = {
15907 ...child.props
15908 };
15909 delete childProps.title;
15910 delete childProps.disabled;
15911 delete childProps.tabClassName;
15912 delete childProps.tabAttrs;
15913 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_TabPane, {
15914 ...childProps
15915 }, void 0, false, {
15916 fileName: Tabs_jsxFileName,
15917 lineNumber: 168,
15918 columnNumber: 18
15919 }, undefined);
15920 })
15921 }, void 0, false, {
15922 fileName: Tabs_jsxFileName,
15923 lineNumber: 159,
15924 columnNumber: 7
15925 }, undefined)]
15926 }, void 0, true, {
15927 fileName: Tabs_jsxFileName,
15928 lineNumber: 147,
15929 columnNumber: 5
15930 }, undefined);
15931};
15932Tabs_Tabs.propTypes = Tabs_propTypes;
15933Tabs_Tabs.displayName = 'Tabs';
15934/* harmony default export */ const src_Tabs = (Tabs_Tabs);
15935;// CONCATENATED MODULE: ./src/ToastFade.tsx
15936var ToastFade_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ToastFade.tsx";
15937
15938
15939
15940
15941const ToastFade_fadeStyles = {
15942 [ENTERING]: 'showing',
15943 [EXITING]: 'showing show'
15944};
15945const ToastFade = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Fade, {
15946 ...props,
15947 ref: ref,
15948 transitionClasses: ToastFade_fadeStyles
15949}, void 0, false, {
15950 fileName: ToastFade_jsxFileName,
15951 lineNumber: 14,
15952 columnNumber: 3
15953}, undefined));
15954ToastFade.displayName = 'ToastFade';
15955/* harmony default export */ const src_ToastFade = (ToastFade);
15956;// CONCATENATED MODULE: ./src/ToastContext.tsx
15957
15958const ToastContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
15959 // eslint-disable-next-line @typescript-eslint/no-empty-function
15960 onClose() {}
15961});
15962/* harmony default export */ const src_ToastContext = (ToastContext);
15963;// CONCATENATED MODULE: ./src/ToastHeader.tsx
15964var ToastHeader_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ToastHeader.tsx";
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974const ToastHeader_propTypes = {
15975 bsPrefix: (prop_types_default()).string,
15976 /**
15977 * Provides an accessible label for the close
15978 * button. It is used for Assistive Technology when the label text is not
15979 * readable.
15980 */
15981 closeLabel: (prop_types_default()).string,
15982 /**
15983 * Sets the variant for close button.
15984 */
15985 closeVariant: prop_types_default().oneOf(['white']),
15986 /**
15987 * Specify whether the Component should contain a close button
15988 */
15989 closeButton: (prop_types_default()).bool
15990};
15991const ToastHeader = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
15992 bsPrefix,
15993 closeLabel = 'Close',
15994 closeVariant,
15995 closeButton = true,
15996 className,
15997 children,
15998 ...props
15999}, ref) => {
16000 bsPrefix = useBootstrapPrefix(bsPrefix, 'toast-header');
16001 const context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(src_ToastContext);
16002 const handleClick = useEventCallback(e => {
16003 context == null ? void 0 : context.onClose == null ? void 0 : context.onClose(e);
16004 });
16005 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
16006 ref: ref,
16007 ...props,
16008 className: classnames_default()(bsPrefix, className),
16009 children: [children, closeButton && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_CloseButton, {
16010 "aria-label": closeLabel,
16011 variant: closeVariant,
16012 onClick: handleClick,
16013 "data-dismiss": "toast"
16014 }, void 0, false, {
16015 fileName: ToastHeader_jsxFileName,
16016 lineNumber: 67,
16017 columnNumber: 11
16018 }, undefined)]
16019 }, void 0, true, {
16020 fileName: ToastHeader_jsxFileName,
16021 lineNumber: 63,
16022 columnNumber: 7
16023 }, undefined);
16024});
16025ToastHeader.displayName = 'ToastHeader';
16026ToastHeader.propTypes = ToastHeader_propTypes;
16027/* harmony default export */ const src_ToastHeader = (ToastHeader);
16028;// CONCATENATED MODULE: ./src/ToastBody.tsx
16029var ToastBody_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ToastBody.tsx";
16030
16031
16032
16033
16034const ToastBody = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
16035 className,
16036 bsPrefix,
16037 as: Component = 'div',
16038 ...props
16039}, ref) => {
16040 bsPrefix = useBootstrapPrefix(bsPrefix, 'toast-body');
16041 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
16042 ref: ref,
16043 className: classnames_default()(className, bsPrefix),
16044 ...props
16045 }, void 0, false, {
16046 fileName: ToastBody_jsxFileName,
16047 lineNumber: 15,
16048 columnNumber: 9
16049 }, undefined);
16050});
16051ToastBody.displayName = 'ToastBody';
16052/* harmony default export */ const src_ToastBody = (ToastBody);
16053;// CONCATENATED MODULE: ./src/Toast.tsx
16054var Toast_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Toast.tsx";
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066const Toast_propTypes = {
16067 /**
16068 * @default 'toast'
16069 */
16070 bsPrefix: (prop_types_default()).string,
16071 /**
16072 * Apply a CSS fade transition to the toast
16073 */
16074 animation: (prop_types_default()).bool,
16075 /**
16076 * Auto hide the toast
16077 */
16078 autohide: (prop_types_default()).bool,
16079 /**
16080 * Delay hiding the toast (ms)
16081 */
16082 delay: (prop_types_default()).number,
16083 /**
16084 * A Callback fired when the close button is clicked.
16085 */
16086 onClose: (prop_types_default()).func,
16087 /**
16088 * Callback fired before the toast transitions in
16089 */
16090 onEnter: (prop_types_default()).func,
16091 /**
16092 * Callback fired as the toast begins to transition in
16093 */
16094 onEntering: (prop_types_default()).func,
16095 /**
16096 * Callback fired after the toast finishes transitioning in
16097 */
16098 onEntered: (prop_types_default()).func,
16099 /**
16100 * Transition onExit callback when animation is not `false`
16101 */
16102 onExit: (prop_types_default()).func,
16103 /**
16104 * Transition onExiting callback when animation is not `false`
16105 */
16106 onExiting: (prop_types_default()).func,
16107 /**
16108 * Transition onExited callback when animation is not `false`
16109 */
16110 onExited: (prop_types_default()).func,
16111 /**
16112 * When `true` The toast will show itself.
16113 */
16114 show: (prop_types_default()).bool,
16115 /**
16116 * A `react-transition-group` Transition component used to animate the Toast on dismissal.
16117 */
16118 transition: (prop_types_default()).elementType,
16119 /**
16120 * Sets Toast background
16121 *
16122 * @type {('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'dark'|'light')}
16123 */
16124 bg: (prop_types_default()).string
16125};
16126const Toast = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
16127 bsPrefix,
16128 className,
16129 transition: Transition = src_ToastFade,
16130 show = true,
16131 animation = true,
16132 delay = 5000,
16133 autohide = false,
16134 onClose,
16135 onEntered,
16136 onExit,
16137 onExiting,
16138 onEnter,
16139 onEntering,
16140 onExited,
16141 bg,
16142 ...props
16143}, ref) => {
16144 bsPrefix = useBootstrapPrefix(bsPrefix, 'toast');
16145
16146 // We use refs for these, because we don't want to restart the autohide
16147 // timer in case these values change.
16148 const delayRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(delay);
16149 const onCloseRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(onClose);
16150 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
16151 delayRef.current = delay;
16152 onCloseRef.current = onClose;
16153 }, [delay, onClose]);
16154 const autohideTimeout = useTimeout();
16155 const autohideToast = !!(autohide && show);
16156 const autohideFunc = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(() => {
16157 if (autohideToast) {
16158 onCloseRef.current == null ? void 0 : onCloseRef.current();
16159 }
16160 }, [autohideToast]);
16161 (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
16162 // Only reset timer if show or autohide changes.
16163 autohideTimeout.set(autohideFunc, delayRef.current);
16164 }, [autohideTimeout, autohideFunc]);
16165 const toastContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
16166 onClose
16167 }), [onClose]);
16168 const hasAnimation = !!(Transition && animation);
16169 const toast = /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
16170 ...props,
16171 ref: ref,
16172 className: classnames_default()(bsPrefix, className, bg && `bg-${bg}`, !hasAnimation && (show ? 'show' : 'hide')),
16173 role: "alert",
16174 "aria-live": "assertive",
16175 "aria-atomic": "true"
16176 }, void 0, false, {
16177 fileName: Toast_jsxFileName,
16178 lineNumber: 163,
16179 columnNumber: 9
16180 }, undefined);
16181 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_ToastContext.Provider, {
16182 value: toastContext,
16183 children: hasAnimation && Transition ? /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Transition, {
16184 in: show,
16185 onEnter: onEnter,
16186 onEntering: onEntering,
16187 onEntered: onEntered,
16188 onExit: onExit,
16189 onExiting: onExiting,
16190 onExited: onExited,
16191 unmountOnExit: true,
16192 children: toast
16193 }, void 0, false, {
16194 fileName: Toast_jsxFileName,
16195 lineNumber: 181,
16196 columnNumber: 13
16197 }, undefined) : toast
16198 }, void 0, false, {
16199 fileName: Toast_jsxFileName,
16200 lineNumber: 179,
16201 columnNumber: 9
16202 }, undefined);
16203});
16204Toast.propTypes = Toast_propTypes;
16205Toast.displayName = 'Toast';
16206/* harmony default export */ const src_Toast = (Object.assign(Toast, {
16207 Body: src_ToastBody,
16208 Header: src_ToastHeader
16209}));
16210;// CONCATENATED MODULE: ./src/ToastContainer.tsx
16211var ToastContainer_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ToastContainer.tsx";
16212
16213
16214
16215
16216
16217const ToastContainer_propTypes = {
16218 /**
16219 * @default 'toast-container'
16220 */
16221 bsPrefix: (prop_types_default()).string,
16222 /**
16223 * Where the toasts will be placed within the container.
16224 */
16225 position: prop_types_default().oneOf(['top-start', 'top-center', 'top-end', 'middle-start', 'middle-center', 'middle-end', 'bottom-start', 'bottom-center', 'bottom-end']),
16226 /**
16227 * Specify the positioning method for the container.
16228 */
16229 containerPosition: (prop_types_default()).string
16230};
16231const positionClasses = {
16232 'top-start': 'top-0 start-0',
16233 'top-center': 'top-0 start-50 translate-middle-x',
16234 'top-end': 'top-0 end-0',
16235 'middle-start': 'top-50 start-0 translate-middle-y',
16236 'middle-center': 'top-50 start-50 translate-middle',
16237 'middle-end': 'top-50 end-0 translate-middle-y',
16238 'bottom-start': 'bottom-0 start-0',
16239 'bottom-center': 'bottom-0 start-50 translate-middle-x',
16240 'bottom-end': 'bottom-0 end-0'
16241};
16242const ToastContainer = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
16243 bsPrefix,
16244 position,
16245 containerPosition,
16246 className,
16247 // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
16248 as: Component = 'div',
16249 ...props
16250}, ref) => {
16251 bsPrefix = useBootstrapPrefix(bsPrefix, 'toast-container');
16252 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
16253 ref: ref,
16254 ...props,
16255 className: classnames_default()(bsPrefix, position && positionClasses[position], containerPosition && `position-${containerPosition}`, className)
16256 }, void 0, false, {
16257 fileName: ToastContainer_jsxFileName,
16258 lineNumber: 83,
16259 columnNumber: 7
16260 }, undefined);
16261});
16262ToastContainer.displayName = 'ToastContainer';
16263ToastContainer.propTypes = ToastContainer_propTypes;
16264/* harmony default export */ const src_ToastContainer = (ToastContainer);
16265;// CONCATENATED MODULE: ./src/ToggleButton.tsx
16266var ToggleButton_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ToggleButton.tsx";
16267
16268
16269
16270
16271
16272
16273
16274const ToggleButton_noop = () => undefined;
16275const ToggleButton_propTypes = {
16276 /**
16277 * @default 'btn-check'
16278 */
16279 bsPrefix: (prop_types_default()).string,
16280 /**
16281 * The `<input>` element `type`
16282 */
16283 type: prop_types_default().oneOf(['checkbox', 'radio']),
16284 /**
16285 * The HTML input name, used to group like checkboxes or radio buttons together
16286 * semantically
16287 */
16288 name: (prop_types_default()).string,
16289 /**
16290 * The checked state of the input, managed by `<ToggleButtonGroup>` automatically
16291 */
16292 checked: (prop_types_default()).bool,
16293 /**
16294 * The disabled state of both the label and input
16295 */
16296 disabled: (prop_types_default()).bool,
16297 /**
16298 * `id` is required for button clicks to toggle input.
16299 */
16300 id: (prop_types_default()).string.isRequired,
16301 /**
16302 * A callback fired when the underlying input element changes. This is passed
16303 * directly to the `<input>` so shares the same signature as a native `onChange` event.
16304 */
16305 onChange: (prop_types_default()).func,
16306 /**
16307 * The value of the input, should be unique amongst its siblings when nested in a
16308 * `ToggleButtonGroup`.
16309 */
16310 value: prop_types_default().oneOfType([(prop_types_default()).string, prop_types_default().arrayOf((prop_types_default()).string.isRequired), (prop_types_default()).number]).isRequired,
16311 /**
16312 * A ref attached to the `<input>` element
16313 * @type {ReactRef}
16314 */
16315 inputRef: prop_types_default().oneOfType([(prop_types_default()).func, (prop_types_default()).any])
16316};
16317const ToggleButton = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
16318 bsPrefix,
16319 name,
16320 className,
16321 checked,
16322 type,
16323 onChange,
16324 value,
16325 disabled,
16326 id,
16327 inputRef,
16328 ...props
16329}, ref) => {
16330 bsPrefix = useBootstrapPrefix(bsPrefix, 'btn-check');
16331 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(jsx_dev_runtime.Fragment, {
16332 children: [/*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("input", {
16333 className: bsPrefix,
16334 name: name,
16335 type: type,
16336 value: value,
16337 ref: inputRef,
16338 autoComplete: "off",
16339 checked: !!checked,
16340 disabled: !!disabled,
16341 onChange: onChange || ToggleButton_noop,
16342 id: id
16343 }, void 0, false, {
16344 fileName: ToggleButton_jsxFileName,
16345 lineNumber: 99,
16346 columnNumber: 9
16347 }, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Button, {
16348 ...props,
16349 ref: ref,
16350 className: classnames_default()(className, disabled && 'disabled'),
16351 type: undefined,
16352 role: undefined,
16353 as: "label",
16354 htmlFor: id
16355 }, void 0, false, {
16356 fileName: ToggleButton_jsxFileName,
16357 lineNumber: 111,
16358 columnNumber: 9
16359 }, undefined)]
16360 }, void 0, true);
16361});
16362ToggleButton.propTypes = ToggleButton_propTypes;
16363ToggleButton.displayName = 'ToggleButton';
16364/* harmony default export */ const src_ToggleButton = (ToggleButton);
16365;// CONCATENATED MODULE: ./src/ToggleButtonGroup.tsx
16366var ToggleButtonGroup_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/ToggleButtonGroup.tsx";
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376const ToggleButtonGroup_propTypes = {
16377 /**
16378 * An HTML `<input>` name for each child button.
16379 *
16380 * __Required if `type` is set to `'radio'`__
16381 */
16382 name: (prop_types_default()).string,
16383 /**
16384 * The value, or array of values, of the active (pressed) buttons
16385 *
16386 * @controllable onChange
16387 */
16388 value: (prop_types_default()).any,
16389 /**
16390 * Callback fired when a button is pressed, depending on whether the `type`
16391 * is `'radio'` or `'checkbox'`, `onChange` will be called with the value or
16392 * array of active values
16393 *
16394 * @controllable value
16395 */
16396 onChange: (prop_types_default()).func,
16397 /**
16398 * The input `type` of the rendered buttons, determines the toggle behavior
16399 * of the buttons
16400 */
16401 type: prop_types_default().oneOf(['checkbox', 'radio']).isRequired,
16402 /**
16403 * Sets the size for all Buttons in the group.
16404 *
16405 * @type ('sm'|'lg')
16406 */
16407 size: (prop_types_default()).string,
16408 /** Make the set of Buttons appear vertically stacked. */
16409 vertical: (prop_types_default()).bool
16410};
16411const ToggleButtonGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
16412 const {
16413 children,
16414 type = 'radio',
16415 name,
16416 value,
16417 onChange,
16418 vertical = false,
16419 ...controlledProps
16420 } = useUncontrolled(props, {
16421 value: 'onChange'
16422 });
16423 const getValues = () => value == null ? [] : [].concat(value);
16424 const handleToggle = (inputVal, event) => {
16425 if (!onChange) {
16426 return;
16427 }
16428 const values = getValues();
16429 const isActive = values.indexOf(inputVal) !== -1;
16430 if (type === 'radio') {
16431 if (!isActive) onChange(inputVal, event);
16432 return;
16433 }
16434 if (isActive) {
16435 onChange(values.filter(n => n !== inputVal), event);
16436 } else {
16437 onChange([...values, inputVal], event);
16438 }
16439 };
16440 !(type !== 'radio' || !!name) ? false ? 0 : browser_default()(false) : void 0;
16441 return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_ButtonGroup, {
16442 ...controlledProps,
16443 ref: ref,
16444 vertical: vertical,
16445 children: map(children, child => {
16446 const values = getValues();
16447 const {
16448 value: childVal,
16449 onChange: childOnChange
16450 } = child.props;
16451 const handler = e => handleToggle(childVal, e);
16452 return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement(child, {
16453 type,
16454 name: child.name || name,
16455 checked: values.indexOf(childVal) !== -1,
16456 onChange: src_createChainedFunction(childOnChange, handler)
16457 });
16458 })
16459 }, void 0, false, {
16460 fileName: ToggleButtonGroup_jsxFileName,
16461 lineNumber: 125,
16462 columnNumber: 5
16463 }, undefined);
16464});
16465ToggleButtonGroup.propTypes = ToggleButtonGroup_propTypes;
16466/* harmony default export */ const src_ToggleButtonGroup = (Object.assign(ToggleButtonGroup, {
16467 Button: src_ToggleButton
16468}));
16469;// CONCATENATED MODULE: ./src/index.tsx
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580})();
16581
16582/******/ return __webpack_exports__;
16583/******/ })()
16584;
16585});
\No newline at end of file