bootstrap 5.0.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/assets/javascripts/bootstrap/alert.js +77 -106
  4. data/assets/javascripts/bootstrap/base-component.js +126 -7
  5. data/assets/javascripts/bootstrap/button.js +24 -24
  6. data/assets/javascripts/bootstrap/carousel.js +115 -128
  7. data/assets/javascripts/bootstrap/collapse.js +119 -176
  8. data/assets/javascripts/bootstrap/dom/data.js +2 -2
  9. data/assets/javascripts/bootstrap/dom/event-handler.js +3 -4
  10. data/assets/javascripts/bootstrap/dom/manipulator.js +4 -4
  11. data/assets/javascripts/bootstrap/dom/selector-engine.js +47 -5
  12. data/assets/javascripts/bootstrap/dropdown.js +142 -130
  13. data/assets/javascripts/bootstrap/modal.js +376 -171
  14. data/assets/javascripts/bootstrap/offcanvas.js +328 -133
  15. data/assets/javascripts/bootstrap/popover.js +27 -59
  16. data/assets/javascripts/bootstrap/scrollspy.js +51 -56
  17. data/assets/javascripts/bootstrap/tab.js +39 -66
  18. data/assets/javascripts/bootstrap/toast.js +175 -86
  19. data/assets/javascripts/bootstrap/tooltip.js +141 -185
  20. data/assets/javascripts/bootstrap-sprockets.js +6 -6
  21. data/assets/javascripts/bootstrap.js +1031 -1026
  22. data/assets/javascripts/bootstrap.min.js +2 -2
  23. data/assets/stylesheets/_bootstrap-grid.scss +3 -1
  24. data/assets/stylesheets/_bootstrap-reboot.scss +2 -4
  25. data/assets/stylesheets/_bootstrap.scss +2 -1
  26. data/assets/stylesheets/bootstrap/_card.scss +7 -6
  27. data/assets/stylesheets/bootstrap/_carousel.scss +2 -2
  28. data/assets/stylesheets/bootstrap/_dropdown.scss +4 -4
  29. data/assets/stylesheets/bootstrap/_functions.scss +100 -3
  30. data/assets/stylesheets/bootstrap/_grid.scss +11 -0
  31. data/assets/stylesheets/bootstrap/_helpers.scss +2 -0
  32. data/assets/stylesheets/bootstrap/_images.scss +1 -1
  33. data/assets/stylesheets/bootstrap/_list-group.scss +5 -5
  34. data/assets/stylesheets/bootstrap/_mixins.scss +1 -0
  35. data/assets/stylesheets/bootstrap/_modal.scss +7 -26
  36. data/assets/stylesheets/bootstrap/_navbar.scss +30 -1
  37. data/assets/stylesheets/bootstrap/_offcanvas.scss +8 -2
  38. data/assets/stylesheets/bootstrap/_placeholders.scss +51 -0
  39. data/assets/stylesheets/bootstrap/_popover.scss +10 -10
  40. data/assets/stylesheets/bootstrap/_reboot.scss +12 -8
  41. data/assets/stylesheets/bootstrap/_root.scss +40 -2
  42. data/assets/stylesheets/bootstrap/_tables.scss +1 -0
  43. data/assets/stylesheets/bootstrap/_toasts.scss +3 -3
  44. data/assets/stylesheets/bootstrap/_tooltip.scss +4 -4
  45. data/assets/stylesheets/bootstrap/_transitions.scss +6 -0
  46. data/assets/stylesheets/bootstrap/_utilities.scss +44 -8
  47. data/assets/stylesheets/bootstrap/_variables.scss +200 -25
  48. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -1
  49. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +3 -1
  50. data/assets/stylesheets/bootstrap/forms/_form-check.scss +1 -1
  51. data/assets/stylesheets/bootstrap/forms/_form-control.scss +6 -6
  52. data/assets/stylesheets/bootstrap/forms/_form-range.scss +1 -1
  53. data/assets/stylesheets/bootstrap/forms/_form-select.scss +3 -0
  54. data/assets/stylesheets/bootstrap/helpers/_stacks.scss +15 -0
  55. data/assets/stylesheets/bootstrap/helpers/_vr.scss +8 -0
  56. data/assets/stylesheets/bootstrap/mixins/_backdrop.scss +14 -0
  57. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +1 -1
  58. data/assets/stylesheets/bootstrap/mixins/_forms.scss +8 -1
  59. data/assets/stylesheets/bootstrap/mixins/_grid.scss +33 -8
  60. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +27 -6
  61. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +55 -13
  62. data/bootstrap.gemspec +3 -3
  63. data/lib/bootstrap/version.rb +2 -2
  64. data/tasks/updater/js.rb +6 -2
  65. metadata +12 -8
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap v5.0.0 (https://getbootstrap.com/)
2
+ * Bootstrap v5.1.1 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
4
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
5
  */
@@ -33,7 +33,7 @@
33
33
 
34
34
  /**
35
35
  * --------------------------------------------------------------------------
36
- * Bootstrap (v5.0.0): util/index.js
36
+ * Bootstrap (v5.1.1): util/index.js
37
37
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
38
38
  * --------------------------------------------------------------------------
39
39
  */
@@ -129,24 +129,29 @@
129
129
  element.dispatchEvent(new Event(TRANSITION_END));
130
130
  };
131
131
 
