paraqeet 0.8.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/_layouts/default.html +9 -9
  4. data/_sass/_bootstrap-icons.scss +12 -2042
  5. data/_sass/_variables-dark.scss +0 -0
  6. data/_sass/bootstrap/_alert.scss +2 -2
  7. data/_sass/bootstrap/_button-group.scss +2 -2
  8. data/_sass/bootstrap/_buttons.scss +3 -3
  9. data/_sass/bootstrap/_card.scss +1 -0
  10. data/_sass/bootstrap/_carousel.scss +9 -3
  11. data/_sass/bootstrap/_close.scss +2 -0
  12. data/_sass/bootstrap/_functions.scss +1 -1
  13. data/_sass/bootstrap/_grid.scss +6 -0
  14. data/_sass/bootstrap/_helpers.scss +2 -0
  15. data/_sass/bootstrap/_list-group.scss +8 -15
  16. data/_sass/bootstrap/_maps.scss +70 -17
  17. data/_sass/bootstrap/_nav.scss +40 -3
  18. data/_sass/bootstrap/_navbar.scss +6 -4
  19. data/_sass/bootstrap/_pagination.scss +1 -1
  20. data/_sass/bootstrap/_root.scss +45 -52
  21. data/_sass/bootstrap/_tables.scss +1 -1
  22. data/_sass/bootstrap/_tooltip.scss +4 -5
  23. data/_sass/bootstrap/_utilities.scss +68 -10
  24. data/_sass/bootstrap/_variables-dark.scss +43 -28
  25. data/_sass/bootstrap/_variables.scss +110 -70
  26. data/_sass/bootstrap/bootstrap-grid.scss +0 -4
  27. data/_sass/bootstrap/forms/_floating-labels.scss +18 -15
  28. data/_sass/bootstrap/forms/_form-control.scss +16 -3
  29. data/_sass/bootstrap/forms/_form-select.scss +0 -1
  30. data/_sass/bootstrap/forms/_input-group.scss +1 -1
  31. data/_sass/bootstrap/helpers/_colored-links.scss +22 -2
  32. data/_sass/bootstrap/helpers/_focus-ring.scss +5 -0
  33. data/_sass/bootstrap/helpers/_icon-link.scss +25 -0
  34. data/_sass/bootstrap/mixins/_banner.scss +2 -2
  35. data/_sass/bootstrap/mixins/_list-group.scss +0 -1
  36. data/_sass/bootstrap/mixins/_utilities.scss +1 -1
  37. data/_sass/bootstrap/mixins/_visually-hidden.scss +5 -1
  38. data/_sass/bootstrap/tests/jasmine.js +16 -0
  39. data/_sass/bootstrap/tests/mixins/_color-modes.test.scss +69 -0
  40. data/_sass/bootstrap/tests/mixins/_media-query-color-mode-full.test.scss +8 -0
  41. data/_sass/bootstrap/tests/mixins/_utilities.test.scss +393 -0
  42. data/_sass/bootstrap/tests/sass-true/register.js +14 -0
  43. data/_sass/bootstrap/tests/sass-true/runner.js +17 -0
  44. data/_sass/bootstrap/tests/utilities/_api.test.scss +75 -0
  45. data/_sass/bootstrap/vendor/_rfs.scss +23 -29
  46. data/assets/bootstrap-icons/bootstrap-icons.svg +1 -1
  47. data/assets/bootstrap-icons/folder-plus.svg +2 -2
  48. data/assets/bootstrap-icons/fonts/bootstrap-icons.woff +0 -0
  49. data/assets/bootstrap-icons/fonts/bootstrap-icons.woff2 +0 -0
  50. data/assets/bootstrap-icons/postcard-heart-fill.svg +1 -1
  51. data/assets/bootstrap-icons/trash.svg +2 -2
  52. data/assets/css/style.scss +1 -0
  53. data/assets/js/bootstrap.bundle.js +6295 -0
  54. data/assets/js/bootstrap.bundle.js.map +1 -0
  55. data/assets/js/bootstrap.bundle.min.js +3 -3
  56. data/assets/js/bootstrap.bundle.min.js.map +1 -1
  57. data/assets/js/bootstrap.esm.js +4423 -0
  58. data/assets/js/bootstrap.esm.js.map +1 -0
  59. data/assets/js/bootstrap.esm.min.js +7 -0
  60. data/assets/js/bootstrap.esm.min.js.map +1 -0
  61. data/assets/js/bootstrap.js +4469 -0
  62. data/assets/js/bootstrap.js.map +1 -0
  63. data/assets/js/bootstrap.min.js +7 -0
  64. data/assets/js/bootstrap.min.js.map +1 -0
  65. data/assets/js/script.js +5 -0
  66. metadata +27 -6
