@openeuropa/bcl-theme-joinup 1.9.1 → 1.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,55 @@ import * as Popper from '@popperjs/core';
2
2
 
3
3
  /**
4
4
  * --------------------------------------------------------------------------
5
- * Bootstrap (v5.2.3): util/index.js
5
+ * Bootstrap dom/data.js
6
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
7
+ * --------------------------------------------------------------------------
8
+ */
9
+
10
+ /**
11
+ * Constants
12
+ */
13
+
14
+ const elementMap = new Map();
15
+ var Data = {
16
+ set(element, key, instance) {
17
+ if (!elementMap.has(element)) {
18
+ elementMap.set(element, new Map());
19
+ }
20
+ const instanceMap = elementMap.get(element);
21
+
22
+ // make it clear we only want one instance per element
23
+ // can be removed later when multiple key/instances are fine to be used
24
+ if (!instanceMap.has(key) && instanceMap.size !== 0) {
25
+ // eslint-disable-next-line no-console
26
+ console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
27
+ return;
28
+ }
29
+ instanceMap.set(key, instance);
30
+ },
31
+ get(element, key) {
32
+ if (elementMap.has(element)) {
33
+ return elementMap.get(element).get(key) || null;
34
+ }
35
+ return null;
36
+ },
37
+ remove(element, key) {
38
+ if (!elementMap.has(element)) {
39
+ return;
40
+ }
41
+ const instanceMap = elementMap.get(element);
42
+ instanceMap.delete(key);
43
+
44
+ // free up element references if there are no instances left for an element
45
+ if (instanceMap.size === 0) {
46
+ elementMap.delete(element);
47
+ }
48
+ }
49
+ };
50
+
51
+ /**
52
+ * --------------------------------------------------------------------------
53
+ * Bootstrap util/index.js
6
54
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
7
55
  * --------------------------------------------------------------------------
8
56
  */
@@ -11,6 +59,19 @@ const MAX_UID = 1_000_000;
11
59
  const MILLISECONDS_MULTIPLIER = 1000;
12
60
  const TRANSITION_END = 'transitionend';
13
61
 