132
- const isElement = obj => (obj[0] || obj).nodeType;
132
+ const isElement = obj => {
133
+ if (!obj || typeof obj !== 'object') {
134
+ return false;
135
+ }
133
136
 
134
- const emulateTransitionEnd = (element, duration) => {
135
- let called = false;
136
- const durationPadding = 5;
137
- const emulatedDuration = duration + durationPadding;
137
+ if (typeof obj.jquery !== 'undefined') {
138
+ obj = obj[0];
139
+ }
138
140
 
139
- function listener() {
140
- called = true;
141
- element.removeEventListener(TRANSITION_END, listener);
141
+ return typeof obj.nodeType !== 'undefined';
142
+ };
143
+
144
+ const getElement = obj => {
145
+ if (isElement(obj)) {
146
+ // it's a jQuery object or a node element
147
+ return obj.jquery ? obj[0] : obj;
142
148
  }
143
149
 
144
- element.addEventListener(TRANSITION_END, listener);
145
- setTimeout(() => {
146
- if (!called) {
147
- triggerTransitionEnd(element);
148
- }
149
- }, emulatedDuration);
150
+ if (typeof obj === 'string' && obj.length > 0) {
151
+ return document.querySelector(obj);
152
+ }
153
+
154
+ return null;
150
155
  };
151
156
 
152
157
  const typeCheckConfig = (componentName, config, configTypes) => {
@@ -162,17 +167,11 @@
162
167
  };
163
168
 
164
169
  const isVisible = element => {
165
- if (!element) {
170
+ if (!isElement(element) || element.getClientRects().length === 0) {
166
171
  return false;
167
172
  }
168
173
 
169
- if (element.style && element.parentNode && element.parentNode.style) {
170
- const elementStyle = getComputedStyle(element);
171
- const parentNodeStyle = getComputedStyle(element.parentNode);
172
- return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
173
- }
174
-
175
- return false;
174
+ return getComputedStyle(element).getPropertyValue('visibility') === 'visible';
176
175
  };
177
176
 
178
177
  const isDisabled = element => {
@@ -215,8 +214,20 @@
215
214
  };
216
215
 
217
216
  const noop = () => {};
217
+ /**
218
+ * Trick to restart an element's animation
219
+ *
220
+ * @param {HTMLElement} element
221
+ * @return void
222
+ *
223
+ * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
224
+ */
225
+
218
226
 
219
- const reflow = element => element.offsetHeight;
227
+ const reflow = element => {
228
+ // eslint-disable-next-line no-unused-expressions
229
+ element.offsetHeight;
230
+ };
220
231
 
221
232
  const getjQuery = () => {
222
233
  const {
@@ -230,9 +241,18 @@
230
241
  return null;
231
242
  };
232
243
 
244
+ const DOMContentLoadedCallbacks = [];
245
+
233
246
  const onDOMContentLoaded = callback => {
234
247
  if (document.readyState === 'loading') {
235
- document.addEventListener('DOMContentLoaded', callback);
248
+ // add listener on the first call when the document is in loading state
249
+ if (!DOMContentLoadedCallbacks.length) {
250
+ document.addEventListener('DOMContentLoaded', () => {
251
+ DOMContentLoadedCallbacks.forEach(callback => callback());
252
+ });
253
+ }
254
+
255
+ DOMContentLoadedCallbacks.push(callback);
236
256
  } else {
237
257
  callback();
238
258
  }
@@ -240,12 +260,13 @@
240
260
 
241
261
  const isRTL = () => document.documentElement.dir === 'rtl';
242
262
 
243
- const defineJQueryPlugin = (name, plugin) => {
263
+ const defineJQueryPlugin = plugin => {
244
264
  onDOMContentLoaded(() => {
245
265
  const $ = getjQuery();
246
266
  /* istanbul ignore if */
247
267
 
248
268
  if ($) {
269
+ const name = plugin.NAME;
249
270
  const JQUERY_NO_CONFLICT = $.fn[name];
250
271
  $.fn[name] = plugin.jQueryInterface;
251
272
  $.fn[name].Constructor = plugin;
@@ -264,63 +285,66 @@
264
285
  }
265
286
  };
266
287
 
267
- /**
268
- * --------------------------------------------------------------------------
269
- * Bootstrap (v5.0.0): dom/data.js
270
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
271
- * --------------------------------------------------------------------------
272
- */
273
-
274
- /**
275
- * ------------------------------------------------------------------------
276
- * Constants
277
- * ------------------------------------------------------------------------
278
- */
279
- const elementMap = new Map();
280
- var Data = {
281
- set(element, key, instance) {
282
- if (!elementMap.has(element)) {
283
- elementMap.set(element, new Map());
284
- }
288
+ const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
289
+ if (!waitForTransition) {
290
+ execute(callback);
291
+ return;
292
+ }
285
293
 
286
- const instanceMap = elementMap.get(element); // make it clear we only want one instance per element
287
- // can be removed later when multiple key/instances are fine to be used
294
+ const durationPadding = 5;
295
+ const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;
296
+ let called = false;
288
297
 
289
- if (!instanceMap.has(key) && instanceMap.size !== 0) {
290
- // eslint-disable-next-line no-console
291
- console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
298
+ const handler = ({
299
+ target
300
+ }) => {
301
+ if (target !== transitionElement) {
292
302
  return;
293
303
  }
294
304
 
295
- instanceMap.set(key, instance);
296
- },
305
+ called = true;
306
+ transitionElement.removeEventListener(TRANSITION_END, handler);
307
+ execute(callback);
308
+ };
297
309
 
298
- get(element, key) {
299
- if (elementMap.has(element)) {
300
- return elementMap.get(element).get(key) || null;
310
+ transitionElement.addEventListener(TRANSITION_END, handler);
311
+ setTimeout(() => {
312
+ if (!called) {
313
+ triggerTransitionEnd(transitionElement);
301
314
  }
315
+ }, emulatedDuration);
316
+ };
317
+ /**
318
+ * Return the previous/next element of a list.
319
+ *
320
+ * @param {array} list The list of elements
321
+ * @param activeElement The active element
322
+ * @param shouldGetNext Choose to get next or previous element
323
+ * @param isCycleAllowed
324
+ * @return {Element|elem} The proper element
325
+ */
302
326
 
303
- return null;
304
- },
305
327
 
306
- remove(element, key) {
307
- if (!elementMap.has(element)) {
308
- return;
309
- }
328
+ const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {
329
+ let index = list.indexOf(activeElement); // if the element does not exist in the list return an element depending on the direction and if cycle is allowed
310
330
 
311
- const instanceMap = elementMap.get(element);
312
- instanceMap.delete(key); // free up element references if there are no instances left for an element
331
+ if (index === -1) {
332
+ return list[!shouldGetNext && isCycleAllowed ? list.length - 1 : 0];
333
+ }
313
334
 
314
- if (instanceMap.size === 0) {
315
- elementMap.delete(element);
316
- }
335
+ const listLength = list.length;
336
+ index += shouldGetNext ? 1 : -1;
337
+
338
+ if (isCycleAllowed) {
339
+ index = (index + listLength) % listLength;
317
340
  }
318
341
 
342
+ return list[Math.max(0, Math.min(index, listLength - 1))];
319
343
  };
320
344
 
321
345
  /**
322
346
  * --------------------------------------------------------------------------
323
- * Bootstrap (v5.0.0): dom/event-handler.js
347
+ * Bootstrap (v5.1.1): dom/event-handler.js
324
348
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
325
349
  * --------------------------------------------------------------------------
326
350
  */
@@ -383,7 +407,6 @@
383
407
  event.delegateTarget = target;
384
408
 
385
409
  if (handler.oneOff) {
386
- // eslint-disable-next-line unicorn/consistent-destructuring
387
410
  EventHandler.off(element, event.type, selector, fn);
388
411
  }
389
412
 
@@ -609,7 +632,61 @@
609
632
 
610
633
  /**
611
634
  * --------------------------------------------------------------------------
612
- * Bootstrap (v5.0.0): base-component.js
635
+ * Bootstrap (v5.1.1): dom/data.js
636
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
637
+ * --------------------------------------------------------------------------
638
+ */
639
+
640
+ /**
641
+ * ------------------------------------------------------------------------
642
+ * Constants
643
+ * ------------------------------------------------------------------------
644
+ */
645
+ const elementMap = new Map();
646
+ var Data = {
647
+ set(element, key, instance) {
648
+ if (!elementMap.has(element)) {
649
+ elementMap.set(element, new Map());
650
+ }
651
+
652
+ const instanceMap = elementMap.get(element); // make it clear we only want one instance per element
653
+ // can be removed later when multiple key/instances are fine to be used
654
+
655
+ if (!instanceMap.has(key) && instanceMap.size !== 0) {
656
+ // eslint-disable-next-line no-console
657
+ console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
658
+ return;
659
+ }
660
+
661
+ instanceMap.set(key, instance);
662
+ },
663
+
664
+ get(element, key) {
665
+ if (elementMap.has(element)) {
666
+ return elementMap.get(element).get(key) || null;
667
+ }
668
+
669
+ return null;
670
+ },
671
+
672
+ remove(element, key) {
673
+ if (!elementMap.has(element)) {
674
+ return;
675
+ }
676
+
677
+ const instanceMap = elementMap.get(element);
678
+ instanceMap.delete(key); // free up element references if there are no instances left for an element
679
+
680
+ if (instanceMap.size === 0) {
681
+ elementMap.delete(element);
682
+ }
683
+ }
684
+
685
+ };
686
+
687
+ /**
688
+ * --------------------------------------------------------------------------
689
+ * Bootstrap (v5.1.1): base-component.js
613
690
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
614
691
  * --------------------------------------------------------------------------
615
692
  */
@@ -619,11 +696,11 @@
619
696
  * ------------------------------------------------------------------------
620
697
  */
621
698
 
622
- const VERSION = '5.0.0';
699
+ const VERSION = '5.1.1';
623
700
 
624
701
  class BaseComponent {
625
702
  constructor(element) {
626
- element = typeof element === 'string' ? document.querySelector(element) : element;
703
+ element = getElement(element);
627
704
 
628
705
  if (!element) {
629
706
  return;
@@ -635,25 +712,73 @@
635
712
 
636
713
  dispose() {
637
714
  Data.remove(this._element, this.constructor.DATA_KEY);
638
- EventHandler.off(this._element, `.${this.constructor.DATA_KEY}`);
639
- this._element = null;
715
+ EventHandler.off(this._element, this.constructor.EVENT_KEY);
716
+ Object.getOwnPropertyNames(this).forEach(propertyName => {
717
+ this[propertyName] = null;
718
+ });
719
+ }
720
+
721
+ _queueCallback(callback, element, isAnimated = true) {
722
+ executeAfterTransition(callback, element, isAnimated);
640
723
  }
641
724
  /** Static */
642
725
 
643
726
 
644
727
  static getInstance(element) {
645
- return Data.get(element, this.DATA_KEY);
728
+ return Data.get(getElement(element), this.DATA_KEY);
729
+ }
730
+
731
+ static getOrCreateInstance(element, config = {}) {
732
+ return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);
646
733
  }
647
734
 
648
735
  static get VERSION() {
649
736
  return VERSION;
650
737
  }
651
738
 
739
+ static get NAME() {
740
+ throw new Error('You have to implement the static method "NAME", for each component!');
741
+ }
742
+
743
+ static get DATA_KEY() {
744
+ return `bs.${this.NAME}`;
745
+ }
746
+
747
+ static get EVENT_KEY() {
748
+ return `.${this.DATA_KEY}`;
749
+ }
750
+
652
751
  }
653
752
 
654
753
  /**
655
754
  * --------------------------------------------------------------------------
656
- * Bootstrap (v5.0.0): alert.js
755
+ * Bootstrap (v5.1.1): util/component-functions.js
756
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
757
+ * --------------------------------------------------------------------------
758
+ */
759
+
760
+ const enableDismissTrigger = (component, method = 'hide') => {
761
+ const clickEvent = `click.dismiss${component.EVENT_KEY}`;
762
+ const name = component.NAME;
763
+ EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
764
+ if (['A', 'AREA'].includes(this.tagName)) {
765
+ event.preventDefault();
766
+ }
767
+
768
+ if (isDisabled(this)) {
769
+ return;
770
+ }
771
+
772
+ const target = getElementFromSelector(this) || this.closest(`.${name}`);
773
+ const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
774
+
775
+ instance[method]();
776
+ });
777
+ };
778
+
779
+ /**
780
+ * --------------------------------------------------------------------------
781
+ * Bootstrap (v5.1.1): alert.js
657
782
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
658
783
  * --------------------------------------------------------------------------
659
784
  */
@@ -663,17 +788,13 @@
663
788
  * ------------------------------------------------------------------------
664
789
  */
665
790
 
666
- const NAME$c = 'alert';
667
- const DATA_KEY$b = 'bs.alert';
668
- const EVENT_KEY$b = `.${DATA_KEY$b}`;
669
- const DATA_API_KEY$8 = '.data-api';
670
- const SELECTOR_DISMISS = '[data-bs-dismiss="alert"]';
671
- const EVENT_CLOSE = `close${EVENT_KEY$b}`;
672
- const EVENT_CLOSED = `closed${EVENT_KEY$b}`;
673
- const EVENT_CLICK_DATA_API$7 = `click${EVENT_KEY$b}${DATA_API_KEY$8}`;
674
- const CLASS_NAME_ALERT = 'alert';
675
- const CLASS_NAME_FADE$6 = 'fade';
676
- const CLASS_NAME_SHOW$9 = 'show';
791
+ const NAME$d = 'alert';
792
+ const DATA_KEY$c = 'bs.alert';
793
+ const EVENT_KEY$c = `.${DATA_KEY$c}`;
794
+ const EVENT_CLOSE = `close${EVENT_KEY$c}`;
795
+ const EVENT_CLOSED = `closed${EVENT_KEY$c}`;
796
+ const CLASS_NAME_FADE$5 = 'fade';
797
+ const CLASS_NAME_SHOW$8 = 'show';
677
798
  /**
678
799
  * ------------------------------------------------------------------------
679
800
  * Class Definition
@@ -682,77 +803,48 @@
682
803
 
683
804
  class Alert extends BaseComponent {
684
805
  // Getters
685
- static get DATA_KEY() {
686
- return DATA_KEY$b;
806
+ static get NAME() {
807
+ return NAME$d;
687
808
  } // Public
688
809
 
689
810
 
690
- close(element) {
691
- const rootElement = element ? this._getRootElement(element) : this._element;
811
+ close() {
812
+ const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);
692
813
 
693
- const customEvent = this._triggerCloseEvent(rootElement);
694
-
695
- if (customEvent === null || customEvent.defaultPrevented) {
814
+ if (closeEvent.defaultPrevented) {
696
815
  return;
697
816
  }
698
817
 
699
- this._removeElement(rootElement);
700
- } // Private
701
-
702
-
703
- _getRootElement(element) {
704
- return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`);
705
- }
706
-
707
- _triggerCloseEvent(element) {
708
- return EventHandler.trigger(element, EVENT_CLOSE);
709
- }
710
-
711
- _removeElement(element) {
712
- element.classList.remove(CLASS_NAME_SHOW$9);
818
+ this._element.classList.remove(CLASS_NAME_SHOW$8);
713
819
 
714
- if (!element.classList.contains(CLASS_NAME_FADE$6)) {
715
- this._destroyElement(element);
820
+ const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);
716
821
 
717
- return;
718
- }
822
+ this._queueCallback(() => this._destroyElement(), this._element, isAnimated);
823
+ } // Private
719
824
 
720
- const transitionDuration = getTransitionDurationFromElement(element);
721
- EventHandler.one(element, 'transitionend', () => this._destroyElement(element));
722
- emulateTransitionEnd(element, transitionDuration);
723
- }
724
825
 
725
- _destroyElement(element) {
726
- if (element.parentNode) {
727
- element.parentNode.removeChild(element);
728
- }
826
+ _destroyElement() {
827
+ this._element.remove();
729
828
 
730
- EventHandler.trigger(element, EVENT_CLOSED);
829
+ EventHandler.trigger(this._element, EVENT_CLOSED);
830
+ this.dispose();
731
831
  } // Static
732
832
 
733
833
 
734
834
  static jQueryInterface(config) {
735
835
  return this.each(function () {
736
- let data = Data.get(this, DATA_KEY$b);
737
-
738
- if (!data) {
739
- data = new Alert(this);
740
- }
836
+ const data = Alert.getOrCreateInstance(this);
741
837
 
742
- if (config === 'close') {
743
- data[config](this);
838
+ if (typeof config !== 'string') {
839
+ return;
744
840
  }
745
- });
746
- }
747
841
 
748
- static handleDismiss(alertInstance) {
749
- return function (event) {
750
- if (event) {
751
- event.preventDefault();
842
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
843
+ throw new TypeError(`No method named "${config}"`);
752
844
  }
753
845
 
754
- alertInstance.close(this);
755
- };
846
+ data[config](this);
847
+ });
756
848
  }
757
849
 
758
850
  }
@@ -763,7 +855,7 @@
763
855
  */
764
856
 
765
857
 
766
- EventHandler.on(document, EVENT_CLICK_DATA_API$7, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));
858
+ enableDismissTrigger(Alert, 'close');
767
859
  /**
768
860
  * ------------------------------------------------------------------------
769
861
  * jQuery
@@ -771,11 +863,11 @@
771
863
  * add .Alert to jQuery only if jQuery is present
772
864
  */
773
865
 
774
- defineJQueryPlugin(NAME$c, Alert);
866
+ defineJQueryPlugin(Alert);
775
867
 
776
868
  /**
777
869
  * --------------------------------------------------------------------------
778
- * Bootstrap (v5.0.0): button.js
870
+ * Bootstrap (v5.1.1): button.js
779
871
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
780
872
  * --------------------------------------------------------------------------
781
873
  */
@@ -785,13 +877,13 @@
785
877
  * ------------------------------------------------------------------------
786
878
  */
787
879
 
788
- const NAME$b = 'button';
789
- const DATA_KEY$a = 'bs.button';
790
- const EVENT_KEY$a = `.${DATA_KEY$a}`;
880
+ const NAME$c = 'button';
881
+ const DATA_KEY$b = 'bs.button';
882
+ const EVENT_KEY$b = `.${DATA_KEY$b}`;
791
883
  const DATA_API_KEY$7 = '.data-api';
792
884
  const CLASS_NAME_ACTIVE$3 = 'active';
793
885
  const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]';
794
- const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$7}`;
886
+ const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$b}${DATA_API_KEY$7}`;
795
887
  /**
796
888
  * ------------------------------------------------------------------------
797
889
  * Class Definition
@@ -800,8 +892,8 @@
800
892
 
801
893
  class Button extends BaseComponent {
802
894
  // Getters
803
- static get DATA_KEY() {
804
- return DATA_KEY$a;
895
+ static get NAME() {
896
+ return NAME$c;
805
897
  } // Public
806
898
 
807
899
 
@@ -813,11 +905,7 @@
813
905
 
814
906
  static jQueryInterface(config) {
815
907
  return this.each(function () {
816
- let data = Data.get(this, DATA_KEY$a);
817
-
818
- if (!data) {
819
- data = new Button(this);
820
- }
908
+ const data = Button.getOrCreateInstance(this);
821
909
 
822
910
  if (config === 'toggle') {
823
911
  data[config]();
@@ -836,12 +924,7 @@
836
924
  EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {
837
925
  event.preventDefault();
838
926
  const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);
839
- let data = Data.get(button, DATA_KEY$a);
840
-
841
- if (!data) {
842
- data = new Button(button);
843
- }
844
-
927
+ const data = Button.getOrCreateInstance(button);
845
928
  data.toggle();
846
929
  });
847
930
  /**
@@ -851,11 +934,11 @@
851
934
  * add .Button to jQuery only if jQuery is present
852
935
  */
853
936
 
854
- defineJQueryPlugin(NAME$b, Button);
937
+ defineJQueryPlugin(Button);
855
938
 
856
939
  /**
857
940
  * --------------------------------------------------------------------------
858
- * Bootstrap (v5.0.0): dom/manipulator.js
941
+ * Bootstrap (v5.1.1): dom/manipulator.js
859
942
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
860
943
  * --------------------------------------------------------------------------
861
944
  */
@@ -913,8 +996,8 @@
913
996
  offset(element) {
914
997
  const rect = element.getBoundingClientRect();
915
998
  return {
916
- top: rect.top + document.body.scrollTop,
917
- left: rect.left + document.body.scrollLeft
999
+ top: rect.top + window.pageYOffset,
1000
+ left: rect.left + window.pageXOffset
918
1001
  };
919
1002
  },
920
1003
 
@@ -929,16 +1012,10 @@
929
1012
 
930
1013
  /**
931
1014
  * --------------------------------------------------------------------------
932
- * Bootstrap (v5.0.0): dom/selector-engine.js
1015
+ * Bootstrap (v5.1.1): dom/selector-engine.js
933
1016
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
934
1017
  * --------------------------------------------------------------------------
935
1018
  */
936
-
937
- /**
938
- * ------------------------------------------------------------------------
939
- * Constants
940
- * ------------------------------------------------------------------------
941
- */
942
1019
  const NODE_TEXT = 3;
943
1020
  const SelectorEngine = {
944
1021
  find(selector, element = document.documentElement) {
@@ -994,13 +1071,18 @@
994
1071
  }
995
1072
 
996
1073
  return [];
1074
+ },
1075
+
1076
+ focusableChildren(element) {
1077
+ const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(', ');
1078
+ return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));
997
1079
  }
998
1080
 
999
1081
  };
1000
1082
 
1001
1083
  /**
1002
1084
  * --------------------------------------------------------------------------
1003
- * Bootstrap (v5.0.0): carousel.js
1085
+ * Bootstrap (v5.1.1): carousel.js
1004
1086
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1005
1087
  * --------------------------------------------------------------------------
1006
1088
  */
@@ -1010,16 +1092,16 @@
1010
1092
  * ------------------------------------------------------------------------
1011
1093
  */
1012
1094
 
1013
- const NAME$a = 'carousel';
1014
- const DATA_KEY$9 = 'bs.carousel';
1015
- const EVENT_KEY$9 = `.${DATA_KEY$9}`;
1095
+ const NAME$b = 'carousel';
1096
+ const DATA_KEY$a = 'bs.carousel';
1097
+ const EVENT_KEY$a = `.${DATA_KEY$a}`;
1016
1098
  const DATA_API_KEY$6 = '.data-api';
1017
1099
  const ARROW_LEFT_KEY = 'ArrowLeft';
1018
1100
  const ARROW_RIGHT_KEY = 'ArrowRight';
1019
1101
  const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
1020
1102
 
1021
1103
  const SWIPE_THRESHOLD = 40;
1022
- const Default$9 = {
1104
+ const Default$a = {
1023
1105
  interval: 5000,
1024
1106
  keyboard: true,
1025
1107
  slide: false,
@@ -1027,7 +1109,7 @@
1027
1109
  wrap: true,
1028
1110
  touch: true
1029
1111
  };
1030
- const DefaultType$9 = {
1112
+ const DefaultType$a = {
1031
1113
  interval: '(number|boolean)',
1032
1114
  keyboard: 'boolean',
1033
1115
  slide: '(boolean|string)',
@@ -1039,19 +1121,23 @@
1039
1121
  const ORDER_PREV = 'prev';
1040
1122
  const DIRECTION_LEFT = 'left';
1041
1123
  const DIRECTION_RIGHT = 'right';
1042
- const EVENT_SLIDE = `slide${EVENT_KEY$9}`;
1043
- const EVENT_SLID = `slid${EVENT_KEY$9}`;
1044
- const EVENT_KEYDOWN = `keydown${EVENT_KEY$9}`;
1045
- const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY$9}`;
1046
- const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY$9}`;
1047
- const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`;
1048
- const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`;
1049
- const EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`;
1050
- const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`;
1051
- const EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`;
1052
- const EVENT_DRAG_START = `dragstart${EVENT_KEY$9}`;
1053
- const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$9}${DATA_API_KEY$6}`;
1054
- const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$9}${DATA_API_KEY$6}`;
1124
+ const KEY_TO_DIRECTION = {
1125
+ [ARROW_LEFT_KEY]: DIRECTION_RIGHT,
1126
+ [ARROW_RIGHT_KEY]: DIRECTION_LEFT
1127
+ };
1128
+ const EVENT_SLIDE = `slide${EVENT_KEY$a}`;
1129
+ const EVENT_SLID = `slid${EVENT_KEY$a}`;
1130
+ const EVENT_KEYDOWN = `keydown${EVENT_KEY$a}`;
1131
+ const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY$a}`;
1132
+ const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY$a}`;
1133
+ const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$a}`;
1134
+ const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$a}`;
1135
+ const EVENT_TOUCHEND = `touchend${EVENT_KEY$a}`;
1136
+ const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$a}`;
1137
+ const EVENT_POINTERUP = `pointerup${EVENT_KEY$a}`;
1138
+ const EVENT_DRAG_START = `dragstart${EVENT_KEY$a}`;
1139
+ const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$a}${DATA_API_KEY$6}`;
1140
+ const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`;
1055
1141
  const CLASS_NAME_CAROUSEL = 'carousel';
1056
1142
  const CLASS_NAME_ACTIVE$2 = 'active';
1057
1143
  const CLASS_NAME_SLIDE = 'slide';
@@ -1098,18 +1184,16 @@
1098
1184
 
1099
1185
 
1100
1186
  static get Default() {
1101
- return Default$9;
1187
+ return Default$a;
1102
1188
  }
1103
1189
 
1104
- static get DATA_KEY() {
1105
- return DATA_KEY$9;
1190
+ static get NAME() {
1191
+ return NAME$b;
1106
1192
  } // Public
1107
1193
 
1108
1194
 
1109
1195
  next() {
1110
- if (!this._isSliding) {
1111
- this._slide(ORDER_NEXT);
1112
- }
1196
+ this._slide(ORDER_NEXT);
1113
1197
  }
1114
1198
 
1115
1199
  nextWhenVisible() {
@@ -1121,9 +1205,7 @@
1121
1205
  }
1122
1206
 
1123
1207
  prev() {
1124
- if (!this._isSliding) {
1125
- this._slide(ORDER_PREV);
1126
- }
1208
+ this._slide(ORDER_PREV);
1127
1209
  }
1128
1210
 
1129
1211
  pause(event) {
@@ -1180,25 +1262,15 @@
1180
1262
  const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
1181
1263
 
1182
1264
  this._slide(order, this._items[index]);
1183
- }
1184
-
1185
- dispose() {
1186
- this._items = null;
1187
- this._config = null;
1188
- this._interval = null;
1189
- this._isPaused = null;
1190
- this._isSliding = null;
1191
- this._activeElement = null;
1192
- this._indicatorsElement = null;
1193
- super.dispose();
1194
1265
  } // Private
1195
1266
 
1196
1267
 
1197
1268
  _getConfig(config) {
1198
- config = { ...Default$9,
1199
- ...config
1269
+ config = { ...Default$a,
1270
+ ...Manipulator.getDataAttributes(this._element),
1271
+ ...(typeof config === 'object' ? config : {})
1200
1272
  };
1201
- typeCheckConfig(NAME$a, config, DefaultType$9);
1273
+ typeCheckConfig(NAME$b, config, DefaultType$a);
1202
1274
  return config;
1203
1275
  }
1204
1276
 
@@ -1235,8 +1307,12 @@
1235
1307
  }
1236
1308
 
1237
1309
  _addTouchEventListeners() {
1310
+ const hasPointerPenTouch = event => {
1311
+ return this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);
1312
+ };
1313
+
1238
1314
  const start = event => {
1239
- if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
1315
+ if (hasPointerPenTouch(event)) {
1240
1316
  this.touchStartX = event.clientX;
1241
1317
  } else if (!this._pointerEvent) {
1242
1318
  this.touchStartX = event.touches[0].clientX;
@@ -1249,7 +1325,7 @@
1249
1325
  };
1250
1326
 
1251
1327
  const end = event => {
1252
- if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
1328
+ if (hasPointerPenTouch(event)) {
1253
1329
  this.touchDeltaX = event.clientX - this.touchStartX;
1254
1330
  }
1255
1331
 
@@ -1294,14 +1370,12 @@
1294
1370
  return;
1295
1371
  }
1296
1372
 
1297
- if (event.key === ARROW_LEFT_KEY) {
1298
- event.preventDefault();
1373
+ const direction = KEY_TO_DIRECTION[event.key];
1299
1374
 
1300
- this._slide(DIRECTION_RIGHT);
1301
- } else if (event.key === ARROW_RIGHT_KEY) {
1375
+ if (direction) {
1302
1376
  event.preventDefault();
1303
1377
 
1304
- this._slide(DIRECTION_LEFT);
1378
+ this._slide(direction);
1305
1379
  }
1306
1380
  }
1307
1381
 
@@ -1312,20 +1386,7 @@
1312
1386
 
1313
1387
  _getItemByOrder(order, activeElement) {
1314
1388
  const isNext = order === ORDER_NEXT;
1315
- const isPrev = order === ORDER_PREV;
1316
-
1317
- const activeIndex = this._getItemIndex(activeElement);
1318
-
1319
- const lastItemIndex = this._items.length - 1;
1320
- const isGoingToWrap = isPrev && activeIndex === 0 || isNext && activeIndex === lastItemIndex;
1321
-
1322
- if (isGoingToWrap && !this._config.wrap) {
1323
- return activeElement;
1324
- }
1325
-
1326
- const delta = isPrev ? -1 : 1;
1327
- const itemIndex = (activeIndex + delta) % this._items.length;
1328
- return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
1389
+ return getNextActiveElement(this._items, activeElement, isNext, this._config.wrap);
1329
1390
  }
1330
1391
 
1331
1392
  _triggerSlideEvent(relatedTarget, eventDirectionName) {
@@ -1398,6 +1459,10 @@
1398
1459
  return;
1399
1460
  }
1400
1461
 
1462
+ if (this._isSliding) {
1463
+ return;
1464
+ }
1465
+
1401
1466
  const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
1402
1467
 
1403
1468
  if (slideEvent.defaultPrevented) {
@@ -1419,37 +1484,35 @@
1419
1484
 
1420
1485
  this._activeElement = nextElement;
1421
1486
 
1422
- if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
1423
- nextElement.classList.add(orderClassName);
1424
- reflow(nextElement);
1425
- activeElement.classList.add(directionalClassName);
1426
- nextElement.classList.add(directionalClassName);
1427
- const transitionDuration = getTransitionDurationFromElement(activeElement);
1428
- EventHandler.one(activeElement, 'transitionend', () => {
1429
- nextElement.classList.remove(directionalClassName, orderClassName);
1430
- nextElement.classList.add(CLASS_NAME_ACTIVE$2);
1431
- activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
1432
- this._isSliding = false;
1433
- setTimeout(() => {
1434
- EventHandler.trigger(this._element, EVENT_SLID, {
1435
- relatedTarget: nextElement,
1436
- direction: eventDirectionName,
1437
- from: activeElementIndex,
1438
- to: nextElementIndex
1439
- });
1440
- }, 0);
1441
- });
1442
- emulateTransitionEnd(activeElement, transitionDuration);
1443
- } else {
1444
- activeElement.classList.remove(CLASS_NAME_ACTIVE$2);
1445
- nextElement.classList.add(CLASS_NAME_ACTIVE$2);
1446
- this._isSliding = false;
1487
+ const triggerSlidEvent = () => {
1447
1488
  EventHandler.trigger(this._element, EVENT_SLID, {
1448
1489
  relatedTarget: nextElement,
1449
1490
  direction: eventDirectionName,
1450
1491
  from: activeElementIndex,
1451
1492
  to: nextElementIndex
1452
1493
  });
1494
+ };
1495
+
1496
+ if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
1497
+ nextElement.classList.add(orderClassName);
1498
+ reflow(nextElement);
1499
+ activeElement.classList.add(directionalClassName);
1500
+ nextElement.classList.add(directionalClassName);
1501
+
1502
+ const completeCallBack = () => {
1503
+ nextElement.classList.remove(directionalClassName, orderClassName);
1504
+ nextElement.classList.add(CLASS_NAME_ACTIVE$2);
1505
+ activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
1506
+ this._isSliding = false;
1507
+ setTimeout(triggerSlidEvent, 0);
1508
+ };
1509
+
1510
+ this._queueCallback(completeCallBack, activeElement, true);
1511
+ } else {
1512
+ activeElement.classList.remove(CLASS_NAME_ACTIVE$2);
1513
+ nextElement.classList.add(CLASS_NAME_ACTIVE$2);
1514
+ this._isSliding = false;
1515
+ triggerSlidEvent();
1453
1516
  }
1454
1517
 
1455
1518
  if (isCycling) {
@@ -1483,10 +1546,10 @@
1483
1546
 
1484
1547
 
1485
1548
  static carouselInterface(element, config) {
1486
- let data = Data.get(element, DATA_KEY$9);
1487
- let _config = { ...Default$9,
1488
- ...Manipulator.getDataAttributes(element)
1489
- };
1549
+ const data = Carousel.getOrCreateInstance(element, config);
1550
+ let {
1551
+ _config
1552
+ } = data;
1490
1553
 
1491
1554
  if (typeof config === 'object') {
1492
1555
  _config = { ..._config,
@@ -1496,10 +1559,6 @@
1496
1559
 
1497
1560
  const action = typeof config === 'string' ? config : _config.slide;
1498
1561
 
1499
- if (!data) {
1500
- data = new Carousel(element, _config);
1501
- }
1502
-
1503
1562
  if (typeof config === 'number') {
1504
1563
  data.to(config);
1505
1564
  } else if (typeof action === 'string') {
@@ -1539,7 +1598,7 @@
1539
1598
  Carousel.carouselInterface(target, config);
1540
1599
 
1541
1600
  if (slideIndex) {
1542
- Data.get(target, DATA_KEY$9).to(slideIndex);
1601
+ Carousel.getInstance(target).to(slideIndex);
1543
1602
  }
1544
1603
 
1545
1604
  event.preventDefault();
@@ -1558,7 +1617,7 @@
1558
1617
  const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
1559
1618
 
1560
1619
  for (let i = 0, len = carousels.length; i < len; i++) {
1561
- Carousel.carouselInterface(carousels[i], Data.get(carousels[i], DATA_KEY$9));
1620
+ Carousel.carouselInterface(carousels[i], Carousel.getInstance(carousels[i]));
1562
1621
  }
1563
1622
  });
1564
1623
  /**
@@ -1568,11 +1627,11 @@
1568
1627
  * add .Carousel to jQuery only if jQuery is present
1569
1628
  */
1570
1629
 
1571
- defineJQueryPlugin(NAME$a, Carousel);
1630
+ defineJQueryPlugin(Carousel);
1572
1631
 
1573
1632
  /**
1574
1633
  * --------------------------------------------------------------------------
1575
- * Bootstrap (v5.0.0): collapse.js
1634
+ * Bootstrap (v5.1.1): collapse.js
1576
1635
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1577
1636
  * --------------------------------------------------------------------------
1578
1637
  */
@@ -1582,30 +1641,31 @@
1582
1641
  * ------------------------------------------------------------------------
1583
1642
  */
1584
1643
 
1585
- const NAME$9 = 'collapse';
1586
- const DATA_KEY$8 = 'bs.collapse';
1587
- const EVENT_KEY$8 = `.${DATA_KEY$8}`;
1644
+ const NAME$a = 'collapse';
1645
+ const DATA_KEY$9 = 'bs.collapse';
1646
+ const EVENT_KEY$9 = `.${DATA_KEY$9}`;
1588
1647
  const DATA_API_KEY$5 = '.data-api';
1589
- const Default$8 = {
1648
+ const Default$9 = {
1590
1649
  toggle: true,
1591
- parent: ''
1650
+ parent: null
1592
1651
  };
1593
- const DefaultType$8 = {
1652
+ const DefaultType$9 = {
1594
1653
  toggle: 'boolean',
1595
- parent: '(string|element)'
1654
+ parent: '(null|element)'
1596
1655
  };
1597
- const EVENT_SHOW$5 = `show${EVENT_KEY$8}`;
1598
- const EVENT_SHOWN$5 = `shown${EVENT_KEY$8}`;
1599
- const EVENT_HIDE$5 = `hide${EVENT_KEY$8}`;
1600
- const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$8}`;
1601
- const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`;
1602
- const CLASS_NAME_SHOW$8 = 'show';
1656
+ const EVENT_SHOW$5 = `show${EVENT_KEY$9}`;
1657
+ const EVENT_SHOWN$5 = `shown${EVENT_KEY$9}`;
1658
+ const EVENT_HIDE$5 = `hide${EVENT_KEY$9}`;
1659
+ const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$9}`;
1660
+ const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$9}${DATA_API_KEY$5}`;
1661
+ const CLASS_NAME_SHOW$7 = 'show';
1603
1662
  const CLASS_NAME_COLLAPSE = 'collapse';
1604
1663
  const CLASS_NAME_COLLAPSING = 'collapsing';
1605
1664
  const CLASS_NAME_COLLAPSED = 'collapsed';
1665
+ const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
1606
1666
  const WIDTH = 'width';
1607
1667
  const HEIGHT = 'height';
1608
- const SELECTOR_ACTIVES = '.show, .collapsing';
1668
+ const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';
1609
1669
  const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]';
1610
1670
  /**
1611
1671
  * ------------------------------------------------------------------------
@@ -1618,7 +1678,7 @@
1618
1678
  super(element);
1619
1679
  this._isTransitioning = false;
1620
1680
  this._config = this._getConfig(config);
1621
- this._triggerArray = SelectorEngine.find(`${SELECTOR_DATA_TOGGLE$4}[href="#${this._element.id}"],` + `${SELECTOR_DATA_TOGGLE$4}[data-bs-target="#${this._element.id}"]`);
1681
+ this._triggerArray = [];
1622
1682
  const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);
1623
1683
 
1624
1684
  for (let i = 0, len = toggleList.length; i < len; i++) {
@@ -1633,10 +1693,10 @@
1633
1693
  }
1634
1694
  }
1635
1695
 
1636
- this._parent = this._config.parent ? this._getParent() : null;
1696
+ this._initializeChildren();
1637
1697
 
1638
1698
  if (!this._config.parent) {
1639
- this._addAriaAndCollapsedClass(this._element, this._triggerArray);
1699
+ this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());
1640
1700
  }
1641
1701
 
1642
1702
  if (this._config.toggle) {
@@ -1646,16 +1706,16 @@
1646
1706
 
1647
1707
 
1648
1708
  static get Default() {
1649
- return Default$8;
1709
+ return Default$9;
1650
1710
  }
1651
1711
 
1652
- static get DATA_KEY() {
1653
- return DATA_KEY$8;
1712
+ static get NAME() {
1713
+ return NAME$a;
1654
1714
  } // Public
1655
1715
 
1656
1716
 
1657
1717
  toggle() {
1658
- if (this._element.classList.contains(CLASS_NAME_SHOW$8)) {
1718
+ if (this._isShown()) {
1659
1719
  this.hide();
1660
1720
  } else {
1661
1721
  this.show();
@@ -1663,32 +1723,23 @@
1663
1723
  }
1664
1724
 
1665
1725
  show() {
1666
- if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW$8)) {
1726
+ if (this._isTransitioning || this._isShown()) {
1667
1727
  return;
1668
1728
  }
1669
1729
 
1670
- let actives;
1730
+ let actives = [];
1671
1731
  let activesData;
1672
1732
 
1673
- if (this._parent) {
1674
- actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(elem => {
1675
- if (typeof this._config.parent === 'string') {
1676
- return elem.getAttribute('data-bs-parent') === this._config.parent;
1677
- }
1678
-
1679
- return elem.classList.contains(CLASS_NAME_COLLAPSE);
1680
- });
1681
-
1682
- if (actives.length === 0) {
1683
- actives = null;
1684
- }
1733
+ if (this._config.parent) {
1734
+ const children = SelectorEngine.find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
1735
+ actives = SelectorEngine.find(SELECTOR_ACTIVES, this._config.parent).filter(elem => !children.includes(elem)); // remove children if greater depth
1685
1736
  }
1686
1737
 
1687
1738
  const container = SelectorEngine.findOne(this._selector);
1688
1739
 
1689
- if (actives) {
1740
+ if (actives.length) {
1690
1741
  const tempActiveData = actives.find(elem => container !== elem);
1691
- activesData = tempActiveData ? Data.get(tempActiveData, DATA_KEY$8) : null;
1742
+ activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null;
1692
1743
 
1693
1744
  if (activesData && activesData._isTransitioning) {
1694
1745
  return;
@@ -1701,17 +1752,17 @@
1701
1752
  return;
1702
1753
  }
1703
1754
 
1704
- if (actives) {
1705
- actives.forEach(elemActive => {
1706
- if (container !== elemActive) {
1707
- Collapse.collapseInterface(elemActive, 'hide');
1708
- }
1755
+ actives.forEach(elemActive => {
1756
+ if (container !== elemActive) {
1757
+ Collapse.getOrCreateInstance(elemActive, {
1758
+ toggle: false
1759
+ }).hide();
1760
+ }
1709
1761
 
1710
- if (!activesData) {
1711
- Data.set(elemActive, DATA_KEY$8, null);
1712
- }
1713
- });
1714
- }
1762
+ if (!activesData) {
1763
+ Data.set(elemActive, DATA_KEY$9, null);
1764
+ }
1765
+ });
1715
1766
 
1716
1767
  const dimension = this._getDimension();
1717
1768
 
@@ -1721,35 +1772,31 @@
1721
1772
 
1722
1773
  this._element.style[dimension] = 0;
1723
1774
 
1724
- if (this._triggerArray.length) {
1725
- this._triggerArray.forEach(element => {
1726
- element.classList.remove(CLASS_NAME_COLLAPSED);
1727
- element.setAttribute('aria-expanded', true);
1728
- });
1729
- }
1775
+ this._addAriaAndCollapsedClass(this._triggerArray, true);
1730
1776
 
1731
- this.setTransitioning(true);
1777
+ this._isTransitioning = true;
1732
1778
 
1733
1779
  const complete = () => {
1780
+ this._isTransitioning = false;
1781
+
1734
1782
  this._element.classList.remove(CLASS_NAME_COLLAPSING);
1735
1783
 
1736
- this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8);
1784
+ this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
1737
1785
 
1738
1786
  this._element.style[dimension] = '';
1739
- this.setTransitioning(false);
1740
1787
  EventHandler.trigger(this._element, EVENT_SHOWN$5);
1741
1788
  };
1742
1789
 
1743
1790
  const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1744
1791
  const scrollSize = `scroll${capitalizedDimension}`;
1745
- const transitionDuration = getTransitionDurationFromElement(this._element);
1746
- EventHandler.one(this._element, 'transitionend', complete);
1747
- emulateTransitionEnd(this._element, transitionDuration);
1792
+
1793
+ this._queueCallback(complete, this._element, true);
1794
+
1748
1795
  this._element.style[dimension] = `${this._element[scrollSize]}px`;
1749
1796
  }
1750
1797
 
1751
1798
  hide() {
1752
- if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW$8)) {
1799
+ if (this._isTransitioning || !this._isShown()) {
1753
1800
  return;
1754
1801
  }
1755
1802
 
@@ -1766,26 +1813,23 @@
1766
1813
 
1767
1814
  this._element.classList.add(CLASS_NAME_COLLAPSING);
1768
1815
 
1769
- this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8);
1816
+ this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
1770
1817
 
1771
1818
  const triggerArrayLength = this._triggerArray.length;
1772
1819
 
1773
- if (triggerArrayLength > 0) {
1774
- for (let i = 0; i < triggerArrayLength; i++) {
1775
- const trigger = this._triggerArray[i];
1776
- const elem = getElementFromSelector(trigger);
1820
+ for (let i = 0; i < triggerArrayLength; i++) {
1821
+ const trigger = this._triggerArray[i];
1822
+ const elem = getElementFromSelector(trigger);
1777
1823
 
1778
- if (elem && !elem.classList.contains(CLASS_NAME_SHOW$8)) {
1779
- trigger.classList.add(CLASS_NAME_COLLAPSED);
1780
- trigger.setAttribute('aria-expanded', false);
1781
- }
1824
+ if (elem && !this._isShown(elem)) {
1825
+ this._addAriaAndCollapsedClass([trigger], false);
1782
1826
  }
1783
1827
  }
1784
1828
 
1785
- this.setTransitioning(true);
1829
+ this._isTransitioning = true;
1786
1830
 
1787
1831
  const complete = () => {
1788
- this.setTransitioning(false);
1832
+ this._isTransitioning = false;
1789
1833
 
1790
1834
  this._element.classList.remove(CLASS_NAME_COLLAPSING);
1791
1835
 
@@ -1795,67 +1839,51 @@
1795
1839
  };
1796
1840
 
1797
1841
  this._element.style[dimension] = '';
1798
- const transitionDuration = getTransitionDurationFromElement(this._element);
1799
- EventHandler.one(this._element, 'transitionend', complete);
1800
- emulateTransitionEnd(this._element, transitionDuration);
1801
- }
1802
1842
 
1803
- setTransitioning(isTransitioning) {
1804
- this._isTransitioning = isTransitioning;
1843
+ this._queueCallback(complete, this._element, true);
1805
1844
  }
1806
1845
 
1807
- dispose() {
1808
- super.dispose();
1809
- this._config = null;
1810
- this._parent = null;
1811
- this._triggerArray = null;
1812
- this._isTransitioning = null;
1846
+ _isShown(element = this._element) {
1847
+ return element.classList.contains(CLASS_NAME_SHOW$7);
1813
1848
  } // Private
1814
1849
 
1815
1850
 
1816
1851
  _getConfig(config) {
1817
- config = { ...Default$8,
1852
+ config = { ...Default$9,
1853
+ ...Manipulator.getDataAttributes(this._element),
1818
1854
  ...config
1819
1855
  };
1820
1856
  config.toggle = Boolean(config.toggle); // Coerce string values
1821
1857
 
1822
- typeCheckConfig(NAME$9, config, DefaultType$8);
1858
+ config.parent = getElement(config.parent);
1859
+ typeCheckConfig(NAME$a, config, DefaultType$9);
1823
1860
  return config;
1824
1861
  }
1825
1862
 
1826
1863
  _getDimension() {
1827
- return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT;
1864
+ return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;
1828
1865
  }
1829
1866
 
1830
- _getParent() {
1831
- let {
1832
- parent
1833
- } = this._config;
1834
-
1835
- if (isElement(parent)) {
1836
- // it's a jQuery object
1837
- if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
1838
- parent = parent[0];
1839
- }
1840
- } else {
1841
- parent = SelectorEngine.findOne(parent);
1867
+ _initializeChildren() {
1868
+ if (!this._config.parent) {
1869
+ return;
1842
1870
  }
1843
1871
 
1844
- const selector = `${SELECTOR_DATA_TOGGLE$4}[data-bs-parent="${parent}"]`;
1845
- SelectorEngine.find(selector, parent).forEach(element => {
1872
+ const children = SelectorEngine.find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
1873
+ SelectorEngine.find(SELECTOR_DATA_TOGGLE$4, this._config.parent).filter(elem => !children.includes(elem)).forEach(element => {
1846
1874
  const selected = getElementFromSelector(element);
1847
1875
 
1848
- this._addAriaAndCollapsedClass(selected, [element]);
1876
+ if (selected) {
1877
+ this._addAriaAndCollapsedClass([element], this._isShown(selected));
1878
+ }
1849
1879
  });
1850
- return parent;
1851
1880
  }
1852
1881
 
1853
- _addAriaAndCollapsedClass(element, triggerArray) {
1854
- if (!element || !triggerArray.length) {
1882
+ _addAriaAndCollapsedClass(triggerArray, isOpen) {
1883
+ if (!triggerArray.length) {
1855
1884
  return;
1856
1885
  }
1857
1886
 
1858
- const isOpen = element.classList.contains(CLASS_NAME_SHOW$8);
1859
1887
  triggerArray.forEach(elem => {
1860
1888
  if (isOpen) {
1861
1889
  elem.classList.remove(CLASS_NAME_COLLAPSED);
@@ -1868,33 +1896,23 @@
1868
1896
  } // Static
1869
1897
 
1870
1898
 
1871
- static collapseInterface(element, config) {
1872
- let data = Data.get(element, DATA_KEY$8);
1873
- const _config = { ...Default$8,
1874
- ...Manipulator.getDataAttributes(element),
1875
- ...(typeof config === 'object' && config ? config : {})
1876
- };
1877
-
1878
- if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
1879
- _config.toggle = false;
1880
- }
1881
-
1882
- if (!data) {
1883
- data = new Collapse(element, _config);
1884
- }
1899
+ static jQueryInterface(config) {
1900
+ return this.each(function () {
1901
+ const _config = {};
1885
1902
 
1886
- if (typeof config === 'string') {
1887
- if (typeof data[config] === 'undefined') {
1888
- throw new TypeError(`No method named "${config}"`);
1903
+ if (typeof config === 'string' && /show|hide/.test(config)) {
1904
+ _config.toggle = false;
1889
1905
  }
1890
1906
 
1891
- data[config]();
1892
- }
1893
- }
1907
+ const data = Collapse.getOrCreateInstance(this, _config);
1894
1908
 
1895
- static jQueryInterface(config) {
1896
- return this.each(function () {
1897
- Collapse.collapseInterface(this, config);
1909
+ if (typeof config === 'string') {
1910
+ if (typeof data[config] === 'undefined') {
1911
+ throw new TypeError(`No method named "${config}"`);
1912
+ }
1913
+
1914
+ data[config]();
1915
+ }
1898
1916
  });
1899
1917
  }
1900
1918
 
@@ -1912,26 +1930,12 @@
1912
1930
  event.preventDefault();
1913
1931
  }
1914
1932
 
1915
- const triggerData = Manipulator.getDataAttributes(this);
1916
1933
  const selector = getSelectorFromElement(this);
1917
1934
  const selectorElements = SelectorEngine.find(selector);
1918
1935
  selectorElements.forEach(element => {
1919
- const data = Data.get(element, DATA_KEY$8);
1920
- let config;
1921
-
1922
- if (data) {
1923
- // update parent attribute
1924
- if (data._parent === null && typeof triggerData.parent === 'string') {
1925
- data._config.parent = triggerData.parent;
1926
- data._parent = data._getParent();
1927
- }
1928
-
1929
- config = 'toggle';
1930
- } else {
1931
- config = triggerData;
1932
- }
1933
-
1934
- Collapse.collapseInterface(element, config);
1936
+ Collapse.getOrCreateInstance(element, {
1937
+ toggle: false
1938
+ }).toggle();
1935
1939
  });
1936
1940
  });
1937
1941
  /**
@@ -1941,11 +1945,11 @@
1941
1945
  * add .Collapse to jQuery only if jQuery is present
1942
1946
  */
1943
1947
 
1944
- defineJQueryPlugin(NAME$9, Collapse);
1948
+ defineJQueryPlugin(Collapse);
1945
1949
 
1946
1950
  /**
1947
1951
  * --------------------------------------------------------------------------
1948
- * Bootstrap (v5.0.0): dropdown.js
1952
+ * Bootstrap (v5.1.1): dropdown.js
1949
1953
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1950
1954
  * --------------------------------------------------------------------------
1951
1955
  */
@@ -1955,27 +1959,26 @@
1955
1959
  * ------------------------------------------------------------------------
1956
1960
  */
1957
1961
 
1958
- const NAME$8 = 'dropdown';
1959
- const DATA_KEY$7 = 'bs.dropdown';
1960
- const EVENT_KEY$7 = `.${DATA_KEY$7}`;
1962
+ const NAME$9 = 'dropdown';
1963
+ const DATA_KEY$8 = 'bs.dropdown';
1964
+ const EVENT_KEY$8 = `.${DATA_KEY$8}`;
1961
1965
  const DATA_API_KEY$4 = '.data-api';
1962
1966
  const ESCAPE_KEY$2 = 'Escape';
1963
1967
  const SPACE_KEY = 'Space';
1964
- const TAB_KEY = 'Tab';
1968
+ const TAB_KEY$1 = 'Tab';
1965
1969
  const ARROW_UP_KEY = 'ArrowUp';
1966
1970
  const ARROW_DOWN_KEY = 'ArrowDown';
1967
1971
  const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
1968
1972
 
1969
1973
  const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`);
1970
- const EVENT_HIDE$4 = `hide${EVENT_KEY$7}`;
1971
- const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$7}`;
1972
- const EVENT_SHOW$4 = `show${EVENT_KEY$7}`;
1973
- const EVENT_SHOWN$4 = `shown${EVENT_KEY$7}`;
1974
- const EVENT_CLICK = `click${EVENT_KEY$7}`;
1975
- const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`;
1976
- const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$7}${DATA_API_KEY$4}`;
1977
- const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$7}${DATA_API_KEY$4}`;
1978
- const CLASS_NAME_SHOW$7 = 'show';
1974
+ const EVENT_HIDE$4 = `hide${EVENT_KEY$8}`;
1975
+ const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$8}`;
1976
+ const EVENT_SHOW$4 = `show${EVENT_KEY$8}`;
1977
+ const EVENT_SHOWN$4 = `shown${EVENT_KEY$8}`;
1978
+ const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$8}${DATA_API_KEY$4}`;
1979
+ const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$8}${DATA_API_KEY$4}`;
1980
+ const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$8}${DATA_API_KEY$4}`;
1981
+ const CLASS_NAME_SHOW$6 = 'show';
1979
1982
  const CLASS_NAME_DROPUP = 'dropup';
1980
1983
  const CLASS_NAME_DROPEND = 'dropend';
1981
1984
  const CLASS_NAME_DROPSTART = 'dropstart';
@@ -1990,7 +1993,7 @@
1990
1993
  const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';
1991
1994
  const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';
1992
1995
  const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';
1993
- const Default$7 = {
1996
+ const Default$8 = {
1994
1997
  offset: [0, 2],
1995
1998
  boundary: 'clippingParents',
1996
1999
  reference: 'toggle',
@@ -1998,7 +2001,7 @@
1998
2001
  popperConfig: null,
1999
2002
  autoClose: true
2000
2003
  };
2001
- const DefaultType$7 = {
2004
+ const DefaultType$8 = {
2002
2005
  offset: '(array|string|function)',
2003
2006
  boundary: '(string|element)',
2004
2007
  reference: '(string|element|object)',
@@ -2019,45 +2022,31 @@
2019
2022
  this._config = this._getConfig(config);
2020
2023
  this._menu = this._getMenuElement();
2021
2024
  this._inNavbar = this._detectNavbar();
2022
-
2023
- this._addEventListeners();
2024
2025
  } // Getters
2025
2026
 
2026
2027
 
2027
2028
  static get Default() {
2028
- return Default$7;
2029
+ return Default$8;
2029
2030
  }
2030
2031
 
2031
2032
  static get DefaultType() {
2032
- return DefaultType$7;
2033
+ return DefaultType$8;
2033
2034
  }
2034
2035
 
2035
- static get DATA_KEY() {
2036
- return DATA_KEY$7;
2036
+ static get NAME() {
2037
+ return NAME$9;
2037
2038
  } // Public
2038
2039
 
2039
2040
 
2040
2041
  toggle() {
2041
- if (isDisabled(this._element)) {
2042
- return;
2043
- }
2044
-
2045
- const isActive = this._element.classList.contains(CLASS_NAME_SHOW$7);
2046
-
2047
- if (isActive) {
2048
- this.hide();
2049
- return;
2050
- }
2051
-
2052
- this.show();
2042
+ return this._isShown() ? this.hide() : this.show();
2053
2043
  }
2054
2044
 
2055
2045
  show() {
2056
- if (isDisabled(this._element) || this._menu.classList.contains(CLASS_NAME_SHOW$7)) {
2046
+ if (isDisabled(this._element) || this._isShown(this._menu)) {
2057
2047
  return;
2058
2048
  }
2059
2049
 
2060
- const parent = Dropdown.getParentFromElement(this._element);
2061
2050
  const relatedTarget = {
2062
2051
  relatedTarget: this._element
2063
2052
  };
@@ -2065,38 +2054,14 @@
2065
2054
 
2066
2055
  if (showEvent.defaultPrevented) {
2067
2056
  return;
2068
- } // Totally disable Popper for Dropdowns in Navbar
2057
+ }
2069
2058
 
2059
+ const parent = Dropdown.getParentFromElement(this._element); // Totally disable Popper for Dropdowns in Navbar
2070
2060
 
2071
2061
  if (this._inNavbar) {
2072
2062
  Manipulator.setDataAttribute(this._menu, 'popper', 'none');
2073
2063
  } else {
2074
- if (typeof Popper__namespace === 'undefined') {
2075
- throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
2076
- }
2077
-
2078
- let referenceElement = this._element;
2079
-
2080
- if (this._config.reference === 'parent') {
2081
- referenceElement = parent;
2082
- } else if (isElement(this._config.reference)) {
2083
- referenceElement = this._config.reference; // Check if it's jQuery element
2084
-
2085
- if (typeof this._config.reference.jquery !== 'undefined') {
2086
- referenceElement = this._config.reference[0];
2087
- }
2088
- } else if (typeof this._config.reference === 'object') {
2089
- referenceElement = this._config.reference;
2090
- }
2091
-
2092
- const popperConfig = this._getPopperConfig();
2093
-
2094
- const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);
2095
- this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
2096
-
2097
- if (isDisplayStatic) {
2098
- Manipulator.setDataAttribute(this._menu, 'popper', 'static');
2099
- }
2064
+ this._createPopper(parent);
2100
2065
  } // If this is a touch-enabled device we add extra
2101
2066
  // empty mouseover listeners to the body's immediate children;
2102
2067
  // only needed because of broken event delegation on iOS
@@ -2111,15 +2076,15 @@
2111
2076
 
2112
2077
  this._element.setAttribute('aria-expanded', true);
2113
2078
 
2114
- this._menu.classList.toggle(CLASS_NAME_SHOW$7);
2079
+ this._menu.classList.add(CLASS_NAME_SHOW$6);
2115
2080
 
2116
- this._element.classList.toggle(CLASS_NAME_SHOW$7);
2081
+ this._element.classList.add(CLASS_NAME_SHOW$6);
2117
2082
 
2118
2083
  EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget);
2119
2084
  }
2120
2085
 
2121
2086
  hide() {
2122
- if (isDisabled(this._element) || !this._menu.classList.contains(CLASS_NAME_SHOW$7)) {
2087
+ if (isDisabled(this._element) || !this._isShown(this._menu)) {
2123
2088
  return;
2124
2089
  }
2125
2090
 
@@ -2131,12 +2096,8 @@
2131
2096
  }
2132
2097
 
2133
2098
  dispose() {
2134
- this._menu = null;
2135
-
2136
2099
  if (this._popper) {
2137
2100
  this._popper.destroy();
2138
-
2139
- this._popper = null;
2140
2101
  }
2141
2102
 
2142
2103
  super.dispose();
@@ -2151,13 +2112,6 @@
2151
2112
  } // Private
2152
2113
 
2153
2114
 
2154
- _addEventListeners() {
2155
- EventHandler.on(this._element, EVENT_CLICK, event => {
2156
- event.preventDefault();
2157
- this.toggle();
2158
- });
2159
- }
2160
-
2161
2115
  _completeHide(relatedTarget) {
2162
2116
  const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget);
2163
2117
 
@@ -2175,9 +2129,9 @@
2175
2129
  this._popper.destroy();
2176
2130
  }
2177
2131
 
2178
- this._menu.classList.remove(CLASS_NAME_SHOW$7);
2132
+ this._menu.classList.remove(CLASS_NAME_SHOW$6);
2179
2133
 
2180
- this._element.classList.remove(CLASS_NAME_SHOW$7);
2134
+ this._element.classList.remove(CLASS_NAME_SHOW$6);
2181
2135
 
2182
2136
  this._element.setAttribute('aria-expanded', 'false');
2183
2137
 
@@ -2190,16 +2144,45 @@
2190
2144
  ...Manipulator.getDataAttributes(this._element),
2191
2145
  ...config
2192
2146
  };
2193
- typeCheckConfig(NAME$8, config, this.constructor.DefaultType);
2147
+ typeCheckConfig(NAME$9, config, this.constructor.DefaultType);
2194
2148
 
2195
2149
  if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
2196
2150
  // Popper virtual elements require a getBoundingClientRect method
2197
- throw new TypeError(`${NAME$8.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
2151
+ throw new TypeError(`${NAME$9.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
2198
2152
  }
2199
2153
 
2200
2154
  return config;
2201
2155
  }
2202
2156
 
2157
+ _createPopper(parent) {
2158
+ if (typeof Popper__namespace === 'undefined') {
2159
+ throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
2160
+ }
2161
+
2162
+ let referenceElement = this._element;
2163
+
2164
+ if (this._config.reference === 'parent') {
2165
+ referenceElement = parent;
2166
+ } else if (isElement(this._config.reference)) {
2167
+ referenceElement = getElement(this._config.reference);
2168
+ } else if (typeof this._config.reference === 'object') {
2169
+ referenceElement = this._config.reference;
2170
+ }
2171
+
2172
+ const popperConfig = this._getPopperConfig();
2173
+
2174
+ const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);
2175
+ this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
2176
+
2177
+ if (isDisplayStatic) {
2178
+ Manipulator.setDataAttribute(this._menu, 'popper', 'static');
2179
+ }
2180
+ }
2181
+
2182
+ _isShown(element = this._element) {
2183
+ return element.classList.contains(CLASS_NAME_SHOW$6);
2184
+ }
2185
+
2203
2186
  _getMenuElement() {
2204
2187
  return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
2205
2188
  }
@@ -2273,75 +2256,53 @@
2273
2256
  };
2274
2257
  }
2275
2258
 
2276
- _selectMenuItem(event) {
2259
+ _selectMenuItem({
2260
+ key,
2261
+ target
2262
+ }) {
2277
2263
  const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible);
2278
2264
 
2279
2265
  if (!items.length) {
2280
2266
  return;
2281
- }
2282
-
2283
- let index = items.indexOf(event.target); // Up
2267
+ } // if target isn't included in items (e.g. when expanding the dropdown)
2268
+ // allow cycling to get the last item in case key equals ARROW_UP_KEY
2284
2269
 
2285
- if (event.key === ARROW_UP_KEY && index > 0) {
2286
- index--;
2287
- } // Down
2288
2270
 
2289
-
2290
- if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
2291
- index++;
2292
- } // index is -1 if the first keydown is an ArrowUp
2293
-
2294
-
2295
- index = index === -1 ? 0 : index;
2296
- items[index].focus();
2271
+ getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus();
2297
2272
  } // Static
2298
2273
 
2299
2274
 
2300
- static dropdownInterface(element, config) {
2301
- let data = Data.get(element, DATA_KEY$7);
2302
-
2303
- const _config = typeof config === 'object' ? config : null;
2275
+ static jQueryInterface(config) {
2276
+ return this.each(function () {
2277
+ const data = Dropdown.getOrCreateInstance(this, config);
2304
2278
 
2305
- if (!data) {
2306
- data = new Dropdown(element, _config);
2307
- }
2279
+ if (typeof config !== 'string') {
2280
+ return;
2281
+ }
2308
2282
 
2309
- if (typeof config === 'string') {
2310
2283
  if (typeof data[config] === 'undefined') {
2311
2284
  throw new TypeError(`No method named "${config}"`);
2312
2285
  }
2313
2286
 
2314
2287
  data[config]();
2315
- }
2316
- }
2317
-
2318
- static jQueryInterface(config) {
2319
- return this.each(function () {
2320
- Dropdown.dropdownInterface(this, config);
2321
2288
  });
2322
2289
  }
2323
2290
 
2324
2291
  static clearMenus(event) {
2325
- if (event) {
2326
- if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY) {
2327
- return;
2328
- }
2329
-
2330
- if (/input|select|option|textarea|form/i.test(event.target.tagName)) {
2331
- return;
2332
- }
2292
+ if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1)) {
2293
+ return;
2333
2294
  }
2334
2295
 
2335
2296
  const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3);
2336
2297
 
2337
2298
  for (let i = 0, len = toggles.length; i < len; i++) {
2338
- const context = Data.get(toggles[i], DATA_KEY$7);
2299
+ const context = Dropdown.getInstance(toggles[i]);
2339
2300
 
2340
2301
  if (!context || context._config.autoClose === false) {
2341
2302
  continue;
2342
2303
  }
2343
2304
 
2344
- if (!context._element.classList.contains(CLASS_NAME_SHOW$7)) {
2305
+ if (!context._isShown()) {
2345
2306
  continue;
2346
2307
  }
2347
2308
 
@@ -2355,10 +2316,10 @@
2355
2316
 
2356
2317
  if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
2357
2318
  continue;
2358
- } // Tab navigation through the dropdown menu shouldn't close the menu
2319
+ } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
2359
2320
 
2360
2321
 
2361
- if (event.type === 'keyup' && event.key === TAB_KEY && context._menu.contains(event.target)) {
2322
+ if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {
2362
2323
  continue;
2363
2324
  }
2364
2325
 
@@ -2387,7 +2348,7 @@
2387
2348
  return;
2388
2349
  }
2389
2350
 
2390
- const isActive = this.classList.contains(CLASS_NAME_SHOW$7);
2351
+ const isActive = this.classList.contains(CLASS_NAME_SHOW$6);
2391
2352
 
2392
2353
  if (!isActive && event.key === ESCAPE_KEY$2) {
2393
2354
  return;
@@ -2400,25 +2361,27 @@
2400
2361
  return;
2401
2362
  }
2402
2363
 
2403
- const getToggleButton = () => this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];
2364
+ const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];
2365
+ const instance = Dropdown.getOrCreateInstance(getToggleButton);
2404
2366
 
2405
2367
  if (event.key === ESCAPE_KEY$2) {
2406
- getToggleButton().focus();
2407
- Dropdown.clearMenus();
2368
+ instance.hide();
2408
2369
  return;
2409
2370
  }
2410
2371
 
2411
- if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) {
2412
- getToggleButton().click();
2372
+ if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) {
2373
+ if (!isActive) {
2374
+ instance.show();
2375
+ }
2376
+
2377
+ instance._selectMenuItem(event);
2378
+
2413
2379
  return;
2414
2380
  }
2415
2381
 
2416
2382
  if (!isActive || event.key === SPACE_KEY) {
2417
2383
  Dropdown.clearMenus();
2418
- return;
2419
2384
  }
2420
-
2421
- Dropdown.getInstance(getToggleButton())._selectMenuItem(event);
2422
2385
  }
2423
2386
 
2424
2387
  }
@@ -2435,7 +2398,7 @@
2435
2398
  EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
2436
2399
  EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
2437
2400
  event.preventDefault();
2438
- Dropdown.dropdownInterface(this);
2401
+ Dropdown.getOrCreateInstance(this).toggle();
2439
2402
  });
2440
2403
  /**
2441
2404
  * ------------------------------------------------------------------------
@@ -2444,107 +2407,138 @@
2444
2407
  * add .Dropdown to jQuery only if jQuery is present
2445
2408
  */
2446
2409
 
2447
- defineJQueryPlugin(NAME$8, Dropdown);
2410
+ defineJQueryPlugin(Dropdown);
2448
2411
 
2449
2412
  /**
2450
2413
  * --------------------------------------------------------------------------
2451
- * Bootstrap (v5.0.0): util/scrollBar.js
2414
+ * Bootstrap (v5.1.1): util/scrollBar.js
2452
2415
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2453
2416
  * --------------------------------------------------------------------------
2454
2417
  */
2455
2418
  const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
2456
2419
  const SELECTOR_STICKY_CONTENT = '.sticky-top';
2457
2420
 
2458
- const getWidth = () => {
2459
- // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
2460
- const documentWidth = document.documentElement.clientWidth;
2461
- return Math.abs(window.innerWidth - documentWidth);
2462
- };
2421
+ class ScrollBarHelper {
2422
+ constructor() {
2423
+ this._element = document.body;
2424
+ }
2463
2425
 
2464
- const hide = (width = getWidth()) => {
2465
- _disableOverFlow(); // give padding to element to balances the hidden scrollbar width
2426
+ getWidth() {
2427
+ // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
2428
+ const documentWidth = document.documentElement.clientWidth;
2429
+ return Math.abs(window.innerWidth - documentWidth);
2430
+ }
2466
2431
 
2432
+ hide() {
2433
+ const width = this.getWidth();
2467
2434
 
2468
- _setElementAttributes('body', 'paddingRight', calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements, to keep shown fullwidth
2435
+ this._disableOverFlow(); // give padding to element to balance the hidden scrollbar width
2469
2436
 
2470
2437
 
2471
- _setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);
2438
+ this._setElementAttributes(this._element, 'paddingRight', calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
2472
2439
 
2473
- _setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);
2474
- };
2475
2440
 
2476
- const _disableOverFlow = () => {
2477
- const actualValue = document.body.style.overflow;
2441
+ this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);
2478
2442
 
2479
- if (actualValue) {
2480
- Manipulator.setDataAttribute(document.body, 'overflow', actualValue);
2443
+ this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);
2481
2444
  }
2482
2445
 
2483
- document.body.style.overflow = 'hidden';
2484
- };
2446
+ _disableOverFlow() {
2447
+ this._saveInitialAttribute(this._element, 'overflow');
2485
2448
 
2486
- const _setElementAttributes = (selector, styleProp, callback) => {
2487
- const scrollbarWidth = getWidth();
2488
- SelectorEngine.find(selector).forEach(element => {
2489
- if (element !== document.body && window.innerWidth > element.clientWidth + scrollbarWidth) {
2490
- return;
2491
- }
2449
+ this._element.style.overflow = 'hidden';
2450
+ }
2492
2451
 
2493
- const actualValue = element.style[styleProp];
2494
- const calculatedValue = window.getComputedStyle(element)[styleProp];
2495
- Manipulator.setDataAttribute(element, styleProp, actualValue);
2496
- element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`;
2497
- });
2498
- };
2452
+ _setElementAttributes(selector, styleProp, callback) {
2453
+ const scrollbarWidth = this.getWidth();
2499
2454
 
2500
- const reset = () => {
2501
- _resetElementAttributes('body', 'overflow');
2455
+ const manipulationCallBack = element => {
2456
+ if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
2457
+ return;
2458
+ }
2502
2459
 
2503
- _resetElementAttributes('body', 'paddingRight');
2460
+ this._saveInitialAttribute(element, styleProp);
2504
2461
 
2505
- _resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');
2462
+ const calculatedValue = window.getComputedStyle(element)[styleProp];
2463
+ element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`;
2464
+ };
2506
2465
 
2507
- _resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
2508
- };
2466
+ this._applyManipulationCallback(selector, manipulationCallBack);
2467
+ }
2468
+
2469
+ reset() {
2470
+ this._resetElementAttributes(this._element, 'overflow');
2509
2471
 
2510
- const _resetElementAttributes = (selector, styleProp) => {
2511
- SelectorEngine.find(selector).forEach(element => {
2512
- const value = Manipulator.getDataAttribute(element, styleProp);
2472
+ this._resetElementAttributes(this._element, 'paddingRight');
2513
2473
 
2514
- if (typeof value === 'undefined') {
2515
- element.style.removeProperty(styleProp);
2474
+ this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');
2475
+
2476
+ this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
2477
+ }
2478
+
2479
+ _saveInitialAttribute(element, styleProp) {
2480
+ const actualValue = element.style[styleProp];
2481
+
2482
+ if (actualValue) {
2483
+ Manipulator.setDataAttribute(element, styleProp, actualValue);
2484
+ }
2485
+ }
2486
+
2487
+ _resetElementAttributes(selector, styleProp) {
2488
+ const manipulationCallBack = element => {
2489
+ const value = Manipulator.getDataAttribute(element, styleProp);
2490
+
2491
+ if (typeof value === 'undefined') {
2492
+ element.style.removeProperty(styleProp);
2493
+ } else {
2494
+ Manipulator.removeDataAttribute(element, styleProp);
2495
+ element.style[styleProp] = value;
2496
+ }
2497
+ };
2498
+
2499
+ this._applyManipulationCallback(selector, manipulationCallBack);
2500
+ }
2501
+
2502
+ _applyManipulationCallback(selector, callBack) {
2503
+ if (isElement(selector)) {
2504
+ callBack(selector);
2516
2505
  } else {
2517
- Manipulator.removeDataAttribute(element, styleProp);
2518
- element.style[styleProp] = value;
2506
+ SelectorEngine.find(selector, this._element).forEach(callBack);
2519
2507
  }
2520
- });
2521
- };
2508
+ }
2509
+
2510
+ isOverflowing() {
2511
+ return this.getWidth() > 0;
2512
+ }
2513
+
2514
+ }
2522
2515
 
2523
2516
  /**
2524
2517
  * --------------------------------------------------------------------------
2525
- * Bootstrap (v5.0.0): util/backdrop.js
2518
+ * Bootstrap (v5.1.1): util/backdrop.js
2526
2519
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2527
2520
  * --------------------------------------------------------------------------
2528
2521
  */
2529
- const Default$6 = {
2522
+ const Default$7 = {
2523
+ className: 'modal-backdrop',
2530
2524
  isVisible: true,
2531
2525
  // if false, we use the backdrop helper without adding any element to the dom
2532
2526
  isAnimated: false,
2533
- rootElement: document.body,
2527
+ rootElement: 'body',
2534
2528
  // give the choice to place backdrop under different elements
2535
2529
  clickCallback: null
2536
2530
  };
2537
- const DefaultType$6 = {
2531
+ const DefaultType$7 = {
2532
+ className: 'string',
2538
2533
  isVisible: 'boolean',
2539
2534
  isAnimated: 'boolean',
2540
- rootElement: 'element',
2535
+ rootElement: '(element|string)',
2541
2536
  clickCallback: '(function|null)'
2542
2537
  };
2543
- const NAME$7 = 'backdrop';
2544
- const CLASS_NAME_BACKDROP = 'modal-backdrop';
2545
- const CLASS_NAME_FADE$5 = 'fade';
2546
- const CLASS_NAME_SHOW$6 = 'show';
2547
- const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$7}`;
2538
+ const NAME$8 = 'backdrop';
2539
+ const CLASS_NAME_FADE$4 = 'fade';
2540
+ const CLASS_NAME_SHOW$5 = 'show';
2541
+ const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$8}`;
2548
2542
 
2549
2543
  class Backdrop {
2550
2544
  constructor(config) {
@@ -2565,7 +2559,7 @@
2565
2559
  reflow(this._getElement());
2566
2560
  }
2567
2561
 
2568
- this._getElement().classList.add(CLASS_NAME_SHOW$6);
2562
+ this._getElement().classList.add(CLASS_NAME_SHOW$5);
2569
2563
 
2570
2564
  this._emulateAnimation(() => {
2571
2565
  execute(callback);
@@ -2578,7 +2572,7 @@
2578
2572
  return;
2579
2573
  }
2580
2574
 
2581
- this._getElement().classList.remove(CLASS_NAME_SHOW$6);
2575
+ this._getElement().classList.remove(CLASS_NAME_SHOW$5);
2582
2576
 
2583
2577
  this._emulateAnimation(() => {
2584
2578
  this.dispose();
@@ -2590,10 +2584,10 @@
2590
2584
  _getElement() {
2591
2585
  if (!this._element) {
2592
2586
  const backdrop = document.createElement('div');
2593
- backdrop.className = CLASS_NAME_BACKDROP;
2587
+ backdrop.className = this._config.className;
2594
2588
 
2595
2589
  if (this._config.isAnimated) {
2596
- backdrop.classList.add(CLASS_NAME_FADE$5);
2590
+ backdrop.classList.add(CLASS_NAME_FADE$4);
2597
2591
  }
2598
2592
 
2599
2593
  this._element = backdrop;
@@ -2603,10 +2597,12 @@
2603
2597
  }
2604
2598
 
2605
2599
  _getConfig(config) {
2606
- config = { ...Default$6,
2600
+ config = { ...Default$7,
2607
2601
  ...(typeof config === 'object' ? config : {})
2608
- };
2609
- typeCheckConfig(NAME$7, config, DefaultType$6);
2602
+ }; // use getElement() with the default "body" to get a fresh Element on each instantiation
2603
+
2604
+ config.rootElement = getElement(config.rootElement);
2605
+ typeCheckConfig(NAME$8, config, DefaultType$7);
2610
2606
  return config;
2611
2607
  }
2612
2608
 
@@ -2615,7 +2611,7 @@
2615
2611
  return;
2616
2612
  }
2617
2613
 
2618
- this._config.rootElement.appendChild(this._getElement());
2614
+ this._config.rootElement.append(this._getElement());
2619
2615
 
2620
2616
  EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => {
2621
2617
  execute(this._config.clickCallback);
@@ -2630,27 +2626,123 @@
2630
2626
 
2631
2627
  EventHandler.off(this._element, EVENT_MOUSEDOWN);
2632
2628
 
2633
- this._getElement().parentNode.removeChild(this._element);
2629
+ this._element.remove();
2634
2630
 
2635
2631
  this._isAppended = false;
2636
2632
  }
2637
2633
 
2638
2634
  _emulateAnimation(callback) {
2639
- if (!this._config.isAnimated) {
2640
- execute(callback);
2635
+ executeAfterTransition(callback, this._getElement(), this._config.isAnimated);
2636
+ }
2637
+
2638
+ }
2639
+
2640
+ /**
2641
+ * --------------------------------------------------------------------------
2642
+ * Bootstrap (v5.1.1): util/focustrap.js
2643
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2644
+ * --------------------------------------------------------------------------
2645
+ */
2646
+ const Default$6 = {
2647
+ trapElement: null,
2648
+ // The element to trap focus inside of
2649
+ autofocus: true
2650
+ };
2651
+ const DefaultType$6 = {
2652
+ trapElement: 'element',
2653
+ autofocus: 'boolean'
2654
+ };
2655
+ const NAME$7 = 'focustrap';
2656
+ const DATA_KEY$7 = 'bs.focustrap';
2657
+ const EVENT_KEY$7 = `.${DATA_KEY$7}`;
2658
+ const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$7}`;
2659
+ const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$7}`;
2660
+ const TAB_KEY = 'Tab';
2661
+ const TAB_NAV_FORWARD = 'forward';
2662
+ const TAB_NAV_BACKWARD = 'backward';
2663
+
2664
+ class FocusTrap {
2665
+ constructor(config) {
2666
+ this._config = this._getConfig(config);
2667
+ this._isActive = false;
2668
+ this._lastTabNavDirection = null;
2669
+ }
2670
+
2671
+ activate() {
2672
+ const {
2673
+ trapElement,
2674
+ autofocus
2675
+ } = this._config;
2676
+
2677
+ if (this._isActive) {
2641
2678
  return;
2642
2679
  }
2643
2680
 
2644
- const backdropTransitionDuration = getTransitionDurationFromElement(this._getElement());
2645
- EventHandler.one(this._getElement(), 'transitionend', () => execute(callback));
2646
- emulateTransitionEnd(this._getElement(), backdropTransitionDuration);
2681
+ if (autofocus) {
2682
+ trapElement.focus();
2683
+ }
2684
+
2685
+ EventHandler.off(document, EVENT_KEY$7); // guard against infinite focus loop
2686
+
2687
+ EventHandler.on(document, EVENT_FOCUSIN$1, event => this._handleFocusin(event));
2688
+ EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));
2689
+ this._isActive = true;
2690
+ }
2691
+
2692
+ deactivate() {
2693
+ if (!this._isActive) {
2694
+ return;
2695
+ }
2696
+
2697
+ this._isActive = false;
2698
+ EventHandler.off(document, EVENT_KEY$7);
2699
+ } // Private
2700
+
2701
+
2702
+ _handleFocusin(event) {
2703
+ const {
2704
+ target
2705
+ } = event;
2706
+ const {
2707
+ trapElement
2708
+ } = this._config;
2709
+
2710
+ if (target === document || target === trapElement || trapElement.contains(target)) {
2711
+ return;
2712
+ }
2713
+
2714
+ const elements = SelectorEngine.focusableChildren(trapElement);
2715
+
2716
+ if (elements.length === 0) {
2717
+ trapElement.focus();
2718
+ } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {
2719
+ elements[elements.length - 1].focus();
2720
+ } else {
2721
+ elements[0].focus();
2722
+ }
2723
+ }
2724
+
2725
+ _handleKeydown(event) {
2726
+ if (event.key !== TAB_KEY) {
2727
+ return;
2728
+ }
2729
+
2730
+ this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;
2731
+ }
2732
+
2733
+ _getConfig(config) {
2734
+ config = { ...Default$6,
2735
+ ...(typeof config === 'object' ? config : {})
2736
+ };
2737
+ typeCheckConfig(NAME$7, config, DefaultType$6);
2738
+ return config;
2647
2739
  }
2648
2740
 
2649
2741
  }
2650
2742
 
2651
2743
  /**
2652
2744
  * --------------------------------------------------------------------------
2653
- * Bootstrap (v5.0.0): modal.js
2745
+ * Bootstrap (v5.1.1): modal.js
2654
2746
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2655
2747
  * --------------------------------------------------------------------------
2656
2748
  */
@@ -2680,21 +2772,20 @@
2680
2772
  const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`;
2681
2773
  const EVENT_SHOW$3 = `show${EVENT_KEY$6}`;
2682
2774
  const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`;
2683
- const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$6}`;
2684
2775
  const EVENT_RESIZE = `resize${EVENT_KEY$6}`;
2685
- const EVENT_CLICK_DISMISS$2 = `click.dismiss${EVENT_KEY$6}`;
2776
+ const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$6}`;
2686
2777
  const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`;
2687
2778
  const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`;
2688
2779
  const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`;
2689
2780
  const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;
2690
2781
  const CLASS_NAME_OPEN = 'modal-open';
2691
- const CLASS_NAME_FADE$4 = 'fade';
2692
- const CLASS_NAME_SHOW$5 = 'show';
2782
+ const CLASS_NAME_FADE$3 = 'fade';
2783
+ const CLASS_NAME_SHOW$4 = 'show';
2693
2784
  const CLASS_NAME_STATIC = 'modal-static';
2785
+ const OPEN_SELECTOR$1 = '.modal.show';
2694
2786
  const SELECTOR_DIALOG = '.modal-dialog';
2695
2787
  const SELECTOR_MODAL_BODY = '.modal-body';
2696
2788
  const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
2697
- const SELECTOR_DATA_DISMISS$2 = '[data-bs-dismiss="modal"]';
2698
2789
  /**
2699
2790
  * ------------------------------------------------------------------------
2700
2791
  * Class Definition
@@ -2707,9 +2798,11 @@
2707
2798
  this._config = this._getConfig(config);
2708
2799
  this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);
2709
2800
  this._backdrop = this._initializeBackDrop();
2801
+ this._focustrap = this._initializeFocusTrap();
2710
2802
  this._isShown = false;
2711
2803
  this._ignoreBackdropClick = false;
2712
2804
  this._isTransitioning = false;
2805
+ this._scrollBar = new ScrollBarHelper();
2713
2806
  } // Getters
2714
2807
 
2715
2808
 
@@ -2717,8 +2810,8 @@
2717
2810
  return Default$5;
2718
2811
  }
2719
2812
 
2720
- static get DATA_KEY() {
2721
- return DATA_KEY$6;
2813
+ static get NAME() {
2814
+ return NAME$6;
2722
2815
  } // Public
2723
2816
 
2724
2817
 
@@ -2731,20 +2824,22 @@
2731
2824
  return;
2732
2825
  }
2733
2826
 
2734
- if (this._isAnimated()) {
2735
- this._isTransitioning = true;
2736
- }
2737
-
2738
2827
  const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {
2739
2828
  relatedTarget
2740
2829
  });
2741
2830
 
2742
- if (this._isShown || showEvent.defaultPrevented) {
2831
+ if (showEvent.defaultPrevented) {
2743
2832
  return;
2744
2833
  }
2745
2834
 
2746
2835
  this._isShown = true;
2747
- hide();
2836
+
2837
+ if (this._isAnimated()) {
2838
+ this._isTransitioning = true;
2839
+ }
2840
+
2841
+ this._scrollBar.hide();
2842
+
2748
2843
  document.body.classList.add(CLASS_NAME_OPEN);
2749
2844
 
2750
2845
  this._adjustDialog();
@@ -2753,7 +2848,6 @@
2753
2848
 
2754
2849
  this._setResizeEvent();
2755
2850
 
2756
- EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, SELECTOR_DATA_DISMISS$2, event => this.hide(event));
2757
2851
  EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {
2758
2852
  EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {
2759
2853
  if (event.target === this._element) {
@@ -2765,11 +2859,7 @@
2765
2859
  this._showBackdrop(() => this._showElement(relatedTarget));
2766
2860
  }
2767
2861
 
2768
- hide(event) {
2769
- if (event) {
2770
- event.preventDefault();
2771
- }
2772
-
2862
+ hide() {
2773
2863
  if (!this._isShown || this._isTransitioning) {
2774
2864
  return;
2775
2865
  }
@@ -2792,41 +2882,24 @@
2792
2882
 
2793
2883
  this._setResizeEvent();
2794
2884
 
2795
- EventHandler.off(document, EVENT_FOCUSIN$1);
2885
+ this._focustrap.deactivate();
2796
2886
 
2797
- this._element.classList.remove(CLASS_NAME_SHOW$5);
2887
+ this._element.classList.remove(CLASS_NAME_SHOW$4);
2798
2888
 
2799
- EventHandler.off(this._element, EVENT_CLICK_DISMISS$2);
2889
+ EventHandler.off(this._element, EVENT_CLICK_DISMISS);
2800
2890
  EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
2801
2891
 
2802
- if (isAnimated) {
2803
- const transitionDuration = getTransitionDurationFromElement(this._element);
2804
- EventHandler.one(this._element, 'transitionend', event => this._hideModal(event));
2805
- emulateTransitionEnd(this._element, transitionDuration);
2806
- } else {
2807
- this._hideModal();
2808
- }
2892
+ this._queueCallback(() => this._hideModal(), this._element, isAnimated);
2809
2893
  }
2810
2894
 
2811
2895
  dispose() {
2812
2896
  [window, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6));
2813
- super.dispose();
2814
- /**
2815
- * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
2816
- * Do not move `document` in `htmlElements` array
2817
- * It will remove `EVENT_CLICK_DATA_API` event that should remain
2818
- */
2819
-
2820
- EventHandler.off(document, EVENT_FOCUSIN$1);
2821
- this._config = null;
2822
- this._dialog = null;
2823
2897
 
2824
2898
  this._backdrop.dispose();
2825
2899
 
2826
- this._backdrop = null;
2827
- this._isShown = null;
2828
- this._ignoreBackdropClick = null;
2829
- this._isTransitioning = null;
2900
+ this._focustrap.deactivate();
2901
+
2902
+ super.dispose();
2830
2903
  }