@@ -0,0 +1,4423 @@
1
+ /*!
2
+ * Bootstrap v5.3.0-alpha3 (https://getbootstrap.com/)
3
+ * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
+ */
6
+ import * as Popper from '@popperjs/core';
7
+
8
+ /**
9
+ * --------------------------------------------------------------------------
10
+ * Bootstrap dom/data.js
11
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
12
+ * --------------------------------------------------------------------------
13
+ */
14
+
15
+ /**
16
+ * Constants
17
+ */
18
+
19
+ const elementMap = new Map();
20
+ const Data = {
21
+ set(element, key, instance) {
22
+ if (!elementMap.has(element)) {
23
+ elementMap.set(element, new Map());
24
+ }
25
+ const instanceMap = elementMap.get(element);
26
+
27
+ // make it clear we only want one instance per element
28
+ // can be removed later when multiple key/instances are fine to be used
29
+ if (!instanceMap.has(key) && instanceMap.size !== 0) {
30
+ // eslint-disable-next-line no-console
31
+ console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
32
+ return;
33
+ }
34
+ instanceMap.set(key, instance);
35
+ },
36
+ get(element, key) {
37
+ if (elementMap.has(element)) {
38
+ return elementMap.get(element).get(key) || null;
39
+ }
40
+ return null;
41
+ },
42
+ remove(element, key) {
43
+ if (!elementMap.has(element)) {
44
+ return;
45
+ }
46
+ const instanceMap = elementMap.get(element);
47
+ instanceMap.delete(key);
48
+
49
+ // free up element references if there are no instances left for an element
50
+ if (instanceMap.size === 0) {
51
+ elementMap.delete(element);
52
+ }
53
+ }
54
+ };
55
+
56
+ /**
57
+ * --------------------------------------------------------------------------
58
+ * Bootstrap util/index.js
59
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
60
+ * --------------------------------------------------------------------------
61
+ */
62
+
63
+ const MAX_UID = 1000000;
64
+ const MILLISECONDS_MULTIPLIER = 1000;
65
+ const TRANSITION_END = 'transitionend';
66
+
67
+ /**
68
+ * Properly escape IDs selectors to handle weird IDs
69
+ * @param {string} selector
70
+ * @returns {string}
71
+ */
72
+ const parseSelector = selector => {
73
+ if (selector && window.CSS && window.CSS.escape) {
74
+ // document.querySelector needs escaping to handle IDs (html5+) containing for instance /
75
+ selector = selector.replace(/#([^\s"#']+)/g, (match, id) => `#${CSS.escape(id)}`);
76
+ }
77
+ return selector;
78
+ };
79
+
80
+ // Shout-out Angus Croll (https://goo.gl/pxwQGp)
81
+ const toType = object => {
82
+ if (object === null || object === undefined) {
83
+ return `${object}`;
84
+ }
85
+ return Object.prototype.toString.call(object).match(/\s([a-z]+)/i)[1].toLowerCase();
86
+ };
87
+
88
+ /**
89
+ * Public Util API
90
+ */
91
+
92
+ const getUID = prefix => {
93
+ do {
94
+ prefix += Math.floor(Math.random() * MAX_UID);
95
+ } while (document.getElementById(prefix));
96
+ return prefix;
97
+ };
98
+ const getTransitionDurationFromElement = element => {
99
+ if (!element) {
100
+ return 0;
101
+ }
102
+
103
+ // Get transition-duration of the element
104
+ let {
105
+ transitionDuration,
106
+ transitionDelay
107
+ } = window.getComputedStyle(element);
108
+ const floatTransitionDuration = Number.parseFloat(transitionDuration);
109
+ const floatTransitionDelay = Number.parseFloat(transitionDelay);
110
+
111
+ // Return 0 if element or transition duration is not found
112
+ if (!floatTransitionDuration && !floatTransitionDelay) {
113
+ return 0;
114
+ }
115
+
116
+ // If multiple durations are defined, take the first
117
+ transitionDuration = transitionDuration.split(',')[0];
118
+ transitionDelay = transitionDelay.split(',')[0];
119
+ return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
120
+ };
121
+ const triggerTransitionEnd = element => {
122
+ element.dispatchEvent(new Event(TRANSITION_END));
123
+ };
124
+ const isElement = object => {
125
+ if (!object || typeof object !== 'object') {
126
+ return false;
127
+ }
128
+ if (typeof object.jquery !== 'undefined') {
129
+ object = object[0];
130
+ }
131
+ return typeof object.nodeType !== 'undefined';
132
+ };
133
+ const getElement = object => {
134
+ // it's a jQuery object or a node element
135
+ if (isElement(object)) {
136
+ return object.jquery ? object[0] : object;
137
+ }
138
+ if (typeof object === 'string' && object.length > 0) {
139
+ return document.querySelector(parseSelector(object));
140
+ }
141
+ return null;
142
+ };
143
+ const isVisible = element => {
144
+ if (!isElement(element) || element.getClientRects().length === 0) {
145
+ return false;
146
+ }
147
+ const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible';
148
+ // Handle `details` element as its content may falsie appear visible when it is closed
149
+ const closedDetails = element.closest('details:not([open])');
150
+ if (!closedDetails) {
151
+ return elementIsVisible;
152
+ }
153
+ if (closedDetails !== element) {
154
+ const summary = element.closest('summary');
155
+ if (summary && summary.parentNode !== closedDetails) {
156
+ return false;
157
+ }
158
+ if (summary === null) {
159
+ return false;
160
+ }
161
+ }
162
+ return elementIsVisible;
163
+ };
164
+ const isDisabled = element => {
165
+ if (!element || element.nodeType !== Node.ELEMENT_NODE) {
166
+ return true;
167
+ }
168
+ if (element.classList.contains('disabled')) {
169
+ return true;
170
+ }
171
+ if (typeof element.disabled !== 'undefined') {
172
+ return element.disabled;
173
+ }
174
+ return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
175
+ };
176
+ const findShadowRoot = element => {
177
+ if (!document.documentElement.attachShadow) {
178
+ return null;
179
+ }
180
+
181
+ // Can find the shadow root otherwise it'll return the document
182
+ if (typeof element.getRootNode === 'function') {
183
+ const root = element.getRootNode();
184
+ return root instanceof ShadowRoot ? root : null;
185
+ }
186
+ if (element instanceof ShadowRoot) {
187
+ return element;
188
+ }
189
+
190
+ // when we don't find a shadow root
191
+ if (!element.parentNode) {
192
+ return null;
193
+ }
194
+ return findShadowRoot(element.parentNode);
195
+ };
196
+ const noop = () => {};
197
+
198
+ /**
199
+ * Trick to restart an element's animation
200
+ *
201
+ * @param {HTMLElement} element
202
+ * @return void
203
+ *
204
+ * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
205
+ */
206
+ const reflow = element => {
207
+ element.offsetHeight; // eslint-disable-line no-unused-expressions
208
+ };
209
+
210
+ const getjQuery = () => {
211
+ if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
212
+ return window.jQuery;
213
+ }
214
+ return null;
215
+ };
216
+ const DOMContentLoadedCallbacks = [];
217
+ const onDOMContentLoaded = callback => {
218
+ if (document.readyState === 'loading') {
219
+ // add listener on the first call when the document is in loading state
220
+ if (!DOMContentLoadedCallbacks.length) {
221
+ document.addEventListener('DOMContentLoaded', () => {
222
+ for (const callback of DOMContentLoadedCallbacks) {
223
+ callback();
224
+ }
225
+ });
226
+ }
227
+ DOMContentLoadedCallbacks.push(callback);
228
+ } else {
229
+ callback();
230
+ }
231
+ };
232
+ const isRTL = () => document.documentElement.dir === 'rtl';
233
+ const defineJQueryPlugin = plugin => {
234
+ onDOMContentLoaded(() => {
235
+ const $ = getjQuery();
236
+ /* istanbul ignore if */
237
+ if ($) {
238
+ const name = plugin.NAME;
239
+ const JQUERY_NO_CONFLICT = $.fn[name];
240
+ $.fn[name] = plugin.jQueryInterface;
241
+ $.fn[name].Constructor = plugin;
242
+ $.fn[name].noConflict = () => {
243
+ $.fn[name] = JQUERY_NO_CONFLICT;
244
+ return plugin.jQueryInterface;
245
+ };
246
+ }
247
+ });
248
+ };
249
+ const execute = (possibleCallback, args = [], defaultValue = possibleCallback) => {
250
+ return typeof possibleCallback === 'function' ? possibleCallback(...args) : defaultValue;
251
+ };
252
+ const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
253
+ if (!waitForTransition) {
254
+ execute(callback);
255
+ return;
256
+ }
257
+ const durationPadding = 5;
258
+ const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;
259
+ let called = false;
260
+ const handler = ({
261
+ target
262
+ }) => {
263
+ if (target !== transitionElement) {
264
+ return;
265
+ }
266
+ called = true;
267
+ transitionElement.removeEventListener(TRANSITION_END, handler);
268
+ execute(callback);
269
+ };
270
+ transitionElement.addEventListener(TRANSITION_END, handler);
271
+ setTimeout(() => {
272
+ if (!called) {
273
+ triggerTransitionEnd(transitionElement);
274
+ }
275
+ }, emulatedDuration);
276
+ };
277
+
278
+ /**
279
+ * Return the previous/next element of a list.
280
+ *
281
+ * @param {array} list The list of elements
282
+ * @param activeElement The active element
283
+ * @param shouldGetNext Choose to get next or previous element
284
+ * @param isCycleAllowed
285
+ * @return {Element|elem} The proper element
286
+ */
287
+ const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {
288
+ const listLength = list.length;
289
+ let index = list.indexOf(activeElement);
290
+
291
+ // if the element does not exist in the list return an element
292
+ // depending on the direction and if cycle is allowed
293
+ if (index === -1) {
294
+ return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0];
295
+ }
296
+ index += shouldGetNext ? 1 : -1;
297
+ if (isCycleAllowed) {
298
+ index = (index + listLength) % listLength;
299
+ }
300
+ return list[Math.max(0, Math.min(index, listLength - 1))];
301
+ };
302
+
303
+ /**
304
+ * --------------------------------------------------------------------------
305
+ * Bootstrap dom/event-handler.js
306
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
307
+ * --------------------------------------------------------------------------
308
+ */
309
+
310
+ /**
311
+ * Constants
312
+ */
313
+
314
+ const namespaceRegex = /[^.]*(?=\..*)\.|.*/;
315
+ const stripNameRegex = /\..*/;
316
+ const stripUidRegex = /::\d+$/;
317
+ const eventRegistry = {}; // Events storage
318
+ let uidEvent = 1;
319
+ const customEvents = {
320
+ mouseenter: 'mouseover',
321
+ mouseleave: 'mouseout'
322
+ };
323
+ const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);
324
+
325
+ /**
326
+ * Private methods
327
+ */
328
+
329
+ function makeEventUid(element, uid) {
330
+ return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;
331
+ }
332
+ function getElementEvents(element) {
333
+ const uid = makeEventUid(element);
334
+ element.uidEvent = uid;
335
+ eventRegistry[uid] = eventRegistry[uid] || {};
336
+ return eventRegistry[uid];
337
+ }
338
+ function bootstrapHandler(element, fn) {
339
+ return function handler(event) {
340
+ hydrateObj(event, {
341
+ delegateTarget: element
342
+ });
343
+ if (handler.oneOff) {
344
+ EventHandler.off(element, event.type, fn);
345
+ }
346
+ return fn.apply(element, [event]);
347
+ };
348
+ }
349
+ function bootstrapDelegationHandler(element, selector, fn) {
350
+ return function handler(event) {
351
+ const domElements = element.querySelectorAll(selector);
352
+ for (let {
353
+ target
354
+ } = event; target && target !== this; target = target.parentNode) {
355
+ for (const domElement of domElements) {
356
+ if (domElement !== target) {
357
+ continue;
358
+ }
359
+ hydrateObj(event, {
360
+ delegateTarget: target
361
+ });
362
+ if (handler.oneOff) {
363
+ EventHandler.off(element, event.type, selector, fn);
364
+ }
365
+ return fn.apply(target, [event]);
366
+ }
367
+ }
368
+ };
369
+ }
370
+ function findHandler(events, callable, delegationSelector = null) {
371
+ return Object.values(events).find(event => event.callable === callable && event.delegationSelector === delegationSelector);
372
+ }
373
+ function normalizeParameters(originalTypeEvent, handler, delegationFunction) {
374
+ const isDelegated = typeof handler === 'string';
375
+ // TODO: tooltip passes `false` instead of selector, so we need to check
376
+ const callable = isDelegated ? delegationFunction : handler || delegationFunction;
377
+ let typeEvent = getTypeEvent(originalTypeEvent);
378
+ if (!nativeEvents.has(typeEvent)) {
379
+ typeEvent = originalTypeEvent;
380
+ }
381
+ return [isDelegated, callable, typeEvent];
382
+ }
383
+ function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {
384
+ if (typeof originalTypeEvent !== 'string' || !element) {
385
+ return;
386
+ }
387
+ let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);
388
+
389
+ // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
390
+ // this prevents the handler from being dispatched the same way as mouseover or mouseout does
391
+ if (originalTypeEvent in customEvents) {
392
+ const wrapFunction = fn => {
393
+ return function (event) {
394
+ if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {
395
+ return fn.call(this, event);
396
+ }
397
+ };
398
+ };
399
+ callable = wrapFunction(callable);
400
+ }
401
+ const events = getElementEvents(element);
402
+ const handlers = events[typeEvent] || (events[typeEvent] = {});
403
+ const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null);
404
+ if (previousFunction) {
405
+ previousFunction.oneOff = previousFunction.oneOff && oneOff;
406
+ return;
407
+ }
408
+ const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''));
409
+ const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable);
410
+ fn.delegationSelector = isDelegated ? handler : null;
411
+ fn.callable = callable;
412
+ fn.oneOff = oneOff;
413
+ fn.uidEvent = uid;
414
+ handlers[uid] = fn;
415
+ element.addEventListener(typeEvent, fn, isDelegated);
416
+ }
417
+ function removeHandler(element, events, typeEvent, handler, delegationSelector) {
418
+ const fn = findHandler(events[typeEvent], handler, delegationSelector);
419
+ if (!fn) {
420
+ return;
421
+ }
422
+ element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
423
+ delete events[typeEvent][fn.uidEvent];
424
+ }
425
+ function removeNamespacedHandlers(element, events, typeEvent, namespace) {
426
+ const storeElementEvent = events[typeEvent] || {};
427
+ for (const [handlerKey, event] of Object.entries(storeElementEvent)) {
428
+ if (handlerKey.includes(namespace)) {
429
+ removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
430
+ }
431
+ }
432
+ }
433
+ function getTypeEvent(event) {
434
+ // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
435
+ event = event.replace(stripNameRegex, '');
436
+ return customEvents[event] || event;
437
+ }
438
+ const EventHandler = {
439
+ on(element, event, handler, delegationFunction) {
440
+ addHandler(element, event, handler, delegationFunction, false);
441
+ },
442
+ one(element, event, handler, delegationFunction) {
443
+ addHandler(element, event, handler, delegationFunction, true);
444
+ },
445
+ off(element, originalTypeEvent, handler, delegationFunction) {
446
+ if (typeof originalTypeEvent !== 'string' || !element) {
447
+ return;
448
+ }
449
+ const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);
450
+ const inNamespace = typeEvent !== originalTypeEvent;
451
+ const events = getElementEvents(element);
452
+ const storeElementEvent = events[typeEvent] || {};
453
+ const isNamespace = originalTypeEvent.startsWith('.');
454
+ if (typeof callable !== 'undefined') {
455
+ // Simplest case: handler is passed, remove that listener ONLY.
456
+ if (!Object.keys(storeElementEvent).length) {
457
+ return;
458
+ }
459
+ removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null);
460
+ return;
461
+ }
462
+ if (isNamespace) {
463
+ for (const elementEvent of Object.keys(events)) {
464
+ removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
465
+ }
466
+ }
467
+ for (const [keyHandlers, event] of Object.entries(storeElementEvent)) {
468
+ const handlerKey = keyHandlers.replace(stripUidRegex, '');
469
+ if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
470
+ removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
471
+ }
472
+ }
473
+ },
474
+ trigger(element, event, args) {
475
+ if (typeof event !== 'string' || !element) {
476
+ return null;
477
+ }
478
+ const $ = getjQuery();
479
+ const typeEvent = getTypeEvent(event);
480
+ const inNamespace = event !== typeEvent;
481
+ let jQueryEvent = null;
482
+ let bubbles = true;
483
+ let nativeDispatch = true;
484
+ let defaultPrevented = false;
485
+ if (inNamespace && $) {
486
+ jQueryEvent = $.Event(event, args);
487
+ $(element).trigger(jQueryEvent);
488
+ bubbles = !jQueryEvent.isPropagationStopped();
489
+ nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
490
+ defaultPrevented = jQueryEvent.isDefaultPrevented();
491
+ }
492
+ const evt = hydrateObj(new Event(event, {
493
+ bubbles,
494
+ cancelable: true
495
+ }), args);
496
+ if (defaultPrevented) {
497
+ evt.preventDefault();
498
+ }
499
+ if (nativeDispatch) {
500
+ element.dispatchEvent(evt);
501
+ }
502
+ if (evt.defaultPrevented && jQueryEvent) {
503
+ jQueryEvent.preventDefault();
504
+ }
505
+ return evt;
506
+ }
507
+ };
508
+ function hydrateObj(obj, meta = {}) {
509
+ for (const [key, value] of Object.entries(meta)) {
510
+ try {
511
+ obj[key] = value;
512
+ } catch (_unused) {
513
+ Object.defineProperty(obj, key, {
514
+ configurable: true,
515
+ get() {
516
+ return value;
517
+ }
518
+ });
519
+ }
520
+ }
521
+ return obj;
522
+ }
523
+
524
+ /**
525
+ * --------------------------------------------------------------------------
526
+ * Bootstrap dom/manipulator.js
527
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
528
+ * --------------------------------------------------------------------------
529
+ */
530
+
531
+ function normalizeData(value) {
532
+ if (value === 'true') {
533
+ return true;
534
+ }
535
+ if (value === 'false') {
536
+ return false;
537
+ }
538
+ if (value === Number(value).toString()) {
539
+ return Number(value);
540
+ }
541
+ if (value === '' || value === 'null') {
542
+ return null;
543
+ }
544
+ if (typeof value !== 'string') {
545
+ return value;
546
+ }
547
+ try {
548
+ return JSON.parse(decodeURIComponent(value));
549
+ } catch (_unused) {
550
+ return value;
551
+ }
552
+ }
553
+ function normalizeDataKey(key) {
554
+ return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);
555
+ }
556
+ const Manipulator = {
557
+ setDataAttribute(element, key, value) {
558
+ element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);
559
+ },
560
+ removeDataAttribute(element, key) {
561
+ element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);
562
+ },
563
+ getDataAttributes(element) {
564
+ if (!element) {
565
+ return {};
566
+ }
567
+ const attributes = {};
568
+ const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'));
569
+ for (const key of bsKeys) {
570
+ let pureKey = key.replace(/^bs/, '');
571
+ pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);
572
+ attributes[pureKey] = normalizeData(element.dataset[key]);
573
+ }
574
+ return attributes;
575
+ },
576
+ getDataAttribute(element, key) {
577
+ return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));
578
+ }
579
+ };
580
+
581
+ /**
582
+ * --------------------------------------------------------------------------
583
+ * Bootstrap util/config.js
584
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
585
+ * --------------------------------------------------------------------------
586
+ */
587
+
588
+ /**
589
+ * Class definition
590
+ */
591
+
592
+ class Config {
593
+ // Getters
594
+ static get Default() {
595
+ return {};
596
+ }
597
+ static get DefaultType() {
598
+ return {};
599
+ }
600
+ static get NAME() {
601
+ throw new Error('You have to implement the static method "NAME", for each component!');
602
+ }
603
+ _getConfig(config) {
604
+ config = this._mergeConfigObj(config);
605
+ config = this._configAfterMerge(config);
606
+ this._typeCheckConfig(config);
607
+ return config;
608
+ }
609
+ _configAfterMerge(config) {
610
+ return config;
611
+ }
612
+ _mergeConfigObj(config, element) {
613
+ const jsonConfig = isElement(element) ? Manipulator.getDataAttribute(element, 'config') : {}; // try to parse
614
+
615
+ return {
616
+ ...this.constructor.Default,
617
+ ...(typeof jsonConfig === 'object' ? jsonConfig : {}),
618
+ ...(isElement(element) ? Manipulator.getDataAttributes(element) : {}),
619
+ ...(typeof config === 'object' ? config : {})
620
+ };
621
+ }
622
+ _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {
623
+ for (const [property, expectedTypes] of Object.entries(configTypes)) {
624
+ const value = config[property];
625
+ const valueType = isElement(value) ? 'element' : toType(value);
626
+ if (!new RegExp(expectedTypes).test(valueType)) {
627
+ throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
628
+ }
629
+ }
630
+ }
631
+ }
632
+
633
+ /**
634
+ * --------------------------------------------------------------------------
635
+ * Bootstrap base-component.js
636
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
637
+ * --------------------------------------------------------------------------
638
+ */
639
+
640
+ /**
641
+ * Constants
642
+ */
643
+
644
+ const VERSION = '5.3.0-alpha2';
645
+
646
+ /**
647
+ * Class definition
648
+ */
649
+
650
+ class BaseComponent extends Config {
651
+ constructor(element, config) {
652
+ super();
653
+ element = getElement(element);
654
+ if (!element) {
655
+ return;
656
+ }
657
+ this._element = element;
658
+ this._config = this._getConfig(config);
659
+ Data.set(this._element, this.constructor.DATA_KEY, this);
660
+ }
661
+
662
+ // Public
663
+ dispose() {
664
+ Data.remove(this._element, this.constructor.DATA_KEY);
665
+ EventHandler.off(this._element, this.constructor.EVENT_KEY);
666
+ for (const propertyName of Object.getOwnPropertyNames(this)) {
667
+ this[propertyName] = null;
668
+ }
669
+ }
670
+ _queueCallback(callback, element, isAnimated = true) {
671
+ executeAfterTransition(callback, element, isAnimated);
672
+ }
673
+ _getConfig(config) {
674
+ config = this._mergeConfigObj(config, this._element);
675
+ config = this._configAfterMerge(config);
676
+ this._typeCheckConfig(config);
677
+ return config;
678
+ }
679
+
680
+ // Static
681
+ static getInstance(element) {
682
+ return Data.get(getElement(element), this.DATA_KEY);
683
+ }
684
+ static getOrCreateInstance(element, config = {}) {
685
+ return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);
686
+ }
687
+ static get VERSION() {
688
+ return VERSION;
689
+ }
690
+ static get DATA_KEY() {
691
+ return `bs.${this.NAME}`;
692
+ }
693
+ static get EVENT_KEY() {
694
+ return `.${this.DATA_KEY}`;
695
+ }
696
+ static eventName(name) {
697
+ return `${name}${this.EVENT_KEY}`;
698
+ }
699
+ }
700
+
701
+ /**
702
+ * --------------------------------------------------------------------------
703
+ * Bootstrap dom/selector-engine.js
704
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
705
+ * --------------------------------------------------------------------------
706
+ */
707
+ const getSelector = element => {
708
+ let selector = element.getAttribute('data-bs-target');
709
+ if (!selector || selector === '#') {
710
+ let hrefAttribute = element.getAttribute('href');
711
+
712
+ // The only valid content that could double as a selector are IDs or classes,
713
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
714
+ // `document.querySelector` will rightfully complain it is invalid.
715
+ // See https://github.com/twbs/bootstrap/issues/32273
716
+ if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {
717
+ return null;
718
+ }
719
+
720
+ // Just in case some CMS puts out a full URL with the anchor appended
721
+ if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {
722
+ hrefAttribute = `#${hrefAttribute.split('#')[1]}`;
723
+ }
724
+ selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;
725
+ }
726
+ return parseSelector(selector);
727
+ };
728
+ const SelectorEngine = {
729
+ find(selector, element = document.documentElement) {
730
+ return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
731
+ },
732
+ findOne(selector, element = document.documentElement) {
733
+ return Element.prototype.querySelector.call(element, selector);
734
+ },
735
+ children(element, selector) {
736
+ return [].concat(...element.children).filter(child => child.matches(selector));
737
+ },
738
+ parents(element, selector) {
739
+ const parents = [];
740
+ let ancestor = element.parentNode.closest(selector);
741
+ while (ancestor) {
742
+ parents.push(ancestor);
743
+ ancestor = ancestor.parentNode.closest(selector);
744
+ }
745
+ return parents;
746
+ },
747
+ prev(element, selector) {
748
+ let previous = element.previousElementSibling;
749
+ while (previous) {
750
+ if (previous.matches(selector)) {
751
+ return [previous];
752
+ }
753
+ previous = previous.previousElementSibling;
754
+ }
755
+ return [];
756
+ },
757
+ // TODO: this is now unused; remove later along with prev()
758
+ next(element, selector) {
759
+ let next = element.nextElementSibling;
760
+ while (next) {
761
+ if (next.matches(selector)) {
762
+ return [next];
763
+ }
764
+ next = next.nextElementSibling;
765
+ }
766
+ return [];
767
+ },
768
+ focusableChildren(element) {
769
+ const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(',');
770
+ return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));
771
+ },
772
+ getSelectorFromElement(element) {
773
+ const selector = getSelector(element);
774
+ if (selector) {
775
+ return SelectorEngine.findOne(selector) ? selector : null;
776
+ }
777
+ return null;
778
+ },
779
+ getElementFromSelector(element) {
780
+ const selector = getSelector(element);
781
+ return selector ? SelectorEngine.findOne(selector) : null;
782
+ },
783
+ getMultipleElementsFromSelector(element) {
784
+ const selector = getSelector(element);
785
+ return selector ? SelectorEngine.find(selector) : [];
786
+ }
787
+ };
788
+
789
+ /**
790
+ * --------------------------------------------------------------------------
791
+ * Bootstrap util/component-functions.js
792
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
793
+ * --------------------------------------------------------------------------
794
+ */
795
+ const enableDismissTrigger = (component, method = 'hide') => {
796
+ const clickEvent = `click.dismiss${component.EVENT_KEY}`;
797
+ const name = component.NAME;
798
+ EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
799
+ if (['A', 'AREA'].includes(this.tagName)) {
800
+ event.preventDefault();
801
+ }
802
+ if (isDisabled(this)) {
803
+ return;
804
+ }
805
+ const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`);
806
+ const instance = component.getOrCreateInstance(target);
807
+
808
+ // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
809
+ instance[method]();
810
+ });
811
+ };
812
+
813
+ /**
814
+ * --------------------------------------------------------------------------
815
+ * Bootstrap alert.js
816
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
817
+ * --------------------------------------------------------------------------
818
+ */
819
+
820
+ /**
821
+ * Constants
822
+ */
823
+
824
+ const NAME$f = 'alert';
825
+ const DATA_KEY$a = 'bs.alert';
826
+ const EVENT_KEY$b = `.${DATA_KEY$a}`;
827
+ const EVENT_CLOSE = `close${EVENT_KEY$b}`;
828
+ const EVENT_CLOSED = `closed${EVENT_KEY$b}`;
829
+ const CLASS_NAME_FADE$5 = 'fade';
830
+ const CLASS_NAME_SHOW$8 = 'show';
831
+
832
+ /**
833
+ * Class definition
834
+ */
835
+
836
+ class Alert extends BaseComponent {
837
+ // Getters
838
+ static get NAME() {
839
+ return NAME$f;
840
+ }
841
+
842
+ // Public
843
+ close() {
844
+ const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);
845
+ if (closeEvent.defaultPrevented) {
846
+ return;
847
+ }
848
+ this._element.classList.remove(CLASS_NAME_SHOW$8);
849
+ const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);
850
+ this._queueCallback(() => this._destroyElement(), this._element, isAnimated);
851
+ }
852
+
853
+ // Private
854
+ _destroyElement() {
855
+ this._element.remove();
856
+ EventHandler.trigger(this._element, EVENT_CLOSED);
857
+ this.dispose();
858
+ }
859
+
860
+ // Static
861
+ static jQueryInterface(config) {
862
+ return this.each(function () {
863
+ const data = Alert.getOrCreateInstance(this);
864
+ if (typeof config !== 'string') {
865
+ return;
866
+ }
867
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
868
+ throw new TypeError(`No method named "${config}"`);
869
+ }
870
+ data[config](this);
871
+ });
872
+ }
873
+ }
874
+
875
+ /**
876
+ * Data API implementation
877
+ */
878
+
879
+ enableDismissTrigger(Alert, 'close');
880
+
881
+ /**
882
+ * jQuery
883
+ */
884
+
885
+ defineJQueryPlugin(Alert);
886
+
887
+ /**
888
+ * --------------------------------------------------------------------------
889
+ * Bootstrap button.js
890
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
891
+ * --------------------------------------------------------------------------
892
+ */
893
+
894
+ /**
895
+ * Constants
896
+ */
897
+
898
+ const NAME$e = 'button';
899
+ const DATA_KEY$9 = 'bs.button';
900
+ const EVENT_KEY$a = `.${DATA_KEY$9}`;
901
+ const DATA_API_KEY$6 = '.data-api';
902
+ const CLASS_NAME_ACTIVE$3 = 'active';
903
+ const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]';
904
+ const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`;
905
+
906
+ /**
907
+ * Class definition
908
+ */
909
+
910
+ class Button extends BaseComponent {
911
+ // Getters
912
+ static get NAME() {
913
+ return NAME$e;
914
+ }
915
+
916
+ // Public
917
+ toggle() {
918
+ // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method
919
+ this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));
920
+ }
921
+
922
+ // Static
923
+ static jQueryInterface(config) {
924
+ return this.each(function () {
925
+ const data = Button.getOrCreateInstance(this);
926
+ if (config === 'toggle') {
927
+ data[config]();
928
+ }
929
+ });
930
+ }
931
+ }
932
+
933
+ /**
934
+ * Data API implementation
935
+ */
936
+
937
+ EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {
938
+ event.preventDefault();
939
+ const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);
940
+ const data = Button.getOrCreateInstance(button);
941
+ data.toggle();
942
+ });
943
+
944
+ /**
945
+ * jQuery
946
+ */
947
+
948
+ defineJQueryPlugin(Button);
949
+
950
+ /**
951
+ * --------------------------------------------------------------------------
952
+ * Bootstrap util/swipe.js
953
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
954
+ * --------------------------------------------------------------------------
955
+ */
956
+
957
+ /**
958
+ * Constants
959
+ */
960
+
961
+ const NAME$d = 'swipe';
962
+ const EVENT_KEY$9 = '.bs.swipe';
963
+ const EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`;
964
+ const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`;
965
+ const EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`;
966
+ const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`;
967
+ const EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`;
968
+ const POINTER_TYPE_TOUCH = 'touch';
969
+ const POINTER_TYPE_PEN = 'pen';
970
+ const CLASS_NAME_POINTER_EVENT = 'pointer-event';
971
+ const SWIPE_THRESHOLD = 40;
972
+ const Default$c = {
973
+ endCallback: null,
974
+ leftCallback: null,
975
+ rightCallback: null
976
+ };
977
+ const DefaultType$c = {
978
+ endCallback: '(function|null)',
979
+ leftCallback: '(function|null)',
980
+ rightCallback: '(function|null)'
981
+ };
982
+
983
+ /**
984
+ * Class definition
985
+ */
986
+
987
+ class Swipe extends Config {
988
+ constructor(element, config) {
989
+ super();
990
+ this._element = element;
991
+ if (!element || !Swipe.isSupported()) {
992
+ return;
993
+ }
994
+ this._config = this._getConfig(config);
995
+ this._deltaX = 0;
996
+ this._supportPointerEvents = Boolean(window.PointerEvent);
997
+ this._initEvents();
998
+ }
999
+
1000
+ // Getters
1001
+ static get Default() {
1002
+ return Default$c;
1003
+ }
1004
+ static get DefaultType() {
1005
+ return DefaultType$c;
1006
+ }
1007
+ static get NAME() {
1008
+ return NAME$d;
1009
+ }
1010
+
1011
+ // Public
1012
+ dispose() {
1013
+ EventHandler.off(this._element, EVENT_KEY$9);
1014
+ }
1015
+
1016
+ // Private
1017
+ _start(event) {
1018
+ if (!this._supportPointerEvents) {
1019
+ this._deltaX = event.touches[0].clientX;
1020
+ return;
1021
+ }
1022
+ if (this._eventIsPointerPenTouch(event)) {
1023
+ this._deltaX = event.clientX;
1024
+ }
1025
+ }
1026
+ _end(event) {
1027
+ if (this._eventIsPointerPenTouch(event)) {
1028
+ this._deltaX = event.clientX - this._deltaX;
1029
+ }
1030
+ this._handleSwipe();
1031
+ execute(this._config.endCallback);
1032
+ }
1033
+ _move(event) {
1034
+ this._deltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this._deltaX;
1035
+ }
1036
+ _handleSwipe() {
1037
+ const absDeltaX = Math.abs(this._deltaX);
1038
+ if (absDeltaX <= SWIPE_THRESHOLD) {
1039
+ return;
1040
+ }
1041
+ const direction = absDeltaX / this._deltaX;
1042
+ this._deltaX = 0;
1043
+ if (!direction) {
1044
+ return;
1045
+ }
1046
+ execute(direction > 0 ? this._config.rightCallback : this._config.leftCallback);
1047
+ }
1048
+ _initEvents() {
1049
+ if (this._supportPointerEvents) {
1050
+ EventHandler.on(this._element, EVENT_POINTERDOWN, event => this._start(event));
1051
+ EventHandler.on(this._element, EVENT_POINTERUP, event => this._end(event));
1052
+ this._element.classList.add(CLASS_NAME_POINTER_EVENT);
1053
+ } else {
1054
+ EventHandler.on(this._element, EVENT_TOUCHSTART, event => this._start(event));
1055
+ EventHandler.on(this._element, EVENT_TOUCHMOVE, event => this._move(event));
1056
+ EventHandler.on(this._element, EVENT_TOUCHEND, event => this._end(event));
1057
+ }
1058
+ }
1059
+ _eventIsPointerPenTouch(event) {
1060
+ return this._supportPointerEvents && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);
1061
+ }
1062
+
1063
+ // Static
1064
+ static isSupported() {
1065
+ return 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
1066
+ }
1067
+ }
1068
+
1069
+ /**
1070
+ * --------------------------------------------------------------------------
1071
+ * Bootstrap carousel.js
1072
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1073
+ * --------------------------------------------------------------------------
1074
+ */
1075
+
1076
+ /**
1077
+ * Constants
1078
+ */
1079
+
1080
+ const NAME$c = 'carousel';
1081
+ const DATA_KEY$8 = 'bs.carousel';
1082
+ const EVENT_KEY$8 = `.${DATA_KEY$8}`;
1083
+ const DATA_API_KEY$5 = '.data-api';
1084
+ const ARROW_LEFT_KEY$1 = 'ArrowLeft';
1085
+ const ARROW_RIGHT_KEY$1 = 'ArrowRight';
1086
+ const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
1087
+
1088
+ const ORDER_NEXT = 'next';
1089
+ const ORDER_PREV = 'prev';
1090
+ const DIRECTION_LEFT = 'left';
1091
+ const DIRECTION_RIGHT = 'right';
1092
+ const EVENT_SLIDE = `slide${EVENT_KEY$8}`;
1093
+ const EVENT_SLID = `slid${EVENT_KEY$8}`;
1094
+ const EVENT_KEYDOWN$1 = `keydown${EVENT_KEY$8}`;
1095
+ const EVENT_MOUSEENTER$1 = `mouseenter${EVENT_KEY$8}`;
1096
+ const EVENT_MOUSELEAVE$1 = `mouseleave${EVENT_KEY$8}`;
1097
+ const EVENT_DRAG_START = `dragstart${EVENT_KEY$8}`;
1098
+ const EVENT_LOAD_DATA_API$3 = `load${EVENT_KEY$8}${DATA_API_KEY$5}`;
1099
+ const EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`;
1100
+ const CLASS_NAME_CAROUSEL = 'carousel';
1101
+ const CLASS_NAME_ACTIVE$2 = 'active';
1102
+ const CLASS_NAME_SLIDE = 'slide';
1103
+ const CLASS_NAME_END = 'carousel-item-end';
1104
+ const CLASS_NAME_START = 'carousel-item-start';
1105
+ const CLASS_NAME_NEXT = 'carousel-item-next';
1106
+ const CLASS_NAME_PREV = 'carousel-item-prev';
1107
+ const SELECTOR_ACTIVE = '.active';
1108
+ const SELECTOR_ITEM = '.carousel-item';
1109
+ const SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM;
1110
+ const SELECTOR_ITEM_IMG = '.carousel-item img';
1111
+ const SELECTOR_INDICATORS = '.carousel-indicators';
1112
+ const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';
1113
+ const SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]';
1114
+ const KEY_TO_DIRECTION = {
1115
+ [ARROW_LEFT_KEY$1]: DIRECTION_RIGHT,
1116
+ [ARROW_RIGHT_KEY$1]: DIRECTION_LEFT
1117
+ };
1118
+ const Default$b = {
1119
+ interval: 5000,
1120
+ keyboard: true,
1121
+ pause: 'hover',
1122
+ ride: false,
1123
+ touch: true,
1124
+ wrap: true
1125
+ };
1126
+ const DefaultType$b = {
1127
+ interval: '(number|boolean)',
1128
+ // TODO:v6 remove boolean support
1129
+ keyboard: 'boolean',
1130
+ pause: '(string|boolean)',
1131
+ ride: '(boolean|string)',
1132
+ touch: 'boolean',
1133
+ wrap: 'boolean'
1134
+ };
1135
+
1136
+ /**
1137
+ * Class definition
1138
+ */
1139
+
1140
+ class Carousel extends BaseComponent {
1141
+ constructor(element, config) {
1142
+ super(element, config);
1143
+ this._interval = null;
1144
+ this._activeElement = null;
1145
+ this._isSliding = false;
1146
+ this.touchTimeout = null;
1147
+ this._swipeHelper = null;
1148
+ this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);
1149
+ this._addEventListeners();
1150
+ if (this._config.ride === CLASS_NAME_CAROUSEL) {
1151
+ this.cycle();
1152
+ }
1153
+ }
1154
+
1155
+ // Getters
1156
+ static get Default() {
1157
+ return Default$b;
1158
+ }
1159
+ static get DefaultType() {
1160
+ return DefaultType$b;
1161
+ }
1162
+ static get NAME() {
1163
+ return NAME$c;
1164
+ }
1165
+
1166
+ // Public
1167
+ next() {
1168
+ this._slide(ORDER_NEXT);
1169
+ }
1170
+ nextWhenVisible() {
1171
+ // FIXME TODO use `document.visibilityState`
1172
+ // Don't call next when the page isn't visible
1173
+ // or the carousel or its parent isn't visible
1174
+ if (!document.hidden && isVisible(this._element)) {
1175
+ this.next();
1176
+ }
1177
+ }
1178
+ prev() {
1179
+ this._slide(ORDER_PREV);
1180
+ }
1181
+ pause() {
1182
+ if (this._isSliding) {
1183
+ triggerTransitionEnd(this._element);
1184
+ }
1185
+ this._clearInterval();
1186
+ }
1187
+ cycle() {
1188
+ this._clearInterval();
1189
+ this._updateInterval();
1190
+ this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval);
1191
+ }
1192
+ _maybeEnableCycle() {
1193
+ if (!this._config.ride) {
1194
+ return;
1195
+ }
1196
+ if (this._isSliding) {
1197
+ EventHandler.one(this._element, EVENT_SLID, () => this.cycle());
1198
+ return;
1199
+ }
1200
+ this.cycle();
1201
+ }
1202
+ to(index) {
1203
+ const items = this._getItems();
1204
+ if (index > items.length - 1 || index < 0) {
1205
+ return;
1206
+ }
1207
+ if (this._isSliding) {
1208
+ EventHandler.one(this._element, EVENT_SLID, () => this.to(index));
1209
+ return;
1210
+ }
1211
+ const activeIndex = this._getItemIndex(this._getActive());
1212
+ if (activeIndex === index) {
1213
+ return;
1214
+ }
1215
+ const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
1216
+ this._slide(order, items[index]);
1217
+ }
1218
+ dispose() {
1219
+ if (this._swipeHelper) {
1220
+ this._swipeHelper.dispose();
1221
+ }
1222
+ super.dispose();
1223
+ }
1224
+
1225
+ // Private
1226
+ _configAfterMerge(config) {
1227
+ config.defaultInterval = config.interval;
1228
+ return config;
1229
+ }
1230
+ _addEventListeners() {
1231
+ if (this._config.keyboard) {
1232
+ EventHandler.on(this._element, EVENT_KEYDOWN$1, event => this._keydown(event));
1233
+ }
1234
+ if (this._config.pause === 'hover') {
1235
+ EventHandler.on(this._element, EVENT_MOUSEENTER$1, () => this.pause());
1236
+ EventHandler.on(this._element, EVENT_MOUSELEAVE$1, () => this._maybeEnableCycle());
1237
+ }
1238
+ if (this._config.touch && Swipe.isSupported()) {
1239
+ this._addTouchEventListeners();
1240
+ }
1241
+ }
1242
+ _addTouchEventListeners() {
1243
+ for (const img of SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)) {
1244
+ EventHandler.on(img, EVENT_DRAG_START, event => event.preventDefault());
1245
+ }
1246
+ const endCallBack = () => {
1247
+ if (this._config.pause !== 'hover') {
1248
+ return;
1249
+ }
1250
+
1251
+ // If it's a touch-enabled device, mouseenter/leave are fired as
1252
+ // part of the mouse compatibility events on first tap - the carousel
1253
+ // would stop cycling until user tapped out of it;
1254
+ // here, we listen for touchend, explicitly pause the carousel
1255
+ // (as if it's the second time we tap on it, mouseenter compat event
1256
+ // is NOT fired) and after a timeout (to allow for mouse compatibility
1257
+ // events to fire) we explicitly restart cycling
1258
+
1259
+ this.pause();
1260
+ if (this.touchTimeout) {
1261
+ clearTimeout(this.touchTimeout);
1262
+ }
1263
+ this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval);
1264
+ };
1265
+ const swipeConfig = {
1266
+ leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)),
1267
+ rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)),
1268
+ endCallback: endCallBack
1269
+ };
1270
+ this._swipeHelper = new Swipe(this._element, swipeConfig);
1271
+ }
1272
+ _keydown(event) {
1273
+ if (/input|textarea/i.test(event.target.tagName)) {
1274
+ return;
1275
+ }
1276
+ const direction = KEY_TO_DIRECTION[event.key];
1277
+ if (direction) {
1278
+ event.preventDefault();
1279
+ this._slide(this._directionToOrder(direction));
1280
+ }
1281
+ }
1282
+ _getItemIndex(element) {
1283
+ return this._getItems().indexOf(element);
1284
+ }
1285
+ _setActiveIndicatorElement(index) {
1286
+ if (!this._indicatorsElement) {
1287
+ return;
1288
+ }
1289
+ const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement);
1290
+ activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);
1291
+ activeIndicator.removeAttribute('aria-current');
1292
+ const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to="${index}"]`, this._indicatorsElement);
1293
+ if (newActiveIndicator) {
1294
+ newActiveIndicator.classList.add(CLASS_NAME_ACTIVE$2);
1295
+ newActiveIndicator.setAttribute('aria-current', 'true');
1296
+ }
1297
+ }
1298
+ _updateInterval() {
1299
+ const element = this._activeElement || this._getActive();
1300
+ if (!element) {
1301
+ return;
1302
+ }
1303
+ const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
1304
+ this._config.interval = elementInterval || this._config.defaultInterval;
1305
+ }
1306
+ _slide(order, element = null) {
1307
+ if (this._isSliding) {
1308
+ return;
1309
+ }
1310
+ const activeElement = this._getActive();
1311
+ const isNext = order === ORDER_NEXT;
1312
+ const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap);
1313
+ if (nextElement === activeElement) {
1314
+ return;
1315
+ }
1316
+ const nextElementIndex = this._getItemIndex(nextElement);
1317
+ const triggerEvent = eventName => {
1318
+ return EventHandler.trigger(this._element, eventName, {
1319
+ relatedTarget: nextElement,
1320
+ direction: this._orderToDirection(order),
1321
+ from: this._getItemIndex(activeElement),
1322
+ to: nextElementIndex
1323
+ });
1324
+ };
1325
+ const slideEvent = triggerEvent(EVENT_SLIDE);
1326
+ if (slideEvent.defaultPrevented) {
1327
+ return;
1328
+ }
1329
+ if (!activeElement || !nextElement) {
1330
+ // Some weirdness is happening, so we bail
1331
+ // TODO: change tests that use empty divs to avoid this check
1332
+ return;
1333
+ }
1334
+ const isCycling = Boolean(this._interval);
1335
+ this.pause();
1336
+ this._isSliding = true;
1337
+ this._setActiveIndicatorElement(nextElementIndex);
1338
+ this._activeElement = nextElement;
1339
+ const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;
1340
+ const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;
1341
+ nextElement.classList.add(orderClassName);
1342
+ reflow(nextElement);
1343
+ activeElement.classList.add(directionalClassName);
1344
+ nextElement.classList.add(directionalClassName);
1345
+ const completeCallBack = () => {
1346
+ nextElement.classList.remove(directionalClassName, orderClassName);
1347
+ nextElement.classList.add(CLASS_NAME_ACTIVE$2);
1348
+ activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);
1349
+ this._isSliding = false;
1350
+ triggerEvent(EVENT_SLID);
1351
+ };
1352
+ this._queueCallback(completeCallBack, activeElement, this._isAnimated());
1353
+ if (isCycling) {
1354
+ this.cycle();
1355
+ }
1356
+ }
1357
+ _isAnimated() {
1358
+ return this._element.classList.contains(CLASS_NAME_SLIDE);
1359
+ }
1360
+ _getActive() {
1361
+ return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
1362
+ }
1363
+ _getItems() {
1364
+ return SelectorEngine.find(SELECTOR_ITEM, this._element);
1365
+ }
1366
+ _clearInterval() {
1367
+ if (this._interval) {
1368
+ clearInterval(this._interval);
1369
+ this._interval = null;
1370
+ }
1371
+ }
1372
+ _directionToOrder(direction) {
1373
+ if (isRTL()) {
1374
+ return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;
1375
+ }
1376
+ return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;
1377
+ }
1378
+ _orderToDirection(order) {
1379
+ if (isRTL()) {
1380
+ return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;
1381
+ }
1382
+ return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;
1383
+ }
1384
+
1385
+ // Static
1386
+ static jQueryInterface(config) {
1387
+ return this.each(function () {
1388
+ const data = Carousel.getOrCreateInstance(this, config);
1389
+ if (typeof config === 'number') {
1390
+ data.to(config);
1391
+ return;
1392
+ }
1393
+ if (typeof config === 'string') {
1394
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
1395
+ throw new TypeError(`No method named "${config}"`);
1396
+ }
1397
+ data[config]();
1398
+ }
1399
+ });
1400
+ }
1401
+ }
1402
+
1403
+ /**
1404
+ * Data API implementation
1405
+ */
1406
+
1407
+ EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, function (event) {
1408
+ const target = SelectorEngine.getElementFromSelector(this);
1409
+ if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
1410
+ return;
1411
+ }
1412
+ event.preventDefault();
1413
+ const carousel = Carousel.getOrCreateInstance(target);
1414
+ const slideIndex = this.getAttribute('data-bs-slide-to');
1415
+ if (slideIndex) {
1416
+ carousel.to(slideIndex);
1417
+ carousel._maybeEnableCycle();
1418
+ return;
1419
+ }
1420
+ if (Manipulator.getDataAttribute(this, 'slide') === 'next') {
1421
+ carousel.next();
1422
+ carousel._maybeEnableCycle();
1423
+ return;
1424
+ }
1425
+ carousel.prev();
1426
+ carousel._maybeEnableCycle();
1427
+ });
1428
+ EventHandler.on(window, EVENT_LOAD_DATA_API$3, () => {
1429
+ const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
1430
+ for (const carousel of carousels) {
1431
+ Carousel.getOrCreateInstance(carousel);
1432
+ }
1433
+ });
1434
+
1435
+ /**
1436
+ * jQuery
1437
+ */
1438
+
1439
+ defineJQueryPlugin(Carousel);
1440
+
1441
+ /**
1442
+ * --------------------------------------------------------------------------
1443
+ * Bootstrap collapse.js
1444
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1445
+ * --------------------------------------------------------------------------
1446
+ */
1447
+
1448
+ /**
1449
+ * Constants
1450
+ */
1451
+
1452
+ const NAME$b = 'collapse';
1453
+ const DATA_KEY$7 = 'bs.collapse';
1454
+ const EVENT_KEY$7 = `.${DATA_KEY$7}`;
1455
+ const DATA_API_KEY$4 = '.data-api';
1456
+ const EVENT_SHOW$6 = `show${EVENT_KEY$7}`;
1457
+ const EVENT_SHOWN$6 = `shown${EVENT_KEY$7}`;
1458
+ const EVENT_HIDE$6 = `hide${EVENT_KEY$7}`;
1459
+ const EVENT_HIDDEN$6 = `hidden${EVENT_KEY$7}`;
1460
+ const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`;
1461
+ const CLASS_NAME_SHOW$7 = 'show';
1462
+ const CLASS_NAME_COLLAPSE = 'collapse';
1463
+ const CLASS_NAME_COLLAPSING = 'collapsing';
1464
+ const CLASS_NAME_COLLAPSED = 'collapsed';
1465
+ const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;
1466
+ const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
1467
+ const WIDTH = 'width';
1468
+ const HEIGHT = 'height';
1469
+ const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';
1470
+ const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]';
1471
+ const Default$a = {
1472
+ parent: null,
1473
+ toggle: true
1474
+ };
1475
+ const DefaultType$a = {
1476
+ parent: '(null|element)',
1477
+ toggle: 'boolean'
1478
+ };
1479
+
1480
+ /**
1481
+ * Class definition
1482
+ */
1483
+
1484
+ class Collapse extends BaseComponent {
1485
+ constructor(element, config) {
1486
+ super(element, config);
1487
+ this._isTransitioning = false;
1488
+ this._triggerArray = [];
1489
+ const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);
1490
+ for (const elem of toggleList) {
1491
+ const selector = SelectorEngine.getSelectorFromElement(elem);
1492
+ const filterElement = SelectorEngine.find(selector).filter(foundElement => foundElement === this._element);
1493
+ if (selector !== null && filterElement.length) {
1494
+ this._triggerArray.push(elem);
1495
+ }
1496
+ }
1497
+ this._initializeChildren();
1498
+ if (!this._config.parent) {
1499
+ this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());
1500
+ }
1501
+ if (this._config.toggle) {
1502
+ this.toggle();
1503
+ }
1504
+ }
1505
+
1506
+ // Getters
1507
+ static get Default() {
1508
+ return Default$a;
1509
+ }
1510
+ static get DefaultType() {
1511
+ return DefaultType$a;
1512
+ }
1513
+ static get NAME() {
1514
+ return NAME$b;
1515
+ }
1516
+
1517
+ // Public
1518
+ toggle() {
1519
+ if (this._isShown()) {
1520
+ this.hide();
1521
+ } else {
1522
+ this.show();
1523
+ }
1524
+ }
1525
+ show() {
1526
+ if (this._isTransitioning || this._isShown()) {
1527
+ return;
1528
+ }
1529
+ let activeChildren = [];
1530
+
1531
+ // find active children
1532
+ if (this._config.parent) {
1533
+ activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(element => element !== this._element).map(element => Collapse.getOrCreateInstance(element, {
1534
+ toggle: false
1535
+ }));
1536
+ }
1537
+ if (activeChildren.length && activeChildren[0]._isTransitioning) {
1538
+ return;
1539
+ }
1540
+ const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$6);
1541
+ if (startEvent.defaultPrevented) {
1542
+ return;
1543
+ }
1544
+ for (const activeInstance of activeChildren) {
1545
+ activeInstance.hide();
1546
+ }
1547
+ const dimension = this._getDimension();
1548
+ this._element.classList.remove(CLASS_NAME_COLLAPSE);
1549
+ this._element.classList.add(CLASS_NAME_COLLAPSING);
1550
+ this._element.style[dimension] = 0;
1551
+ this._addAriaAndCollapsedClass(this._triggerArray, true);
1552
+ this._isTransitioning = true;
1553
+ const complete = () => {
1554
+ this._isTransitioning = false;
1555
+ this._element.classList.remove(CLASS_NAME_COLLAPSING);
1556
+ this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
1557
+ this._element.style[dimension] = '';
1558
+ EventHandler.trigger(this._element, EVENT_SHOWN$6);
1559
+ };
1560
+ const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1561
+ const scrollSize = `scroll${capitalizedDimension}`;
1562
+ this._queueCallback(complete, this._element, true);
1563
+ this._element.style[dimension] = `${this._element[scrollSize]}px`;
1564
+ }
1565
+ hide() {
1566
+ if (this._isTransitioning || !this._isShown()) {
1567
+ return;
1568
+ }
1569
+ const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$6);
1570
+ if (startEvent.defaultPrevented) {
1571
+ return;
1572
+ }
1573
+ const dimension = this._getDimension();
1574
+ this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;
1575
+ reflow(this._element);
1576
+ this._element.classList.add(CLASS_NAME_COLLAPSING);
1577
+ this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);
1578
+ for (const trigger of this._triggerArray) {
1579
+ const element = SelectorEngine.getElementFromSelector(trigger);
1580
+ if (element && !this._isShown(element)) {
1581
+ this._addAriaAndCollapsedClass([trigger], false);
1582
+ }
1583
+ }
1584
+ this._isTransitioning = true;
1585
+ const complete = () => {
1586
+ this._isTransitioning = false;
1587
+ this._element.classList.remove(CLASS_NAME_COLLAPSING);
1588
+ this._element.classList.add(CLASS_NAME_COLLAPSE);
1589
+ EventHandler.trigger(this._element, EVENT_HIDDEN$6);
1590
+ };
1591
+ this._element.style[dimension] = '';
1592
+ this._queueCallback(complete, this._element, true);
1593
+ }
1594
+ _isShown(element = this._element) {
1595
+ return element.classList.contains(CLASS_NAME_SHOW$7);
1596
+ }
1597
+
1598
+ // Private
1599
+ _configAfterMerge(config) {
1600
+ config.toggle = Boolean(config.toggle); // Coerce string values
1601
+ config.parent = getElement(config.parent);
1602
+ return config;
1603
+ }
1604
+ _getDimension() {
1605
+ return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;
1606
+ }
1607
+ _initializeChildren() {
1608
+ if (!this._config.parent) {
1609
+ return;
1610
+ }
1611
+ const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4);
1612
+ for (const element of children) {
1613
+ const selected = SelectorEngine.getElementFromSelector(element);
1614
+ if (selected) {
1615
+ this._addAriaAndCollapsedClass([element], this._isShown(selected));
1616
+ }
1617
+ }
1618
+ }
1619
+ _getFirstLevelChildren(selector) {
1620
+ const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);
1621
+ // remove children if greater depth
1622
+ return SelectorEngine.find(selector, this._config.parent).filter(element => !children.includes(element));
1623
+ }
1624
+ _addAriaAndCollapsedClass(triggerArray, isOpen) {
1625
+ if (!triggerArray.length) {
1626
+ return;
1627
+ }
1628
+ for (const element of triggerArray) {
1629
+ element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen);
1630
+ element.setAttribute('aria-expanded', isOpen);
1631
+ }
1632
+ }
1633
+
1634
+ // Static
1635
+ static jQueryInterface(config) {
1636
+ const _config = {};
1637
+ if (typeof config === 'string' && /show|hide/.test(config)) {
1638
+ _config.toggle = false;
1639
+ }
1640
+ return this.each(function () {
1641
+ const data = Collapse.getOrCreateInstance(this, _config);
1642
+ if (typeof config === 'string') {
1643
+ if (typeof data[config] === 'undefined') {
1644
+ throw new TypeError(`No method named "${config}"`);
1645
+ }
1646
+ data[config]();
1647
+ }
1648
+ });
1649
+ }
1650
+ }
1651
+
1652
+ /**
1653
+ * Data API implementation
1654
+ */
1655
+
1656
+ EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {
1657
+ // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
1658
+ if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {
1659
+ event.preventDefault();
1660
+ }
1661
+ for (const element of SelectorEngine.getMultipleElementsFromSelector(this)) {
1662
+ Collapse.getOrCreateInstance(element, {
1663
+ toggle: false
1664
+ }).toggle();
1665
+ }
1666
+ });
1667
+
1668
+ /**
1669
+ * jQuery
1670
+ */
1671
+
1672
+ defineJQueryPlugin(Collapse);
1673
+
1674
+ /**
1675
+ * --------------------------------------------------------------------------
1676
+ * Bootstrap dropdown.js
1677
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1678
+ * --------------------------------------------------------------------------
1679
+ */
1680
+
1681
+ /**
1682
+ * Constants
1683
+ */
1684
+
1685
+ const NAME$a = 'dropdown';
1686
+ const DATA_KEY$6 = 'bs.dropdown';
1687
+ const EVENT_KEY$6 = `.${DATA_KEY$6}`;
1688
+ const DATA_API_KEY$3 = '.data-api';
1689
+ const ESCAPE_KEY$2 = 'Escape';
1690
+ const TAB_KEY$1 = 'Tab';
1691
+ const ARROW_UP_KEY$1 = 'ArrowUp';
1692
+ const ARROW_DOWN_KEY$1 = 'ArrowDown';
1693
+ const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
1694
+
1695
+ const EVENT_HIDE$5 = `hide${EVENT_KEY$6}`;
1696
+ const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$6}`;
1697
+ const EVENT_SHOW$5 = `show${EVENT_KEY$6}`;
1698
+ const EVENT_SHOWN$5 = `shown${EVENT_KEY$6}`;
1699
+ const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;
1700
+ const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$6}${DATA_API_KEY$3}`;
1701
+ const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$6}${DATA_API_KEY$3}`;
1702
+ const CLASS_NAME_SHOW$6 = 'show';
1703
+ const CLASS_NAME_DROPUP = 'dropup';
1704
+ const CLASS_NAME_DROPEND = 'dropend';
1705
+ const CLASS_NAME_DROPSTART = 'dropstart';
1706
+ const CLASS_NAME_DROPUP_CENTER = 'dropup-center';
1707
+ const CLASS_NAME_DROPDOWN_CENTER = 'dropdown-center';
1708
+ const SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)';
1709
+ const SELECTOR_DATA_TOGGLE_SHOWN = `${SELECTOR_DATA_TOGGLE$3}.${CLASS_NAME_SHOW$6}`;
1710
+ const SELECTOR_MENU = '.dropdown-menu';
1711
+ const SELECTOR_NAVBAR = '.navbar';
1712
+ const SELECTOR_NAVBAR_NAV = '.navbar-nav';
1713
+ const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
1714
+ const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';
1715
+ const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';
1716
+ const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';
1717
+ const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';
1718
+ const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';
1719
+ const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';
1720
+ const PLACEMENT_TOPCENTER = 'top';
1721
+ const PLACEMENT_BOTTOMCENTER = 'bottom';
1722
+ const Default$9 = {
1723
+ autoClose: true,
1724
+ boundary: 'clippingParents',
1725
+ display: 'dynamic',
1726
+ offset: [0, 2],
1727
+ popperConfig: null,
1728
+ reference: 'toggle'
1729
+ };
1730
+ const DefaultType$9 = {
1731
+ autoClose: '(boolean|string)',
1732
+ boundary: '(string|element)',
1733
+ display: 'string',
1734
+ offset: '(array|string|function)',
1735
+ popperConfig: '(null|object|function)',
1736
+ reference: '(string|element|object)'
1737
+ };
1738
+
1739
+ /**
1740
+ * Class definition
1741
+ */
1742
+
1743
+ class Dropdown extends BaseComponent {
1744
+ constructor(element, config) {
1745
+ super(element, config);
1746
+ this._popper = null;
1747
+ this._parent = this._element.parentNode; // dropdown wrapper
1748
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
1749
+ this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);
1750
+ this._inNavbar = this._detectNavbar();
1751
+ }
1752
+
1753
+ // Getters
1754
+ static get Default() {
1755
+ return Default$9;
1756
+ }
1757
+ static get DefaultType() {
1758
+ return DefaultType$9;
1759
+ }
1760
+ static get NAME() {
1761
+ return NAME$a;
1762
+ }
1763
+
1764
+ // Public
1765
+ toggle() {
1766
+ return this._isShown() ? this.hide() : this.show();
1767
+ }
1768
+ show() {
1769
+ if (isDisabled(this._element) || this._isShown()) {
1770
+ return;
1771
+ }
1772
+ const relatedTarget = {
1773
+ relatedTarget: this._element
1774
+ };
1775
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$5, relatedTarget);
1776
+ if (showEvent.defaultPrevented) {
1777
+ return;
1778
+ }
1779
+ this._createPopper();
1780
+
1781
+ // If this is a touch-enabled device we add extra
1782
+ // empty mouseover listeners to the body's immediate children;
1783
+ // only needed because of broken event delegation on iOS
1784
+ // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
1785
+ if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) {
1786
+ for (const element of [].concat(...document.body.children)) {
1787
+ EventHandler.on(element, 'mouseover', noop);
1788
+ }
1789
+ }
1790
+ this._element.focus();
1791
+ this._element.setAttribute('aria-expanded', true);
1792
+ this._menu.classList.add(CLASS_NAME_SHOW$6);
1793
+ this._element.classList.add(CLASS_NAME_SHOW$6);
1794
+ EventHandler.trigger(this._element, EVENT_SHOWN$5, relatedTarget);
1795
+ }
1796
+ hide() {
1797
+ if (isDisabled(this._element) || !this._isShown()) {
1798
+ return;
1799
+ }
1800
+ const relatedTarget = {
1801
+ relatedTarget: this._element
1802
+ };
1803
+ this._completeHide(relatedTarget);
1804
+ }
1805
+ dispose() {
1806
+ if (this._popper) {
1807
+ this._popper.destroy();
1808
+ }
1809
+ super.dispose();
1810
+ }
1811
+ update() {
1812
+ this._inNavbar = this._detectNavbar();
1813
+ if (this._popper) {
1814
+ this._popper.update();
1815
+ }
1816
+ }
1817
+
1818
+ // Private
1819
+ _completeHide(relatedTarget) {
1820
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$5, relatedTarget);
1821
+ if (hideEvent.defaultPrevented) {
1822
+ return;
1823
+ }
1824
+
1825
+ // If this is a touch-enabled device we remove the extra
1826
+ // empty mouseover listeners we added for iOS support
1827
+ if ('ontouchstart' in document.documentElement) {
1828
+ for (const element of [].concat(...document.body.children)) {
1829
+ EventHandler.off(element, 'mouseover', noop);
1830
+ }
1831
+ }
1832
+ if (this._popper) {
1833
+ this._popper.destroy();
1834
+ }
1835
+ this._menu.classList.remove(CLASS_NAME_SHOW$6);
1836
+ this._element.classList.remove(CLASS_NAME_SHOW$6);
1837
+ this._element.setAttribute('aria-expanded', 'false');
1838
+ Manipulator.removeDataAttribute(this._menu, 'popper');
1839
+ EventHandler.trigger(this._element, EVENT_HIDDEN$5, relatedTarget);
1840
+ }
1841
+ _getConfig(config) {
1842
+ config = super._getConfig(config);
1843
+ if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
1844
+ // Popper virtual elements require a getBoundingClientRect method
1845
+ throw new TypeError(`${NAME$a.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
1846
+ }
1847
+ return config;
1848
+ }
1849
+ _createPopper() {
1850
+ if (typeof Popper === 'undefined') {
1851
+ throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
1852
+ }
1853
+ let referenceElement = this._element;
1854
+ if (this._config.reference === 'parent') {
1855
+ referenceElement = this._parent;
1856
+ } else if (isElement(this._config.reference)) {
1857
+ referenceElement = getElement(this._config.reference);
1858
+ } else if (typeof this._config.reference === 'object') {
1859
+ referenceElement = this._config.reference;
1860
+ }
1861
+ const popperConfig = this._getPopperConfig();
1862
+ this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig);
1863
+ }
1864
+ _isShown() {
1865
+ return this._menu.classList.contains(CLASS_NAME_SHOW$6);
1866
+ }
1867
+ _getPlacement() {
1868
+ const parentDropdown = this._parent;
1869
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
1870
+ return PLACEMENT_RIGHT;
1871
+ }
1872
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
1873
+ return PLACEMENT_LEFT;
1874
+ }
1875
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) {
1876
+ return PLACEMENT_TOPCENTER;
1877
+ }
1878
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) {
1879
+ return PLACEMENT_BOTTOMCENTER;
1880
+ }
1881
+
1882
+ // We need to trim the value because custom properties can also include spaces
1883
+ const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';
1884
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
1885
+ return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
1886
+ }
1887
+ return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;
1888
+ }
1889
+ _detectNavbar() {
1890
+ return this._element.closest(SELECTOR_NAVBAR) !== null;
1891
+ }
1892
+ _getOffset() {
1893
+ const {
1894
+ offset
1895
+ } = this._config;
1896
+ if (typeof offset === 'string') {
1897
+ return offset.split(',').map(value => Number.parseInt(value, 10));
1898
+ }
1899
+ if (typeof offset === 'function') {
1900
+ return popperData => offset(popperData, this._element);
1901
+ }
1902
+ return offset;
1903
+ }
1904
+ _getPopperConfig() {
1905
+ const defaultBsPopperConfig = {
1906
+ placement: this._getPlacement(),
1907
+ modifiers: [{
1908
+ name: 'preventOverflow',
1909
+ options: {
1910
+ boundary: this._config.boundary
1911
+ }
1912
+ }, {
1913
+ name: 'offset',
1914
+ options: {
1915
+ offset: this._getOffset()
1916
+ }
1917
+ }]
1918
+ };
1919
+
1920
+ // Disable Popper if we have a static display or Dropdown is in Navbar
1921
+ if (this._inNavbar || this._config.display === 'static') {
1922
+ Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // TODO: v6 remove
1923
+ defaultBsPopperConfig.modifiers = [{
1924
+ name: 'applyStyles',
1925
+ enabled: false
1926
+ }];
1927
+ }
1928
+ return {
1929
+ ...defaultBsPopperConfig,
1930
+ ...execute(this._config.popperConfig, [defaultBsPopperConfig])
1931
+ };
1932
+ }
1933
+ _selectMenuItem({
1934
+ key,
1935
+ target
1936
+ }) {
1937
+ const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => isVisible(element));
1938
+ if (!items.length) {
1939
+ return;
1940
+ }
1941
+
1942
+ // if target isn't included in items (e.g. when expanding the dropdown)
1943
+ // allow cycling to get the last item in case key equals ARROW_UP_KEY
1944
+ getNextActiveElement(items, target, key === ARROW_DOWN_KEY$1, !items.includes(target)).focus();
1945
+ }
1946
+
1947
+ // Static
1948
+ static jQueryInterface(config) {
1949
+ return this.each(function () {
1950
+ const data = Dropdown.getOrCreateInstance(this, config);
1951
+ if (typeof config !== 'string') {
1952
+ return;
1953
+ }
1954
+ if (typeof data[config] === 'undefined') {
1955
+ throw new TypeError(`No method named "${config}"`);
1956
+ }
1957
+ data[config]();
1958
+ });
1959
+ }
1960
+ static clearMenus(event) {
1961
+ if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1) {
1962
+ return;
1963
+ }
1964
+ const openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN);
1965
+ for (const toggle of openToggles) {
1966
+ const context = Dropdown.getInstance(toggle);
1967
+ if (!context || context._config.autoClose === false) {
1968
+ continue;
1969
+ }
1970
+ const composedPath = event.composedPath();
1971
+ const isMenuTarget = composedPath.includes(context._menu);
1972
+ if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
1973
+ continue;
1974
+ }
1975
+
1976
+ // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
1977
+ if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {
1978
+ continue;
1979
+ }
1980
+ const relatedTarget = {
1981
+ relatedTarget: context._element
1982
+ };
1983
+ if (event.type === 'click') {
1984
+ relatedTarget.clickEvent = event;
1985
+ }
1986
+ context._completeHide(relatedTarget);
1987
+ }
1988
+ }
1989
+ static dataApiKeydownHandler(event) {
1990
+ // If not an UP | DOWN | ESCAPE key => not a dropdown command
1991
+ // If input/textarea && if key is other than ESCAPE => not a dropdown command
1992
+
1993
+ const isInput = /input|textarea/i.test(event.target.tagName);
1994
+ const isEscapeEvent = event.key === ESCAPE_KEY$2;
1995
+ const isUpOrDownEvent = [ARROW_UP_KEY$1, ARROW_DOWN_KEY$1].includes(event.key);
1996
+ if (!isUpOrDownEvent && !isEscapeEvent) {
1997
+ return;
1998
+ }
1999
+ if (isInput && !isEscapeEvent) {
2000
+ return;
2001
+ }
2002
+ event.preventDefault();
2003
+
2004
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
2005
+ 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);
2006
+ const instance = Dropdown.getOrCreateInstance(getToggleButton);
2007
+ if (isUpOrDownEvent) {
2008
+ event.stopPropagation();
2009
+ instance.show();
2010
+ instance._selectMenuItem(event);
2011
+ return;
2012
+ }
2013
+ if (instance._isShown()) {
2014
+ // else is escape and we check if it is shown
2015
+ event.stopPropagation();
2016
+ instance.hide();
2017
+ getToggleButton.focus();
2018
+ }
2019
+ }
2020
+ }
2021
+
2022
+ /**
2023
+ * Data API implementation
2024
+ */
2025
+
2026
+ EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);
2027
+ EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
2028
+ EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);
2029
+ EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
2030
+ EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
2031
+ event.preventDefault();
2032
+ Dropdown.getOrCreateInstance(this).toggle();
2033
+ });
2034
+
2035
+ /**
2036
+ * jQuery
2037
+ */
2038
+
2039
+ defineJQueryPlugin(Dropdown);
2040
+
2041
+ /**
2042
+ * --------------------------------------------------------------------------
2043
+ * Bootstrap util/backdrop.js
2044
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2045
+ * --------------------------------------------------------------------------
2046
+ */
2047
+
2048
+ /**
2049
+ * Constants
2050
+ */
2051
+
2052
+ const NAME$9 = 'backdrop';
2053
+ const CLASS_NAME_FADE$4 = 'fade';
2054
+ const CLASS_NAME_SHOW$5 = 'show';
2055
+ const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$9}`;
2056
+ const Default$8 = {
2057
+ className: 'modal-backdrop',
2058
+ clickCallback: null,
2059
+ isAnimated: false,
2060
+ isVisible: true,
2061
+ // if false, we use the backdrop helper without adding any element to the dom
2062
+ rootElement: 'body' // give the choice to place backdrop under different elements
2063
+ };
2064
+
2065
+ const DefaultType$8 = {
2066
+ className: 'string',
2067
+ clickCallback: '(function|null)',
2068
+ isAnimated: 'boolean',
2069
+ isVisible: 'boolean',
2070
+ rootElement: '(element|string)'
2071
+ };
2072
+
2073
+ /**
2074
+ * Class definition
2075
+ */
2076
+
2077
+ class Backdrop extends Config {
2078
+ constructor(config) {
2079
+ super();
2080
+ this._config = this._getConfig(config);
2081
+ this._isAppended = false;
2082
+ this._element = null;
2083
+ }
2084
+
2085
+ // Getters
2086
+ static get Default() {
2087
+ return Default$8;
2088
+ }
2089
+ static get DefaultType() {
2090
+ return DefaultType$8;
2091
+ }
2092
+ static get NAME() {
2093
+ return NAME$9;
2094
+ }
2095
+
2096
+ // Public
2097
+ show(callback) {
2098
+ if (!this._config.isVisible) {
2099
+ execute(callback);
2100
+ return;
2101
+ }
2102
+ this._append();
2103
+ const element = this._getElement();
2104
+ if (this._config.isAnimated) {
2105
+ reflow(element);
2106
+ }
2107
+ element.classList.add(CLASS_NAME_SHOW$5);
2108
+ this._emulateAnimation(() => {
2109
+ execute(callback);
2110
+ });
2111
+ }
2112
+ hide(callback) {
2113
+ if (!this._config.isVisible) {
2114
+ execute(callback);
2115
+ return;
2116
+ }
2117
+ this._getElement().classList.remove(CLASS_NAME_SHOW$5);
2118
+ this._emulateAnimation(() => {
2119
+ this.dispose();
2120
+ execute(callback);
2121
+ });
2122
+ }
2123
+ dispose() {
2124
+ if (!this._isAppended) {
2125
+ return;
2126
+ }
2127
+ EventHandler.off(this._element, EVENT_MOUSEDOWN);
2128
+ this._element.remove();
2129
+ this._isAppended = false;
2130
+ }
2131
+
2132
+ // Private
2133
+ _getElement() {
2134
+ if (!this._element) {
2135
+ const backdrop = document.createElement('div');
2136
+ backdrop.className = this._config.className;
2137
+ if (this._config.isAnimated) {
2138
+ backdrop.classList.add(CLASS_NAME_FADE$4);
2139
+ }
2140
+ this._element = backdrop;
2141
+ }
2142
+ return this._element;
2143
+ }
2144
+ _configAfterMerge(config) {
2145
+ // use getElement() with the default "body" to get a fresh Element on each instantiation
2146
+ config.rootElement = getElement(config.rootElement);
2147
+ return config;
2148
+ }
2149
+ _append() {
2150
+ if (this._isAppended) {
2151
+ return;
2152
+ }
2153
+ const element = this._getElement();
2154
+ this._config.rootElement.append(element);
2155
+ EventHandler.on(element, EVENT_MOUSEDOWN, () => {
2156
+ execute(this._config.clickCallback);
2157
+ });
2158
+ this._isAppended = true;
2159
+ }
2160
+ _emulateAnimation(callback) {
2161
+ executeAfterTransition(callback, this._getElement(), this._config.isAnimated);
2162
+ }
2163
+ }
2164
+
2165
+ /**
2166
+ * --------------------------------------------------------------------------
2167
+ * Bootstrap util/focustrap.js
2168
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2169
+ * --------------------------------------------------------------------------
2170
+ */
2171
+
2172
+ /**
2173
+ * Constants
2174
+ */
2175
+
2176
+ const NAME$8 = 'focustrap';
2177
+ const DATA_KEY$5 = 'bs.focustrap';
2178
+ const EVENT_KEY$5 = `.${DATA_KEY$5}`;
2179
+ const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$5}`;
2180
+ const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$5}`;
2181
+ const TAB_KEY = 'Tab';
2182
+ const TAB_NAV_FORWARD = 'forward';
2183
+ const TAB_NAV_BACKWARD = 'backward';
2184
+ const Default$7 = {
2185
+ autofocus: true,
2186
+ trapElement: null // The element to trap focus inside of
2187
+ };
2188
+
2189
+ const DefaultType$7 = {
2190
+ autofocus: 'boolean',
2191
+ trapElement: 'element'
2192
+ };
2193
+
2194
+ /**
2195
+ * Class definition
2196
+ */
2197
+
2198
+ class FocusTrap extends Config {
2199
+ constructor(config) {
2200
+ super();
2201
+ this._config = this._getConfig(config);
2202
+ this._isActive = false;
2203
+ this._lastTabNavDirection = null;
2204
+ }
2205
+
2206
+ // Getters
2207
+ static get Default() {
2208
+ return Default$7;
2209
+ }
2210
+ static get DefaultType() {
2211
+ return DefaultType$7;
2212
+ }
2213
+ static get NAME() {
2214
+ return NAME$8;
2215
+ }
2216
+
2217
+ // Public
2218
+ activate() {
2219
+ if (this._isActive) {
2220
+ return;
2221
+ }
2222
+ if (this._config.autofocus) {
2223
+ this._config.trapElement.focus();
2224
+ }
2225
+ EventHandler.off(document, EVENT_KEY$5); // guard against infinite focus loop
2226
+ EventHandler.on(document, EVENT_FOCUSIN$2, event => this._handleFocusin(event));
2227
+ EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));
2228
+ this._isActive = true;
2229
+ }
2230
+ deactivate() {
2231
+ if (!this._isActive) {
2232
+ return;
2233
+ }
2234
+ this._isActive = false;
2235
+ EventHandler.off(document, EVENT_KEY$5);
2236
+ }
2237
+
2238
+ // Private
2239
+ _handleFocusin(event) {
2240
+ const {
2241
+ trapElement
2242
+ } = this._config;
2243
+ if (event.target === document || event.target === trapElement || trapElement.contains(event.target)) {
2244
+ return;
2245
+ }
2246
+ const elements = SelectorEngine.focusableChildren(trapElement);
2247
+ if (elements.length === 0) {
2248
+ trapElement.focus();
2249
+ } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {
2250
+ elements[elements.length - 1].focus();
2251
+ } else {
2252
+ elements[0].focus();
2253
+ }
2254
+ }
2255
+ _handleKeydown(event) {
2256
+ if (event.key !== TAB_KEY) {
2257
+ return;
2258
+ }
2259
+ this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;
2260
+ }
2261
+ }
2262
+
2263
+ /**
2264
+ * --------------------------------------------------------------------------
2265
+ * Bootstrap util/scrollBar.js
2266
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2267
+ * --------------------------------------------------------------------------
2268
+ */
2269
+
2270
+ /**
2271
+ * Constants
2272
+ */
2273
+
2274
+ const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
2275
+ const SELECTOR_STICKY_CONTENT = '.sticky-top';
2276
+ const PROPERTY_PADDING = 'padding-right';
2277
+ const PROPERTY_MARGIN = 'margin-right';
2278
+
2279
+ /**
2280
+ * Class definition
2281
+ */
2282
+
2283
+ class ScrollBarHelper {
2284
+ constructor() {
2285
+ this._element = document.body;
2286
+ }
2287
+
2288
+ // Public
2289
+ getWidth() {
2290
+ // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
2291
+ const documentWidth = document.documentElement.clientWidth;
2292
+ return Math.abs(window.innerWidth - documentWidth);
2293
+ }
2294
+ hide() {
2295
+ const width = this.getWidth();
2296
+ this._disableOverFlow();
2297
+ // give padding to element to balance the hidden scrollbar width
2298
+ this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
2299
+ // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
2300
+ this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
2301
+ this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);
2302
+ }
2303
+ reset() {
2304
+ this._resetElementAttributes(this._element, 'overflow');
2305
+ this._resetElementAttributes(this._element, PROPERTY_PADDING);
2306
+ this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);
2307
+ this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);
2308
+ }
2309
+ isOverflowing() {
2310
+ return this.getWidth() > 0;
2311
+ }
2312
+
2313
+ // Private
2314
+ _disableOverFlow() {
2315
+ this._saveInitialAttribute(this._element, 'overflow');
2316
+ this._element.style.overflow = 'hidden';
2317
+ }
2318
+ _setElementAttributes(selector, styleProperty, callback) {
2319
+ const scrollbarWidth = this.getWidth();
2320
+ const manipulationCallBack = element => {
2321
+ if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
2322
+ return;
2323
+ }
2324
+ this._saveInitialAttribute(element, styleProperty);
2325
+ const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);
2326
+ element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);
2327
+ };
2328
+ this._applyManipulationCallback(selector, manipulationCallBack);
2329
+ }
2330
+ _saveInitialAttribute(element, styleProperty) {
2331
+ const actualValue = element.style.getPropertyValue(styleProperty);
2332
+ if (actualValue) {
2333
+ Manipulator.setDataAttribute(element, styleProperty, actualValue);
2334
+ }
2335
+ }
2336
+ _resetElementAttributes(selector, styleProperty) {
2337
+ const manipulationCallBack = element => {
2338
+ const value = Manipulator.getDataAttribute(element, styleProperty);
2339
+ // We only want to remove the property if the value is `null`; the value can also be zero
2340
+ if (value === null) {
2341
+ element.style.removeProperty(styleProperty);
2342
+ return;
2343
+ }
2344
+ Manipulator.removeDataAttribute(element, styleProperty);
2345
+ element.style.setProperty(styleProperty, value);
2346
+ };
2347
+ this._applyManipulationCallback(selector, manipulationCallBack);
2348
+ }
2349
+ _applyManipulationCallback(selector, callBack) {
2350
+ if (isElement(selector)) {
2351
+ callBack(selector);
2352
+ return;
2353
+ }
2354
+ for (const sel of SelectorEngine.find(selector, this._element)) {
2355
+ callBack(sel);
2356
+ }
2357
+ }
2358
+ }
2359
+
2360
+ /**
2361
+ * --------------------------------------------------------------------------
2362
+ * Bootstrap modal.js
2363
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2364
+ * --------------------------------------------------------------------------
2365
+ */
2366
+
2367
+ /**
2368
+ * Constants
2369
+ */
2370
+
2371
+ const NAME$7 = 'modal';
2372
+ const DATA_KEY$4 = 'bs.modal';
2373
+ const EVENT_KEY$4 = `.${DATA_KEY$4}`;
2374
+ const DATA_API_KEY$2 = '.data-api';
2375
+ const ESCAPE_KEY$1 = 'Escape';
2376
+ const EVENT_HIDE$4 = `hide${EVENT_KEY$4}`;
2377
+ const EVENT_HIDE_PREVENTED$1 = `hidePrevented${EVENT_KEY$4}`;
2378
+ const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$4}`;
2379
+ const EVENT_SHOW$4 = `show${EVENT_KEY$4}`;
2380
+ const EVENT_SHOWN$4 = `shown${EVENT_KEY$4}`;
2381
+ const EVENT_RESIZE$1 = `resize${EVENT_KEY$4}`;
2382
+ const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$4}`;
2383
+ const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$4}`;
2384
+ const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$4}`;
2385
+ const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$4}${DATA_API_KEY$2}`;
2386
+ const CLASS_NAME_OPEN = 'modal-open';
2387
+ const CLASS_NAME_FADE$3 = 'fade';
2388
+ const CLASS_NAME_SHOW$4 = 'show';
2389
+ const CLASS_NAME_STATIC = 'modal-static';
2390
+ const OPEN_SELECTOR$1 = '.modal.show';
2391
+ const SELECTOR_DIALOG = '.modal-dialog';
2392
+ const SELECTOR_MODAL_BODY = '.modal-body';
2393
+ const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
2394
+ const Default$6 = {
2395
+ backdrop: true,
2396
+ focus: true,
2397
+ keyboard: true
2398
+ };
2399
+ const DefaultType$6 = {
2400
+ backdrop: '(boolean|string)',
2401
+ focus: 'boolean',
2402
+ keyboard: 'boolean'
2403
+ };
2404
+
2405
+ /**
2406
+ * Class definition
2407
+ */
2408
+
2409
+ class Modal extends BaseComponent {
2410
+ constructor(element, config) {
2411
+ super(element, config);
2412
+ this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);
2413
+ this._backdrop = this._initializeBackDrop();
2414
+ this._focustrap = this._initializeFocusTrap();
2415
+ this._isShown = false;
2416
+ this._isTransitioning = false;
2417
+ this._scrollBar = new ScrollBarHelper();
2418
+ this._addEventListeners();
2419
+ }
2420
+
2421
+ // Getters
2422
+ static get Default() {
2423
+ return Default$6;
2424
+ }
2425
+ static get DefaultType() {
2426
+ return DefaultType$6;
2427
+ }
2428
+ static get NAME() {
2429
+ return NAME$7;
2430
+ }
2431
+
2432
+ // Public
2433
+ toggle(relatedTarget) {
2434
+ return this._isShown ? this.hide() : this.show(relatedTarget);
2435
+ }
2436
+ show(relatedTarget) {
2437
+ if (this._isShown || this._isTransitioning) {
2438
+ return;
2439
+ }
2440
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, {
2441
+ relatedTarget
2442
+ });
2443
+ if (showEvent.defaultPrevented) {
2444
+ return;
2445
+ }
2446
+ this._isShown = true;
2447
+ this._isTransitioning = true;
2448
+ this._scrollBar.hide();
2449
+ document.body.classList.add(CLASS_NAME_OPEN);
2450
+ this._adjustDialog();
2451
+ this._backdrop.show(() => this._showElement(relatedTarget));
2452
+ }
2453
+ hide() {
2454
+ if (!this._isShown || this._isTransitioning) {
2455
+ return;
2456
+ }
2457
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4);
2458
+ if (hideEvent.defaultPrevented) {
2459
+ return;
2460
+ }
2461
+ this._isShown = false;
2462
+ this._isTransitioning = true;
2463
+ this._focustrap.deactivate();
2464
+ this._element.classList.remove(CLASS_NAME_SHOW$4);
2465
+ this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());
2466
+ }
2467
+ dispose() {
2468
+ EventHandler.off(window, EVENT_KEY$4);
2469
+ EventHandler.off(this._dialog, EVENT_KEY$4);
2470
+ this._backdrop.dispose();
2471
+ this._focustrap.deactivate();
2472
+ super.dispose();
2473
+ }
2474
+ handleUpdate() {
2475
+ this._adjustDialog();
2476
+ }
2477
+
2478
+ // Private
2479
+ _initializeBackDrop() {
2480
+ return new Backdrop({
2481
+ isVisible: Boolean(this._config.backdrop),
2482
+ // 'static' option will be translated to true, and booleans will keep their value,
2483
+ isAnimated: this._isAnimated()
2484
+ });
2485
+ }
2486
+ _initializeFocusTrap() {
2487
+ return new FocusTrap({
2488
+ trapElement: this._element
2489
+ });
2490
+ }
2491
+ _showElement(relatedTarget) {
2492
+ // try to append dynamic modal
2493
+ if (!document.body.contains(this._element)) {
2494
+ document.body.append(this._element);
2495
+ }
2496
+ this._element.style.display = 'block';
2497
+ this._element.removeAttribute('aria-hidden');
2498
+ this._element.setAttribute('aria-modal', true);
2499
+ this._element.setAttribute('role', 'dialog');
2500
+ this._element.scrollTop = 0;
2501
+ const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
2502
+ if (modalBody) {
2503
+ modalBody.scrollTop = 0;
2504
+ }
2505
+ reflow(this._element);
2506
+ this._element.classList.add(CLASS_NAME_SHOW$4);
2507
+ const transitionComplete = () => {
2508
+ if (this._config.focus) {
2509
+ this._focustrap.activate();
2510
+ }
2511
+ this._isTransitioning = false;
2512
+ EventHandler.trigger(this._element, EVENT_SHOWN$4, {
2513
+ relatedTarget
2514
+ });
2515
+ };
2516
+ this._queueCallback(transitionComplete, this._dialog, this._isAnimated());
2517
+ }
2518
+ _addEventListeners() {
2519
+ EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {
2520
+ if (event.key !== ESCAPE_KEY$1) {
2521
+ return;
2522
+ }
2523
+ if (this._config.keyboard) {
2524
+ this.hide();
2525
+ return;
2526
+ }
2527
+ this._triggerBackdropTransition();
2528
+ });
2529
+ EventHandler.on(window, EVENT_RESIZE$1, () => {
2530
+ if (this._isShown && !this._isTransitioning) {
2531
+ this._adjustDialog();
2532
+ }
2533
+ });
2534
+ EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {
2535
+ // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
2536
+ EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {
2537
+ if (this._element !== event.target || this._element !== event2.target) {
2538
+ return;
2539
+ }
2540
+ if (this._config.backdrop === 'static') {
2541
+ this._triggerBackdropTransition();
2542
+ return;
2543
+ }
2544
+ if (this._config.backdrop) {
2545
+ this.hide();
2546
+ }
2547
+ });
2548
+ });
2549
+ }
2550
+ _hideModal() {
2551
+ this._element.style.display = 'none';
2552
+ this._element.setAttribute('aria-hidden', true);
2553
+ this._element.removeAttribute('aria-modal');
2554
+ this._element.removeAttribute('role');
2555
+ this._isTransitioning = false;
2556
+ this._backdrop.hide(() => {
2557
+ document.body.classList.remove(CLASS_NAME_OPEN);
2558
+ this._resetAdjustments();
2559
+ this._scrollBar.reset();
2560
+ EventHandler.trigger(this._element, EVENT_HIDDEN$4);
2561
+ });
2562
+ }
2563
+ _isAnimated() {
2564
+ return this._element.classList.contains(CLASS_NAME_FADE$3);
2565
+ }
2566
+ _triggerBackdropTransition() {
2567
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED$1);
2568
+ if (hideEvent.defaultPrevented) {
2569
+ return;
2570
+ }
2571
+ const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2572
+ const initialOverflowY = this._element.style.overflowY;
2573
+ // return if the following background transition hasn't yet completed
2574
+ if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {
2575
+ return;
2576
+ }
2577
+ if (!isModalOverflowing) {
2578
+ this._element.style.overflowY = 'hidden';
2579
+ }
2580
+ this._element.classList.add(CLASS_NAME_STATIC);
2581
+ this._queueCallback(() => {
2582
+ this._element.classList.remove(CLASS_NAME_STATIC);
2583
+ this._queueCallback(() => {
2584
+ this._element.style.overflowY = initialOverflowY;
2585
+ }, this._dialog);
2586
+ }, this._dialog);
2587
+ this._element.focus();
2588
+ }
2589
+
2590
+ /**
2591
+ * The following methods are used to handle overflowing modals
2592
+ */
2593
+
2594
+ _adjustDialog() {
2595
+ const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
2596
+ const scrollbarWidth = this._scrollBar.getWidth();
2597
+ const isBodyOverflowing = scrollbarWidth > 0;
2598
+ if (isBodyOverflowing && !isModalOverflowing) {
2599
+ const property = isRTL() ? 'paddingLeft' : 'paddingRight';
2600
+ this._element.style[property] = `${scrollbarWidth}px`;
2601
+ }
2602
+ if (!isBodyOverflowing && isModalOverflowing) {
2603
+ const property = isRTL() ? 'paddingRight' : 'paddingLeft';
2604
+ this._element.style[property] = `${scrollbarWidth}px`;
2605
+ }
2606
+ }
2607
+ _resetAdjustments() {
2608
+ this._element.style.paddingLeft = '';
2609
+ this._element.style.paddingRight = '';
2610
+ }
2611
+
2612
+ // Static
2613
+ static jQueryInterface(config, relatedTarget) {
2614
+ return this.each(function () {
2615
+ const data = Modal.getOrCreateInstance(this, config);
2616
+ if (typeof config !== 'string') {
2617
+ return;
2618
+ }
2619
+ if (typeof data[config] === 'undefined') {
2620
+ throw new TypeError(`No method named "${config}"`);
2621
+ }
2622
+ data[config](relatedTarget);
2623
+ });
2624
+ }
2625
+ }
2626
+
2627
+ /**
2628
+ * Data API implementation
2629
+ */
2630
+
2631
+ EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {
2632
+ const target = SelectorEngine.getElementFromSelector(this);
2633
+ if (['A', 'AREA'].includes(this.tagName)) {
2634
+ event.preventDefault();
2635
+ }
2636
+ EventHandler.one(target, EVENT_SHOW$4, showEvent => {
2637
+ if (showEvent.defaultPrevented) {
2638
+ // only register focus restorer if modal will actually get shown
2639
+ return;
2640
+ }
2641
+ EventHandler.one(target, EVENT_HIDDEN$4, () => {
2642
+ if (isVisible(this)) {
2643
+ this.focus();
2644
+ }
2645
+ });
2646
+ });
2647
+
2648
+ // avoid conflict when clicking modal toggler while another one is open
2649
+ const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1);
2650
+ if (alreadyOpen) {
2651
+ Modal.getInstance(alreadyOpen).hide();
2652
+ }
2653
+ const data = Modal.getOrCreateInstance(target);
2654
+ data.toggle(this);
2655
+ });
2656
+ enableDismissTrigger(Modal);
2657
+
2658
+ /**
2659
+ * jQuery
2660
+ */
2661
+
2662
+ defineJQueryPlugin(Modal);
2663
+
2664
+ /**
2665
+ * --------------------------------------------------------------------------
2666
+ * Bootstrap offcanvas.js
2667
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2668
+ * --------------------------------------------------------------------------
2669
+ */
2670
+
2671
+ /**
2672
+ * Constants
2673
+ */
2674
+
2675
+ const NAME$6 = 'offcanvas';
2676
+ const DATA_KEY$3 = 'bs.offcanvas';
2677
+ const EVENT_KEY$3 = `.${DATA_KEY$3}`;
2678
+ const DATA_API_KEY$1 = '.data-api';
2679
+ const EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$3}${DATA_API_KEY$1}`;
2680
+ const ESCAPE_KEY = 'Escape';
2681
+ const CLASS_NAME_SHOW$3 = 'show';
2682
+ const CLASS_NAME_SHOWING$1 = 'showing';
2683
+ const CLASS_NAME_HIDING = 'hiding';
2684
+ const CLASS_NAME_BACKDROP = 'offcanvas-backdrop';
2685
+ const OPEN_SELECTOR = '.offcanvas.show';
2686
+ const EVENT_SHOW$3 = `show${EVENT_KEY$3}`;
2687
+ const EVENT_SHOWN$3 = `shown${EVENT_KEY$3}`;
2688
+ const EVENT_HIDE$3 = `hide${EVENT_KEY$3}`;
2689
+ const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$3}`;
2690
+ const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$3}`;
2691
+ const EVENT_RESIZE = `resize${EVENT_KEY$3}`;
2692
+ const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$3}${DATA_API_KEY$1}`;
2693
+ const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$3}`;
2694
+ const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]';
2695
+ const Default$5 = {
2696
+ backdrop: true,
2697
+ keyboard: true,
2698
+ scroll: false
2699
+ };
2700
+ const DefaultType$5 = {
2701
+ backdrop: '(boolean|string)',
2702
+ keyboard: 'boolean',
2703
+ scroll: 'boolean'
2704
+ };
2705
+
2706
+ /**
2707
+ * Class definition
2708
+ */
2709
+
2710
+ class Offcanvas extends BaseComponent {
2711
+ constructor(element, config) {
2712
+ super(element, config);
2713
+ this._isShown = false;
2714
+ this._backdrop = this._initializeBackDrop();
2715
+ this._focustrap = this._initializeFocusTrap();
2716
+ this._addEventListeners();
2717
+ }
2718
+
2719
+ // Getters
2720
+ static get Default() {
2721
+ return Default$5;
2722
+ }
2723
+ static get DefaultType() {
2724
+ return DefaultType$5;
2725
+ }
2726
+ static get NAME() {
2727
+ return NAME$6;
2728
+ }
2729
+
2730
+ // Public
2731
+ toggle(relatedTarget) {
2732
+ return this._isShown ? this.hide() : this.show(relatedTarget);
2733
+ }
2734
+ show(relatedTarget) {
2735
+ if (this._isShown) {
2736
+ return;
2737
+ }
2738
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {
2739
+ relatedTarget
2740
+ });
2741
+ if (showEvent.defaultPrevented) {
2742
+ return;
2743
+ }
2744
+ this._isShown = true;
2745
+ this._backdrop.show();
2746
+ if (!this._config.scroll) {
2747
+ new ScrollBarHelper().hide();
2748
+ }
2749
+ this._element.setAttribute('aria-modal', true);
2750
+ this._element.setAttribute('role', 'dialog');
2751
+ this._element.classList.add(CLASS_NAME_SHOWING$1);
2752
+ const completeCallBack = () => {
2753
+ if (!this._config.scroll || this._config.backdrop) {
2754
+ this._focustrap.activate();
2755
+ }
2756
+ this._element.classList.add(CLASS_NAME_SHOW$3);
2757
+ this._element.classList.remove(CLASS_NAME_SHOWING$1);
2758
+ EventHandler.trigger(this._element, EVENT_SHOWN$3, {
2759
+ relatedTarget
2760
+ });
2761
+ };
2762
+ this._queueCallback(completeCallBack, this._element, true);
2763
+ }
2764
+ hide() {
2765
+ if (!this._isShown) {
2766
+ return;
2767
+ }
2768
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);
2769
+ if (hideEvent.defaultPrevented) {
2770
+ return;
2771
+ }
2772
+ this._focustrap.deactivate();
2773
+ this._element.blur();
2774
+ this._isShown = false;
2775
+ this._element.classList.add(CLASS_NAME_HIDING);
2776
+ this._backdrop.hide();
2777
+ const completeCallback = () => {
2778
+ this._element.classList.remove(CLASS_NAME_SHOW$3, CLASS_NAME_HIDING);
2779
+ this._element.removeAttribute('aria-modal');
2780
+ this._element.removeAttribute('role');
2781
+ if (!this._config.scroll) {
2782
+ new ScrollBarHelper().reset();
2783
+ }
2784
+ EventHandler.trigger(this._element, EVENT_HIDDEN$3);
2785
+ };
2786
+ this._queueCallback(completeCallback, this._element, true);
2787
+ }
2788
+ dispose() {
2789
+ this._backdrop.dispose();
2790
+ this._focustrap.deactivate();
2791
+ super.dispose();
2792
+ }
2793
+
2794
+ // Private
2795
+ _initializeBackDrop() {
2796
+ const clickCallback = () => {
2797
+ if (this._config.backdrop === 'static') {
2798
+ EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
2799
+ return;
2800
+ }
2801
+ this.hide();
2802
+ };
2803
+
2804
+ // 'static' option will be translated to true, and booleans will keep their value
2805
+ const isVisible = Boolean(this._config.backdrop);
2806
+ return new Backdrop({
2807
+ className: CLASS_NAME_BACKDROP,
2808
+ isVisible,
2809
+ isAnimated: true,
2810
+ rootElement: this._element.parentNode,
2811
+ clickCallback: isVisible ? clickCallback : null
2812
+ });
2813
+ }
2814
+ _initializeFocusTrap() {
2815
+ return new FocusTrap({
2816
+ trapElement: this._element
2817
+ });
2818
+ }
2819
+ _addEventListeners() {
2820
+ EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
2821
+ if (event.key !== ESCAPE_KEY) {
2822
+ return;
2823
+ }
2824
+ if (this._config.keyboard) {
2825
+ this.hide();
2826
+ return;
2827
+ }
2828
+ EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
2829
+ });
2830
+ }
2831
+
2832
+ // Static
2833
+ static jQueryInterface(config) {
2834
+ return this.each(function () {
2835
+ const data = Offcanvas.getOrCreateInstance(this, config);
2836
+ if (typeof config !== 'string') {
2837
+ return;
2838
+ }
2839
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
2840
+ throw new TypeError(`No method named "${config}"`);
2841
+ }
2842
+ data[config](this);
2843
+ });
2844
+ }
2845
+ }
2846
+
2847
+ /**
2848
+ * Data API implementation
2849
+ */
2850
+
2851
+ EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {
2852
+ const target = SelectorEngine.getElementFromSelector(this);
2853
+ if (['A', 'AREA'].includes(this.tagName)) {
2854
+ event.preventDefault();
2855
+ }
2856
+ if (isDisabled(this)) {
2857
+ return;
2858
+ }
2859
+ EventHandler.one(target, EVENT_HIDDEN$3, () => {
2860
+ // focus on trigger when it is closed
2861
+ if (isVisible(this)) {
2862
+ this.focus();
2863
+ }
2864
+ });
2865
+
2866
+ // avoid conflict when clicking a toggler of an offcanvas, while another is open
2867
+ const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);
2868
+ if (alreadyOpen && alreadyOpen !== target) {
2869
+ Offcanvas.getInstance(alreadyOpen).hide();
2870
+ }
2871
+ const data = Offcanvas.getOrCreateInstance(target);
2872
+ data.toggle(this);
2873
+ });
2874
+ EventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {
2875
+ for (const selector of SelectorEngine.find(OPEN_SELECTOR)) {
2876
+ Offcanvas.getOrCreateInstance(selector).show();
2877
+ }
2878
+ });
2879
+ EventHandler.on(window, EVENT_RESIZE, () => {
2880
+ for (const element of SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')) {
2881
+ if (getComputedStyle(element).position !== 'fixed') {
2882
+ Offcanvas.getOrCreateInstance(element).hide();
2883
+ }
2884
+ }
2885
+ });
2886
+ enableDismissTrigger(Offcanvas);
2887
+
2888
+ /**
2889
+ * jQuery
2890
+ */
2891
+
2892
+ defineJQueryPlugin(Offcanvas);
2893
+
2894
+ /**
2895
+ * --------------------------------------------------------------------------
2896
+ * Bootstrap util/sanitizer.js
2897
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2898
+ * --------------------------------------------------------------------------
2899
+ */
2900
+
2901
+ const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
2902
+
2903
+ /**
2904
+ * A pattern that recognizes a commonly useful subset of URLs that are safe.
2905
+ *
2906
+ * Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
2907
+ */
2908
+ const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
2909
+
2910
+ /**
2911
+ * A pattern that matches safe data URLs. Only matches image, video and audio types.
2912
+ *
2913
+ * Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
2914
+ */
2915
+ 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;
2916
+ const allowedAttribute = (attribute, allowedAttributeList) => {
2917
+ const attributeName = attribute.nodeName.toLowerCase();
2918
+ if (allowedAttributeList.includes(attributeName)) {
2919
+ if (uriAttributes.has(attributeName)) {
2920
+ return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue));
2921
+ }
2922
+ return true;
2923
+ }
2924
+
2925
+ // Check if a regular expression validates the attribute.
2926
+ return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));
2927
+ };
2928
+
2929
+ // js-docs-start allow-list
2930
+ const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
2931
+ const DefaultAllowlist = {
2932
+ // Global attributes allowed on any supplied element below.
2933
+ '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
2934
+ a: ['target', 'href', 'title', 'rel'],
2935
+ area: [],
2936
+ b: [],
2937
+ br: [],
2938
+ col: [],
2939
+ code: [],
2940
+ div: [],
2941
+ em: [],
2942
+ hr: [],
2943
+ h1: [],
2944
+ h2: [],
2945
+ h3: [],
2946
+ h4: [],
2947
+ h5: [],
2948
+ h6: [],
2949
+ i: [],
2950
+ img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
2951
+ li: [],
2952
+ ol: [],
2953
+ p: [],
2954
+ pre: [],
2955
+ s: [],
2956
+ small: [],
2957
+ span: [],
2958
+ sub: [],
2959
+ sup: [],
2960
+ strong: [],
2961
+ u: [],
2962
+ ul: []
2963
+ };
2964
+ // js-docs-end allow-list
2965
+
2966
+ function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
2967
+ if (!unsafeHtml.length) {
2968
+ return unsafeHtml;
2969
+ }
2970
+ if (sanitizeFunction && typeof sanitizeFunction === 'function') {
2971
+ return sanitizeFunction(unsafeHtml);
2972
+ }
2973
+ const domParser = new window.DOMParser();
2974
+ const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
2975
+ const elements = [].concat(...createdDocument.body.querySelectorAll('*'));
2976
+ for (const element of elements) {
2977
+ const elementName = element.nodeName.toLowerCase();
2978
+ if (!Object.keys(allowList).includes(elementName)) {
2979
+ element.remove();
2980
+ continue;
2981
+ }
2982
+ const attributeList = [].concat(...element.attributes);
2983
+ const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []);
2984
+ for (const attribute of attributeList) {
2985
+ if (!allowedAttribute(attribute, allowedAttributes)) {
2986
+ element.removeAttribute(attribute.nodeName);
2987
+ }
2988
+ }
2989
+ }
2990
+ return createdDocument.body.innerHTML;
2991
+ }
2992
+
2993
+ /**
2994
+ * --------------------------------------------------------------------------
2995
+ * Bootstrap util/template-factory.js
2996
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2997
+ * --------------------------------------------------------------------------
2998
+ */
2999
+
3000
+ /**
3001
+ * Constants
3002
+ */
3003
+
3004
+ const NAME$5 = 'TemplateFactory';
3005
+ const Default$4 = {
3006
+ allowList: DefaultAllowlist,
3007
+ content: {},
3008
+ // { selector : text , selector2 : text2 , }
3009
+ extraClass: '',
3010
+ html: false,
3011
+ sanitize: true,
3012
+ sanitizeFn: null,
3013
+ template: '<div></div>'
3014
+ };
3015
+ const DefaultType$4 = {
3016
+ allowList: 'object',
3017
+ content: 'object',
3018
+ extraClass: '(string|function)',
3019
+ html: 'boolean',
3020
+ sanitize: 'boolean',
3021
+ sanitizeFn: '(null|function)',
3022
+ template: 'string'
3023
+ };
3024
+ const DefaultContentType = {
3025
+ entry: '(string|element|function|null)',
3026
+ selector: '(string|element)'
3027
+ };
3028
+
3029
+ /**
3030
+ * Class definition
3031
+ */
3032
+
3033
+ class TemplateFactory extends Config {
3034
+ constructor(config) {
3035
+ super();
3036
+ this._config = this._getConfig(config);
3037
+ }
3038
+
3039
+ // Getters
3040
+ static get Default() {
3041
+ return Default$4;
3042
+ }
3043
+ static get DefaultType() {
3044
+ return DefaultType$4;
3045
+ }
3046
+ static get NAME() {
3047
+ return NAME$5;
3048
+ }
3049
+
3050
+ // Public
3051
+ getContent() {
3052
+ return Object.values(this._config.content).map(config => this._resolvePossibleFunction(config)).filter(Boolean);
3053
+ }
3054
+ hasContent() {
3055
+ return this.getContent().length > 0;
3056
+ }
3057
+ changeContent(content) {
3058
+ this._checkContent(content);
3059
+ this._config.content = {
3060
+ ...this._config.content,
3061
+ ...content
3062
+ };
3063
+ return this;
3064
+ }
3065
+ toHtml() {
3066
+ const templateWrapper = document.createElement('div');
3067
+ templateWrapper.innerHTML = this._maybeSanitize(this._config.template);
3068
+ for (const [selector, text] of Object.entries(this._config.content)) {
3069
+ this._setContent(templateWrapper, text, selector);
3070
+ }
3071
+ const template = templateWrapper.children[0];
3072
+ const extraClass = this._resolvePossibleFunction(this._config.extraClass);
3073
+ if (extraClass) {
3074
+ template.classList.add(...extraClass.split(' '));
3075
+ }
3076
+ return template;
3077
+ }
3078
+
3079
+ // Private
3080
+ _typeCheckConfig(config) {
3081
+ super._typeCheckConfig(config);
3082
+ this._checkContent(config.content);
3083
+ }
3084
+ _checkContent(arg) {
3085
+ for (const [selector, content] of Object.entries(arg)) {
3086
+ super._typeCheckConfig({
3087
+ selector,
3088
+ entry: content
3089
+ }, DefaultContentType);
3090
+ }
3091
+ }
3092
+ _setContent(template, content, selector) {
3093
+ const templateElement = SelectorEngine.findOne(selector, template);
3094
+ if (!templateElement) {
3095
+ return;
3096
+ }
3097
+ content = this._resolvePossibleFunction(content);
3098
+ if (!content) {
3099
+ templateElement.remove();
3100
+ return;
3101
+ }
3102
+ if (isElement(content)) {
3103
+ this._putElementInTemplate(getElement(content), templateElement);
3104
+ return;
3105
+ }
3106
+ if (this._config.html) {
3107
+ templateElement.innerHTML = this._maybeSanitize(content);
3108
+ return;
3109
+ }
3110
+ templateElement.textContent = content;
3111
+ }
3112
+ _maybeSanitize(arg) {
3113
+ return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg;
3114
+ }
3115
+ _resolvePossibleFunction(arg) {
3116
+ return execute(arg, [this]);
3117
+ }
3118
+ _putElementInTemplate(element, templateElement) {
3119
+ if (this._config.html) {
3120
+ templateElement.innerHTML = '';
3121
+ templateElement.append(element);
3122
+ return;
3123
+ }
3124
+ templateElement.textContent = element.textContent;
3125
+ }
3126
+ }
3127
+
3128
+ /**
3129
+ * --------------------------------------------------------------------------
3130
+ * Bootstrap tooltip.js
3131
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3132
+ * --------------------------------------------------------------------------
3133
+ */
3134
+
3135
+ /**
3136
+ * Constants
3137
+ */
3138
+
3139
+ const NAME$4 = 'tooltip';
3140
+ const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
3141
+ const CLASS_NAME_FADE$2 = 'fade';
3142
+ const CLASS_NAME_MODAL = 'modal';
3143
+ const CLASS_NAME_SHOW$2 = 'show';
3144
+ const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
3145
+ const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;
3146
+ const EVENT_MODAL_HIDE = 'hide.bs.modal';
3147
+ const TRIGGER_HOVER = 'hover';
3148
+ const TRIGGER_FOCUS = 'focus';
3149
+ const TRIGGER_CLICK = 'click';
3150
+ const TRIGGER_MANUAL = 'manual';
3151
+ const EVENT_HIDE$2 = 'hide';
3152
+ const EVENT_HIDDEN$2 = 'hidden';
3153
+ const EVENT_SHOW$2 = 'show';
3154
+ const EVENT_SHOWN$2 = 'shown';
3155
+ const EVENT_INSERTED = 'inserted';
3156
+ const EVENT_CLICK$1 = 'click';
3157
+ const EVENT_FOCUSIN$1 = 'focusin';
3158
+ const EVENT_FOCUSOUT$1 = 'focusout';
3159
+ const EVENT_MOUSEENTER = 'mouseenter';
3160
+ const EVENT_MOUSELEAVE = 'mouseleave';
3161
+ const AttachmentMap = {
3162
+ AUTO: 'auto',
3163
+ TOP: 'top',
3164
+ RIGHT: isRTL() ? 'left' : 'right',
3165
+ BOTTOM: 'bottom',
3166
+ LEFT: isRTL() ? 'right' : 'left'
3167
+ };
3168
+ const Default$3 = {
3169
+ allowList: DefaultAllowlist,
3170
+ animation: true,
3171
+ boundary: 'clippingParents',
3172
+ container: false,
3173
+ customClass: '',
3174
+ delay: 0,
3175
+ fallbackPlacements: ['top', 'right', 'bottom', 'left'],
3176
+ html: false,
3177
+ offset: [0, 6],
3178
+ placement: 'top',
3179
+ popperConfig: null,
3180
+ sanitize: true,
3181
+ sanitizeFn: null,
3182
+ selector: false,
3183
+ template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
3184
+ title: '',
3185
+ trigger: 'hover focus'
3186
+ };
3187
+ const DefaultType$3 = {
3188
+ allowList: 'object',
3189
+ animation: 'boolean',
3190
+ boundary: '(string|element)',
3191
+ container: '(string|element|boolean)',
3192
+ customClass: '(string|function)',
3193
+ delay: '(number|object)',
3194
+ fallbackPlacements: 'array',
3195
+ html: 'boolean',
3196
+ offset: '(array|string|function)',
3197
+ placement: '(string|function)',
3198
+ popperConfig: '(null|object|function)',
3199
+ sanitize: 'boolean',
3200
+ sanitizeFn: '(null|function)',
3201
+ selector: '(string|boolean)',
3202
+ template: 'string',
3203
+ title: '(string|element|function)',
3204
+ trigger: 'string'
3205
+ };
3206
+
3207
+ /**
3208
+ * Class definition
3209
+ */
3210
+
3211
+ class Tooltip extends BaseComponent {
3212
+ constructor(element, config) {
3213
+ if (typeof Popper === 'undefined') {
3214
+ throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
3215
+ }
3216
+ super(element, config);
3217
+
3218
+ // Private
3219
+ this._isEnabled = true;
3220
+ this._timeout = 0;
3221
+ this._isHovered = null;
3222
+ this._activeTrigger = {};
3223
+ this._popper = null;
3224
+ this._templateFactory = null;
3225
+ this._newContent = null;
3226
+
3227
+ // Protected
3228
+ this.tip = null;
3229
+ this._setListeners();
3230
+ if (!this._config.selector) {
3231
+ this._fixTitle();
3232
+ }
3233
+ }
3234
+
3235
+ // Getters
3236
+ static get Default() {
3237
+ return Default$3;
3238
+ }
3239
+ static get DefaultType() {
3240
+ return DefaultType$3;
3241
+ }
3242
+ static get NAME() {
3243
+ return NAME$4;
3244
+ }
3245
+
3246
+ // Public
3247
+ enable() {
3248
+ this._isEnabled = true;
3249
+ }
3250
+ disable() {
3251
+ this._isEnabled = false;
3252
+ }
3253
+ toggleEnabled() {
3254
+ this._isEnabled = !this._isEnabled;
3255
+ }
3256
+ toggle() {
3257
+ if (!this._isEnabled) {
3258
+ return;
3259
+ }
3260
+ this._activeTrigger.click = !this._activeTrigger.click;
3261
+ if (this._isShown()) {
3262
+ this._leave();
3263
+ return;
3264
+ }
3265
+ this._enter();
3266
+ }
3267
+ dispose() {
3268
+ clearTimeout(this._timeout);
3269
+ EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
3270
+ if (this._element.getAttribute('data-bs-original-title')) {
3271
+ this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));
3272
+ }
3273
+ this._disposePopper();
3274
+ super.dispose();
3275
+ }
3276
+ show() {
3277
+ if (this._element.style.display === 'none') {
3278
+ throw new Error('Please use show on visible elements');
3279
+ }
3280
+ if (!(this._isWithContent() && this._isEnabled)) {
3281
+ return;
3282
+ }
3283
+ const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW$2));
3284
+ const shadowRoot = findShadowRoot(this._element);
3285
+ const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element);
3286
+ if (showEvent.defaultPrevented || !isInTheDom) {
3287
+ return;
3288
+ }
3289
+
3290
+ // TODO: v6 remove this or make it optional
3291
+ this._disposePopper();
3292
+ const tip = this._getTipElement();
3293
+ this._element.setAttribute('aria-describedby', tip.getAttribute('id'));
3294
+ const {
3295
+ container
3296
+ } = this._config;
3297
+ if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
3298
+ container.append(tip);
3299
+ EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED));
3300
+ }
3301
+ this._popper = this._createPopper(tip);
3302
+ tip.classList.add(CLASS_NAME_SHOW$2);
3303
+
3304
+ // If this is a touch-enabled device we add extra
3305
+ // empty mouseover listeners to the body's immediate children;
3306
+ // only needed because of broken event delegation on iOS
3307
+ // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
3308
+ if ('ontouchstart' in document.documentElement) {
3309
+ for (const element of [].concat(...document.body.children)) {
3310
+ EventHandler.on(element, 'mouseover', noop);
3311
+ }
3312
+ }
3313
+ const complete = () => {
3314
+ EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN$2));
3315
+ if (this._isHovered === false) {
3316
+ this._leave();
3317
+ }
3318
+ this._isHovered = false;
3319
+ };
3320
+ this._queueCallback(complete, this.tip, this._isAnimated());
3321
+ }
3322
+ hide() {
3323
+ if (!this._isShown()) {
3324
+ return;
3325
+ }
3326
+ const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE$2));
3327
+ if (hideEvent.defaultPrevented) {
3328
+ return;
3329
+ }
3330
+ const tip = this._getTipElement();
3331
+ tip.classList.remove(CLASS_NAME_SHOW$2);
3332
+
3333
+ // If this is a touch-enabled device we remove the extra
3334
+ // empty mouseover listeners we added for iOS support
3335
+ if ('ontouchstart' in document.documentElement) {
3336
+ for (const element of [].concat(...document.body.children)) {
3337
+ EventHandler.off(element, 'mouseover', noop);
3338
+ }
3339
+ }
3340
+ this._activeTrigger[TRIGGER_CLICK] = false;
3341
+ this._activeTrigger[TRIGGER_FOCUS] = false;
3342
+ this._activeTrigger[TRIGGER_HOVER] = false;
3343
+ this._isHovered = null; // it is a trick to support manual triggering
3344
+
3345
+ const complete = () => {
3346
+ if (this._isWithActiveTrigger()) {
3347
+ return;
3348
+ }
3349
+ if (!this._isHovered) {
3350
+ this._disposePopper();
3351
+ }
3352
+ this._element.removeAttribute('aria-describedby');
3353
+ EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN$2));
3354
+ };
3355
+ this._queueCallback(complete, this.tip, this._isAnimated());
3356
+ }
3357
+ update() {
3358
+ if (this._popper) {
3359
+ this._popper.update();
3360
+ }
3361
+ }
3362
+
3363
+ // Protected
3364
+ _isWithContent() {
3365
+ return Boolean(this._getTitle());
3366
+ }
3367
+ _getTipElement() {
3368
+ if (!this.tip) {
3369
+ this.tip = this._createTipElement(this._newContent || this._getContentForTemplate());
3370
+ }
3371
+ return this.tip;
3372
+ }
3373
+ _createTipElement(content) {
3374
+ const tip = this._getTemplateFactory(content).toHtml();
3375
+
3376
+ // TODO: remove this check in v6
3377
+ if (!tip) {
3378
+ return null;
3379
+ }
3380
+ tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
3381
+ // TODO: v6 the following can be achieved with CSS only
3382
+ tip.classList.add(`bs-${this.constructor.NAME}-auto`);
3383
+ const tipId = getUID(this.constructor.NAME).toString();
3384
+ tip.setAttribute('id', tipId);
3385
+ if (this._isAnimated()) {
3386
+ tip.classList.add(CLASS_NAME_FADE$2);
3387
+ }
3388
+ return tip;
3389
+ }
3390
+ setContent(content) {
3391
+ this._newContent = content;
3392
+ if (this._isShown()) {
3393
+ this._disposePopper();
3394
+ this.show();
3395
+ }
3396
+ }
3397
+ _getTemplateFactory(content) {
3398
+ if (this._templateFactory) {
3399
+ this._templateFactory.changeContent(content);
3400
+ } else {
3401
+ this._templateFactory = new TemplateFactory({
3402
+ ...this._config,
3403
+ // the `content` var has to be after `this._config`
3404
+ // to override config.content in case of popover
3405
+ content,
3406
+ extraClass: this._resolvePossibleFunction(this._config.customClass)
3407
+ });
3408
+ }
3409
+ return this._templateFactory;
3410
+ }
3411
+ _getContentForTemplate() {
3412
+ return {
3413
+ [SELECTOR_TOOLTIP_INNER]: this._getTitle()
3414
+ };
3415
+ }
3416
+ _getTitle() {
3417
+ return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title');
3418
+ }
3419
+
3420
+ // Private
3421
+ _initializeOnDelegatedTarget(event) {
3422
+ return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());
3423
+ }
3424
+ _isAnimated() {
3425
+ return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE$2);
3426
+ }
3427
+ _isShown() {
3428
+ return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW$2);
3429
+ }
3430
+ _createPopper(tip) {
3431
+ const placement = execute(this._config.placement, [this, tip, this._element]);
3432
+ const attachment = AttachmentMap[placement.toUpperCase()];
3433
+ return Popper.createPopper(this._element, tip, this._getPopperConfig(attachment));
3434
+ }
3435
+ _getOffset() {
3436
+ const {
3437
+ offset
3438
+ } = this._config;
3439
+ if (typeof offset === 'string') {
3440
+ return offset.split(',').map(value => Number.parseInt(value, 10));
3441
+ }
3442
+ if (typeof offset === 'function') {
3443
+ return popperData => offset(popperData, this._element);
3444
+ }
3445
+ return offset;
3446
+ }
3447
+ _resolvePossibleFunction(arg) {
3448
+ return execute(arg, [this._element]);
3449
+ }
3450
+ _getPopperConfig(attachment) {
3451
+ const defaultBsPopperConfig = {
3452
+ placement: attachment,
3453
+ modifiers: [{
3454
+ name: 'flip',
3455
+ options: {
3456
+ fallbackPlacements: this._config.fallbackPlacements
3457
+ }
3458
+ }, {
3459
+ name: 'offset',
3460
+ options: {
3461
+ offset: this._getOffset()
3462
+ }
3463
+ }, {
3464
+ name: 'preventOverflow',
3465
+ options: {
3466
+ boundary: this._config.boundary
3467
+ }
3468
+ }, {
3469
+ name: 'arrow',
3470
+ options: {
3471
+ element: `.${this.constructor.NAME}-arrow`
3472
+ }
3473
+ }, {
3474
+ name: 'preSetPlacement',
3475
+ enabled: true,
3476
+ phase: 'beforeMain',
3477
+ fn: data => {
3478
+ // Pre-set Popper's placement attribute in order to read the arrow sizes properly.
3479
+ // Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement
3480
+ this._getTipElement().setAttribute('data-popper-placement', data.state.placement);
3481
+ }
3482
+ }]
3483
+ };
3484
+ return {
3485
+ ...defaultBsPopperConfig,
3486
+ ...execute(this._config.popperConfig, [defaultBsPopperConfig])
3487
+ };
3488
+ }
3489
+ _setListeners() {
3490
+ const triggers = this._config.trigger.split(' ');
3491
+ for (const trigger of triggers) {
3492
+ if (trigger === 'click') {
3493
+ EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => {
3494
+ const context = this._initializeOnDelegatedTarget(event);
3495
+ context.toggle();
3496
+ });
3497
+ } else if (trigger !== TRIGGER_MANUAL) {
3498
+ const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN$1);
3499
+ const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT$1);
3500
+ EventHandler.on(this._element, eventIn, this._config.selector, event => {
3501
+ const context = this._initializeOnDelegatedTarget(event);
3502
+ context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
3503
+ context._enter();
3504
+ });
3505
+ EventHandler.on(this._element, eventOut, this._config.selector, event => {
3506
+ const context = this._initializeOnDelegatedTarget(event);
3507
+ context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);
3508
+ context._leave();
3509
+ });
3510
+ }
3511
+ }
3512
+ this._hideModalHandler = () => {
3513
+ if (this._element) {
3514
+ this.hide();
3515
+ }
3516
+ };
3517
+ EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
3518
+ }
3519
+ _fixTitle() {
3520
+ const title = this._element.getAttribute('title');
3521
+ if (!title) {
3522
+ return;
3523
+ }
3524
+ if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {
3525
+ this._element.setAttribute('aria-label', title);
3526
+ }
3527
+ this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility
3528
+ this._element.removeAttribute('title');
3529
+ }
3530
+ _enter() {
3531
+ if (this._isShown() || this._isHovered) {
3532
+ this._isHovered = true;
3533
+ return;
3534
+ }
3535
+ this._isHovered = true;
3536
+ this._setTimeout(() => {
3537
+ if (this._isHovered) {
3538
+ this.show();
3539
+ }
3540
+ }, this._config.delay.show);
3541
+ }
3542
+ _leave() {
3543
+ if (this._isWithActiveTrigger()) {
3544
+ return;
3545
+ }
3546
+ this._isHovered = false;
3547
+ this._setTimeout(() => {
3548
+ if (!this._isHovered) {
3549
+ this.hide();
3550
+ }
3551
+ }, this._config.delay.hide);
3552
+ }
3553
+ _setTimeout(handler, timeout) {
3554
+ clearTimeout(this._timeout);
3555
+ this._timeout = setTimeout(handler, timeout);
3556
+ }
3557
+ _isWithActiveTrigger() {
3558
+ return Object.values(this._activeTrigger).includes(true);
3559
+ }
3560
+ _getConfig(config) {
3561
+ const dataAttributes = Manipulator.getDataAttributes(this._element);
3562
+ for (const dataAttribute of Object.keys(dataAttributes)) {
3563
+ if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {
3564
+ delete dataAttributes[dataAttribute];
3565
+ }
3566
+ }
3567
+ config = {
3568
+ ...dataAttributes,
3569
+ ...(typeof config === 'object' && config ? config : {})
3570
+ };
3571
+ config = this._mergeConfigObj(config);
3572
+ config = this._configAfterMerge(config);
3573
+ this._typeCheckConfig(config);
3574
+ return config;
3575
+ }
3576
+ _configAfterMerge(config) {
3577
+ config.container = config.container === false ? document.body : getElement(config.container);
3578
+ if (typeof config.delay === 'number') {
3579
+ config.delay = {
3580
+ show: config.delay,
3581
+ hide: config.delay
3582
+ };
3583
+ }
3584
+ if (typeof config.title === 'number') {
3585
+ config.title = config.title.toString();
3586
+ }
3587
+ if (typeof config.content === 'number') {
3588
+ config.content = config.content.toString();
3589
+ }
3590
+ return config;
3591
+ }
3592
+ _getDelegateConfig() {
3593
+ const config = {};
3594
+ for (const [key, value] of Object.entries(this._config)) {
3595
+ if (this.constructor.Default[key] !== value) {
3596
+ config[key] = value;
3597
+ }
3598
+ }
3599
+ config.selector = false;
3600
+ config.trigger = 'manual';
3601
+
3602
+ // In the future can be replaced with:
3603
+ // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
3604
+ // `Object.fromEntries(keysWithDifferentValues)`
3605
+ return config;
3606
+ }
3607
+ _disposePopper() {
3608
+ if (this._popper) {
3609
+ this._popper.destroy();
3610
+ this._popper = null;
3611
+ }
3612
+ if (this.tip) {
3613
+ this.tip.remove();
3614
+ this.tip = null;
3615
+ }
3616
+ }
3617
+
3618
+ // Static
3619
+ static jQueryInterface(config) {
3620
+ return this.each(function () {
3621
+ const data = Tooltip.getOrCreateInstance(this, config);
3622
+ if (typeof config !== 'string') {
3623
+ return;
3624
+ }
3625
+ if (typeof data[config] === 'undefined') {
3626
+ throw new TypeError(`No method named "${config}"`);
3627
+ }
3628
+ data[config]();
3629
+ });
3630
+ }
3631
+ }
3632
+
3633
+ /**
3634
+ * jQuery
3635
+ */
3636
+
3637
+ defineJQueryPlugin(Tooltip);
3638
+
3639
+ /**
3640
+ * --------------------------------------------------------------------------
3641
+ * Bootstrap popover.js
3642
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3643
+ * --------------------------------------------------------------------------
3644
+ */
3645
+
3646
+ /**
3647
+ * Constants
3648
+ */
3649
+
3650
+ const NAME$3 = 'popover';
3651
+ const SELECTOR_TITLE = '.popover-header';
3652
+ const SELECTOR_CONTENT = '.popover-body';
3653
+ const Default$2 = {
3654
+ ...Tooltip.Default,
3655
+ content: '',
3656
+ offset: [0, 8],
3657
+ placement: 'right',
3658
+ template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>',
3659
+ trigger: 'click'
3660
+ };
3661
+ const DefaultType$2 = {
3662
+ ...Tooltip.DefaultType,
3663
+ content: '(null|string|element|function)'
3664
+ };
3665
+
3666
+ /**
3667
+ * Class definition
3668
+ */
3669
+
3670
+ class Popover extends Tooltip {
3671
+ // Getters
3672
+ static get Default() {
3673
+ return Default$2;
3674
+ }
3675
+ static get DefaultType() {
3676
+ return DefaultType$2;
3677
+ }
3678
+ static get NAME() {
3679
+ return NAME$3;
3680
+ }
3681
+
3682
+ // Overrides
3683
+ _isWithContent() {
3684
+ return this._getTitle() || this._getContent();
3685
+ }
3686
+
3687
+ // Private
3688
+ _getContentForTemplate() {
3689
+ return {
3690
+ [SELECTOR_TITLE]: this._getTitle(),
3691
+ [SELECTOR_CONTENT]: this._getContent()
3692
+ };
3693
+ }
3694
+ _getContent() {
3695
+ return this._resolvePossibleFunction(this._config.content);
3696
+ }
3697
+
3698
+ // Static
3699
+ static jQueryInterface(config) {
3700
+ return this.each(function () {
3701
+ const data = Popover.getOrCreateInstance(this, config);
3702
+ if (typeof config !== 'string') {
3703
+ return;
3704
+ }
3705
+ if (typeof data[config] === 'undefined') {
3706
+ throw new TypeError(`No method named "${config}"`);
3707
+ }
3708
+ data[config]();
3709
+ });
3710
+ }
3711
+ }
3712
+
3713
+ /**
3714
+ * jQuery
3715
+ */
3716
+
3717
+ defineJQueryPlugin(Popover);
3718
+
3719
+ /**
3720
+ * --------------------------------------------------------------------------
3721
+ * Bootstrap scrollspy.js
3722
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3723
+ * --------------------------------------------------------------------------
3724
+ */
3725
+
3726
+ /**
3727
+ * Constants
3728
+ */
3729
+
3730
+ const NAME$2 = 'scrollspy';
3731
+ const DATA_KEY$2 = 'bs.scrollspy';
3732
+ const EVENT_KEY$2 = `.${DATA_KEY$2}`;
3733
+ const DATA_API_KEY = '.data-api';
3734
+ const EVENT_ACTIVATE = `activate${EVENT_KEY$2}`;
3735
+ const EVENT_CLICK = `click${EVENT_KEY$2}`;
3736
+ const EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$2}${DATA_API_KEY}`;
3737
+ const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
3738
+ const CLASS_NAME_ACTIVE$1 = 'active';
3739
+ const SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]';
3740
+ const SELECTOR_TARGET_LINKS = '[href]';
3741
+ const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
3742
+ const SELECTOR_NAV_LINKS = '.nav-link';
3743
+ const SELECTOR_NAV_ITEMS = '.nav-item';
3744
+ const SELECTOR_LIST_ITEMS = '.list-group-item';
3745
+ const SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`;
3746
+ const SELECTOR_DROPDOWN = '.dropdown';
3747
+ const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
3748
+ const Default$1 = {
3749
+ offset: null,
3750
+ // TODO: v6 @deprecated, keep it for backwards compatibility reasons
3751
+ rootMargin: '0px 0px -25%',
3752
+ smoothScroll: false,
3753
+ target: null,
3754
+ threshold: [0.1, 0.5, 1]
3755
+ };
3756
+ const DefaultType$1 = {
3757
+ offset: '(number|null)',
3758
+ // TODO v6 @deprecated, keep it for backwards compatibility reasons
3759
+ rootMargin: 'string',
3760
+ smoothScroll: 'boolean',
3761
+ target: 'element',
3762
+ threshold: 'array'
3763
+ };
3764
+
3765
+ /**
3766
+ * Class definition
3767
+ */
3768
+
3769
+ class ScrollSpy extends BaseComponent {
3770
+ constructor(element, config) {
3771
+ super(element, config);
3772
+
3773
+ // this._element is the observablesContainer and config.target the menu links wrapper
3774
+ this._targetLinks = new Map();
3775
+ this._observableSections = new Map();
3776
+ this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element;
3777
+ this._activeTarget = null;
3778
+ this._observer = null;
3779
+ this._previousScrollData = {
3780
+ visibleEntryTop: 0,
3781
+ parentScrollTop: 0
3782
+ };
3783
+ this.refresh(); // initialize
3784
+ }
3785
+
3786
+ // Getters
3787
+ static get Default() {
3788
+ return Default$1;
3789
+ }
3790
+ static get DefaultType() {
3791
+ return DefaultType$1;
3792
+ }
3793
+ static get NAME() {
3794
+ return NAME$2;
3795
+ }
3796
+
3797
+ // Public
3798
+ refresh() {
3799
+ this._initializeTargetsAndObservables();
3800
+ this._maybeEnableSmoothScroll();
3801
+ if (this._observer) {
3802
+ this._observer.disconnect();
3803
+ } else {
3804
+ this._observer = this._getNewObserver();
3805
+ }
3806
+ for (const section of this._observableSections.values()) {
3807
+ this._observer.observe(section);
3808
+ }
3809
+ }
3810
+ dispose() {
3811
+ this._observer.disconnect();
3812
+ super.dispose();
3813
+ }
3814
+
3815
+ // Private
3816
+ _configAfterMerge(config) {
3817
+ // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case
3818
+ config.target = getElement(config.target) || document.body;
3819
+
3820
+ // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only
3821
+ config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;
3822
+ if (typeof config.threshold === 'string') {
3823
+ config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value));
3824
+ }
3825
+ return config;
3826
+ }
3827
+ _maybeEnableSmoothScroll() {
3828
+ if (!this._config.smoothScroll) {
3829
+ return;
3830
+ }
3831
+
3832
+ // unregister any previous listeners
3833
+ EventHandler.off(this._config.target, EVENT_CLICK);
3834
+ EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => {
3835
+ const observableSection = this._observableSections.get(event.target.hash);
3836
+ if (observableSection) {
3837
+ event.preventDefault();
3838
+ const root = this._rootElement || window;
3839
+ const height = observableSection.offsetTop - this._element.offsetTop;
3840
+ if (root.scrollTo) {
3841
+ root.scrollTo({
3842
+ top: height,
3843
+ behavior: 'smooth'
3844
+ });
3845
+ return;
3846
+ }
3847
+
3848
+ // Chrome 60 doesn't support `scrollTo`
3849
+ root.scrollTop = height;
3850
+ }
3851
+ });
3852
+ }
3853
+ _getNewObserver() {
3854
+ const options = {
3855
+ root: this._rootElement,
3856
+ threshold: this._config.threshold,
3857
+ rootMargin: this._config.rootMargin
3858
+ };
3859
+ return new IntersectionObserver(entries => this._observerCallback(entries), options);
3860
+ }
3861
+
3862
+ // The logic of selection
3863
+ _observerCallback(entries) {
3864
+ const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`);
3865
+ const activate = entry => {
3866
+ this._previousScrollData.visibleEntryTop = entry.target.offsetTop;
3867
+ this._process(targetElement(entry));
3868
+ };
3869
+ const parentScrollTop = (this._rootElement || document.documentElement).scrollTop;
3870
+ const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop;
3871
+ this._previousScrollData.parentScrollTop = parentScrollTop;
3872
+ for (const entry of entries) {
3873
+ if (!entry.isIntersecting) {
3874
+ this._activeTarget = null;
3875
+ this._clearActiveClass(targetElement(entry));
3876
+ continue;
3877
+ }
3878
+ const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop;
3879
+ // if we are scrolling down, pick the bigger offsetTop
3880
+ if (userScrollsDown && entryIsLowerThanPrevious) {
3881
+ activate(entry);
3882
+ // if parent isn't scrolled, let's keep the first visible item, breaking the iteration
3883
+ if (!parentScrollTop) {
3884
+ return;
3885
+ }
3886
+ continue;
3887
+ }
3888
+
3889
+ // if we are scrolling up, pick the smallest offsetTop
3890
+ if (!userScrollsDown && !entryIsLowerThanPrevious) {
3891
+ activate(entry);
3892
+ }
3893
+ }
3894
+ }
3895
+ _initializeTargetsAndObservables() {
3896
+ this._targetLinks = new Map();
3897
+ this._observableSections = new Map();
3898
+ const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target);
3899
+ for (const anchor of targetLinks) {
3900
+ // ensure that the anchor has an id and is not disabled
3901
+ if (!anchor.hash || isDisabled(anchor)) {
3902
+ continue;
3903
+ }
3904
+ const observableSection = SelectorEngine.findOne(anchor.hash, this._element);
3905
+
3906
+ // ensure that the observableSection exists & is visible
3907
+ if (isVisible(observableSection)) {
3908
+ this._targetLinks.set(anchor.hash, anchor);
3909
+ this._observableSections.set(anchor.hash, observableSection);
3910
+ }
3911
+ }
3912
+ }
3913
+ _process(target) {
3914
+ if (this._activeTarget === target) {
3915
+ return;
3916
+ }
3917
+ this._clearActiveClass(this._config.target);
3918
+ this._activeTarget = target;
3919
+ target.classList.add(CLASS_NAME_ACTIVE$1);
3920
+ this._activateParents(target);
3921
+ EventHandler.trigger(this._element, EVENT_ACTIVATE, {
3922
+ relatedTarget: target
3923
+ });
3924
+ }
3925
+ _activateParents(target) {
3926
+ // Activate dropdown parents
3927
+ if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
3928
+ SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, target.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$1);
3929
+ return;
3930
+ }
3931
+ for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) {
3932
+ // Set triggered links parents as active
3933
+ // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
3934
+ for (const item of SelectorEngine.prev(listGroup, SELECTOR_LINK_ITEMS)) {
3935
+ item.classList.add(CLASS_NAME_ACTIVE$1);
3936
+ }
3937
+ }
3938
+ }
3939
+ _clearActiveClass(parent) {
3940
+ parent.classList.remove(CLASS_NAME_ACTIVE$1);
3941
+ const activeNodes = SelectorEngine.find(`${SELECTOR_TARGET_LINKS}.${CLASS_NAME_ACTIVE$1}`, parent);
3942
+ for (const node of activeNodes) {
3943
+ node.classList.remove(CLASS_NAME_ACTIVE$1);
3944
+ }
3945
+ }
3946
+
3947
+ // Static
3948
+ static jQueryInterface(config) {
3949
+ return this.each(function () {
3950
+ const data = ScrollSpy.getOrCreateInstance(this, config);
3951
+ if (typeof config !== 'string') {
3952
+ return;
3953
+ }
3954
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
3955
+ throw new TypeError(`No method named "${config}"`);
3956
+ }
3957
+ data[config]();
3958
+ });
3959
+ }
3960
+ }
3961
+
3962
+ /**
3963
+ * Data API implementation
3964
+ */
3965
+
3966
+ EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => {
3967
+ for (const spy of SelectorEngine.find(SELECTOR_DATA_SPY)) {
3968
+ ScrollSpy.getOrCreateInstance(spy);
3969
+ }
3970
+ });
3971
+
3972
+ /**
3973
+ * jQuery
3974
+ */
3975
+
3976
+ defineJQueryPlugin(ScrollSpy);
3977
+
3978
+ /**
3979
+ * --------------------------------------------------------------------------
3980
+ * Bootstrap tab.js
3981
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3982
+ * --------------------------------------------------------------------------
3983
+ */
3984
+
3985
+ /**
3986
+ * Constants
3987
+ */
3988
+
3989
+ const NAME$1 = 'tab';
3990
+ const DATA_KEY$1 = 'bs.tab';
3991
+ const EVENT_KEY$1 = `.${DATA_KEY$1}`;
3992
+ const EVENT_HIDE$1 = `hide${EVENT_KEY$1}`;
3993
+ const EVENT_HIDDEN$1 = `hidden${EVENT_KEY$1}`;
3994
+ const EVENT_SHOW$1 = `show${EVENT_KEY$1}`;
3995
+ const EVENT_SHOWN$1 = `shown${EVENT_KEY$1}`;
3996
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY$1}`;
3997
+ const EVENT_KEYDOWN = `keydown${EVENT_KEY$1}`;
3998
+ const EVENT_LOAD_DATA_API = `load${EVENT_KEY$1}`;
3999
+ const ARROW_LEFT_KEY = 'ArrowLeft';
4000
+ const ARROW_RIGHT_KEY = 'ArrowRight';
4001
+ const ARROW_UP_KEY = 'ArrowUp';
4002
+ const ARROW_DOWN_KEY = 'ArrowDown';
4003
+ const CLASS_NAME_ACTIVE = 'active';
4004
+ const CLASS_NAME_FADE$1 = 'fade';
4005
+ const CLASS_NAME_SHOW$1 = 'show';
4006
+ const CLASS_DROPDOWN = 'dropdown';
4007
+ const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
4008
+ const SELECTOR_DROPDOWN_MENU = '.dropdown-menu';
4009
+ const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)';
4010
+ const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
4011
+ const SELECTOR_OUTER = '.nav-item, .list-group-item';
4012
+ const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role="tab"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`;
4013
+ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'; // TODO: could only be `tab` in v6
4014
+ const SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`;
4015
+ 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"]`;
4016
+
4017
+ /**
4018
+ * Class definition
4019
+ */
4020
+
4021
+ class Tab extends BaseComponent {
4022
+ constructor(element) {
4023
+ super(element);
4024
+ this._parent = this._element.closest(SELECTOR_TAB_PANEL);
4025
+ if (!this._parent) {
4026
+ return;
4027
+ // TODO: should throw exception in v6
4028
+ // throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)
4029
+ }
4030
+
4031
+ // Set up initial aria attributes
4032
+ this._setInitialAttributes(this._parent, this._getChildren());
4033
+ EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event));
4034
+ }
4035
+
4036
+ // Getters
4037
+ static get NAME() {
4038
+ return NAME$1;
4039
+ }
4040
+
4041
+ // Public
4042
+ show() {
4043
+ // Shows this elem and deactivate the active sibling if exists
4044
+ const innerElem = this._element;
4045
+ if (this._elemIsActive(innerElem)) {
4046
+ return;
4047
+ }
4048
+
4049
+ // Search for active tab on same parent to deactivate it
4050
+ const active = this._getActiveElem();
4051
+ const hideEvent = active ? EventHandler.trigger(active, EVENT_HIDE$1, {
4052
+ relatedTarget: innerElem
4053
+ }) : null;
4054
+ const showEvent = EventHandler.trigger(innerElem, EVENT_SHOW$1, {
4055
+ relatedTarget: active
4056
+ });
4057
+ if (showEvent.defaultPrevented || hideEvent && hideEvent.defaultPrevented) {
4058
+ return;
4059
+ }
4060
+ this._deactivate(active, innerElem);
4061
+ this._activate(innerElem, active);
4062
+ }
4063
+
4064
+ // Private
4065
+ _activate(element, relatedElem) {
4066
+ if (!element) {
4067
+ return;
4068
+ }
4069
+ element.classList.add(CLASS_NAME_ACTIVE);
4070
+ this._activate(SelectorEngine.getElementFromSelector(element)); // Search and activate/show the proper section
4071
+
4072
+ const complete = () => {
4073
+ if (element.getAttribute('role') !== 'tab') {
4074
+ element.classList.add(CLASS_NAME_SHOW$1);
4075
+ return;
4076
+ }
4077
+ element.removeAttribute('tabindex');
4078
+ element.setAttribute('aria-selected', true);
4079
+ this._toggleDropDown(element, true);
4080
+ EventHandler.trigger(element, EVENT_SHOWN$1, {
4081
+ relatedTarget: relatedElem
4082
+ });
4083
+ };
4084
+ this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));
4085
+ }
4086
+ _deactivate(element, relatedElem) {
4087
+ if (!element) {
4088
+ return;
4089
+ }
4090
+ element.classList.remove(CLASS_NAME_ACTIVE);
4091
+ element.blur();
4092
+ this._deactivate(SelectorEngine.getElementFromSelector(element)); // Search and deactivate the shown section too
4093
+
4094
+ const complete = () => {
4095
+ if (element.getAttribute('role') !== 'tab') {
4096
+ element.classList.remove(CLASS_NAME_SHOW$1);
4097
+ return;
4098
+ }
4099
+ element.setAttribute('aria-selected', false);
4100
+ element.setAttribute('tabindex', '-1');
4101
+ this._toggleDropDown(element, false);
4102
+ EventHandler.trigger(element, EVENT_HIDDEN$1, {
4103
+ relatedTarget: relatedElem
4104
+ });
4105
+ };
4106
+ this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));
4107
+ }
4108
+ _keydown(event) {
4109
+ if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key)) {
4110
+ return;
4111
+ }
4112
+ event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page
4113
+ event.preventDefault();
4114
+ const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key);
4115
+ const nextActiveElement = getNextActiveElement(this._getChildren().filter(element => !isDisabled(element)), event.target, isNext, true);
4116
+ if (nextActiveElement) {
4117
+ nextActiveElement.focus({
4118
+ preventScroll: true
4119
+ });
4120
+ Tab.getOrCreateInstance(nextActiveElement).show();
4121
+ }
4122
+ }
4123
+ _getChildren() {
4124
+ // collection of inner elements
4125
+ return SelectorEngine.find(SELECTOR_INNER_ELEM, this._parent);
4126
+ }
4127
+ _getActiveElem() {
4128
+ return this._getChildren().find(child => this._elemIsActive(child)) || null;
4129
+ }
4130
+ _setInitialAttributes(parent, children) {
4131
+ this._setAttributeIfNotExists(parent, 'role', 'tablist');
4132
+ for (const child of children) {
4133
+ this._setInitialAttributesOnChild(child);
4134
+ }
4135
+ }
4136
+ _setInitialAttributesOnChild(child) {
4137
+ child = this._getInnerElement(child);
4138
+ const isActive = this._elemIsActive(child);
4139
+ const outerElem = this._getOuterElement(child);
4140
+ child.setAttribute('aria-selected', isActive);
4141
+ if (outerElem !== child) {
4142
+ this._setAttributeIfNotExists(outerElem, 'role', 'presentation');
4143
+ }
4144
+ if (!isActive) {
4145
+ child.setAttribute('tabindex', '-1');
4146
+ }
4147
+ this._setAttributeIfNotExists(child, 'role', 'tab');
4148
+
4149
+ // set attributes to the related panel too
4150
+ this._setInitialAttributesOnTargetPanel(child);
4151
+ }
4152
+ _setInitialAttributesOnTargetPanel(child) {
4153
+ const target = SelectorEngine.getElementFromSelector(child);
4154
+ if (!target) {
4155
+ return;
4156
+ }
4157
+ this._setAttributeIfNotExists(target, 'role', 'tabpanel');
4158
+ if (child.id) {
4159
+ this._setAttributeIfNotExists(target, 'aria-labelledby', `${child.id}`);
4160
+ }
4161
+ }
4162
+ _toggleDropDown(element, open) {
4163
+ const outerElem = this._getOuterElement(element);
4164
+ if (!outerElem.classList.contains(CLASS_DROPDOWN)) {
4165
+ return;
4166
+ }
4167
+ const toggle = (selector, className) => {
4168
+ const element = SelectorEngine.findOne(selector, outerElem);
4169
+ if (element) {
4170
+ element.classList.toggle(className, open);
4171
+ }
4172
+ };
4173
+ toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE);
4174
+ toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW$1);
4175
+ outerElem.setAttribute('aria-expanded', open);
4176
+ }
4177
+ _setAttributeIfNotExists(element, attribute, value) {
4178
+ if (!element.hasAttribute(attribute)) {
4179
+ element.setAttribute(attribute, value);
4180
+ }
4181
+ }
4182
+ _elemIsActive(elem) {
4183
+ return elem.classList.contains(CLASS_NAME_ACTIVE);
4184
+ }
4185
+
4186
+ // Try to get the inner element (usually the .nav-link)
4187
+ _getInnerElement(elem) {
4188
+ return elem.matches(SELECTOR_INNER_ELEM) ? elem : SelectorEngine.findOne(SELECTOR_INNER_ELEM, elem);
4189
+ }
4190
+
4191
+ // Try to get the outer element (usually the .nav-item)
4192
+ _getOuterElement(elem) {
4193
+ return elem.closest(SELECTOR_OUTER) || elem;
4194
+ }
4195
+
4196
+ // Static
4197
+ static jQueryInterface(config) {
4198
+ return this.each(function () {
4199
+ const data = Tab.getOrCreateInstance(this);
4200
+ if (typeof config !== 'string') {
4201
+ return;
4202
+ }
4203
+ if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
4204
+ throw new TypeError(`No method named "${config}"`);
4205
+ }
4206
+ data[config]();
4207
+ });
4208
+ }
4209
+ }
4210
+
4211
+ /**
4212
+ * Data API implementation
4213
+ */
4214
+
4215
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
4216
+ if (['A', 'AREA'].includes(this.tagName)) {
4217
+ event.preventDefault();
4218
+ }
4219
+ if (isDisabled(this)) {
4220
+ return;
4221
+ }
4222
+ Tab.getOrCreateInstance(this).show();
4223
+ });
4224
+
4225
+ /**
4226
+ * Initialize on focus
4227
+ */
4228
+ EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
4229
+ for (const element of SelectorEngine.find(SELECTOR_DATA_TOGGLE_ACTIVE)) {
4230
+ Tab.getOrCreateInstance(element);
4231
+ }
4232
+ });
4233
+ /**
4234
+ * jQuery
4235
+ */
4236
+
4237
+ defineJQueryPlugin(Tab);
4238
+
4239
+ /**
4240
+ * --------------------------------------------------------------------------
4241
+ * Bootstrap toast.js
4242
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4243
+ * --------------------------------------------------------------------------
4244
+ */
4245
+
4246
+ /**
4247
+ * Constants
4248
+ */
4249
+
4250
+ const NAME = 'toast';
4251
+ const DATA_KEY = 'bs.toast';
4252
+ const EVENT_KEY = `.${DATA_KEY}`;
4253
+ const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
4254
+ const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
4255
+ const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
4256
+ const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;
4257
+ const EVENT_HIDE = `hide${EVENT_KEY}`;
4258
+ const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
4259
+ const EVENT_SHOW = `show${EVENT_KEY}`;
4260
+ const EVENT_SHOWN = `shown${EVENT_KEY}`;
4261
+ const CLASS_NAME_FADE = 'fade';
4262
+ const CLASS_NAME_HIDE = 'hide'; // @deprecated - kept here only for backwards compatibility
4263
+ const CLASS_NAME_SHOW = 'show';
4264
+ const CLASS_NAME_SHOWING = 'showing';
4265
+ const DefaultType = {
4266
+ animation: 'boolean',
4267
+ autohide: 'boolean',
4268
+ delay: 'number'
4269
+ };
4270
+ const Default = {
4271
+ animation: true,
4272
+ autohide: true,
4273
+ delay: 5000
4274
+ };
4275
+
4276
+ /**
4277
+ * Class definition
4278
+ */
4279
+
4280
+ class Toast extends BaseComponent {
4281
+ constructor(element, config) {
4282
+ super(element, config);
4283
+ this._timeout = null;
4284
+ this._hasMouseInteraction = false;
4285
+ this._hasKeyboardInteraction = false;
4286
+ this._setListeners();
4287
+ }
4288
+
4289
+ // Getters
4290
+ static get Default() {
4291
+ return Default;
4292
+ }
4293
+ static get DefaultType() {
4294
+ return DefaultType;
4295
+ }
4296
+ static get NAME() {
4297
+ return NAME;
4298
+ }
4299
+
4300
+ // Public
4301
+ show() {
4302
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW);
4303
+ if (showEvent.defaultPrevented) {
4304
+ return;
4305
+ }
4306
+ this._clearTimeout();
4307
+ if (this._config.animation) {
4308
+ this._element.classList.add(CLASS_NAME_FADE);
4309
+ }
4310
+ const complete = () => {
4311
+ this._element.classList.remove(CLASS_NAME_SHOWING);
4312
+ EventHandler.trigger(this._element, EVENT_SHOWN);
4313
+ this._maybeScheduleHide();
4314
+ };
4315
+ this._element.classList.remove(CLASS_NAME_HIDE); // @deprecated
4316
+ reflow(this._element);
4317
+ this._element.classList.add(CLASS_NAME_SHOW, CLASS_NAME_SHOWING);
4318
+ this._queueCallback(complete, this._element, this._config.animation);
4319
+ }
4320
+ hide() {
4321
+ if (!this.isShown()) {
4322
+ return;
4323
+ }
4324
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
4325
+ if (hideEvent.defaultPrevented) {
4326
+ return;
4327
+ }
4328
+ const complete = () => {
4329
+ this._element.classList.add(CLASS_NAME_HIDE); // @deprecated
4330
+ this._element.classList.remove(CLASS_NAME_SHOWING, CLASS_NAME_SHOW);
4331
+ EventHandler.trigger(this._element, EVENT_HIDDEN);
4332
+ };
4333
+ this._element.classList.add(CLASS_NAME_SHOWING);
4334
+ this._queueCallback(complete, this._element, this._config.animation);
4335
+ }
4336
+ dispose() {
4337
+ this._clearTimeout();
4338
+ if (this.isShown()) {
4339
+ this._element.classList.remove(CLASS_NAME_SHOW);
4340
+ }
4341
+ super.dispose();
4342
+ }
4343
+ isShown() {
4344
+ return this._element.classList.contains(CLASS_NAME_SHOW);
4345
+ }
4346
+
4347
+ // Private
4348
+
4349
+ _maybeScheduleHide() {
4350
+ if (!this._config.autohide) {
4351
+ return;
4352
+ }
4353
+ if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
4354
+ return;
4355
+ }
4356
+ this._timeout = setTimeout(() => {
4357
+ this.hide();
4358
+ }, this._config.delay);
4359
+ }
4360
+ _onInteraction(event, isInteracting) {
4361
+ switch (event.type) {
4362
+ case 'mouseover':
4363
+ case 'mouseout':
4364
+ {
4365
+ this._hasMouseInteraction = isInteracting;
4366
+ break;
4367
+ }
4368
+ case 'focusin':
4369
+ case 'focusout':
4370
+ {
4371
+ this._hasKeyboardInteraction = isInteracting;
4372
+ break;
4373
+ }
4374
+ }
4375
+ if (isInteracting) {
4376
+ this._clearTimeout();
4377
+ return;
4378
+ }
4379
+ const nextElement = event.relatedTarget;
4380
+ if (this._element === nextElement || this._element.contains(nextElement)) {
4381
+ return;
4382
+ }
4383
+ this._maybeScheduleHide();
4384
+ }
4385
+ _setListeners() {
4386
+ EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
4387
+ EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
4388
+ EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
4389
+ EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
4390
+ }
4391
+ _clearTimeout() {
4392
+ clearTimeout(this._timeout);
4393
+ this._timeout = null;
4394
+ }
4395
+
4396
+ // Static
4397
+ static jQueryInterface(config) {
4398
+ return this.each(function () {
4399
+ const data = Toast.getOrCreateInstance(this, config);
4400
+ if (typeof config === 'string') {
4401
+ if (typeof data[config] === 'undefined') {
4402
+ throw new TypeError(`No method named "${config}"`);
4403
+ }
4404
+ data[config](this);
4405
+ }
4406
+ });
4407
+ }
4408
+ }
4409
+
4410
+ /**
4411
+ * Data API implementation
4412
+ */
4413
+
4414
+ enableDismissTrigger(Toast);
4415
+
4416
+ /**
4417
+ * jQuery
4418
+ */
4419
+
4420
+ defineJQueryPlugin(Toast);
4421
+
4422
+ export { Alert, Button, Carousel, Collapse, Dropdown, Modal, Offcanvas, Popover, ScrollSpy, Tab, Toast, Tooltip };
4423
+ //# sourceMappingURL=bootstrap.esm.js.map