62
+ /**
63
+ * Properly escape IDs selectors to handle weird IDs
64
+ * @param {string} selector
65
+ * @returns {string}
66
+ */
67
+ const parseSelector = selector => {
68
+ if (selector && window.CSS && window.CSS.escape) {
69
+ // document.querySelector needs escaping to handle IDs (html5+) containing for instance /
70
+ selector = selector.replace(/#([^\s"#']+)/g, (match, id) => `#${CSS.escape(id)}`);
71
+ }
72
+ return selector;
73
+ };
74
+
14
75
  // Shout-out Angus Croll (https://goo.gl/pxwQGp)
15
76
  const toType = object => {
16
77
  if (object === null || object === undefined) {
@@ -29,38 +90,6 @@ const getUID = prefix => {
29
90
  } while (document.getElementById(prefix));
30
91
  return prefix;
31
92
  };
32
- const getSelector = element => {
33
- let selector = element.getAttribute('data-bs-target');
34
- if (!selector || selector === '#') {
35
- let hrefAttribute = element.getAttribute('href');
36
-
37
- // The only valid content that could double as a selector are IDs or classes,
38
- // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
39
- // `document.querySelector` will rightfully complain it is invalid.
40
- // See https://github.com/twbs/bootstrap/issues/32273
41
- if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {
42
- return null;
43
- }
44
-
45
- // Just in case some CMS puts out a full URL with the anchor appended
46
- if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {
47
- hrefAttribute = `#${hrefAttribute.split('#')[1]}`;
48
- }
49
- selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;
50
- }
51
- return selector;
52
- };
53
- const getSelectorFromElement = element => {
54
- const selector = getSelector(element);
55
- if (selector) {
56
- return document.querySelector(selector) ? selector : null;
57
- }
58
- return null;
59
- };
60
- const getElementFromSelector = element => {
61
- const selector = getSelector(element);
62
- return selector ? document.querySelector(selector) : null;
63
- };
64
93
  const getTransitionDurationFromElement = element => {
65
94
  if (!element) {
66
95
  return 0;
@@ -87,7 +116,7 @@ const getTransitionDurationFromElement = element => {
87
116
  const triggerTransitionEnd = element => {
88
117
  element.dispatchEvent(new Event(TRANSITION_END));
89
118
  };
90
- const isElement = object => {
119
+ const isElement$1 = object => {
91
120
  if (!object || typeof object !== 'object') {
92
121
  return false;
93
122
  }
@@ -96,18 +125,18 @@ const isElement = object => {
96
125
  }
97
126
  return typeof object.nodeType !== 'undefined';
98
127
  };
99
- const getElement = object => {
128
+ const getElement$1 = object => {
100
129
  // it's a jQuery object or a node element
101
- if (isElement(object)) {
130
+ if (isElement$1(object)) {
102
131
  return object.jquery ? object[0] : object;
103
132
  }
104
133
  if (typeof object === 'string' && object.length > 0) {
105
- return document.querySelector(object);
134
+ return document.querySelector(parseSelector(object));
106
135
  }
107
136
  return null;
108
137
  };
109
138
  const isVisible = element => {
110
- if (!isElement(element) || element.getClientRects().length === 0) {
139
+ if (!isElement$1(element) || element.getClientRects().length === 0) {
111
140
  return false;
112
141
  }
113
142
  const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible';
@@ -172,32 +201,32 @@ const noop = () => {};
172
201
  const reflow = element => {
173
202
  element.offsetHeight; // eslint-disable-line no-unused-expressions
174
203
  };
175
- const getjQuery = () => {
204
+ const getjQuery$1 = () => {
176
205
  if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
177
206
  return window.jQuery;
178
207
  }
179
208
  return null;
180
209
  };
181
- const DOMContentLoadedCallbacks = [];
182
- const onDOMContentLoaded = callback => {
210
+ const DOMContentLoadedCallbacks$1 = [];
211
+ const onDOMContentLoaded$1 = callback => {
183
212
  if (document.readyState === 'loading') {
184
213
  // add listener on the first call when the document is in loading state
185
- if (!DOMContentLoadedCallbacks.length) {
214
+ if (!DOMContentLoadedCallbacks$1.length) {
186
215
  document.addEventListener('DOMContentLoaded', () => {
187
- for (const callback of DOMContentLoadedCallbacks) {
216
+ for (const callback of DOMContentLoadedCallbacks$1) {
188
217
  callback();
189
218
  }
190
219
  });
191
220
  }
192
- DOMContentLoadedCallbacks.push(callback);
221
+ DOMContentLoadedCallbacks$1.push(callback);
193
222
  } else {
194
223
  callback();
195
224
  }
196
225
  };
197
226
  const isRTL = () => document.documentElement.dir === 'rtl';
198
- const defineJQueryPlugin = plugin => {
199
- onDOMContentLoaded(() => {
200
- const $ = getjQuery();
227
+ const defineJQueryPlugin$1 = plugin => {
228
+ onDOMContentLoaded$1(() => {
229
+ const $ = getjQuery$1();
201
230
  /* istanbul ignore if */
202
231
  if ($) {
203
232
  const name = plugin.NAME;
@@ -211,10 +240,8 @@ const defineJQueryPlugin = plugin => {
211
240
  }
212
241
  });
213
242
  };
214
- const execute = callback => {
215
- if (typeof callback === 'function') {
216
- callback();
217
- }
243
+ const execute = (possibleCallback, args = [], defaultValue = possibleCallback) => {
244
+ return typeof possibleCallback === 'function' ? possibleCallback(...args) : defaultValue;
218
245
  };
219
246
  const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
220
247
  if (!waitForTransition) {
@@ -269,7 +296,7 @@ const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed
269
296
 
270
297
  /**
271
298
  * --------------------------------------------------------------------------
272
- * Bootstrap (v5.2.3): dom/event-handler.js
299
+ * Bootstrap dom/event-handler.js
273
300
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
274
301
  * --------------------------------------------------------------------------
275
302
  */
@@ -340,7 +367,7 @@ function findHandler(events, callable, delegationSelector = null) {
340
367
  }
341
368
  function normalizeParameters(originalTypeEvent, handler, delegationFunction) {
342
369
  const isDelegated = typeof handler === 'string';
343
- // todo: tooltip passes `false` instead of selector, so we need to check
370
+ // TODO: tooltip passes `false` instead of selector, so we need to check
344
371
  const callable = isDelegated ? delegationFunction : handler || delegationFunction;
345
372
  let typeEvent = getTypeEvent(originalTypeEvent);
346
373
  if (!nativeEvents.has(typeEvent)) {
@@ -392,9 +419,8 @@ function removeHandler(element, events, typeEvent, handler, delegationSelector)
392
419
  }
393
420
  function removeNamespacedHandlers(element, events, typeEvent, namespace) {
394
421
  const storeElementEvent = events[typeEvent] || {};
395
- for (const handlerKey of Object.keys(storeElementEvent)) {
422
+ for (const [handlerKey, event] of Object.entries(storeElementEvent)) {
396
423
  if (handlerKey.includes(namespace)) {
397
- const event = storeElementEvent[handlerKey];
398
424
  removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
399
425
  }
400
426
  }
@@ -433,10 +459,9 @@ const EventHandler = {
433
459
  removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
434
460
  }
435
461
  }
436
- for (const keyHandlers of Object.keys(storeElementEvent)) {
462
+ for (const [keyHandlers, event] of Object.entries(storeElementEvent)) {
437
463
  const handlerKey = keyHandlers.replace(stripUidRegex, '');
438
464
  if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
439
- const event = storeElementEvent[keyHandlers];
440
465
  removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
441
466
  }
442
467
  }
@@ -445,7 +470,7 @@ const EventHandler = {
445
470
  if (typeof event !== 'string' || !element) {
446
471
  return null;
447
472
  }
448
- const $ = getjQuery();
473
+ const $ = getjQuery$1();
449
474
  const typeEvent = getTypeEvent(event);
450
475
  const inNamespace = event !== typeEvent;
451
476
  let jQueryEvent = null;
@@ -459,11 +484,10 @@ const EventHandler = {
459
484
  nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
460
485
  defaultPrevented = jQueryEvent.isDefaultPrevented();
461
486
  }
462
- let evt = new Event(event, {
487
+ const evt = hydrateObj(new Event(event, {
463
488
  bubbles,
464
489
  cancelable: true
465
- });
466
- evt = hydrateObj(evt, args);
490
+ }), args);
467
491
  if (defaultPrevented) {
468
492
  evt.preventDefault();
469
493
  }
@@ -476,8 +500,8 @@ const EventHandler = {
476
500
  return evt;
477
501
  }
478
502
  };
479
- function hydrateObj(obj, meta) {
480
- for (const [key, value] of Object.entries(meta || {})) {
503
+ function hydrateObj(obj, meta = {}) {
504
+ for (const [key, value] of Object.entries(meta)) {
481
505
  try {
482
506
  obj[key] = value;
483
507
  } catch {
@@ -494,55 +518,7 @@ function hydrateObj(obj, meta) {
494
518
 
495
519
  /**
496
520
  * --------------------------------------------------------------------------
497
- * Bootstrap (v5.2.3): dom/data.js
498
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
499
- * --------------------------------------------------------------------------
500
- */
501
-
502
- /**
503
- * Constants
504
- */
505
-
506
- const elementMap = new Map();
507
- var Data = {
508
- set(element, key, instance) {
509
- if (!elementMap.has(element)) {
510
- elementMap.set(element, new Map());
511
- }
512
- const instanceMap = elementMap.get(element);
513
-
514
- // make it clear we only want one instance per element
515
- // can be removed later when multiple key/instances are fine to be used
516
- if (!instanceMap.has(key) && instanceMap.size !== 0) {
517
- // eslint-disable-next-line no-console
518
- console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
519
- return;
520
- }
521
- instanceMap.set(key, instance);
522
- },
523
- get(element, key) {
524
- if (elementMap.has(element)) {
525
- return elementMap.get(element).get(key) || null;
526
- }
527
- return null;
528
- },
529
- remove(element, key) {
530
- if (!elementMap.has(element)) {
531
- return;
532
- }
533
- const instanceMap = elementMap.get(element);
534
- instanceMap.delete(key);
535
-
536
- // free up element references if there are no instances left for an element
537
- if (instanceMap.size === 0) {
538
- elementMap.delete(element);
539
- }
540
- }
541
- };
542
-
543
- /**
544
- * --------------------------------------------------------------------------
545
- * Bootstrap (v5.2.3): dom/manipulator.js
521
+ * Bootstrap dom/manipulator.js
546
522
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
547
523
  * --------------------------------------------------------------------------
548
524
  */
@@ -599,7 +575,7 @@ const Manipulator$1 = {
599
575
 
600
576
  /**
601
577
  * --------------------------------------------------------------------------
602
- * Bootstrap (v5.2.3): util/config.js
578
+ * Bootstrap util/config.js
603
579
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
604
580
  * --------------------------------------------------------------------------
605
581
  */
@@ -630,20 +606,19 @@ class Config {
630
606
  return config;
631
607
  }
632
608
  _mergeConfigObj(config, element) {
633
- const jsonConfig = isElement(element) ? Manipulator$1.getDataAttribute(element, 'config') : {}; // try to parse
609
+ const jsonConfig = isElement$1(element) ? Manipulator$1.getDataAttribute(element, 'config') : {}; // try to parse
634
610
 
635
611
  return {
636
612
  ...this.constructor.Default,
637
613
  ...(typeof jsonConfig === 'object' ? jsonConfig : {}),
638
- ...(isElement(element) ? Manipulator$1.getDataAttributes(element) : {}),
614
+ ...(isElement$1(element) ? Manipulator$1.getDataAttributes(element) : {}),
639
615
  ...(typeof config === 'object' ? config : {})
640
616
  };
641
617
  }
642
618
  _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {
643
- for (const property of Object.keys(configTypes)) {
644
- const expectedTypes = configTypes[property];
619
+ for (const [property, expectedTypes] of Object.entries(configTypes)) {
645
620
  const value = config[property];
646
- const valueType = isElement(value) ? 'element' : toType(value);
621
+ const valueType = isElement$1(value) ? 'element' : toType(value);
647
622
  if (!new RegExp(expectedTypes).test(valueType)) {
648
623
  throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
649
624
  }
@@ -653,7 +628,7 @@ class Config {
653
628
 
654
629
  /**
655
630
  * --------------------------------------------------------------------------
656
- * Bootstrap (v5.2.3): base-component.js
631
+ * Bootstrap base-component.js
657
632
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
658
633
  * --------------------------------------------------------------------------
659
634
  */
@@ -663,7 +638,7 @@ class Config {
663
638
  * Constants
664
639
  */
665
640
 
666
- const VERSION = '5.2.3';
641
+ const VERSION = '5.3.3';
667
642
 
668
643
  /**
669
644
  * Class definition
@@ -672,7 +647,7 @@ const VERSION = '5.2.3';
672
647
  class BaseComponent extends Config {
673
648
  constructor(element, config) {
674
649
  super();
675
- element = getElement(element);
650
+ element = getElement$1(element);
676
651
  if (!element) {
677
652
  return;
678
653
  }
@@ -701,7 +676,7 @@ class BaseComponent extends Config {
701
676
 
702
677
  // Static
703
678
  static getInstance(element) {
704
- return Data.get(getElement(element), this.DATA_KEY);
679
+ return Data.get(getElement$1(element), this.DATA_KEY);
705
680
  }
706
681
  static getOrCreateInstance(element, config = {}) {
707
682
  return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);
@@ -722,7 +697,96 @@ class BaseComponent extends Config {
722
697
 
723
698
  /**
724
699
  * --------------------------------------------------------------------------
725
- * Bootstrap (v5.2.3): util/component-functions.js
700
+ * Bootstrap dom/selector-engine.js
701
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
702
+ * --------------------------------------------------------------------------
703
+ */
704
+
705
+ const getSelector$1 = element => {
706
+ let selector = element.getAttribute('data-bs-target');
707
+ if (!selector || selector === '#') {
708
+ let hrefAttribute = element.getAttribute('href');
709
+
710
+ // The only valid content that could double as a selector are IDs or classes,
711
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
712
+ // `document.querySelector` will rightfully complain it is invalid.
713
+ // See https://github.com/twbs/bootstrap/issues/32273
714
+ if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {
715
+ return null;
716
+ }
717
+
718
+ // Just in case some CMS puts out a full URL with the anchor appended
719
+ if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {
720
+ hrefAttribute = `#${hrefAttribute.split('#')[1]}`;
721
+ }
722
+ selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;
723
+ }
724
+ return selector ? selector.split(',').map(sel => parseSelector(sel)).join(',') : null;
725
+ };
726
+ const SelectorEngine = {
727
+ find(selector, element = document.documentElement) {
728
+ return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
729
+ },
730
+ findOne(selector, element = document.documentElement) {
731
+ return Element.prototype.querySelector.call(element, selector);
732
+ },
733
+ children(element, selector) {
734
+ return [].concat(...element.children).filter(child => child.matches(selector));
735
+ },
736
+ parents(element, selector) {
737
+ const parents = [];
738
+ let ancestor = element.parentNode.closest(selector);
739
+ while (ancestor) {
740
+ parents.push(ancestor);
741
+ ancestor = ancestor.parentNode.closest(selector);
742
+ }
743
+ return parents;
744
+ },
745
+ prev(element, selector) {
746
+ let previous = element.previousElementSibling;
747
+ while (previous) {
748
+ if (previous.matches(selector)) {
749
+ return [previous];
750
+ }
751
+ previous = previous.previousElementSibling;
752
+ }
753
+ return [];
754
+ },
755
+ // TODO: this is now unused; remove later along with prev()
756
+ next(element, selector) {
757
+ let next = element.nextElementSibling;
758
+ while (next) {
759
+ if (next.matches(selector)) {
760
+ return [next];
761
+ }
762
+ next = next.nextElementSibling;
763
+ }
764
+ return [];
765
+ },
766
+ focusableChildren(element) {
767
+ const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(',');
768
+ return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));
769
+ },
770
+ getSelectorFromElement(element) {
771
+ const selector = getSelector$1(element);
772
+ if (selector) {
773
+ return SelectorEngine.findOne(selector) ? selector : null;
774
+ }
775
+ return null;
776
+ },
777
+ getElementFromSelector(element) {
778
+ const selector = getSelector$1(element);
779
+ return selector ? SelectorEngine.findOne(selector) : null;
780
+ },
781
+ getMultipleElementsFromSelector(element) {
782
+ const selector = getSelector$1(element);
783
+ return selector ? SelectorEngine.find(selector) : [];
784
+ }
785
+ };
786
+
787
+ /**
788
+ * --------------------------------------------------------------------------
789
+ * Bootstrap util/component-functions.js
726
790
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
727
791
  * --------------------------------------------------------------------------
728
792
  */
@@ -737,7 +801,7 @@ const enableDismissTrigger = (component, method = 'hide') => {
737
801
  if (isDisabled(this)) {
738
802
  return;
739
803
  }
740
- const target = getElementFromSelector(this) || this.closest(`.${name}`);
804
+ const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`);
741
805
  const instance = component.getOrCreateInstance(target);
742
806
 
743
807
  // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
@@ -747,7 +811,7 @@ const enableDismissTrigger = (component, method = 'hide') => {
747
811
 
748
812
  /**
749
813
  * --------------------------------------------------------------------------
750
- * Bootstrap (v5.2.3): alert.js
814
+ * Bootstrap alert.js
751
815
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
752
816
  * --------------------------------------------------------------------------
753
817
  */
@@ -818,11 +882,11 @@ enableDismissTrigger(Alert, 'close');
818
882
  * jQuery
819
883
  */
820
884
 
821
- defineJQueryPlugin(Alert);
885
+ defineJQueryPlugin$1(Alert);
822
886
 
823
887
  /**
824
888
  * --------------------------------------------------------------------------
825
- * Bootstrap (v5.2.3): button.js
889
+ * Bootstrap button.js
826
890
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
827
891
  * --------------------------------------------------------------------------
828
892
  */
@@ -882,69 +946,11 @@ EventHandler.on(document, EVENT_CLICK_DATA_API$7, SELECTOR_DATA_TOGGLE$5, event
882
946
  * jQuery
883
947
  */
884
948
 
885
- defineJQueryPlugin(Button);
886
-
887
- /**
888
- * --------------------------------------------------------------------------
889
- * Bootstrap (v5.2.3): dom/selector-engine.js
890
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
891
- * --------------------------------------------------------------------------
892
- */
893
-
894
-
895
- /**
896
- * Constants
897
- */
898
-
899
- const SelectorEngine = {
900
- find(selector, element = document.documentElement) {
901
- return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
902
- },
903
- findOne(selector, element = document.documentElement) {
904
- return Element.prototype.querySelector.call(element, selector);
905
- },
906
- children(element, selector) {
907
- return [].concat(...element.children).filter(child => child.matches(selector));
908
- },
909
- parents(element, selector) {
910
- const parents = [];
911
- let ancestor = element.parentNode.closest(selector);
912
- while (ancestor) {
913
- parents.push(ancestor);
914
- ancestor = ancestor.parentNode.closest(selector);
915
- }
916
- return parents;
917
- },
918
- prev(element, selector) {
919
- let previous = element.previousElementSibling;
920
- while (previous) {
921
- if (previous.matches(selector)) {
922
- return [previous];
923
- }
924
- previous = previous.previousElementSibling;
925
- }
926
- return [];
927
- },
928
- // TODO: this is now unused; remove later along with prev()
929
- next(element, selector) {
930
- let next = element.nextElementSibling;
931
- while (next) {
932
- if (next.matches(selector)) {
933
- return [next];
934
- }
935
- next = next.nextElementSibling;
936
- }
937
- return [];
938
- },
939
- focusableChildren(element) {
940
- const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(',');
941
- return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));
942
- }
943
- };
949
+ defineJQueryPlugin$1(Button);
944
950
 
945
951
  /**
946
952
  * --------------------------------------------------------------------------
947
- * Bootstrap (v5.2.3): util/swipe.js
953
+ * Bootstrap util/swipe.js
948
954
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
949
955
  * --------------------------------------------------------------------------
950
956
  */
@@ -1064,7 +1070,7 @@ class Swipe extends Config {
1064
1070
 
1065
1071
  /**
1066
1072
  * --------------------------------------------------------------------------
1067
- * Bootstrap (v5.2.3): carousel.js
1073
+ * Bootstrap carousel.js
1068
1074
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1069
1075
  * --------------------------------------------------------------------------
1070
1076
  */
@@ -1325,7 +1331,7 @@ class Carousel extends BaseComponent {
1325
1331
  }
1326
1332
  if (!activeElement || !nextElement) {
1327
1333
  // Some weirdness is happening, so we bail
1328
- // todo: change tests that use empty divs to avoid this check
1334
+ // TODO: change tests that use empty divs to avoid this check
1329
1335
  return;
1330
1336
  }
1331
1337
  const isCycling = Boolean(this._interval);
@@ -1402,7 +1408,7 @@ class Carousel extends BaseComponent {
1402
1408
  */
1403
1409
 
1404
1410
  EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_SLIDE, function (event) {
1405
- const target = getElementFromSelector(this);
1411
+ const target = SelectorEngine.getElementFromSelector(this);
1406
1412
  if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
1407
1413
  return;
1408
1414
  }
@@ -1433,11 +1439,11 @@ EventHandler.on(window, EVENT_LOAD_DATA_API$4, () => {
1433
1439
  * jQuery
1434
1440
  */
1435
1441
 
1436
- defineJQueryPlugin(Carousel);
1442
+ defineJQueryPlugin$1(Carousel);
1437
1443
 
1438
1444
  /**
1439
1445
  * --------------------------------------------------------------------------
1440
- * Bootstrap (v5.2.3): collapse.js
1446
+ * Bootstrap collapse.js
1441
1447
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1442
1448
  * --------------------------------------------------------------------------
1443
1449
  */
@@ -1486,7 +1492,7 @@ class Collapse extends BaseComponent {
1486
1492
  this._triggerArray = [];
1487
1493
  const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);
1488
1494
  for (const elem of toggleList) {
1489
- const selector = getSelectorFromElement(elem);
1495
+ const selector = SelectorEngine.getSelectorFromElement(elem);
1490
1496
  const filterElement = SelectorEngine.find(selector).filter(foundElement => foundElement === this._element);
1491
1497
  if (selector !== null && filterElement.length) {
1492
1498
  this._triggerArray.push(elem);
@@ -1574,7 +1580,7 @@ class Collapse extends BaseComponent {
1574
1580
  this._element.classList.add(CLASS_NAME_COLLAPSING);
1575
1581
  this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
1576
1582
  for (const trigger of this._triggerArray) {
1577
- const element = getElementFromSelector(trigger);
1583
+ const element = SelectorEngine.getElementFromSelector(trigger);
1578
1584
  if (element && !this._isShown(element)) {
1579
1585
  this._addAriaAndCollapsedClass([trigger], false);
1580
1586
  }
@@ -1596,7 +1602,7 @@ class Collapse extends BaseComponent {
1596
1602
  // Private
1597
1603
  _configAfterMerge(config) {
1598
1604
  config.toggle = Boolean(config.toggle); // Coerce string values
1599
- config.parent = getElement(config.parent);
1605
+ config.parent = getElement$1(config.parent);
1600
1606
  return config;
1601
1607
  }
1602
1608
  _getDimension() {
@@ -1608,7 +1614,7 @@ class Collapse extends BaseComponent {
1608
1614
  }
1609
1615
  const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4);
1610
1616
  for (const element of children) {
1611
- const selected = getElementFromSelector(element);
1617
+ const selected = SelectorEngine.getElementFromSelector(element);
1612
1618
  if (selected) {
1613
1619
  this._addAriaAndCollapsedClass([element], this._isShown(selected));
1614
1620
  }
@@ -1656,9 +1662,7 @@ EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE$4, functi
1656
1662
  if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {
1657
1663
  event.preventDefault();
1658
1664
  }
1659
- const selector = getSelectorFromElement(this);
1660
- const selectorElements = SelectorEngine.find(selector);
1661
- for (const element of selectorElements) {
1665
+ for (const element of SelectorEngine.getMultipleElementsFromSelector(this)) {
1662
1666
  Collapse.getOrCreateInstance(element, {
1663
1667
  toggle: false
1664
1668
  }).toggle();
@@ -1669,11 +1673,11 @@ EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE$4, functi
1669
1673
  * jQuery
1670
1674
  */
1671
1675
 
1672
- defineJQueryPlugin(Collapse);
1676
+ defineJQueryPlugin$1(Collapse);
1673
1677
 
1674
1678
  /**
1675
1679
  * --------------------------------------------------------------------------
1676
- * Bootstrap (v5.2.3): dropdown.js
1680
+ * Bootstrap dropdown.js
1677
1681
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1678
1682
  * --------------------------------------------------------------------------
1679
1683
  */
@@ -1746,7 +1750,7 @@ class Dropdown extends BaseComponent {
1746
1750
  super(element, config);
1747
1751
  this._popper = null;
1748
1752
  this._parent = this._element.parentNode; // dropdown wrapper
1749
- // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
1753
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
1750
1754
  this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);
1751
1755
  this._inNavbar = this._detectNavbar();
1752
1756
  }
@@ -1841,7 +1845,7 @@ class Dropdown extends BaseComponent {
1841
1845
  }
1842
1846
  _getConfig(config) {
1843
1847
  config = super._getConfig(config);
1844
- if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
1848
+ if (typeof config.reference === 'object' && !isElement$1(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
1845
1849
  // Popper virtual elements require a getBoundingClientRect method
1846
1850
  throw new TypeError(`${NAME$c.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
1847
1851
  }
@@ -1854,8 +1858,8 @@ class Dropdown extends BaseComponent {
1854
1858
  let referenceElement = this._element;
1855
1859
  if (this._config.reference === 'parent') {
1856
1860
  referenceElement = this._parent;
1857
- } else if (isElement(this._config.reference)) {
1858
- referenceElement = getElement(this._config.reference);
1861
+ } else if (isElement$1(this._config.reference)) {
1862
+ referenceElement = getElement$1(this._config.reference);
1859
1863
  } else if (typeof this._config.reference === 'object') {
1860
1864
  referenceElement = this._config.reference;
1861
1865
  }
@@ -1920,7 +1924,7 @@ class Dropdown extends BaseComponent {
1920
1924
 
1921
1925
  // Disable Popper if we have a static display or Dropdown is in Navbar
1922
1926
  if (this._inNavbar || this._config.display === 'static') {
1923
- Manipulator$1.setDataAttribute(this._menu, 'popper', 'static'); // todo:v6 remove
1927
+ Manipulator$1.setDataAttribute(this._menu, 'popper', 'static'); // TODO: v6 remove
1924
1928
  defaultBsPopperConfig.modifiers = [{
1925
1929
  name: 'applyStyles',
1926
1930
  enabled: false
@@ -1928,7 +1932,7 @@ class Dropdown extends BaseComponent {
1928
1932
  }
1929
1933
  return {
1930
1934
  ...defaultBsPopperConfig,
1931
- ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
1935
+ ...execute(this._config.popperConfig, [defaultBsPopperConfig])
1932
1936
  };
1933
1937
  }
1934
1938
  _selectMenuItem({
@@ -2002,7 +2006,7 @@ class Dropdown extends BaseComponent {
2002
2006
  }
2003
2007
  event.preventDefault();
2004
2008
 
2005
- // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
2009
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
2006
2010
  const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);
2007
2011
  const instance = Dropdown.getOrCreateInstance(getToggleButton);
2008
2012
  if (isUpOrDownEvent) {
@@ -2037,7 +2041,7 @@ EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$3, functi
2037
2041
  * jQuery
2038
2042
  */
2039
2043
 
2040
- defineJQueryPlugin(Dropdown);
2044
+ defineJQueryPlugin$1(Dropdown);
2041
2045
 
2042
2046
  /**
2043
2047
  * --------------------------------------------------------------------------
@@ -2141,133 +2145,35 @@ class Gallery extends BaseComponent {
2141
2145
  throw new TypeError(`No method named "${config}"`);
2142
2146
  }
2143
2147
  data[config](this);
2144
- });
2145
- }
2146
- }
2147
-
2148
- /**
2149
- * ------------------------------------------------------------------------
2150
- * Data Api implementation
2151
- * ------------------------------------------------------------------------
2152
- */
2153
-
2154
- EventHandler.on(document, EVENT_CLICK_DATA_API$3, THUMBNAIL_SELECTOR, event => {
2155
- const gallery = event.target.closest('div.bcl-gallery');
2156
- const firstSlide = event.target.parentNode.getAttribute('data-bs-slide-to');
2157
- gallery.dataset.galleryStart = firstSlide;
2158
- Gallery.getOrCreateInstance(gallery);
2159
- });
2160
-
2161
- /**
2162
- * ------------------------------------------------------------------------
2163
- * jQuery
2164
- * ------------------------------------------------------------------------
2165
- * add .gallery to jQuery only if jQuery is present
2166
- */
2167
-
2168
- defineJQueryPlugin(Gallery);
2169
-
2170
- /**
2171
- * --------------------------------------------------------------------------
2172
- * Bootstrap (v5.2.3): util/scrollBar.js
2173
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2174
- * --------------------------------------------------------------------------
2175
- */
2176
-
2177
-
2178
- /**
2179
- * Constants
2180
- */
2181
-
2182
- const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
2183
- const SELECTOR_STICKY_CONTENT = '.sticky-top';
2184
- const PROPERTY_PADDING = 'padding-right';
2185
- const PROPERTY_MARGIN = 'margin-right';
2186
-
2187
- /**
2188
- * Class definition
2189
- */
2190
-
2191
- class ScrollBarHelper {
2192
- constructor() {
2193
- this._element = document.body;
2194
- }
2195
-
2196
- // Public
2197
- getWidth() {
2198
- // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
2199
- const documentWidth = document.documentElement.clientWidth;
2200
- return Math.abs(window.innerWidth - documentWidth);
2201
- }
2202
- hide() {
2203
- const width = this.getWidth();
2204
- this._disableOverFlow();
2205
- // give padding to element to balance the hidden scrollbar width
2206
- this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
2207
- // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
2208
- this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
2209
- this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);
2210
- }
2211
- reset() {
2212
- this._resetElementAttributes(this._element, 'overflow');
2213
- this._resetElementAttributes(this._element, PROPERTY_PADDING);
2214
- this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);
2215
- this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);
2216
- }
2217
- isOverflowing() {
2218
- return this.getWidth() > 0;
2219
- }
2220
-
2221
- // Private
2222
- _disableOverFlow() {
2223
- this._saveInitialAttribute(this._element, 'overflow');
2224
- this._element.style.overflow = 'hidden';
2225
- }
2226
- _setElementAttributes(selector, styleProperty, callback) {
2227
- const scrollbarWidth = this.getWidth();
2228
- const manipulationCallBack = element => {
2229
- if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
2230
- return;
2231
- }
2232
- this._saveInitialAttribute(element, styleProperty);
2233
- const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);
2234
- element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);
2235
- };
2236
- this._applyManipulationCallback(selector, manipulationCallBack);
2237
- }
2238
- _saveInitialAttribute(element, styleProperty) {
2239
- const actualValue = element.style.getPropertyValue(styleProperty);
2240
- if (actualValue) {
2241
- Manipulator$1.setDataAttribute(element, styleProperty, actualValue);
2242
- }
2243
- }
2244
- _resetElementAttributes(selector, styleProperty) {
2245
- const manipulationCallBack = element => {
2246
- const value = Manipulator$1.getDataAttribute(element, styleProperty);
2247
- // We only want to remove the property if the value is `null`; the value can also be zero
2248
- if (value === null) {
2249
- element.style.removeProperty(styleProperty);
2250
- return;
2251
- }
2252
- Manipulator$1.removeDataAttribute(element, styleProperty);
2253
- element.style.setProperty(styleProperty, value);
2254
- };
2255
- this._applyManipulationCallback(selector, manipulationCallBack);
2256
- }
2257
- _applyManipulationCallback(selector, callBack) {
2258
- if (isElement(selector)) {
2259
- callBack(selector);
2260
- return;
2261
- }
2262
- for (const sel of SelectorEngine.find(selector, this._element)) {
2263
- callBack(sel);
2264
- }
2148
+ });
2265
2149
  }
2266
2150
  }
2267
2151
 
2152
+ /**
2153
+ * ------------------------------------------------------------------------
2154
+ * Data Api implementation
2155
+ * ------------------------------------------------------------------------
2156
+ */
2157
+
2158
+ EventHandler.on(document, EVENT_CLICK_DATA_API$3, THUMBNAIL_SELECTOR, event => {
2159
+ const gallery = event.target.closest('div.bcl-gallery');
2160
+ const firstSlide = event.target.parentNode.getAttribute('data-bs-slide-to');
2161
+ gallery.dataset.galleryStart = firstSlide;
2162
+ Gallery.getOrCreateInstance(gallery);
2163
+ });
2164
+
2165
+ /**
2166
+ * ------------------------------------------------------------------------
2167
+ * jQuery
2168
+ * ------------------------------------------------------------------------
2169
+ * add .gallery to jQuery only if jQuery is present
2170
+ */
2171
+
2172
+ defineJQueryPlugin$1(Gallery);
2173
+
2268
2174
  /**
2269
2175
  * --------------------------------------------------------------------------
2270
- * Bootstrap (v5.2.3): util/backdrop.js
2176
+ * Bootstrap util/backdrop.js
2271
2177
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2272
2178
  * --------------------------------------------------------------------------
2273
2179
  */
@@ -2370,7 +2276,7 @@ class Backdrop extends Config {
2370
2276
  }
2371
2277
  _configAfterMerge(config) {
2372
2278
  // use getElement() with the default "body" to get a fresh Element on each instantiation
2373
- config.rootElement = getElement(config.rootElement);
2279
+ config.rootElement = getElement$1(config.rootElement);
2374
2280
  return config;
2375
2281
  }
2376
2282
  _append() {
@@ -2391,7 +2297,7 @@ class Backdrop extends Config {
2391
2297
 
2392
2298
  /**
2393
2299
  * --------------------------------------------------------------------------
2394
- * Bootstrap (v5.2.3): util/focustrap.js
2300
+ * Bootstrap util/focustrap.js
2395
2301
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2396
2302
  * --------------------------------------------------------------------------
2397
2303
  */
@@ -2489,7 +2395,105 @@ class FocusTrap extends Config {
2489
2395
 
2490
2396
  /**
2491
2397
  * --------------------------------------------------------------------------
2492
- * Bootstrap (v5.2.3): modal.js
2398
+ * Bootstrap util/scrollBar.js
2399
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2400
+ * --------------------------------------------------------------------------
2401
+ */
2402
+
2403
+
2404
+ /**
2405
+ * Constants
2406
+ */
2407
+
2408
+ const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
2409
+ const SELECTOR_STICKY_CONTENT = '.sticky-top';
2410
+ const PROPERTY_PADDING = 'padding-right';
2411
+ const PROPERTY_MARGIN = 'margin-right';
2412
+
2413
+ /**
2414
+ * Class definition
2415
+ */
2416
+
2417
+ class ScrollBarHelper {
2418
+ constructor() {
2419
+ this._element = document.body;
2420
+ }
2421
+
2422
+ // Public
2423
+ getWidth() {
2424
+ // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
2425
+ const documentWidth = document.documentElement.clientWidth;
2426
+ return Math.abs(window.innerWidth - documentWidth);
2427
+ }
2428
+ hide() {
2429
+ const width = this.getWidth();
2430
+ this._disableOverFlow();
2431
+ // give padding to element to balance the hidden scrollbar width
2432
+ this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
2433
+ // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
2434
+ this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
2435
+ this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);
2436
+ }
2437
+ reset() {
2438
+ this._resetElementAttributes(this._element, 'overflow');
2439
+ this._resetElementAttributes(this._element, PROPERTY_PADDING);
2440
+ this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);
2441
+ this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);
2442
+ }
2443
+ isOverflowing() {
2444
+ return this.getWidth() > 0;
2445
+ }
2446
+
2447
+ // Private
2448
+ _disableOverFlow() {
2449
+ this._saveInitialAttribute(this._element, 'overflow');
2450
+ this._element.style.overflow = 'hidden';
2451
+ }
2452
+ _setElementAttributes(selector, styleProperty, callback) {
2453
+ const scrollbarWidth = this.getWidth();
2454
+ const manipulationCallBack = element => {
2455
+ if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
2456
+ return;
2457
+ }
2458
+ this._saveInitialAttribute(element, styleProperty);
2459
+ const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);
2460
+ element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);
2461
+ };
2462
+ this._applyManipulationCallback(selector, manipulationCallBack);
2463
+ }
2464
+ _saveInitialAttribute(element, styleProperty) {
2465
+ const actualValue = element.style.getPropertyValue(styleProperty);
2466
+ if (actualValue) {
2467
+ Manipulator$1.setDataAttribute(element, styleProperty, actualValue);
2468
+ }
2469
+ }
2470
+ _resetElementAttributes(selector, styleProperty) {
2471
+ const manipulationCallBack = element => {
2472
+ const value = Manipulator$1.getDataAttribute(element, styleProperty);
2473
+ // We only want to remove the property if the value is `null`; the value can also be zero
2474
+ if (value === null) {
2475
+ element.style.removeProperty(styleProperty);
2476
+ return;
2477
+ }
2478
+ Manipulator$1.removeDataAttribute(element, styleProperty);
2479
+ element.style.setProperty(styleProperty, value);
2480
+ };
2481
+ this._applyManipulationCallback(selector, manipulationCallBack);
2482
+ }
2483
+ _applyManipulationCallback(selector, callBack) {
2484
+ if (isElement$1(selector)) {
2485
+ callBack(selector);
2486
+ return;
2487
+ }
2488
+ for (const sel of SelectorEngine.find(selector, this._element)) {
2489
+ callBack(sel);
2490
+ }
2491
+ }
2492
+ }
2493
+
2494
+ /**
2495
+ * --------------------------------------------------------------------------
2496
+ * Bootstrap modal.js
2493
2497
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2494
2498
  * --------------------------------------------------------------------------
2495
2499
  */
@@ -2596,9 +2600,8 @@ class Modal extends BaseComponent {
2596
2600
  this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());
2597
2601
  }
2598
2602
  dispose() {
2599
- for (const htmlElement of [window, this._dialog]) {
2600
- EventHandler.off(htmlElement, EVENT_KEY$5);
2601
- }
2603
+ EventHandler.off(window, EVENT_KEY$5);
2604
+ EventHandler.off(this._dialog, EVENT_KEY$5);
2602
2605
  this._backdrop.dispose();
2603
2606
  this._focustrap.deactivate();
2604
2607
  super.dispose();
@@ -2653,7 +2656,6 @@ class Modal extends BaseComponent {
2653
2656
  return;
2654
2657
  }
2655
2658
  if (this._config.keyboard) {
2656
- event.preventDefault();
2657
2659
  this.hide();
2658
2660
  return;
2659
2661
  }
@@ -2762,7 +2764,7 @@ class Modal extends BaseComponent {
2762
2764
  */
2763
2765
 
2764
2766
  EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {
2765
- const target = getElementFromSelector(this);
2767
+ const target = SelectorEngine.getElementFromSelector(this);
2766
2768
  if (['A', 'AREA'].includes(this.tagName)) {
2767
2769
  event.preventDefault();
2768
2770
  }
@@ -2792,11 +2794,11 @@ enableDismissTrigger(Modal);
2792
2794
  * jQuery
2793
2795
  */
2794
2796
 
2795
- defineJQueryPlugin(Modal);
2797
+ defineJQueryPlugin$1(Modal);
2796
2798
 
2797
2799
  /**
2798
2800
  * --------------------------------------------------------------------------
2799
- * Bootstrap (v5.2.3): offcanvas.js
2801
+ * Bootstrap offcanvas.js
2800
2802
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2801
2803
  * --------------------------------------------------------------------------
2802
2804
  */
@@ -2955,11 +2957,11 @@ class Offcanvas extends BaseComponent {
2955
2957
  if (event.key !== ESCAPE_KEY) {
2956
2958
  return;
2957
2959
  }
2958
- if (!this._config.keyboard) {
2959
- EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
2960
+ if (this._config.keyboard) {
2961
+ this.hide();
2960
2962
  return;
2961
2963
  }
2962
- this.hide();
2964
+ EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
2963
2965
  });
2964
2966
  }
2965
2967
 
@@ -2983,7 +2985,7 @@ class Offcanvas extends BaseComponent {
2983
2985
  */
2984
2986
 
2985
2987
  EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {
2986
- const target = getElementFromSelector(this);
2988
+ const target = SelectorEngine.getElementFromSelector(this);
2987
2989
  if (['A', 'AREA'].includes(this.tagName)) {
2988
2990
  event.preventDefault();
2989
2991
  }
@@ -3023,7 +3025,7 @@ enableDismissTrigger(Offcanvas);
3023
3025
  * jQuery
3024
3026
  */
3025
3027
 
3026
- defineJQueryPlugin(Offcanvas);
3028
+ defineJQueryPlugin$1(Offcanvas);
3027
3029
 
3028
3030
  /**
3029
3031
  * AccessibleToggle enhances Bootstrap Modal and Offcanvas components by:
@@ -3075,7 +3077,6 @@ class AccessibleToggle {
3075
3077
  }
3076
3078
  }
3077
3079
 
3078
- /* eslint-disable prefer-destructuring */
3079
3080
  class AccordionToggle {
3080
3081
  static isInitialized = false;
3081
3082
  constructor(buttonElement) {
@@ -3116,39 +3117,13 @@ class AccordionToggle {
3116
3117
 
3117
3118
  /**
3118
3119
  * --------------------------------------------------------------------------
3119
- * Bootstrap (v5.2.3): util/sanitizer.js
3120
+ * Bootstrap util/sanitizer.js
3120
3121
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3121
3122
  * --------------------------------------------------------------------------
3122
3123
  */
3123
3124
 
3124
- const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
3125
+ // js-docs-start allow-list
3125
3126
  const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
3126
-
3127
- /**
3128
- * A pattern that recognizes a commonly useful subset of URLs that are safe.
3129
- *
3130
- * Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
3131
- */
3132
- const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
3133
-
3134
- /**
3135
- * A pattern that matches safe data URLs. Only matches image, video and audio types.
3136
- *
3137
- * Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
3138
- */
3139
- const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
3140
- const allowedAttribute = (attribute, allowedAttributeList) => {
3141
- const attributeName = attribute.nodeName.toLowerCase();
3142
- if (allowedAttributeList.includes(attributeName)) {
3143
- if (uriAttributes.has(attributeName)) {
3144
- return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue));
3145
- }
3146
- return true;
3147
- }
3148
-
3149
- // Check if a regular expression validates the attribute.
3150
- return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));
3151
- };
3152
3127
  const DefaultAllowlist = {
3153
3128
  // Global attributes allowed on any supplied element below.
3154
3129
  '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
@@ -3158,7 +3133,10 @@ const DefaultAllowlist = {
3158
3133
  br: [],
3159
3134
  col: [],
3160
3135
  code: [],
3136
+ dd: [],
3161
3137
  div: [],
3138
+ dl: [],
3139
+ dt: [],
3162
3140
  em: [],
3163
3141
  hr: [],
3164
3142
  h1: [],
@@ -3182,6 +3160,30 @@ const DefaultAllowlist = {
3182
3160
  u: [],
3183
3161
  ul: []
3184
3162
  };
3163
+ // js-docs-end allow-list
3164
+
3165
+ const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
3166
+
3167
+ /**
3168
+ * A pattern that recognizes URLs that are safe wrt. XSS in URL navigation
3169
+ * contexts.
3170
+ *
3171
+ * Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38
3172
+ */
3173
+ // eslint-disable-next-line unicorn/better-regex
3174
+ const SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i;
3175
+ const allowedAttribute = (attribute, allowedAttributeList) => {
3176
+ const attributeName = attribute.nodeName.toLowerCase();
3177
+ if (allowedAttributeList.includes(attributeName)) {
3178
+ if (uriAttributes.has(attributeName)) {
3179
+ return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue));
3180
+ }
3181
+ return true;
3182
+ }
3183
+
3184
+ // Check if a regular expression validates the attribute.
3185
+ return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));
3186
+ };
3185
3187
  function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
3186
3188
  if (!unsafeHtml.length) {
3187
3189
  return unsafeHtml;
@@ -3211,7 +3213,7 @@ function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
3211
3213
 
3212
3214
  /**
3213
3215
  * --------------------------------------------------------------------------
3214
- * Bootstrap (v5.2.3): util/template-factory.js
3216
+ * Bootstrap util/template-factory.js
3215
3217
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3216
3218
  * --------------------------------------------------------------------------
3217
3219
  */
@@ -3319,8 +3321,8 @@ class TemplateFactory extends Config {
3319
3321
  templateElement.remove();
3320
3322
  return;
3321
3323
  }
3322
- if (isElement(content)) {
3323
- this._putElementInTemplate(getElement(content), templateElement);
3324
+ if (isElement$1(content)) {
3325
+ this._putElementInTemplate(getElement$1(content), templateElement);
3324
3326
  return;
3325
3327
  }
3326
3328
  if (this._config.html) {
@@ -3333,7 +3335,7 @@ class TemplateFactory extends Config {
3333
3335
  return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg;
3334
3336
  }
3335
3337
  _resolvePossibleFunction(arg) {
3336
- return typeof arg === 'function' ? arg(this) : arg;
3338
+ return execute(arg, [this]);
3337
3339
  }
3338
3340
  _putElementInTemplate(element, templateElement) {
3339
3341
  if (this._config.html) {
@@ -3347,7 +3349,7 @@ class TemplateFactory extends Config {
3347
3349
 
3348
3350
  /**
3349
3351
  * --------------------------------------------------------------------------
3350
- * Bootstrap (v5.2.3): tooltip.js
3352
+ * Bootstrap tooltip.js
3351
3353
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3352
3354
  * --------------------------------------------------------------------------
3353
3355
  */
@@ -3395,7 +3397,7 @@ const Default$4 = {
3395
3397
  delay: 0,
3396
3398
  fallbackPlacements: ['top', 'right', 'bottom', 'left'],
3397
3399
  html: false,
3398
- offset: [0, 0],
3400
+ offset: [0, 6],
3399
3401
  placement: 'top',
3400
3402
  popperConfig: null,
3401
3403
  sanitize: true,
@@ -3508,7 +3510,7 @@ class Tooltip extends BaseComponent {
3508
3510
  return;
3509
3511
  }
3510
3512
 
3511
- // todo v6 remove this OR make it optional
3513
+ // TODO: v6 remove this or make it optional
3512
3514
  this._disposePopper();
3513
3515
  const tip = this._getTipElement();
3514
3516
  this._element.setAttribute('aria-describedby', tip.getAttribute('id'));
@@ -3594,12 +3596,12 @@ class Tooltip extends BaseComponent {
3594
3596
  _createTipElement(content) {
3595
3597
  const tip = this._getTemplateFactory(content).toHtml();
3596
3598
 
3597
- // todo: remove this check on v6
3599
+ // TODO: remove this check in v6
3598
3600
  if (!tip) {
3599
3601
  return null;
3600
3602
  }
3601
3603
  tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
3602
- // todo: on v6 the following can be achieved with CSS only
3604
+ // TODO: v6 the following can be achieved with CSS only
3603
3605
  tip.classList.add(`bs-${this.constructor.NAME}-auto`);
3604
3606
  const tipId = getUID(this.constructor.NAME).toString();
3605
3607
  tip.setAttribute('id', tipId);
@@ -3649,7 +3651,7 @@ class Tooltip extends BaseComponent {
3649
3651
  return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW$2);
3650
3652
  }
3651
3653
  _createPopper(tip) {
3652
- const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
3654
+ const placement = execute(this._config.placement, [this, tip, this._element]);
3653
3655
  const attachment = AttachmentMap[placement.toUpperCase()];
3654
3656
  return Popper.createPopper(this._element, tip, this._getPopperConfig(attachment));
3655
3657
  }
@@ -3666,7 +3668,7 @@ class Tooltip extends BaseComponent {
3666
3668
  return offset;
3667
3669
  }
3668
3670
  _resolvePossibleFunction(arg) {
3669
- return typeof arg === 'function' ? arg.call(this._element) : arg;
3671
+ return execute(arg, [this._element]);
3670
3672
  }
3671
3673
  _getPopperConfig(attachment) {
3672
3674
  const defaultBsPopperConfig = {
@@ -3704,7 +3706,7 @@ class Tooltip extends BaseComponent {
3704
3706
  };
3705
3707
  return {
3706
3708
  ...defaultBsPopperConfig,
3707
- ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
3709
+ ...execute(this._config.popperConfig, [defaultBsPopperConfig])
3708
3710
  };
3709
3711
  }
3710
3712
  _setListeners() {
@@ -3795,7 +3797,7 @@ class Tooltip extends BaseComponent {
3795
3797
  return config;
3796
3798
  }
3797
3799
  _configAfterMerge(config) {
3798
- config.container = config.container === false ? document.body : getElement(config.container);
3800
+ config.container = config.container === false ? document.body : getElement$1(config.container);
3799
3801
  if (typeof config.delay === 'number') {
3800
3802
  config.delay = {
3801
3803
  show: config.delay,
@@ -3812,9 +3814,9 @@ class Tooltip extends BaseComponent {
3812
3814
  }
3813
3815
  _getDelegateConfig() {
3814
3816
  const config = {};
3815
- for (const key in this._config) {
3816
- if (this.constructor.Default[key] !== this._config[key]) {
3817
- config[key] = this._config[key];
3817
+ for (const [key, value] of Object.entries(this._config)) {
3818
+ if (this.constructor.Default[key] !== value) {
3819
+ config[key] = value;
3818
3820
  }
3819
3821
  }
3820
3822
  config.selector = false;
@@ -3855,11 +3857,11 @@ class Tooltip extends BaseComponent {
3855
3857
  * jQuery
3856
3858
  */
3857
3859
 
3858
- defineJQueryPlugin(Tooltip);
3860
+ defineJQueryPlugin$1(Tooltip);
3859
3861
 
3860
3862
  /**
3861
3863
  * --------------------------------------------------------------------------
3862
- * Bootstrap (v5.2.3): popover.js
3864
+ * Bootstrap popover.js
3863
3865
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3864
3866
  * --------------------------------------------------------------------------
3865
3867
  */
@@ -3936,11 +3938,11 @@ class Popover extends Tooltip {
3936
3938
  * jQuery
3937
3939
  */
3938
3940
 
3939
- defineJQueryPlugin(Popover);
3941
+ defineJQueryPlugin$1(Popover);
3940
3942
 
3941
3943
  /**
3942
3944
  * --------------------------------------------------------------------------
3943
- * Bootstrap (v5.2.3): scrollspy.js
3945
+ * Bootstrap scrollspy.js
3944
3946
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3945
3947
  * --------------------------------------------------------------------------
3946
3948
  */
@@ -4038,7 +4040,7 @@ let ScrollSpy$1 = class ScrollSpy extends BaseComponent {
4038
4040
  // Private
4039
4041
  _configAfterMerge(config) {
4040
4042
  // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case
4041
- config.target = getElement(config.target) || document.body;
4043
+ config.target = getElement$1(config.target) || document.body;
4042
4044
 
4043
4045
  // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only
4044
4046
  config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;
@@ -4124,11 +4126,11 @@ let ScrollSpy$1 = class ScrollSpy extends BaseComponent {
4124
4126
  if (!anchor.hash || isDisabled(anchor)) {
4125
4127
  continue;
4126
4128
  }
4127
- const observableSection = SelectorEngine.findOne(anchor.hash, this._element);
4129
+ const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element);
4128
4130
 
4129
4131
  // ensure that the observableSection exists & is visible
4130
4132
  if (isVisible(observableSection)) {
4131
- this._targetLinks.set(anchor.hash, anchor);
4133
+ this._targetLinks.set(decodeURI(anchor.hash), anchor);
4132
4134
  this._observableSections.set(anchor.hash, observableSection);
4133
4135
  }
4134
4136
  }
@@ -4196,7 +4198,7 @@ EventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {
4196
4198
  * jQuery
4197
4199
  */
4198
4200
 
4199
- defineJQueryPlugin(ScrollSpy$1);
4201
+ defineJQueryPlugin$1(ScrollSpy$1);
4200
4202
 
4201
4203
  /**
4202
4204
  * --------------------------------------------------------------------------
@@ -4260,6 +4262,99 @@ const Manipulator = {
4260
4262
  }
4261
4263
  };
4262
4264
 
4265
+ /**
4266
+ * --------------------------------------------------------------------------
4267
+ * Bootstrap (v5.2.3): util/index.js
4268
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4269
+ * --------------------------------------------------------------------------
4270
+ */
4271
+
4272
+ const getSelector = element => {
4273
+ let selector = element.getAttribute('data-bs-target');
4274
+ if (!selector || selector === '#') {
4275
+ let hrefAttribute = element.getAttribute('href');
4276
+
4277
+ // The only valid content that could double as a selector are IDs or classes,
4278
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
4279
+ // `document.querySelector` will rightfully complain it is invalid.
4280
+ // See https://github.com/twbs/bootstrap/issues/32273
4281
+ if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {
4282
+ return null;
4283
+ }
4284
+
4285
+ // Just in case some CMS puts out a full URL with the anchor appended
4286
+ if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {
4287
+ hrefAttribute = `#${hrefAttribute.split('#')[1]}`;
4288
+ }
4289
+ selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;
4290
+ }
4291
+ return selector;
4292
+ };
4293
+ const getSelectorFromElement = element => {
4294
+ const selector = getSelector(element);
4295
+ if (selector) {
4296
+ return document.querySelector(selector) ? selector : null;
4297
+ }
4298
+ return null;
4299
+ };
4300
+ const isElement = object => {
4301
+ if (!object || typeof object !== 'object') {
4302
+ return false;
4303
+ }
4304
+ if (typeof object.jquery !== 'undefined') {
4305
+ object = object[0];
4306
+ }
4307
+ return typeof object.nodeType !== 'undefined';
4308
+ };
4309
+ const getElement = object => {
4310
+ // it's a jQuery object or a node element
4311
+ if (isElement(object)) {
4312
+ return object.jquery ? object[0] : object;
4313
+ }
4314
+ if (typeof object === 'string' && object.length > 0) {
4315
+ return document.querySelector(object);
4316
+ }
4317
+ return null;
4318
+ };
4319
+ const getjQuery = () => {
4320
+ if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
4321
+ return window.jQuery;
4322
+ }
4323
+ return null;
4324
+ };
4325
+ const DOMContentLoadedCallbacks = [];
4326
+ const onDOMContentLoaded = callback => {
4327
+ if (document.readyState === 'loading') {
4328
+ // add listener on the first call when the document is in loading state
4329
+ if (!DOMContentLoadedCallbacks.length) {
4330
+ document.addEventListener('DOMContentLoaded', () => {
4331
+ for (const callback of DOMContentLoadedCallbacks) {
4332
+ callback();
4333
+ }
4334
+ });
4335
+ }
4336
+ DOMContentLoadedCallbacks.push(callback);
4337
+ } else {
4338
+ callback();
4339
+ }
4340
+ };
4341
+ const defineJQueryPlugin = plugin => {
4342
+ onDOMContentLoaded(() => {
4343
+ const $ = getjQuery();
4344
+ /* istanbul ignore if */
4345
+ if ($) {
4346
+ const name = plugin.NAME;
4347
+ const JQUERY_NO_CONFLICT = $.fn[name];
4348
+ $.fn[name] = plugin.jQueryInterface;
4349
+ $.fn[name].Constructor = plugin;
4350
+ $.fn[name].noConflict = () => {
4351
+ $.fn[name] = JQUERY_NO_CONFLICT;
4352
+ return plugin.jQueryInterface;
4353
+ };
4354
+ }
4355
+ });
4356
+ };
4357
+
4263
4358
  /**
4264
4359
  * --------------------------------------------------------------------------
4265
4360
  * Bootstrap (v5.1.3): scrollspy.js
@@ -4469,7 +4564,7 @@ defineJQueryPlugin(ScrollSpy);
4469
4564
 
4470
4565
  /**
4471
4566
  * --------------------------------------------------------------------------
4472
- * Bootstrap (v5.2.3): tab.js
4567
+ * Bootstrap tab.js
4473
4568
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4474
4569
  * --------------------------------------------------------------------------
4475
4570
  */
@@ -4493,17 +4588,19 @@ const ARROW_LEFT_KEY = 'ArrowLeft';
4493
4588
  const ARROW_RIGHT_KEY = 'ArrowRight';
4494
4589
  const ARROW_UP_KEY = 'ArrowUp';
4495
4590
  const ARROW_DOWN_KEY = 'ArrowDown';
4591
+ const HOME_KEY = 'Home';
4592
+ const END_KEY = 'End';
4496
4593
  const CLASS_NAME_ACTIVE = 'active';
4497
4594
  const CLASS_NAME_FADE$1 = 'fade';
4498
4595
  const CLASS_NAME_SHOW$1 = 'show';
4499
4596
  const CLASS_DROPDOWN = 'dropdown';
4500
4597
  const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
4501
4598
  const SELECTOR_DROPDOWN_MENU = '.dropdown-menu';
4502
- const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)';
4599
+ const NOT_SELECTOR_DROPDOWN_TOGGLE = `:not(${SELECTOR_DROPDOWN_TOGGLE})`;
4503
4600
  const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
4504
4601
  const SELECTOR_OUTER = '.nav-item, .list-group-item';
4505
4602
  const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role="tab"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`;
4506
- const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'; // todo:v6: could be only `tab`
4603
+ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'; // TODO: could only be `tab` in v6
4507
4604
  const SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`;
4508
4605
  const SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle="tab"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="pill"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="list"]`;
4509
4606
 
@@ -4517,7 +4614,7 @@ class Tab extends BaseComponent {
4517
4614
  this._parent = this._element.closest(SELECTOR_TAB_PANEL);
4518
4615
  if (!this._parent) {
4519
4616
  return;
4520
- // todo: should Throw exception on v6
4617
+ // TODO: should throw exception in v6
4521
4618
  // throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)
4522
4619
  }
4523
4620
 
@@ -4560,7 +4657,7 @@ class Tab extends BaseComponent {
4560
4657
  return;
4561
4658
  }
4562
4659
  element.classList.add(CLASS_NAME_ACTIVE);
4563
- this._activate(getElementFromSelector(element)); // Search and activate/show the proper section
4660
+ this._activate(SelectorEngine.getElementFromSelector(element)); // Search and activate/show the proper section
4564
4661
 
4565
4662
  const complete = () => {
4566
4663
  if (element.getAttribute('role') !== 'tab') {
@@ -4582,7 +4679,7 @@ class Tab extends BaseComponent {
4582
4679
  }
4583
4680
  element.classList.remove(CLASS_NAME_ACTIVE);
4584
4681
  element.blur();
4585
- this._deactivate(getElementFromSelector(element)); // Search and deactivate the shown section too
4682
+ this._deactivate(SelectorEngine.getElementFromSelector(element)); // Search and deactivate the shown section too
4586
4683
 
4587
4684
  const complete = () => {
4588
4685
  if (element.getAttribute('role') !== 'tab') {
@@ -4599,13 +4696,19 @@ class Tab extends BaseComponent {
4599
4696
  this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));
4600
4697
  }
4601
4698
  _keydown(event) {
4602
- if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key)) {
4699
+ if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY, HOME_KEY, END_KEY].includes(event.key)) {
4603
4700
  return;
4604
4701
  }
4605
4702
  event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page
4606
4703
  event.preventDefault();
4607
- const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key);
4608
- const nextActiveElement = getNextActiveElement(this._getChildren().filter(element => !isDisabled(element)), event.target, isNext, true);
4704
+ const children = this._getChildren().filter(element => !isDisabled(element));
4705
+ let nextActiveElement;
4706
+ if ([HOME_KEY, END_KEY].includes(event.key)) {
4707
+ nextActiveElement = children[event.key === HOME_KEY ? 0 : children.length - 1];
4708
+ } else {
4709
+ const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key);
4710
+ nextActiveElement = getNextActiveElement(children, event.target, isNext, true);
4711
+ }
4609
4712
  if (nextActiveElement) {
4610
4713
  nextActiveElement.focus({
4611
4714
  preventScroll: true
@@ -4643,13 +4746,13 @@ class Tab extends BaseComponent {
4643
4746
  this._setInitialAttributesOnTargetPanel(child);
4644
4747
  }
4645
4748
  _setInitialAttributesOnTargetPanel(child) {
4646
- const target = getElementFromSelector(child);
4749
+ const target = SelectorEngine.getElementFromSelector(child);
4647
4750
  if (!target) {
4648
4751
  return;
4649
4752
  }
4650
4753
  this._setAttributeIfNotExists(target, 'role', 'tabpanel');
4651
4754
  if (child.id) {
4652
- this._setAttributeIfNotExists(target, 'aria-labelledby', `#${child.id}`);
4755
+ this._setAttributeIfNotExists(target, 'aria-labelledby', `${child.id}`);
4653
4756
  }
4654
4757
  }
4655
4758
  _toggleDropDown(element, open) {
@@ -4727,11 +4830,11 @@ EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
4727
4830
  * jQuery
4728
4831
  */
4729
4832
 
4730
- defineJQueryPlugin(Tab);
4833
+ defineJQueryPlugin$1(Tab);
4731
4834
 
4732
4835
  /**
4733
4836
  * --------------------------------------------------------------------------
4734
- * Bootstrap (v5.2.3): toast.js
4837
+ * Bootstrap toast.js
4735
4838
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4736
4839
  * --------------------------------------------------------------------------
4737
4840
  */
@@ -4911,7 +5014,7 @@ enableDismissTrigger(Toast);
4911
5014
  * jQuery
4912
5015
  */
4913
5016
 
4914
- defineJQueryPlugin(Toast);
5017
+ defineJQueryPlugin$1(Toast);
4915
5018
 
4916
5019
  export { AccessibleToggle, AccordionToggle, Alert, Button, Carousel, Collapse, Dropdown, Gallery, Modal, Offcanvas, Popover, ScrollSpy, ScrollSpy$1 as ScrollSpyV2, Tab, Toast, Tooltip };
4917
5020
  //# sourceMappingURL=oe-bcl-joinup.esm.js.map