2831
2904
 
2832
2905
  handleUpdate() {
@@ -2842,10 +2915,16 @@
2842
2915
  });
2843
2916
  }
2844
2917
 
2918
+ _initializeFocusTrap() {
2919
+ return new FocusTrap({
2920
+ trapElement: this._element
2921
+ });
2922
+ }
2923
+
2845
2924
  _getConfig(config) {
2846
2925
  config = { ...Default$5,
2847
2926
  ...Manipulator.getDataAttributes(this._element),
2848
- ...config
2927
+ ...(typeof config === 'object' ? config : {})
2849
2928
  };
2850
2929
  typeCheckConfig(NAME$6, config, DefaultType$5);
2851
2930
  return config;
@@ -2858,7 +2937,7 @@
2858
2937
 
2859
2938
  if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
2860
2939
  // Don't move modal's DOM position
2861
- document.body.appendChild(this._element);
2940
+ document.body.append(this._element);
2862
2941
  }
2863
2942
 
2864
2943
  this._element.style.display = 'block';
@@ -2879,15 +2958,11 @@
2879
2958
  reflow(this._element);
2880
2959
  }
2881
2960
 
2882
- this._element.classList.add(CLASS_NAME_SHOW$5);
2883
-
2884
- if (this._config.focus) {
2885
- this._enforceFocus();
2886
- }
2961
+ this._element.classList.add(CLASS_NAME_SHOW$4);
2887
2962
 
2888
2963
  const transitionComplete = () => {
2889
2964
  if (this._config.focus) {
2890
- this._element.focus();
2965
+ this._focustrap.activate();
2891
2966
  }
2892
2967
 
2893
2968
  this._isTransitioning = false;
@@ -2896,23 +2971,7 @@
2896
2971
  });
2897
2972
  };
2898
2973
 
2899
- if (isAnimated) {
2900
- const transitionDuration = getTransitionDurationFromElement(this._dialog);
2901
- EventHandler.one(this._dialog, 'transitionend', transitionComplete);
2902
- emulateTransitionEnd(this._dialog, transitionDuration);
2903
- } else {
2904
- transitionComplete();
2905
- }
2906
- }
2907
-
2908
- _enforceFocus() {
2909
- EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop
2910
-
2911
- EventHandler.on(document, EVENT_FOCUSIN$1, event => {
2912
- if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) {
2913
- this._element.focus();
2914
- }
2915
- });
2974
+ this._queueCallback(transitionComplete, this._dialog, isAnimated);
2916
2975
  }
2917
2976
 
2918
2977
  _setEscapeEvent() {
@@ -2954,13 +3013,14 @@
2954
3013
 
2955
3014
  this._resetAdjustments();
2956
3015
 
2957
- reset();
3016
+ this._scrollBar.reset();
3017
+
2958
3018
  EventHandler.trigger(this._element, EVENT_HIDDEN$3);
2959
3019
  });
2960
3020
  }
2961
3021
 
2962
3022
  _showBackdrop(callback) {
2963
- EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, event => {
3023
+ EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => {
2964
3024
  if (this._ignoreBackdropClick) {
2965
3025
  this._ignoreBackdropClick = false;
2966
3026
  return;
@@ -2981,7 +3041,7 @@
2981
3041
  }
2982
3042
 
2983
3043
  _isAnimated() {
2984
- return this._element.classList.contains(CLASS_NAME_FADE$4);
3044
+ return this._element.classList.contains(CLASS_NAME_FADE$3);
2985
3045
  }
2986
3046
 
2987
3047
  _triggerBackdropTransition() {
@@ -2991,27 +3051,32 @@
2991
3051
  return;
2992
3052
  }
2993
3053
 
2994
- const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
3054
+ const {
3055
+ classList,
3056
+ scrollHeight,
3057
+ style
3058
+ } = this._element;
3059
+ const isModalOverflowing = scrollHeight > document.documentElement.clientHeight; // return if the following background transition hasn't yet completed
3060
+
3061
+ if (!isModalOverflowing && style.overflowY === 'hidden' || classList.contains(CLASS_NAME_STATIC)) {
3062
+ return;
3063
+ }
2995
3064
 
2996
3065
  if (!isModalOverflowing) {
2997
- this._element.style.overflowY = 'hidden';
3066
+ style.overflowY = 'hidden';
2998
3067
  }
2999
3068
 
3000
- this._element.classList.add(CLASS_NAME_STATIC);
3069
+ classList.add(CLASS_NAME_STATIC);
3001
3070
 
3002
- const modalTransitionDuration = getTransitionDurationFromElement(this._dialog);
3003
- EventHandler.off(this._element, 'transitionend');
3004
- EventHandler.one(this._element, 'transitionend', () => {
3005
- this._element.classList.remove(CLASS_NAME_STATIC);
3071
+ this._queueCallback(() => {
3072
+ classList.remove(CLASS_NAME_STATIC);
3006
3073
 
3007
3074
  if (!isModalOverflowing) {
3008
- EventHandler.one(this._element, 'transitionend', () => {
3009
- this._element.style.overflowY = '';
3010
- });
3011
- emulateTransitionEnd(this._element, modalTransitionDuration);
3075
+ this._queueCallback(() => {
3076
+ style.overflowY = '';
3077
+ }, this._dialog);
3012
3078
  }
3013
- });
3014
- emulateTransitionEnd(this._element, modalTransitionDuration);
3079
+ }, this._dialog);
3015
3080
 
3016
3081
  this._element.focus();
3017
3082
  } // ----------------------------------------------------------------------
@@ -3021,7 +3086,9 @@
3021
3086
 
3022
3087
  _adjustDialog() {
3023
3088
  const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
3024
- const scrollbarWidth = getWidth();
3089
+
3090
+ const scrollbarWidth = this._scrollBar.getWidth();
3091
+
3025
3092
  const isBodyOverflowing = scrollbarWidth > 0;
3026
3093
 
3027
3094
  if (!isBodyOverflowing && isModalOverflowing && !isRTL() || isBodyOverflowing && !isModalOverflowing && isRTL()) {
@@ -3041,7 +3108,7 @@
3041
3108
 
3042
3109
  static jQueryInterface(config, relatedTarget) {
3043
3110
  return this.each(function () {
3044
- const data = Modal.getInstance(this) || new Modal(this, typeof config === 'object' ? config : {});
3111
+ const data = Modal.getOrCreateInstance(this, config);
3045
3112
 
3046
3113
  if (typeof config !== 'string') {
3047
3114
  return;
@@ -3081,10 +3148,18 @@
3081
3148
  this.focus();
3082
3149
  }
3083
3150
  });
3084
- });
3085
- const data = Modal.getInstance(target) || new Modal(target);
3151
+ }); // avoid conflict when clicking moddal toggler while another one is open
3152
+
3153
+ const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1);
3154
+
3155
+ if (allReadyOpen) {
3156
+ Modal.getInstance(allReadyOpen).hide();
3157
+ }
3158
+
3159
+ const data = Modal.getOrCreateInstance(target);
3086
3160
  data.toggle(this);
3087
3161
  });
3162
+ enableDismissTrigger(Modal);
3088
3163
  /**
3089
3164
  * ------------------------------------------------------------------------
3090
3165
  * jQuery
@@ -3092,11 +3167,11 @@
3092
3167
  * add .Modal to jQuery only if jQuery is present
3093
3168
  */
3094
3169
 
3095
- defineJQueryPlugin(NAME$6, Modal);
3170
+ defineJQueryPlugin(Modal);
3096
3171
 
3097
3172
  /**
3098
3173
  * --------------------------------------------------------------------------
3099
- * Bootstrap (v5.0.0): offcanvas.js
3174
+ * Bootstrap (v5.1.1): offcanvas.js
3100
3175
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
3101
3176
  * --------------------------------------------------------------------------
3102
3177
  */
@@ -3122,17 +3197,15 @@
3122
3197
  keyboard: 'boolean',
3123
3198
  scroll: 'boolean'
3124
3199
  };
3125
- const CLASS_NAME_SHOW$4 = 'show';
3200
+ const CLASS_NAME_SHOW$3 = 'show';
3201
+ const CLASS_NAME_BACKDROP = 'offcanvas-backdrop';
3126
3202
  const OPEN_SELECTOR = '.offcanvas.show';
3127
3203
  const EVENT_SHOW$2 = `show${EVENT_KEY$5}`;
3128
3204
  const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`;
3129
3205
  const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`;
3130
3206
  const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`;
3131
- const EVENT_FOCUSIN = `focusin${EVENT_KEY$5}`;
3132
3207
  const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`;
3133
- const EVENT_CLICK_DISMISS$1 = `click.dismiss${EVENT_KEY$5}`;
3134
3208
  const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`;
3135
- const SELECTOR_DATA_DISMISS$1 = '[data-bs-dismiss="offcanvas"]';
3136
3209
  const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]';
3137
3210
  /**
3138
3211
  * ------------------------------------------------------------------------
@@ -3146,17 +3219,18 @@
3146
3219
  this._config = this._getConfig(config);
3147
3220
  this._isShown = false;
3148
3221
  this._backdrop = this._initializeBackDrop();
3222
+ this._focustrap = this._initializeFocusTrap();
3149
3223
 
3150
3224
  this._addEventListeners();
3151
3225
  } // Getters
3152
3226
 
3153
3227
 
3154
- static get Default() {
3155
- return Default$4;
3228
+ static get NAME() {
3229
+ return NAME$5;
3156
3230
  }
3157
3231
 
3158
- static get DATA_KEY() {
3159
- return DATA_KEY$5;
3232
+ static get Default() {
3233
+ return Default$4;
3160
3234
  } // Public
3161
3235
 
3162
3236
 
@@ -3183,9 +3257,7 @@
3183
3257
  this._backdrop.show();
3184
3258
 
3185
3259
  if (!this._config.scroll) {
3186
- hide();
3187
-
3188
- this._enforceFocusOnElement(this._element);
3260
+ new ScrollBarHelper().hide();
3189
3261
  }
3190
3262
 
3191
3263
  this._element.removeAttribute('aria-hidden');
@@ -3194,17 +3266,19 @@
3194
3266
 
3195
3267
  this._element.setAttribute('role', 'dialog');
3196
3268
 
3197
- this._element.classList.add(CLASS_NAME_SHOW$4);
3269
+ this._element.classList.add(CLASS_NAME_SHOW$3);
3198
3270
 
3199
3271
  const completeCallBack = () => {
3272
+ if (!this._config.scroll) {
3273
+ this._focustrap.activate();
3274
+ }
3275
+
3200
3276
  EventHandler.trigger(this._element, EVENT_SHOWN$2, {
3201
3277
  relatedTarget
3202
3278
  });
3203
3279
  };
3204
3280
 
3205
- const transitionDuration = getTransitionDurationFromElement(this._element);
3206
- EventHandler.one(this._element, 'transitionend', completeCallBack);
3207
- emulateTransitionEnd(this._element, transitionDuration);
3281
+ this._queueCallback(completeCallBack, this._element, true);
3208
3282
  }
3209
3283
 
3210
3284
  hide() {
@@ -3218,13 +3292,13 @@
3218
3292
  return;
3219
3293
  }
3220
3294
 
3221
- EventHandler.off(document, EVENT_FOCUSIN);
3295
+ this._focustrap.deactivate();
3222
3296
 
3223
3297
  this._element.blur();
3224
3298
 
3225
3299
  this._isShown = false;
3226
3300
 
3227
- this._element.classList.remove(CLASS_NAME_SHOW$4);
3301
+ this._element.classList.remove(CLASS_NAME_SHOW$3);
3228
3302
 
3229
3303
  this._backdrop.hide();
3230
3304
 
@@ -3238,24 +3312,21 @@
3238
3312
  this._element.style.visibility = 'hidden';
3239
3313
 
3240
3314
  if (!this._config.scroll) {
3241
- reset();
3315
+ new ScrollBarHelper().reset();
3242
3316
  }
3243
3317
 
3244
3318
  EventHandler.trigger(this._element, EVENT_HIDDEN$2);
3245
3319
  };
3246
3320
 
3247
- const transitionDuration = getTransitionDurationFromElement(this._element);
3248
- EventHandler.one(this._element, 'transitionend', completeCallback);
3249
- emulateTransitionEnd(this._element, transitionDuration);
3321
+ this._queueCallback(completeCallback, this._element, true);
3250
3322
  }
3251
3323
 
3252
3324
  dispose() {
3253
3325
  this._backdrop.dispose();
3254
3326
 
3327
+ this._focustrap.deactivate();
3328
+
3255
3329
  super.dispose();
3256
- EventHandler.off(document, EVENT_FOCUSIN);
3257
- this._config = null;
3258
- this._backdrop = null;
3259
3330
  } // Private
3260
3331
 
3261
3332
 
@@ -3270,6 +3341,7 @@
3270
3341
 
3271
3342
  _initializeBackDrop() {
3272
3343
  return new Backdrop({
3344
+ className: CLASS_NAME_BACKDROP,
3273
3345
  isVisible: this._config.backdrop,
3274
3346
  isAnimated: true,
3275
3347
  rootElement: this._element.parentNode,
@@ -3277,19 +3349,13 @@
3277
3349
  });
3278
3350
  }
3279
3351
 
3280
- _enforceFocusOnElement(element) {
3281
- EventHandler.off(document, EVENT_FOCUSIN); // guard against infinite focus loop
3282
-
3283
- EventHandler.on(document, EVENT_FOCUSIN, event => {
3284
- if (document !== event.target && element !== event.target && !element.contains(event.target)) {
3285
- element.focus();
3286
- }
3352
+ _initializeFocusTrap() {
3353
+ return new FocusTrap({
3354
+ trapElement: this._element
3287
3355
  });
3288
- element.focus();
3289
3356
  }
3290
3357
 
3291
3358
  _addEventListeners() {
3292
- EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, () => this.hide());
3293
3359
  EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
3294
3360
  if (this._config.keyboard && event.key === ESCAPE_KEY) {
3295
3361
  this.hide();
@@ -3300,7 +3366,7 @@
3300
3366
 
3301
3367
  static jQueryInterface(config) {
3302
3368
  return this.each(function () {
3303
- const data = Data.get(this, DATA_KEY$5) || new Offcanvas(this, typeof config === 'object' ? config : {});
3369
+ const data = Offcanvas.getOrCreateInstance(this, config);
3304
3370
 
3305
3371
  if (typeof config !== 'string') {
3306
3372
  return;
@@ -3346,23 +3412,22 @@
3346
3412
  Offcanvas.getInstance(allReadyOpen).hide();
3347
3413
  }
3348
3414
 
3349
- const data = Data.get(target, DATA_KEY$5) || new Offcanvas(target);
3415
+ const data = Offcanvas.getOrCreateInstance(target);
3350
3416
  data.toggle(this);
3351
3417
  });
3352
- EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => {
3353
- SelectorEngine.find(OPEN_SELECTOR).forEach(el => (Data.get(el, DATA_KEY$5) || new Offcanvas(el)).show());
3354
- });
3418
+ EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => SelectorEngine.find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show()));
3419
+ enableDismissTrigger(Offcanvas);
3355
3420
  /**
3356
3421
  * ------------------------------------------------------------------------
3357
3422
  * jQuery
3358
3423
  * ------------------------------------------------------------------------
3359
3424
  */
3360
3425
 
3361
- defineJQueryPlugin(NAME$5, Offcanvas);
3426
+ defineJQueryPlugin(Offcanvas);
3362
3427
 
3363
3428
  /**
3364
3429
  * --------------------------------------------------------------------------
3365
- * Bootstrap (v5.0.0): util/sanitizer.js
3430
+ * Bootstrap (v5.1.1): util/sanitizer.js
3366
3431
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3367
3432
  * --------------------------------------------------------------------------
3368
3433
  */
@@ -3457,7 +3522,7 @@
3457
3522
  const elName = el.nodeName.toLowerCase();
3458
3523
 
3459
3524
  if (!allowlistKeys.includes(elName)) {
3460
- el.parentNode.removeChild(el);
3525
+ el.remove();
3461
3526
  continue;
3462
3527
  }
3463
3528
 
@@ -3475,7 +3540,7 @@
3475
3540
 
3476
3541
  /**
3477
3542
  * --------------------------------------------------------------------------
3478
- * Bootstrap (v5.0.0): tooltip.js
3543
+ * Bootstrap (v5.1.1): tooltip.js
3479
3544
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3480
3545
  * --------------------------------------------------------------------------
3481
3546
  */
@@ -3489,7 +3554,6 @@
3489
3554
  const DATA_KEY$4 = 'bs.tooltip';
3490
3555
  const EVENT_KEY$4 = `.${DATA_KEY$4}`;
3491
3556
  const CLASS_PREFIX$1 = 'bs-tooltip';
3492
- const BSCLS_PREFIX_REGEX$1 = new RegExp(`(^|\\s)${CLASS_PREFIX$1}\\S+`, 'g');
3493
3557
  const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
3494
3558
  const DefaultType$3 = {
3495
3559
  animation: 'boolean',
@@ -3548,12 +3612,14 @@
3548
3612
  MOUSEENTER: `mouseenter${EVENT_KEY$4}`,
3549
3613
  MOUSELEAVE: `mouseleave${EVENT_KEY$4}`
3550
3614
  };
3551
- const CLASS_NAME_FADE$3 = 'fade';
3615
+ const CLASS_NAME_FADE$2 = 'fade';
3552
3616
  const CLASS_NAME_MODAL = 'modal';
3553
- const CLASS_NAME_SHOW$3 = 'show';
3617
+ const CLASS_NAME_SHOW$2 = 'show';
3554
3618
  const HOVER_STATE_SHOW = 'show';
3555
3619
  const HOVER_STATE_OUT = 'out';
3556
3620
  const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
3621
+ const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;
3622
+ const EVENT_MODAL_HIDE = 'hide.bs.modal';
3557
3623
  const TRIGGER_HOVER = 'hover';
3558
3624
  const TRIGGER_FOCUS = 'focus';
3559
3625
  const TRIGGER_CLICK = 'click';
@@ -3578,7 +3644,7 @@
3578
3644
  this._activeTrigger = {};
3579
3645
  this._popper = null; // Protected
3580
3646
 
3581
- this.config = this._getConfig(config);
3647
+ this._config = this._getConfig(config);
3582
3648
  this.tip = null;
3583
3649
 
3584
3650
  this._setListeners();
@@ -3593,18 +3659,10 @@
3593
3659
  return NAME$4;
3594
3660
  }
3595
3661
 
3596
- static get DATA_KEY() {
3597
- return DATA_KEY$4;
3598
- }
3599
-
3600
3662
  static get Event() {
3601
3663
  return Event$2;
3602
3664
  }
3603
3665
 
3604
- static get EVENT_KEY() {
3605
- return EVENT_KEY$4;
3606
- }
3607
-
3608
3666
  static get DefaultType() {
3609
3667
  return DefaultType$3;
3610
3668
  } // Public
@@ -3638,7 +3696,7 @@
3638
3696
  context._leave(null, context);
3639
3697
  }
3640
3698
  } else {
3641
- if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$3)) {
3699
+ if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$2)) {
3642
3700
  this._leave(null, this);
3643
3701
 
3644
3702
  return;
@@ -3650,24 +3708,14 @@
3650
3708
 
3651
3709
  dispose() {
3652
3710
  clearTimeout(this._timeout);
3653
- EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
3711
+ EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
3654
3712
 
3655
- if (this.tip && this.tip.parentNode) {
3656
- this.tip.parentNode.removeChild(this.tip);
3713
+ if (this.tip) {
3714
+ this.tip.remove();
3657
3715
  }
3658
3716
 
3659
- this._isEnabled = null;
3660
- this._timeout = null;
3661
- this._hoverState = null;
3662
- this._activeTrigger = null;
3663
-
3664
- if (this._popper) {
3665
- this._popper.destroy();
3666
- }
3717
+ this._disposePopper();
3667
3718
 
3668
- this._popper = null;
3669
- this.config = null;
3670
- this.tip = null;
3671
3719
  super.dispose();
3672
3720
  }
3673
3721
 
@@ -3686,6 +3734,15 @@
3686
3734
 
3687
3735
  if (showEvent.defaultPrevented || !isInTheDom) {
3688
3736
  return;
3737
+ } // A trick to recreate a tooltip in case a new title is given by using the NOT documented `data-bs-original-title`
3738
+ // This will be removed later in favor of a `setContent` method
3739
+
3740
+
3741
+ if (this.constructor.NAME === 'tooltip' && this.tip && this.getTitle() !== this.tip.querySelector(SELECTOR_TOOLTIP_INNER).innerHTML) {
3742
+ this._disposePopper();
3743
+
3744
+ this.tip.remove();
3745
+ this.tip = null;
3689
3746
  }
3690
3747
 
3691
3748
  const tip = this.getTipElement();
@@ -3694,24 +3751,23 @@
3694
3751
 
3695
3752
  this._element.setAttribute('aria-describedby', tipId);
3696
3753
 
3697
- this.setContent();
3698
-
3699
- if (this.config.animation) {
3700
- tip.classList.add(CLASS_NAME_FADE$3);
3754
+ if (this._config.animation) {
3755
+ tip.classList.add(CLASS_NAME_FADE$2);
3701
3756
  }
3702
3757
 
3703
- const placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this._element) : this.config.placement;
3758
+ const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
3704
3759
 
3705
3760
  const attachment = this._getAttachment(placement);
3706
3761
 
3707
3762
  this._addAttachmentClass(attachment);
3708
3763
 
3709
- const container = this._getContainer();
3710
-
3764
+ const {
3765
+ container
3766
+ } = this._config;
3711
3767
  Data.set(tip, this.constructor.DATA_KEY, this);
3712
3768
 
3713
3769
  if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
3714
- container.appendChild(tip);
3770
+ container.append(tip);
3715
3771
  EventHandler.trigger(this._element, this.constructor.Event.INSERTED);
3716
3772
  }
3717
3773
 
@@ -3721,8 +3777,9 @@
3721
3777
  this._popper = Popper__namespace.createPopper(this._element, tip, this._getPopperConfig(attachment));
3722
3778
  }
3723
3779
 
3724
- tip.classList.add(CLASS_NAME_SHOW$3);
3725
- const customClass = typeof this.config.customClass === 'function' ? this.config.customClass() : this.config.customClass;
3780
+ tip.classList.add(CLASS_NAME_SHOW$2);
3781
+
3782
+ const customClass = this._resolvePossibleFunction(this._config.customClass);
3726
3783
 
3727
3784
  if (customClass) {
3728
3785
  tip.classList.add(...customClass.split(' '));
@@ -3748,13 +3805,9 @@
3748
3805
  }
3749
3806
  };
3750
3807
 
3751
- if (this.tip.classList.contains(CLASS_NAME_FADE$3)) {
3752
- const transitionDuration = getTransitionDurationFromElement(this.tip);
3753
- EventHandler.one(this.tip, 'transitionend', complete);
3754
- emulateTransitionEnd(this.tip, transitionDuration);
3755
- } else {
3756
- complete();
3757
- }
3808
+ const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);
3809
+
3810
+ this._queueCallback(complete, this.tip, isAnimated);
3758
3811
  }
3759
3812
 
3760
3813
  hide() {
@@ -3769,8 +3822,8 @@
3769
3822
  return;
3770
3823
  }
3771
3824
 
3772
- if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
3773
- tip.parentNode.removeChild(tip);
3825
+ if (this._hoverState !== HOVER_STATE_SHOW) {
3826
+ tip.remove();
3774
3827
  }
3775
3828
 
3776
3829
  this._cleanTipClass();
@@ -3779,11 +3832,7 @@
3779
3832
 
3780
3833
  EventHandler.trigger(this._element, this.constructor.Event.HIDDEN);
3781
3834
 
3782
- if (this._popper) {
3783
- this._popper.destroy();
3784
-
3785
- this._popper = null;
3786
- }
3835
+ this._disposePopper();
3787
3836
  };
3788
3837
 
3789
3838
  const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE);
@@ -3792,7 +3841,7 @@
3792
3841
  return;
3793
3842
  }
3794
3843
 
3795
- tip.classList.remove(CLASS_NAME_SHOW$3); // If this is a touch-enabled device we remove the extra
3844
+ tip.classList.remove(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we remove the extra
3796
3845
  // empty mouseover listeners we added for iOS support
3797
3846
 
3798
3847
  if ('ontouchstart' in document.documentElement) {
@@ -3802,14 +3851,9 @@
3802
3851
  this._activeTrigger[TRIGGER_CLICK] = false;
3803
3852
  this._activeTrigger[TRIGGER_FOCUS] = false;
3804
3853
  this._activeTrigger[TRIGGER_HOVER] = false;
3854
+ const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);
3805
3855
 
3806
- if (this.tip.classList.contains(CLASS_NAME_FADE$3)) {
3807
- const transitionDuration = getTransitionDurationFromElement(tip);
3808
- EventHandler.one(tip, 'transitionend', complete);
3809
- emulateTransitionEnd(tip, transitionDuration);
3810
- } else {
3811
- complete();
3812
- }
3856
+ this._queueCallback(complete, this.tip, isAnimated);
3813
3857
 
3814
3858
  this._hoverState = '';
3815
3859
  }
@@ -3831,15 +3875,28 @@
3831
3875
  }
3832
3876
 
3833
3877
  const element = document.createElement('div');
3834
- element.innerHTML = this.config.template;
3835
- this.tip = element.children[0];
3878
+ element.innerHTML = this._config.template;
3879
+ const tip = element.children[0];
3880
+ this.setContent(tip);
3881
+ tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
3882
+ this.tip = tip;
3836
3883
  return this.tip;
3837
3884
  }
3838
3885
 
3839
- setContent() {
3840
- const tip = this.getTipElement();
3841
- this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
3842
- tip.classList.remove(CLASS_NAME_FADE$3, CLASS_NAME_SHOW$3);
3886
+ setContent(tip) {
3887
+ this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TOOLTIP_INNER);
3888
+ }
3889
+
3890
+ _sanitizeAndSetContent(template, content, selector) {
3891
+ const templateElement = SelectorEngine.findOne(selector, template);
3892
+
3893
+ if (!content && templateElement) {
3894
+ templateElement.remove();
3895
+ return;
3896
+ } // we use append for html objects to maintain js events
3897
+
3898
+
3899
+ this.setElementContent(templateElement, content);
3843
3900
  }
3844
3901
 
3845
3902
  setElementContent(element, content) {
@@ -3847,16 +3904,13 @@
3847
3904
  return;
3848
3905
  }
3849
3906
 
3850
- if (typeof content === 'object' && isElement(content)) {
3851
- if (content.jquery) {
3852
- content = content[0];
3853
- } // content is a DOM node or a jQuery
3854
-
3907
+ if (isElement(content)) {
3908
+ content = getElement(content); // content is a DOM node or a jQuery
3855
3909
 
3856
- if (this.config.html) {
3910
+ if (this._config.html) {
3857
3911
  if (content.parentNode !== element) {
3858
3912
  element.innerHTML = '';
3859
- element.appendChild(content);
3913
+ element.append(content);
3860
3914
  }
3861
3915
  } else {
3862
3916
  element.textContent = content.textContent;
@@ -3865,9 +3919,9 @@
3865
3919
  return;
3866
3920
  }
3867
3921
 
3868
- if (this.config.html) {
3869
- if (this.config.sanitize) {
3870
- content = sanitizeHtml(content, this.config.allowList, this.config.sanitizeFn);
3922
+ if (this._config.html) {
3923
+ if (this._config.sanitize) {
3924
+ content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn);
3871
3925
  }
3872
3926
 
3873
3927
  element.innerHTML = content;
@@ -3877,13 +3931,9 @@
3877
3931
  }
3878
3932
 
3879
3933
  getTitle() {
3880
- let title = this._element.getAttribute('data-bs-original-title');
3881
-
3882
- if (!title) {
3883
- title = typeof this.config.title === 'function' ? this.config.title.call(this._element) : this.config.title;
3884
- }
3934
+ const title = this._element.getAttribute('data-bs-original-title') || this._config.title;
3885
3935
 
3886
- return title;
3936
+ return this._resolvePossibleFunction(title);
3887
3937
  }
3888
3938
 
3889
3939
  updateAttachment(attachment) {
@@ -3900,21 +3950,13 @@
3900
3950
 
3901
3951
 
3902
3952
  _initializeOnDelegatedTarget(event, context) {
3903
- const dataKey = this.constructor.DATA_KEY;
3904
- context = context || Data.get(event.delegateTarget, dataKey);
3905
-
3906
- if (!context) {
3907
- context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
3908
- Data.set(event.delegateTarget, dataKey, context);
3909
- }
3910
-
3911
- return context;
3953
+ return context || this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());
3912
3954
  }
3913
3955
 
3914
3956
  _getOffset() {
3915
3957
  const {
3916
3958
  offset
3917
- } = this.config;
3959
+ } = this._config;
3918
3960
 
3919
3961
  if (typeof offset === 'string') {
3920
3962
  return offset.split(',').map(val => Number.parseInt(val, 10));
@@ -3927,13 +3969,17 @@
3927
3969
  return offset;
3928
3970
  }
3929
3971
 
3972
+ _resolvePossibleFunction(content) {
3973
+ return typeof content === 'function' ? content.call(this._element) : content;
3974
+ }
3975
+
3930
3976
  _getPopperConfig(attachment) {
3931
3977
  const defaultBsPopperConfig = {
3932
3978
  placement: attachment,
3933
3979
  modifiers: [{
3934
3980
  name: 'flip',
3935
3981
  options: {
3936
- fallbackPlacements: this.config.fallbackPlacements
3982
+ fallbackPlacements: this._config.fallbackPlacements
3937
3983
  }
3938
3984
  }, {
3939
3985
  name: 'offset',
@@ -3943,7 +3989,7 @@
3943
3989
  }, {
3944
3990
  name: 'preventOverflow',
3945
3991
  options: {
3946
- boundary: this.config.boundary
3992
+ boundary: this._config.boundary
3947
3993
  }
3948
3994
  }, {
3949
3995
  name: 'arrow',
@@ -3963,24 +4009,12 @@
3963
4009
  }
3964
4010
  };
3965
4011
  return { ...defaultBsPopperConfig,
3966
- ...(typeof this.config.popperConfig === 'function' ? this.config.popperConfig(defaultBsPopperConfig) : this.config.popperConfig)
4012
+ ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
3967
4013
  };
3968
4014
  }
3969
4015
 
3970
4016
  _addAttachmentClass(attachment) {
3971
- this.getTipElement().classList.add(`${CLASS_PREFIX$1}-${this.updateAttachment(attachment)}`);
3972
- }
3973
-
3974
- _getContainer() {
3975
- if (this.config.container === false) {
3976
- return document.body;
3977
- }
3978
-
3979
- if (isElement(this.config.container)) {
3980
- return this.config.container;
3981
- }
3982
-
3983
- return SelectorEngine.findOne(this.config.container);
4017
+ this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(attachment)}`);
3984
4018
  }
3985
4019
 
3986
4020
  _getAttachment(placement) {
@@ -3988,15 +4022,16 @@
3988
4022
  }
3989
4023
 
3990
4024
  _setListeners() {
3991
- const triggers = this.config.trigger.split(' ');
4025
+ const triggers = this._config.trigger.split(' ');
4026
+
3992
4027
  triggers.forEach(trigger => {
3993
4028
  if (trigger === 'click') {
3994
- EventHandler.on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event));
4029
+ EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event));
3995
4030
  } else if (trigger !== TRIGGER_MANUAL) {
3996
4031
  const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;
3997
4032
  const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;
3998
- EventHandler.on(this._element, eventIn, this.config.selector, event => this._enter(event));
3999
- EventHandler.on(this._element, eventOut, this.config.selector, event => this._leave(event));
4033
+ EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event));
4034
+ EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event));
4000
4035
  }
4001
4036
  });
4002
4037
 
@@ -4006,10 +4041,10 @@
4006
4041
  }
4007
4042
  };
4008
4043
 
4009
- EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
4044
+ EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
4010
4045
 
4011
- if (this.config.selector) {
4012
- this.config = { ...this.config,
4046
+ if (this._config.selector) {
4047
+ this._config = { ...this._config,
4013
4048
  trigger: 'manual',
4014
4049
  selector: ''
4015
4050
  };
@@ -4041,7 +4076,7 @@
4041
4076
  context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
4042
4077
  }
4043
4078
 
4044
- if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) {
4079
+ if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$2) || context._hoverState === HOVER_STATE_SHOW) {
4045
4080
  context._hoverState = HOVER_STATE_SHOW;
4046
4081
  return;
4047
4082
  }
@@ -4049,7 +4084,7 @@
4049
4084
  clearTimeout(context._timeout);
4050
4085
  context._hoverState = HOVER_STATE_SHOW;
4051
4086
 
4052
- if (!context.config.delay || !context.config.delay.show) {
4087
+ if (!context._config.delay || !context._config.delay.show) {
4053
4088
  context.show();
4054
4089
  return;
4055
4090
  }
@@ -4058,7 +4093,7 @@
4058
4093
  if (context._hoverState === HOVER_STATE_SHOW) {
4059
4094
  context.show();
4060
4095
  }
4061
- }, context.config.delay.show);
4096
+ }, context._config.delay.show);
4062
4097
  }
4063
4098
 
4064
4099
  _leave(event, context) {
@@ -4075,7 +4110,7 @@
4075
4110
  clearTimeout(context._timeout);
4076
4111
  context._hoverState = HOVER_STATE_OUT;
4077
4112
 
4078
- if (!context.config.delay || !context.config.delay.hide) {
4113
+ if (!context._config.delay || !context._config.delay.hide) {
4079
4114
  context.hide();
4080
4115
  return;
4081
4116
  }
@@ -4084,7 +4119,7 @@
4084
4119
  if (context._hoverState === HOVER_STATE_OUT) {
4085
4120
  context.hide();
4086
4121
  }
4087
- }, context.config.delay.hide);
4122
+ }, context._config.delay.hide);
4088
4123
  }
4089
4124
 
4090
4125
  _isWithActiveTrigger() {
@@ -4104,15 +4139,11 @@
4104
4139
  delete dataAttributes[dataAttr];
4105
4140
  }
4106
4141
  });
4107
-
4108
- if (config && typeof config.container === 'object' && config.container.jquery) {
4109
- config.container = config.container[0];
4110
- }
4111
-
4112
4142
  config = { ...this.constructor.Default,
4113
4143
  ...dataAttributes,
4114
4144
  ...(typeof config === 'object' && config ? config : {})
4115
4145
  };
4146
+ config.container = config.container === false ? document.body : getElement(config.container);
4116
4147
 
4117
4148
  if (typeof config.delay === 'number') {
4118
4149
  config.delay = {
@@ -4141,26 +4172,32 @@
4141
4172
  _getDelegateConfig() {
4142
4173
  const config = {};
4143
4174
 
4144
- if (this.config) {
4145
- for (const key in this.config) {
4146
- if (this.constructor.Default[key] !== this.config[key]) {
4147
- config[key] = this.config[key];
4148
- }
4175
+ for (const key in this._config) {
4176
+ if (this.constructor.Default[key] !== this._config[key]) {
4177
+ config[key] = this._config[key];
4149
4178
  }
4150
- }
4179
+ } // In the future can be replaced with:
4180
+ // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
4181
+ // `Object.fromEntries(keysWithDifferentValues)`
4182
+
4151
4183
 
4152
4184
  return config;
4153
4185
  }
4154
4186
 
4155
4187
  _cleanTipClass() {
4156
4188
  const tip = this.getTipElement();
4157
- const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1);
4189
+ const basicClassPrefixRegex = new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`, 'g');
4190
+ const tabClass = tip.getAttribute('class').match(basicClassPrefixRegex);
4158
4191
 
4159
4192
  if (tabClass !== null && tabClass.length > 0) {
4160
4193
  tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
4161
4194
  }
4162
4195
  }
4163
4196
 
4197
+ _getBasicClassPrefix() {
4198
+ return CLASS_PREFIX$1;
4199
+ }
4200
+
4164
4201
  _handlePopperPlacementChange(popperData) {
4165
4202
  const {
4166
4203
  state
@@ -4175,22 +4212,20 @@
4175
4212
  this._cleanTipClass();
4176
4213
 
4177
4214
  this._addAttachmentClass(this._getAttachment(state.placement));
4215
+ }
4216
+
4217
+ _disposePopper() {
4218
+ if (this._popper) {
4219
+ this._popper.destroy();
4220
+
4221
+ this._popper = null;
4222
+ }
4178
4223
  } // Static
4179
4224
 
4180
4225
 
4181
4226
  static jQueryInterface(config) {
4182
4227
  return this.each(function () {
4183
- let data = Data.get(this, DATA_KEY$4);
4184
-
4185
- const _config = typeof config === 'object' && config;
4186
-
4187
- if (!data && /dispose|hide/.test(config)) {
4188
- return;
4189
- }
4190
-
4191
- if (!data) {
4192
- data = new Tooltip(this, _config);
4193
- }
4228
+ const data = Tooltip.getOrCreateInstance(this, config);
4194
4229
 
4195
4230
  if (typeof config === 'string') {
4196
4231
  if (typeof data[config] === 'undefined') {
@@ -4211,11 +4246,11 @@
4211
4246
  */
4212
4247
 
4213
4248
 
4214
- defineJQueryPlugin(NAME$4, Tooltip);
4249
+ defineJQueryPlugin(Tooltip);
4215
4250
 
4216
4251
  /**
4217
4252
  * --------------------------------------------------------------------------
4218
- * Bootstrap (v5.0.0): popover.js
4253
+ * Bootstrap (v5.1.1): popover.js
4219
4254
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4220
4255
  * --------------------------------------------------------------------------
4221
4256
  */
@@ -4229,7 +4264,6 @@
4229
4264
  const DATA_KEY$3 = 'bs.popover';
4230
4265
  const EVENT_KEY$3 = `.${DATA_KEY$3}`;
4231
4266
  const CLASS_PREFIX = 'bs-popover';
4232
- const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
4233
4267
  const Default$2 = { ...Tooltip.Default,
4234
4268
  placement: 'right',
4235
4269
  offset: [0, 8],
@@ -4252,8 +4286,6 @@
4252
4286
  MOUSEENTER: `mouseenter${EVENT_KEY$3}`,
4253
4287
  MOUSELEAVE: `mouseleave${EVENT_KEY$3}`
4254
4288
  };
4255
- const CLASS_NAME_FADE$2 = 'fade';
4256
- const CLASS_NAME_SHOW$2 = 'show';
4257
4289
  const SELECTOR_TITLE = '.popover-header';
4258
4290
  const SELECTOR_CONTENT = '.popover-body';
4259
4291
  /**
@@ -4272,18 +4304,10 @@
4272
4304
  return NAME$3;
4273
4305
  }
4274
4306
 
4275
- static get DATA_KEY() {
4276
- return DATA_KEY$3;
4277
- }
4278
-
4279
4307
  static get Event() {
4280
4308
  return Event$1;
4281
4309
  }
4282
4310
 
4283
- static get EVENT_KEY() {
4284
- return EVENT_KEY$3;
4285
- }
4286
-
4287
4311
  static get DefaultType() {
4288
4312
  return DefaultType$2;
4289
4313
  } // Overrides
@@ -4293,54 +4317,25 @@
4293
4317
  return this.getTitle() || this._getContent();
4294
4318
  }
4295
4319
 
4296
- setContent() {
4297
- const tip = this.getTipElement(); // we use append for html objects to maintain js events
4298
-
4299
- this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());
4300
-
4301
- let content = this._getContent();
4302
-
4303
- if (typeof content === 'function') {
4304
- content = content.call(this._element);
4305
- }
4320
+ setContent(tip) {
4321
+ this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TITLE);
4306
4322
 
4307
- this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
4308
- tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
4323
+ this._sanitizeAndSetContent(tip, this._getContent(), SELECTOR_CONTENT);
4309
4324
  } // Private
4310
4325
 
4311
4326
 
4312
- _addAttachmentClass(attachment) {
4313
- this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
4314
- }
4315
-
4316
4327
  _getContent() {
4317
- return this._element.getAttribute('data-bs-content') || this.config.content;
4328
+ return this._resolvePossibleFunction(this._config.content);
4318
4329
  }
4319
4330
 
4320
- _cleanTipClass() {
4321
- const tip = this.getTipElement();
4322
- const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
4323
-
4324
- if (tabClass !== null && tabClass.length > 0) {
4325
- tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
4326
- }
4331
+ _getBasicClassPrefix() {
4332
+ return CLASS_PREFIX;
4327
4333
  } // Static
4328
4334
 
4329
4335
 
4330
4336
  static jQueryInterface(config) {
4331
4337
  return this.each(function () {
4332
- let data = Data.get(this, DATA_KEY$3);
4333
-
4334
- const _config = typeof config === 'object' ? config : null;
4335
-
4336
- if (!data && /dispose|hide/.test(config)) {
4337
- return;
4338
- }
4339
-
4340
- if (!data) {
4341
- data = new Popover(this, _config);
4342
- Data.set(this, DATA_KEY$3, data);
4343
- }
4338
+ const data = Popover.getOrCreateInstance(this, config);
4344
4339
 
4345
4340
  if (typeof config === 'string') {
4346
4341
  if (typeof data[config] === 'undefined') {
@@ -4361,11 +4356,11 @@
4361
4356
  */
4362
4357
 
4363
4358
 
4364
- defineJQueryPlugin(NAME$3, Popover);
4359
+ defineJQueryPlugin(Popover);
4365
4360
 
4366
4361
  /**
4367
4362
  * --------------------------------------------------------------------------
4368
- * Bootstrap (v5.0.0): scrollspy.js
4363
+ * Bootstrap (v5.1.1): scrollspy.js
4369
4364
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4370
4365
  * --------------------------------------------------------------------------
4371
4366
  */
@@ -4399,6 +4394,7 @@
4399
4394
  const SELECTOR_NAV_LINKS = '.nav-link';
4400
4395
  const SELECTOR_NAV_ITEMS = '.nav-item';
4401
4396
  const SELECTOR_LIST_ITEMS = '.list-group-item';
4397
+ const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}, .${CLASS_NAME_DROPDOWN_ITEM}`;
4402
4398
  const SELECTOR_DROPDOWN$1 = '.dropdown';
4403
4399
  const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
4404
4400
  const METHOD_OFFSET = 'offset';
@@ -4414,7 +4410,6 @@
4414
4410
  super(element);
4415
4411
  this._scrollElement = this._element.tagName === 'BODY' ? window : this._element;
4416
4412
  this._config = this._getConfig(config);
4417
- this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`;
4418
4413
  this._offsets = [];
4419
4414
  this._targets = [];
4420
4415
  this._activeTarget = null;
@@ -4430,8 +4425,8 @@
4430
4425
  return Default$1;
4431
4426
  }
4432
4427
 
4433
- static get DATA_KEY() {
4434
- return DATA_KEY$2;
4428
+ static get NAME() {
4429
+ return NAME$2;
4435
4430
  } // Public
4436
4431
 
4437
4432
 
@@ -4442,7 +4437,7 @@
4442
4437
  this._offsets = [];
4443
4438
  this._targets = [];
4444
4439
  this._scrollHeight = this._getScrollHeight();
4445
- const targets = SelectorEngine.find(this._selector);
4440
+ const targets = SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target);
4446
4441
  targets.map(element => {
4447
4442
  const targetSelector = getSelectorFromElement(element);
4448
4443
  const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null;
@@ -4464,15 +4459,8 @@
4464
4459
  }
4465
4460
 
4466
4461
  dispose() {
4467
- super.dispose();
4468
4462
  EventHandler.off(this._scrollElement, EVENT_KEY$2);
4469
- this._scrollElement = null;
4470
- this._config = null;
4471
- this._selector = null;
4472
- this._offsets = null;
4473
- this._targets = null;
4474
- this._activeTarget = null;
4475
- this._scrollHeight = null;
4463
+ super.dispose();
4476
4464
  } // Private
4477
4465
 
4478
4466
 
@@ -4481,20 +4469,7 @@
4481
4469
  ...Manipulator.getDataAttributes(this._element),
4482
4470
  ...(typeof config === 'object' && config ? config : {})
4483
4471
  };
4484
-
4485
- if (typeof config.target !== 'string' && isElement(config.target)) {
4486
- let {
4487
- id
4488
- } = config.target;
4489
-
4490
- if (!id) {
4491
- id = getUID(NAME$2);
4492
- config.target.id = id;
4493
- }
4494
-
4495
- config.target = `#${id}`;
4496
- }
4497
-
4472
+ config.target = getElement(config.target) || document.documentElement;
4498
4473
  typeCheckConfig(NAME$2, config, DefaultType$1);
4499
4474
  return config;
4500
4475
  }
@@ -4554,16 +4529,13 @@
4554
4529
 
4555
4530
  this._clear();
4556
4531
 
4557
- const queries = this._selector.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`);
4558
-
4559
- const link = SelectorEngine.findOne(queries.join(','));
4532
+ const queries = SELECTOR_LINK_ITEMS.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`);
4533
+ const link = SelectorEngine.findOne(queries.join(','), this._config.target);
4534
+ link.classList.add(CLASS_NAME_ACTIVE$1);
4560
4535
 
4561
4536
  if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
4562
4537
  SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1);
4563
- link.classList.add(CLASS_NAME_ACTIVE$1);
4564
4538
  } else {
4565
- // Set triggered link as active
4566
- link.classList.add(CLASS_NAME_ACTIVE$1);
4567
4539
  SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup => {
4568
4540
  // Set triggered links parents as active
4569
4541
  // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
@@ -4581,13 +4553,13 @@
4581
4553
  }
4582
4554
 
4583
4555
  _clear() {
4584
- SelectorEngine.find(this._selector).filter(node => node.classList.contains(CLASS_NAME_ACTIVE$1)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE$1));
4556
+ SelectorEngine.find(SELECTOR_LINK_ITEMS, this._config.target).filter(node => node.classList.contains(CLASS_NAME_ACTIVE$1)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE$1));
4585
4557
  } // Static
4586
4558
 
4587
4559
 
4588
4560
  static jQueryInterface(config) {
4589
4561
  return this.each(function () {
4590
- const data = ScrollSpy.getInstance(this) || new ScrollSpy(this, typeof config === 'object' ? config : {});
4562
+ const data = ScrollSpy.getOrCreateInstance(this, config);
4591
4563
 
4592
4564
  if (typeof config !== 'string') {
4593
4565
  return;
@@ -4619,11 +4591,11 @@
4619
4591
  * add .ScrollSpy to jQuery only if jQuery is present
4620
4592
  */
4621
4593
 
4622
- defineJQueryPlugin(NAME$2, ScrollSpy);
4594
+ defineJQueryPlugin(ScrollSpy);
4623
4595
 
4624
4596
  /**
4625
4597
  * --------------------------------------------------------------------------
4626
- * Bootstrap (v5.0.0): tab.js
4598
+ * Bootstrap (v5.1.1): tab.js
4627
4599
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4628
4600
  * --------------------------------------------------------------------------
4629
4601
  */
@@ -4661,8 +4633,8 @@
4661
4633
 
4662
4634
  class Tab extends BaseComponent {
4663
4635
  // Getters
4664
- static get DATA_KEY() {
4665
- return DATA_KEY$1;
4636
+ static get NAME() {
4637
+ return NAME$1;
4666
4638
  } // Public
4667
4639
 
4668
4640
 
@@ -4720,10 +4692,9 @@
4720
4692
  const complete = () => this._transitionComplete(element, active, callback);
4721
4693
 
4722
4694
  if (active && isTransitioning) {
4723
- const transitionDuration = getTransitionDurationFromElement(active);
4724
4695
  active.classList.remove(CLASS_NAME_SHOW$1);
4725
- EventHandler.one(active, 'transitionend', complete);
4726
- emulateTransitionEnd(active, transitionDuration);
4696
+
4697
+ this._queueCallback(complete, element, true);
4727
4698
  } else {
4728
4699
  complete();
4729
4700
  }
@@ -4779,7 +4750,7 @@
4779
4750
 
4780
4751
  static jQueryInterface(config) {
4781
4752
  return this.each(function () {
4782
- const data = Data.get(this, DATA_KEY$1) || new Tab(this);
4753
+ const data = Tab.getOrCreateInstance(this);
4783
4754
 
4784
4755
  if (typeof config === 'string') {
4785
4756
  if (typeof data[config] === 'undefined') {
@@ -4808,7 +4779,7 @@
4808
4779
  return;
4809
4780
  }
4810
4781
 
4811
- const data = Data.get(this, DATA_KEY$1) || new Tab(this);
4782
+ const data = Tab.getOrCreateInstance(this);
4812
4783
  data.show();
4813
4784
  });
4814
4785
  /**
@@ -4818,11 +4789,11 @@
4818
4789
  * add .Tab to jQuery only if jQuery is present
4819
4790
  */
4820
4791
 
4821
- defineJQueryPlugin(NAME$1, Tab);
4792
+ defineJQueryPlugin(Tab);
4822
4793
 
4823
4794
  /**
4824
4795
  * --------------------------------------------------------------------------
4825
- * Bootstrap (v5.0.0): toast.js
4796
+ * Bootstrap (v5.1.1): toast.js
4826
4797
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4827
4798
  * --------------------------------------------------------------------------
4828
4799
  */
@@ -4835,13 +4806,17 @@
4835
4806
  const NAME = 'toast';
4836
4807
  const DATA_KEY = 'bs.toast';
4837
4808
  const EVENT_KEY = `.${DATA_KEY}`;
4838
- const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
4809
+ const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
4810
+ const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
4811
+ const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
4812
+ const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;
4839
4813
  const EVENT_HIDE = `hide${EVENT_KEY}`;
4840
4814
  const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
4841
4815
  const EVENT_SHOW = `show${EVENT_KEY}`;
4842
4816
  const EVENT_SHOWN = `shown${EVENT_KEY}`;
4843
4817
  const CLASS_NAME_FADE = 'fade';
4844
- const CLASS_NAME_HIDE = 'hide';
4818
+ const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility
4819
+
4845
4820
  const CLASS_NAME_SHOW = 'show';
4846
4821
  const CLASS_NAME_SHOWING = 'showing';
4847
4822
  const DefaultType = {
@@ -4854,7 +4829,6 @@
4854
4829
  autohide: true,
4855
4830
  delay: 5000
4856
4831
  };
4857
- const SELECTOR_DATA_DISMISS = '[data-bs-dismiss="toast"]';
4858
4832
  /**
4859
4833
  * ------------------------------------------------------------------------
4860
4834
  * Class Definition
@@ -4866,6 +4840,8 @@
4866
4840
  super(element);
4867
4841
  this._config = this._getConfig(config);
4868
4842
  this._timeout = null;
4843
+ this._hasMouseInteraction = false;
4844
+ this._hasKeyboardInteraction = false;
4869
4845
 
4870
4846
  this._setListeners();
4871
4847
  } // Getters
@@ -4879,8 +4855,8 @@
4879
4855
  return Default;
4880
4856
  }
4881
4857
 
4882
- static get DATA_KEY() {
4883
- return DATA_KEY;
4858
+ static get NAME() {
4859
+ return NAME;
4884
4860
  } // Public
4885
4861
 
4886
4862
 
@@ -4900,30 +4876,21 @@
4900
4876
  const complete = () => {
4901
4877
  this._element.classList.remove(CLASS_NAME_SHOWING);
4902
4878
 
4903
- this._element.classList.add(CLASS_NAME_SHOW);
4904
-
4905
4879
  EventHandler.trigger(this._element, EVENT_SHOWN);
4906
4880
 
4907
- if (this._config.autohide) {
4908
- this._timeout = setTimeout(() => {
4909
- this.hide();
4910
- }, this._config.delay);
4911
- }
4881
+ this._maybeScheduleHide();
4912
4882
  };
4913
4883
 
4914
- this._element.classList.remove(CLASS_NAME_HIDE);
4884
+ this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated
4885
+
4915
4886
 
4916
4887
  reflow(this._element);
4917
4888
 
4889
+ this._element.classList.add(CLASS_NAME_SHOW);
4890
+
4918
4891
  this._element.classList.add(CLASS_NAME_SHOWING);
4919
4892
 
4920
- if (this._config.animation) {
4921
- const transitionDuration = getTransitionDurationFromElement(this._element);
4922
- EventHandler.one(this._element, 'transitionend', complete);
4923
- emulateTransitionEnd(this._element, transitionDuration);
4924
- } else {
4925
- complete();
4926
- }
4893
+ this._queueCallback(complete, this._element, this._config.animation);
4927
4894
  }
4928
4895
 
4929
4896
  hide() {
@@ -4938,20 +4905,19 @@
4938
4905
  }
4939
4906
 
4940
4907
  const complete = () => {
4941
- this._element.classList.add(CLASS_NAME_HIDE);
4908
+ this._element.classList.add(CLASS_NAME_HIDE); // @deprecated
4909
+
4910
+
4911
+ this._element.classList.remove(CLASS_NAME_SHOWING);
4912
+
4913
+ this._element.classList.remove(CLASS_NAME_SHOW);
4942
4914
 
4943
4915
  EventHandler.trigger(this._element, EVENT_HIDDEN);
4944
4916
  };
4945
4917
 
4946
- this._element.classList.remove(CLASS_NAME_SHOW);
4918
+ this._element.classList.add(CLASS_NAME_SHOWING);
4947
4919
 
4948
- if (this._config.animation) {
4949
- const transitionDuration = getTransitionDurationFromElement(this._element);
4950
- EventHandler.one(this._element, 'transitionend', complete);
4951
- emulateTransitionEnd(this._element, transitionDuration);
4952
- } else {
4953
- complete();
4954
- }
4920
+ this._queueCallback(complete, this._element, this._config.animation);
4955
4921
  }
4956
4922
 
4957
4923
  dispose() {
@@ -4962,7 +4928,6 @@
4962
4928
  }
4963
4929
 
4964
4930
  super.dispose();
4965
- this._config = null;
4966
4931
  } // Private
4967
4932
 
4968
4933
 
@@ -4975,8 +4940,53 @@
4975
4940
  return config;
4976
4941
  }
4977
4942
 
4943
+ _maybeScheduleHide() {
4944
+ if (!this._config.autohide) {
4945
+ return;
4946
+ }
4947
+
4948
+ if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
4949
+ return;
4950
+ }
4951
+
4952
+ this._timeout = setTimeout(() => {
4953
+ this.hide();
4954
+ }, this._config.delay);
4955
+ }
4956
+
4957
+ _onInteraction(event, isInteracting) {
4958
+ switch (event.type) {
4959
+ case 'mouseover':
4960
+ case 'mouseout':
4961
+ this._hasMouseInteraction = isInteracting;
4962
+ break;
4963
+
4964
+ case 'focusin':
4965
+ case 'focusout':
4966
+ this._hasKeyboardInteraction = isInteracting;
4967
+ break;
4968
+ }
4969
+
4970
+ if (isInteracting) {
4971
+ this._clearTimeout();
4972
+
4973
+ return;
4974
+ }
4975
+
4976
+ const nextElement = event.relatedTarget;
4977
+
4978
+ if (this._element === nextElement || this._element.contains(nextElement)) {
4979
+ return;
4980
+ }
4981
+
4982
+ this._maybeScheduleHide();
4983
+ }
4984
+
4978
4985
  _setListeners() {
4979
- EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide());
4986
+ EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
4987
+ EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
4988
+ EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
4989
+ EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
4980
4990
  }
4981
4991
 
4982
4992
  _clearTimeout() {
@@ -4987,13 +4997,7 @@
4987
4997
 
4988
4998
  static jQueryInterface(config) {
4989
4999
  return this.each(function () {
4990
- let data = Data.get(this, DATA_KEY);
4991
-
4992
- const _config = typeof config === 'object' && config;
4993
-
4994
- if (!data) {
4995
- data = new Toast(this, _config);
4996
- }
5000
+ const data = Toast.getOrCreateInstance(this, config);
4997
5001
 
4998
5002
  if (typeof config === 'string') {
4999
5003
  if (typeof data[config] === 'undefined') {
@@ -5006,6 +5010,8 @@
5006
5010
  }
5007
5011
 
5008
5012
  }
5013
+
5014
+ enableDismissTrigger(Toast);
5009
5015
  /**
5010
5016
  * ------------------------------------------------------------------------
5011
5017
  * jQuery
@@ -5013,12 +5019,11 @@
5013
5019
  * add .Toast to jQuery only if jQuery is present
5014
5020
  */
5015
5021
 
5016
-
5017
- defineJQueryPlugin(NAME, Toast);
5022
+ defineJQueryPlugin(Toast);
5018
5023
 
5019
5024
  /**
5020
5025
  * --------------------------------------------------------------------------
5021
- * Bootstrap (v5.0.0): index.umd.js
5026
+ * Bootstrap (v5.1.1): index.umd.js
5022
5027
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5023
5028
  * --------------------------------------------------------------------------
5024
5029
  */