aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-06-07 12:56:27 +0200
committerMario <mario@mariovavti.com>2021-06-07 12:56:27 +0200
commitf3b4308cb59bf4b21ff186f8479c82239446d139 (patch)
tree0dcbdcffcfe0dd678958cbcc34f41cb1c470c69b /vendor/twbs/bootstrap/js
parent67322c12643ced03bec0be70667f8b1c45de752f (diff)
downloadvolse-hubzilla-f3b4308cb59bf4b21ff186f8479c82239446d139.tar.gz
volse-hubzilla-f3b4308cb59bf4b21ff186f8479c82239446d139.tar.bz2
volse-hubzilla-f3b4308cb59bf4b21ff186f8479c82239446d139.zip
upgrade to bootstrap 5.0.1 and first batch of fixes
Diffstat (limited to 'vendor/twbs/bootstrap/js')
-rw-r--r--vendor/twbs/bootstrap/js/dist/alert.js236
-rw-r--r--vendor/twbs/bootstrap/js/dist/alert.js.map2
-rw-r--r--vendor/twbs/bootstrap/js/dist/button.js252
-rw-r--r--vendor/twbs/bootstrap/js/dist/button.js.map2
-rw-r--r--vendor/twbs/bootstrap/js/dist/carousel.js781
-rw-r--r--vendor/twbs/bootstrap/js/dist/carousel.js.map2
-rw-r--r--vendor/twbs/bootstrap/js/dist/collapse.js550
-rw-r--r--vendor/twbs/bootstrap/js/dist/collapse.js.map2
-rw-r--r--vendor/twbs/bootstrap/js/dist/dropdown.js825
-rw-r--r--vendor/twbs/bootstrap/js/dist/dropdown.js.map2
-rw-r--r--vendor/twbs/bootstrap/js/dist/index.js22
-rw-r--r--vendor/twbs/bootstrap/js/dist/modal.js1040
-rw-r--r--vendor/twbs/bootstrap/js/dist/modal.js.map2
-rw-r--r--vendor/twbs/bootstrap/js/dist/popover.js272
-rw-r--r--vendor/twbs/bootstrap/js/dist/popover.js.map2
-rw-r--r--vendor/twbs/bootstrap/js/dist/scrollspy.js447
-rw-r--r--vendor/twbs/bootstrap/js/dist/scrollspy.js.map2
-rw-r--r--vendor/twbs/bootstrap/js/dist/tab.js318
-rw-r--r--vendor/twbs/bootstrap/js/dist/tab.js.map2
-rw-r--r--vendor/twbs/bootstrap/js/dist/toast.js350
-rw-r--r--vendor/twbs/bootstrap/js/dist/toast.js.map2
-rw-r--r--vendor/twbs/bootstrap/js/dist/tooltip.js1085
-rw-r--r--vendor/twbs/bootstrap/js/dist/tooltip.js.map2
-rw-r--r--vendor/twbs/bootstrap/js/dist/util.js193
-rw-r--r--vendor/twbs/bootstrap/js/dist/util.js.map1
-rw-r--r--vendor/twbs/bootstrap/js/index.js34
-rw-r--r--vendor/twbs/bootstrap/js/src/alert.js101
-rw-r--r--vendor/twbs/bootstrap/js/src/button.js158
-rw-r--r--vendor/twbs/bootstrap/js/src/carousel.js424
-rw-r--r--vendor/twbs/bootstrap/js/src/collapse.js302
-rw-r--r--vendor/twbs/bootstrap/js/src/dropdown.js531
-rw-r--r--vendor/twbs/bootstrap/js/src/modal.js505
-rw-r--r--vendor/twbs/bootstrap/js/src/popover.js89
-rw-r--r--vendor/twbs/bootstrap/js/src/scrollspy.js204
-rw-r--r--vendor/twbs/bootstrap/js/src/tab.js168
-rw-r--r--vendor/twbs/bootstrap/js/src/toast.js158
-rw-r--r--vendor/twbs/bootstrap/js/src/tools/sanitizer.js127
-rw-r--r--vendor/twbs/bootstrap/js/src/tooltip.js594
-rw-r--r--vendor/twbs/bootstrap/js/src/util.js198
39 files changed, 4767 insertions, 5220 deletions
diff --git a/vendor/twbs/bootstrap/js/dist/alert.js b/vendor/twbs/bootstrap/js/dist/alert.js
index 2f5d80f12..f130e4b9e 100644
--- a/vendor/twbs/bootstrap/js/dist/alert.js
+++ b/vendor/twbs/bootstrap/js/dist/alert.js
@@ -1,151 +1,176 @@
/*!
- * Bootstrap alert.js v4.6.0 (https://getbootstrap.com/)
+ * Bootstrap alert.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
- typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.jQuery, global.Util));
-}(this, (function ($, Util) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './base-component'], factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Base));
+}(this, (function (SelectorEngine, Data, EventHandler, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
- var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
+ var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
+ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
+ var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
+ const getSelector = element => {
+ let selector = element.getAttribute('data-bs-target');
+
+ if (!selector || selector === '#') {
+ let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
+ // `document.querySelector` will rightfully complain it is invalid.
+ // See https://github.com/twbs/bootstrap/issues/32273
+
+ if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
+ return null;
+ } // Just in case some CMS puts out a full URL with the anchor appended
+
+
+ if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
+ hrefAttr = `#${hrefAttr.split('#')[1]}`;
+ }
+
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
}
- }
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
- }
+ return selector;
+ };
+
+ const getElementFromSelector = element => {
+ const selector = getSelector(element);
+ return selector ? document.querySelector(selector) : null;
+ };
+
+ const getjQuery = () => {
+ const {
+ jQuery
+ } = window;
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ const onDOMContentLoaded = callback => {
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', callback);
+ } else {
+ callback();
+ }
+ };
+
+ const defineJQueryPlugin = plugin => {
+ onDOMContentLoaded(() => {
+ const $ = getjQuery();
+ /* istanbul ignore if */
+
+ if ($) {
+ const name = plugin.NAME;
+ const JQUERY_NO_CONFLICT = $.fn[name];
+ $.fn[name] = plugin.jQueryInterface;
+ $.fn[name].Constructor = plugin;
+
+ $.fn[name].noConflict = () => {
+ $.fn[name] = JQUERY_NO_CONFLICT;
+ return plugin.jQueryInterface;
+ };
+ }
+ });
+ };
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.1): alert.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
- var NAME = 'alert';
- var VERSION = '4.6.0';
- var DATA_KEY = 'bs.alert';
- var EVENT_KEY = "." + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
- var SELECTOR_DISMISS = '[data-dismiss="alert"]';
- var EVENT_CLOSE = "close" + EVENT_KEY;
- var EVENT_CLOSED = "closed" + EVENT_KEY;
- var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
- var CLASS_NAME_ALERT = 'alert';
- var CLASS_NAME_FADE = 'fade';
- var CLASS_NAME_SHOW = 'show';
+ const NAME = 'alert';
+ const DATA_KEY = 'bs.alert';
+ const EVENT_KEY = `.${DATA_KEY}`;
+ const DATA_API_KEY = '.data-api';
+ const SELECTOR_DISMISS = '[data-bs-dismiss="alert"]';
+ const EVENT_CLOSE = `close${EVENT_KEY}`;
+ const EVENT_CLOSED = `closed${EVENT_KEY}`;
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
+ const CLASS_NAME_ALERT = 'alert';
+ const CLASS_NAME_FADE = 'fade';
+ const CLASS_NAME_SHOW = 'show';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
- var Alert = /*#__PURE__*/function () {
- function Alert(element) {
- this._element = element;
- } // Getters
-
-
- var _proto = Alert.prototype;
+ class Alert extends BaseComponent__default['default'] {
+ // Getters
+ static get NAME() {
+ return NAME;
+ } // Public
- // Public
- _proto.close = function close(element) {
- var rootElement = this._element;
- if (element) {
- rootElement = this._getRootElement(element);
- }
+ close(element) {
+ const rootElement = element ? this._getRootElement(element) : this._element;
- var customEvent = this._triggerCloseEvent(rootElement);
+ const customEvent = this._triggerCloseEvent(rootElement);
- if (customEvent.isDefaultPrevented()) {
+ if (customEvent === null || customEvent.defaultPrevented) {
return;
}
this._removeElement(rootElement);
- };
-
- _proto.dispose = function dispose() {
- $__default['default'].removeData(this._element, DATA_KEY);
- this._element = null;
} // Private
- ;
-
- _proto._getRootElement = function _getRootElement(element) {
- var selector = Util__default['default'].getSelectorFromElement(element);
- var parent = false;
- if (selector) {
- parent = document.querySelector(selector);
- }
-
- if (!parent) {
- parent = $__default['default'](element).closest("." + CLASS_NAME_ALERT)[0];
- }
- return parent;
- };
-
- _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
- var closeEvent = $__default['default'].Event(EVENT_CLOSE);
- $__default['default'](element).trigger(closeEvent);
- return closeEvent;
- };
+ _getRootElement(element) {
+ return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`);
+ }
- _proto._removeElement = function _removeElement(element) {
- var _this = this;
+ _triggerCloseEvent(element) {
+ return EventHandler__default['default'].trigger(element, EVENT_CLOSE);
+ }
- $__default['default'](element).removeClass(CLASS_NAME_SHOW);
+ _removeElement(element) {
+ element.classList.remove(CLASS_NAME_SHOW);
+ const isAnimated = element.classList.contains(CLASS_NAME_FADE);
- if (!$__default['default'](element).hasClass(CLASS_NAME_FADE)) {
- this._destroyElement(element);
+ this._queueCallback(() => this._destroyElement(element), element, isAnimated);
+ }
- return;
+ _destroyElement(element) {
+ if (element.parentNode) {
+ element.parentNode.removeChild(element);
}
- var transitionDuration = Util__default['default'].getTransitionDurationFromElement(element);
- $__default['default'](element).one(Util__default['default'].TRANSITION_END, function (event) {
- return _this._destroyElement(element, event);
- }).emulateTransitionEnd(transitionDuration);
- };
-
- _proto._destroyElement = function _destroyElement(element) {
- $__default['default'](element).detach().trigger(EVENT_CLOSED).remove();
+ EventHandler__default['default'].trigger(element, EVENT_CLOSED);
} // Static
- ;
- Alert._jQueryInterface = function _jQueryInterface(config) {
+
+ static jQueryInterface(config) {
return this.each(function () {
- var $element = $__default['default'](this);
- var data = $element.data(DATA_KEY);
+ let data = Data__default['default'].get(this, DATA_KEY);
if (!data) {
data = new Alert(this);
- $element.data(DATA_KEY, data);
}
if (config === 'close') {
data[config](this);
}
});
- };
+ }
- Alert._handleDismiss = function _handleDismiss(alertInstance) {
+ static handleDismiss(alertInstance) {
return function (event) {
if (event) {
event.preventDefault();
@@ -153,17 +178,9 @@
alertInstance.close(this);
};
- };
-
- _createClass(Alert, null, [{
- key: "VERSION",
- get: function get() {
- return VERSION;
- }
- }]);
+ }
- return Alert;
- }();
+ }
/**
* ------------------------------------------------------------------------
* Data Api implementation
@@ -171,20 +188,15 @@
*/
- $__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert._handleDismiss(new Alert()));
+ EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Alert to jQuery only if jQuery is present
*/
- $__default['default'].fn[NAME] = Alert._jQueryInterface;
- $__default['default'].fn[NAME].Constructor = Alert;
-
- $__default['default'].fn[NAME].noConflict = function () {
- $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
- return Alert._jQueryInterface;
- };
+ defineJQueryPlugin(Alert);
return Alert;
diff --git a/vendor/twbs/bootstrap/js/dist/alert.js.map b/vendor/twbs/bootstrap/js/dist/alert.js.map
index 54e7e2ddb..8f8b5ba88 100644
--- a/vendor/twbs/bootstrap/js/dist/alert.js.map
+++ b/vendor/twbs/bootstrap/js/dist/alert.js.map
@@ -1 +1 @@
-{"version":3,"file":"alert.js","sources":["../src/alert.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.0): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'alert'\nconst VERSION = '4.6.0'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst SELECTOR_DISMISS = '[data-dismiss=\"alert\"]'\n\nconst EVENT_CLOSE = `close${EVENT_KEY}`\nconst EVENT_CLOSED = `closed${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_ALERT = 'alert'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Alert {\n constructor(element) {\n this._element = element\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n // Public\n\n close(element) {\n let rootElement = this._element\n if (element) {\n rootElement = this._getRootElement(element)\n }\n\n const customEvent = this._triggerCloseEvent(rootElement)\n\n if (customEvent.isDefaultPrevented()) {\n return\n }\n\n this._removeElement(rootElement)\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n this._element = null\n }\n\n // Private\n\n _getRootElement(element) {\n const selector = Util.getSelectorFromElement(element)\n let parent = false\n\n if (selector) {\n parent = document.querySelector(selector)\n }\n\n if (!parent) {\n parent = $(element).closest(`.${CLASS_NAME_ALERT}`)[0]\n }\n\n return parent\n }\n\n _triggerCloseEvent(element) {\n const closeEvent = $.Event(EVENT_CLOSE)\n\n $(element).trigger(closeEvent)\n return closeEvent\n }\n\n _removeElement(element) {\n $(element).removeClass(CLASS_NAME_SHOW)\n\n if (!$(element).hasClass(CLASS_NAME_FADE)) {\n this._destroyElement(element)\n return\n }\n\n const transitionDuration = Util.getTransitionDurationFromElement(element)\n\n $(element)\n .one(Util.TRANSITION_END, event => this._destroyElement(element, event))\n .emulateTransitionEnd(transitionDuration)\n }\n\n _destroyElement(element) {\n $(element)\n .detach()\n .trigger(EVENT_CLOSED)\n .remove()\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $element = $(this)\n let data = $element.data(DATA_KEY)\n\n if (!data) {\n data = new Alert(this)\n $element.data(DATA_KEY, data)\n }\n\n if (config === 'close') {\n data[config](this)\n }\n })\n }\n\n static _handleDismiss(alertInstance) {\n return function (event) {\n if (event) {\n event.preventDefault()\n }\n\n alertInstance.close(this)\n }\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document).on(\n EVENT_CLICK_DATA_API,\n SELECTOR_DISMISS,\n Alert._handleDismiss(new Alert())\n)\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Alert._jQueryInterface\n$.fn[NAME].Constructor = Alert\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Alert._jQueryInterface\n}\n\nexport default Alert\n"],"names":["NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","$","fn","SELECTOR_DISMISS","EVENT_CLOSE","EVENT_CLOSED","EVENT_CLICK_DATA_API","CLASS_NAME_ALERT","CLASS_NAME_FADE","CLASS_NAME_SHOW","Alert","element","_element","close","rootElement","_getRootElement","customEvent","_triggerCloseEvent","isDefaultPrevented","_removeElement","dispose","removeData","selector","Util","getSelectorFromElement","parent","document","querySelector","closest","closeEvent","Event","trigger","removeClass","hasClass","_destroyElement","transitionDuration","getTransitionDurationFromElement","one","TRANSITION_END","event","emulateTransitionEnd","detach","remove","_jQueryInterface","config","each","$element","data","_handleDismiss","alertInstance","preventDefault","on","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUA;EACA;EACA;EACA;EACA;;EAEA,IAAMA,IAAI,GAAG,OAAb;EACA,IAAMC,OAAO,GAAG,OAAhB;EACA,IAAMC,QAAQ,GAAG,UAAjB;EACA,IAAMC,SAAS,SAAOD,QAAtB;EACA,IAAME,YAAY,GAAG,WAArB;EACA,IAAMC,kBAAkB,GAAGC,qBAAC,CAACC,EAAF,CAAKP,IAAL,CAA3B;EAEA,IAAMQ,gBAAgB,GAAG,wBAAzB;EAEA,IAAMC,WAAW,aAAWN,SAA5B;EACA,IAAMO,YAAY,cAAYP,SAA9B;EACA,IAAMQ,oBAAoB,aAAWR,SAAX,GAAuBC,YAAjD;EAEA,IAAMQ,gBAAgB,GAAG,OAAzB;EACA,IAAMC,eAAe,GAA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AAIA,KAAJ,EAAW;EACTA,QAAAA,KAAK,CAACW,cAAN;EACD;;EAEDD,MAAAA,aAAa,CAACpC,KAAd,CAAoB,IAApB;EACD,KAND;EAOD;;;;0BAlGoB;EACnB,aAAOjB,OAAP;EACD;;;;;EAmGH;EACA;EACA;EACA;EACA;;;AAEAK,uBAAC,CAACyB,QAAD,CAAD,CAAYyB,EAAZ,CACE7C,oBADF,EAEEH,gBAFF,EAGEO,KAAK,CAACsC,cAAN,CAAqB,IAAItC,KAAJ,EAArB,CAHF;EAMA;EACA;EACA;EACA;EACA;;AAEAT,uBAAC,CAACC,EAAF,CAAKP,IAAL,IAAae,KAAK,CAACiC,gBAAnB;AACA1C,uBAAC,CAACC,EAAF,CAAKP,IAAL,EAAWyD,WAAX,GAAyB1C,KAAzB;;AACAT,uBAAC,CAACC,EAAF,CAAKP,IAAL,EAAW0D,UAAX,GAAwB,YAAM;EAC5BpD,EAAAA,qBAAC,CAACC,EAAF,CAAKP,IAAL,IAAaK,kBAAb;EACA,SAAOU,KAAK,CAACiC,gBAAb;EACD,CAHD;;;;;;;;"} \ No newline at end of file
+{"version":3,"file":"alert.js","sources":["../src/util/index.js","../src/alert.js"],"sourcesContent":["import SelectorEngine from '../dom/selector-engine'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = `#${hrefAttr.split('#')[1]}`\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => {\n if (!obj || typeof obj !== 'object') {\n return false\n }\n\n if (typeof obj.jquery !== 'undefined') {\n obj = obj[0]\n }\n\n return typeof obj.nodeType !== 'undefined'\n}\n\nconst getElement = obj => {\n if (isElement(obj)) { // it's a jQuery object or a node element\n return obj.jquery ? obj[0] : obj\n }\n\n if (typeof obj === 'string' && obj.length > 0) {\n return SelectorEngine.findOne(obj)\n }\n\n return null\n}\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = callback => {\n if (typeof callback === 'function') {\n callback()\n }\n}\n\nexport {\n getElement,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n isDisabled,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin,\n execute\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getElementFromSelector\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'alert'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst SELECTOR_DISMISS = '[data-bs-dismiss=\"alert\"]'\n\nconst EVENT_CLOSE = `close${EVENT_KEY}`\nconst EVENT_CLOSED = `closed${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_ALERT = 'alert'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Alert extends BaseComponent {\n // Getters\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n close(element) {\n const rootElement = element ? this._getRootElement(element) : this._element\n const customEvent = this._triggerCloseEvent(rootElement)\n\n if (customEvent === null || customEvent.defaultPrevented) {\n return\n }\n\n this._removeElement(rootElement)\n }\n\n // Private\n\n _getRootElement(element) {\n return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`)\n }\n\n _triggerCloseEvent(element) {\n return EventHandler.trigger(element, EVENT_CLOSE)\n }\n\n _removeElement(element) {\n element.classList.remove(CLASS_NAME_SHOW)\n\n const isAnimated = element.classList.contains(CLASS_NAME_FADE)\n this._queueCallback(() => this._destroyElement(element), element, isAnimated)\n }\n\n _destroyElement(element) {\n if (element.parentNode) {\n element.parentNode.removeChild(element)\n }\n\n EventHandler.trigger(element, EVENT_CLOSED)\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.get(this, DATA_KEY)\n\n if (!data) {\n data = new Alert(this)\n }\n\n if (config === 'close') {\n data[config](this)\n }\n })\n }\n\n static handleDismiss(alertInstance) {\n return function (event) {\n if (event) {\n event.preventDefault()\n }\n\n alertInstance.close(this)\n }\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()))\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Alert to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Alert)\n\nexport default Alert\n"],"names":["getSelector","element","selector","getAttribute","hrefAttr","includes","startsWith","split","trim","getElementFromSelector","document","querySelector","getjQuery","jQuery","window","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","defineJQueryPlugin","plugin","$","name","NAME","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","DATA_KEY","EVENT_KEY","DATA_API_KEY","SELECTOR_DISMISS","EVENT_CLOSE","EVENT_CLOSED","EVENT_CLICK_DATA_API","CLASS_NAME_ALERT","CLASS_NAME_FADE","CLASS_NAME_SHOW","Alert","BaseComponent","close","rootElement","_getRootElement","_element","customEvent","_triggerCloseEvent","defaultPrevented","_removeElement","closest","EventHandler","trigger","classList","remove","isAnimated","contains","_queueCallback","_destroyElement","parentNode","removeChild","config","each","data","Data","get","handleDismiss","alertInstance","event","preventDefault","on"],"mappings":";;;;;;;;;;;;;;;;;EAoCA,MAAMA,WAAW,GAAGC,OAAO,IAAI;EAC7B,MAAIC,QAAQ,GAAGD,OAAO,CAACE,YAAR,CAAqB,gBAArB,CAAf;;EAEA,MAAI,CAACD,QAAD,IAAaA,QAAQ,KAAK,GAA9B,EAAmC;EACjC,QAAIE,QAAQ,GAAGH,OAAO,CAACE,YAAR,CAAqB,MAArB,CAAf,CADiC;EAIjC;EACA;EACA;;EACA,QAAI,CAACC,QAAD,IAAc,CAACA,QAAQ,CAACC,QAAT,CAAkB,GAAlB,CAAD,IAA2B,CAACD,QAAQ,CAACE,UAAT,CAAoB,GAApB,CAA9C,EAAyE;EACvE,aAAO,IAAP;EACD,KATgC;;;EAYjC,QAAIF,QAAQ,CAACC,QAAT,CAAkB,GAAlB,KAA0B,CAACD,QAAQ,CAACE,UAAT,CAAoB,GAApB,CAA/B,EAAyD;EACvDF,MAAAA,QAAQ,GAAI,IAAGA,QAAQ,CAACG,KAAT,CAAe,GAAf,EAAoB,CAApB,CAAuB,EAAtC;EACD;;EAEDL,IAAAA,QAAQ,GAAGE,QAAQ,IAAIA,QAAQ,KAA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;EACA;EACA;EACA;;;AAEAS,kCAAY,CAACmB,EAAb,CAAgB7D,QAAhB,EAA0B2B,oBAA1B,EAAgDH,gBAAhD,EAAkEO,KAAK,CAAC0B,aAAN,CAAoB,IAAI1B,KAAJ,EAApB,CAAlE;EAEA;EACA;EACA;EACA;EACA;EACA;;EAEApB,kBAAkB,CAACoB,KAAD,CAAlB;;;;;;;;"} \ No newline at end of file
diff --git a/vendor/twbs/bootstrap/js/dist/button.js b/vendor/twbs/bootstrap/js/dist/button.js
index b91fd0731..6f496b8fb 100644
--- a/vendor/twbs/bootstrap/js/dist/button.js
+++ b/vendor/twbs/bootstrap/js/dist/button.js
@@ -1,156 +1,112 @@
/*!
- * Bootstrap button.js v4.6.0 (https://getbootstrap.com/)
+ * Bootstrap button.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
- typeof define === 'function' && define.amd ? define(['jquery'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.jQuery));
-}(this, (function ($) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './base-component'], factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Base));
+}(this, (function (SelectorEngine, Data, EventHandler, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
+ var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
+ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
+ var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
+ const getjQuery = () => {
+ const {
+ jQuery
+ } = window;
+
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
+ return jQuery;
}
- }
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
- }
+ return null;
+ };
+
+ const onDOMContentLoaded = callback => {
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', callback);
+ } else {
+ callback();
+ }
+ };
+
+ const defineJQueryPlugin = plugin => {
+ onDOMContentLoaded(() => {
+ const $ = getjQuery();
+ /* istanbul ignore if */
+
+ if ($) {
+ const name = plugin.NAME;
+ const JQUERY_NO_CONFLICT = $.fn[name];
+ $.fn[name] = plugin.jQueryInterface;
+ $.fn[name].Constructor = plugin;
+
+ $.fn[name].noConflict = () => {
+ $.fn[name] = JQUERY_NO_CONFLICT;
+ return plugin.jQueryInterface;
+ };
+ }
+ });
+ };
/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.1): button.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
- var NAME = 'button';
- var VERSION = '4.6.0';
- var DATA_KEY = 'bs.button';
- var EVENT_KEY = "." + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
- var CLASS_NAME_ACTIVE = 'active';
- var CLASS_NAME_BUTTON = 'btn';
- var CLASS_NAME_FOCUS = 'focus';
- var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]';
- var SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]';
- var SELECTOR_DATA_TOGGLE = '[data-toggle="button"]';
- var SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn';
- var SELECTOR_INPUT = 'input:not([type="hidden"])';
- var SELECTOR_ACTIVE = '.active';
- var SELECTOR_BUTTON = '.btn';
- var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
- var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY);
- var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
+ const NAME = 'button';
+ const DATA_KEY = 'bs.button';
+ const EVENT_KEY = `.${DATA_KEY}`;
+ const DATA_API_KEY = '.data-api';
+ const CLASS_NAME_ACTIVE = 'active';
+ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="button"]';
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
- var Button = /*#__PURE__*/function () {
- function Button(element) {
- this._element = element;
- this.shouldAvoidTriggerChange = false;
- } // Getters
-
-
- var _proto = Button.prototype;
-
- // Public
- _proto.toggle = function toggle() {
- var triggerChangeEvent = true;
- var addAriaPressed = true;
- var rootElement = $__default['default'](this._element).closest(SELECTOR_DATA_TOGGLES)[0];
-
- if (rootElement) {
- var input = this._element.querySelector(SELECTOR_INPUT);
-
- if (input) {
- if (input.type === 'radio') {
- if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
- triggerChangeEvent = false;
- } else {
- var activeElement = rootElement.querySelector(SELECTOR_ACTIVE);
-
- if (activeElement) {
- $__default['default'](activeElement).removeClass(CLASS_NAME_ACTIVE);
- }
- }
- }
-
- if (triggerChangeEvent) {
- // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
- if (input.type === 'checkbox' || input.type === 'radio') {
- input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE);
- }
-
- if (!this.shouldAvoidTriggerChange) {
- $__default['default'](input).trigger('change');
- }
- }
-
- input.focus();
- addAriaPressed = false;
- }
- }
-
- if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
- if (addAriaPressed) {
- this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE));
- }
+ class Button extends BaseComponent__default['default'] {
+ // Getters
+ static get NAME() {
+ return NAME;
+ } // Public
- if (triggerChangeEvent) {
- $__default['default'](this._element).toggleClass(CLASS_NAME_ACTIVE);
- }
- }
- };
- _proto.dispose = function dispose() {
- $__default['default'].removeData(this._element, DATA_KEY);
- this._element = null;
+ toggle() {
+ // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method
+ this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE));
} // Static
- ;
- Button._jQueryInterface = function _jQueryInterface(config, avoidTriggerChange) {
+
+ static jQueryInterface(config) {
return this.each(function () {
- var $element = $__default['default'](this);
- var data = $element.data(DATA_KEY);
+ let data = Data__default['default'].get(this, DATA_KEY);
if (!data) {
data = new Button(this);
- $element.data(DATA_KEY, data);
}
- data.shouldAvoidTriggerChange = avoidTriggerChange;
-
if (config === 'toggle') {
data[config]();
}
});
- };
-
- _createClass(Button, null, [{
- key: "VERSION",
- get: function get() {
- return VERSION;
- }
- }]);
+ }
- return Button;
- }();
+ }
/**
* ------------------------------------------------------------------------
* Data Api implementation
@@ -158,75 +114,25 @@
*/
- $__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
- var button = event.target;
- var initialButton = button;
+ EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {
+ event.preventDefault();
+ const button = event.target.closest(SELECTOR_DATA_TOGGLE);
+ let data = Data__default['default'].get(button, DATA_KEY);
- if (!$__default['default'](button).hasClass(CLASS_NAME_BUTTON)) {
- button = $__default['default'](button).closest(SELECTOR_BUTTON)[0];
+ if (!data) {
+ data = new Button(button);
}
- if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
- event.preventDefault(); // work around Firefox bug #1540995
- } else {
- var inputBtn = button.querySelector(SELECTOR_INPUT);
-
- if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
- event.preventDefault(); // work around Firefox bug #1540995
-
- return;
- }
-
- if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {
- Button._jQueryInterface.call($__default['default'](button), 'toggle', initialButton.tagName === 'INPUT');
- }
- }
- }).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
- var button = $__default['default'](event.target).closest(SELECTOR_BUTTON)[0];
- $__default['default'](button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
- });
- $__default['default'](window).on(EVENT_LOAD_DATA_API, function () {
- // ensure correct active class is set to match the controls' actual values/states
- // find all checkboxes/readio buttons inside data-toggle groups
- var buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS));
-
- for (var i = 0, len = buttons.length; i < len; i++) {
- var button = buttons[i];
- var input = button.querySelector(SELECTOR_INPUT);
-
- if (input.checked || input.hasAttribute('checked')) {
- button.classList.add(CLASS_NAME_ACTIVE);
- } else {
- button.classList.remove(CLASS_NAME_ACTIVE);
- }
- } // find all button toggles
-
-
- buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
-
- for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
- var _button = buttons[_i];
-
- if (_button.getAttribute('aria-pressed') === 'true') {
- _button.classList.add(CLASS_NAME_ACTIVE);
- } else {
- _button.classList.remove(CLASS_NAME_ACTIVE);
- }
- }
+ data.toggle();
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Button to jQuery only if jQuery is present
*/
- $__default['default'].fn[NAME] = Button._jQueryInterface;
- $__default['default'].fn[NAME].Constructor = Button;
-
- $__default['default'].fn[NAME].noConflict = function () {
- $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
- return Button._jQueryInterface;
- };
+ defineJQueryPlugin(Button);
return Button;
diff --git a/vendor/twbs/bootstrap/js/dist/button.js.map b/vendor/twbs/bootstrap/js/dist/button.js.map
index 71770938b..c76037c1d 100644
--- a/vendor/twbs/bootstrap/js/dist/button.js.map
+++ b/vendor/twbs/bootstrap/js/dist/button.js.map
@@ -1 +1 @@
-{"version":3,"file":"button.js","sources":["../src/button.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.0): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'button'\nconst VERSION = '4.6.0'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_BUTTON = 'btn'\nconst CLASS_NAME_FOCUS = 'focus'\n\nconst SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^=\"button\"]'\nconst SELECTOR_DATA_TOGGLES = '[data-toggle=\"buttons\"]'\nconst SELECTOR_DATA_TOGGLE = '[data-toggle=\"button\"]'\nconst SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle=\"buttons\"] .btn'\nconst SELECTOR_INPUT = 'input:not([type=\"hidden\"])'\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_BUTTON = '.btn'\n\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_FOCUS_BLUR_DATA_API = `focus${EVENT_KEY}${DATA_API_KEY} ` +\n `blur${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Button {\n constructor(element) {\n this._element = element\n this.shouldAvoidTriggerChange = false\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n // Public\n\n toggle() {\n let triggerChangeEvent = true\n let addAriaPressed = true\n const rootElement = $(this._element).closest(SELECTOR_DATA_TOGGLES)[0]\n\n if (rootElement) {\n const input = this._element.querySelector(SELECTOR_INPUT)\n\n if (input) {\n if (input.type === 'radio') {\n if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {\n triggerChangeEvent = false\n } else {\n const activeElement = rootElement.querySelector(SELECTOR_ACTIVE)\n\n if (activeElement) {\n $(activeElement).removeClass(CLASS_NAME_ACTIVE)\n }\n }\n }\n\n if (triggerChangeEvent) {\n // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input\n if (input.type === 'checkbox' || input.type === 'radio') {\n input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE)\n }\n\n if (!this.shouldAvoidTriggerChange) {\n $(input).trigger('change')\n }\n }\n\n input.focus()\n addAriaPressed = false\n }\n }\n\n if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {\n if (addAriaPressed) {\n this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE))\n }\n\n if (triggerChangeEvent) {\n $(this._element).toggleClass(CLASS_NAME_ACTIVE)\n }\n }\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n this._element = null\n }\n\n // Static\n\n static _jQueryInterface(config, avoidTriggerChange) {\n return this.each(function () {\n const $element = $(this)\n let data = $element.data(DATA_KEY)\n\n if (!data) {\n data = new Button(this)\n $element.data(DATA_KEY, data)\n }\n\n data.shouldAvoidTriggerChange = avoidTriggerChange\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document)\n .on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, event => {\n let button = event.target\n const initialButton = button\n\n if (!$(button).hasClass(CLASS_NAME_BUTTON)) {\n button = $(button).closest(SELECTOR_BUTTON)[0]\n }\n\n if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {\n event.preventDefault() // work around Firefox bug #1540995\n } else {\n const inputBtn = button.querySelector(SELECTOR_INPUT)\n\n if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {\n event.preventDefault() // work around Firefox bug #1540995\n return\n }\n\n if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {\n Button._jQueryInterface.call($(button), 'toggle', initialButton.tagName === 'INPUT')\n }\n }\n })\n .on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, event => {\n const button = $(event.target).closest(SELECTOR_BUTTON)[0]\n $(button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type))\n })\n\n$(window).on(EVENT_LOAD_DATA_API, () => {\n // ensure correct active class is set to match the controls' actual values/states\n\n // find all checkboxes/readio buttons inside data-toggle groups\n let buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS))\n for (let i = 0, len = buttons.length; i < len; i++) {\n const button = buttons[i]\n const input = button.querySelector(SELECTOR_INPUT)\n if (input.checked || input.hasAttribute('checked')) {\n button.classList.add(CLASS_NAME_ACTIVE)\n } else {\n button.classList.remove(CLASS_NAME_ACTIVE)\n }\n }\n\n // find all button toggles\n buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE))\n for (let i = 0, len = buttons.length; i < len; i++) {\n const button = buttons[i]\n if (button.getAttribute('aria-pressed') === 'true') {\n button.classList.add(CLASS_NAME_ACTIVE)\n } else {\n button.classList.remove(CLASS_NAME_ACTIVE)\n }\n }\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Button._jQueryInterface\n$.fn[NAME].Constructor = Button\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Button._jQueryInterface\n}\n\nexport default Button\n"],"names":["NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","$","fn","CLASS_NAME_ACTIVE","CLASS_NAME_BUTTON","CLASS_NAME_FOCUS","SELECTOR_DATA_TOGGLE_CARROT","SELECTOR_DATA_TOGGLES","SELECTOR_DATA_TOGGLE","SELECTOR_DATA_TOGGLES_BUTTONS","SELECTOR_INPUT","SELECTOR_ACTIVE","SELECTOR_BUTTON","EVENT_CLICK_DATA_API","EVENT_FOCUS_BLUR_DATA_API","EVENT_LOAD_DATA_API","Button","element","_element","shouldAvoidTriggerChange","toggle","triggerChangeEvent","addAriaPressed","rootElement","closest","input","querySelector","type","checked","classList","contains","activeElement","removeClass","trigger","focus","hasAttribute","setAttribute","toggleClass","dispose","removeData","_jQueryInterface","config","avoidTriggerChange","each","$element","data","document","on","event","button","target","initialButton","hasClass","preventDefault","inputBtn","tagName","call","test","window","buttons","slice","querySelectorAll","i","len","length","add","remove","getAttribute","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASA;EACA;EACA;EACA;EACA;;EAEA,IAAMA,IAAI,GAAG,QAAb;EACA,IAAMC,OAAO,GAAG,OAAhB;EACA,IAAMC,QAAQ,GAAG,WAAjB;EACA,IAAMC,SAAS,SAAOD,QAAtB;EACA,IAAME,YAAY,GAAG,WAArB;EACA,IAAMC,kBAAkB,GAAGC,qBAAC,CAACC,EAAF,CAAKP,IAAL,CAA3B;EAEA,IAAMQ,iBAAiB,GAAG,QA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;EACA,QAAIe,KAAK,CAACG,OAAN,IAAiBH,KAAK,CAACU,YAAN,CAAmB,SAAnB,CAArB,EAAoD;EAClDc,MAAAA,MAAM,CAACpB,SAAP,CAAiBoC,GAAjB,CAAqB9D,iBAArB;EACD,KAFD,MAEO;EACL8C,MAAAA,MAAM,CAACpB,SAAP,CAAiBqC,MAAjB,CAAwB/D,iBAAxB;EACD;EACF,GAbqC;;;EAgBtCwD,EAAAA,OAAO,GAAG,GAAGC,KAAH,CAASJ,IAAT,CAAcV,QAAQ,CAACe,gBAAT,CAA0BrD,oBAA1B,CAAd,CAAV;;EACA,OAAK,IAAIsD,EAAC,GAAG,CAAR,EAAWC,IAAG,GAAGJ,OAAO,CAACK,MAA9B,EAAsCF,EAAC,GAAGC,IAA1C,EAA+CD,EAAC,EAAhD,EAAoD;EAClD,QAAMb,OAAM,GAAGU,OAAO,CAACG,EAAD,CAAtB;;EACA,QAAIb,OAAM,CAACkB,YAAP,CAAoB,cAApB,MAAwC,MAA5C,EAAoD;EAClDlB,MAAAA,OAAM,CAACpB,SAAP,CAAiBoC,GAAjB,CAAqB9D,iBAArB;EACD,KAFD,MAEO;EACL8C,MAAAA,OAAM,CAACpB,SAAP,CAAiBqC,MAAjB,CAAwB/D,iBAAxB;EACD;EACF;EACF,CAzBD;EA2BA;EACA;EACA;EACA;EACA;;AAEAF,uBAAC,CAACC,EAAF,CAAKP,IAAL,IAAaqB,MAAM,CAACwB,gBAApB;AACAvC,uBAAC,CAACC,EAAF,CAAKP,IAAL,EAAWyE,WAAX,GAAyBpD,MAAzB;;AACAf,uBAAC,CAACC,EAAF,CAAKP,IAAL,EAAW0E,UAAX,GAAwB,YAAM;EAC5BpE,EAAAA,qBAAC,CAACC,EAAF,CAAKP,IAAL,IAAaK,kBAAb;EACA,SAAOgB,MAAM,CAACwB,gBAAd;EACD,CAHD;;;;;;;;"} \ No newline at end of file
+{"version":3,"file":"button.js","sources":["../src/util/index.js","../src/button.js"],"sourcesContent":["import SelectorEngine from '../dom/selector-engine'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = `#${hrefAttr.split('#')[1]}`\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => {\n if (!obj || typeof obj !== 'object') {\n return false\n }\n\n if (typeof obj.jquery !== 'undefined') {\n obj = obj[0]\n }\n\n return typeof obj.nodeType !== 'undefined'\n}\n\nconst getElement = obj => {\n if (isElement(obj)) { // it's a jQuery object or a node element\n return obj.jquery ? obj[0] : obj\n }\n\n if (typeof obj === 'string' && obj.length > 0) {\n return SelectorEngine.findOne(obj)\n }\n\n return null\n}\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = callback => {\n if (typeof callback === 'function') {\n callback()\n }\n}\n\nexport {\n getElement,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n isDisabled,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin,\n execute\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defineJQueryPlugin } from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'button'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"button\"]'\n\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Button extends BaseComponent {\n // Getters\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE))\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.get(this, DATA_KEY)\n\n if (!data) {\n data = new Button(this)\n }\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {\n event.preventDefault()\n\n const button = event.target.closest(SELECTOR_DATA_TOGGLE)\n\n let data = Data.get(button, DATA_KEY)\n if (!data) {\n data = new Button(button)\n }\n\n data.toggle()\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Button to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Button)\n\nexport default Button\n"],"names":["getjQuery","jQuery","window","document","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","defineJQueryPlugin","plugin","$","name","NAME","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","DATA_KEY","EVENT_KEY","DATA_API_KEY","CLASS_NAME_ACTIVE","SELECTOR_DATA_TOGGLE","EVENT_CLICK_DATA_API","Button","BaseComponent","toggle","_element","setAttribute","classList","config","each","data","Data","get","EventHandler","on","event","preventDefault","button","target","closest"],"mappings":";;;;;;;;;;;;;;;;;EA4NA,MAAMA,SAAS,GAAG,MAAM;EACtB,QAAM;EAAEC,IAAAA;EAAF,MAAaC,MAAnB;;EAEA,MAAID,MAAM,IAAI,CAACE,QAAQ,CAACC,IAAT,CAAcC,YAAd,CAA2B,mBAA3B,CAAf,EAAgE;EAC9D,WAAOJ,MAAP;EACD;;EAED,SAAO,IAAP;EACD,CARD;;EAUA,MAAMK,kBAAkB,GAAGC,QAAQ,IAAI;EACrC,MAAIJ,QAAQ,CAACK,UAAT,KAAwB,SAA5B,EAAuC;EACrCL,IAAAA,QAAQ,CAACM,gBAAT,CAA0B,kBAA1B,EAA8CF,QAA9C;EACD,GAFD,MAEO;EACLA,IAAAA,QAAQ;EACT;EACF,CAND;;EAUA,MAAMG,kBAAkB,GAAGC,MAAM,IAAI;EACnCL,EAAAA,kBAAkB,CAAC,MAAM;EACvB,UAAMM,CAAC,GAAGZ,SAAS,EAAnB;EACA;;EACA,QAAIY,CAAJ,EAAO;EACL,YAAMC,IAAI,GAAGF,MAAM,CAACG,IAApB;EACA,YAAMC,kBAAkB,GAAGH,CAAC,CAACI,EAAF,CAAKH,IAAL,CAA3B;EACAD,MAAAA,CAAC,CAACI,EAAF,CAAKH,IAAL,IAAaF,MAAM,CAACM,eAApB;EACAL,MAAAA,CAAC,CAACI,EAAF,CAAKH,IAAL,EAAWK,WAAX,GAAyBP,MAAzB;;EACAC,MAAAA,CAAC,CAACI,EAAF,CAAKH,IAAL,EAAWM,UAA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A1B,EAAgDD,oBAAhD,EAAsEe,KAAK,IAAI;EAC7EA,EAAAA,KAAK,CAACC,cAAN;EAEA,QAAMC,MAAM,GAAGF,KAAK,CAACG,MAAN,CAAaC,OAAb,CAAqBnB,oBAArB,CAAf;EAEA,MAAIU,IAAI,GAAGC,wBAAI,CAACC,GAAL,CAASK,MAAT,EAAiBrB,QAAjB,CAAX;;EACA,MAAI,CAACc,IAAL,EAAW;EACTA,IAAAA,IAAI,GAAG,IAAIR,MAAJ,CAAWe,MAAX,CAAP;EACD;;EAEDP,EAAAA,IAAI,CAACN,MAAL;EACD,CAXD;EAaA;EACA;EACA;EACA;EACA;EACA;;EAEAlB,kBAAkB,CAACgB,MAAD,CAAlB;;;;;;;;"} \ No newline at end of file
diff --git a/vendor/twbs/bootstrap/js/dist/carousel.js b/vendor/twbs/bootstrap/js/dist/carousel.js
index 4520f5409..0c0282c0c 100644
--- a/vendor/twbs/bootstrap/js/dist/carousel.js
+++ b/vendor/twbs/bootstrap/js/dist/carousel.js
@@ -1,73 +1,168 @@
/*!
- * Bootstrap carousel.js v4.6.0 (https://getbootstrap.com/)
+ * Bootstrap carousel.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
- typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.jQuery, global.Util));
-}(this, (function ($, Util) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Carousel = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Manipulator, global.Base));
+}(this, (function (SelectorEngine, Data, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
- var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
+ var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
+ var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
+ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
+ var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
+ var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
+ const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
+
+ const toType = obj => {
+ if (obj === null || obj === undefined) {
+ return `${obj}`;
}
- }
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
- }
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
+ };
- function _extends() {
- _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
+ const getSelector = element => {
+ let selector = element.getAttribute('data-bs-target');
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
+ if (!selector || selector === '#') {
+ let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
+ // `document.querySelector` will rightfully complain it is invalid.
+ // See https://github.com/twbs/bootstrap/issues/32273
+
+ if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
+ return null;
+ } // Just in case some CMS puts out a full URL with the anchor appended
+
+
+ if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
+ hrefAttr = `#${hrefAttr.split('#')[1]}`;
}
- return target;
- };
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
+ }
- return _extends.apply(this, arguments);
- }
+ return selector;
+ };
+ const getElementFromSelector = element => {
+ const selector = getSelector(element);
+ return selector ? document.querySelector(selector) : null;
+ };
+
+ const triggerTransitionEnd = element => {
+ element.dispatchEvent(new Event(TRANSITION_END));
+ };
+
+ const isElement = obj => {
+ if (!obj || typeof obj !== 'object') {
+ return false;
+ }
+
+ if (typeof obj.jquery !== 'undefined') {
+ obj = obj[0];
+ }
+
+ return typeof obj.nodeType !== 'undefined';
+ };
+
+ const typeCheckConfig = (componentName, config, configTypes) => {
+ Object.keys(configTypes).forEach(property => {
+ const expectedTypes = configTypes[property];
+ const value = config[property];
+ const valueType = value && isElement(value) ? 'element' : toType(value);
+
+ if (!new RegExp(expectedTypes).test(valueType)) {
+ throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
+ }
+ });
+ };
+
+ const isVisible = element => {
+ if (!element) {
+ return false;
+ }
+
+ if (element.style && element.parentNode && element.parentNode.style) {
+ const elementStyle = getComputedStyle(element);
+ const parentNodeStyle = getComputedStyle(element.parentNode);
+ return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
+ }
+
+ return false;
+ };
+
+ const reflow = element => element.offsetHeight;
+
+ const getjQuery = () => {
+ const {
+ jQuery
+ } = window;
+
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ const onDOMContentLoaded = callback => {
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', callback);
+ } else {
+ callback();
+ }
+ };
+
+ const isRTL = () => document.documentElement.dir === 'rtl';
+
+ const defineJQueryPlugin = plugin => {
+ onDOMContentLoaded(() => {
+ const $ = getjQuery();
+ /* istanbul ignore if */
+
+ if ($) {
+ const name = plugin.NAME;
+ const JQUERY_NO_CONFLICT = $.fn[name];
+ $.fn[name] = plugin.jQueryInterface;
+ $.fn[name].Constructor = plugin;
+
+ $.fn[name].noConflict = () => {
+ $.fn[name] = JQUERY_NO_CONFLICT;
+ return plugin.jQueryInterface;
+ };
+ }
+ });
+ };
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.1): carousel.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
- var NAME = 'carousel';
- var VERSION = '4.6.0';
- var DATA_KEY = 'bs.carousel';
- var EVENT_KEY = "." + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
- var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
-
- var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
-
- var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
+ const NAME = 'carousel';
+ const DATA_KEY = 'bs.carousel';
+ const EVENT_KEY = `.${DATA_KEY}`;
+ const DATA_API_KEY = '.data-api';
+ const ARROW_LEFT_KEY = 'ArrowLeft';
+ const ARROW_RIGHT_KEY = 'ArrowRight';
+ const TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
- var SWIPE_THRESHOLD = 40;
- var Default = {
+ const SWIPE_THRESHOLD = 40;
+ const Default = {
interval: 5000,
keyboard: true,
slide: false,
@@ -75,7 +170,7 @@
wrap: true,
touch: true
};
- var DefaultType = {
+ const DefaultType = {
interval: '(number|boolean)',
keyboard: 'boolean',
slide: '(boolean|string)',
@@ -83,51 +178,51 @@
wrap: 'boolean',
touch: 'boolean'
};
- var DIRECTION_NEXT = 'next';
- var DIRECTION_PREV = 'prev';
- var DIRECTION_LEFT = 'left';
- var DIRECTION_RIGHT = 'right';
- var EVENT_SLIDE = "slide" + EVENT_KEY;
- var EVENT_SLID = "slid" + EVENT_KEY;
- var EVENT_KEYDOWN = "keydown" + EVENT_KEY;
- var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY;
- var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY;
- var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY;
- var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY;
- var EVENT_TOUCHEND = "touchend" + EVENT_KEY;
- var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY;
- var EVENT_POINTERUP = "pointerup" + EVENT_KEY;
- var EVENT_DRAG_START = "dragstart" + EVENT_KEY;
- var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
- var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
- var CLASS_NAME_CAROUSEL = 'carousel';
- var CLASS_NAME_ACTIVE = 'active';
- var CLASS_NAME_SLIDE = 'slide';
- var CLASS_NAME_RIGHT = 'carousel-item-right';
- var CLASS_NAME_LEFT = 'carousel-item-left';
- var CLASS_NAME_NEXT = 'carousel-item-next';
- var CLASS_NAME_PREV = 'carousel-item-prev';
- var CLASS_NAME_POINTER_EVENT = 'pointer-event';
- var SELECTOR_ACTIVE = '.active';
- var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
- var SELECTOR_ITEM = '.carousel-item';
- var SELECTOR_ITEM_IMG = '.carousel-item img';
- var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
- var SELECTOR_INDICATORS = '.carousel-indicators';
- var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
- var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
- var PointerType = {
- TOUCH: 'touch',
- PEN: 'pen'
- };
+ const ORDER_NEXT = 'next';
+ const ORDER_PREV = 'prev';
+ const DIRECTION_LEFT = 'left';
+ const DIRECTION_RIGHT = 'right';
+ const EVENT_SLIDE = `slide${EVENT_KEY}`;
+ const EVENT_SLID = `slid${EVENT_KEY}`;
+ const EVENT_KEYDOWN = `keydown${EVENT_KEY}`;
+ const EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`;
+ const EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`;
+ const EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`;
+ const EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`;
+ const EVENT_TOUCHEND = `touchend${EVENT_KEY}`;
+ const EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`;
+ const EVENT_POINTERUP = `pointerup${EVENT_KEY}`;
+ const EVENT_DRAG_START = `dragstart${EVENT_KEY}`;
+ const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`;
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
+ const CLASS_NAME_CAROUSEL = 'carousel';
+ const CLASS_NAME_ACTIVE = 'active';
+ const CLASS_NAME_SLIDE = 'slide';
+ const CLASS_NAME_END = 'carousel-item-end';
+ const CLASS_NAME_START = 'carousel-item-start';
+ const CLASS_NAME_NEXT = 'carousel-item-next';
+ const CLASS_NAME_PREV = 'carousel-item-prev';
+ const CLASS_NAME_POINTER_EVENT = 'pointer-event';
+ const SELECTOR_ACTIVE = '.active';
+ const SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
+ const SELECTOR_ITEM = '.carousel-item';
+ const SELECTOR_ITEM_IMG = '.carousel-item img';
+ const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
+ const SELECTOR_INDICATORS = '.carousel-indicators';
+ const SELECTOR_INDICATOR = '[data-bs-target]';
+ const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';
+ const SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]';
+ const POINTER_TYPE_TOUCH = 'touch';
+ const POINTER_TYPE_PEN = 'pen';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
- var Carousel = /*#__PURE__*/function () {
- function Carousel(element, config) {
+ class Carousel extends BaseComponent__default['default'] {
+ constructor(element, config) {
+ super(element);
this._items = null;
this._interval = null;
this._activeElement = null;
@@ -137,54 +232,58 @@
this.touchStartX = 0;
this.touchDeltaX = 0;
this._config = this._getConfig(config);
- this._element = element;
- this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS);
+ this._indicatorsElement = SelectorEngine__default['default'].findOne(SELECTOR_INDICATORS, this._element);
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
- this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
+ this._pointerEvent = Boolean(window.PointerEvent);
this._addEventListeners();
} // Getters
- var _proto = Carousel.prototype;
+ static get Default() {
+ return Default;
+ }
+
+ static get NAME() {
+ return NAME;
+ } // Public
+
- // Public
- _proto.next = function next() {
+ next() {
if (!this._isSliding) {
- this._slide(DIRECTION_NEXT);
+ this._slide(ORDER_NEXT);
}
- };
+ }
- _proto.nextWhenVisible = function nextWhenVisible() {
- var $element = $__default['default'](this._element); // Don't call next when the page isn't visible
+ nextWhenVisible() {
+ // Don't call next when the page isn't visible
// or the carousel or its parent isn't visible
-
- if (!document.hidden && $element.is(':visible') && $element.css('visibility') !== 'hidden') {
+ if (!document.hidden && isVisible(this._element)) {
this.next();
}
- };
+ }
- _proto.prev = function prev() {
+ prev() {
if (!this._isSliding) {
- this._slide(DIRECTION_PREV);
+ this._slide(ORDER_PREV);
}
- };
+ }
- _proto.pause = function pause(event) {
+ pause(event) {
if (!event) {
this._isPaused = true;
}
- if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
- Util__default['default'].triggerTransitionEnd(this._element);
+ if (SelectorEngine__default['default'].findOne(SELECTOR_NEXT_PREV, this._element)) {
+ triggerTransitionEnd(this._element);
this.cycle(true);
}
clearInterval(this._interval);
this._interval = null;
- };
+ }
- _proto.cycle = function cycle(event) {
+ cycle(event) {
if (!event) {
this._isPaused = false;
}
@@ -194,28 +293,24 @@
this._interval = null;
}
- if (this._config.interval && !this._isPaused) {
+ if (this._config && this._config.interval && !this._isPaused) {
this._updateInterval();
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
}
- };
-
- _proto.to = function to(index) {
- var _this = this;
+ }
- this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
+ to(index) {
+ this._activeElement = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
- var activeIndex = this._getItemIndex(this._activeElement);
+ const activeIndex = this._getItemIndex(this._activeElement);
if (index > this._items.length - 1 || index < 0) {
return;
}
if (this._isSliding) {
- $__default['default'](this._element).one(EVENT_SLID, function () {
- return _this.to(index);
- });
+ EventHandler__default['default'].one(this._element, EVENT_SLID, () => this.to(index));
return;
}
@@ -225,105 +320,74 @@
return;
}
- var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
-
- this._slide(direction, this._items[index]);
- };
+ const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;
- _proto.dispose = function dispose() {
- $__default['default'](this._element).off(EVENT_KEY);
- $__default['default'].removeData(this._element, DATA_KEY);
- this._items = null;
- this._config = null;
- this._element = null;
- this._interval = null;
- this._isPaused = null;
- this._isSliding = null;
- this._activeElement = null;
- this._indicatorsElement = null;
+ this._slide(order, this._items[index]);
} // Private
- ;
- _proto._getConfig = function _getConfig(config) {
- config = _extends({}, Default, config);
- Util__default['default'].typeCheckConfig(NAME, config, DefaultType);
+
+ _getConfig(config) {
+ config = { ...Default,
+ ...config
+ };
+ typeCheckConfig(NAME, config, DefaultType);
return config;
- };
+ }
- _proto._handleSwipe = function _handleSwipe() {
- var absDeltax = Math.abs(this.touchDeltaX);
+ _handleSwipe() {
+ const absDeltax = Math.abs(this.touchDeltaX);
if (absDeltax <= SWIPE_THRESHOLD) {
return;
}
- var direction = absDeltax / this.touchDeltaX;
- this.touchDeltaX = 0; // swipe left
-
- if (direction > 0) {
- this.prev();
- } // swipe right
-
+ const direction = absDeltax / this.touchDeltaX;
+ this.touchDeltaX = 0;
- if (direction < 0) {
- this.next();
+ if (!direction) {
+ return;
}
- };
- _proto._addEventListeners = function _addEventListeners() {
- var _this2 = this;
+ this._slide(direction > 0 ? DIRECTION_RIGHT : DIRECTION_LEFT);
+ }
+ _addEventListeners() {
if (this._config.keyboard) {
- $__default['default'](this._element).on(EVENT_KEYDOWN, function (event) {
- return _this2._keydown(event);
- });
+ EventHandler__default['default'].on(this._element, EVENT_KEYDOWN, event => this._keydown(event));
}
if (this._config.pause === 'hover') {
- $__default['default'](this._element).on(EVENT_MOUSEENTER, function (event) {
- return _this2.pause(event);
- }).on(EVENT_MOUSELEAVE, function (event) {
- return _this2.cycle(event);
- });
+ EventHandler__default['default'].on(this._element, EVENT_MOUSEENTER, event => this.pause(event));
+ EventHandler__default['default'].on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event));
}
- if (this._config.touch) {
+ if (this._config.touch && this._touchSupported) {
this._addTouchEventListeners();
}
- };
-
- _proto._addTouchEventListeners = function _addTouchEventListeners() {
- var _this3 = this;
-
- if (!this._touchSupported) {
- return;
- }
+ }
- var start = function start(event) {
- if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
- _this3.touchStartX = event.originalEvent.clientX;
- } else if (!_this3._pointerEvent) {
- _this3.touchStartX = event.originalEvent.touches[0].clientX;
+ _addTouchEventListeners() {
+ const start = event => {
+ if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
+ this.touchStartX = event.clientX;
+ } else if (!this._pointerEvent) {
+ this.touchStartX = event.touches[0].clientX;
}
};
- var move = function move(event) {
+ const move = event => {
// ensure swiping with one touch and not pinching
- if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
- _this3.touchDeltaX = 0;
- } else {
- _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
- }
+ this.touchDeltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this.touchStartX;
};
- var end = function end(event) {
- if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
- _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
+ const end = event => {
+ if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
+ this.touchDeltaX = event.clientX - this.touchStartX;
}
- _this3._handleSwipe();
+ this._handleSwipe();
- if (_this3._config.pause === 'hover') {
+ if (this._config.pause === 'hover') {
// If it's a touch-enabled device, mouseenter/leave are fired as
// part of the mouse compatibility events on first tap - the carousel
// would stop cycling until user tapped out of it;
@@ -331,121 +395,109 @@
// (as if it's the second time we tap on it, mouseenter compat event
// is NOT fired) and after a timeout (to allow for mouse compatibility
// events to fire) we explicitly restart cycling
- _this3.pause();
+ this.pause();
- if (_this3.touchTimeout) {
- clearTimeout(_this3.touchTimeout);
+ if (this.touchTimeout) {
+ clearTimeout(this.touchTimeout);
}
- _this3.touchTimeout = setTimeout(function (event) {
- return _this3.cycle(event);
- }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
+ this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval);
}
};
- $__default['default'](this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
- return e.preventDefault();
+ SelectorEngine__default['default'].find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {
+ EventHandler__default['default'].on(itemImg, EVENT_DRAG_START, e => e.preventDefault());
});
if (this._pointerEvent) {
- $__default['default'](this._element).on(EVENT_POINTERDOWN, function (event) {
- return start(event);
- });
- $__default['default'](this._element).on(EVENT_POINTERUP, function (event) {
- return end(event);
- });
+ EventHandler__default['default'].on(this._element, EVENT_POINTERDOWN, event => start(event));
+ EventHandler__default['default'].on(this._element, EVENT_POINTERUP, event => end(event));
this._element.classList.add(CLASS_NAME_POINTER_EVENT);
} else {
- $__default['default'](this._element).on(EVENT_TOUCHSTART, function (event) {
- return start(event);
- });
- $__default['default'](this._element).on(EVENT_TOUCHMOVE, function (event) {
- return move(event);
- });
- $__default['default'](this._element).on(EVENT_TOUCHEND, function (event) {
- return end(event);
- });
+ EventHandler__default['default'].on(this._element, EVENT_TOUCHSTART, event => start(event));
+ EventHandler__default['default'].on(this._element, EVENT_TOUCHMOVE, event => move(event));
+ EventHandler__default['default'].on(this._element, EVENT_TOUCHEND, event => end(event));
}
- };
+ }
- _proto._keydown = function _keydown(event) {
+ _keydown(event) {
if (/input|textarea/i.test(event.target.tagName)) {
return;
}
- switch (event.which) {
- case ARROW_LEFT_KEYCODE:
- event.preventDefault();
- this.prev();
- break;
+ if (event.key === ARROW_LEFT_KEY) {
+ event.preventDefault();
+
+ this._slide(DIRECTION_RIGHT);
+ } else if (event.key === ARROW_RIGHT_KEY) {
+ event.preventDefault();
- case ARROW_RIGHT_KEYCODE:
- event.preventDefault();
- this.next();
- break;
+ this._slide(DIRECTION_LEFT);
}
- };
+ }
- _proto._getItemIndex = function _getItemIndex(element) {
- this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : [];
+ _getItemIndex(element) {
+ this._items = element && element.parentNode ? SelectorEngine__default['default'].find(SELECTOR_ITEM, element.parentNode) : [];
return this._items.indexOf(element);
- };
+ }
- _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
- var isNextDirection = direction === DIRECTION_NEXT;
- var isPrevDirection = direction === DIRECTION_PREV;
+ _getItemByOrder(order, activeElement) {
+ const isNext = order === ORDER_NEXT;
+ const isPrev = order === ORDER_PREV;
- var activeIndex = this._getItemIndex(activeElement);
+ const activeIndex = this._getItemIndex(activeElement);
- var lastItemIndex = this._items.length - 1;
- var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
+ const lastItemIndex = this._items.length - 1;
+ const isGoingToWrap = isPrev && activeIndex === 0 || isNext && activeIndex === lastItemIndex;
if (isGoingToWrap && !this._config.wrap) {
return activeElement;
}
- var delta = direction === DIRECTION_PREV ? -1 : 1;
- var itemIndex = (activeIndex + delta) % this._items.length;
+ const delta = isPrev ? -1 : 1;
+ const itemIndex = (activeIndex + delta) % this._items.length;
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
- };
+ }
- _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
- var targetIndex = this._getItemIndex(relatedTarget);
+ _triggerSlideEvent(relatedTarget, eventDirectionName) {
+ const targetIndex = this._getItemIndex(relatedTarget);
- var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
+ const fromIndex = this._getItemIndex(SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element));
- var slideEvent = $__default['default'].Event(EVENT_SLIDE, {
- relatedTarget: relatedTarget,
+ return EventHandler__default['default'].trigger(this._element, EVENT_SLIDE, {
+ relatedTarget,
direction: eventDirectionName,
from: fromIndex,
to: targetIndex
});
- $__default['default'](this._element).trigger(slideEvent);
- return slideEvent;
- };
+ }
- _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
+ _setActiveIndicatorElement(element) {
if (this._indicatorsElement) {
- var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE));
- $__default['default'](indicators).removeClass(CLASS_NAME_ACTIVE);
-
- var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
-
- if (nextIndicator) {
- $__default['default'](nextIndicator).addClass(CLASS_NAME_ACTIVE);
+ const activeIndicator = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE, this._indicatorsElement);
+ activeIndicator.classList.remove(CLASS_NAME_ACTIVE);
+ activeIndicator.removeAttribute('aria-current');
+ const indicators = SelectorEngine__default['default'].find(SELECTOR_INDICATOR, this._indicatorsElement);
+
+ for (let i = 0; i < indicators.length; i++) {
+ if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) {
+ indicators[i].classList.add(CLASS_NAME_ACTIVE);
+ indicators[i].setAttribute('aria-current', 'true');
+ break;
+ }
}
}
- };
+ }
- _proto._updateInterval = function _updateInterval() {
- var element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM);
+ _updateInterval() {
+ const element = this._activeElement || SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
if (!element) {
return;
}
- var elementInterval = parseInt(element.getAttribute('data-interval'), 10);
+ const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);
if (elementInterval) {
this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
@@ -453,42 +505,34 @@
} else {
this._config.interval = this._config.defaultInterval || this._config.interval;
}
- };
+ }
- _proto._slide = function _slide(direction, element) {
- var _this4 = this;
+ _slide(directionOrOrder, element) {
+ const order = this._directionToOrder(directionOrOrder);
- var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
+ const activeElement = SelectorEngine__default['default'].findOne(SELECTOR_ACTIVE_ITEM, this._element);
- var activeElementIndex = this._getItemIndex(activeElement);
+ const activeElementIndex = this._getItemIndex(activeElement);
- var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
+ const nextElement = element || this._getItemByOrder(order, activeElement);
- var nextElementIndex = this._getItemIndex(nextElement);
+ const nextElementIndex = this._getItemIndex(nextElement);
- var isCycling = Boolean(this._interval);
- var directionalClassName;
- var orderClassName;
- var eventDirectionName;
+ const isCycling = Boolean(this._interval);
+ const isNext = order === ORDER_NEXT;
+ const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;
+ const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;
- if (direction === DIRECTION_NEXT) {
- directionalClassName = CLASS_NAME_LEFT;
- orderClassName = CLASS_NAME_NEXT;
- eventDirectionName = DIRECTION_LEFT;
- } else {
- directionalClassName = CLASS_NAME_RIGHT;
- orderClassName = CLASS_NAME_PREV;
- eventDirectionName = DIRECTION_RIGHT;
- }
+ const eventDirectionName = this._orderToDirection(order);
- if (nextElement && $__default['default'](nextElement).hasClass(CLASS_NAME_ACTIVE)) {
+ if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) {
this._isSliding = false;
return;
}
- var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
+ const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
- if (slideEvent.isDefaultPrevented()) {
+ if (slideEvent.defaultPrevented) {
return;
}
@@ -506,116 +550,132 @@
this._setActiveIndicatorElement(nextElement);
this._activeElement = nextElement;
- var slidEvent = $__default['default'].Event(EVENT_SLID, {
- relatedTarget: nextElement,
- direction: eventDirectionName,
- from: activeElementIndex,
- to: nextElementIndex
- });
- if ($__default['default'](this._element).hasClass(CLASS_NAME_SLIDE)) {
- $__default['default'](nextElement).addClass(orderClassName);
- Util__default['default'].reflow(nextElement);
- $__default['default'](activeElement).addClass(directionalClassName);
- $__default['default'](nextElement).addClass(directionalClassName);
- var transitionDuration = Util__default['default'].getTransitionDurationFromElement(activeElement);
- $__default['default'](activeElement).one(Util__default['default'].TRANSITION_END, function () {
- $__default['default'](nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE);
- $__default['default'](activeElement).removeClass(CLASS_NAME_ACTIVE + " " + orderClassName + " " + directionalClassName);
- _this4._isSliding = false;
- setTimeout(function () {
- return $__default['default'](_this4._element).trigger(slidEvent);
- }, 0);
- }).emulateTransitionEnd(transitionDuration);
+ const triggerSlidEvent = () => {
+ EventHandler__default['default'].trigger(this._element, EVENT_SLID, {
+ relatedTarget: nextElement,
+ direction: eventDirectionName,
+ from: activeElementIndex,
+ to: nextElementIndex
+ });
+ };
+
+ if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
+ nextElement.classList.add(orderClassName);
+ reflow(nextElement);
+ activeElement.classList.add(directionalClassName);
+ nextElement.classList.add(directionalClassName);
+
+ const completeCallBack = () => {
+ nextElement.classList.remove(directionalClassName, orderClassName);
+ nextElement.classList.add(CLASS_NAME_ACTIVE);
+ activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName);
+ this._isSliding = false;
+ setTimeout(triggerSlidEvent, 0);
+ };
+
+ this._queueCallback(completeCallBack, activeElement, true);
} else {
- $__default['default'](activeElement).removeClass(CLASS_NAME_ACTIVE);
- $__default['default'](nextElement).addClass(CLASS_NAME_ACTIVE);
+ activeElement.classList.remove(CLASS_NAME_ACTIVE);
+ nextElement.classList.add(CLASS_NAME_ACTIVE);
this._isSliding = false;
- $__default['default'](this._element).trigger(slidEvent);
+ triggerSlidEvent();
}
if (isCycling) {
this.cycle();
}
- } // Static
- ;
+ }
- Carousel._jQueryInterface = function _jQueryInterface(config) {
- return this.each(function () {
- var data = $__default['default'](this).data(DATA_KEY);
+ _directionToOrder(direction) {
+ if (![DIRECTION_RIGHT, DIRECTION_LEFT].includes(direction)) {
+ return direction;
+ }
- var _config = _extends({}, Default, $__default['default'](this).data());
+ if (isRTL()) {
+ return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;
+ }
- if (typeof config === 'object') {
- _config = _extends({}, _config, config);
- }
+ return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;
+ }
- var action = typeof config === 'string' ? config : _config.slide;
+ _orderToDirection(order) {
+ if (![ORDER_NEXT, ORDER_PREV].includes(order)) {
+ return order;
+ }
- if (!data) {
- data = new Carousel(this, _config);
- $__default['default'](this).data(DATA_KEY, data);
- }
+ if (isRTL()) {
+ return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;
+ }
- if (typeof config === 'number') {
- data.to(config);
- } else if (typeof action === 'string') {
- if (typeof data[action] === 'undefined') {
- throw new TypeError("No method named \"" + action + "\"");
- }
+ return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;
+ } // Static
- data[action]();
- } else if (_config.interval && _config.ride) {
- data.pause();
- data.cycle();
- }
- });
- };
- Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
- var selector = Util__default['default'].getSelectorFromElement(this);
+ static carouselInterface(element, config) {
+ let data = Data__default['default'].get(element, DATA_KEY);
+ let _config = { ...Default,
+ ...Manipulator__default['default'].getDataAttributes(element)
+ };
- if (!selector) {
- return;
+ if (typeof config === 'object') {
+ _config = { ..._config,
+ ...config
+ };
}
- var target = $__default['default'](selector)[0];
+ const action = typeof config === 'string' ? config : _config.slide;
- if (!target || !$__default['default'](target).hasClass(CLASS_NAME_CAROUSEL)) {
- return;
+ if (!data) {
+ data = new Carousel(element, _config);
+ }
+
+ if (typeof config === 'number') {
+ data.to(config);
+ } else if (typeof action === 'string') {
+ if (typeof data[action] === 'undefined') {
+ throw new TypeError(`No method named "${action}"`);
+ }
+
+ data[action]();
+ } else if (_config.interval && _config.ride) {
+ data.pause();
+ data.cycle();
}
+ }
- var config = _extends({}, $__default['default'](target).data(), $__default['default'](this).data());
+ static jQueryInterface(config) {
+ return this.each(function () {
+ Carousel.carouselInterface(this, config);
+ });
+ }
+
+ static dataApiClickHandler(event) {
+ const target = getElementFromSelector(this);
+
+ if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
+ return;
+ }
- var slideIndex = this.getAttribute('data-slide-to');
+ const config = { ...Manipulator__default['default'].getDataAttributes(target),
+ ...Manipulator__default['default'].getDataAttributes(this)
+ };
+ const slideIndex = this.getAttribute('data-bs-slide-to');
if (slideIndex) {
config.interval = false;
}
- Carousel._jQueryInterface.call($__default['default'](target), config);
+ Carousel.carouselInterface(target, config);
if (slideIndex) {
- $__default['default'](target).data(DATA_KEY).to(slideIndex);
+ Data__default['default'].get(target, DATA_KEY).to(slideIndex);
}
event.preventDefault();
- };
-
- _createClass(Carousel, null, [{
- key: "VERSION",
- get: function get() {
- return VERSION;
- }
- }, {
- key: "Default",
- get: function get() {
- return Default;
- }
- }]);
+ }
- return Carousel;
- }();
+ }
/**
* ------------------------------------------------------------------------
* Data Api implementation
@@ -623,29 +683,22 @@
*/
- $__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
- $__default['default'](window).on(EVENT_LOAD_DATA_API, function () {
- var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
-
- for (var i = 0, len = carousels.length; i < len; i++) {
- var $carousel = $__default['default'](carousels[i]);
+ EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
+ EventHandler__default['default'].on(window, EVENT_LOAD_DATA_API, () => {
+ const carousels = SelectorEngine__default['default'].find(SELECTOR_DATA_RIDE);
- Carousel._jQueryInterface.call($carousel, $carousel.data());
+ for (let i = 0, len = carousels.length; i < len; i++) {
+ Carousel.carouselInterface(carousels[i], Data__default['default'].get(carousels[i], DATA_KEY));
}
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Carousel to jQuery only if jQuery is present
*/
- $__default['default'].fn[NAME] = Carousel._jQueryInterface;
- $__default['default'].fn[NAME].Constructor = Carousel;
-
- $__default['default'].fn[NAME].noConflict = function () {
- $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
- return Carousel._jQueryInterface;
- };
+ defineJQueryPlugin(Carousel);
return Carousel;
diff --git a/vendor/twbs/bootstrap/js/dist/carousel.js.map b/vendor/twbs/bootstrap/js/dist/carousel.js.map
index b4662008c..01756a155 100644
--- a/vendor/twbs/bootstrap/js/dist/carousel.js.map
+++ b/vendor/twbs/bootstrap/js/dist/carousel.js.map
@@ -1 +1 @@
-{"version":3,"file":"carousel.js","sources":["../src/carousel.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.0): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'carousel'\nconst VERSION = '4.6.0'\nconst DATA_KEY = 'bs.carousel'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst ARROW_LEFT_KEYCODE = 37 // KeyboardEvent.which value for left arrow key\nconst ARROW_RIGHT_KEYCODE = 39 // KeyboardEvent.which value for right arrow key\nconst TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch\nconst SWIPE_THRESHOLD = 40\n\nconst Default = {\n interval: 5000,\n keyboard: true,\n slide: false,\n pause: 'hover',\n wrap: true,\n touch: true\n}\n\nconst DefaultType = {\n interval: '(number|boolean)',\n keyboard: 'boolean',\n slide: '(boolean|string)',\n pause: '(string|boolean)',\n wrap: 'boolean',\n touch: 'boolean'\n}\n\nconst DIRECTION_NEXT = 'next'\nconst DIRECTION_PREV = 'prev'\nconst DIRECTION_LEFT = 'left'\nconst DIRECTION_RIGHT = 'right'\n\nconst EVENT_SLIDE = `slide${EVENT_KEY}`\nconst EVENT_SLID = `slid${EVENT_KEY}`\nconst EVENT_KEYDOWN = `keydown${EVENT_KEY}`\nconst EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`\nconst EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`\nconst EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`\nconst EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`\nconst EVENT_TOUCHEND = `touchend${EVENT_KEY}`\nconst EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`\nconst EVENT_POINTERUP = `pointerup${EVENT_KEY}`\nconst EVENT_DRAG_START = `dragstart${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_CAROUSEL = 'carousel'\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_SLIDE = 'slide'\nconst CLASS_NAME_RIGHT = 'carousel-item-right'\nconst CLASS_NAME_LEFT = 'carousel-item-left'\nconst CLASS_NAME_NEXT = 'carousel-item-next'\nconst CLASS_NAME_PREV = 'carousel-item-prev'\nconst CLASS_NAME_POINTER_EVENT = 'pointer-event'\n\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_ACTIVE_ITEM = '.active.carousel-item'\nconst SELECTOR_ITEM = '.carousel-item'\nconst SELECTOR_ITEM_IMG = '.carousel-item img'\nconst SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'\nconst SELECTOR_INDICATORS = '.carousel-indicators'\nconst SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]'\nconst SELECTOR_DATA_RIDE = '[data-ride=\"carousel\"]'\n\nconst PointerType = {\n TOUCH: 'touch',\n PEN: 'pen'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\nclass Carousel {\n constructor(element, config) {\n this._items = null\n this._interval = null\n this._activeElement = null\n this._isPaused = false\n this._isSliding = false\n this.touchTimeout = null\n this.touchStartX = 0\n this.touchDeltaX = 0\n\n this._config = this._getConfig(config)\n this._element = element\n this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS)\n this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0\n this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent)\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n next() {\n if (!this._isSliding) {\n this._slide(DIRECTION_NEXT)\n }\n }\n\n nextWhenVisible() {\n const $element = $(this._element)\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden &&\n ($element.is(':visible') && $element.css('visibility') !== 'hidden')) {\n this.next()\n }\n }\n\n prev() {\n if (!this._isSliding) {\n this._slide(DIRECTION_PREV)\n }\n }\n\n pause(event) {\n if (!event) {\n this._isPaused = true\n }\n\n if (this._element.querySelector(SELECTOR_NEXT_PREV)) {\n Util.triggerTransitionEnd(this._element)\n this.cycle(true)\n }\n\n clearInterval(this._interval)\n this._interval = null\n }\n\n cycle(event) {\n if (!event) {\n this._isPaused = false\n }\n\n if (this._interval) {\n clearInterval(this._interval)\n this._interval = null\n }\n\n if (this._config.interval && !this._isPaused) {\n this._updateInterval()\n\n this._interval = setInterval(\n (document.visibilityState ? this.nextWhenVisible : this.next).bind(this),\n this._config.interval\n )\n }\n }\n\n to(index) {\n this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM)\n\n const activeIndex = this._getItemIndex(this._activeElement)\n\n if (index > this._items.length - 1 || index < 0) {\n return\n }\n\n if (this._isSliding) {\n $(this._element).one(EVENT_SLID, () => this.to(index))\n return\n }\n\n if (activeIndex === index) {\n this.pause()\n this.cycle()\n return\n }\n\n const direction = index > activeIndex ?\n DIRECTION_NEXT :\n DIRECTION_PREV\n\n this._slide(direction, this._items[index])\n }\n\n dispose() {\n $(this._element).off(EVENT_KEY)\n $.removeData(this._element, DATA_KEY)\n\n this._items = null\n this._config = null\n this._element = null\n this._interval = null\n this._isPaused = null\n this._isSliding = null\n this._activeElement = null\n this._indicatorsElement = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _handleSwipe() {\n const absDeltax = Math.abs(this.touchDeltaX)\n\n if (absDeltax <= SWIPE_THRESHOLD) {\n return\n }\n\n const direction = absDeltax / this.touchDeltaX\n\n this.touchDeltaX = 0\n\n // swipe left\n if (direction > 0) {\n this.prev()\n }\n\n // swipe right\n if (direction < 0) {\n this.next()\n }\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n $(this._element).on(EVENT_KEYDOWN, event => this._keydown(event))\n }\n\n if (this._config.pause === 'hover') {\n $(this._element)\n .on(EVENT_MOUSEENTER, event => this.pause(event))\n .on(EVENT_MOUSELEAVE, event => this.cycle(event))\n }\n\n if (this._config.touch) {\n this._addTouchEventListeners()\n }\n }\n\n _addTouchEventListeners() {\n if (!this._touchSupported) {\n return\n }\n\n const start = event => {\n if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {\n this.touchStartX = event.originalEvent.clientX\n } else if (!this._pointerEvent) {\n this.touchStartX = event.originalEvent.touches[0].clientX\n }\n }\n\n const move = event => {\n // ensure swiping with one touch and not pinching\n if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {\n this.touchDeltaX = 0\n } else {\n this.touchDeltaX = event.originalEvent.touches[0].clientX - this.touchStartX\n }\n }\n\n const end = event => {\n if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {\n this.touchDeltaX = event.originalEvent.clientX - this.touchStartX\n }\n\n this._handleSwipe()\n if (this._config.pause === 'hover') {\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n\n this.pause()\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout)\n }\n\n this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval)\n }\n }\n\n $(this._element.querySelectorAll(SELECTOR_ITEM_IMG))\n .on(EVENT_DRAG_START, e => e.preventDefault())\n\n if (this._pointerEvent) {\n $(this._element).on(EVENT_POINTERDOWN, event => start(event))\n $(this._element).on(EVENT_POINTERUP, event => end(event))\n\n this._element.classList.add(CLASS_NAME_POINTER_EVENT)\n } else {\n $(this._element).on(EVENT_TOUCHSTART, event => start(event))\n $(this._element).on(EVENT_TOUCHMOVE, event => move(event))\n $(this._element).on(EVENT_TOUCHEND, event => end(event))\n }\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return\n }\n\n switch (event.which) {\n case ARROW_LEFT_KEYCODE:\n event.preventDefault()\n this.prev()\n break\n case ARROW_RIGHT_KEYCODE:\n event.preventDefault()\n this.next()\n break\n default:\n }\n }\n\n _getItemIndex(element) {\n this._items = element && element.parentNode ?\n [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) :\n []\n return this._items.indexOf(element)\n }\n\n _getItemByDirection(direction, activeElement) {\n const isNextDirection = direction === DIRECTION_NEXT\n const isPrevDirection = direction === DIRECTION_PREV\n const activeIndex = this._getItemIndex(activeElement)\n const lastItemIndex = this._items.length - 1\n const isGoingToWrap = isPrevDirection && activeIndex === 0 ||\n isNextDirection && activeIndex === lastItemIndex\n\n if (isGoingToWrap && !this._config.wrap) {\n return activeElement\n }\n\n const delta = direction === DIRECTION_PREV ? -1 : 1\n const itemIndex = (activeIndex + delta) % this._items.length\n\n return itemIndex === -1 ?\n this._items[this._items.length - 1] : this._items[itemIndex]\n }\n\n _triggerSlideEvent(relatedTarget, eventDirectionName) {\n const targetIndex = this._getItemIndex(relatedTarget)\n const fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM))\n const slideEvent = $.Event(EVENT_SLIDE, {\n relatedTarget,\n direction: eventDirectionName,\n from: fromIndex,\n to: targetIndex\n })\n\n $(this._element).trigger(slideEvent)\n\n return slideEvent\n }\n\n _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n const indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE))\n $(indicators).removeClass(CLASS_NAME_ACTIVE)\n\n const nextIndicator = this._indicatorsElement.children[\n this._getItemIndex(element)\n ]\n\n if (nextIndicator) {\n $(nextIndicator).addClass(CLASS_NAME_ACTIVE)\n }\n }\n }\n\n _updateInterval() {\n const element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM)\n\n if (!element) {\n return\n }\n\n const elementInterval = parseInt(element.getAttribute('data-interval'), 10)\n\n if (elementInterval) {\n this._config.defaultInterval = this._config.defaultInterval || this._config.interval\n this._config.interval = elementInterval\n } else {\n this._config.interval = this._config.defaultInterval || this._config.interval\n }\n }\n\n _slide(direction, element) {\n const activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM)\n const activeElementIndex = this._getItemIndex(activeElement)\n const nextElement = element || activeElement &&\n this._getItemByDirection(direction, activeElement)\n const nextElementIndex = this._getItemIndex(nextElement)\n const isCycling = Boolean(this._interval)\n\n let directionalClassName\n let orderClassName\n let eventDirectionName\n\n if (direction === DIRECTION_NEXT) {\n directionalClassName = CLASS_NAME_LEFT\n orderClassName = CLASS_NAME_NEXT\n eventDirectionName = DIRECTION_LEFT\n } else {\n directionalClassName = CLASS_NAME_RIGHT\n orderClassName = CLASS_NAME_PREV\n eventDirectionName = DIRECTION_RIGHT\n }\n\n if (nextElement && $(nextElement).hasClass(CLASS_NAME_ACTIVE)) {\n this._isSliding = false\n return\n }\n\n const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName)\n if (slideEvent.isDefaultPrevented()) {\n return\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n return\n }\n\n this._isSliding = true\n\n if (isCycling) {\n this.pause()\n }\n\n this._setActiveIndicatorElement(nextElement)\n this._activeElement = nextElement\n\n const slidEvent = $.Event(EVENT_SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n })\n\n if ($(this._element).hasClass(CLASS_NAME_SLIDE)) {\n $(nextElement).addClass(orderClassName)\n\n Util.reflow(nextElement)\n\n $(activeElement).addClass(directionalClassName)\n $(nextElement).addClass(directionalClassName)\n\n const transitionDuration = Util.getTransitionDurationFromElement(activeElement)\n\n $(activeElement)\n .one(Util.TRANSITION_END, () => {\n $(nextElement)\n .removeClass(`${directionalClassName} ${orderClassName}`)\n .addClass(CLASS_NAME_ACTIVE)\n\n $(activeElement).removeClass(`${CLASS_NAME_ACTIVE} ${orderClassName} ${directionalClassName}`)\n\n this._isSliding = false\n\n setTimeout(() => $(this._element).trigger(slidEvent), 0)\n })\n .emulateTransitionEnd(transitionDuration)\n } else {\n $(activeElement).removeClass(CLASS_NAME_ACTIVE)\n $(nextElement).addClass(CLASS_NAME_ACTIVE)\n\n this._isSliding = false\n $(this._element).trigger(slidEvent)\n }\n\n if (isCycling) {\n this.cycle()\n }\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = {\n ...Default,\n ...$(this).data()\n }\n\n if (typeof config === 'object') {\n _config = {\n ..._config,\n ...config\n }\n }\n\n const action = typeof config === 'string' ? config : _config.slide\n\n if (!data) {\n data = new Carousel(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'number') {\n data.to(config)\n } else if (typeof action === 'string') {\n if (typeof data[action] === 'undefined') {\n throw new TypeError(`No method named \"${action}\"`)\n }\n\n data[action]()\n } else if (_config.interval && _config.ride) {\n data.pause()\n data.cycle()\n }\n })\n }\n\n static _dataApiClickHandler(event) {\n const selector = Util.getSelectorFromElement(this)\n\n if (!selector) {\n return\n }\n\n const target = $(selector)[0]\n\n if (!target || !$(target).hasClass(CLASS_NAME_CAROUSEL)) {\n return\n }\n\n const config = {\n ...$(target).data(),\n ...$(this).data()\n }\n const slideIndex = this.getAttribute('data-slide-to')\n\n if (slideIndex) {\n config.interval = false\n }\n\n Carousel._jQueryInterface.call($(target), config)\n\n if (slideIndex) {\n $(target).data(DATA_KEY).to(slideIndex)\n }\n\n event.preventDefault()\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler)\n\n$(window).on(EVENT_LOAD_DATA_API, () => {\n const carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE))\n for (let i = 0, len = carousels.length; i < len; i++) {\n const $carousel = $(carousels[i])\n Carousel._jQueryInterface.call($carousel, $carousel.data())\n }\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Carousel._jQueryInterface\n$.fn[NAME].Constructor = Carousel\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Carousel._jQueryInterface\n}\n\nexport default Carousel\n"],"names":["NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","$","fn","ARROW_LEFT_KEYCODE","ARROW_RIGHT_KEYCODE","TOUCHEVENT_COMPAT_WAIT","SWIPE_THRESHOLD","Default","interval","keyboard","slide","pause","wrap","touch","DefaultType","DIRECTION_NEXT","DIRECTION_PREV","DIRECTION_LEFT","DIRECTION_RIGHT","EVENT_SLIDE","EVENT_SLID","EVENT_KEYDOWN","EVENT_MOUSEENTER","EVENT_MOUSELEAVE","EVENT_TOUCHSTART","EVENT_TOUCHMOVE","EVENT_TOUCHEND","EVENT_POINTERDOWN","EVENT_POINTERUP","EVENT_DRAG_START","EVENT_LOAD_DATA_API","EVENT_CLICK_DATA_API","CLASS_NAME_CAROUSEL","CLASS_NAME_ACTIVE","CLASS_NAME_SLIDE","CLASS_NAME_RIGHT","CLASS_NAME_LEFT","CLASS_NAME_NEXT","CLASS_NAME_PREV","CLASS_NAME_POINTER_EVENT","SELECTOR_ACTIVE","SELECTOR_ACTIVE_ITEM","SELECTOR_ITEM","SELECTOR_ITEM_IMG","SELECTOR_NEXT_PREV","SELECTOR_INDICATORS","SELECTOR_DATA_SLIDE","SELECTOR_DATA_RIDE","PointerType","TOUCH","PEN","Carousel","element","config","_items","_interval","_activeElement","_isPaused","_isSliding","touchTimeout","touchStartX","touchDeltaX","_config","_getConfig","_element","_indicatorsElement","querySelector","_touchSupported","document","documentElement","navigator","maxTouchPoints","_pointerEvent","Boolean","window","PointerEvent","MSPointerEvent","_addEventListeners","next","_slide","nextWhenVisible","$element","hidden","is","css","prev","event","Util","triggerTransitionEnd","cycle","clearInterval","_updateInterval","setInterval","visibilityState","bind","to","index","activeIndex","_getItemIndex","length","one","direction","dispose","off","removeData","typeCheckConfig","_handleSwipe","absDeltax","Math","abs","on","_keydown","_addTouchEventListeners","start","originalEvent","pointerType","toUpperCase","clientX","touches","move","end","clearTimeout","setTimeout","querySelectorAll","e","preventDefault","classList","add","test","target","tagName","which","parentNode","slice","call","indexOf","_getItemByDirection","activeElement","isNextDirection","isPrevDirection","lastItemIndex","isGoingToWrap","delta","itemIndex","_triggerSlideEvent","relatedTarget","eventDirectionName","targetIndex","fromIndex","slideEvent","Event","from","trigger","_setActiveIndicatorElement","indicators","removeClass","nextIndicator","children","addClass","elementInterval","parseInt","getAttribute","defaultInterval","activeElementIndex","nextElement","nextElementIndex","isCycling","directionalClassName","orderClassName","hasClass","isDefaultPrevented","slidEvent","reflow","transitionDuration","getTransitionDurationFromElement","TRANSITION_END","emulateTransitionEnd","_jQueryInterface","each","data","action","TypeError","ride","_dataApiClickHandler","selector","getSelectorFromElement","slideIndex","carousels","i","len","$carousel","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUA;EACA;EACA;EACA;EACA;;EAEA,IAAMA,IAAI,GAAG,UAAb;EACA,IAAMC,OAAO,GAAG,OAAhB;EACA,IAAMC,QAAQ,GAAG,aAAjB;EACA,IAAMC,SAAS,SAAOD,QAAtB;EACA,IAAME,YAAY,GAAG,WAArB;EACA,IAAMC,kBAAkB,GAAGC,qBAAC,CAACC,EAAF,CAAKP,IAAL,CAA3B;EACA,IAAMQ,kBAAkB,GAAG,EAA3B;;EAC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,cAAN;EACD;;;;0BAldoB;EACnB,aAAOjI,OAAP;EACD;;;0BAEoB;EACnB,aAAOW,OAAP;EACD;;;;;EA+cH;EACA;EACA;EACA;EACA;;;AAEAN,uBAAC,CAACmE,QAAD,CAAD,CAAY0C,EAAZ,CAAe/E,oBAAf,EAAqCe,mBAArC,EAA0DK,QAAQ,CAACoI,oBAAnE;AAEAtL,uBAAC,CAACyE,MAAD,CAAD,CAAUoC,EAAV,CAAahF,mBAAb,EAAkC,YAAM;EACtC,MAAM6J,SAAS,GAAG,GAAGtD,KAAH,CAASC,IAAT,CAAclE,QAAQ,CAACuD,gBAAT,CAA0B5E,kBAA1B,CAAd,CAAlB;;EACA,OAAK,IAAI6I,CAAC,GAAG,CAAR,EAAWC,GAAG,GAAGF,SAAS,CAACxF,MAAhC,EAAwCyF,CAAC,GAAGC,GAA5C,EAAiDD,CAAC,EAAlD,EAAsD;EACpD,QAAME,SAAS,GAAG7L,qBAAC,CAAC0L,SAAS,CAACC,CAAD,CAAV,CAAnB;;EACAzI,IAAAA,QAAQ,CAAC8H,gBAAT,CAA0B3C,IAA1B,CAA+BwD,SAA/B,EAA0CA,SAAS,CAACX,IAAV,EAA1C;EACD;EACF,CAND;EAQA;EACA;EACA;EACA;EACA;;AAEAlL,uBAAC,CAACC,EAAF,CAAKP,IAAL,IAAawD,QAAQ,CAAC8H,gBAAtB;AACAhL,uBAAC,CAACC,EAAF,CAAKP,IAAL,EAAWoM,WAAX,GAAyB5I,QAAzB;;AACAlD,uBAAC,CAACC,EAAF,CAAKP,IAAL,EAAWqM,UAAX,GAAwB,YAAM;EAC5B/L,EAAAA,qBAAC,CAACC,EAAF,CAAKP,IAAL,IAAaK,kBAAb;EACA,SAAOmD,QAAQ,CAAC8H,gBAAhB;EACD,CAHD;;;;;;;;"} \ No newline at end of file
+{"version":3,"file":"carousel.js","sources":["../src/util/index.js","../src/carousel.js"],"sourcesContent":["import SelectorEngine from '../dom/selector-engine'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = `#${hrefAttr.split('#')[1]}`\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => {\n if (!obj || typeof obj !== 'object') {\n return false\n }\n\n if (typeof obj.jquery !== 'undefined') {\n obj = obj[0]\n }\n\n return typeof obj.nodeType !== 'undefined'\n}\n\nconst getElement = obj => {\n if (isElement(obj)) { // it's a jQuery object or a node element\n return obj.jquery ? obj[0] : obj\n }\n\n if (typeof obj === 'string' && obj.length > 0) {\n return SelectorEngine.findOne(obj)\n }\n\n return null\n}\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = callback => {\n if (typeof callback === 'function') {\n callback()\n }\n}\n\nexport {\n getElement,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n isDisabled,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin,\n execute\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getElementFromSelector,\n isRTL,\n isVisible,\n reflow,\n triggerTransitionEnd,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'carousel'\nconst DATA_KEY = 'bs.carousel'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ARROW_LEFT_KEY = 'ArrowLeft'\nconst ARROW_RIGHT_KEY = 'ArrowRight'\nconst TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch\nconst SWIPE_THRESHOLD = 40\n\nconst Default = {\n interval: 5000,\n keyboard: true,\n slide: false,\n pause: 'hover',\n wrap: true,\n touch: true\n}\n\nconst DefaultType = {\n interval: '(number|boolean)',\n keyboard: 'boolean',\n slide: '(boolean|string)',\n pause: '(string|boolean)',\n wrap: 'boolean',\n touch: 'boolean'\n}\n\nconst ORDER_NEXT = 'next'\nconst ORDER_PREV = 'prev'\nconst DIRECTION_LEFT = 'left'\nconst DIRECTION_RIGHT = 'right'\n\nconst EVENT_SLIDE = `slide${EVENT_KEY}`\nconst EVENT_SLID = `slid${EVENT_KEY}`\nconst EVENT_KEYDOWN = `keydown${EVENT_KEY}`\nconst EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`\nconst EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`\nconst EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`\nconst EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`\nconst EVENT_TOUCHEND = `touchend${EVENT_KEY}`\nconst EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`\nconst EVENT_POINTERUP = `pointerup${EVENT_KEY}`\nconst EVENT_DRAG_START = `dragstart${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_CAROUSEL = 'carousel'\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_SLIDE = 'slide'\nconst CLASS_NAME_END = 'carousel-item-end'\nconst CLASS_NAME_START = 'carousel-item-start'\nconst CLASS_NAME_NEXT = 'carousel-item-next'\nconst CLASS_NAME_PREV = 'carousel-item-prev'\nconst CLASS_NAME_POINTER_EVENT = 'pointer-event'\n\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_ACTIVE_ITEM = '.active.carousel-item'\nconst SELECTOR_ITEM = '.carousel-item'\nconst SELECTOR_ITEM_IMG = '.carousel-item img'\nconst SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'\nconst SELECTOR_INDICATORS = '.carousel-indicators'\nconst SELECTOR_INDICATOR = '[data-bs-target]'\nconst SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'\nconst SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]'\n\nconst POINTER_TYPE_TOUCH = 'touch'\nconst POINTER_TYPE_PEN = 'pen'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\nclass Carousel extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._items = null\n this._interval = null\n this._activeElement = null\n this._isPaused = false\n this._isSliding = false\n this.touchTimeout = null\n this.touchStartX = 0\n this.touchDeltaX = 0\n\n this._config = this._getConfig(config)\n this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element)\n this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0\n this._pointerEvent = Boolean(window.PointerEvent)\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n next() {\n if (!this._isSliding) {\n this._slide(ORDER_NEXT)\n }\n }\n\n nextWhenVisible() {\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && isVisible(this._element)) {\n this.next()\n }\n }\n\n prev() {\n if (!this._isSliding) {\n this._slide(ORDER_PREV)\n }\n }\n\n pause(event) {\n if (!event) {\n this._isPaused = true\n }\n\n if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {\n triggerTransitionEnd(this._element)\n this.cycle(true)\n }\n\n clearInterval(this._interval)\n this._interval = null\n }\n\n cycle(event) {\n if (!event) {\n this._isPaused = false\n }\n\n if (this._interval) {\n clearInterval(this._interval)\n this._interval = null\n }\n\n if (this._config && this._config.interval && !this._isPaused) {\n this._updateInterval()\n\n this._interval = setInterval(\n (document.visibilityState ? this.nextWhenVisible : this.next).bind(this),\n this._config.interval\n )\n }\n }\n\n to(index) {\n this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n const activeIndex = this._getItemIndex(this._activeElement)\n\n if (index > this._items.length - 1 || index < 0) {\n return\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.to(index))\n return\n }\n\n if (activeIndex === index) {\n this.pause()\n this.cycle()\n return\n }\n\n const order = index > activeIndex ?\n ORDER_NEXT :\n ORDER_PREV\n\n this._slide(order, this._items[index])\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _handleSwipe() {\n const absDeltax = Math.abs(this.touchDeltaX)\n\n if (absDeltax <= SWIPE_THRESHOLD) {\n return\n }\n\n const direction = absDeltax / this.touchDeltaX\n\n this.touchDeltaX = 0\n\n if (!direction) {\n return\n }\n\n this._slide(direction > 0 ? DIRECTION_RIGHT : DIRECTION_LEFT)\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event))\n }\n\n if (this._config.pause === 'hover') {\n EventHandler.on(this._element, EVENT_MOUSEENTER, event => this.pause(event))\n EventHandler.on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event))\n }\n\n if (this._config.touch && this._touchSupported) {\n this._addTouchEventListeners()\n }\n }\n\n _addTouchEventListeners() {\n const start = event => {\n if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {\n this.touchStartX = event.clientX\n } else if (!this._pointerEvent) {\n this.touchStartX = event.touches[0].clientX\n }\n }\n\n const move = event => {\n // ensure swiping with one touch and not pinching\n this.touchDeltaX = event.touches && event.touches.length > 1 ?\n 0 :\n event.touches[0].clientX - this.touchStartX\n }\n\n const end = event => {\n if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {\n this.touchDeltaX = event.clientX - this.touchStartX\n }\n\n this._handleSwipe()\n if (this._config.pause === 'hover') {\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n\n this.pause()\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout)\n }\n\n this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval)\n }\n }\n\n SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {\n EventHandler.on(itemImg, EVENT_DRAG_START, e => e.preventDefault())\n })\n\n if (this._pointerEvent) {\n EventHandler.on(this._element, EVENT_POINTERDOWN, event => start(event))\n EventHandler.on(this._element, EVENT_POINTERUP, event => end(event))\n\n this._element.classList.add(CLASS_NAME_POINTER_EVENT)\n } else {\n EventHandler.on(this._element, EVENT_TOUCHSTART, event => start(event))\n EventHandler.on(this._element, EVENT_TOUCHMOVE, event => move(event))\n EventHandler.on(this._element, EVENT_TOUCHEND, event => end(event))\n }\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return\n }\n\n if (event.key === ARROW_LEFT_KEY) {\n event.preventDefault()\n this._slide(DIRECTION_RIGHT)\n } else if (event.key === ARROW_RIGHT_KEY) {\n event.preventDefault()\n this._slide(DIRECTION_LEFT)\n }\n }\n\n _getItemIndex(element) {\n this._items = element && element.parentNode ?\n SelectorEngine.find(SELECTOR_ITEM, element.parentNode) :\n []\n\n return this._items.indexOf(element)\n }\n\n _getItemByOrder(order, activeElement) {\n const isNext = order === ORDER_NEXT\n const isPrev = order === ORDER_PREV\n const activeIndex = this._getItemIndex(activeElement)\n const lastItemIndex = this._items.length - 1\n const isGoingToWrap = (isPrev && activeIndex === 0) || (isNext && activeIndex === lastItemIndex)\n\n if (isGoingToWrap && !this._config.wrap) {\n return activeElement\n }\n\n const delta = isPrev ? -1 : 1\n const itemIndex = (activeIndex + delta) % this._items.length\n\n return itemIndex === -1 ?\n this._items[this._items.length - 1] :\n this._items[itemIndex]\n }\n\n _triggerSlideEvent(relatedTarget, eventDirectionName) {\n const targetIndex = this._getItemIndex(relatedTarget)\n const fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element))\n\n return EventHandler.trigger(this._element, EVENT_SLIDE, {\n relatedTarget,\n direction: eventDirectionName,\n from: fromIndex,\n to: targetIndex\n })\n }\n\n _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement)\n\n activeIndicator.classList.remove(CLASS_NAME_ACTIVE)\n activeIndicator.removeAttribute('aria-current')\n\n const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement)\n\n for (let i = 0; i < indicators.length; i++) {\n if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) {\n indicators[i].classList.add(CLASS_NAME_ACTIVE)\n indicators[i].setAttribute('aria-current', 'true')\n break\n }\n }\n }\n }\n\n _updateInterval() {\n const element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n\n if (!element) {\n return\n }\n\n const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10)\n\n if (elementInterval) {\n this._config.defaultInterval = this._config.defaultInterval || this._config.interval\n this._config.interval = elementInterval\n } else {\n this._config.interval = this._config.defaultInterval || this._config.interval\n }\n }\n\n _slide(directionOrOrder, element) {\n const order = this._directionToOrder(directionOrOrder)\n const activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n const activeElementIndex = this._getItemIndex(activeElement)\n const nextElement = element || this._getItemByOrder(order, activeElement)\n\n const nextElementIndex = this._getItemIndex(nextElement)\n const isCycling = Boolean(this._interval)\n\n const isNext = order === ORDER_NEXT\n const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END\n const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV\n const eventDirectionName = this._orderToDirection(order)\n\n if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) {\n this._isSliding = false\n return\n }\n\n const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName)\n if (slideEvent.defaultPrevented) {\n return\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n return\n }\n\n this._isSliding = true\n\n if (isCycling) {\n this.pause()\n }\n\n this._setActiveIndicatorElement(nextElement)\n this._activeElement = nextElement\n\n const triggerSlidEvent = () => {\n EventHandler.trigger(this._element, EVENT_SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n })\n }\n\n if (this._element.classList.contains(CLASS_NAME_SLIDE)) {\n nextElement.classList.add(orderClassName)\n\n reflow(nextElement)\n\n activeElement.classList.add(directionalClassName)\n nextElement.classList.add(directionalClassName)\n\n const completeCallBack = () => {\n nextElement.classList.remove(directionalClassName, orderClassName)\n nextElement.classList.add(CLASS_NAME_ACTIVE)\n\n activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName)\n\n this._isSliding = false\n\n setTimeout(triggerSlidEvent, 0)\n }\n\n this._queueCallback(completeCallBack, activeElement, true)\n } else {\n activeElement.classList.remove(CLASS_NAME_ACTIVE)\n nextElement.classList.add(CLASS_NAME_ACTIVE)\n\n this._isSliding = false\n triggerSlidEvent()\n }\n\n if (isCycling) {\n this.cycle()\n }\n }\n\n _directionToOrder(direction) {\n if (![DIRECTION_RIGHT, DIRECTION_LEFT].includes(direction)) {\n return direction\n }\n\n if (isRTL()) {\n return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT\n }\n\n return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV\n }\n\n _orderToDirection(order) {\n if (![ORDER_NEXT, ORDER_PREV].includes(order)) {\n return order\n }\n\n if (isRTL()) {\n return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT\n }\n\n return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT\n }\n\n // Static\n\n static carouselInterface(element, config) {\n let data = Data.get(element, DATA_KEY)\n let _config = {\n ...Default,\n ...Manipulator.getDataAttributes(element)\n }\n\n if (typeof config === 'object') {\n _config = {\n ..._config,\n ...config\n }\n }\n\n const action = typeof config === 'string' ? config : _config.slide\n\n if (!data) {\n data = new Carousel(element, _config)\n }\n\n if (typeof config === 'number') {\n data.to(config)\n } else if (typeof action === 'string') {\n if (typeof data[action] === 'undefined') {\n throw new TypeError(`No method named \"${action}\"`)\n }\n\n data[action]()\n } else if (_config.interval && _config.ride) {\n data.pause()\n data.cycle()\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Carousel.carouselInterface(this, config)\n })\n }\n\n static dataApiClickHandler(event) {\n const target = getElementFromSelector(this)\n\n if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n return\n }\n\n const config = {\n ...Manipulator.getDataAttributes(target),\n ...Manipulator.getDataAttributes(this)\n }\n const slideIndex = this.getAttribute('data-bs-slide-to')\n\n if (slideIndex) {\n config.interval = false\n }\n\n Carousel.carouselInterface(target, config)\n\n if (slideIndex) {\n Data.get(target, DATA_KEY).to(slideIndex)\n }\n\n event.preventDefault()\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler)\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE)\n\n for (let i = 0, len = carousels.length; i < len; i++) {\n Carousel.carouselInterface(carousels[i], Data.get(carousels[i], DATA_KEY))\n }\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Carousel to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Carousel)\n\nexport default Carousel\n"],"names":["TRANSITION_END","toType","obj","undefined","toString","call","match","toLowerCase","getSelector","element","selector","getAttribute","hrefAttr","includes","startsWith","split","trim","getElementFromSelector","document","querySelector","triggerTransitionEnd","dispatchEvent","Event","isElement","jquery","nodeType","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","TypeError","toUpperCase","isVisible","style","parentNode","elementStyle","getComputedStyle","parentNodeStyle","display","visibility","reflow","offsetHeight","getjQuery","jQuery","window","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","isRTL","documentElement","dir","defineJQueryPlugin","plugin","$","name","NAME","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","DATA_KEY","EVENT_KEY","DATA_API_KEY","ARROW_LEFT_KEY","ARROW_RIGHT_KEY","TOUCHEVENT_COMPAT_WAIT","SWIPE_THRESHOLD","Default","interval","keyboard","slide","pause","wrap","touch","DefaultType","ORDER_NEXT","ORDER_PREV","DIRECTION_LEFT","DIRECTION_RIGHT","EVENT_SLIDE","EVENT_SLID","EVENT_KEYDOWN","EVENT_MOUSEENTER","EVENT_MOUSELEAVE","EVENT_TOUCHSTART","EVENT_TOUCHMOVE","EVENT_TOUCHEND","EVENT_POINTERDOWN","EVENT_POINTERUP","EVENT_DRAG_START","EVENT_LOAD_DATA_API","EVENT_CLICK_DATA_API","CLASS_NAME_CAROUSEL","CLASS_NAME_ACTIVE","CLASS_NAME_SLIDE","CLASS_NAME_END","CLASS_NAME_START","CLASS_NAME_NEXT","CLASS_NAME_PREV","CLASS_NAME_POINTER_EVENT","SELECTOR_ACTIVE","SELECTOR_ACTIVE_ITEM","SELECTOR_ITEM","SELECTOR_ITEM_IMG","SELECTOR_NEXT_PREV","SELECTOR_INDICATORS","SELECTOR_INDICATOR","SELECTOR_DATA_SLIDE","SELECTOR_DATA_RIDE","POINTER_TYPE_TOUCH","POINTER_TYPE_PEN","Carousel","BaseComponent","constructor","_items","_interval","_activeElement","_isPaused","_isSliding","touchTimeout","touchStartX","touchDeltaX","_config","_getConfig","_indicatorsElement","SelectorEngine","findOne","_element","_touchSupported","navigator","maxTouchPoints","_pointerEvent","Boolean","PointerEvent","_addEventListeners","next","_slide","nextWhenVisible","hidden","prev","event","cycle","clearInterval","_updateInterval","setInterval","visibilityState","bind","to","index","activeIndex","_getItemIndex","length","EventHandler","one","order","_handleSwipe","absDeltax","Math","abs","direction","on","_keydown","_addTouchEventListeners","start","pointerType","clientX","touches","move","end","clearTimeout","setTimeout","find","itemImg","e","preventDefault","classList","add","target","tagName","key","indexOf","_getItemByOrder","activeElement","isNext","isPrev","lastItemIndex","isGoingToWrap","delta","itemIndex","_triggerSlideEvent","relatedTarget","eventDirectionName","targetIndex","fromIndex","trigger","from","_setActiveIndicatorElement","activeIndicator","remove","removeAttribute","indicators","i","Number","parseInt","setAttribute","elementInterval","defaultInterval","directionOrOrder","_directionToOrder","activeElementIndex","nextElement","nextElementIndex","isCycling","directionalClassName","orderClassName","_orderToDirection","contains","slideEvent","defaultPrevented","triggerSlidEvent","completeCallBack","_queueCallback","carouselInterface","data","Data","get","Manipulator","getDataAttributes","action","ride","each","dataApiClickHandler","slideIndex","carousels","len"],"mappings":";;;;;;;;;;;;;;;;;;;EAWA,MAAMA,cAAc,GAAG,eAAvB;;EAGA,MAAMC,MAAM,GAAGC,GAAG,IAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,WAAQ,GAAED,GAAI,EAAd;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC,WAA9C,EAAP;EACD,CAND;;EAsBA,MAAMC,WAAW,GAAGC,OAAO,IAAI;EAC7B,MAAIC,QAAQ,GAAGD,OAAO,CAACE,YAAR,CAAqB,gBAArB,CAAf;;EAEA,MAAI,CAACD,QAAD,IAAaA,QAAQ,KAAK,GAA9B,EAAmC;EACjC,QAAIE,QAAQ,GAAGH,OAAO,CAACE,YAAR,CAAqB,MAArB,CAAf,CADiC;EAIjC;EACA;EACA;;EACA,QAAI,CAACC,QAAD,IAAc,CAACA,QAAQ,CAACC,QAAT,CAAkB,GAAlB,CAAD,IAA2B,CAACD,QAAQ,CAACE,UAAT,CAAoB,GAApB,CAA9C,EAAyE;EACvE,aAAO,IAAP;EACD,KATgC;;;EAYjC,QAAIF,QAAQ,CAACC,QAAT,CAAkB,GAAlB,KAA0B,CAACD,QAAQ,CAACE,UAAT,CAAoB,GAApB,CAA/B,EAAyD;EACvDF,MAAAA,QAAQ,GAAI,IAAGA,QAAQ,CAACG,KAAT,CAAe,GAAf,EAAoB,CAApB,CAAuB,EAAtC;EACD;;EAEDL,IAAAA,QAAQ,GAAGE,QAAQ,IAAIA,QAAQ,KAAK,GAAzB,GAA+BA,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A,QAAQ,CAAC+G,iBAAT,CAA2BW,SAAS,CAAChC,CAAD,CAApC,EAAyCuB,wBAAI,CAACC,GAAL,CAASQ,SAAS,CAAChC,CAAD,CAAlB,EAAuB7I,QAAvB,CAAzC;EACD;EACF,CAND;EAQA;EACA;EACA;EACA;EACA;EACA;;EAEAV,kBAAkB,CAAC6D,QAAD,CAAlB;;;;;;;;"} \ No newline at end of file
diff --git a/vendor/twbs/bootstrap/js/dist/collapse.js b/vendor/twbs/bootstrap/js/dist/collapse.js
index 427e2711f..e2abc99c4 100644
--- a/vendor/twbs/bootstrap/js/dist/collapse.js
+++ b/vendor/twbs/bootstrap/js/dist/collapse.js
@@ -1,108 +1,204 @@
/*!
- * Bootstrap collapse.js v4.6.0 (https://getbootstrap.com/)
+ * Bootstrap collapse.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
- typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.jQuery, global.Util));
-}(this, (function ($, Util) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Collapse = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Manipulator, global.Base));
+}(this, (function (SelectorEngine, Data, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
- var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
+ var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
+ var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
+ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
+ var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
+ var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
+ const toType = obj => {
+ if (obj === null || obj === undefined) {
+ return `${obj}`;
}
- }
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
- }
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
+ };
- function _extends() {
- _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
+ const getSelector = element => {
+ let selector = element.getAttribute('data-bs-target');
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
+ if (!selector || selector === '#') {
+ let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
+ // `document.querySelector` will rightfully complain it is invalid.
+ // See https://github.com/twbs/bootstrap/issues/32273
+
+ if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
+ return null;
+ } // Just in case some CMS puts out a full URL with the anchor appended
+
+
+ if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
+ hrefAttr = `#${hrefAttr.split('#')[1]}`;
}
- return target;
- };
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
+ }
- return _extends.apply(this, arguments);
- }
+ return selector;
+ };
+
+ const getSelectorFromElement = element => {
+ const selector = getSelector(element);
+
+ if (selector) {
+ return document.querySelector(selector) ? selector : null;
+ }
+
+ return null;
+ };
+
+ const getElementFromSelector = element => {
+ const selector = getSelector(element);
+ return selector ? document.querySelector(selector) : null;
+ };
+
+ const isElement = obj => {
+ if (!obj || typeof obj !== 'object') {
+ return false;
+ }
+
+ if (typeof obj.jquery !== 'undefined') {
+ obj = obj[0];
+ }
+
+ return typeof obj.nodeType !== 'undefined';
+ };
+
+ const getElement = obj => {
+ if (isElement(obj)) {
+ // it's a jQuery object or a node element
+ return obj.jquery ? obj[0] : obj;
+ }
+
+ if (typeof obj === 'string' && obj.length > 0) {
+ return SelectorEngine__default['default'].findOne(obj);
+ }
+ return null;
+ };
+
+ const typeCheckConfig = (componentName, config, configTypes) => {
+ Object.keys(configTypes).forEach(property => {
+ const expectedTypes = configTypes[property];
+ const value = config[property];
+ const valueType = value && isElement(value) ? 'element' : toType(value);
+
+ if (!new RegExp(expectedTypes).test(valueType)) {
+ throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
+ }
+ });
+ };
+
+ const reflow = element => element.offsetHeight;
+
+ const getjQuery = () => {
+ const {
+ jQuery
+ } = window;
+
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ const onDOMContentLoaded = callback => {
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', callback);
+ } else {
+ callback();
+ }
+ };
+
+ const defineJQueryPlugin = plugin => {
+ onDOMContentLoaded(() => {
+ const $ = getjQuery();
+ /* istanbul ignore if */
+
+ if ($) {
+ const name = plugin.NAME;
+ const JQUERY_NO_CONFLICT = $.fn[name];
+ $.fn[name] = plugin.jQueryInterface;
+ $.fn[name].Constructor = plugin;
+
+ $.fn[name].noConflict = () => {
+ $.fn[name] = JQUERY_NO_CONFLICT;
+ return plugin.jQueryInterface;
+ };
+ }
+ });
+ };
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.1): collapse.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
- var NAME = 'collapse';
- var VERSION = '4.6.0';
- var DATA_KEY = 'bs.collapse';
- var EVENT_KEY = "." + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
- var Default = {
+ const NAME = 'collapse';
+ const DATA_KEY = 'bs.collapse';
+ const EVENT_KEY = `.${DATA_KEY}`;
+ const DATA_API_KEY = '.data-api';
+ const Default = {
toggle: true,
parent: ''
};
- var DefaultType = {
+ const DefaultType = {
toggle: 'boolean',
parent: '(string|element)'
};
- var EVENT_SHOW = "show" + EVENT_KEY;
- var EVENT_SHOWN = "shown" + EVENT_KEY;
- var EVENT_HIDE = "hide" + EVENT_KEY;
- var EVENT_HIDDEN = "hidden" + EVENT_KEY;
- var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
- var CLASS_NAME_SHOW = 'show';
- var CLASS_NAME_COLLAPSE = 'collapse';
- var CLASS_NAME_COLLAPSING = 'collapsing';
- var CLASS_NAME_COLLAPSED = 'collapsed';
- var DIMENSION_WIDTH = 'width';
- var DIMENSION_HEIGHT = 'height';
- var SELECTOR_ACTIVES = '.show, .collapsing';
- var SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]';
+ const EVENT_SHOW = `show${EVENT_KEY}`;
+ const EVENT_SHOWN = `shown${EVENT_KEY}`;
+ const EVENT_HIDE = `hide${EVENT_KEY}`;
+ const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
+ const CLASS_NAME_SHOW = 'show';
+ const CLASS_NAME_COLLAPSE = 'collapse';
+ const CLASS_NAME_COLLAPSING = 'collapsing';
+ const CLASS_NAME_COLLAPSED = 'collapsed';
+ const WIDTH = 'width';
+ const HEIGHT = 'height';
+ const SELECTOR_ACTIVES = '.show, .collapsing';
+ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
- var Collapse = /*#__PURE__*/function () {
- function Collapse(element, config) {
+ class Collapse extends BaseComponent__default['default'] {
+ constructor(element, config) {
+ super(element);
this._isTransitioning = false;
- this._element = element;
this._config = this._getConfig(config);
- this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
- var toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
-
- for (var i = 0, len = toggleList.length; i < len; i++) {
- var elem = toggleList[i];
- var selector = Util__default['default'].getSelectorFromElement(elem);
- var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
- return foundElem === element;
- });
+ this._triggerArray = SelectorEngine__default['default'].find(`${SELECTOR_DATA_TOGGLE}[href="#${this._element.id}"],` + `${SELECTOR_DATA_TOGGLE}[data-bs-target="#${this._element.id}"]`);
+ const toggleList = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE);
- if (selector !== null && filterElement.length > 0) {
+ for (let i = 0, len = toggleList.length; i < len; i++) {
+ const elem = toggleList[i];
+ const selector = getSelectorFromElement(elem);
+ const filterElement = SelectorEngine__default['default'].find(selector).filter(foundElem => foundElem === this._element);
+
+ if (selector !== null && filterElement.length) {
this._selector = selector;
this._triggerArray.push(elem);
@@ -121,31 +217,35 @@
} // Getters
- var _proto = Collapse.prototype;
+ static get Default() {
+ return Default;
+ }
- // Public
- _proto.toggle = function toggle() {
- if ($__default['default'](this._element).hasClass(CLASS_NAME_SHOW)) {
+ static get NAME() {
+ return NAME;
+ } // Public
+
+
+ toggle() {
+ if (this._element.classList.contains(CLASS_NAME_SHOW)) {
this.hide();
} else {
this.show();
}
- };
-
- _proto.show = function show() {
- var _this = this;
+ }
- if (this._isTransitioning || $__default['default'](this._element).hasClass(CLASS_NAME_SHOW)) {
+ show() {
+ if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
return;
}
- var actives;
- var activesData;
+ let actives;
+ let activesData;
if (this._parent) {
- actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)).filter(function (elem) {
- if (typeof _this._config.parent === 'string') {
- return elem.getAttribute('data-parent') === _this._config.parent;
+ actives = SelectorEngine__default['default'].find(SELECTOR_ACTIVES, this._parent).filter(elem => {
+ if (typeof this._config.parent === 'string') {
+ return elem.getAttribute('data-bs-parent') === this._config.parent;
}
return elem.classList.contains(CLASS_NAME_COLLAPSE);
@@ -156,209 +256,203 @@
}
}
+ const container = SelectorEngine__default['default'].findOne(this._selector);
+
if (actives) {
- activesData = $__default['default'](actives).not(this._selector).data(DATA_KEY);
+ const tempActiveData = actives.find(elem => container !== elem);
+ activesData = tempActiveData ? Data__default['default'].get(tempActiveData, DATA_KEY) : null;
if (activesData && activesData._isTransitioning) {
return;
}
}
- var startEvent = $__default['default'].Event(EVENT_SHOW);
- $__default['default'](this._element).trigger(startEvent);
+ const startEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW);
- if (startEvent.isDefaultPrevented()) {
+ if (startEvent.defaultPrevented) {
return;
}
if (actives) {
- Collapse._jQueryInterface.call($__default['default'](actives).not(this._selector), 'hide');
+ actives.forEach(elemActive => {
+ if (container !== elemActive) {
+ Collapse.collapseInterface(elemActive, 'hide');
+ }
- if (!activesData) {
- $__default['default'](actives).data(DATA_KEY, null);
- }
+ if (!activesData) {
+ Data__default['default'].set(elemActive, DATA_KEY, null);
+ }
+ });
}
- var dimension = this._getDimension();
+ const dimension = this._getDimension();
+
+ this._element.classList.remove(CLASS_NAME_COLLAPSE);
+
+ this._element.classList.add(CLASS_NAME_COLLAPSING);
- $__default['default'](this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING);
this._element.style[dimension] = 0;
if (this._triggerArray.length) {
- $__default['default'](this._triggerArray).removeClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', true);
+ this._triggerArray.forEach(element => {
+ element.classList.remove(CLASS_NAME_COLLAPSED);
+ element.setAttribute('aria-expanded', true);
+ });
}
this.setTransitioning(true);
- var complete = function complete() {
- $__default['default'](_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW);
- _this._element.style[dimension] = '';
+ const complete = () => {
+ this._element.classList.remove(CLASS_NAME_COLLAPSING);
- _this.setTransitioning(false);
+ this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
- $__default['default'](_this._element).trigger(EVENT_SHOWN);
+ this._element.style[dimension] = '';
+ this.setTransitioning(false);
+ EventHandler__default['default'].trigger(this._element, EVENT_SHOWN);
};
- var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
- var scrollSize = "scroll" + capitalizedDimension;
- var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
- $__default['default'](this._element).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
- this._element.style[dimension] = this._element[scrollSize] + "px";
- };
+ const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
+ const scrollSize = `scroll${capitalizedDimension}`;
- _proto.hide = function hide() {
- var _this2 = this;
+ this._queueCallback(complete, this._element, true);
+
+ this._element.style[dimension] = `${this._element[scrollSize]}px`;
+ }
- if (this._isTransitioning || !$__default['default'](this._element).hasClass(CLASS_NAME_SHOW)) {
+ hide() {
+ if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
return;
}
- var startEvent = $__default['default'].Event(EVENT_HIDE);
- $__default['default'](this._element).trigger(startEvent);
+ const startEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE);
- if (startEvent.isDefaultPrevented()) {
+ if (startEvent.defaultPrevented) {
return;
}
- var dimension = this._getDimension();
+ const dimension = this._getDimension();
- this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
- Util__default['default'].reflow(this._element);
- $__default['default'](this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW);
- var triggerArrayLength = this._triggerArray.length;
+ this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;
+ reflow(this._element);
- if (triggerArrayLength > 0) {
- for (var i = 0; i < triggerArrayLength; i++) {
- var trigger = this._triggerArray[i];
- var selector = Util__default['default'].getSelectorFromElement(trigger);
+ this._element.classList.add(CLASS_NAME_COLLAPSING);
+
+ this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
+
+ const triggerArrayLength = this._triggerArray.length;
- if (selector !== null) {
- var $elem = $__default['default']([].slice.call(document.querySelectorAll(selector)));
+ if (triggerArrayLength > 0) {
+ for (let i = 0; i < triggerArrayLength; i++) {
+ const trigger = this._triggerArray[i];
+ const elem = getElementFromSelector(trigger);
- if (!$elem.hasClass(CLASS_NAME_SHOW)) {
- $__default['default'](trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false);
- }
+ if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {
+ trigger.classList.add(CLASS_NAME_COLLAPSED);
+ trigger.setAttribute('aria-expanded', false);
}
}
}
this.setTransitioning(true);
- var complete = function complete() {
- _this2.setTransitioning(false);
+ const complete = () => {
+ this.setTransitioning(false);
+
+ this._element.classList.remove(CLASS_NAME_COLLAPSING);
- $__default['default'](_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN);
+ this._element.classList.add(CLASS_NAME_COLLAPSE);
+
+ EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN);
};
this._element.style[dimension] = '';
- var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
- $__default['default'](this._element).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
- };
- _proto.setTransitioning = function setTransitioning(isTransitioning) {
+ this._queueCallback(complete, this._element, true);
+ }
+
+ setTransitioning(isTransitioning) {
this._isTransitioning = isTransitioning;
- };
-
- _proto.dispose = function dispose() {
- $__default['default'].removeData(this._element, DATA_KEY);
- this._config = null;
- this._parent = null;
- this._element = null;
- this._triggerArray = null;
- this._isTransitioning = null;
} // Private
- ;
- _proto._getConfig = function _getConfig(config) {
- config = _extends({}, Default, config);
+
+ _getConfig(config) {
+ config = { ...Default,
+ ...config
+ };
config.toggle = Boolean(config.toggle); // Coerce string values
- Util__default['default'].typeCheckConfig(NAME, config, DefaultType);
+ typeCheckConfig(NAME, config, DefaultType);
return config;
- };
+ }
- _proto._getDimension = function _getDimension() {
- var hasWidth = $__default['default'](this._element).hasClass(DIMENSION_WIDTH);
- return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT;
- };
+ _getDimension() {
+ return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT;
+ }
- _proto._getParent = function _getParent() {
- var _this3 = this;
+ _getParent() {
+ let {
+ parent
+ } = this._config;
+ parent = getElement(parent);
+ const selector = `${SELECTOR_DATA_TOGGLE}[data-bs-parent="${parent}"]`;
+ SelectorEngine__default['default'].find(selector, parent).forEach(element => {
+ const selected = getElementFromSelector(element);
- var parent;
+ this._addAriaAndCollapsedClass(selected, [element]);
+ });
+ return parent;
+ }
- if (Util__default['default'].isElement(this._config.parent)) {
- parent = this._config.parent; // It's a jQuery object
+ _addAriaAndCollapsedClass(element, triggerArray) {
+ if (!element || !triggerArray.length) {
+ return;
+ }
- if (typeof this._config.parent.jquery !== 'undefined') {
- parent = this._config.parent[0];
+ const isOpen = element.classList.contains(CLASS_NAME_SHOW);
+ triggerArray.forEach(elem => {
+ if (isOpen) {
+ elem.classList.remove(CLASS_NAME_COLLAPSED);
+ } else {
+ elem.classList.add(CLASS_NAME_COLLAPSED);
}
- } else {
- parent = document.querySelector(this._config.parent);
- }
- var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
- var children = [].slice.call(parent.querySelectorAll(selector));
- $__default['default'](children).each(function (i, element) {
- _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
+ elem.setAttribute('aria-expanded', isOpen);
});
- return parent;
- };
-
- _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
- var isOpen = $__default['default'](element).hasClass(CLASS_NAME_SHOW);
-
- if (triggerArray.length) {
- $__default['default'](triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
- }
} // Static
- ;
- Collapse._getTargetFromElement = function _getTargetFromElement(element) {
- var selector = Util__default['default'].getSelectorFromElement(element);
- return selector ? document.querySelector(selector) : null;
- };
- Collapse._jQueryInterface = function _jQueryInterface(config) {
- return this.each(function () {
- var $element = $__default['default'](this);
- var data = $element.data(DATA_KEY);
+ static collapseInterface(element, config) {
+ let data = Data__default['default'].get(element, DATA_KEY);
+ const _config = { ...Default,
+ ...Manipulator__default['default'].getDataAttributes(element),
+ ...(typeof config === 'object' && config ? config : {})
+ };
- var _config = _extends({}, Default, $element.data(), typeof config === 'object' && config ? config : {});
+ if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
+ _config.toggle = false;
+ }
- if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
- _config.toggle = false;
- }
+ if (!data) {
+ data = new Collapse(element, _config);
+ }
- if (!data) {
- data = new Collapse(this, _config);
- $element.data(DATA_KEY, data);
+ if (typeof config === 'string') {
+ if (typeof data[config] === 'undefined') {
+ throw new TypeError(`No method named "${config}"`);
}
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new TypeError("No method named \"" + config + "\"");
- }
+ data[config]();
+ }
+ }
- data[config]();
- }
+ static jQueryInterface(config) {
+ return this.each(function () {
+ Collapse.collapseInterface(this, config);
});
- };
-
- _createClass(Collapse, null, [{
- key: "VERSION",
- get: function get() {
- return VERSION;
- }
- }, {
- key: "Default",
- get: function get() {
- return Default;
- }
- }]);
+ }
- return Collapse;
- }();
+ }
/**
* ------------------------------------------------------------------------
* Data Api implementation
@@ -366,36 +460,42 @@
*/
- $__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
+ EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
- if (event.currentTarget.tagName === 'A') {
+ if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {
event.preventDefault();
}
- var $trigger = $__default['default'](this);
- var selector = Util__default['default'].getSelectorFromElement(this);
- var selectors = [].slice.call(document.querySelectorAll(selector));
- $__default['default'](selectors).each(function () {
- var $target = $__default['default'](this);
- var data = $target.data(DATA_KEY);
- var config = data ? 'toggle' : $trigger.data();
+ const triggerData = Manipulator__default['default'].getDataAttributes(this);
+ const selector = getSelectorFromElement(this);
+ const selectorElements = SelectorEngine__default['default'].find(selector);
+ selectorElements.forEach(element => {
+ const data = Data__default['default'].get(element, DATA_KEY);
+ let config;
+
+ if (data) {
+ // update parent attribute
+ if (data._parent === null && typeof triggerData.parent === 'string') {
+ data._config.parent = triggerData.parent;
+ data._parent = data._getParent();
+ }
+
+ config = 'toggle';
+ } else {
+ config = triggerData;
+ }
- Collapse._jQueryInterface.call($target, config);
+ Collapse.collapseInterface(element, config);
});
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Collapse to jQuery only if jQuery is present
*/
- $__default['default'].fn[NAME] = Collapse._jQueryInterface;
- $__default['default'].fn[NAME].Constructor = Collapse;
-
- $__default['default'].fn[NAME].noConflict = function () {
- $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
- return Collapse._jQueryInterface;
- };
+ defineJQueryPlugin(Collapse);
return Collapse;
diff --git a/vendor/twbs/bootstrap/js/dist/collapse.js.map b/vendor/twbs/bootstrap/js/dist/collapse.js.map
index dd3bac4b9..48454e8dd 100644
--- a/vendor/twbs/bootstrap/js/dist/collapse.js.map
+++ b/vendor/twbs/bootstrap/js/dist/collapse.js.map
@@ -1 +1 @@
-{"version":3,"file":"collapse.js","sources":["../src/collapse.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.0): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'collapse'\nconst VERSION = '4.6.0'\nconst DATA_KEY = 'bs.collapse'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst Default = {\n toggle: true,\n parent: ''\n}\n\nconst DefaultType = {\n toggle: 'boolean',\n parent: '(string|element)'\n}\n\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_COLLAPSE = 'collapse'\nconst CLASS_NAME_COLLAPSING = 'collapsing'\nconst CLASS_NAME_COLLAPSED = 'collapsed'\n\nconst DIMENSION_WIDTH = 'width'\nconst DIMENSION_HEIGHT = 'height'\n\nconst SELECTOR_ACTIVES = '.show, .collapsing'\nconst SELECTOR_DATA_TOGGLE = '[data-toggle=\"collapse\"]'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Collapse {\n constructor(element, config) {\n this._isTransitioning = false\n this._element = element\n this._config = this._getConfig(config)\n this._triggerArray = [].slice.call(document.querySelectorAll(\n `[data-toggle=\"collapse\"][href=\"#${element.id}\"],` +\n `[data-toggle=\"collapse\"][data-target=\"#${element.id}\"]`\n ))\n\n const toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE))\n for (let i = 0, len = toggleList.length; i < len; i++) {\n const elem = toggleList[i]\n const selector = Util.getSelectorFromElement(elem)\n const filterElement = [].slice.call(document.querySelectorAll(selector))\n .filter(foundElem => foundElem === element)\n\n if (selector !== null && filterElement.length > 0) {\n this._selector = selector\n this._triggerArray.push(elem)\n }\n }\n\n this._parent = this._config.parent ? this._getParent() : null\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._element, this._triggerArray)\n }\n\n if (this._config.toggle) {\n this.toggle()\n }\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n toggle() {\n if ($(this._element).hasClass(CLASS_NAME_SHOW)) {\n this.hide()\n } else {\n this.show()\n }\n }\n\n show() {\n if (this._isTransitioning ||\n $(this._element).hasClass(CLASS_NAME_SHOW)) {\n return\n }\n\n let actives\n let activesData\n\n if (this._parent) {\n actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES))\n .filter(elem => {\n if (typeof this._config.parent === 'string') {\n return elem.getAttribute('data-parent') === this._config.parent\n }\n\n return elem.classList.contains(CLASS_NAME_COLLAPSE)\n })\n\n if (actives.length === 0) {\n actives = null\n }\n }\n\n if (actives) {\n activesData = $(actives).not(this._selector).data(DATA_KEY)\n if (activesData && activesData._isTransitioning) {\n return\n }\n }\n\n const startEvent = $.Event(EVENT_SHOW)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n if (actives) {\n Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide')\n if (!activesData) {\n $(actives).data(DATA_KEY, null)\n }\n }\n\n const dimension = this._getDimension()\n\n $(this._element)\n .removeClass(CLASS_NAME_COLLAPSE)\n .addClass(CLASS_NAME_COLLAPSING)\n\n this._element.style[dimension] = 0\n\n if (this._triggerArray.length) {\n $(this._triggerArray)\n .removeClass(CLASS_NAME_COLLAPSED)\n .attr('aria-expanded', true)\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n $(this._element)\n .removeClass(CLASS_NAME_COLLAPSING)\n .addClass(`${CLASS_NAME_COLLAPSE} ${CLASS_NAME_SHOW}`)\n\n this._element.style[dimension] = ''\n\n this.setTransitioning(false)\n\n $(this._element).trigger(EVENT_SHOWN)\n }\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n const scrollSize = `scroll${capitalizedDimension}`\n const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`\n }\n\n hide() {\n if (this._isTransitioning ||\n !$(this._element).hasClass(CLASS_NAME_SHOW)) {\n return\n }\n\n const startEvent = $.Event(EVENT_HIDE)\n $(this._element).trigger(startEvent)\n if (startEvent.isDefaultPrevented()) {\n return\n }\n\n const dimension = this._getDimension()\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`\n\n Util.reflow(this._element)\n\n $(this._element)\n .addClass(CLASS_NAME_COLLAPSING)\n .removeClass(`${CLASS_NAME_COLLAPSE} ${CLASS_NAME_SHOW}`)\n\n const triggerArrayLength = this._triggerArray.length\n if (triggerArrayLength > 0) {\n for (let i = 0; i < triggerArrayLength; i++) {\n const trigger = this._triggerArray[i]\n const selector = Util.getSelectorFromElement(trigger)\n\n if (selector !== null) {\n const $elem = $([].slice.call(document.querySelectorAll(selector)))\n if (!$elem.hasClass(CLASS_NAME_SHOW)) {\n $(trigger).addClass(CLASS_NAME_COLLAPSED)\n .attr('aria-expanded', false)\n }\n }\n }\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n this.setTransitioning(false)\n $(this._element)\n .removeClass(CLASS_NAME_COLLAPSING)\n .addClass(CLASS_NAME_COLLAPSE)\n .trigger(EVENT_HIDDEN)\n }\n\n this._element.style[dimension] = ''\n const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n }\n\n setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n\n this._config = null\n this._parent = null\n this._element = null\n this._triggerArray = null\n this._isTransitioning = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n config.toggle = Boolean(config.toggle) // Coerce string values\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _getDimension() {\n const hasWidth = $(this._element).hasClass(DIMENSION_WIDTH)\n return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT\n }\n\n _getParent() {\n let parent\n\n if (Util.isElement(this._config.parent)) {\n parent = this._config.parent\n\n // It's a jQuery object\n if (typeof this._config.parent.jquery !== 'undefined') {\n parent = this._config.parent[0]\n }\n } else {\n parent = document.querySelector(this._config.parent)\n }\n\n const selector = `[data-toggle=\"collapse\"][data-parent=\"${this._config.parent}\"]`\n const children = [].slice.call(parent.querySelectorAll(selector))\n\n $(children).each((i, element) => {\n this._addAriaAndCollapsedClass(\n Collapse._getTargetFromElement(element),\n [element]\n )\n })\n\n return parent\n }\n\n _addAriaAndCollapsedClass(element, triggerArray) {\n const isOpen = $(element).hasClass(CLASS_NAME_SHOW)\n\n if (triggerArray.length) {\n $(triggerArray)\n .toggleClass(CLASS_NAME_COLLAPSED, !isOpen)\n .attr('aria-expanded', isOpen)\n }\n }\n\n // Static\n\n static _getTargetFromElement(element) {\n const selector = Util.getSelectorFromElement(element)\n return selector ? document.querySelector(selector) : null\n }\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $element = $(this)\n let data = $element.data(DATA_KEY)\n const _config = {\n ...Default,\n ...$element.data(),\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false\n }\n\n if (!data) {\n data = new Collapse(this, _config)\n $element.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n // preventDefault only for <a> elements (which change the URL) not inside the collapsible element\n if (event.currentTarget.tagName === 'A') {\n event.preventDefault()\n }\n\n const $trigger = $(this)\n const selector = Util.getSelectorFromElement(this)\n const selectors = [].slice.call(document.querySelectorAll(selector))\n\n $(selectors).each(function () {\n const $target = $(this)\n const data = $target.data(DATA_KEY)\n const config = data ? 'toggle' : $trigger.data()\n Collapse._jQueryInterface.call($target, config)\n })\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Collapse._jQueryInterface\n$.fn[NAME].Constructor = Collapse\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Collapse._jQueryInterface\n}\n\nexport default Collapse\n"],"names":["NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","$","fn","Default","toggle","parent","DefaultType","EVENT_SHOW","EVENT_SHOWN","EVENT_HIDE","EVENT_HIDDEN","EVENT_CLICK_DATA_API","CLASS_NAME_SHOW","CLASS_NAME_COLLAPSE","CLASS_NAME_COLLAPSING","CLASS_NAME_COLLAPSED","DIMENSION_WIDTH","DIMENSION_HEIGHT","SELECTOR_ACTIVES","SELECTOR_DATA_TOGGLE","Collapse","element","config","_isTransitioning","_element","_config","_getConfig","_triggerArray","slice","call","document","querySelectorAll","id","toggleList","i","len","length","elem","selector","Util","getSelectorFromElement","filterElement","filter","foundElem","_selector","push","_parent","_getParent","_addAriaAndCollapsedClass","hasClass","hide","show","actives","activesData","getAttribute","classList","contains","not","data","startEvent","Event","trigger","isDefaultPrevented","_jQueryInterface","dimension","_getDimension","removeClass","addClass","style","attr","setTransitioning","complete","capitalizedDimension","toUpperCase","scrollSize","transitionDuration","getTransitionDurationFromElement","one","TRANSITION_END","emulateTransitionEnd","getBoundingClientRect","reflow","triggerArrayLength","$elem","isTransitioning","dispose","removeData","Boolean","typeCheckConfig","hasWidth","isElement","jquery","querySelector","children","each","_getTargetFromElement","triggerArray","isOpen","toggleClass","$element","test","TypeError","on","event","currentTarget","tagName","preventDefault","$trigger","selectors","$target","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUA;EACA;EACA;EACA;EACA;;EAEA,IAAMA,IAAI,GAAG,UAAb;EACA,IAAMC,OAAO,GAAG,OAAhB;EACA,IAAMC,QAAQ,GAAG,aAAjB;EACA,IAAMC,SAAS,SAAOD,QAAtB;EACA,IAAME,YAAY,GAAG,WAArB;EACA,IAAMC,kBAAkB,GAAGC,qBAAC,CAACC,EAAF,CAAKP,IAAL,CAA3B;EAEA,IAAMQ,OAAO,GAAG;EACdC,EAAAA,MAAM,EAAE,IADM;EAEdC,EAAAA,MAAM,EAAE;EAFM,CAAhB;EAKA,IAAMC,WAAW,GAAG;EAClBF,EAAAA,MAAM,EAAE,SADU;EAElBC,EAAAA,MAAM,EAAE;EAFU,CAApB;EAKA,IAAME,UAAU,YAAUT,SAA1B;EACA,IAAMU,WAAW,aAAWV,SAA5B;EACA,IAAMW,UAAU,YAAUX,SAA1B;EACA,IAAMY,YAAY,cAAYZ,SAA9B;EACA,IAAMa,oBAAoB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Ab;EACA,SAAOoB,QAAQ,CAAC2C,gBAAhB;EACD,CAHD;;;;;;;;"} \ No newline at end of file
+{"version":3,"file":"collapse.js","sources":["../src/util/index.js","../src/collapse.js"],"sourcesContent":["import SelectorEngine from '../dom/selector-engine'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = `#${hrefAttr.split('#')[1]}`\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => {\n if (!obj || typeof obj !== 'object') {\n return false\n }\n\n if (typeof obj.jquery !== 'undefined') {\n obj = obj[0]\n }\n\n return typeof obj.nodeType !== 'undefined'\n}\n\nconst getElement = obj => {\n if (isElement(obj)) { // it's a jQuery object or a node element\n return obj.jquery ? obj[0] : obj\n }\n\n if (typeof obj === 'string' && obj.length > 0) {\n return SelectorEngine.findOne(obj)\n }\n\n return null\n}\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = callback => {\n if (typeof callback === 'function') {\n callback()\n }\n}\n\nexport {\n getElement,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n isDisabled,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin,\n execute\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getElement,\n getSelectorFromElement,\n getElementFromSelector,\n reflow,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'collapse'\nconst DATA_KEY = 'bs.collapse'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst Default = {\n toggle: true,\n parent: ''\n}\n\nconst DefaultType = {\n toggle: 'boolean',\n parent: '(string|element)'\n}\n\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_COLLAPSE = 'collapse'\nconst CLASS_NAME_COLLAPSING = 'collapsing'\nconst CLASS_NAME_COLLAPSED = 'collapsed'\n\nconst WIDTH = 'width'\nconst HEIGHT = 'height'\n\nconst SELECTOR_ACTIVES = '.show, .collapsing'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"collapse\"]'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Collapse extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._isTransitioning = false\n this._config = this._getConfig(config)\n this._triggerArray = SelectorEngine.find(\n `${SELECTOR_DATA_TOGGLE}[href=\"#${this._element.id}\"],` +\n `${SELECTOR_DATA_TOGGLE}[data-bs-target=\"#${this._element.id}\"]`\n )\n\n const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE)\n\n for (let i = 0, len = toggleList.length; i < len; i++) {\n const elem = toggleList[i]\n const selector = getSelectorFromElement(elem)\n const filterElement = SelectorEngine.find(selector)\n .filter(foundElem => foundElem === this._element)\n\n if (selector !== null && filterElement.length) {\n this._selector = selector\n this._triggerArray.push(elem)\n }\n }\n\n this._parent = this._config.parent ? this._getParent() : null\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._element, this._triggerArray)\n }\n\n if (this._config.toggle) {\n this.toggle()\n }\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n toggle() {\n if (this._element.classList.contains(CLASS_NAME_SHOW)) {\n this.hide()\n } else {\n this.show()\n }\n }\n\n show() {\n if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n let actives\n let activesData\n\n if (this._parent) {\n actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent)\n .filter(elem => {\n if (typeof this._config.parent === 'string') {\n return elem.getAttribute('data-bs-parent') === this._config.parent\n }\n\n return elem.classList.contains(CLASS_NAME_COLLAPSE)\n })\n\n if (actives.length === 0) {\n actives = null\n }\n }\n\n const container = SelectorEngine.findOne(this._selector)\n if (actives) {\n const tempActiveData = actives.find(elem => container !== elem)\n activesData = tempActiveData ? Data.get(tempActiveData, DATA_KEY) : null\n\n if (activesData && activesData._isTransitioning) {\n return\n }\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_SHOW)\n if (startEvent.defaultPrevented) {\n return\n }\n\n if (actives) {\n actives.forEach(elemActive => {\n if (container !== elemActive) {\n Collapse.collapseInterface(elemActive, 'hide')\n }\n\n if (!activesData) {\n Data.set(elemActive, DATA_KEY, null)\n }\n })\n }\n\n const dimension = this._getDimension()\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE)\n this._element.classList.add(CLASS_NAME_COLLAPSING)\n\n this._element.style[dimension] = 0\n\n if (this._triggerArray.length) {\n this._triggerArray.forEach(element => {\n element.classList.remove(CLASS_NAME_COLLAPSED)\n element.setAttribute('aria-expanded', true)\n })\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n this._element.classList.remove(CLASS_NAME_COLLAPSING)\n this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)\n\n this._element.style[dimension] = ''\n\n this.setTransitioning(false)\n\n EventHandler.trigger(this._element, EVENT_SHOWN)\n }\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n const scrollSize = `scroll${capitalizedDimension}`\n\n this._queueCallback(complete, this._element, true)\n this._element.style[dimension] = `${this._element[scrollSize]}px`\n }\n\n hide() {\n if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n if (startEvent.defaultPrevented) {\n return\n }\n\n const dimension = this._getDimension()\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`\n\n reflow(this._element)\n\n this._element.classList.add(CLASS_NAME_COLLAPSING)\n this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)\n\n const triggerArrayLength = this._triggerArray.length\n if (triggerArrayLength > 0) {\n for (let i = 0; i < triggerArrayLength; i++) {\n const trigger = this._triggerArray[i]\n const elem = getElementFromSelector(trigger)\n\n if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {\n trigger.classList.add(CLASS_NAME_COLLAPSED)\n trigger.setAttribute('aria-expanded', false)\n }\n }\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n this.setTransitioning(false)\n this._element.classList.remove(CLASS_NAME_COLLAPSING)\n this._element.classList.add(CLASS_NAME_COLLAPSE)\n EventHandler.trigger(this._element, EVENT_HIDDEN)\n }\n\n this._element.style[dimension] = ''\n\n this._queueCallback(complete, this._element, true)\n }\n\n setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n config.toggle = Boolean(config.toggle) // Coerce string values\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _getDimension() {\n return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT\n }\n\n _getParent() {\n let { parent } = this._config\n\n parent = getElement(parent)\n\n const selector = `${SELECTOR_DATA_TOGGLE}[data-bs-parent=\"${parent}\"]`\n\n SelectorEngine.find(selector, parent)\n .forEach(element => {\n const selected = getElementFromSelector(element)\n\n this._addAriaAndCollapsedClass(\n selected,\n [element]\n )\n })\n\n return parent\n }\n\n _addAriaAndCollapsedClass(element, triggerArray) {\n if (!element || !triggerArray.length) {\n return\n }\n\n const isOpen = element.classList.contains(CLASS_NAME_SHOW)\n\n triggerArray.forEach(elem => {\n if (isOpen) {\n elem.classList.remove(CLASS_NAME_COLLAPSED)\n } else {\n elem.classList.add(CLASS_NAME_COLLAPSED)\n }\n\n elem.setAttribute('aria-expanded', isOpen)\n })\n }\n\n // Static\n\n static collapseInterface(element, config) {\n let data = Data.get(element, DATA_KEY)\n const _config = {\n ...Default,\n ...Manipulator.getDataAttributes(element),\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false\n }\n\n if (!data) {\n data = new Collapse(element, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Collapse.collapseInterface(this, config)\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n // preventDefault only for <a> elements (which change the URL) not inside the collapsible element\n if (event.target.tagName === 'A' || (event.delegateTarget && event.delegateTarget.tagName === 'A')) {\n event.preventDefault()\n }\n\n const triggerData = Manipulator.getDataAttributes(this)\n const selector = getSelectorFromElement(this)\n const selectorElements = SelectorEngine.find(selector)\n\n selectorElements.forEach(element => {\n const data = Data.get(element, DATA_KEY)\n let config\n if (data) {\n // update parent attribute\n if (data._parent === null && typeof triggerData.parent === 'string') {\n data._config.parent = triggerData.parent\n data._parent = data._getParent()\n }\n\n config = 'toggle'\n } else {\n config = triggerData\n }\n\n Collapse.collapseInterface(element, config)\n })\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Collapse to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Collapse)\n\nexport default Collapse\n"],"names":["toType","obj","undefined","toString","call","match","toLowerCase","getSelector","element","selector","getAttribute","hrefAttr","includes","startsWith","split","trim","getSelectorFromElement","document","querySelector","getElementFromSelector","isElement","jquery","nodeType","getElement","length","SelectorEngine","findOne","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","TypeError","toUpperCase","reflow","offsetHeight","getjQuery","jQuery","window","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","defineJQueryPlugin","plugin","$","name","NAME","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","DATA_KEY","EVENT_KEY","DATA_API_KEY","Default","toggle","parent","DefaultType","EVENT_SHOW","EVENT_SHOWN","EVENT_HIDE","EVENT_HIDDEN","EVENT_CLICK_DATA_API","CLASS_NAME_SHOW","CLASS_NAME_COLLAPSE","CLASS_NAME_COLLAPSING","CLASS_NAME_COLLAPSED","WIDTH","HEIGHT","SELECTOR_ACTIVES","SELECTOR_DATA_TOGGLE","Collapse","BaseComponent","constructor","_isTransitioning","_config","_getConfig","_triggerArray","find","_element","id","toggleList","i","len","elem","filterElement","filter","foundElem","_selector","push","_parent","_getParent","_addAriaAndCollapsedClass","classList","contains","hide","show","actives","activesData","container","tempActiveData","Data","get","startEvent","EventHandler","trigger","defaultPrevented","elemActive","collapseInterface","set","dimension","_getDimension","remove","add","style","setAttribute","setTransitioning","complete","capitalizedDimension","slice","scrollSize","_queueCallback","getBoundingClientRect","triggerArrayLength","isTransitioning","Boolean","selected","triggerArray","isOpen","data","Manipulator","getDataAttributes","each","on","event","target","tagName","delegateTarget","preventDefault","triggerData","selectorElements"],"mappings":";;;;;;;;;;;;;;;;;;;EAcA,MAAMA,MAAM,GAAGC,GAAG,IAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,WAAQ,GAAED,GAAI,EAAd;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC,WAA9C,EAAP;EACD,CAND;;EAsBA,MAAMC,WAAW,GAAGC,OAAO,IAAI;EAC7B,MAAIC,QAAQ,GAAGD,OAAO,CAACE,YAAR,CAAqB,gBAArB,CAAf;;EAEA,MAAI,CAACD,QAAD,IAAaA,QAAQ,KAAK,GAA9B,EAAmC;EACjC,QAAIE,QAAQ,GAAGH,OAAO,CAACE,YAAR,CAAqB,MAArB,CAAf,CADiC;EAIjC;EACA;EACA;;EACA,QAAI,CAACC,QAAD,IAAc,CAACA,QAAQ,CAACC,QAAT,CAAkB,GAAlB,CAAD,IAA2B,CAACD,QAAQ,CAACE,UAAT,CAAoB,GAApB,CAA9C,EAAyE;EACvE,aAAO,IAAP;EACD,KATgC;;;EAYjC,QAAIF,QAAQ,CAACC,QAAT,CAAkB,GAAlB,KAA0B,CAACD,QAAQ,CAACE,UAAT,CAAoB,GAApB,CAA/B,EAAyD;EACvDF,MAAAA,QAAQ,GAAI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,IAAI,CAACtD,OAAL,CAAanB,MAAb,GAAsBmF,WAAW,CAACnF,MAAlC;EACAyE,QAAAA,IAAI,CAACvC,OAAL,GAAeuC,IAAI,CAACtC,UAAL,EAAf;EACD;;EAED1E,MAAAA,MAAM,GAAG,QAAT;EACD,KARD,MAQO;EACLA,MAAAA,MAAM,GAAG0H,WAAT;EACD;;EAEDpE,IAAAA,QAAQ,CAACqC,iBAAT,CAA2BhH,OAA3B,EAAoCqB,MAApC;EACD,GAhBD;EAiBD,CA3BD;EA6BA;EACA;EACA;EACA;EACA;EACA;;EAEAwB,kBAAkB,CAAC8B,QAAD,CAAlB;;;;;;;;"} \ No newline at end of file
diff --git a/vendor/twbs/bootstrap/js/dist/dropdown.js b/vendor/twbs/bootstrap/js/dist/dropdown.js
index 772617ce8..09db6e8ad 100644
--- a/vendor/twbs/bootstrap/js/dist/dropdown.js
+++ b/vendor/twbs/bootstrap/js/dist/dropdown.js
@@ -1,120 +1,252 @@
/*!
- * Bootstrap dropdown.js v4.6.0 (https://getbootstrap.com/)
+ * Bootstrap dropdown.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
- typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.jQuery, global.Popper, global.Util));
-}(this, (function ($, Popper, Util) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
+ typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/selector-engine', './dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.Popper, global.SelectorEngine, global.Data, global.EventHandler, global.Manipulator, global.Base));
+}(this, (function (Popper, SelectorEngine, Data, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
- var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
- var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
-
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
+ function _interopNamespace(e) {
+ if (e && e.__esModule) return e;
+ var n = Object.create(null);
+ if (e) {
+ Object.keys(e).forEach(function (k) {
+ if (k !== 'default') {
+ var d = Object.getOwnPropertyDescriptor(e, k);
+ Object.defineProperty(n, k, d.get ? d : {
+ enumerable: true,
+ get: function () {
+ return e[k];
+ }
+ });
+ }
+ });
}
+ n['default'] = e;
+ return Object.freeze(n);
}
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
- }
+ var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
+ var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
+ var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
+ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
+ var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
+ var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
- function _extends() {
- _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
+ const toType = obj => {
+ if (obj === null || obj === undefined) {
+ return `${obj}`;
+ }
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
+ };
+
+ const getSelector = element => {
+ let selector = element.getAttribute('data-bs-target');
+
+ if (!selector || selector === '#') {
+ let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
+ // `document.querySelector` will rightfully complain it is invalid.
+ // See https://github.com/twbs/bootstrap/issues/32273
+
+ if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
+ return null;
+ } // Just in case some CMS puts out a full URL with the anchor appended
+
+
+ if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
+ hrefAttr = `#${hrefAttr.split('#')[1]}`;
}
- return target;
- };
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
+ }
- return _extends.apply(this, arguments);
- }
+ return selector;
+ };
+
+ const getElementFromSelector = element => {
+ const selector = getSelector(element);
+ return selector ? document.querySelector(selector) : null;
+ };
+
+ const isElement = obj => {
+ if (!obj || typeof obj !== 'object') {
+ return false;
+ }
+
+ if (typeof obj.jquery !== 'undefined') {
+ obj = obj[0];
+ }
+
+ return typeof obj.nodeType !== 'undefined';
+ };
+
+ const getElement = obj => {
+ if (isElement(obj)) {
+ // it's a jQuery object or a node element
+ return obj.jquery ? obj[0] : obj;
+ }
+
+ if (typeof obj === 'string' && obj.length > 0) {
+ return SelectorEngine__default['default'].findOne(obj);
+ }
+
+ return null;
+ };
+
+ const typeCheckConfig = (componentName, config, configTypes) => {
+ Object.keys(configTypes).forEach(property => {
+ const expectedTypes = configTypes[property];
+ const value = config[property];
+ const valueType = value && isElement(value) ? 'element' : toType(value);
+
+ if (!new RegExp(expectedTypes).test(valueType)) {
+ throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
+ }
+ });
+ };
+
+ const isVisible = element => {
+ if (!element) {
+ return false;
+ }
+
+ if (element.style && element.parentNode && element.parentNode.style) {
+ const elementStyle = getComputedStyle(element);
+ const parentNodeStyle = getComputedStyle(element.parentNode);
+ return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
+ }
+
+ return false;
+ };
+
+ const isDisabled = element => {
+ if (!element || element.nodeType !== Node.ELEMENT_NODE) {
+ return true;
+ }
+
+ if (element.classList.contains('disabled')) {
+ return true;
+ }
+
+ if (typeof element.disabled !== 'undefined') {
+ return element.disabled;
+ }
+
+ return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
+ };
+
+ const noop = () => {};
+ const getjQuery = () => {
+ const {
+ jQuery
+ } = window;
+
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ const onDOMContentLoaded = callback => {
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', callback);
+ } else {
+ callback();
+ }
+ };
+
+ const isRTL = () => document.documentElement.dir === 'rtl';
+
+ const defineJQueryPlugin = plugin => {
+ onDOMContentLoaded(() => {
+ const $ = getjQuery();
+ /* istanbul ignore if */
+
+ if ($) {
+ const name = plugin.NAME;
+ const JQUERY_NO_CONFLICT = $.fn[name];
+ $.fn[name] = plugin.jQueryInterface;
+ $.fn[name].Constructor = plugin;
+
+ $.fn[name].noConflict = () => {
+ $.fn[name] = JQUERY_NO_CONFLICT;
+ return plugin.jQueryInterface;
+ };
+ }
+ });
+ };
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.1): dropdown.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
- var NAME = 'dropdown';
- var VERSION = '4.6.0';
- var DATA_KEY = 'bs.dropdown';
- var EVENT_KEY = "." + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
- var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
-
- var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
-
- var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
-
- var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
-
- var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
-
- var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
-
- var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
- var EVENT_HIDE = "hide" + EVENT_KEY;
- var EVENT_HIDDEN = "hidden" + EVENT_KEY;
- var EVENT_SHOW = "show" + EVENT_KEY;
- var EVENT_SHOWN = "shown" + EVENT_KEY;
- var EVENT_CLICK = "click" + EVENT_KEY;
- var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
- var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY + DATA_API_KEY;
- var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY + DATA_API_KEY;
- var CLASS_NAME_DISABLED = 'disabled';
- var CLASS_NAME_SHOW = 'show';
- var CLASS_NAME_DROPUP = 'dropup';
- var CLASS_NAME_DROPRIGHT = 'dropright';
- var CLASS_NAME_DROPLEFT = 'dropleft';
- var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
- var CLASS_NAME_POSITION_STATIC = 'position-static';
- var SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]';
- var SELECTOR_FORM_CHILD = '.dropdown form';
- var SELECTOR_MENU = '.dropdown-menu';
- var SELECTOR_NAVBAR_NAV = '.navbar-nav';
- var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
- var PLACEMENT_TOP = 'top-start';
- var PLACEMENT_TOPEND = 'top-end';
- var PLACEMENT_BOTTOM = 'bottom-start';
- var PLACEMENT_BOTTOMEND = 'bottom-end';
- var PLACEMENT_RIGHT = 'right-start';
- var PLACEMENT_LEFT = 'left-start';
- var Default = {
- offset: 0,
- flip: true,
- boundary: 'scrollParent',
+ const NAME = 'dropdown';
+ const DATA_KEY = 'bs.dropdown';
+ const EVENT_KEY = `.${DATA_KEY}`;
+ const DATA_API_KEY = '.data-api';
+ const ESCAPE_KEY = 'Escape';
+ const SPACE_KEY = 'Space';
+ const TAB_KEY = 'Tab';
+ const ARROW_UP_KEY = 'ArrowUp';
+ const ARROW_DOWN_KEY = 'ArrowDown';
+ const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
+
+ const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY}`);
+ const EVENT_HIDE = `hide${EVENT_KEY}`;
+ const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
+ const EVENT_SHOW = `show${EVENT_KEY}`;
+ const EVENT_SHOWN = `shown${EVENT_KEY}`;
+ const EVENT_CLICK = `click${EVENT_KEY}`;
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
+ const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`;
+ const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`;
+ const CLASS_NAME_SHOW = 'show';
+ const CLASS_NAME_DROPUP = 'dropup';
+ const CLASS_NAME_DROPEND = 'dropend';
+ const CLASS_NAME_DROPSTART = 'dropstart';
+ const CLASS_NAME_NAVBAR = 'navbar';
+ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="dropdown"]';
+ const SELECTOR_MENU = '.dropdown-menu';
+ const SELECTOR_NAVBAR_NAV = '.navbar-nav';
+ const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
+ const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';
+ const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';
+ const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';
+ const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';
+ const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';
+ const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';
+ const Default = {
+ offset: [0, 2],
+ boundary: 'clippingParents',
reference: 'toggle',
display: 'dynamic',
- popperConfig: null
+ popperConfig: null,
+ autoClose: true
};
- var DefaultType = {
- offset: '(number|string|function)',
- flip: 'boolean',
+ const DefaultType = {
+ offset: '(array|string|function)',
boundary: '(string|element)',
- reference: '(string|element)',
+ reference: '(string|element|object)',
display: 'string',
- popperConfig: '(null|object)'
+ popperConfig: '(null|object|function)',
+ autoClose: '(boolean|string)'
};
/**
* ------------------------------------------------------------------------
@@ -122,9 +254,9 @@
* ------------------------------------------------------------------------
*/
- var Dropdown = /*#__PURE__*/function () {
- function Dropdown(element, config) {
- this._element = element;
+ class Dropdown extends BaseComponent__default['default'] {
+ constructor(element, config) {
+ super(element);
this._popper = null;
this._config = this._getConfig(config);
this._menu = this._getMenuElement();
@@ -134,325 +266,344 @@
} // Getters
- var _proto = Dropdown.prototype;
+ static get Default() {
+ return Default;
+ }
- // Public
- _proto.toggle = function toggle() {
- if (this._element.disabled || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED)) {
- return;
- }
+ static get DefaultType() {
+ return DefaultType;
+ }
- var isActive = $__default['default'](this._menu).hasClass(CLASS_NAME_SHOW);
+ static get NAME() {
+ return NAME;
+ } // Public
- Dropdown._clearMenus();
- if (isActive) {
+ toggle() {
+ if (isDisabled(this._element)) {
return;
}
- this.show(true);
- };
+ const isActive = this._element.classList.contains(CLASS_NAME_SHOW);
- _proto.show = function show(usePopper) {
- if (usePopper === void 0) {
- usePopper = false;
+ if (isActive) {
+ this.hide();
+ return;
}
- if (this._element.disabled || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED) || $__default['default'](this._menu).hasClass(CLASS_NAME_SHOW)) {
+ this.show();
+ }
+
+ show() {
+ if (isDisabled(this._element) || this._menu.classList.contains(CLASS_NAME_SHOW)) {
return;
}
- var relatedTarget = {
+ const parent = Dropdown.getParentFromElement(this._element);
+ const relatedTarget = {
relatedTarget: this._element
};
- var showEvent = $__default['default'].Event(EVENT_SHOW, relatedTarget);
-
- var parent = Dropdown._getParentFromElement(this._element);
-
- $__default['default'](parent).trigger(showEvent);
+ const showEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW, relatedTarget);
- if (showEvent.isDefaultPrevented()) {
+ if (showEvent.defaultPrevented) {
return;
} // Totally disable Popper for Dropdowns in Navbar
- if (!this._inNavbar && usePopper) {
- /**
- * Check for Popper dependency
- * Popper - https://popper.js.org
- */
- if (typeof Popper__default['default'] === 'undefined') {
+ if (this._inNavbar) {
+ Manipulator__default['default'].setDataAttribute(this._menu, 'popper', 'none');
+ } else {
+ if (typeof Popper__namespace === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
}
- var referenceElement = this._element;
+ let referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
- } else if (Util__default['default'].isElement(this._config.reference)) {
- referenceElement = this._config.reference; // Check if it's jQuery element
+ } else if (isElement(this._config.reference)) {
+ referenceElement = getElement(this._config.reference);
+ } else if (typeof this._config.reference === 'object') {
+ referenceElement = this._config.reference;
+ }
- if (typeof this._config.reference.jquery !== 'undefined') {
- referenceElement = this._config.reference[0];
- }
- } // If boundary is not `scrollParent`, then set position to `static`
- // to allow the menu to "escape" the scroll parent's boundaries
- // https://github.com/twbs/bootstrap/issues/24251
+ const popperConfig = this._getPopperConfig();
+ const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);
+ this._popper = Popper__namespace.createPopper(referenceElement, this._menu, popperConfig);
- if (this._config.boundary !== 'scrollParent') {
- $__default['default'](parent).addClass(CLASS_NAME_POSITION_STATIC);
+ if (isDisplayStatic) {
+ Manipulator__default['default'].setDataAttribute(this._menu, 'popper', 'static');
}
-
- this._popper = new Popper__default['default'](referenceElement, this._menu, this._getPopperConfig());
} // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
- if ('ontouchstart' in document.documentElement && $__default['default'](parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
- $__default['default'](document.body).children().on('mouseover', null, $__default['default'].noop);
+ if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {
+ [].concat(...document.body.children).forEach(elem => EventHandler__default['default'].on(elem, 'mouseover', noop));
}
this._element.focus();
this._element.setAttribute('aria-expanded', true);
- $__default['default'](this._menu).toggleClass(CLASS_NAME_SHOW);
- $__default['default'](parent).toggleClass(CLASS_NAME_SHOW).trigger($__default['default'].Event(EVENT_SHOWN, relatedTarget));
- };
+ this._menu.classList.toggle(CLASS_NAME_SHOW);
+
+ this._element.classList.toggle(CLASS_NAME_SHOW);
+
+ EventHandler__default['default'].trigger(this._element, EVENT_SHOWN, relatedTarget);
+ }
- _proto.hide = function hide() {
- if (this._element.disabled || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED) || !$__default['default'](this._menu).hasClass(CLASS_NAME_SHOW)) {
+ hide() {
+ if (isDisabled(this._element) || !this._menu.classList.contains(CLASS_NAME_SHOW)) {
return;
}
- var relatedTarget = {
+ const relatedTarget = {
relatedTarget: this._element
};
- var hideEvent = $__default['default'].Event(EVENT_HIDE, relatedTarget);
- var parent = Dropdown._getParentFromElement(this._element);
+ this._completeHide(relatedTarget);
+ }
+
+ dispose() {
+ if (this._popper) {
+ this._popper.destroy();
+ }
+
+ super.dispose();
+ }
+
+ update() {
+ this._inNavbar = this._detectNavbar();
+
+ if (this._popper) {
+ this._popper.update();
+ }
+ } // Private
+
- $__default['default'](parent).trigger(hideEvent);
+ _addEventListeners() {
+ EventHandler__default['default'].on(this._element, EVENT_CLICK, event => {
+ event.preventDefault();
+ this.toggle();
+ });
+ }
+
+ _completeHide(relatedTarget) {
+ const hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE, relatedTarget);
- if (hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
return;
+ } // If this is a touch-enabled device we remove the extra
+ // empty mouseover listeners we added for iOS support
+
+
+ if ('ontouchstart' in document.documentElement) {
+ [].concat(...document.body.children).forEach(elem => EventHandler__default['default'].off(elem, 'mouseover', noop));
}
if (this._popper) {
this._popper.destroy();
}
- $__default['default'](this._menu).toggleClass(CLASS_NAME_SHOW);
- $__default['default'](parent).toggleClass(CLASS_NAME_SHOW).trigger($__default['default'].Event(EVENT_HIDDEN, relatedTarget));
- };
+ this._menu.classList.remove(CLASS_NAME_SHOW);
- _proto.dispose = function dispose() {
- $__default['default'].removeData(this._element, DATA_KEY);
- $__default['default'](this._element).off(EVENT_KEY);
- this._element = null;
- this._menu = null;
+ this._element.classList.remove(CLASS_NAME_SHOW);
- if (this._popper !== null) {
- this._popper.destroy();
+ this._element.setAttribute('aria-expanded', 'false');
- this._popper = null;
- }
- };
+ Manipulator__default['default'].removeDataAttribute(this._menu, 'popper');
+ EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN, relatedTarget);
+ }
- _proto.update = function update() {
- this._inNavbar = this._detectNavbar();
+ _getConfig(config) {
+ config = { ...this.constructor.Default,
+ ...Manipulator__default['default'].getDataAttributes(this._element),
+ ...config
+ };
+ typeCheckConfig(NAME, config, this.constructor.DefaultType);
- if (this._popper !== null) {
- this._popper.scheduleUpdate();
+ if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
+ // Popper virtual elements require a getBoundingClientRect method
+ throw new TypeError(`${NAME.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
}
- } // Private
- ;
- _proto._addEventListeners = function _addEventListeners() {
- var _this = this;
+ return config;
+ }
- $__default['default'](this._element).on(EVENT_CLICK, function (event) {
- event.preventDefault();
- event.stopPropagation();
+ _getMenuElement() {
+ return SelectorEngine__default['default'].next(this._element, SELECTOR_MENU)[0];
+ }
- _this.toggle();
- });
- };
+ _getPlacement() {
+ const parentDropdown = this._element.parentNode;
- _proto._getConfig = function _getConfig(config) {
- config = _extends({}, this.constructor.Default, $__default['default'](this._element).data(), config);
- Util__default['default'].typeCheckConfig(NAME, config, this.constructor.DefaultType);
- return config;
- };
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
+ return PLACEMENT_RIGHT;
+ }
- _proto._getMenuElement = function _getMenuElement() {
- if (!this._menu) {
- var parent = Dropdown._getParentFromElement(this._element);
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
+ return PLACEMENT_LEFT;
+ } // We need to trim the value because custom properties can also include spaces
- if (parent) {
- this._menu = parent.querySelector(SELECTOR_MENU);
- }
- }
- return this._menu;
- };
-
- _proto._getPlacement = function _getPlacement() {
- var $parentDropdown = $__default['default'](this._element.parentNode);
- var placement = PLACEMENT_BOTTOM; // Handle dropup
-
- if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
- placement = $__default['default'](this._menu).hasClass(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP;
- } else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
- placement = PLACEMENT_RIGHT;
- } else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
- placement = PLACEMENT_LEFT;
- } else if ($__default['default'](this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
- placement = PLACEMENT_BOTTOMEND;
+ const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';
+
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
+ return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
}
- return placement;
- };
+ return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;
+ }
- _proto._detectNavbar = function _detectNavbar() {
- return $__default['default'](this._element).closest('.navbar').length > 0;
- };
+ _detectNavbar() {
+ return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null;
+ }
- _proto._getOffset = function _getOffset() {
- var _this2 = this;
+ _getOffset() {
+ const {
+ offset
+ } = this._config;
- var offset = {};
+ if (typeof offset === 'string') {
+ return offset.split(',').map(val => Number.parseInt(val, 10));
+ }
- if (typeof this._config.offset === 'function') {
- offset.fn = function (data) {
- data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
- return data;
- };
- } else {
- offset.offset = this._config.offset;
+ if (typeof offset === 'function') {
+ return popperData => offset(popperData, this._element);
}
return offset;
- };
+ }
- _proto._getPopperConfig = function _getPopperConfig() {
- var popperConfig = {
+ _getPopperConfig() {
+ const defaultBsPopperConfig = {
placement: this._getPlacement(),
- modifiers: {
- offset: this._getOffset(),
- flip: {
- enabled: this._config.flip
- },
- preventOverflow: {
- boundariesElement: this._config.boundary
+ modifiers: [{
+ name: 'preventOverflow',
+ options: {
+ boundary: this._config.boundary
}
- }
+ }, {
+ name: 'offset',
+ options: {
+ offset: this._getOffset()
+ }
+ }]
}; // Disable Popper if we have a static display
if (this._config.display === 'static') {
- popperConfig.modifiers.applyStyle = {
+ defaultBsPopperConfig.modifiers = [{
+ name: 'applyStyles',
enabled: false
- };
+ }];
}
- return _extends({}, popperConfig, this._config.popperConfig);
- } // Static
- ;
+ return { ...defaultBsPopperConfig,
+ ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
+ };
+ }
- Dropdown._jQueryInterface = function _jQueryInterface(config) {
- return this.each(function () {
- var data = $__default['default'](this).data(DATA_KEY);
+ _selectMenuItem(event) {
+ const items = SelectorEngine__default['default'].find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible);
- var _config = typeof config === 'object' ? config : null;
+ if (!items.length) {
+ return;
+ }
- if (!data) {
- data = new Dropdown(this, _config);
- $__default['default'](this).data(DATA_KEY, data);
- }
+ let index = items.indexOf(event.target); // Up
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new TypeError("No method named \"" + config + "\"");
- }
+ if (event.key === ARROW_UP_KEY && index > 0) {
+ index--;
+ } // Down
- data[config]();
- }
- });
- };
- Dropdown._clearMenus = function _clearMenus(event) {
- if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
- return;
- }
+ if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
+ index++;
+ } // index is -1 if the first keydown is an ArrowUp
- var toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
- for (var i = 0, len = toggles.length; i < len; i++) {
- var parent = Dropdown._getParentFromElement(toggles[i]);
+ index = index === -1 ? 0 : index;
+ items[index].focus();
+ } // Static
- var context = $__default['default'](toggles[i]).data(DATA_KEY);
- var relatedTarget = {
- relatedTarget: toggles[i]
- };
- if (event && event.type === 'click') {
- relatedTarget.clickEvent = event;
- }
+ static dropdownInterface(element, config) {
+ let data = Data__default['default'].get(element, DATA_KEY);
- if (!context) {
- continue;
+ const _config = typeof config === 'object' ? config : null;
+
+ if (!data) {
+ data = new Dropdown(element, _config);
+ }
+
+ if (typeof config === 'string') {
+ if (typeof data[config] === 'undefined') {
+ throw new TypeError(`No method named "${config}"`);
}
- var dropdownMenu = context._menu;
+ data[config]();
+ }
+ }
+
+ static jQueryInterface(config) {
+ return this.each(function () {
+ Dropdown.dropdownInterface(this, config);
+ });
+ }
+
+ static clearMenus(event) {
+ if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
+ return;
+ }
- if (!$__default['default'](parent).hasClass(CLASS_NAME_SHOW)) {
+ const toggles = SelectorEngine__default['default'].find(SELECTOR_DATA_TOGGLE);
+
+ for (let i = 0, len = toggles.length; i < len; i++) {
+ const context = Data__default['default'].get(toggles[i], DATA_KEY);
+
+ if (!context || context._config.autoClose === false) {
continue;
}
- if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $__default['default'].contains(parent, event.target)) {
+ if (!context._element.classList.contains(CLASS_NAME_SHOW)) {
continue;
}
- var hideEvent = $__default['default'].Event(EVENT_HIDE, relatedTarget);
- $__default['default'](parent).trigger(hideEvent);
+ const relatedTarget = {
+ relatedTarget: context._element
+ };
- if (hideEvent.isDefaultPrevented()) {
- continue;
- } // If this is a touch-enabled device we remove the extra
- // empty mouseover listeners we added for iOS support
+ if (event) {
+ const composedPath = event.composedPath();
+ const isMenuTarget = composedPath.includes(context._menu);
+ if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
+ continue;
+ } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
- if ('ontouchstart' in document.documentElement) {
- $__default['default'](document.body).children().off('mouseover', null, $__default['default'].noop);
- }
- toggles[i].setAttribute('aria-expanded', 'false');
+ if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) {
+ continue;
+ }
- if (context._popper) {
- context._popper.destroy();
+ if (event.type === 'click') {
+ relatedTarget.clickEvent = event;
+ }
}
- $__default['default'](dropdownMenu).removeClass(CLASS_NAME_SHOW);
- $__default['default'](parent).removeClass(CLASS_NAME_SHOW).trigger($__default['default'].Event(EVENT_HIDDEN, relatedTarget));
- }
- };
-
- Dropdown._getParentFromElement = function _getParentFromElement(element) {
- var parent;
- var selector = Util__default['default'].getSelectorFromElement(element);
-
- if (selector) {
- parent = document.querySelector(selector);
+ context._completeHide(relatedTarget);
}
+ }
- return parent || element.parentNode;
- } // eslint-disable-next-line complexity
- ;
+ static getParentFromElement(element) {
+ return getElementFromSelector(element) || element.parentNode;
+ }
- Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
+ static dataApiKeydownHandler(event) {
// If not input/textarea:
// - And not a key in REGEXP_KEYDOWN => not a dropdown command
// If input/textarea:
@@ -460,80 +611,45 @@
// - If key is other than escape
// - If key is not up or down => not a dropdown command
// - If trigger inside the menu => not a dropdown command
- if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $__default['default'](event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
+ if (/input|textarea/i.test(event.target.tagName) ? event.key === SPACE_KEY || event.key !== ESCAPE_KEY && (event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY || event.target.closest(SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.key)) {
return;
}
- if (this.disabled || $__default['default'](this).hasClass(CLASS_NAME_DISABLED)) {
- return;
- }
-
- var parent = Dropdown._getParentFromElement(this);
+ const isActive = this.classList.contains(CLASS_NAME_SHOW);
- var isActive = $__default['default'](parent).hasClass(CLASS_NAME_SHOW);
-
- if (!isActive && event.which === ESCAPE_KEYCODE) {
+ if (!isActive && event.key === ESCAPE_KEY) {
return;
}
event.preventDefault();
event.stopPropagation();
- if (!isActive || event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE) {
- if (event.which === ESCAPE_KEYCODE) {
- $__default['default'](parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus');
- }
-
- $__default['default'](this).trigger('click');
+ if (isDisabled(this)) {
return;
}
- var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) {
- return $__default['default'](item).is(':visible');
- });
+ const getToggleButton = () => this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine__default['default'].prev(this, SELECTOR_DATA_TOGGLE)[0];
- if (items.length === 0) {
+ if (event.key === ESCAPE_KEY) {
+ getToggleButton().focus();
+ Dropdown.clearMenus();
return;
}
- var index = items.indexOf(event.target);
-
- if (event.which === ARROW_UP_KEYCODE && index > 0) {
- // Up
- index--;
- }
-
- if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
- // Down
- index++;
+ if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) {
+ getToggleButton().click();
+ return;
}
- if (index < 0) {
- index = 0;
+ if (!isActive || event.key === SPACE_KEY) {
+ Dropdown.clearMenus();
+ return;
}
- items[index].focus();
- };
-
- _createClass(Dropdown, null, [{
- key: "VERSION",
- get: function get() {
- return VERSION;
- }
- }, {
- key: "Default",
- get: function get() {
- return Default;
- }
- }, {
- key: "DefaultType",
- get: function get() {
- return DefaultType;
- }
- }]);
+ Dropdown.getInstance(getToggleButton())._selectMenuItem(event);
+ }
- return Dropdown;
- }();
+ }
/**
* ------------------------------------------------------------------------
* Data Api implementation
@@ -541,27 +657,22 @@
*/
- $__default['default'](document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
+ EventHandler__default['default'].on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler);
+ EventHandler__default['default'].on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
+ EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus);
+ EventHandler__default['default'].on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
+ EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
event.preventDefault();
- event.stopPropagation();
-
- Dropdown._jQueryInterface.call($__default['default'](this), 'toggle');
- }).on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, function (e) {
- e.stopPropagation();
+ Dropdown.dropdownInterface(this);
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Dropdown to jQuery only if jQuery is present
*/
- $__default['default'].fn[NAME] = Dropdown._jQueryInterface;
- $__default['default'].fn[NAME].Constructor = Dropdown;
-
- $__default['default'].fn[NAME].noConflict = function () {
- $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
- return Dropdown._jQueryInterface;
- };
+ defineJQueryPlugin(Dropdown);
return Dropdown;
diff --git a/vendor/twbs/bootstrap/js/dist/dropdown.js.map b/vendor/twbs/bootstrap/js/dist/dropdown.js.map
index 70346d88f..c3f32c448 100644
--- a/vendor/twbs/bootstrap/js/dist/dropdown.js.map
+++ b/vendor/twbs/bootstrap/js/dist/dropdown.js.map
@@ -1 +1 @@
-{"version":3,"file":"dropdown.js","sources":["../src/dropdown.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.0): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Popper from 'popper.js'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'dropdown'\nconst VERSION = '4.6.0'\nconst DATA_KEY = 'bs.dropdown'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key\nconst SPACE_KEYCODE = 32 // KeyboardEvent.which value for space key\nconst TAB_KEYCODE = 9 // KeyboardEvent.which value for tab key\nconst ARROW_UP_KEYCODE = 38 // KeyboardEvent.which value for up arrow key\nconst ARROW_DOWN_KEYCODE = 40 // KeyboardEvent.which value for down arrow key\nconst RIGHT_MOUSE_BUTTON_WHICH = 3 // MouseEvent.which value for the right button (assuming a right-handed mouse)\nconst REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEYCODE}|${ARROW_DOWN_KEYCODE}|${ESCAPE_KEYCODE}`)\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK = `click${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DISABLED = 'disabled'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_DROPUP = 'dropup'\nconst CLASS_NAME_DROPRIGHT = 'dropright'\nconst CLASS_NAME_DROPLEFT = 'dropleft'\nconst CLASS_NAME_MENURIGHT = 'dropdown-menu-right'\nconst CLASS_NAME_POSITION_STATIC = 'position-static'\n\nconst SELECTOR_DATA_TOGGLE = '[data-toggle=\"dropdown\"]'\nconst SELECTOR_FORM_CHILD = '.dropdown form'\nconst SELECTOR_MENU = '.dropdown-menu'\nconst SELECTOR_NAVBAR_NAV = '.navbar-nav'\nconst SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'\n\nconst PLACEMENT_TOP = 'top-start'\nconst PLACEMENT_TOPEND = 'top-end'\nconst PLACEMENT_BOTTOM = 'bottom-start'\nconst PLACEMENT_BOTTOMEND = 'bottom-end'\nconst PLACEMENT_RIGHT = 'right-start'\nconst PLACEMENT_LEFT = 'left-start'\n\nconst Default = {\n offset: 0,\n flip: true,\n boundary: 'scrollParent',\n reference: 'toggle',\n display: 'dynamic',\n popperConfig: null\n}\n\nconst DefaultType = {\n offset: '(number|string|function)',\n flip: 'boolean',\n boundary: '(string|element)',\n reference: '(string|element)',\n display: 'string',\n popperConfig: '(null|object)'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Dropdown {\n constructor(element, config) {\n this._element = element\n this._popper = null\n this._config = this._getConfig(config)\n this._menu = this._getMenuElement()\n this._inNavbar = this._detectNavbar()\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Public\n\n toggle() {\n if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED)) {\n return\n }\n\n const isActive = $(this._menu).hasClass(CLASS_NAME_SHOW)\n\n Dropdown._clearMenus()\n\n if (isActive) {\n return\n }\n\n this.show(true)\n }\n\n show(usePopper = false) {\n if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || $(this._menu).hasClass(CLASS_NAME_SHOW)) {\n return\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n }\n const showEvent = $.Event(EVENT_SHOW, relatedTarget)\n const parent = Dropdown._getParentFromElement(this._element)\n\n $(parent).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented()) {\n return\n }\n\n // Totally disable Popper for Dropdowns in Navbar\n if (!this._inNavbar && usePopper) {\n /**\n * Check for Popper dependency\n * Popper - https://popper.js.org\n */\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)')\n }\n\n let referenceElement = this._element\n\n if (this._config.reference === 'parent') {\n referenceElement = parent\n } else if (Util.isElement(this._config.reference)) {\n referenceElement = this._config.reference\n\n // Check if it's jQuery element\n if (typeof this._config.reference.jquery !== 'undefined') {\n referenceElement = this._config.reference[0]\n }\n }\n\n // If boundary is not `scrollParent`, then set position to `static`\n // to allow the menu to \"escape\" the scroll parent's boundaries\n // https://github.com/twbs/bootstrap/issues/24251\n if (this._config.boundary !== 'scrollParent') {\n $(parent).addClass(CLASS_NAME_POSITION_STATIC)\n }\n\n this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig())\n }\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement &&\n $(parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {\n $(document.body).children().on('mouseover', null, $.noop)\n }\n\n this._element.focus()\n this._element.setAttribute('aria-expanded', true)\n\n $(this._menu).toggleClass(CLASS_NAME_SHOW)\n $(parent)\n .toggleClass(CLASS_NAME_SHOW)\n .trigger($.Event(EVENT_SHOWN, relatedTarget))\n }\n\n hide() {\n if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || !$(this._menu).hasClass(CLASS_NAME_SHOW)) {\n return\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n }\n const hideEvent = $.Event(EVENT_HIDE, relatedTarget)\n const parent = Dropdown._getParentFromElement(this._element)\n\n $(parent).trigger(hideEvent)\n\n if (hideEvent.isDefaultPrevented()) {\n return\n }\n\n if (this._popper) {\n this._popper.destroy()\n }\n\n $(this._menu).toggleClass(CLASS_NAME_SHOW)\n $(parent)\n .toggleClass(CLASS_NAME_SHOW)\n .trigger($.Event(EVENT_HIDDEN, relatedTarget))\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n $(this._element).off(EVENT_KEY)\n this._element = null\n this._menu = null\n if (this._popper !== null) {\n this._popper.destroy()\n this._popper = null\n }\n }\n\n update() {\n this._inNavbar = this._detectNavbar()\n if (this._popper !== null) {\n this._popper.scheduleUpdate()\n }\n }\n\n // Private\n\n _addEventListeners() {\n $(this._element).on(EVENT_CLICK, event => {\n event.preventDefault()\n event.stopPropagation()\n this.toggle()\n })\n }\n\n _getConfig(config) {\n config = {\n ...this.constructor.Default,\n ...$(this._element).data(),\n ...config\n }\n\n Util.typeCheckConfig(\n NAME,\n config,\n this.constructor.DefaultType\n )\n\n return config\n }\n\n _getMenuElement() {\n if (!this._menu) {\n const parent = Dropdown._getParentFromElement(this._element)\n\n if (parent) {\n this._menu = parent.querySelector(SELECTOR_MENU)\n }\n }\n\n return this._menu\n }\n\n _getPlacement() {\n const $parentDropdown = $(this._element.parentNode)\n let placement = PLACEMENT_BOTTOM\n\n // Handle dropup\n if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {\n placement = $(this._menu).hasClass(CLASS_NAME_MENURIGHT) ?\n PLACEMENT_TOPEND :\n PLACEMENT_TOP\n } else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {\n placement = PLACEMENT_RIGHT\n } else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {\n placement = PLACEMENT_LEFT\n } else if ($(this._menu).hasClass(CLASS_NAME_MENURIGHT)) {\n placement = PLACEMENT_BOTTOMEND\n }\n\n return placement\n }\n\n _detectNavbar() {\n return $(this._element).closest('.navbar').length > 0\n }\n\n _getOffset() {\n const offset = {}\n\n if (typeof this._config.offset === 'function') {\n offset.fn = data => {\n data.offsets = {\n ...data.offsets,\n ...(this._config.offset(data.offsets, this._element) || {})\n }\n\n return data\n }\n } else {\n offset.offset = this._config.offset\n }\n\n return offset\n }\n\n _getPopperConfig() {\n const popperConfig = {\n placement: this._getPlacement(),\n modifiers: {\n offset: this._getOffset(),\n flip: {\n enabled: this._config.flip\n },\n preventOverflow: {\n boundariesElement: this._config.boundary\n }\n }\n }\n\n // Disable Popper if we have a static display\n if (this._config.display === 'static') {\n popperConfig.modifiers.applyStyle = {\n enabled: false\n }\n }\n\n return {\n ...popperConfig,\n ...this._config.popperConfig\n }\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = typeof config === 'object' ? config : null\n\n if (!data) {\n data = new Dropdown(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n\n static _clearMenus(event) {\n if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH ||\n event.type === 'keyup' && event.which !== TAB_KEYCODE)) {\n return\n }\n\n const toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE))\n\n for (let i = 0, len = toggles.length; i < len; i++) {\n const parent = Dropdown._getParentFromElement(toggles[i])\n const context = $(toggles[i]).data(DATA_KEY)\n const relatedTarget = {\n relatedTarget: toggles[i]\n }\n\n if (event && event.type === 'click') {\n relatedTarget.clickEvent = event\n }\n\n if (!context) {\n continue\n }\n\n const dropdownMenu = context._menu\n if (!$(parent).hasClass(CLASS_NAME_SHOW)) {\n continue\n }\n\n if (event && (event.type === 'click' &&\n /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) &&\n $.contains(parent, event.target)) {\n continue\n }\n\n const hideEvent = $.Event(EVENT_HIDE, relatedTarget)\n $(parent).trigger(hideEvent)\n if (hideEvent.isDefaultPrevented()) {\n continue\n }\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n $(document.body).children().off('mouseover', null, $.noop)\n }\n\n toggles[i].setAttribute('aria-expanded', 'false')\n\n if (context._popper) {\n context._popper.destroy()\n }\n\n $(dropdownMenu).removeClass(CLASS_NAME_SHOW)\n $(parent)\n .removeClass(CLASS_NAME_SHOW)\n .trigger($.Event(EVENT_HIDDEN, relatedTarget))\n }\n }\n\n static _getParentFromElement(element) {\n let parent\n const selector = Util.getSelectorFromElement(element)\n\n if (selector) {\n parent = document.querySelector(selector)\n }\n\n return parent || element.parentNode\n }\n\n // eslint-disable-next-line complexity\n static _dataApiKeydownHandler(event) {\n // If not input/textarea:\n // - And not a key in REGEXP_KEYDOWN => not a dropdown command\n // If input/textarea:\n // - If space key => not a dropdown command\n // - If key is other than escape\n // - If key is not up or down => not a dropdown command\n // - If trigger inside the menu => not a dropdown command\n if (/input|textarea/i.test(event.target.tagName) ?\n event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE &&\n (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE ||\n $(event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {\n return\n }\n\n if (this.disabled || $(this).hasClass(CLASS_NAME_DISABLED)) {\n return\n }\n\n const parent = Dropdown._getParentFromElement(this)\n const isActive = $(parent).hasClass(CLASS_NAME_SHOW)\n\n if (!isActive && event.which === ESCAPE_KEYCODE) {\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n\n if (!isActive || (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {\n if (event.which === ESCAPE_KEYCODE) {\n $(parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus')\n }\n\n $(this).trigger('click')\n return\n }\n\n const items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS))\n .filter(item => $(item).is(':visible'))\n\n if (items.length === 0) {\n return\n }\n\n let index = items.indexOf(event.target)\n\n if (event.which === ARROW_UP_KEYCODE && index > 0) { // Up\n index--\n }\n\n if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { // Down\n index++\n }\n\n if (index < 0) {\n index = 0\n }\n\n items[index].focus()\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document)\n .on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown._dataApiKeydownHandler)\n .on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler)\n .on(`${EVENT_CLICK_DATA_API} ${EVENT_KEYUP_DATA_API}`, Dropdown._clearMenus)\n .on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n event.preventDefault()\n event.stopPropagation()\n Dropdown._jQueryInterface.call($(this), 'toggle')\n })\n .on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, e => {\n e.stopPropagation()\n })\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Dropdown._jQueryInterface\n$.fn[NAME].Constructor = Dropdown\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Dropdown._jQueryInterface\n}\n\nexport default Dropdown\n"],"names":["NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","$","fn","ESCAPE_KEYCODE","SPACE_KEYCODE","TAB_KEYCODE","ARROW_UP_KEYCODE","ARROW_DOWN_KEYCODE","RIGHT_MOUSE_BUTTON_WHICH","REGEXP_KEYDOWN","RegExp","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_CLICK","EVENT_CLICK_DATA_API","EVENT_KEYDOWN_DATA_API","EVENT_KEYUP_DATA_API","CLASS_NAME_DISABLED","CLASS_NAME_SHOW","CLASS_NAME_DROPUP","CLASS_NAME_DROPRIGHT","CLASS_NAME_DROPLEFT","CLASS_NAME_MENURIGHT","CLASS_NAME_POSITION_STATIC","SELECTOR_DATA_TOGGLE","SELECTOR_FORM_CHILD","SELECTOR_MENU","SELECTOR_NAVBAR_NAV","SELECTOR_VISIBLE_ITEMS","PLACEMENT_TOP","PLACEMENT_TOPEND","PLACEMENT_BOTTOM","PLACEMENT_BOTTOMEND","PLACEMENT_RIGHT","PLACEMENT_LEFT","Default","offset","flip","boundary","reference","display","popperConfig","DefaultType","Dropdown","element","config","_element","_popper","_config","_getConfig","_menu","_getMenuElement","_inNavbar","_detectNavbar","_addEventListeners","toggle","disabled","hasClass","isActive","_clearMenus","show","usePopper","relatedTarget","showEvent","Event","parent","_getParentFromElement","trigger","isDefaultPrevented","Popper","TypeError","referenceElement","Util","isElement","jquery","addClass","_getPopperConfig","document","documentElement","closest","length","body","children","on","noop","focus","setAttribute","toggleClass","hide","hideEvent","destroy","dispose","removeData","off","update","scheduleUpdate","event","preventDefault","stopPropagation","constructor","data","typeCheckConfig","querySelector","_getPlacement","$parentDropdown","parentNode","placement","_getOffset","offsets","modifiers","enabled","preventOverflow","boundariesElement","applyStyle","_jQueryInterface","each","which","type","toggles","slice","call","querySelectorAll","i","len","context","clickEvent","dropdownMenu","test","target","tagName","contains","removeClass","selector","getSelectorFromElement","_dataApiKeydownHandler","items","filter","item","is","index","indexOf","e","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWA;EACA;EACA;EACA;EACA;;EAEA,IAAMA,IAAI,GAAG,UAAb;EACA,IAAMC,OAAO,GAAG,OAAhB;EACA,IAAMC,QAAQ,GAAG,aAAjB;EACA,IAAMC,SAAS,SAAOD,QAAtB;EACA,IAAME,YAAY,GAAG,WAArB;EACA,IAAMC,kBAAkB,GAAGC,qBAAC,CAACC,EAAF,CAAKP,IAAL,CAA3B;EACA,IAAMQ,cAAc,GAAG,EAAvB;;EACA,IAAMC,aAAa,GAAG,EAAtB;;EACA,IAAMC,WAAW,GAAG,CAApB;;EACA,IAAMC,gBAAgB,GAAG,EAAzB;;EACA,IAAMC,kBAAkB,GAAG,EAA3B;;EACA,IAAMC,wBAAwB,GAAG,CAAjC;;EACA,IAAMC,cAAc,GAAG,IAAIC,MAAJ,CAAcJ,gBAAd,SAAkCC,kBAAlC,SAAwDJ,cAAxD,CAAvB;EAEA,IAAMQ,UAAU,YAAUb,SAA1B;EACA,IAAMc,YAAY,cAAYd,SAA9B;EACA,IAAMe,UAAU,YAAUf,SAA1B;EACA,IAAMgB,WAAW,aAAWhB,SAA5B;EACA,IAAMiB,WAAW,aAAWjB,SAA5B;EACA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AX,GAAwB,YAAM;EAC5BhJ,EAAAA,qBAAC,CAACC,EAAF,CAAKP,IAAL,IAAaK,kBAAb;EACA,SAAO6C,QAAQ,CAACuE,gBAAhB;EACD,CAHD;;;;;;;;"} \ No newline at end of file
+{"version":3,"file":"dropdown.js","sources":["../src/util/index.js","../src/dropdown.js"],"sourcesContent":["import SelectorEngine from '../dom/selector-engine'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = `#${hrefAttr.split('#')[1]}`\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => {\n if (!obj || typeof obj !== 'object') {\n return false\n }\n\n if (typeof obj.jquery !== 'undefined') {\n obj = obj[0]\n }\n\n return typeof obj.nodeType !== 'undefined'\n}\n\nconst getElement = obj => {\n if (isElement(obj)) { // it's a jQuery object or a node element\n return obj.jquery ? obj[0] : obj\n }\n\n if (typeof obj === 'string' && obj.length > 0) {\n return SelectorEngine.findOne(obj)\n }\n\n return null\n}\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = callback => {\n if (typeof callback === 'function') {\n callback()\n }\n}\n\nexport {\n getElement,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n isDisabled,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin,\n execute\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\n\nimport {\n defineJQueryPlugin,\n getElement,\n getElementFromSelector,\n isDisabled,\n isElement,\n isVisible,\n isRTL,\n noop,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'dropdown'\nconst DATA_KEY = 'bs.dropdown'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ESCAPE_KEY = 'Escape'\nconst SPACE_KEY = 'Space'\nconst TAB_KEY = 'Tab'\nconst ARROW_UP_KEY = 'ArrowUp'\nconst ARROW_DOWN_KEY = 'ArrowDown'\nconst RIGHT_MOUSE_BUTTON = 2 // MouseEvent.button value for the secondary button, usually the right button\n\nconst REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY}`)\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK = `click${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_DROPUP = 'dropup'\nconst CLASS_NAME_DROPEND = 'dropend'\nconst CLASS_NAME_DROPSTART = 'dropstart'\nconst CLASS_NAME_NAVBAR = 'navbar'\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"dropdown\"]'\nconst SELECTOR_MENU = '.dropdown-menu'\nconst SELECTOR_NAVBAR_NAV = '.navbar-nav'\nconst SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'\n\nconst PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start'\nconst PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end'\nconst PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start'\nconst PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end'\nconst PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start'\nconst PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start'\n\nconst Default = {\n offset: [0, 2],\n boundary: 'clippingParents',\n reference: 'toggle',\n display: 'dynamic',\n popperConfig: null,\n autoClose: true\n}\n\nconst DefaultType = {\n offset: '(array|string|function)',\n boundary: '(string|element)',\n reference: '(string|element|object)',\n display: 'string',\n popperConfig: '(null|object|function)',\n autoClose: '(boolean|string)'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Dropdown extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._popper = null\n this._config = this._getConfig(config)\n this._menu = this._getMenuElement()\n this._inNavbar = this._detectNavbar()\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n toggle() {\n if (isDisabled(this._element)) {\n return\n }\n\n const isActive = this._element.classList.contains(CLASS_NAME_SHOW)\n\n if (isActive) {\n this.hide()\n return\n }\n\n this.show()\n }\n\n show() {\n if (isDisabled(this._element) || this._menu.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const parent = Dropdown.getParentFromElement(this._element)\n const relatedTarget = {\n relatedTarget: this._element\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget)\n\n if (showEvent.defaultPrevented) {\n return\n }\n\n // Totally disable Popper for Dropdowns in Navbar\n if (this._inNavbar) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'none')\n } else {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)')\n }\n\n let referenceElement = this._element\n\n if (this._config.reference === 'parent') {\n referenceElement = parent\n } else if (isElement(this._config.reference)) {\n referenceElement = getElement(this._config.reference)\n } else if (typeof this._config.reference === 'object') {\n referenceElement = this._config.reference\n }\n\n const popperConfig = this._getPopperConfig()\n const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false)\n\n this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig)\n\n if (isDisplayStatic) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'static')\n }\n }\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement &&\n !parent.closest(SELECTOR_NAVBAR_NAV)) {\n [].concat(...document.body.children)\n .forEach(elem => EventHandler.on(elem, 'mouseover', noop))\n }\n\n this._element.focus()\n this._element.setAttribute('aria-expanded', true)\n\n this._menu.classList.toggle(CLASS_NAME_SHOW)\n this._element.classList.toggle(CLASS_NAME_SHOW)\n EventHandler.trigger(this._element, EVENT_SHOWN, relatedTarget)\n }\n\n hide() {\n if (isDisabled(this._element) || !this._menu.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n }\n\n this._completeHide(relatedTarget)\n }\n\n dispose() {\n if (this._popper) {\n this._popper.destroy()\n }\n\n super.dispose()\n }\n\n update() {\n this._inNavbar = this._detectNavbar()\n if (this._popper) {\n this._popper.update()\n }\n }\n\n // Private\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_CLICK, event => {\n event.preventDefault()\n this.toggle()\n })\n }\n\n _completeHide(relatedTarget) {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE, relatedTarget)\n if (hideEvent.defaultPrevented) {\n return\n }\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children)\n .forEach(elem => EventHandler.off(elem, 'mouseover', noop))\n }\n\n if (this._popper) {\n this._popper.destroy()\n }\n\n this._menu.classList.remove(CLASS_NAME_SHOW)\n this._element.classList.remove(CLASS_NAME_SHOW)\n this._element.setAttribute('aria-expanded', 'false')\n Manipulator.removeDataAttribute(this._menu, 'popper')\n EventHandler.trigger(this._element, EVENT_HIDDEN, relatedTarget)\n }\n\n _getConfig(config) {\n config = {\n ...this.constructor.Default,\n ...Manipulator.getDataAttributes(this._element),\n ...config\n }\n\n typeCheckConfig(NAME, config, this.constructor.DefaultType)\n\n if (typeof config.reference === 'object' && !isElement(config.reference) &&\n typeof config.reference.getBoundingClientRect !== 'function'\n ) {\n // Popper virtual elements require a getBoundingClientRect method\n throw new TypeError(`${NAME.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`)\n }\n\n return config\n }\n\n _getMenuElement() {\n return SelectorEngine.next(this._element, SELECTOR_MENU)[0]\n }\n\n _getPlacement() {\n const parentDropdown = this._element.parentNode\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n return PLACEMENT_RIGHT\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n return PLACEMENT_LEFT\n }\n\n // We need to trim the value because custom properties can also include spaces\n const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end'\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP\n }\n\n return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM\n }\n\n _detectNavbar() {\n return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null\n }\n\n _getOffset() {\n const { offset } = this._config\n\n if (typeof offset === 'string') {\n return offset.split(',').map(val => Number.parseInt(val, 10))\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element)\n }\n\n return offset\n }\n\n _getPopperConfig() {\n const defaultBsPopperConfig = {\n placement: this._getPlacement(),\n modifiers: [{\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n },\n {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }]\n }\n\n // Disable Popper if we have a static display\n if (this._config.display === 'static') {\n defaultBsPopperConfig.modifiers = [{\n name: 'applyStyles',\n enabled: false\n }]\n }\n\n return {\n ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n }\n }\n\n _selectMenuItem(event) {\n const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible)\n\n if (!items.length) {\n return\n }\n\n let index = items.indexOf(event.target)\n\n // Up\n if (event.key === ARROW_UP_KEY && index > 0) {\n index--\n }\n\n // Down\n if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {\n index++\n }\n\n // index is -1 if the first keydown is an ArrowUp\n index = index === -1 ? 0 : index\n\n items[index].focus()\n }\n\n // Static\n\n static dropdownInterface(element, config) {\n let data = Data.get(element, DATA_KEY)\n const _config = typeof config === 'object' ? config : null\n\n if (!data) {\n data = new Dropdown(element, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Dropdown.dropdownInterface(this, config)\n })\n }\n\n static clearMenus(event) {\n if (event && (event.button === RIGHT_MOUSE_BUTTON || (event.type === 'keyup' && event.key !== TAB_KEY))) {\n return\n }\n\n const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE)\n\n for (let i = 0, len = toggles.length; i < len; i++) {\n const context = Data.get(toggles[i], DATA_KEY)\n if (!context || context._config.autoClose === false) {\n continue\n }\n\n if (!context._element.classList.contains(CLASS_NAME_SHOW)) {\n continue\n }\n\n const relatedTarget = {\n relatedTarget: context._element\n }\n\n if (event) {\n const composedPath = event.composedPath()\n const isMenuTarget = composedPath.includes(context._menu)\n if (\n composedPath.includes(context._element) ||\n (context._config.autoClose === 'inside' && !isMenuTarget) ||\n (context._config.autoClose === 'outside' && isMenuTarget)\n ) {\n continue\n }\n\n // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu\n if (context._menu.contains(event.target) && ((event.type === 'keyup' && event.key === TAB_KEY) || /input|select|option|textarea|form/i.test(event.target.tagName))) {\n continue\n }\n\n if (event.type === 'click') {\n relatedTarget.clickEvent = event\n }\n }\n\n context._completeHide(relatedTarget)\n }\n }\n\n static getParentFromElement(element) {\n return getElementFromSelector(element) || element.parentNode\n }\n\n static dataApiKeydownHandler(event) {\n // If not input/textarea:\n // - And not a key in REGEXP_KEYDOWN => not a dropdown command\n // If input/textarea:\n // - If space key => not a dropdown command\n // - If key is other than escape\n // - If key is not up or down => not a dropdown command\n // - If trigger inside the menu => not a dropdown command\n if (/input|textarea/i.test(event.target.tagName) ?\n event.key === SPACE_KEY || (event.key !== ESCAPE_KEY &&\n ((event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY) ||\n event.target.closest(SELECTOR_MENU))) :\n !REGEXP_KEYDOWN.test(event.key)) {\n return\n }\n\n const isActive = this.classList.contains(CLASS_NAME_SHOW)\n\n if (!isActive && event.key === ESCAPE_KEY) {\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n\n if (isDisabled(this)) {\n return\n }\n\n const getToggleButton = () => this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0]\n\n if (event.key === ESCAPE_KEY) {\n getToggleButton().focus()\n Dropdown.clearMenus()\n return\n }\n\n if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) {\n getToggleButton().click()\n return\n }\n\n if (!isActive || event.key === SPACE_KEY) {\n Dropdown.clearMenus()\n return\n }\n\n Dropdown.getInstance(getToggleButton())._selectMenuItem(event)\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n event.preventDefault()\n Dropdown.dropdownInterface(this)\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Dropdown to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Dropdown)\n\nexport default Dropdown\n"],"names":["toType","obj","undefined","toString","call","match","toLowerCase","getSelector","element","selector","getAttribute","hrefAttr","includes","startsWith","split","trim","getElementFromSelector","document","querySelector","isElement","jquery","nodeType","getElement","length","SelectorEngine","findOne","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","TypeError","toUpperCase","isVisible","style","parentNode","elementStyle","getComputedStyle","parentNodeStyle","display","visibility","isDisabled","Node","ELEMENT_NODE","classList","contains","disabled","hasAttribute","noop","getjQuery","jQuery","window","body","onDOMContentLoaded","callback","readyState","addEventListener","isRTL","documentElement","dir","defineJQueryPlugin","plugin","$","name","NAME","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","DATA_KEY","EVENT_KEY","DATA_API_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","ARROW_UP_KEY","ARROW_DOWN_KEY","RIGHT_MOUSE_BUTTON","REGEXP_KEYDOWN","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_CLICK","EVENT_CLICK_DATA_API","EVENT_KEYDOWN_DATA_API","EVENT_KEYUP_DATA_API","CLASS_NAME_SHOW","CLASS_NAME_DROPUP","CLASS_NAME_DROPEND","CLASS_NAME_DROPSTART","CLASS_NAME_NAVBAR","SELECTOR_DATA_TOGGLE","SELECTOR_MENU","SELECTOR_NAVBAR_NAV","SELECTOR_VISIBLE_ITEMS","PLACEMENT_TOP","PLACEMENT_TOPEND","PLACEMENT_BOTTOM","PLACEMENT_BOTTOMEND","PLACEMENT_RIGHT","PLACEMENT_LEFT","Default","offset","boundary","reference","popperConfig","autoClose","DefaultType","Dropdown","BaseComponent","constructor","_popper","_config","_getConfig","_menu","_getMenuElement","_inNavbar","_detectNavbar","_addEventListeners","toggle","_element","isActive","hide","show","parent","getParentFromElement","relatedTarget","showEvent","EventHandler","trigger","defaultPrevented","Manipulator","setDataAttribute","Popper","referenceElement","_getPopperConfig","isDisplayStatic","modifiers","find","modifier","enabled","createPopper","closest","concat","children","elem","on","focus","setAttribute","_completeHide","dispose","destroy","update","event","preventDefault","hideEvent","off","remove","removeDataAttribute","getDataAttributes","getBoundingClientRect","next","_getPlacement","parentDropdown","isEnd","getPropertyValue","_getOffset","map","val","Number","parseInt","popperData","defaultBsPopperConfig","placement","options","_selectMenuItem","items","filter","index","indexOf","target","key","dropdownInterface","data","Data","get","each","clearMenus","button","type","toggles","i","len","context","composedPath","isMenuTarget","tagName","clickEvent","dataApiKeydownHandler","stopPropagation","getToggleButton","matches","prev","click","getInstance"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcA,MAAMA,MAAM,GAAGC,GAAG,IAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,WAAQ,GAAED,GAAI,EAAd;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC,WAA9C,EAAP;EACD,CAND;;EAsBA,MAAMC,WAAW,GAAGC,OAAO,IAAI;EAC7B,MAAIC,QAAQ,GAAGD,OAAO,CAACE,YAAR,CAAqB,gBAArB,CAAf;;EAEA,MAAI,CAACD,QAAD,IAAaA,QAAQ,KAAK,GAA9B,EAAmC;EACjC,QAAIE,QAAQ,GAAGH,OAAO,CAACE,YAAR,CAAqB,MAArB,CAAf,CADiC;EAIjC;EACA;EACA;;EACA,QAAI,CAACC,QAAD,IAAc,CAACA,QAAQ,CAACC,QAAT,CAAkB,GAAlB,CAAD,IAA2B,CAACD,QAAQ,CAACE,UAAT,CAAoB,GAApB,CAA9C,EAAyE;EACvE,aAAO,IAAP;EACD,KATgC;;;EAYjC,QAAIF,QAAQ,CAACC,QAAT,CAAkB,GAAlB,KAA0B,CAACD,QAAQ,CAACE,UAAT,CAAoB,GAApB,CAA/B,EAAyD;EACvDF,MAAAA,QAAQ,GAAI,IAAGA,QAAQ,CAACG,KAAT,CAAe,GAAf,EAAoB,CAApB,CAAuB,EAAtC;EACD;;EAEDL,IAAAA,QAAQ,GAAGE,QAAQ,IAAIA,QAAQ,KAAK,GAAzB,GAA+BA,QAAQ,CAACI,IAAT,EAA/B,GAAiD,IAA5D;EACD;;EAED,SAAON,QAAP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rFA,EAAAA,KAAK,CAACC,cAAN;EACA9C,EAAAA,QAAQ,CAAC0E,iBAAT,CAA2B,IAA3B;EACD,CAHD;EAKA;EACA;EACA;EACA;EACA;EACA;;EAEA5H,kBAAkB,CAACkD,QAAD,CAAlB;;;;;;;;"} \ No newline at end of file
diff --git a/vendor/twbs/bootstrap/js/dist/index.js b/vendor/twbs/bootstrap/js/dist/index.js
deleted file mode 100644
index 5f219ec1a..000000000
--- a/vendor/twbs/bootstrap/js/dist/index.js
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): index.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-(function ($) {
- if (typeof $ === 'undefined') {
- throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
- }
-
- var version = $.fn.jquery.split(' ')[0].split('.');
- var minMajor = 1;
- var ltMajor = 2;
- var minMinor = 9;
- var minPatch = 1;
- var maxMajor = 4;
-
- if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
- throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
- }
-})($);
diff --git a/vendor/twbs/bootstrap/js/dist/modal.js b/vendor/twbs/bootstrap/js/dist/modal.js
index f3738fbd7..b59ebe883 100644
--- a/vendor/twbs/bootstrap/js/dist/modal.js
+++ b/vendor/twbs/bootstrap/js/dist/modal.js
@@ -1,156 +1,494 @@
/*!
- * Bootstrap modal.js v4.6.0 (https://getbootstrap.com/)
+ * Bootstrap modal.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
- typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.jQuery, global.Util));
-}(this, (function ($, Util) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Modal = factory(global.SelectorEngine, global.EventHandler, global.Manipulator, global.Base));
+}(this, (function (SelectorEngine, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
- var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
+ var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
+ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
+ var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
+ var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
+ const MILLISECONDS_MULTIPLIER = 1000;
+ const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
+
+ const toType = obj => {
+ if (obj === null || obj === undefined) {
+ return `${obj}`;
}
- }
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
- }
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
+ };
- function _extends() {
- _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
+ const getSelector = element => {
+ let selector = element.getAttribute('data-bs-target');
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
+ if (!selector || selector === '#') {
+ let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
+ // `document.querySelector` will rightfully complain it is invalid.
+ // See https://github.com/twbs/bootstrap/issues/32273
+
+ if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
+ return null;
+ } // Just in case some CMS puts out a full URL with the anchor appended
+
+
+ if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
+ hrefAttr = `#${hrefAttr.split('#')[1]}`;
+ }
+
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
+ }
+
+ return selector;
+ };
+
+ const getElementFromSelector = element => {
+ const selector = getSelector(element);
+ return selector ? document.querySelector(selector) : null;
+ };
+
+ const getTransitionDurationFromElement = element => {
+ if (!element) {
+ return 0;
+ } // Get transition-duration of the element
+
+
+ let {
+ transitionDuration,
+ transitionDelay
+ } = window.getComputedStyle(element);
+ const floatTransitionDuration = Number.parseFloat(transitionDuration);
+ const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
+
+ if (!floatTransitionDuration && !floatTransitionDelay) {
+ return 0;
+ } // If multiple durations are defined, take the first
+
+
+ transitionDuration = transitionDuration.split(',')[0];
+ transitionDelay = transitionDelay.split(',')[0];
+ return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
+ };
+
+ const triggerTransitionEnd = element => {
+ element.dispatchEvent(new Event(TRANSITION_END));
+ };
+
+ const isElement = obj => {
+ if (!obj || typeof obj !== 'object') {
+ return false;
+ }
+
+ if (typeof obj.jquery !== 'undefined') {
+ obj = obj[0];
+ }
+
+ return typeof obj.nodeType !== 'undefined';
+ };
+
+ const emulateTransitionEnd = (element, duration) => {
+ let called = false;
+ const durationPadding = 5;
+ const emulatedDuration = duration + durationPadding;
+
+ function listener() {
+ called = true;
+ element.removeEventListener(TRANSITION_END, listener);
+ }
+
+ element.addEventListener(TRANSITION_END, listener);
+ setTimeout(() => {
+ if (!called) {
+ triggerTransitionEnd(element);
+ }
+ }, emulatedDuration);
+ };
+
+ const typeCheckConfig = (componentName, config, configTypes) => {
+ Object.keys(configTypes).forEach(property => {
+ const expectedTypes = configTypes[property];
+ const value = config[property];
+ const valueType = value && isElement(value) ? 'element' : toType(value);
+
+ if (!new RegExp(expectedTypes).test(valueType)) {
+ throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
+ }
+ });
+ };
+
+ const isVisible = element => {
+ if (!element) {
+ return false;
+ }
+
+ if (element.style && element.parentNode && element.parentNode.style) {
+ const elementStyle = getComputedStyle(element);
+ const parentNodeStyle = getComputedStyle(element.parentNode);
+ return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
+ }
+
+ return false;
+ };
+
+ const reflow = element => element.offsetHeight;
+
+ const getjQuery = () => {
+ const {
+ jQuery
+ } = window;
+
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ const onDOMContentLoaded = callback => {
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', callback);
+ } else {
+ callback();
+ }
+ };
+
+ const isRTL = () => document.documentElement.dir === 'rtl';
+
+ const defineJQueryPlugin = plugin => {
+ onDOMContentLoaded(() => {
+ const $ = getjQuery();
+ /* istanbul ignore if */
+
+ if ($) {
+ const name = plugin.NAME;
+ const JQUERY_NO_CONFLICT = $.fn[name];
+ $.fn[name] = plugin.jQueryInterface;
+ $.fn[name].Constructor = plugin;
+
+ $.fn[name].noConflict = () => {
+ $.fn[name] = JQUERY_NO_CONFLICT;
+ return plugin.jQueryInterface;
+ };
+ }
+ });
+ };
+
+ const execute = callback => {
+ if (typeof callback === 'function') {
+ callback();
+ }
+ };
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.1): util/scrollBar.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
+ const SELECTOR_STICKY_CONTENT = '.sticky-top';
+
+ const getWidth = () => {
+ // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
+ const documentWidth = document.documentElement.clientWidth;
+ return Math.abs(window.innerWidth - documentWidth);
+ };
+
+ const hide = (width = getWidth()) => {
+ _disableOverFlow(); // give padding to element to balances the hidden scrollbar width
+
+
+ _setElementAttributes('body', 'paddingRight', calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements, to keep shown fullwidth
+
+
+ _setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);
+
+ _setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);
+ };
+
+ const _disableOverFlow = () => {
+ const actualValue = document.body.style.overflow;
+
+ if (actualValue) {
+ Manipulator__default['default'].setDataAttribute(document.body, 'overflow', actualValue);
+ }
+
+ document.body.style.overflow = 'hidden';
+ };
+
+ const _setElementAttributes = (selector, styleProp, callback) => {
+ const scrollbarWidth = getWidth();
+ SelectorEngine__default['default'].find(selector).forEach(element => {
+ if (element !== document.body && window.innerWidth > element.clientWidth + scrollbarWidth) {
+ return;
+ }
+
+ const actualValue = element.style[styleProp];
+ const calculatedValue = window.getComputedStyle(element)[styleProp];
+ Manipulator__default['default'].setDataAttribute(element, styleProp, actualValue);
+ element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`;
+ });
+ };
+
+ const reset = () => {
+ _resetElementAttributes('body', 'overflow');
+
+ _resetElementAttributes('body', 'paddingRight');
+
+ _resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');
+
+ _resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
+ };
+
+ const _resetElementAttributes = (selector, styleProp) => {
+ SelectorEngine__default['default'].find(selector).forEach(element => {
+ const value = Manipulator__default['default'].getDataAttribute(element, styleProp);
+
+ if (typeof value === 'undefined') {
+ element.style.removeProperty(styleProp);
+ } else {
+ Manipulator__default['default'].removeDataAttribute(element, styleProp);
+ element.style[styleProp] = value;
+ }
+ });
+ };
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.1): util/backdrop.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ const Default$1 = {
+ isVisible: true,
+ // if false, we use the backdrop helper without adding any element to the dom
+ isAnimated: false,
+ rootElement: document.body,
+ // give the choice to place backdrop under different elements
+ clickCallback: null
+ };
+ const DefaultType$1 = {
+ isVisible: 'boolean',
+ isAnimated: 'boolean',
+ rootElement: 'element',
+ clickCallback: '(function|null)'
+ };
+ const NAME$1 = 'backdrop';
+ const CLASS_NAME_BACKDROP = 'modal-backdrop';
+ const CLASS_NAME_FADE$1 = 'fade';
+ const CLASS_NAME_SHOW$1 = 'show';
+ const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$1}`;
+
+ class Backdrop {
+ constructor(config) {
+ this._config = this._getConfig(config);
+ this._isAppended = false;
+ this._element = null;
+ }
+
+ show(callback) {
+ if (!this._config.isVisible) {
+ execute(callback);
+ return;
+ }
+
+ this._append();
+
+ if (this._config.isAnimated) {
+ reflow(this._getElement());
+ }
+
+ this._getElement().classList.add(CLASS_NAME_SHOW$1);
+
+ this._emulateAnimation(() => {
+ execute(callback);
+ });
+ }
+
+ hide(callback) {
+ if (!this._config.isVisible) {
+ execute(callback);
+ return;
+ }
+
+ this._getElement().classList.remove(CLASS_NAME_SHOW$1);
+
+ this._emulateAnimation(() => {
+ this.dispose();
+ execute(callback);
+ });
+ } // Private
+
+
+ _getElement() {
+ if (!this._element) {
+ const backdrop = document.createElement('div');
+ backdrop.className = CLASS_NAME_BACKDROP;
+
+ if (this._config.isAnimated) {
+ backdrop.classList.add(CLASS_NAME_FADE$1);
}
+
+ this._element = backdrop;
+ }
+
+ return this._element;
+ }
+
+ _getConfig(config) {
+ config = { ...Default$1,
+ ...(typeof config === 'object' ? config : {})
+ };
+ config.rootElement = config.rootElement || document.body;
+ typeCheckConfig(NAME$1, config, DefaultType$1);
+ return config;
+ }
+
+ _append() {
+ if (this._isAppended) {
+ return;
+ }
+
+ this._config.rootElement.appendChild(this._getElement());
+
+ EventHandler__default['default'].on(this._getElement(), EVENT_MOUSEDOWN, () => {
+ execute(this._config.clickCallback);
+ });
+ this._isAppended = true;
+ }
+
+ dispose() {
+ if (!this._isAppended) {
+ return;
+ }
+
+ EventHandler__default['default'].off(this._element, EVENT_MOUSEDOWN);
+
+ this._getElement().parentNode.removeChild(this._element);
+
+ this._isAppended = false;
+ }
+
+ _emulateAnimation(callback) {
+ if (!this._config.isAnimated) {
+ execute(callback);
+ return;
}
- return target;
- };
+ const backdropTransitionDuration = getTransitionDurationFromElement(this._getElement());
+ EventHandler__default['default'].one(this._getElement(), 'transitionend', () => execute(callback));
+ emulateTransitionEnd(this._getElement(), backdropTransitionDuration);
+ }
- return _extends.apply(this, arguments);
}
/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.1): modal.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
- var NAME = 'modal';
- var VERSION = '4.6.0';
- var DATA_KEY = 'bs.modal';
- var EVENT_KEY = "." + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
- var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
-
- var Default = {
+ const NAME = 'modal';
+ const DATA_KEY = 'bs.modal';
+ const EVENT_KEY = `.${DATA_KEY}`;
+ const DATA_API_KEY = '.data-api';
+ const ESCAPE_KEY = 'Escape';
+ const Default = {
backdrop: true,
keyboard: true,
- focus: true,
- show: true
+ focus: true
};
- var DefaultType = {
+ const DefaultType = {
backdrop: '(boolean|string)',
keyboard: 'boolean',
- focus: 'boolean',
- show: 'boolean'
+ focus: 'boolean'
};
- var EVENT_HIDE = "hide" + EVENT_KEY;
- var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY;
- var EVENT_HIDDEN = "hidden" + EVENT_KEY;
- var EVENT_SHOW = "show" + EVENT_KEY;
- var EVENT_SHOWN = "shown" + EVENT_KEY;
- var EVENT_FOCUSIN = "focusin" + EVENT_KEY;
- var EVENT_RESIZE = "resize" + EVENT_KEY;
- var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
- var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY;
- var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY;
- var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY;
- var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
- var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable';
- var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
- var CLASS_NAME_BACKDROP = 'modal-backdrop';
- var CLASS_NAME_OPEN = 'modal-open';
- var CLASS_NAME_FADE = 'fade';
- var CLASS_NAME_SHOW = 'show';
- var CLASS_NAME_STATIC = 'modal-static';
- var SELECTOR_DIALOG = '.modal-dialog';
- var SELECTOR_MODAL_BODY = '.modal-body';
- var SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]';
- var SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]';
- var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
- var SELECTOR_STICKY_CONTENT = '.sticky-top';
+ const EVENT_HIDE = `hide${EVENT_KEY}`;
+ const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`;
+ const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
+ const EVENT_SHOW = `show${EVENT_KEY}`;
+ const EVENT_SHOWN = `shown${EVENT_KEY}`;
+ const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
+ const EVENT_RESIZE = `resize${EVENT_KEY}`;
+ const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
+ const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`;
+ const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}`;
+ const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`;
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
+ const CLASS_NAME_OPEN = 'modal-open';
+ const CLASS_NAME_FADE = 'fade';
+ const CLASS_NAME_SHOW = 'show';
+ const CLASS_NAME_STATIC = 'modal-static';
+ const SELECTOR_DIALOG = '.modal-dialog';
+ const SELECTOR_MODAL_BODY = '.modal-body';
+ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="modal"]';
+ const SELECTOR_DATA_DISMISS = '[data-bs-dismiss="modal"]';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
- var Modal = /*#__PURE__*/function () {
- function Modal(element, config) {
+ class Modal extends BaseComponent__default['default'] {
+ constructor(element, config) {
+ super(element);
this._config = this._getConfig(config);
- this._element = element;
- this._dialog = element.querySelector(SELECTOR_DIALOG);
- this._backdrop = null;
+ this._dialog = SelectorEngine__default['default'].findOne(SELECTOR_DIALOG, this._element);
+ this._backdrop = this._initializeBackDrop();
this._isShown = false;
- this._isBodyOverflowing = false;
this._ignoreBackdropClick = false;
this._isTransitioning = false;
- this._scrollbarWidth = 0;
} // Getters
- var _proto = Modal.prototype;
+ static get Default() {
+ return Default;
+ }
- // Public
- _proto.toggle = function toggle(relatedTarget) {
- return this._isShown ? this.hide() : this.show(relatedTarget);
- };
+ static get NAME() {
+ return NAME;
+ } // Public
- _proto.show = function show(relatedTarget) {
- var _this = this;
+ toggle(relatedTarget) {
+ return this._isShown ? this.hide() : this.show(relatedTarget);
+ }
+
+ show(relatedTarget) {
if (this._isShown || this._isTransitioning) {
return;
}
- if ($__default['default'](this._element).hasClass(CLASS_NAME_FADE)) {
+ if (this._isAnimated()) {
this._isTransitioning = true;
}
- var showEvent = $__default['default'].Event(EVENT_SHOW, {
- relatedTarget: relatedTarget
+ const showEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW, {
+ relatedTarget
});
- $__default['default'](this._element).trigger(showEvent);
- if (this._isShown || showEvent.isDefaultPrevented()) {
+ if (this._isShown || showEvent.defaultPrevented) {
return;
}
this._isShown = true;
-
- this._checkScrollbar();
-
- this._setScrollbar();
+ hide();
+ document.body.classList.add(CLASS_NAME_OPEN);
this._adjustDialog();
@@ -158,25 +496,19 @@
this._setResizeEvent();
- $__default['default'](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
- return _this.hide(event);
- });
- $__default['default'](this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
- $__default['default'](_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
- if ($__default['default'](event.target).is(_this._element)) {
- _this._ignoreBackdropClick = true;
+ EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, event => this.hide(event));
+ EventHandler__default['default'].on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {
+ EventHandler__default['default'].one(this._element, EVENT_MOUSEUP_DISMISS, event => {
+ if (event.target === this._element) {
+ this._ignoreBackdropClick = true;
}
});
});
- this._showBackdrop(function () {
- return _this._showElement(relatedTarget);
- });
- };
-
- _proto.hide = function hide(event) {
- var _this2 = this;
+ this._showBackdrop(() => this._showElement(relatedTarget));
+ }
+ hide(event) {
if (event) {
event.preventDefault();
}
@@ -185,17 +517,17 @@
return;
}
- var hideEvent = $__default['default'].Event(EVENT_HIDE);
- $__default['default'](this._element).trigger(hideEvent);
+ const hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE);
- if (!this._isShown || hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
return;
}
this._isShown = false;
- var transition = $__default['default'](this._element).hasClass(CLASS_NAME_FADE);
- if (transition) {
+ const isAnimated = this._isAnimated();
+
+ if (isAnimated) {
this._isTransitioning = true;
}
@@ -203,93 +535,57 @@
this._setResizeEvent();
- $__default['default'](document).off(EVENT_FOCUSIN);
- $__default['default'](this._element).removeClass(CLASS_NAME_SHOW);
- $__default['default'](this._element).off(EVENT_CLICK_DISMISS);
- $__default['default'](this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
+ EventHandler__default['default'].off(document, EVENT_FOCUSIN);
- if (transition) {
- var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
- $__default['default'](this._element).one(Util__default['default'].TRANSITION_END, function (event) {
- return _this2._hideModal(event);
- }).emulateTransitionEnd(transitionDuration);
- } else {
- this._hideModal();
- }
- };
+ this._element.classList.remove(CLASS_NAME_SHOW);
- _proto.dispose = function dispose() {
- [window, this._element, this._dialog].forEach(function (htmlElement) {
- return $__default['default'](htmlElement).off(EVENT_KEY);
- });
+ EventHandler__default['default'].off(this._element, EVENT_CLICK_DISMISS);
+ EventHandler__default['default'].off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
+
+ this._queueCallback(() => this._hideModal(), this._element, isAnimated);
+ }
+
+ dispose() {
+ [window, this._dialog].forEach(htmlElement => EventHandler__default['default'].off(htmlElement, EVENT_KEY));
+
+ this._backdrop.dispose();
+
+ super.dispose();
/**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
* Do not move `document` in `htmlElements` array
* It will remove `EVENT_CLICK_DATA_API` event that should remain
*/
- $__default['default'](document).off(EVENT_FOCUSIN);
- $__default['default'].removeData(this._element, DATA_KEY);
- this._config = null;
- this._element = null;
- this._dialog = null;
- this._backdrop = null;
- this._isShown = null;
- this._isBodyOverflowing = null;
- this._ignoreBackdropClick = null;
- this._isTransitioning = null;
- this._scrollbarWidth = null;
- };
-
- _proto.handleUpdate = function handleUpdate() {
+ EventHandler__default['default'].off(document, EVENT_FOCUSIN);
+ }
+
+ handleUpdate() {
this._adjustDialog();
} // Private
- ;
-
- _proto._getConfig = function _getConfig(config) {
- config = _extends({}, Default, config);
- Util__default['default'].typeCheckConfig(NAME, config, DefaultType);
- return config;
- };
-
- _proto._triggerBackdropTransition = function _triggerBackdropTransition() {
- var _this3 = this;
-
- var hideEventPrevented = $__default['default'].Event(EVENT_HIDE_PREVENTED);
- $__default['default'](this._element).trigger(hideEventPrevented);
-
- if (hideEventPrevented.isDefaultPrevented()) {
- return;
- }
-
- var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
- if (!isModalOverflowing) {
- this._element.style.overflowY = 'hidden';
- }
- this._element.classList.add(CLASS_NAME_STATIC);
-
- var modalTransitionDuration = Util__default['default'].getTransitionDurationFromElement(this._dialog);
- $__default['default'](this._element).off(Util__default['default'].TRANSITION_END);
- $__default['default'](this._element).one(Util__default['default'].TRANSITION_END, function () {
- _this3._element.classList.remove(CLASS_NAME_STATIC);
-
- if (!isModalOverflowing) {
- $__default['default'](_this3._element).one(Util__default['default'].TRANSITION_END, function () {
- _this3._element.style.overflowY = '';
- }).emulateTransitionEnd(_this3._element, modalTransitionDuration);
- }
- }).emulateTransitionEnd(modalTransitionDuration);
+ _initializeBackDrop() {
+ return new Backdrop({
+ isVisible: Boolean(this._config.backdrop),
+ // 'static' option will be translated to true, and booleans will keep their value
+ isAnimated: this._isAnimated()
+ });
+ }
- this._element.focus();
- };
+ _getConfig(config) {
+ config = { ...Default,
+ ...Manipulator__default['default'].getDataAttributes(this._element),
+ ...config
+ };
+ typeCheckConfig(NAME, config, DefaultType);
+ return config;
+ }
- _proto._showElement = function _showElement(relatedTarget) {
- var _this4 = this;
+ _showElement(relatedTarget) {
+ const isAnimated = this._isAnimated();
- var transition = $__default['default'](this._element).hasClass(CLASS_NAME_FADE);
- var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null;
+ const modalBody = SelectorEngine__default['default'].findOne(SELECTOR_MODAL_BODY, this._dialog);
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position
@@ -304,87 +600,70 @@
this._element.setAttribute('role', 'dialog');
- if ($__default['default'](this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
+ this._element.scrollTop = 0;
+
+ if (modalBody) {
modalBody.scrollTop = 0;
- } else {
- this._element.scrollTop = 0;
}
- if (transition) {
- Util__default['default'].reflow(this._element);
+ if (isAnimated) {
+ reflow(this._element);
}
- $__default['default'](this._element).addClass(CLASS_NAME_SHOW);
+ this._element.classList.add(CLASS_NAME_SHOW);
if (this._config.focus) {
this._enforceFocus();
}
- var shownEvent = $__default['default'].Event(EVENT_SHOWN, {
- relatedTarget: relatedTarget
- });
-
- var transitionComplete = function transitionComplete() {
- if (_this4._config.focus) {
- _this4._element.focus();
+ const transitionComplete = () => {
+ if (this._config.focus) {
+ this._element.focus();
}
- _this4._isTransitioning = false;
- $__default['default'](_this4._element).trigger(shownEvent);
+ this._isTransitioning = false;
+ EventHandler__default['default'].trigger(this._element, EVENT_SHOWN, {
+ relatedTarget
+ });
};
- if (transition) {
- var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._dialog);
- $__default['default'](this._dialog).one(Util__default['default'].TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
- } else {
- transitionComplete();
- }
- };
+ this._queueCallback(transitionComplete, this._dialog, isAnimated);
+ }
- _proto._enforceFocus = function _enforceFocus() {
- var _this5 = this;
+ _enforceFocus() {
+ EventHandler__default['default'].off(document, EVENT_FOCUSIN); // guard against infinite focus loop
- $__default['default'](document).off(EVENT_FOCUSIN) // Guard against infinite focus loop
- .on(EVENT_FOCUSIN, function (event) {
- if (document !== event.target && _this5._element !== event.target && $__default['default'](_this5._element).has(event.target).length === 0) {
- _this5._element.focus();
+ EventHandler__default['default'].on(document, EVENT_FOCUSIN, event => {
+ if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) {
+ this._element.focus();
}
});
- };
-
- _proto._setEscapeEvent = function _setEscapeEvent() {
- var _this6 = this;
+ }
+ _setEscapeEvent() {
if (this._isShown) {
- $__default['default'](this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
- if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
+ EventHandler__default['default'].on(this._element, EVENT_KEYDOWN_DISMISS, event => {
+ if (this._config.keyboard && event.key === ESCAPE_KEY) {
event.preventDefault();
-
- _this6.hide();
- } else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
- _this6._triggerBackdropTransition();
+ this.hide();
+ } else if (!this._config.keyboard && event.key === ESCAPE_KEY) {
+ this._triggerBackdropTransition();
}
});
- } else if (!this._isShown) {
- $__default['default'](this._element).off(EVENT_KEYDOWN_DISMISS);
+ } else {
+ EventHandler__default['default'].off(this._element, EVENT_KEYDOWN_DISMISS);
}
- };
-
- _proto._setResizeEvent = function _setResizeEvent() {
- var _this7 = this;
+ }
+ _setResizeEvent() {
if (this._isShown) {
- $__default['default'](window).on(EVENT_RESIZE, function (event) {
- return _this7.handleUpdate(event);
- });
+ EventHandler__default['default'].on(window, EVENT_RESIZE, () => this._adjustDialog());
} else {
- $__default['default'](window).off(EVENT_RESIZE);
+ EventHandler__default['default'].off(window, EVENT_RESIZE);
}
- };
-
- _proto._hideModal = function _hideModal() {
- var _this8 = this;
+ }
+ _hideModal() {
this._element.style.display = 'none';
this._element.setAttribute('aria-hidden', true);
@@ -395,222 +674,113 @@
this._isTransitioning = false;
- this._showBackdrop(function () {
- $__default['default'](document.body).removeClass(CLASS_NAME_OPEN);
+ this._backdrop.hide(() => {
+ document.body.classList.remove(CLASS_NAME_OPEN);
- _this8._resetAdjustments();
+ this._resetAdjustments();
- _this8._resetScrollbar();
-
- $__default['default'](_this8._element).trigger(EVENT_HIDDEN);
+ reset();
+ EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN);
});
- };
-
- _proto._removeBackdrop = function _removeBackdrop() {
- if (this._backdrop) {
- $__default['default'](this._backdrop).remove();
- this._backdrop = null;
- }
- };
-
- _proto._showBackdrop = function _showBackdrop(callback) {
- var _this9 = this;
-
- var animate = $__default['default'](this._element).hasClass(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
-
- if (this._isShown && this._config.backdrop) {
- this._backdrop = document.createElement('div');
- this._backdrop.className = CLASS_NAME_BACKDROP;
+ }
- if (animate) {
- this._backdrop.classList.add(animate);
+ _showBackdrop(callback) {
+ EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, event => {
+ if (this._ignoreBackdropClick) {
+ this._ignoreBackdropClick = false;
+ return;
}
- $__default['default'](this._backdrop).appendTo(document.body);
- $__default['default'](this._element).on(EVENT_CLICK_DISMISS, function (event) {
- if (_this9._ignoreBackdropClick) {
- _this9._ignoreBackdropClick = false;
- return;
- }
-
- if (event.target !== event.currentTarget) {
- return;
- }
-
- if (_this9._config.backdrop === 'static') {
- _this9._triggerBackdropTransition();
- } else {
- _this9.hide();
- }
- });
+ if (event.target !== event.currentTarget) {
+ return;
+ }
- if (animate) {
- Util__default['default'].reflow(this._backdrop);
+ if (this._config.backdrop === true) {
+ this.hide();
+ } else if (this._config.backdrop === 'static') {
+ this._triggerBackdropTransition();
}
+ });
- $__default['default'](this._backdrop).addClass(CLASS_NAME_SHOW);
+ this._backdrop.show(callback);
+ }
- if (!callback) {
- return;
- }
+ _isAnimated() {
+ return this._element.classList.contains(CLASS_NAME_FADE);
+ }
- if (!animate) {
- callback();
- return;
- }
+ _triggerBackdropTransition() {
+ const hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE_PREVENTED);
- var backdropTransitionDuration = Util__default['default'].getTransitionDurationFromElement(this._backdrop);
- $__default['default'](this._backdrop).one(Util__default['default'].TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
- } else if (!this._isShown && this._backdrop) {
- $__default['default'](this._backdrop).removeClass(CLASS_NAME_SHOW);
+ if (hideEvent.defaultPrevented) {
+ return;
+ }
- var callbackRemove = function callbackRemove() {
- _this9._removeBackdrop();
+ const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
- if (callback) {
- callback();
- }
- };
+ if (!isModalOverflowing) {
+ this._element.style.overflowY = 'hidden';
+ }
- if ($__default['default'](this._element).hasClass(CLASS_NAME_FADE)) {
- var _backdropTransitionDuration = Util__default['default'].getTransitionDurationFromElement(this._backdrop);
+ this._element.classList.add(CLASS_NAME_STATIC);
- $__default['default'](this._backdrop).one(Util__default['default'].TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
- } else {
- callbackRemove();
+ const modalTransitionDuration = getTransitionDurationFromElement(this._dialog);
+ EventHandler__default['default'].off(this._element, 'transitionend');
+ EventHandler__default['default'].one(this._element, 'transitionend', () => {
+ this._element.classList.remove(CLASS_NAME_STATIC);
+
+ if (!isModalOverflowing) {
+ EventHandler__default['default'].one(this._element, 'transitionend', () => {
+ this._element.style.overflowY = '';
+ });
+ emulateTransitionEnd(this._element, modalTransitionDuration);
}
- } else if (callback) {
- callback();
- }
+ });
+ emulateTransitionEnd(this._element, modalTransitionDuration);
+
+ this._element.focus();
} // ----------------------------------------------------------------------
// the following methods are used to handle overflowing modals
- // todo (fat): these should probably be refactored out of modal.js
// ----------------------------------------------------------------------
- ;
- _proto._adjustDialog = function _adjustDialog() {
- var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
- if (!this._isBodyOverflowing && isModalOverflowing) {
- this._element.style.paddingLeft = this._scrollbarWidth + "px";
+ _adjustDialog() {
+ const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
+ const scrollbarWidth = getWidth();
+ const isBodyOverflowing = scrollbarWidth > 0;
+
+ if (!isBodyOverflowing && isModalOverflowing && !isRTL() || isBodyOverflowing && !isModalOverflowing && isRTL()) {
+ this._element.style.paddingLeft = `${scrollbarWidth}px`;
}
- if (this._isBodyOverflowing && !isModalOverflowing) {
- this._element.style.paddingRight = this._scrollbarWidth + "px";
+ if (isBodyOverflowing && !isModalOverflowing && !isRTL() || !isBodyOverflowing && isModalOverflowing && isRTL()) {
+ this._element.style.paddingRight = `${scrollbarWidth}px`;
}
- };
+ }
- _proto._resetAdjustments = function _resetAdjustments() {
+ _resetAdjustments() {
this._element.style.paddingLeft = '';
this._element.style.paddingRight = '';
- };
-
- _proto._checkScrollbar = function _checkScrollbar() {
- var rect = document.body.getBoundingClientRect();
- this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth;
- this._scrollbarWidth = this._getScrollbarWidth();
- };
-
- _proto._setScrollbar = function _setScrollbar() {
- var _this10 = this;
-
- if (this._isBodyOverflowing) {
- // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
- // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
- var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
- var stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT)); // Adjust fixed content padding
-
- $__default['default'](fixedContent).each(function (index, element) {
- var actualPadding = element.style.paddingRight;
- var calculatedPadding = $__default['default'](element).css('padding-right');
- $__default['default'](element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
- }); // Adjust sticky content margin
-
- $__default['default'](stickyContent).each(function (index, element) {
- var actualMargin = element.style.marginRight;
- var calculatedMargin = $__default['default'](element).css('margin-right');
- $__default['default'](element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
- }); // Adjust body padding
-
- var actualPadding = document.body.style.paddingRight;
- var calculatedPadding = $__default['default'](document.body).css('padding-right');
- $__default['default'](document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
- }
-
- $__default['default'](document.body).addClass(CLASS_NAME_OPEN);
- };
-
- _proto._resetScrollbar = function _resetScrollbar() {
- // Restore fixed content padding
- var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
- $__default['default'](fixedContent).each(function (index, element) {
- var padding = $__default['default'](element).data('padding-right');
- $__default['default'](element).removeData('padding-right');
- element.style.paddingRight = padding ? padding : '';
- }); // Restore sticky content
-
- var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT));
- $__default['default'](elements).each(function (index, element) {
- var margin = $__default['default'](element).data('margin-right');
-
- if (typeof margin !== 'undefined') {
- $__default['default'](element).css('margin-right', margin).removeData('margin-right');
- }
- }); // Restore body padding
-
- var padding = $__default['default'](document.body).data('padding-right');
- $__default['default'](document.body).removeData('padding-right');
- document.body.style.paddingRight = padding ? padding : '';
- };
-
- _proto._getScrollbarWidth = function _getScrollbarWidth() {
- // thx d.walsh
- var scrollDiv = document.createElement('div');
- scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;
- document.body.appendChild(scrollDiv);
- var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
- document.body.removeChild(scrollDiv);
- return scrollbarWidth;
} // Static
- ;
- Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
- return this.each(function () {
- var data = $__default['default'](this).data(DATA_KEY);
- var _config = _extends({}, Default, $__default['default'](this).data(), typeof config === 'object' && config ? config : {});
+ static jQueryInterface(config, relatedTarget) {
+ return this.each(function () {
+ const data = Modal.getInstance(this) || new Modal(this, typeof config === 'object' ? config : {});
- if (!data) {
- data = new Modal(this, _config);
- $__default['default'](this).data(DATA_KEY, data);
+ if (typeof config !== 'string') {
+ return;
}
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new TypeError("No method named \"" + config + "\"");
- }
-
- data[config](relatedTarget);
- } else if (_config.show) {
- data.show(relatedTarget);
+ if (typeof data[config] === 'undefined') {
+ throw new TypeError(`No method named "${config}"`);
}
- });
- };
- _createClass(Modal, null, [{
- key: "VERSION",
- get: function get() {
- return VERSION;
- }
- }, {
- key: "Default",
- get: function get() {
- return Default;
- }
- }]);
+ data[config](relatedTarget);
+ });
+ }
- return Modal;
- }();
+ }
/**
* ------------------------------------------------------------------------
* Data Api implementation
@@ -618,50 +788,36 @@
*/
- $__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
- var _this11 = this;
-
- var target;
- var selector = Util__default['default'].getSelectorFromElement(this);
-
- if (selector) {
- target = document.querySelector(selector);
- }
-
- var config = $__default['default'](target).data(DATA_KEY) ? 'toggle' : _extends({}, $__default['default'](target).data(), $__default['default'](this).data());
+ EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
+ const target = getElementFromSelector(this);
- if (this.tagName === 'A' || this.tagName === 'AREA') {
+ if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault();
}
- var $target = $__default['default'](target).one(EVENT_SHOW, function (showEvent) {
- if (showEvent.isDefaultPrevented()) {
- // Only register focus restorer if modal will actually get shown
+ EventHandler__default['default'].one(target, EVENT_SHOW, showEvent => {
+ if (showEvent.defaultPrevented) {
+ // only register focus restorer if modal will actually get shown
return;
}
- $target.one(EVENT_HIDDEN, function () {
- if ($__default['default'](_this11).is(':visible')) {
- _this11.focus();
+ EventHandler__default['default'].one(target, EVENT_HIDDEN, () => {
+ if (isVisible(this)) {
+ this.focus();
}
});
});
-
- Modal._jQueryInterface.call($__default['default'](target), config, this);
+ const data = Modal.getInstance(target) || new Modal(target);
+ data.toggle(this);
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Modal to jQuery only if jQuery is present
*/
- $__default['default'].fn[NAME] = Modal._jQueryInterface;
- $__default['default'].fn[NAME].Constructor = Modal;
-
- $__default['default'].fn[NAME].noConflict = function () {
- $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
- return Modal._jQueryInterface;
- };
+ defineJQueryPlugin(Modal);
return Modal;
diff --git a/vendor/twbs/bootstrap/js/dist/modal.js.map b/vendor/twbs/bootstrap/js/dist/modal.js.map
index db9bc20cf..b9a6f5260 100644
--- a/vendor/twbs/bootstrap/js/dist/modal.js.map
+++ b/vendor/twbs/bootstrap/js/dist/modal.js.map
@@ -1 +1 @@
-{"version":3,"file":"modal.js","sources":["../src/modal.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.0): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'modal'\nconst VERSION = '4.6.0'\nconst DATA_KEY = 'bs.modal'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key\n\nconst Default = {\n backdrop: true,\n keyboard: true,\n focus: true,\n show: true\n}\n\nconst DefaultType = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n focus: 'boolean',\n show: 'boolean'\n}\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_FOCUSIN = `focusin${EVENT_KEY}`\nconst EVENT_RESIZE = `resize${EVENT_KEY}`\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`\nconst EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}`\nconst EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable'\nconst CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure'\nconst CLASS_NAME_BACKDROP = 'modal-backdrop'\nconst CLASS_NAME_OPEN = 'modal-open'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_STATIC = 'modal-static'\n\nconst SELECTOR_DIALOG = '.modal-dialog'\nconst SELECTOR_MODAL_BODY = '.modal-body'\nconst SELECTOR_DATA_TOGGLE = '[data-toggle=\"modal\"]'\nconst SELECTOR_DATA_DISMISS = '[data-dismiss=\"modal\"]'\nconst SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'\nconst SELECTOR_STICKY_CONTENT = '.sticky-top'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Modal {\n constructor(element, config) {\n this._config = this._getConfig(config)\n this._element = element\n this._dialog = element.querySelector(SELECTOR_DIALOG)\n this._backdrop = null\n this._isShown = false\n this._isBodyOverflowing = false\n this._ignoreBackdropClick = false\n this._isTransitioning = false\n this._scrollbarWidth = 0\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return\n }\n\n if ($(this._element).hasClass(CLASS_NAME_FADE)) {\n this._isTransitioning = true\n }\n\n const showEvent = $.Event(EVENT_SHOW, {\n relatedTarget\n })\n\n $(this._element).trigger(showEvent)\n\n if (this._isShown || showEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = true\n\n this._checkScrollbar()\n this._setScrollbar()\n\n this._adjustDialog()\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(this._element).on(\n EVENT_CLICK_DISMISS,\n SELECTOR_DATA_DISMISS,\n event => this.hide(event)\n )\n\n $(this._dialog).on(EVENT_MOUSEDOWN_DISMISS, () => {\n $(this._element).one(EVENT_MOUSEUP_DISMISS, event => {\n if ($(event.target).is(this._element)) {\n this._ignoreBackdropClick = true\n }\n })\n })\n\n this._showBackdrop(() => this._showElement(relatedTarget))\n }\n\n hide(event) {\n if (event) {\n event.preventDefault()\n }\n\n if (!this._isShown || this._isTransitioning) {\n return\n }\n\n const hideEvent = $.Event(EVENT_HIDE)\n\n $(this._element).trigger(hideEvent)\n\n if (!this._isShown || hideEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = false\n const transition = $(this._element).hasClass(CLASS_NAME_FADE)\n\n if (transition) {\n this._isTransitioning = true\n }\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(document).off(EVENT_FOCUSIN)\n\n $(this._element).removeClass(CLASS_NAME_SHOW)\n\n $(this._element).off(EVENT_CLICK_DISMISS)\n $(this._dialog).off(EVENT_MOUSEDOWN_DISMISS)\n\n if (transition) {\n const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n $(this._element)\n .one(Util.TRANSITION_END, event => this._hideModal(event))\n .emulateTransitionEnd(transitionDuration)\n } else {\n this._hideModal()\n }\n }\n\n dispose() {\n [window, this._element, this._dialog]\n .forEach(htmlElement => $(htmlElement).off(EVENT_KEY))\n\n /**\n * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`\n * Do not move `document` in `htmlElements` array\n * It will remove `EVENT_CLICK_DATA_API` event that should remain\n */\n $(document).off(EVENT_FOCUSIN)\n\n $.removeData(this._element, DATA_KEY)\n\n this._config = null\n this._element = null\n this._dialog = null\n this._backdrop = null\n this._isShown = null\n this._isBodyOverflowing = null\n this._ignoreBackdropClick = null\n this._isTransitioning = null\n this._scrollbarWidth = null\n }\n\n handleUpdate() {\n this._adjustDialog()\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n Util.typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _triggerBackdropTransition() {\n const hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED)\n\n $(this._element).trigger(hideEventPrevented)\n if (hideEventPrevented.isDefaultPrevented()) {\n return\n }\n\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight\n\n if (!isModalOverflowing) {\n this._element.style.overflowY = 'hidden'\n }\n\n this._element.classList.add(CLASS_NAME_STATIC)\n\n const modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog)\n $(this._element).off(Util.TRANSITION_END)\n\n $(this._element).one(Util.TRANSITION_END, () => {\n this._element.classList.remove(CLASS_NAME_STATIC)\n if (!isModalOverflowing) {\n $(this._element).one(Util.TRANSITION_END, () => {\n this._element.style.overflowY = ''\n })\n .emulateTransitionEnd(this._element, modalTransitionDuration)\n }\n })\n .emulateTransitionEnd(modalTransitionDuration)\n this._element.focus()\n }\n\n _showElement(relatedTarget) {\n const transition = $(this._element).hasClass(CLASS_NAME_FADE)\n const modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null\n\n if (!this._element.parentNode ||\n this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n // Don't move modal's DOM position\n document.body.appendChild(this._element)\n }\n\n this._element.style.display = 'block'\n this._element.removeAttribute('aria-hidden')\n this._element.setAttribute('aria-modal', true)\n this._element.setAttribute('role', 'dialog')\n\n if ($(this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {\n modalBody.scrollTop = 0\n } else {\n this._element.scrollTop = 0\n }\n\n if (transition) {\n Util.reflow(this._element)\n }\n\n $(this._element).addClass(CLASS_NAME_SHOW)\n\n if (this._config.focus) {\n this._enforceFocus()\n }\n\n const shownEvent = $.Event(EVENT_SHOWN, {\n relatedTarget\n })\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._element.focus()\n }\n\n this._isTransitioning = false\n $(this._element).trigger(shownEvent)\n }\n\n if (transition) {\n const transitionDuration = Util.getTransitionDurationFromElement(this._dialog)\n\n $(this._dialog)\n .one(Util.TRANSITION_END, transitionComplete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n transitionComplete()\n }\n }\n\n _enforceFocus() {\n $(document)\n .off(EVENT_FOCUSIN) // Guard against infinite focus loop\n .on(EVENT_FOCUSIN, event => {\n if (document !== event.target &&\n this._element !== event.target &&\n $(this._element).has(event.target).length === 0) {\n this._element.focus()\n }\n })\n }\n\n _setEscapeEvent() {\n if (this._isShown) {\n $(this._element).on(EVENT_KEYDOWN_DISMISS, event => {\n if (this._config.keyboard && event.which === ESCAPE_KEYCODE) {\n event.preventDefault()\n this.hide()\n } else if (!this._config.keyboard && event.which === ESCAPE_KEYCODE) {\n this._triggerBackdropTransition()\n }\n })\n } else if (!this._isShown) {\n $(this._element).off(EVENT_KEYDOWN_DISMISS)\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n $(window).on(EVENT_RESIZE, event => this.handleUpdate(event))\n } else {\n $(window).off(EVENT_RESIZE)\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none'\n this._element.setAttribute('aria-hidden', true)\n this._element.removeAttribute('aria-modal')\n this._element.removeAttribute('role')\n this._isTransitioning = false\n this._showBackdrop(() => {\n $(document.body).removeClass(CLASS_NAME_OPEN)\n this._resetAdjustments()\n this._resetScrollbar()\n $(this._element).trigger(EVENT_HIDDEN)\n })\n }\n\n _removeBackdrop() {\n if (this._backdrop) {\n $(this._backdrop).remove()\n this._backdrop = null\n }\n }\n\n _showBackdrop(callback) {\n const animate = $(this._element).hasClass(CLASS_NAME_FADE) ?\n CLASS_NAME_FADE : ''\n\n if (this._isShown && this._config.backdrop) {\n this._backdrop = document.createElement('div')\n this._backdrop.className = CLASS_NAME_BACKDROP\n\n if (animate) {\n this._backdrop.classList.add(animate)\n }\n\n $(this._backdrop).appendTo(document.body)\n\n $(this._element).on(EVENT_CLICK_DISMISS, event => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false\n return\n }\n\n if (event.target !== event.currentTarget) {\n return\n }\n\n if (this._config.backdrop === 'static') {\n this._triggerBackdropTransition()\n } else {\n this.hide()\n }\n })\n\n if (animate) {\n Util.reflow(this._backdrop)\n }\n\n $(this._backdrop).addClass(CLASS_NAME_SHOW)\n\n if (!callback) {\n return\n }\n\n if (!animate) {\n callback()\n return\n }\n\n const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop)\n\n $(this._backdrop)\n .one(Util.TRANSITION_END, callback)\n .emulateTransitionEnd(backdropTransitionDuration)\n } else if (!this._isShown && this._backdrop) {\n $(this._backdrop).removeClass(CLASS_NAME_SHOW)\n\n const callbackRemove = () => {\n this._removeBackdrop()\n if (callback) {\n callback()\n }\n }\n\n if ($(this._element).hasClass(CLASS_NAME_FADE)) {\n const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop)\n\n $(this._backdrop)\n .one(Util.TRANSITION_END, callbackRemove)\n .emulateTransitionEnd(backdropTransitionDuration)\n } else {\n callbackRemove()\n }\n } else if (callback) {\n callback()\n }\n }\n\n // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // todo (fat): these should probably be refactored out of modal.js\n // ----------------------------------------------------------------------\n\n _adjustDialog() {\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight\n\n if (!this._isBodyOverflowing && isModalOverflowing) {\n this._element.style.paddingLeft = `${this._scrollbarWidth}px`\n }\n\n if (this._isBodyOverflowing && !isModalOverflowing) {\n this._element.style.paddingRight = `${this._scrollbarWidth}px`\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = ''\n this._element.style.paddingRight = ''\n }\n\n _checkScrollbar() {\n const rect = document.body.getBoundingClientRect()\n this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth\n this._scrollbarWidth = this._getScrollbarWidth()\n }\n\n _setScrollbar() {\n if (this._isBodyOverflowing) {\n // Note: DOMNode.style.paddingRight returns the actual value or '' if not set\n // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set\n const fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT))\n const stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT))\n\n // Adjust fixed content padding\n $(fixedContent).each((index, element) => {\n const actualPadding = element.style.paddingRight\n const calculatedPadding = $(element).css('padding-right')\n $(element)\n .data('padding-right', actualPadding)\n .css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)\n })\n\n // Adjust sticky content margin\n $(stickyContent).each((index, element) => {\n const actualMargin = element.style.marginRight\n const calculatedMargin = $(element).css('margin-right')\n $(element)\n .data('margin-right', actualMargin)\n .css('margin-right', `${parseFloat(calculatedMargin) - this._scrollbarWidth}px`)\n })\n\n // Adjust body padding\n const actualPadding = document.body.style.paddingRight\n const calculatedPadding = $(document.body).css('padding-right')\n $(document.body)\n .data('padding-right', actualPadding)\n .css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)\n }\n\n $(document.body).addClass(CLASS_NAME_OPEN)\n }\n\n _resetScrollbar() {\n // Restore fixed content padding\n const fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT))\n $(fixedContent).each((index, element) => {\n const padding = $(element).data('padding-right')\n $(element).removeData('padding-right')\n element.style.paddingRight = padding ? padding : ''\n })\n\n // Restore sticky content\n const elements = [].slice.call(document.querySelectorAll(`${SELECTOR_STICKY_CONTENT}`))\n $(elements).each((index, element) => {\n const margin = $(element).data('margin-right')\n if (typeof margin !== 'undefined') {\n $(element).css('margin-right', margin).removeData('margin-right')\n }\n })\n\n // Restore body padding\n const padding = $(document.body).data('padding-right')\n $(document.body).removeData('padding-right')\n document.body.style.paddingRight = padding ? padding : ''\n }\n\n _getScrollbarWidth() { // thx d.walsh\n const scrollDiv = document.createElement('div')\n scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER\n document.body.appendChild(scrollDiv)\n const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth\n document.body.removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n // Static\n\n static _jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = {\n ...Default,\n ...$(this).data(),\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (!data) {\n data = new Modal(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](relatedTarget)\n } else if (_config.show) {\n data.show(relatedTarget)\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n let target\n const selector = Util.getSelectorFromElement(this)\n\n if (selector) {\n target = document.querySelector(selector)\n }\n\n const config = $(target).data(DATA_KEY) ?\n 'toggle' : {\n ...$(target).data(),\n ...$(this).data()\n }\n\n if (this.tagName === 'A' || this.tagName === 'AREA') {\n event.preventDefault()\n }\n\n const $target = $(target).one(EVENT_SHOW, showEvent => {\n if (showEvent.isDefaultPrevented()) {\n // Only register focus restorer if modal will actually get shown\n return\n }\n\n $target.one(EVENT_HIDDEN, () => {\n if ($(this).is(':visible')) {\n this.focus()\n }\n })\n })\n\n Modal._jQueryInterface.call($(target), config, this)\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Modal._jQueryInterface\n$.fn[NAME].Constructor = Modal\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Modal._jQueryInterface\n}\n\nexport default Modal\n"],"names":["NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","$","fn","ESCAPE_KEYCODE","Default","backdrop","keyboard","focus","show","DefaultType","EVENT_HIDE","EVENT_HIDE_PREVENTED","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_FOCUSIN","EVENT_RESIZE","EVENT_CLICK_DISMISS","EVENT_KEYDOWN_DISMISS","EVENT_MOUSEUP_DISMISS","EVENT_MOUSEDOWN_DISMISS","EVENT_CLICK_DATA_API","CLASS_NAME_SCROLLABLE","CLASS_NAME_SCROLLBAR_MEASURER","CLASS_NAME_BACKDROP","CLASS_NAME_OPEN","CLASS_NAME_FADE","CLASS_NAME_SHOW","CLASS_NAME_STATIC","SELECTOR_DIALOG","SELECTOR_MODAL_BODY","SELECTOR_DATA_TOGGLE","SELECTOR_DATA_DISMISS","SELECTOR_FIXED_CONTENT","SELECTOR_STICKY_CONTENT","Modal","element","config","_config","_getConfig","_element","_dialog","querySelector","_backdrop","_isShown","_isBodyOverflowing","_ignoreBackdropClick","_isTransitioning","_scrollbarWidth","toggle","relatedTarget","hide","hasClass","showEvent","Event","trigger","isDefaultPrevented","_checkScrollbar","_setScrollbar","_adjustDialog","_setEscapeEvent","_setResizeEvent","on","event","one","target","is","_showBackdrop","_showElement","preventDefault","hideEvent","transition","document","off","removeClass","transitionDuration","Util","getTransitionDurationFromElement","TRANSITION_END","_hideModal","emulateTransitionEnd","dispose","window","forEach","htmlElement","removeData","handleUpdate","typeCheckConfig","_triggerBackdropTransition","hideEventPrevented","isModalOverflowing","scrollHeight","documentElement","clientHeight","style","overflowY","classList","add","modalTransitionDuration","remove","modalBody","parentNode","nodeType","Node","ELEMENT_NODE","body","appendChild","display","removeAttribute","setAttribute","scrollTop","reflow","addClass","_enforceFocus","shownEvent","transitionComplete","has","length","which","_resetAdjustments","_resetScrollbar","_removeBackdrop","callback","animate","createElement","className","appendTo","currentTarget","backdropTransitionDuration","callbackRemove","paddingLeft","paddingRight","rect","getBoundingClientRect","Math","round","left","right","innerWidth","_getScrollbarWidth","fixedContent","slice","call","querySelectorAll","stickyContent","each","index","actualPadding","calculatedPadding","css","data","parseFloat","actualMargin","marginRight","calculatedMargin","padding","elements","margin","scrollDiv","scrollbarWidth","width","clientWidth","removeChild","_jQueryInterface","TypeError","selector","getSelectorFromElement","tagName","$target","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUA;EACA;EACA;EACA;EACA;;EAEA,IAAMA,IAAI,GAAG,OAAb;EACA,IAAMC,OAAO,GAAG,OAAhB;EACA,IAAMC,QAAQ,GAAG,UAAjB;EACA,IAAMC,SAAS,SAAOD,QAAtB;EACA,IAAME,YAAY,GAAG,WAArB;EACA,IAAMC,kBAAkB,GAAGC,qBAAC,CAACC,EAAF,CAAKP,IAAL,CAA3B;EACA,IAAMQ,cAAc,GAAG,EAAvB;;EAEA,IAAMC,OAAO,GAAG;EACdC,EAAAA,QAAQ,EAAE,IADI;EAEdC,EAAAA,QAAQ,EAAE,IAFI;EAGdC,EAAAA,KAAK,EAAE,IAHO;EAIdC,EAAAA,IAAI,EAAE;EAJQ,CAAhB;EAOA,IAAMC,WAAW,GAAG;EAClBJ,EAAAA,QAAQ,EAAE,kBADQ;EAElBC,EAAAA,QAAQ,EAAE,SAFQ;EAGlBC,EAAAA,KAAK,EAAE,SAHW;EAIlBC,EAAAA,IAAI,EAAE;EAJY,CAApB;EAOA,IAAME,UAAU,YAAUZ,SAA1B;EACA,IAAMa,oBAAoB,qBAAmBb,SAA7C;EACA,IAAMc,YAAY,cAAYd,SAA9B;EACA,IAAMe,UAAU,YAAUf,SAA1B;EACA,IAAMgB,WAAW,aAAWhB,SAA5B;EACA,IAAMiB,aAAa,eAAajB,SAAhC;EACA,IAAMkB,YAAY,cAAYlB,SAA9B;EAC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AO,CAACxG,GAAR,CAAYpD,YAAZ,EAA0B,YAAM;EAC9B,UAAIX,qBAAC,CAAC,OAAD,CAAD,CAAQiE,EAAR,CAAW,UAAX,CAAJ,EAA4B;EAC1B,QAAA,OAAI,CAAC3D,KAAL;EACD;EACF,KAJD;EAKD,GAXe,CAAhB;;EAaA4B,EAAAA,KAAK,CAACgI,gBAAN,CAAuBrB,IAAvB,CAA4B7I,qBAAC,CAACgE,MAAD,CAA7B,EAAuC5B,MAAvC,EAA+C,IAA/C;EACD,CAhCD;EAkCA;EACA;EACA;EACA;EACA;;AAEApC,uBAAC,CAACC,EAAF,CAAKP,IAAL,IAAawC,KAAK,CAACgI,gBAAnB;AACAlK,uBAAC,CAACC,EAAF,CAAKP,IAAL,EAAW8K,WAAX,GAAyBtI,KAAzB;;AACAlC,uBAAC,CAACC,EAAF,CAAKP,IAAL,EAAW+K,UAAX,GAAwB,YAAM;EAC5BzK,EAAAA,qBAAC,CAACC,EAAF,CAAKP,IAAL,IAAaK,kBAAb;EACA,SAAOmC,KAAK,CAACgI,gBAAb;EACD,CAHD;;;;;;;;"} \ No newline at end of file
+{"version":3,"file":"modal.js","sources":["../src/util/index.js","../src/util/scrollbar.js","../src/util/backdrop.js","../src/modal.js"],"sourcesContent":["import SelectorEngine from '../dom/selector-engine'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = `#${hrefAttr.split('#')[1]}`\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => {\n if (!obj || typeof obj !== 'object') {\n return false\n }\n\n if (typeof obj.jquery !== 'undefined') {\n obj = obj[0]\n }\n\n return typeof obj.nodeType !== 'undefined'\n}\n\nconst getElement = obj => {\n if (isElement(obj)) { // it's a jQuery object or a node element\n return obj.jquery ? obj[0] : obj\n }\n\n if (typeof obj === 'string' && obj.length > 0) {\n return SelectorEngine.findOne(obj)\n }\n\n return null\n}\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = callback => {\n if (typeof callback === 'function') {\n callback()\n }\n}\n\nexport {\n getElement,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n isDisabled,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin,\n execute\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): util/scrollBar.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport SelectorEngine from '../dom/selector-engine'\nimport Manipulator from '../dom/manipulator'\n\nconst SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'\nconst SELECTOR_STICKY_CONTENT = '.sticky-top'\n\nconst getWidth = () => {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = document.documentElement.clientWidth\n return Math.abs(window.innerWidth - documentWidth)\n}\n\nconst hide = (width = getWidth()) => {\n _disableOverFlow()\n // give padding to element to balances the hidden scrollbar width\n _setElementAttributes('body', 'paddingRight', calculatedValue => calculatedValue + width)\n // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements, to keep shown fullwidth\n _setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width)\n _setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width)\n}\n\nconst _disableOverFlow = () => {\n const actualValue = document.body.style.overflow\n if (actualValue) {\n Manipulator.setDataAttribute(document.body, 'overflow', actualValue)\n }\n\n document.body.style.overflow = 'hidden'\n}\n\nconst _setElementAttributes = (selector, styleProp, callback) => {\n const scrollbarWidth = getWidth()\n SelectorEngine.find(selector)\n .forEach(element => {\n if (element !== document.body && window.innerWidth > element.clientWidth + scrollbarWidth) {\n return\n }\n\n const actualValue = element.style[styleProp]\n const calculatedValue = window.getComputedStyle(element)[styleProp]\n Manipulator.setDataAttribute(element, styleProp, actualValue)\n element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`\n })\n}\n\nconst reset = () => {\n _resetElementAttributes('body', 'overflow')\n _resetElementAttributes('body', 'paddingRight')\n _resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight')\n _resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight')\n}\n\nconst _resetElementAttributes = (selector, styleProp) => {\n SelectorEngine.find(selector).forEach(element => {\n const value = Manipulator.getDataAttribute(element, styleProp)\n if (typeof value === 'undefined') {\n element.style.removeProperty(styleProp)\n } else {\n Manipulator.removeDataAttribute(element, styleProp)\n element.style[styleProp] = value\n }\n })\n}\n\nconst isBodyOverflowing = () => {\n return getWidth() > 0\n}\n\nexport {\n getWidth,\n hide,\n isBodyOverflowing,\n reset\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): util/backdrop.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler'\nimport { emulateTransitionEnd, execute, getTransitionDurationFromElement, reflow, typeCheckConfig } from './index'\n\nconst Default = {\n isVisible: true, // if false, we use the backdrop helper without adding any element to the dom\n isAnimated: false,\n rootElement: document.body, // give the choice to place backdrop under different elements\n clickCallback: null\n}\n\nconst DefaultType = {\n isVisible: 'boolean',\n isAnimated: 'boolean',\n rootElement: 'element',\n clickCallback: '(function|null)'\n}\nconst NAME = 'backdrop'\nconst CLASS_NAME_BACKDROP = 'modal-backdrop'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst EVENT_MOUSEDOWN = `mousedown.bs.${NAME}`\n\nclass Backdrop {\n constructor(config) {\n this._config = this._getConfig(config)\n this._isAppended = false\n this._element = null\n }\n\n show(callback) {\n if (!this._config.isVisible) {\n execute(callback)\n return\n }\n\n this._append()\n\n if (this._config.isAnimated) {\n reflow(this._getElement())\n }\n\n this._getElement().classList.add(CLASS_NAME_SHOW)\n\n this._emulateAnimation(() => {\n execute(callback)\n })\n }\n\n hide(callback) {\n if (!this._config.isVisible) {\n execute(callback)\n return\n }\n\n this._getElement().classList.remove(CLASS_NAME_SHOW)\n\n this._emulateAnimation(() => {\n this.dispose()\n execute(callback)\n })\n }\n\n // Private\n\n _getElement() {\n if (!this._element) {\n const backdrop = document.createElement('div')\n backdrop.className = CLASS_NAME_BACKDROP\n if (this._config.isAnimated) {\n backdrop.classList.add(CLASS_NAME_FADE)\n }\n\n this._element = backdrop\n }\n\n return this._element\n }\n\n _getConfig(config) {\n config = {\n ...Default,\n ...(typeof config === 'object' ? config : {})\n }\n\n config.rootElement = config.rootElement || document.body\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _append() {\n if (this._isAppended) {\n return\n }\n\n this._config.rootElement.appendChild(this._getElement())\n\n EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => {\n execute(this._config.clickCallback)\n })\n\n this._isAppended = true\n }\n\n dispose() {\n if (!this._isAppended) {\n return\n }\n\n EventHandler.off(this._element, EVENT_MOUSEDOWN)\n\n this._getElement().parentNode.removeChild(this._element)\n this._isAppended = false\n }\n\n _emulateAnimation(callback) {\n if (!this._config.isAnimated) {\n execute(callback)\n return\n }\n\n const backdropTransitionDuration = getTransitionDurationFromElement(this._getElement())\n EventHandler.one(this._getElement(), 'transitionend', () => execute(callback))\n emulateTransitionEnd(this._getElement(), backdropTransitionDuration)\n }\n}\n\nexport default Backdrop\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n emulateTransitionEnd,\n getElementFromSelector,\n getTransitionDurationFromElement,\n isRTL,\n isVisible,\n reflow,\n typeCheckConfig\n} from './util/index'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport { getWidth as getScrollBarWidth, hide as scrollBarHide, reset as scrollBarReset } from './util/scrollbar'\nimport BaseComponent from './base-component'\nimport Backdrop from './util/backdrop'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'modal'\nconst DATA_KEY = 'bs.modal'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst ESCAPE_KEY = 'Escape'\n\nconst Default = {\n backdrop: true,\n keyboard: true,\n focus: true\n}\n\nconst DefaultType = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n focus: 'boolean'\n}\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_FOCUSIN = `focusin${EVENT_KEY}`\nconst EVENT_RESIZE = `resize${EVENT_KEY}`\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`\nconst EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}`\nconst EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_OPEN = 'modal-open'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_STATIC = 'modal-static'\n\nconst SELECTOR_DIALOG = '.modal-dialog'\nconst SELECTOR_MODAL_BODY = '.modal-body'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"modal\"]'\nconst SELECTOR_DATA_DISMISS = '[data-bs-dismiss=\"modal\"]'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Modal extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._config = this._getConfig(config)\n this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element)\n this._backdrop = this._initializeBackDrop()\n this._isShown = false\n this._ignoreBackdropClick = false\n this._isTransitioning = false\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return\n }\n\n if (this._isAnimated()) {\n this._isTransitioning = true\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {\n relatedTarget\n })\n\n if (this._isShown || showEvent.defaultPrevented) {\n return\n }\n\n this._isShown = true\n\n scrollBarHide()\n\n document.body.classList.add(CLASS_NAME_OPEN)\n\n this._adjustDialog()\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, event => this.hide(event))\n\n EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {\n EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {\n if (event.target === this._element) {\n this._ignoreBackdropClick = true\n }\n })\n })\n\n this._showBackdrop(() => this._showElement(relatedTarget))\n }\n\n hide(event) {\n if (event) {\n event.preventDefault()\n }\n\n if (!this._isShown || this._isTransitioning) {\n return\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n if (hideEvent.defaultPrevented) {\n return\n }\n\n this._isShown = false\n const isAnimated = this._isAnimated()\n\n if (isAnimated) {\n this._isTransitioning = true\n }\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n EventHandler.off(document, EVENT_FOCUSIN)\n\n this._element.classList.remove(CLASS_NAME_SHOW)\n\n EventHandler.off(this._element, EVENT_CLICK_DISMISS)\n EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS)\n\n this._queueCallback(() => this._hideModal(), this._element, isAnimated)\n }\n\n dispose() {\n [window, this._dialog]\n .forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY))\n\n this._backdrop.dispose()\n super.dispose()\n\n /**\n * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`\n * Do not move `document` in `htmlElements` array\n * It will remove `EVENT_CLICK_DATA_API` event that should remain\n */\n EventHandler.off(document, EVENT_FOCUSIN)\n }\n\n handleUpdate() {\n this._adjustDialog()\n }\n\n // Private\n\n _initializeBackDrop() {\n return new Backdrop({\n isVisible: Boolean(this._config.backdrop), // 'static' option will be translated to true, and booleans will keep their value\n isAnimated: this._isAnimated()\n })\n }\n\n _getConfig(config) {\n config = {\n ...Default,\n ...Manipulator.getDataAttributes(this._element),\n ...config\n }\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _showElement(relatedTarget) {\n const isAnimated = this._isAnimated()\n const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog)\n\n if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n // Don't move modal's DOM position\n document.body.appendChild(this._element)\n }\n\n this._element.style.display = 'block'\n this._element.removeAttribute('aria-hidden')\n this._element.setAttribute('aria-modal', true)\n this._element.setAttribute('role', 'dialog')\n this._element.scrollTop = 0\n\n if (modalBody) {\n modalBody.scrollTop = 0\n }\n\n if (isAnimated) {\n reflow(this._element)\n }\n\n this._element.classList.add(CLASS_NAME_SHOW)\n\n if (this._config.focus) {\n this._enforceFocus()\n }\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._element.focus()\n }\n\n this._isTransitioning = false\n EventHandler.trigger(this._element, EVENT_SHOWN, {\n relatedTarget\n })\n }\n\n this._queueCallback(transitionComplete, this._dialog, isAnimated)\n }\n\n _enforceFocus() {\n EventHandler.off(document, EVENT_FOCUSIN) // guard against infinite focus loop\n EventHandler.on(document, EVENT_FOCUSIN, event => {\n if (document !== event.target &&\n this._element !== event.target &&\n !this._element.contains(event.target)) {\n this._element.focus()\n }\n })\n }\n\n _setEscapeEvent() {\n if (this._isShown) {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (this._config.keyboard && event.key === ESCAPE_KEY) {\n event.preventDefault()\n this.hide()\n } else if (!this._config.keyboard && event.key === ESCAPE_KEY) {\n this._triggerBackdropTransition()\n }\n })\n } else {\n EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS)\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n EventHandler.on(window, EVENT_RESIZE, () => this._adjustDialog())\n } else {\n EventHandler.off(window, EVENT_RESIZE)\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none'\n this._element.setAttribute('aria-hidden', true)\n this._element.removeAttribute('aria-modal')\n this._element.removeAttribute('role')\n this._isTransitioning = false\n this._backdrop.hide(() => {\n document.body.classList.remove(CLASS_NAME_OPEN)\n this._resetAdjustments()\n scrollBarReset()\n EventHandler.trigger(this._element, EVENT_HIDDEN)\n })\n }\n\n _showBackdrop(callback) {\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false\n return\n }\n\n if (event.target !== event.currentTarget) {\n return\n }\n\n if (this._config.backdrop === true) {\n this.hide()\n } else if (this._config.backdrop === 'static') {\n this._triggerBackdropTransition()\n }\n })\n\n this._backdrop.show(callback)\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_FADE)\n }\n\n _triggerBackdropTransition() {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)\n if (hideEvent.defaultPrevented) {\n return\n }\n\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight\n\n if (!isModalOverflowing) {\n this._element.style.overflowY = 'hidden'\n }\n\n this._element.classList.add(CLASS_NAME_STATIC)\n const modalTransitionDuration = getTransitionDurationFromElement(this._dialog)\n EventHandler.off(this._element, 'transitionend')\n EventHandler.one(this._element, 'transitionend', () => {\n this._element.classList.remove(CLASS_NAME_STATIC)\n if (!isModalOverflowing) {\n EventHandler.one(this._element, 'transitionend', () => {\n this._element.style.overflowY = ''\n })\n emulateTransitionEnd(this._element, modalTransitionDuration)\n }\n })\n emulateTransitionEnd(this._element, modalTransitionDuration)\n this._element.focus()\n }\n\n // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // ----------------------------------------------------------------------\n\n _adjustDialog() {\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight\n const scrollbarWidth = getScrollBarWidth()\n const isBodyOverflowing = scrollbarWidth > 0\n\n if ((!isBodyOverflowing && isModalOverflowing && !isRTL()) || (isBodyOverflowing && !isModalOverflowing && isRTL())) {\n this._element.style.paddingLeft = `${scrollbarWidth}px`\n }\n\n if ((isBodyOverflowing && !isModalOverflowing && !isRTL()) || (!isBodyOverflowing && isModalOverflowing && isRTL())) {\n this._element.style.paddingRight = `${scrollbarWidth}px`\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = ''\n this._element.style.paddingRight = ''\n }\n\n // Static\n\n static jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n const data = Modal.getInstance(this) || new Modal(this, typeof config === 'object' ? config : {})\n\n if (typeof config !== 'string') {\n return\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](relatedTarget)\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n const target = getElementFromSelector(this)\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault()\n }\n\n EventHandler.one(target, EVENT_SHOW, showEvent => {\n if (showEvent.defaultPrevented) {\n // only register focus restorer if modal will actually get shown\n return\n }\n\n EventHandler.one(target, EVENT_HIDDEN, () => {\n if (isVisible(this)) {\n this.focus()\n }\n })\n })\n\n const data = Modal.getInstance(target) || new Modal(target)\n\n data.toggle(this)\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Modal to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Modal)\n\nexport default Modal\n"],"names":["MILLISECONDS_MULTIPLIER","TRANSITION_END","toType","obj","undefined","toString","call","match","toLowerCase","getSelector","element","selector","getAttribute","hrefAttr","includes","startsWith","split","trim","getElementFromSelector","document","querySelector","getTransitionDurationFromElement","transitionDuration","transitionDelay","window","getComputedStyle","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","triggerTransitionEnd","dispatchEvent","Event","isElement","jquery","nodeType","emulateTransitionEnd","duration","called","durationPadding","emulatedDuration","listener","removeEventListener","addEventListener","setTimeout","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","TypeError","toUpperCase","isVisible","style","parentNode","elementStyle","parentNodeStyle","display","visibility","reflow","offsetHeight","getjQuery","jQuery","body","hasAttribute","onDOMContentLoaded","callback","readyState","isRTL","documentElement","dir","defineJQueryPlugin","plugin","$","name","NAME","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","execute","SELECTOR_FIXED_CONTENT","SELECTOR_STICKY_CONTENT","getWidth","documentWidth","clientWidth","Math","abs","innerWidth","hide","width","_disableOverFlow","_setElementAttributes","calculatedValue","actualValue","overflow","Manipulator","setDataAttribute","styleProp","scrollbarWidth","SelectorEngine","find","reset","_resetElementAttributes","getDataAttribute","removeProperty","removeDataAttribute","Default","isAnimated","rootElement","clickCallback","DefaultType","CLASS_NAME_BACKDROP","CLASS_NAME_FADE","CLASS_NAME_SHOW","EVENT_MOUSEDOWN","Backdrop","constructor","_config","_getConfig","_isAppended","_element","show","_append","_getElement","classList","add","_emulateAnimation","remove","dispose","backdrop","createElement","className","appendChild","EventHandler","on","off","removeChild","backdropTransitionDuration","one","DATA_KEY","EVENT_KEY","DATA_API_KEY","ESCAPE_KEY","keyboard","focus","EVENT_HIDE","EVENT_HIDE_PREVENTED","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_FOCUSIN","EVENT_RESIZE","EVENT_CLICK_DISMISS","EVENT_KEYDOWN_DISMISS","EVENT_MOUSEUP_DISMISS","EVENT_MOUSEDOWN_DISMISS","EVENT_CLICK_DATA_API","CLASS_NAME_OPEN","CLASS_NAME_STATIC","SELECTOR_DIALOG","SELECTOR_MODAL_BODY","SELECTOR_DATA_TOGGLE","SELECTOR_DATA_DISMISS","Modal","BaseComponent","_dialog","findOne","_backdrop","_initializeBackDrop","_isShown","_ignoreBackdropClick","_isTransitioning","toggle","relatedTarget","_isAnimated","showEvent","trigger","defaultPrevented","scrollBarHide","_adjustDialog","_setEscapeEvent","_setResizeEvent","event","target","_showBackdrop","_showElement","preventDefault","hideEvent","_queueCallback","_hideModal","htmlElement","handleUpdate","Boolean","getDataAttributes","modalBody","Node","ELEMENT_NODE","removeAttribute","setAttribute","scrollTop","_enforceFocus","transitionComplete","contains","key","_triggerBackdropTransition","_resetAdjustments","scrollBarReset","currentTarget","isModalOverflowing","scrollHeight","clientHeight","overflowY","modalTransitionDuration","getScrollBarWidth","isBodyOverflowing","paddingLeft","paddingRight","each","data","getInstance","tagName"],"mappings":";;;;;;;;;;;;;;;;;;EAUA,MAAMA,uBAAuB,GAAG,IAAhC;EACA,MAAMC,cAAc,GAAG,eAAvB;;EAGA,MAAMC,MAAM,GAAGC,GAAG,IAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,WAAQ,GAAED,GAAI,EAAd;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC,WAA9C,EAAP;EACD,CAND;;EAsBA,MAAMC,WAAW,GAAGC,OAAO,IAAI;EAC7B,MAAIC,QAAQ,GAAGD,OAAO,CAACE,YAAR,CAAqB,gBAArB,CAAf;;EAEA,MAAI,CAACD,QAAD,IAAaA,QAAQ,KAAK,GAA9B,EAAmC;EACjC,QAAIE,QAAQ,GAAGH,OAAO,CAACE,YAAR,CAAqB,MAArB,CAAf,CADiC;EAIjC;EACA;EACA;;EACA,QAAI,CAACC,QAAD,IAAc,CAACA,QAAQ,CAACC,QAAT,CAAkB,GAAlB,CAAD,IAA2B,CAACD,QAAQ,CAACE,UAAT,CAAoB,GAApB,CAA9C,EAAyE;EACvE,aAAO,IAAP;EACD,KATgC;;;EAYjC,QAAIF,QAAQ,CAACC,QAAT,CAAkB,GAAlB,KAA0B,CAACD,QAAQ,CAACE,UAAT,CAAoB,GAApB,CAA/B,EAAyD;EACvDF,MAAAA,QAAQ,GAAI,IAAGA,QAAQ,CAACG,KAAT,CAAe,GAAf,EAAoB,CAApB,CAAuB,EAAtC;EACD;;EAEDL,IAAAA,QAAQ,GAAGE,QAAQ,IAAIA,QAAQ,KAAK,GAAz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6C,MAAjB,EAAyBpC,YAAzB,EAAuC,MAAM;EAC3C,UAAIjG,SAAS,CAAC,IAAD,CAAb,EAAqB;EACnB,aAAK8F,KAAL;EACD;EACF,KAJD;EAKD,GAXD;EAaA,QAAM0E,IAAI,GAAGvD,KAAK,CAACwD,WAAN,CAAkBpC,MAAlB,KAA6B,IAAIpB,KAAJ,CAAUoB,MAAV,CAA1C;EAEAmC,EAAAA,IAAI,CAAC9C,MAAL,CAAY,IAAZ;EACD,CAvBD;EAyBA;EACA;EACA;EACA;EACA;EACA;;EAEAvG,kBAAkB,CAAC8F,KAAD,CAAlB;;;;;;;;"} \ No newline at end of file
diff --git a/vendor/twbs/bootstrap/js/dist/popover.js b/vendor/twbs/bootstrap/js/dist/popover.js
index 04cc5df73..3524c31a2 100644
--- a/vendor/twbs/bootstrap/js/dist/popover.js
+++ b/vendor/twbs/bootstrap/js/dist/popover.js
@@ -1,164 +1,170 @@
/*!
- * Bootstrap popover.js v4.6.0 (https://getbootstrap.com/)
+ * Bootstrap popover.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./tooltip.js')) :
- typeof define === 'function' && define.amd ? define(['jquery', './tooltip'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.jQuery, global.Tooltip));
-}(this, (function ($, Tooltip) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./tooltip.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './tooltip'], factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.SelectorEngine, global.Data, global.Tooltip));
+}(this, (function (SelectorEngine, Data, Tooltip) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
+ var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
+ var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
var Tooltip__default = /*#__PURE__*/_interopDefaultLegacy(Tooltip);
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
+ const getjQuery = () => {
+ const {
+ jQuery
+ } = window;
+
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
+ return jQuery;
}
- }
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
- }
+ return null;
+ };
- function _extends() {
- _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
+ const onDOMContentLoaded = callback => {
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', callback);
+ } else {
+ callback();
+ }
+ };
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
+ const defineJQueryPlugin = plugin => {
+ onDOMContentLoaded(() => {
+ const $ = getjQuery();
+ /* istanbul ignore if */
+
+ if ($) {
+ const name = plugin.NAME;
+ const JQUERY_NO_CONFLICT = $.fn[name];
+ $.fn[name] = plugin.jQueryInterface;
+ $.fn[name].Constructor = plugin;
+
+ $.fn[name].noConflict = () => {
+ $.fn[name] = JQUERY_NO_CONFLICT;
+ return plugin.jQueryInterface;
+ };
}
+ });
+ };
- return target;
- };
-
- return _extends.apply(this, arguments);
- }
-
- function _inheritsLoose(subClass, superClass) {
- subClass.prototype = Object.create(superClass.prototype);
- subClass.prototype.constructor = subClass;
- subClass.__proto__ = superClass;
- }
-
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.1): popover.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
- var NAME = 'popover';
- var VERSION = '4.6.0';
- var DATA_KEY = 'bs.popover';
- var EVENT_KEY = "." + DATA_KEY;
- var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
- var CLASS_PREFIX = 'bs-popover';
- var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
-
- var Default = _extends({}, Tooltip__default['default'].Default, {
+ const NAME = 'popover';
+ const DATA_KEY = 'bs.popover';
+ const EVENT_KEY = `.${DATA_KEY}`;
+ const CLASS_PREFIX = 'bs-popover';
+ const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
+ const Default = { ...Tooltip__default['default'].Default,
placement: 'right',
+ offset: [0, 8],
trigger: 'click',
content: '',
- template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
- });
-
- var DefaultType = _extends({}, Tooltip__default['default'].DefaultType, {
+ template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
+ };
+ const DefaultType = { ...Tooltip__default['default'].DefaultType,
content: '(string|element|function)'
- });
-
- var CLASS_NAME_FADE = 'fade';
- var CLASS_NAME_SHOW = 'show';
- var SELECTOR_TITLE = '.popover-header';
- var SELECTOR_CONTENT = '.popover-body';
- var Event = {
- HIDE: "hide" + EVENT_KEY,
- HIDDEN: "hidden" + EVENT_KEY,
- SHOW: "show" + EVENT_KEY,
- SHOWN: "shown" + EVENT_KEY,
- INSERTED: "inserted" + EVENT_KEY,
- CLICK: "click" + EVENT_KEY,
- FOCUSIN: "focusin" + EVENT_KEY,
- FOCUSOUT: "focusout" + EVENT_KEY,
- MOUSEENTER: "mouseenter" + EVENT_KEY,
- MOUSELEAVE: "mouseleave" + EVENT_KEY
};
+ const Event = {
+ HIDE: `hide${EVENT_KEY}`,
+ HIDDEN: `hidden${EVENT_KEY}`,
+ SHOW: `show${EVENT_KEY}`,
+ SHOWN: `shown${EVENT_KEY}`,
+ INSERTED: `inserted${EVENT_KEY}`,
+ CLICK: `click${EVENT_KEY}`,
+ FOCUSIN: `focusin${EVENT_KEY}`,
+ FOCUSOUT: `focusout${EVENT_KEY}`,
+ MOUSEENTER: `mouseenter${EVENT_KEY}`,
+ MOUSELEAVE: `mouseleave${EVENT_KEY}`
+ };
+ const CLASS_NAME_FADE = 'fade';
+ const CLASS_NAME_SHOW = 'show';
+ const SELECTOR_TITLE = '.popover-header';
+ const SELECTOR_CONTENT = '.popover-body';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
- var Popover = /*#__PURE__*/function (_Tooltip) {
- _inheritsLoose(Popover, _Tooltip);
+ class Popover extends Tooltip__default['default'] {
+ // Getters
+ static get Default() {
+ return Default;
+ }
- function Popover() {
- return _Tooltip.apply(this, arguments) || this;
+ static get NAME() {
+ return NAME;
}
- var _proto = Popover.prototype;
+ static get Event() {
+ return Event;
+ }
- // Overrides
- _proto.isWithContent = function isWithContent() {
- return this.getTitle() || this._getContent();
- };
+ static get DefaultType() {
+ return DefaultType;
+ } // Overrides
- _proto.addAttachmentClass = function addAttachmentClass(attachment) {
- $__default['default'](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
- };
- _proto.getTipElement = function getTipElement() {
- this.tip = this.tip || $__default['default'](this.config.template)[0];
- return this.tip;
- };
+ isWithContent() {
+ return this.getTitle() || this._getContent();
+ }
- _proto.setContent = function setContent() {
- var $tip = $__default['default'](this.getTipElement()); // We use append for html objects to maintain js events
+ setContent() {
+ const tip = this.getTipElement(); // we use append for html objects to maintain js events
- this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
+ this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_TITLE, tip), this.getTitle());
- var content = this._getContent();
+ let content = this._getContent();
if (typeof content === 'function') {
- content = content.call(this.element);
+ content = content.call(this._element);
}
- this.setElementContent($tip.find(SELECTOR_CONTENT), content);
- $tip.removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
+ this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_CONTENT, tip), content);
+ tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
} // Private
- ;
- _proto._getContent = function _getContent() {
- return this.element.getAttribute('data-content') || this.config.content;
- };
- _proto._cleanTipClass = function _cleanTipClass() {
- var $tip = $__default['default'](this.getTipElement());
- var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
+ _addAttachmentClass(attachment) {
+ this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
+ }
+
+ _getContent() {
+ return this._element.getAttribute('data-bs-content') || this._config.content;
+ }
+
+ _cleanTipClass() {
+ const tip = this.getTipElement();
+ const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length > 0) {
- $tip.removeClass(tabClass.join(''));
+ tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
}
} // Static
- ;
- Popover._jQueryInterface = function _jQueryInterface(config) {
+
+ static jQueryInterface(config) {
return this.each(function () {
- var data = $__default['default'](this).data(DATA_KEY);
+ let data = Data__default['default'].get(this, DATA_KEY);
- var _config = typeof config === 'object' ? config : null;
+ const _config = typeof config === 'object' ? config : null;
if (!data && /dispose|hide/.test(config)) {
return;
@@ -166,73 +172,29 @@
if (!data) {
data = new Popover(this, _config);
- $__default['default'](this).data(DATA_KEY, data);
+ Data__default['default'].set(this, DATA_KEY, data);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
- throw new TypeError("No method named \"" + config + "\"");
+ throw new TypeError(`No method named "${config}"`);
}
data[config]();
}
});
- };
-
- _createClass(Popover, null, [{
- key: "VERSION",
- // Getters
- get: function get() {
- return VERSION;
- }
- }, {
- key: "Default",
- get: function get() {
- return Default;
- }
- }, {
- key: "NAME",
- get: function get() {
- return NAME;
- }
- }, {
- key: "DATA_KEY",
- get: function get() {
- return DATA_KEY;
- }
- }, {
- key: "Event",
- get: function get() {
- return Event;
- }
- }, {
- key: "EVENT_KEY",
- get: function get() {
- return EVENT_KEY;
- }
- }, {
- key: "DefaultType",
- get: function get() {
- return DefaultType;
- }
- }]);
+ }
- return Popover;
- }(Tooltip__default['default']);
+ }
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Popover to jQuery only if jQuery is present
*/
- $__default['default'].fn[NAME] = Popover._jQueryInterface;
- $__default['default'].fn[NAME].Constructor = Popover;
-
- $__default['default'].fn[NAME].noConflict = function () {
- $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
- return Popover._jQueryInterface;
- };
+ defineJQueryPlugin(Popover);
return Popover;
diff --git a/vendor/twbs/bootstrap/js/dist/popover.js.map b/vendor/twbs/bootstrap/js/dist/popover.js.map
index b976d52ed..a2d5a36a6 100644
--- a/vendor/twbs/bootstrap/js/dist/popover.js.map
+++ b/vendor/twbs/bootstrap/js/dist/popover.js.map
@@ -1 +1 @@
-{"version":3,"file":"popover.js","sources":["../src/popover.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.0): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Tooltip from './tooltip'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'popover'\nconst VERSION = '4.6.0'\nconst DATA_KEY = 'bs.popover'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst CLASS_PREFIX = 'bs-popover'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\n\nconst Default = {\n ...Tooltip.Default,\n placement: 'right',\n trigger: 'click',\n content: '',\n template: '<div class=\"popover\" role=\"tooltip\">' +\n '<div class=\"arrow\"></div>' +\n '<h3 class=\"popover-header\"></h3>' +\n '<div class=\"popover-body\"></div></div>'\n}\n\nconst DefaultType = {\n ...Tooltip.DefaultType,\n content: '(string|element|function)'\n}\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_TITLE = '.popover-header'\nconst SELECTOR_CONTENT = '.popover-body'\n\nconst Event = {\n HIDE: `hide${EVENT_KEY}`,\n HIDDEN: `hidden${EVENT_KEY}`,\n SHOW: `show${EVENT_KEY}`,\n SHOWN: `shown${EVENT_KEY}`,\n INSERTED: `inserted${EVENT_KEY}`,\n CLICK: `click${EVENT_KEY}`,\n FOCUSIN: `focusin${EVENT_KEY}`,\n FOCUSOUT: `focusout${EVENT_KEY}`,\n MOUSEENTER: `mouseenter${EVENT_KEY}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY}`\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Popover extends Tooltip {\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Overrides\n\n isWithContent() {\n return this.getTitle() || this._getContent()\n }\n\n addAttachmentClass(attachment) {\n $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)\n }\n\n getTipElement() {\n this.tip = this.tip || $(this.config.template)[0]\n return this.tip\n }\n\n setContent() {\n const $tip = $(this.getTipElement())\n\n // We use append for html objects to maintain js events\n this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle())\n let content = this._getContent()\n if (typeof content === 'function') {\n content = content.call(this.element)\n }\n\n this.setElementContent($tip.find(SELECTOR_CONTENT), content)\n\n $tip.removeClass(`${CLASS_NAME_FADE} ${CLASS_NAME_SHOW}`)\n }\n\n // Private\n\n _getContent() {\n return this.element.getAttribute('data-content') ||\n this.config.content\n }\n\n _cleanTipClass() {\n const $tip = $(this.getTipElement())\n const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length > 0) {\n $tip.removeClass(tabClass.join(''))\n }\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = typeof config === 'object' ? config : null\n\n if (!data && /dispose|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Popover(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Popover._jQueryInterface\n$.fn[NAME].Constructor = Popover\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Popover._jQueryInterface\n}\n\nexport default Popover\n"],"names":["NAME","VERSION","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","$","fn","CLASS_PREFIX","BSCLS_PREFIX_REGEX","RegExp","Default","Tooltip","placement","trigger","content","template","DefaultType","CLASS_NAME_FADE","CLASS_NAME_SHOW","SELECTOR_TITLE","SELECTOR_CONTENT","Event","HIDE","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","Popover","isWithContent","getTitle","_getContent","addAttachmentClass","attachment","getTipElement","addClass","tip","config","setContent","$tip","setElementContent","find","call","element","removeClass","getAttribute","_cleanTipClass","tabClass","attr","match","length","join","_jQueryInterface","each","data","_config","test","TypeError","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUA;EACA;EACA;EACA;EACA;;EAEA,IAAMA,IAAI,GAAG,SAAb;EACA,IAAMC,OAAO,GAAG,OAAhB;EACA,IAAMC,QAAQ,GAAG,YAAjB;EACA,IAAMC,SAAS,SAAOD,QAAtB;EACA,IAAME,kBAAkB,GAAGC,qBAAC,CAACC,EAAF,CAAKN,IAAL,CAA3B;EACA,IAAMO,YAAY,GAAG,YAArB;EACA,IAAMC,kBAAkB,GAAG,IAAIC,MAAJ,aAAqBF,YAArB,WAAyC,GAAzC,CAA3B;;EAEA,IAAMG,OAAO,gBACRC,2BAAO,CAACD,OADA;EAEXE,EAAAA,SAAS,EAAE,OAFA;EAGXC,EAAAA,OAAO,EAAE,OAHE;EAIXC,EAAAA,OAAO,EAAE,EAJE;EAKXC,EAAAA,QAAQ,EAAE,yCACE,2BADF,GAEE,kCAFF,GAGE;EARD,EAAb;;EAWA,IAAMC,WAAW,gBACZL,2BAAO,CAACK,WADI;EAEfF,EAAAA,OAAO,EAAE;EAFM,EAAjB;;EAKA,IAAMG,eAAe,GAAG,MAAxB;EACA,IAAMC,eAAe,GAAG,MAAxB;EAEA,IAAMC,cAAc,GAAG,iBAAvB;EACA,IAAMC,gBAAgB,GAAG,eAAzB;EAEA,IAAMC,KAAK,GAAG;EACZC,EAAAA,IAAI,WAASnB,SADD;EAEZoB,EAAAA,MAAM,aAAWpB,SAFL;EAGZqB,EAAAA,IAAI,WAASrB,SAHD;EAIZsB,EAAAA,KAAK,YAAUtB,SAJH;EAKZuB,EAAAA,QAAQ,eAAavB,SALT;EAMZwB,EAAAA,KAAK,YAAUxB,SANH;EAOZyB,EAAAA,OAAO,cAAYzB,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;;;0BAEqB;EACpB,aAAOE,QAAP;EACD;;;0BAEkB;EACjB,aAAOmB,KAAP;EACD;;;0BAEsB;EACrB,aAAOlB,SAAP;EACD;;;0BAEwB;EACvB,aAAOa,WAAP;EACD;;;;IA7BmBL;EAuGtB;EACA;EACA;EACA;EACA;;;AAEAN,uBAAC,CAACC,EAAF,CAAKN,IAAL,IAAagC,OAAO,CAACwB,gBAArB;AACAnD,uBAAC,CAACC,EAAF,CAAKN,IAAL,EAAW8D,WAAX,GAAyB9B,OAAzB;;AACA3B,uBAAC,CAACC,EAAF,CAAKN,IAAL,EAAW+D,UAAX,GAAwB,YAAM;EAC5B1D,EAAAA,qBAAC,CAACC,EAAF,CAAKN,IAAL,IAAaI,kBAAb;EACA,SAAO4B,OAAO,CAACwB,gBAAf;EACD,CAHD;;;;;;;;"} \ No newline at end of file
+{"version":3,"file":"popover.js","sources":["../src/util/index.js","../src/popover.js"],"sourcesContent":["import SelectorEngine from '../dom/selector-engine'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = `#${hrefAttr.split('#')[1]}`\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => {\n if (!obj || typeof obj !== 'object') {\n return false\n }\n\n if (typeof obj.jquery !== 'undefined') {\n obj = obj[0]\n }\n\n return typeof obj.nodeType !== 'undefined'\n}\n\nconst getElement = obj => {\n if (isElement(obj)) { // it's a jQuery object or a node element\n return obj.jquery ? obj[0] : obj\n }\n\n if (typeof obj === 'string' && obj.length > 0) {\n return SelectorEngine.findOne(obj)\n }\n\n return null\n}\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = callback => {\n if (typeof callback === 'function') {\n callback()\n }\n}\n\nexport {\n getElement,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n isDisabled,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin,\n execute\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defineJQueryPlugin } from './util/index'\nimport Data from './dom/data'\nimport SelectorEngine from './dom/selector-engine'\nimport Tooltip from './tooltip'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'popover'\nconst DATA_KEY = 'bs.popover'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst CLASS_PREFIX = 'bs-popover'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\n\nconst Default = {\n ...Tooltip.Default,\n placement: 'right',\n offset: [0, 8],\n trigger: 'click',\n content: '',\n template: '<div class=\"popover\" role=\"tooltip\">' +\n '<div class=\"popover-arrow\"></div>' +\n '<h3 class=\"popover-header\"></h3>' +\n '<div class=\"popover-body\"></div>' +\n '</div>'\n}\n\nconst DefaultType = {\n ...Tooltip.DefaultType,\n content: '(string|element|function)'\n}\n\nconst Event = {\n HIDE: `hide${EVENT_KEY}`,\n HIDDEN: `hidden${EVENT_KEY}`,\n SHOW: `show${EVENT_KEY}`,\n SHOWN: `shown${EVENT_KEY}`,\n INSERTED: `inserted${EVENT_KEY}`,\n CLICK: `click${EVENT_KEY}`,\n FOCUSIN: `focusin${EVENT_KEY}`,\n FOCUSOUT: `focusout${EVENT_KEY}`,\n MOUSEENTER: `mouseenter${EVENT_KEY}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY}`\n}\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_TITLE = '.popover-header'\nconst SELECTOR_CONTENT = '.popover-body'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Popover extends Tooltip {\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get Event() {\n return Event\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Overrides\n\n isWithContent() {\n return this.getTitle() || this._getContent()\n }\n\n setContent() {\n const tip = this.getTipElement()\n\n // we use append for html objects to maintain js events\n this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle())\n let content = this._getContent()\n if (typeof content === 'function') {\n content = content.call(this._element)\n }\n\n this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content)\n\n tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)\n }\n\n // Private\n\n _addAttachmentClass(attachment) {\n this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`)\n }\n\n _getContent() {\n return this._element.getAttribute('data-bs-content') || this._config.content\n }\n\n _cleanTipClass() {\n const tip = this.getTipElement()\n const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length > 0) {\n tabClass.map(token => token.trim())\n .forEach(tClass => tip.classList.remove(tClass))\n }\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.get(this, DATA_KEY)\n const _config = typeof config === 'object' ? config : null\n\n if (!data && /dispose|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Popover(this, _config)\n Data.set(this, DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Popover to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Popover)\n\nexport default Popover\n"],"names":["getjQuery","jQuery","window","document","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","defineJQueryPlugin","plugin","$","name","NAME","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","DATA_KEY","EVENT_KEY","CLASS_PREFIX","BSCLS_PREFIX_REGEX","RegExp","Default","Tooltip","placement","offset","trigger","content","template","DefaultType","Event","HIDE","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","CLASS_NAME_FADE","CLASS_NAME_SHOW","SELECTOR_TITLE","SELECTOR_CONTENT","Popover","isWithContent","getTitle","_getContent","setContent","tip","getTipElement","setElementContent","SelectorEngine","findOne","call","_element","classList","remove","_addAttachmentClass","attachment","add","updateAttachment","getAttribute","_config","_cleanTipClass","tabClass","match","length","map","token","trim","forEach","tClass","config","each","data","Data","get","test","set","TypeError"],"mappings":";;;;;;;;;;;;;;;;;EA4NA,MAAMA,SAAS,GAAG,MAAM;EACtB,QAAM;EAAEC,IAAAA;EAAF,MAAaC,MAAnB;;EAEA,MAAID,MAAM,IAAI,CAACE,QAAQ,CAACC,IAAT,CAAcC,YAAd,CAA2B,mBAA3B,CAAf,EAAgE;EAC9D,WAAOJ,MAAP;EACD;;EAED,S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CAAaC,KAAK,IAAIA,KAAK,CAACC,IAAN,EAAtB,EACGC,OADH,CACWC,MAAM,IAAIvB,GAAG,CAACO,SAAJ,CAAcC,MAAd,CAAqBe,MAArB,CADrB;EAED;EACF,GAzD2B;;;EA6DN,SAAf3D,eAAe,CAAC4D,MAAD,EAAS;EAC7B,WAAO,KAAKC,IAAL,CAAU,YAAY;EAC3B,UAAIC,IAAI,GAAGC,wBAAI,CAACC,GAAL,CAAS,IAAT,EAAe7D,QAAf,CAAX;;EACA,YAAM+C,OAAO,GAAG,OAAOU,MAAP,KAAkB,QAAlB,GAA6BA,MAA7B,GAAsC,IAAtD;;EAEA,UAAI,CAACE,IAAD,IAAS,eAAeG,IAAf,CAAoBL,MAApB,CAAb,EAA0C;EACxC;EACD;;EAED,UAAI,CAACE,IAAL,EAAW;EACTA,QAAAA,IAAI,GAAG,IAAI/B,OAAJ,CAAY,IAAZ,EAAkBmB,OAAlB,CAAP;EACAa,QAAAA,wBAAI,CAACG,GAAL,CAAS,IAAT,EAAe/D,QAAf,EAAyB2D,IAAzB;EACD;;EAED,UAAI,OAAOF,MAAP,KAAkB,QAAtB,EAAgC;EAC9B,YAAI,OAAOE,IAAI,CAACF,MAAD,CAAX,KAAwB,WAA5B,EAAyC;EACvC,gBAAM,IAAIO,SAAJ,CAAe,oBAAmBP,MAAO,GAAzC,CAAN;EACD;;EAEDE,QAAAA,IAAI,CAACF,MAAD,CAAJ;EACD;EACF,KApBM,CAAP;EAqBD;;EAnF2B;EAsF9B;EACA;EACA;EACA;EACA;EACA;;;EAEAnE,kBAAkB,CAACsC,OAAD,CAAlB;;;;;;;;"} \ No newline at end of file
diff --git a/vendor/twbs/bootstrap/js/dist/scrollspy.js b/vendor/twbs/bootstrap/js/dist/scrollspy.js
index 9503a9589..87c2bb290 100644
--- a/vendor/twbs/bootstrap/js/dist/scrollspy.js
+++ b/vendor/twbs/bootstrap/js/dist/scrollspy.js
@@ -1,216 +1,303 @@
/*!
- * Bootstrap scrollspy.js v4.6.0 (https://getbootstrap.com/)
+ * Bootstrap scrollspy.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
- typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.jQuery, global.Util));
-}(this, (function ($, Util) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ScrollSpy = factory(global.SelectorEngine, global.EventHandler, global.Manipulator, global.Base));
+}(this, (function (SelectorEngine, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
- var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
+ var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
+ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
+ var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
+ var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.1): util/index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+ const MAX_UID = 1000000;
+
+ const toType = obj => {
+ if (obj === null || obj === undefined) {
+ return `${obj}`;
}
- }
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
- }
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
+ };
+ /**
+ * --------------------------------------------------------------------------
+ * Public Util Api
+ * --------------------------------------------------------------------------
+ */
- function _extends() {
- _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
+ const getUID = prefix => {
+ do {
+ prefix += Math.floor(Math.random() * MAX_UID);
+ } while (document.getElementById(prefix));
+
+ return prefix;
+ };
+
+ const getSelector = element => {
+ let selector = element.getAttribute('data-bs-target');
+
+ if (!selector || selector === '#') {
+ let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
+ // `document.querySelector` will rightfully complain it is invalid.
+ // See https://github.com/twbs/bootstrap/issues/32273
+
+ if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
+ return null;
+ } // Just in case some CMS puts out a full URL with the anchor appended
+
+
+ if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
+ hrefAttr = `#${hrefAttr.split('#')[1]}`;
}
- return target;
- };
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
+ }
- return _extends.apply(this, arguments);
- }
+ return selector;
+ };
+
+ const getSelectorFromElement = element => {
+ const selector = getSelector(element);
+
+ if (selector) {
+ return document.querySelector(selector) ? selector : null;
+ }
+
+ return null;
+ };
+
+ const isElement = obj => {
+ if (!obj || typeof obj !== 'object') {
+ return false;
+ }
+
+ if (typeof obj.jquery !== 'undefined') {
+ obj = obj[0];
+ }
+
+ return typeof obj.nodeType !== 'undefined';
+ };
+
+ const typeCheckConfig = (componentName, config, configTypes) => {
+ Object.keys(configTypes).forEach(property => {
+ const expectedTypes = configTypes[property];
+ const value = config[property];
+ const valueType = value && isElement(value) ? 'element' : toType(value);
+
+ if (!new RegExp(expectedTypes).test(valueType)) {
+ throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
+ }
+ });
+ };
+
+ const getjQuery = () => {
+ const {
+ jQuery
+ } = window;
+
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ const onDOMContentLoaded = callback => {
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', callback);
+ } else {
+ callback();
+ }
+ };
+
+ const defineJQueryPlugin = plugin => {
+ onDOMContentLoaded(() => {
+ const $ = getjQuery();
+ /* istanbul ignore if */
+
+ if ($) {
+ const name = plugin.NAME;
+ const JQUERY_NO_CONFLICT = $.fn[name];
+ $.fn[name] = plugin.jQueryInterface;
+ $.fn[name].Constructor = plugin;
+
+ $.fn[name].noConflict = () => {
+ $.fn[name] = JQUERY_NO_CONFLICT;
+ return plugin.jQueryInterface;
+ };
+ }
+ });
+ };
/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.1): scrollspy.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
- var NAME = 'scrollspy';
- var VERSION = '4.6.0';
- var DATA_KEY = 'bs.scrollspy';
- var EVENT_KEY = "." + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
- var Default = {
+ const NAME = 'scrollspy';
+ const DATA_KEY = 'bs.scrollspy';
+ const EVENT_KEY = `.${DATA_KEY}`;
+ const DATA_API_KEY = '.data-api';
+ const Default = {
offset: 10,
method: 'auto',
target: ''
};
- var DefaultType = {
+ const DefaultType = {
offset: 'number',
method: 'string',
target: '(string|element)'
};
- var EVENT_ACTIVATE = "activate" + EVENT_KEY;
- var EVENT_SCROLL = "scroll" + EVENT_KEY;
- var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
- var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
- var CLASS_NAME_ACTIVE = 'active';
- var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
- var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
- var SELECTOR_NAV_LINKS = '.nav-link';
- var SELECTOR_NAV_ITEMS = '.nav-item';
- var SELECTOR_LIST_ITEMS = '.list-group-item';
- var SELECTOR_DROPDOWN = '.dropdown';
- var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item';
- var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
- var METHOD_OFFSET = 'offset';
- var METHOD_POSITION = 'position';
+ const EVENT_ACTIVATE = `activate${EVENT_KEY}`;
+ const EVENT_SCROLL = `scroll${EVENT_KEY}`;
+ const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`;
+ const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
+ const CLASS_NAME_ACTIVE = 'active';
+ const SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]';
+ const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
+ const SELECTOR_NAV_LINKS = '.nav-link';
+ const SELECTOR_NAV_ITEMS = '.nav-item';
+ const SELECTOR_LIST_ITEMS = '.list-group-item';
+ const SELECTOR_DROPDOWN = '.dropdown';
+ const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
+ const METHOD_OFFSET = 'offset';
+ const METHOD_POSITION = 'position';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
- var ScrollSpy = /*#__PURE__*/function () {
- function ScrollSpy(element, config) {
- var _this = this;
-
- this._element = element;
- this._scrollElement = element.tagName === 'BODY' ? window : element;
+ class ScrollSpy extends BaseComponent__default['default'] {
+ constructor(element, config) {
+ super(element);
+ this._scrollElement = this._element.tagName === 'BODY' ? window : this._element;
this._config = this._getConfig(config);
- this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " " + SELECTOR_DROPDOWN_ITEMS);
+ this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`;
this._offsets = [];
this._targets = [];
this._activeTarget = null;
this._scrollHeight = 0;
- $__default['default'](this._scrollElement).on(EVENT_SCROLL, function (event) {
- return _this._process(event);
- });
+ EventHandler__default['default'].on(this._scrollElement, EVENT_SCROLL, () => this._process());
this.refresh();
this._process();
} // Getters
- var _proto = ScrollSpy.prototype;
+ static get Default() {
+ return Default;
+ }
+
+ static get NAME() {
+ return NAME;
+ } // Public
- // Public
- _proto.refresh = function refresh() {
- var _this2 = this;
- var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
- var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
- var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
+ refresh() {
+ const autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
+ const offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
+ const offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
this._offsets = [];
this._targets = [];
this._scrollHeight = this._getScrollHeight();
- var targets = [].slice.call(document.querySelectorAll(this._selector));
- targets.map(function (element) {
- var target;
- var targetSelector = Util__default['default'].getSelectorFromElement(element);
-
- if (targetSelector) {
- target = document.querySelector(targetSelector);
- }
+ const targets = SelectorEngine__default['default'].find(this._selector);
+ targets.map(element => {
+ const targetSelector = getSelectorFromElement(element);
+ const target = targetSelector ? SelectorEngine__default['default'].findOne(targetSelector) : null;
if (target) {
- var targetBCR = target.getBoundingClientRect();
+ const targetBCR = target.getBoundingClientRect();
if (targetBCR.width || targetBCR.height) {
- // TODO (fat): remove sketch reliance on jQuery position/offset
- return [$__default['default'](target)[offsetMethod]().top + offsetBase, targetSelector];
+ return [Manipulator__default['default'][offsetMethod](target).top + offsetBase, targetSelector];
}
}
return null;
- }).filter(function (item) {
- return item;
- }).sort(function (a, b) {
- return a[0] - b[0];
- }).forEach(function (item) {
- _this2._offsets.push(item[0]);
-
- _this2._targets.push(item[1]);
+ }).filter(item => item).sort((a, b) => a[0] - b[0]).forEach(item => {
+ this._offsets.push(item[0]);
+
+ this._targets.push(item[1]);
});
- };
-
- _proto.dispose = function dispose() {
- $__default['default'].removeData(this._element, DATA_KEY);
- $__default['default'](this._scrollElement).off(EVENT_KEY);
- this._element = null;
- this._scrollElement = null;
- this._config = null;
- this._selector = null;
- this._offsets = null;
- this._targets = null;
- this._activeTarget = null;
- this._scrollHeight = null;
+ }
+
+ dispose() {
+ EventHandler__default['default'].off(this._scrollElement, EVENT_KEY);
+ super.dispose();
} // Private
- ;
- _proto._getConfig = function _getConfig(config) {
- config = _extends({}, Default, typeof config === 'object' && config ? config : {});
- if (typeof config.target !== 'string' && Util__default['default'].isElement(config.target)) {
- var id = $__default['default'](config.target).attr('id');
+ _getConfig(config) {
+ config = { ...Default,
+ ...Manipulator__default['default'].getDataAttributes(this._element),
+ ...(typeof config === 'object' && config ? config : {})
+ };
+
+ if (typeof config.target !== 'string' && isElement(config.target)) {
+ let {
+ id
+ } = config.target;
if (!id) {
- id = Util__default['default'].getUID(NAME);
- $__default['default'](config.target).attr('id', id);
+ id = getUID(NAME);
+ config.target.id = id;
}
- config.target = "#" + id;
+ config.target = `#${id}`;
}
- Util__default['default'].typeCheckConfig(NAME, config, DefaultType);
+ typeCheckConfig(NAME, config, DefaultType);
return config;
- };
+ }
- _proto._getScrollTop = function _getScrollTop() {
+ _getScrollTop() {
return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
- };
+ }
- _proto._getScrollHeight = function _getScrollHeight() {
+ _getScrollHeight() {
return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
- };
+ }
- _proto._getOffsetHeight = function _getOffsetHeight() {
+ _getOffsetHeight() {
return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
- };
+ }
- _proto._process = function _process() {
- var scrollTop = this._getScrollTop() + this._config.offset;
+ _process() {
+ const scrollTop = this._getScrollTop() + this._config.offset;
- var scrollHeight = this._getScrollHeight();
+ const scrollHeight = this._getScrollHeight();
- var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
+ const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
if (this._scrollHeight !== scrollHeight) {
this.refresh();
}
if (scrollTop >= maxScroll) {
- var target = this._targets[this._targets.length - 1];
+ const target = this._targets[this._targets.length - 1];
if (this._activeTarget !== target) {
this._activate(target);
@@ -227,88 +314,68 @@
return;
}
- for (var i = this._offsets.length; i--;) {
- var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
+ for (let i = this._offsets.length; i--;) {
+ const isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
if (isActiveTarget) {
this._activate(this._targets[i]);
}
}
- };
+ }
- _proto._activate = function _activate(target) {
+ _activate(target) {
this._activeTarget = target;
this._clear();
- var queries = this._selector.split(',').map(function (selector) {
- return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
- });
+ const queries = this._selector.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`);
- var $link = $__default['default']([].slice.call(document.querySelectorAll(queries.join(','))));
+ const link = SelectorEngine__default['default'].findOne(queries.join(','));
- if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
- $link.closest(SELECTOR_DROPDOWN).find(SELECTOR_DROPDOWN_TOGGLE).addClass(CLASS_NAME_ACTIVE);
- $link.addClass(CLASS_NAME_ACTIVE);
+ if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
+ SelectorEngine__default['default'].findOne(SELECTOR_DROPDOWN_TOGGLE, link.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE);
+ link.classList.add(CLASS_NAME_ACTIVE);
} else {
// Set triggered link as active
- $link.addClass(CLASS_NAME_ACTIVE); // Set triggered links parents as active
- // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
-
- $link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).addClass(CLASS_NAME_ACTIVE); // Handle special case when .nav-link is inside .nav-item
-
- $link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE);
+ link.classList.add(CLASS_NAME_ACTIVE);
+ SelectorEngine__default['default'].parents(link, SELECTOR_NAV_LIST_GROUP).forEach(listGroup => {
+ // Set triggered links parents as active
+ // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
+ SelectorEngine__default['default'].prev(listGroup, `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`).forEach(item => item.classList.add(CLASS_NAME_ACTIVE)); // Handle special case when .nav-link is inside .nav-item
+
+ SelectorEngine__default['default'].prev(listGroup, SELECTOR_NAV_ITEMS).forEach(navItem => {
+ SelectorEngine__default['default'].children(navItem, SELECTOR_NAV_LINKS).forEach(item => item.classList.add(CLASS_NAME_ACTIVE));
+ });
+ });
}
- $__default['default'](this._scrollElement).trigger(EVENT_ACTIVATE, {
+ EventHandler__default['default'].trigger(this._scrollElement, EVENT_ACTIVATE, {
relatedTarget: target
});
- };
+ }
- _proto._clear = function _clear() {
- [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
- return node.classList.contains(CLASS_NAME_ACTIVE);
- }).forEach(function (node) {
- return node.classList.remove(CLASS_NAME_ACTIVE);
- });
+ _clear() {
+ SelectorEngine__default['default'].find(this._selector).filter(node => node.classList.contains(CLASS_NAME_ACTIVE)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE));
} // Static
- ;
- ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
- return this.each(function () {
- var data = $__default['default'](this).data(DATA_KEY);
- var _config = typeof config === 'object' && config;
+ static jQueryInterface(config) {
+ return this.each(function () {
+ const data = ScrollSpy.getInstance(this) || new ScrollSpy(this, typeof config === 'object' ? config : {});
- if (!data) {
- data = new ScrollSpy(this, _config);
- $__default['default'](this).data(DATA_KEY, data);
+ if (typeof config !== 'string') {
+ return;
}
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new TypeError("No method named \"" + config + "\"");
- }
-
- data[config]();
+ if (typeof data[config] === 'undefined') {
+ throw new TypeError(`No method named "${config}"`);
}
- });
- };
- _createClass(ScrollSpy, null, [{
- key: "VERSION",
- get: function get() {
- return VERSION;
- }
- }, {
- key: "Default",
- get: function get() {
- return Default;
- }
- }]);
+ data[config]();
+ });
+ }
- return ScrollSpy;
- }();
+ }
/**
* ------------------------------------------------------------------------
* Data Api implementation
@@ -316,29 +383,17 @@
*/
- $__default['default'](window).on(EVENT_LOAD_DATA_API, function () {
- var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY));
- var scrollSpysLength = scrollSpys.length;
-
- for (var i = scrollSpysLength; i--;) {
- var $spy = $__default['default'](scrollSpys[i]);
-
- ScrollSpy._jQueryInterface.call($spy, $spy.data());
- }
+ EventHandler__default['default'].on(window, EVENT_LOAD_DATA_API, () => {
+ SelectorEngine__default['default'].find(SELECTOR_DATA_SPY).forEach(spy => new ScrollSpy(spy));
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .ScrollSpy to jQuery only if jQuery is present
*/
- $__default['default'].fn[NAME] = ScrollSpy._jQueryInterface;
- $__default['default'].fn[NAME].Constructor = ScrollSpy;
-
- $__default['default'].fn[NAME].noConflict = function () {
- $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
- return ScrollSpy._jQueryInterface;
- };
+ defineJQueryPlugin(ScrollSpy);
return ScrollSpy;
diff --git a/vendor/twbs/bootstrap/js/dist/scrollspy.js.map b/vendor/twbs/bootstrap/js/dist/scrollspy.js.map
index 5fe94b368..851d26d71 100644
--- a/vendor/twbs/bootstrap/js/dist/scrollspy.js.map
+++ b/vendor/twbs/bootstrap/js/dist/scrollspy.js.map
@@ -1 +1 @@
-{"version":3,"file":"scrollspy.js","sources":["../src/scrollspy.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.0): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'scrollspy'\nconst VERSION = '4.6.0'\nconst DATA_KEY = 'bs.scrollspy'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst Default = {\n offset: 10,\n method: 'auto',\n target: ''\n}\n\nconst DefaultType = {\n offset: 'number',\n method: 'string',\n target: '(string|element)'\n}\n\nconst EVENT_ACTIVATE = `activate${EVENT_KEY}`\nconst EVENT_SCROLL = `scroll${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst SELECTOR_DATA_SPY = '[data-spy=\"scroll\"]'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_NAV_LINKS = '.nav-link'\nconst SELECTOR_NAV_ITEMS = '.nav-item'\nconst SELECTOR_LIST_ITEMS = '.list-group-item'\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_DROPDOWN_ITEMS = '.dropdown-item'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\n\nconst METHOD_OFFSET = 'offset'\nconst METHOD_POSITION = 'position'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass ScrollSpy {\n constructor(element, config) {\n this._element = element\n this._scrollElement = element.tagName === 'BODY' ? window : element\n this._config = this._getConfig(config)\n this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS},` +\n `${this._config.target} ${SELECTOR_LIST_ITEMS},` +\n `${this._config.target} ${SELECTOR_DROPDOWN_ITEMS}`\n this._offsets = []\n this._targets = []\n this._activeTarget = null\n this._scrollHeight = 0\n\n $(this._scrollElement).on(EVENT_SCROLL, event => this._process(event))\n\n this.refresh()\n this._process()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n refresh() {\n const autoMethod = this._scrollElement === this._scrollElement.window ?\n METHOD_OFFSET : METHOD_POSITION\n\n const offsetMethod = this._config.method === 'auto' ?\n autoMethod : this._config.method\n\n const offsetBase = offsetMethod === METHOD_POSITION ?\n this._getScrollTop() : 0\n\n this._offsets = []\n this._targets = []\n\n this._scrollHeight = this._getScrollHeight()\n\n const targets = [].slice.call(document.querySelectorAll(this._selector))\n\n targets\n .map(element => {\n let target\n const targetSelector = Util.getSelectorFromElement(element)\n\n if (targetSelector) {\n target = document.querySelector(targetSelector)\n }\n\n if (target) {\n const targetBCR = target.getBoundingClientRect()\n if (targetBCR.width || targetBCR.height) {\n // TODO (fat): remove sketch reliance on jQuery position/offset\n return [\n $(target)[offsetMethod]().top + offsetBase,\n targetSelector\n ]\n }\n }\n\n return null\n })\n .filter(item => item)\n .sort((a, b) => a[0] - b[0])\n .forEach(item => {\n this._offsets.push(item[0])\n this._targets.push(item[1])\n })\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n $(this._scrollElement).off(EVENT_KEY)\n\n this._element = null\n this._scrollElement = null\n this._config = null\n this._selector = null\n this._offsets = null\n this._targets = null\n this._activeTarget = null\n this._scrollHeight = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (typeof config.target !== 'string' && Util.isElement(config.target)) {\n let id = $(config.target).attr('id')\n if (!id) {\n id = Util.getUID(NAME)\n $(config.target).attr('id', id)\n }\n\n config.target = `#${id}`\n }\n\n Util.typeCheckConfig(NAME, config, DefaultType)\n\n return config\n }\n\n _getScrollTop() {\n return this._scrollElement === window ?\n this._scrollElement.pageYOffset : this._scrollElement.scrollTop\n }\n\n _getScrollHeight() {\n return this._scrollElement.scrollHeight || Math.max(\n document.body.scrollHeight,\n document.documentElement.scrollHeight\n )\n }\n\n _getOffsetHeight() {\n return this._scrollElement === window ?\n window.innerHeight : this._scrollElement.getBoundingClientRect().height\n }\n\n _process() {\n const scrollTop = this._getScrollTop() + this._config.offset\n const scrollHeight = this._getScrollHeight()\n const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight()\n\n if (this._scrollHeight !== scrollHeight) {\n this.refresh()\n }\n\n if (scrollTop >= maxScroll) {\n const target = this._targets[this._targets.length - 1]\n\n if (this._activeTarget !== target) {\n this._activate(target)\n }\n\n return\n }\n\n if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {\n this._activeTarget = null\n this._clear()\n return\n }\n\n for (let i = this._offsets.length; i--;) {\n const isActiveTarget = this._activeTarget !== this._targets[i] &&\n scrollTop >= this._offsets[i] &&\n (typeof this._offsets[i + 1] === 'undefined' ||\n scrollTop < this._offsets[i + 1])\n\n if (isActiveTarget) {\n this._activate(this._targets[i])\n }\n }\n }\n\n _activate(target) {\n this._activeTarget = target\n\n this._clear()\n\n const queries = this._selector\n .split(',')\n .map(selector => `${selector}[data-target=\"${target}\"],${selector}[href=\"${target}\"]`)\n\n const $link = $([].slice.call(document.querySelectorAll(queries.join(','))))\n\n if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {\n $link.closest(SELECTOR_DROPDOWN)\n .find(SELECTOR_DROPDOWN_TOGGLE)\n .addClass(CLASS_NAME_ACTIVE)\n $link.addClass(CLASS_NAME_ACTIVE)\n } else {\n // Set triggered link as active\n $link.addClass(CLASS_NAME_ACTIVE)\n // Set triggered links parents as active\n // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor\n $link.parents(SELECTOR_NAV_LIST_GROUP)\n .prev(`${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`)\n .addClass(CLASS_NAME_ACTIVE)\n // Handle special case when .nav-link is inside .nav-item\n $link.parents(SELECTOR_NAV_LIST_GROUP)\n .prev(SELECTOR_NAV_ITEMS)\n .children(SELECTOR_NAV_LINKS)\n .addClass(CLASS_NAME_ACTIVE)\n }\n\n $(this._scrollElement).trigger(EVENT_ACTIVATE, {\n relatedTarget: target\n })\n }\n\n _clear() {\n [].slice.call(document.querySelectorAll(this._selector))\n .filter(node => node.classList.contains(CLASS_NAME_ACTIVE))\n .forEach(node => node.classList.remove(CLASS_NAME_ACTIVE))\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data) {\n data = new ScrollSpy(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(window).on(EVENT_LOAD_DATA_API, () => {\n const scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY))\n const scrollSpysLength = scrollSpys.length\n\n for (let i = scrollSpysLength; i--;) {\n const $spy = $(scrollSpys[i])\n ScrollSpy._jQueryInterface.call($spy, $spy.data())\n }\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = ScrollSpy._jQueryInterface\n$.fn[NAME].Constructor = ScrollSpy\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return ScrollSpy._jQueryInterface\n}\n\nexport default ScrollSpy\n"],"names":["NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","$","fn","Default","offset","method","target","DefaultType","EVENT_ACTIVATE","EVENT_SCROLL","EVENT_LOAD_DATA_API","CLASS_NAME_DROPDOWN_ITEM","CLASS_NAME_ACTIVE","SELECTOR_DATA_SPY","SELECTOR_NAV_LIST_GROUP","SELECTOR_NAV_LINKS","SELECTOR_NAV_ITEMS","SELECTOR_LIST_ITEMS","SELECTOR_DROPDOWN","SELECTOR_DROPDOWN_ITEMS","SELECTOR_DROPDOWN_TOGGLE","METHOD_OFFSET","METHOD_POSITION","ScrollSpy","element","config","_element","_scrollElement","tagName","window","_config","_getConfig","_selector","_offsets","_targets","_activeTarget","_scrollHeight","on","event","_process","refresh","autoMethod","offsetMethod","offsetBase","_getScrollTop","_getScrollHeight","targets","slice","call","document","querySelectorAll","map","targetSelector","Util","getSelectorFromElement","querySelector","targetBCR","getBoundingClientRect","width","height","top","filter","item","sort","a","b","forEach","push","dispose","removeData","off","isElement","id","attr","getUID","typeCheckConfig","pageYOffset","scrollTop","scrollHeight","Math","max","body","documentElement","_getOffsetHeight","innerHeight","maxScroll","length","_activate","_clear","i","isActiveTarget","queries","split","selector","$link","join","hasClass","closest","find","addClass","parents","prev","children","trigger","relatedTarget","node","classList","contains","remove","_jQueryInterface","each","data","TypeError","scrollSpys","scrollSpysLength","$spy","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUA;EACA;EACA;EACA;EACA;;EAEA,IAAMA,IAAI,GAAG,WAAb;EACA,IAAMC,OAAO,GAAG,OAAhB;EACA,IAAMC,QAAQ,GAAG,cAAjB;EACA,IAAMC,SAAS,SAAOD,QAAtB;EACA,IAAME,YAAY,GAAG,WAArB;EACA,IAAMC,kBAAkB,GAAGC,qBAAC,CAACC,EAAF,CAAKP,IAAL,CAA3B;EAEA,IAAMQ,OAAO,GAAG;EACdC,EAAAA,MAAM,EAAE,EADM;EAEdC,EAAAA,MAAM,EAAE,MAFM;EAGdC,EAAAA,MAAM,EAAE;EAHM,CAAhB;EAMA,IAAMC,WAAW,GAAG;EAClBH,EAAAA,MAAM,EAAE,QADU;EAElBC,EAAAA,MAAM,EAAE,QAFU;EAGlBC,EAAAA,MAAM,EAAE;EAHU,CAApB;EAMA,IAAME,cAAc,gBAAcV,SAAlC;EACA,IAAMW,YAAY,cAAYX,SAA9B;EACA,IAAMY,mBAAmB,YAAUZ,SAAV,GAAsBC,YAA/C;EAEA,IAAMY,wBAAwB,GAAG,eAAjC;EACA,IAAMC,iBAAiB,GAAG,QAA1B;EAEA,IAAMC,iBAAiB,GAAG,qBAA1B;EACA,IAAMC,uBAAuB,GAAG,mBAAhC;EACA,IAAMC,kBAAkB,GAAG,WAA3B;EACA,IAAMC,kBAAkB,GAAG,WAA3B;EACA,IAAMC,mBAAmB,GAAG,kBAA5B;EACA,IAAMC,iBAAiB,GAAG,WAA1B;EACA,IAAMC,uBAAuB,GAAG,gBAAhC;EACA,IAAMC,wBAAwB,GAAG,kBAAjC;EAEA,IAAMC,aAAa,GAAG,QAAtB;EACA,IAAMC,eAAe,GAAG,UAAxB;EAEA;EACA;EACA;EACA;EACA;;MAEMC;E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CAAP;EAiBD;;;;0BAlNoB;EACnB,aAAO7B,OAAP;EACD;;;0BAEoB;EACnB,aAAOO,OAAP;EACD;;;;;EA+MH;EACA;EACA;EACA;EACA;;;AAEAF,uBAAC,CAAC4B,MAAD,CAAD,CAAUQ,EAAV,CAAa3B,mBAAb,EAAkC,YAAM;EACtC,MAAMuG,UAAU,GAAG,GAAGlE,KAAH,CAASC,IAAT,CAAcC,QAAQ,CAACC,gBAAT,CAA0BrC,iBAA1B,CAAd,CAAnB;EACA,MAAMqG,gBAAgB,GAAGD,UAAU,CAAC3B,MAApC;;EAEA,OAAK,IAAIG,CAAC,GAAGyB,gBAAb,EAA+BzB,CAAC,EAAhC,GAAqC;EACnC,QAAM0B,IAAI,GAAGlH,qBAAC,CAACgH,UAAU,CAACxB,CAAD,CAAX,CAAd;;EACAlE,IAAAA,SAAS,CAACsF,gBAAV,CAA2B7D,IAA3B,CAAgCmE,IAAhC,EAAsCA,IAAI,CAACJ,IAAL,EAAtC;EACD;EACF,CARD;EAUA;EACA;EACA;EACA;EACA;;AAEA9G,uBAAC,CAACC,EAAF,CAAKP,IAAL,IAAa4B,SAAS,CAACsF,gBAAvB;AACA5G,uBAAC,CAACC,EAAF,CAAKP,IAAL,EAAWyH,WAAX,GAAyB7F,SAAzB;;AACAtB,uBAAC,CAACC,EAAF,CAAKP,IAAL,EAAW0H,UAAX,GAAwB,YAAM;EAC5BpH,EAAAA,qBAAC,CAACC,EAAF,CAAKP,IAAL,IAAaK,kBAAb;EACA,SAAOuB,SAAS,CAACsF,gBAAjB;EACD,CAHD;;;;;;;;"} \ No newline at end of file
+{"version":3,"file":"scrollspy.js","sources":["../src/util/index.js","../src/scrollspy.js"],"sourcesContent":["import SelectorEngine from '../dom/selector-engine'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = `#${hrefAttr.split('#')[1]}`\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => {\n if (!obj || typeof obj !== 'object') {\n return false\n }\n\n if (typeof obj.jquery !== 'undefined') {\n obj = obj[0]\n }\n\n return typeof obj.nodeType !== 'undefined'\n}\n\nconst getElement = obj => {\n if (isElement(obj)) { // it's a jQuery object or a node element\n return obj.jquery ? obj[0] : obj\n }\n\n if (typeof obj === 'string' && obj.length > 0) {\n return SelectorEngine.findOne(obj)\n }\n\n return null\n}\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = callback => {\n if (typeof callback === 'function') {\n callback()\n }\n}\n\nexport {\n getElement,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n isDisabled,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin,\n execute\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getSelectorFromElement,\n getUID,\n isElement,\n typeCheckConfig\n} from './util/index'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'scrollspy'\nconst DATA_KEY = 'bs.scrollspy'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst Default = {\n offset: 10,\n method: 'auto',\n target: ''\n}\n\nconst DefaultType = {\n offset: 'number',\n method: 'string',\n target: '(string|element)'\n}\n\nconst EVENT_ACTIVATE = `activate${EVENT_KEY}`\nconst EVENT_SCROLL = `scroll${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_NAV_LINKS = '.nav-link'\nconst SELECTOR_NAV_ITEMS = '.nav-item'\nconst SELECTOR_LIST_ITEMS = '.list-group-item'\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\n\nconst METHOD_OFFSET = 'offset'\nconst METHOD_POSITION = 'position'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass ScrollSpy extends BaseComponent {\n constructor(element, config) {\n super(element)\n this._scrollElement = this._element.tagName === 'BODY' ? window : this._element\n this._config = this._getConfig(config)\n this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`\n this._offsets = []\n this._targets = []\n this._activeTarget = null\n this._scrollHeight = 0\n\n EventHandler.on(this._scrollElement, EVENT_SCROLL, () => this._process())\n\n this.refresh()\n this._process()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n refresh() {\n const autoMethod = this._scrollElement === this._scrollElement.window ?\n METHOD_OFFSET :\n METHOD_POSITION\n\n const offsetMethod = this._config.method === 'auto' ?\n autoMethod :\n this._config.method\n\n const offsetBase = offsetMethod === METHOD_POSITION ?\n this._getScrollTop() :\n 0\n\n this._offsets = []\n this._targets = []\n this._scrollHeight = this._getScrollHeight()\n\n const targets = SelectorEngine.find(this._selector)\n\n targets.map(element => {\n const targetSelector = getSelectorFromElement(element)\n const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null\n\n if (target) {\n const targetBCR = target.getBoundingClientRect()\n if (targetBCR.width || targetBCR.height) {\n return [\n Manipulator[offsetMethod](target).top + offsetBase,\n targetSelector\n ]\n }\n }\n\n return null\n })\n .filter(item => item)\n .sort((a, b) => a[0] - b[0])\n .forEach(item => {\n this._offsets.push(item[0])\n this._targets.push(item[1])\n })\n }\n\n dispose() {\n EventHandler.off(this._scrollElement, EVENT_KEY)\n super.dispose()\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (typeof config.target !== 'string' && isElement(config.target)) {\n let { id } = config.target\n if (!id) {\n id = getUID(NAME)\n config.target.id = id\n }\n\n config.target = `#${id}`\n }\n\n typeCheckConfig(NAME, config, DefaultType)\n\n return config\n }\n\n _getScrollTop() {\n return this._scrollElement === window ?\n this._scrollElement.pageYOffset :\n this._scrollElement.scrollTop\n }\n\n _getScrollHeight() {\n return this._scrollElement.scrollHeight || Math.max(\n document.body.scrollHeight,\n document.documentElement.scrollHeight\n )\n }\n\n _getOffsetHeight() {\n return this._scrollElement === window ?\n window.innerHeight :\n this._scrollElement.getBoundingClientRect().height\n }\n\n _process() {\n const scrollTop = this._getScrollTop() + this._config.offset\n const scrollHeight = this._getScrollHeight()\n const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight()\n\n if (this._scrollHeight !== scrollHeight) {\n this.refresh()\n }\n\n if (scrollTop >= maxScroll) {\n const target = this._targets[this._targets.length - 1]\n\n if (this._activeTarget !== target) {\n this._activate(target)\n }\n\n return\n }\n\n if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {\n this._activeTarget = null\n this._clear()\n return\n }\n\n for (let i = this._offsets.length; i--;) {\n const isActiveTarget = this._activeTarget !== this._targets[i] &&\n scrollTop >= this._offsets[i] &&\n (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1])\n\n if (isActiveTarget) {\n this._activate(this._targets[i])\n }\n }\n }\n\n _activate(target) {\n this._activeTarget = target\n\n this._clear()\n\n const queries = this._selector.split(',')\n .map(selector => `${selector}[data-bs-target=\"${target}\"],${selector}[href=\"${target}\"]`)\n\n const link = SelectorEngine.findOne(queries.join(','))\n\n if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, link.closest(SELECTOR_DROPDOWN))\n .classList.add(CLASS_NAME_ACTIVE)\n\n link.classList.add(CLASS_NAME_ACTIVE)\n } else {\n // Set triggered link as active\n link.classList.add(CLASS_NAME_ACTIVE)\n\n SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP)\n .forEach(listGroup => {\n // Set triggered links parents as active\n // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor\n SelectorEngine.prev(listGroup, `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`)\n .forEach(item => item.classList.add(CLASS_NAME_ACTIVE))\n\n // Handle special case when .nav-link is inside .nav-item\n SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS)\n .forEach(navItem => {\n SelectorEngine.children(navItem, SELECTOR_NAV_LINKS)\n .forEach(item => item.classList.add(CLASS_NAME_ACTIVE))\n })\n })\n }\n\n EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {\n relatedTarget: target\n })\n }\n\n _clear() {\n SelectorEngine.find(this._selector)\n .filter(node => node.classList.contains(CLASS_NAME_ACTIVE))\n .forEach(node => node.classList.remove(CLASS_NAME_ACTIVE))\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = ScrollSpy.getInstance(this) || new ScrollSpy(this, typeof config === 'object' ? config : {})\n\n if (typeof config !== 'string') {\n return\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n SelectorEngine.find(SELECTOR_DATA_SPY)\n .forEach(spy => new ScrollSpy(spy))\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .ScrollSpy to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(ScrollSpy)\n\nexport default ScrollSpy\n"],"names":["MAX_UID","toType","obj","undefined","toString","call","match","toLowerCase","getUID","prefix","Math","floor","random","document","getElementById","getSelector","element","selector","getAttribute","hrefAttr","includes","startsWith","split","trim","getSelectorFromElement","querySelector","isElement","jquery","nodeType","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","TypeError","toUpperCase","getjQuery","jQuery","window","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","defineJQueryPlugin","plugin","$","name","NAME","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","DATA_KEY","EVENT_KEY","DATA_API_KEY","Default","offset","method","target","DefaultType","EVENT_ACTIVATE","EVENT_SCROLL","EVENT_LOAD_DATA_API","CLASS_NAME_DROPDOWN_ITEM","CLASS_NAME_ACTIVE","SELECTOR_DATA_SPY","SELECTOR_NAV_LIST_GROUP","SELECTOR_NAV_LINKS","SELECTOR_NAV_ITEMS","SELECTOR_LIST_ITEMS","SELECTOR_DROPDOWN","SELECTOR_DROPDOWN_TOGGLE","METHOD_OFFSET","METHOD_POSITION","ScrollSpy","BaseComponent","constructor","_scrollElement","_element","tagName","_config","_getConfig","_selector","_offsets","_targets","_activeTarget","_scrollHeight","EventHandler","on","_process","refresh","autoMethod","offsetMethod","offsetBase","_getScrollTop","_getScrollHeight","targets","SelectorEngine","find","map","targetSelector","findOne","targetBCR","getBoundingClientRect","width","height","Manipulator","top","filter","item","sort","a","b","push","dispose","off","getDataAttributes","id","pageYOffset","scrollTop","scrollHeight","max","documentElement","_getOffsetHeight","innerHeight","maxScroll","length","_activate","_clear","i","isActiveTarget","queries","link","join","classList","contains","closest","add","parents","listGroup","prev","navItem","children","trigger","relatedTarget","node","remove","each","data","getInstance","spy"],"mappings":";;;;;;;;;;;;;;;;;;EAEA;EACA;EACA;EACA;EACA;EACA;;EAEA,MAAMA,OAAO,GAAG,OAAhB;;EAKA,MAAMC,MAAM,GAAGC,GAAG,IAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,WAAQ,GAAED,GAAI,EAAd;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC,WAA9C,EAAP;EACD,CAND;EAQA;EACA;EACA;EACA;EACA;;;EAEA,MAAMC,MAAM,GAAGC,MAAM,IAAI;EACvB,KAAG;EACDA,IAAAA,MAAM,IAAIC,IAAI,CAACC,KAAL,CAAWD,IAAI,CAACE,MAAL,KAAgBZ,OAA3B,CAAV;EACD,GAFD,QAESa,QAAQ,CAACC,cAAT,CAAwBL,MAAxB,CAFT;;EAIA,SAAOA,MAAP;EACD,CAND;;EAQA,MAAMM,WAAW,GAAGC,OAAO,IAAI;EAC7B,MAAIC,QAAQ,GAA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,CAAP;EAaD;;EA1NmC;EA6NtC;EACA;EACA;EACA;EACA;;;AAEAmE,kCAAY,CAACC,EAAb,CAAgBrD,MAAhB,EAAwB2B,mBAAxB,EAA6C,MAAM;EACjDmC,EAAAA,kCAAc,CAACC,IAAf,CAAoBjC,iBAApB,EACGzC,OADH,CACW8H,GAAG,IAAI,IAAI5E,SAAJ,CAAc4E,GAAd,CADlB;EAED,CAHD;EAKA;EACA;EACA;EACA;EACA;EACA;;EAEA5G,kBAAkB,CAACgC,SAAD,CAAlB;;;;;;;;"} \ No newline at end of file
diff --git a/vendor/twbs/bootstrap/js/dist/tab.js b/vendor/twbs/bootstrap/js/dist/tab.js
index 757761d33..2d7c90b93 100644
--- a/vendor/twbs/bootstrap/js/dist/tab.js
+++ b/vendor/twbs/bootstrap/js/dist/tab.js
@@ -1,129 +1,188 @@
/*!
- * Bootstrap tab.js v4.6.0 (https://getbootstrap.com/)
+ * Bootstrap tab.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
- typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.jQuery, global.Util));
-}(this, (function ($, Util) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./base-component.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/selector-engine', './dom/data', './dom/event-handler', './base-component'], factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tab = factory(global.SelectorEngine, global.Data, global.EventHandler, global.Base));
+}(this, (function (SelectorEngine, Data, EventHandler, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
- var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
+ var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
+ var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
+ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
+ var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
+ const getSelector = element => {
+ let selector = element.getAttribute('data-bs-target');
+
+ if (!selector || selector === '#') {
+ let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
+ // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
+ // `document.querySelector` will rightfully complain it is invalid.
+ // See https://github.com/twbs/bootstrap/issues/32273
+
+ if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
+ return null;
+ } // Just in case some CMS puts out a full URL with the anchor appended
+
+
+ if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
+ hrefAttr = `#${hrefAttr.split('#')[1]}`;
+ }
+
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
}
- }
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
- }
+ return selector;
+ };
+
+ const getElementFromSelector = element => {
+ const selector = getSelector(element);
+ return selector ? document.querySelector(selector) : null;
+ };
+
+ const isDisabled = element => {
+ if (!element || element.nodeType !== Node.ELEMENT_NODE) {
+ return true;
+ }
+
+ if (element.classList.contains('disabled')) {
+ return true;
+ }
+
+ if (typeof element.disabled !== 'undefined') {
+ return element.disabled;
+ }
+
+ return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
+ };
+
+ const reflow = element => element.offsetHeight;
+
+ const getjQuery = () => {
+ const {
+ jQuery
+ } = window;
+
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ const onDOMContentLoaded = callback => {
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', callback);
+ } else {
+ callback();
+ }
+ };
+
+ const defineJQueryPlugin = plugin => {
+ onDOMContentLoaded(() => {
+ const $ = getjQuery();
+ /* istanbul ignore if */
+
+ if ($) {
+ const name = plugin.NAME;
+ const JQUERY_NO_CONFLICT = $.fn[name];
+ $.fn[name] = plugin.jQueryInterface;
+ $.fn[name].Constructor = plugin;
+
+ $.fn[name].noConflict = () => {
+ $.fn[name] = JQUERY_NO_CONFLICT;
+ return plugin.jQueryInterface;
+ };
+ }
+ });
+ };
/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.1): tab.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
- var NAME = 'tab';
- var VERSION = '4.6.0';
- var DATA_KEY = 'bs.tab';
- var EVENT_KEY = "." + DATA_KEY;
- var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
- var EVENT_HIDE = "hide" + EVENT_KEY;
- var EVENT_HIDDEN = "hidden" + EVENT_KEY;
- var EVENT_SHOW = "show" + EVENT_KEY;
- var EVENT_SHOWN = "shown" + EVENT_KEY;
- var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
- var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
- var CLASS_NAME_ACTIVE = 'active';
- var CLASS_NAME_DISABLED = 'disabled';
- var CLASS_NAME_FADE = 'fade';
- var CLASS_NAME_SHOW = 'show';
- var SELECTOR_DROPDOWN = '.dropdown';
- var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
- var SELECTOR_ACTIVE = '.active';
- var SELECTOR_ACTIVE_UL = '> li > .active';
- var SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]';
- var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
- var SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active';
+ const NAME = 'tab';
+ const DATA_KEY = 'bs.tab';
+ const EVENT_KEY = `.${DATA_KEY}`;
+ const DATA_API_KEY = '.data-api';
+ const EVENT_HIDE = `hide${EVENT_KEY}`;
+ const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
+ const EVENT_SHOW = `show${EVENT_KEY}`;
+ const EVENT_SHOWN = `shown${EVENT_KEY}`;
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
+ const CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
+ const CLASS_NAME_ACTIVE = 'active';
+ const CLASS_NAME_FADE = 'fade';
+ const CLASS_NAME_SHOW = 'show';
+ const SELECTOR_DROPDOWN = '.dropdown';
+ const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
+ const SELECTOR_ACTIVE = '.active';
+ const SELECTOR_ACTIVE_UL = ':scope > li > .active';
+ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]';
+ const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
+ const SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
- var Tab = /*#__PURE__*/function () {
- function Tab(element) {
- this._element = element;
- } // Getters
-
-
- var _proto = Tab.prototype;
+ class Tab extends BaseComponent__default['default'] {
+ // Getters
+ static get NAME() {
+ return NAME;
+ } // Public
- // Public
- _proto.show = function show() {
- var _this = this;
- if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $__default['default'](this._element).hasClass(CLASS_NAME_ACTIVE) || $__default['default'](this._element).hasClass(CLASS_NAME_DISABLED)) {
+ show() {
+ if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
return;
}
- var target;
- var previous;
- var listElement = $__default['default'](this._element).closest(SELECTOR_NAV_LIST_GROUP)[0];
- var selector = Util__default['default'].getSelectorFromElement(this._element);
+ let previous;
+ const target = getElementFromSelector(this._element);
+
+ const listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP);
if (listElement) {
- var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
- previous = $__default['default'].makeArray($__default['default'](listElement).find(itemSelector));
+ const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
+ previous = SelectorEngine__default['default'].find(itemSelector, listElement);
previous = previous[previous.length - 1];
}
- var hideEvent = $__default['default'].Event(EVENT_HIDE, {
+ const hideEvent = previous ? EventHandler__default['default'].trigger(previous, EVENT_HIDE, {
relatedTarget: this._element
- });
- var showEvent = $__default['default'].Event(EVENT_SHOW, {
+ }) : null;
+ const showEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW, {
relatedTarget: previous
});
- if (previous) {
- $__default['default'](previous).trigger(hideEvent);
- }
-
- $__default['default'](this._element).trigger(showEvent);
-
- if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
+ if (showEvent.defaultPrevented || hideEvent !== null && hideEvent.defaultPrevented) {
return;
}
- if (selector) {
- target = document.querySelector(selector);
- }
-
this._activate(this._element, listElement);
- var complete = function complete() {
- var hiddenEvent = $__default['default'].Event(EVENT_HIDDEN, {
- relatedTarget: _this._element
+ const complete = () => {
+ EventHandler__default['default'].trigger(previous, EVENT_HIDDEN, {
+ relatedTarget: this._element
});
- var shownEvent = $__default['default'].Event(EVENT_SHOWN, {
+ EventHandler__default['default'].trigger(this._element, EVENT_SHOWN, {
relatedTarget: previous
});
- $__default['default'](previous).trigger(hiddenEvent);
- $__default['default'](_this._element).trigger(shownEvent);
};
if (target) {
@@ -131,40 +190,32 @@
} else {
complete();
}
- };
-
- _proto.dispose = function dispose() {
- $__default['default'].removeData(this._element, DATA_KEY);
- this._element = null;
} // Private
- ;
- _proto._activate = function _activate(element, container, callback) {
- var _this2 = this;
- var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $__default['default'](container).find(SELECTOR_ACTIVE_UL) : $__default['default'](container).children(SELECTOR_ACTIVE);
- var active = activeElements[0];
- var isTransitioning = callback && active && $__default['default'](active).hasClass(CLASS_NAME_FADE);
+ _activate(element, container, callback) {
+ const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine__default['default'].find(SELECTOR_ACTIVE_UL, container) : SelectorEngine__default['default'].children(container, SELECTOR_ACTIVE);
+ const active = activeElements[0];
+ const isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE);
- var complete = function complete() {
- return _this2._transitionComplete(element, active, callback);
- };
+ const complete = () => this._transitionComplete(element, active, callback);
if (active && isTransitioning) {
- var transitionDuration = Util__default['default'].getTransitionDurationFromElement(active);
- $__default['default'](active).removeClass(CLASS_NAME_SHOW).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ active.classList.remove(CLASS_NAME_SHOW);
+
+ this._queueCallback(complete, element, true);
} else {
complete();
}
- };
+ }
- _proto._transitionComplete = function _transitionComplete(element, active, callback) {
+ _transitionComplete(element, active, callback) {
if (active) {
- $__default['default'](active).removeClass(CLASS_NAME_ACTIVE);
- var dropdownChild = $__default['default'](active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0];
+ active.classList.remove(CLASS_NAME_ACTIVE);
+ const dropdownChild = SelectorEngine__default['default'].findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode);
if (dropdownChild) {
- $__default['default'](dropdownChild).removeClass(CLASS_NAME_ACTIVE);
+ dropdownChild.classList.remove(CLASS_NAME_ACTIVE);
}
if (active.getAttribute('role') === 'tab') {
@@ -172,24 +223,29 @@
}
}
- $__default['default'](element).addClass(CLASS_NAME_ACTIVE);
+ element.classList.add(CLASS_NAME_ACTIVE);
if (element.getAttribute('role') === 'tab') {
element.setAttribute('aria-selected', true);
}
- Util__default['default'].reflow(element);
+ reflow(element);
if (element.classList.contains(CLASS_NAME_FADE)) {
element.classList.add(CLASS_NAME_SHOW);
}
- if (element.parentNode && $__default['default'](element.parentNode).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
- var dropdownElement = $__default['default'](element).closest(SELECTOR_DROPDOWN)[0];
+ let parent = element.parentNode;
+
+ if (parent && parent.nodeName === 'LI') {
+ parent = parent.parentNode;
+ }
+
+ if (parent && parent.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
+ const dropdownElement = element.closest(SELECTOR_DROPDOWN);
if (dropdownElement) {
- var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE));
- $__default['default'](dropdownToggleList).addClass(CLASS_NAME_ACTIVE);
+ SelectorEngine__default['default'].find(SELECTOR_DROPDOWN_TOGGLE, dropdownElement).forEach(dropdown => dropdown.classList.add(CLASS_NAME_ACTIVE));
}
element.setAttribute('aria-expanded', true);
@@ -199,37 +255,23 @@
callback();
}
} // Static
- ;
- Tab._jQueryInterface = function _jQueryInterface(config) {
- return this.each(function () {
- var $this = $__default['default'](this);
- var data = $this.data(DATA_KEY);
- if (!data) {
- data = new Tab(this);
- $this.data(DATA_KEY, data);
- }
+ static jQueryInterface(config) {
+ return this.each(function () {
+ const data = Data__default['default'].get(this, DATA_KEY) || new Tab(this);
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
- throw new TypeError("No method named \"" + config + "\"");
+ throw new TypeError(`No method named "${config}"`);
}
data[config]();
}
});
- };
-
- _createClass(Tab, null, [{
- key: "VERSION",
- get: function get() {
- return VERSION;
- }
- }]);
+ }
- return Tab;
- }();
+ }
/**
* ------------------------------------------------------------------------
* Data Api implementation
@@ -237,24 +279,26 @@
*/
- $__default['default'](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
- event.preventDefault();
+ EventHandler__default['default'].on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
+ if (['A', 'AREA'].includes(this.tagName)) {
+ event.preventDefault();
+ }
- Tab._jQueryInterface.call($__default['default'](this), 'show');
+ if (isDisabled(this)) {
+ return;
+ }
+
+ const data = Data__default['default'].get(this, DATA_KEY) || new Tab(this);
+ data.show();
});
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Tab to jQuery only if jQuery is present
*/
- $__default['default'].fn[NAME] = Tab._jQueryInterface;
- $__default['default'].fn[NAME].Constructor = Tab;
-
- $__default['default'].fn[NAME].noConflict = function () {
- $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
- return Tab._jQueryInterface;
- };
+ defineJQueryPlugin(Tab);
return Tab;
diff --git a/vendor/twbs/bootstrap/js/dist/tab.js.map b/vendor/twbs/bootstrap/js/dist/tab.js.map
index 58a93c71b..fc6b69828 100644
--- a/vendor/twbs/bootstrap/js/dist/tab.js.map
+++ b/vendor/twbs/bootstrap/js/dist/tab.js.map
@@ -1 +1 @@
-{"version":3,"file":"tab.js","sources":["../src/tab.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.0): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'tab'\nconst VERSION = '4.6.0'\nconst DATA_KEY = 'bs.tab'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_DISABLED = 'disabled'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_ACTIVE_UL = '> li > .active'\nconst SELECTOR_DATA_TOGGLE = '[data-toggle=\"tab\"], [data-toggle=\"pill\"], [data-toggle=\"list\"]'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\nconst SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Tab {\n constructor(element) {\n this._element = element\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n // Public\n\n show() {\n if (this._element.parentNode &&\n this._element.parentNode.nodeType === Node.ELEMENT_NODE &&\n $(this._element).hasClass(CLASS_NAME_ACTIVE) ||\n $(this._element).hasClass(CLASS_NAME_DISABLED)) {\n return\n }\n\n let target\n let previous\n const listElement = $(this._element).closest(SELECTOR_NAV_LIST_GROUP)[0]\n const selector = Util.getSelectorFromElement(this._element)\n\n if (listElement) {\n const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE\n previous = $.makeArray($(listElement).find(itemSelector))\n previous = previous[previous.length - 1]\n }\n\n const hideEvent = $.Event(EVENT_HIDE, {\n relatedTarget: this._element\n })\n\n const showEvent = $.Event(EVENT_SHOW, {\n relatedTarget: previous\n })\n\n if (previous) {\n $(previous).trigger(hideEvent)\n }\n\n $(this._element).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented() ||\n hideEvent.isDefaultPrevented()) {\n return\n }\n\n if (selector) {\n target = document.querySelector(selector)\n }\n\n this._activate(\n this._element,\n listElement\n )\n\n const complete = () => {\n const hiddenEvent = $.Event(EVENT_HIDDEN, {\n relatedTarget: this._element\n })\n\n const shownEvent = $.Event(EVENT_SHOWN, {\n relatedTarget: previous\n })\n\n $(previous).trigger(hiddenEvent)\n $(this._element).trigger(shownEvent)\n }\n\n if (target) {\n this._activate(target, target.parentNode, complete)\n } else {\n complete()\n }\n }\n\n dispose() {\n $.removeData(this._element, DATA_KEY)\n this._element = null\n }\n\n // Private\n\n _activate(element, container, callback) {\n const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ?\n $(container).find(SELECTOR_ACTIVE_UL) :\n $(container).children(SELECTOR_ACTIVE)\n\n const active = activeElements[0]\n const isTransitioning = callback && (active && $(active).hasClass(CLASS_NAME_FADE))\n const complete = () => this._transitionComplete(\n element,\n active,\n callback\n )\n\n if (active && isTransitioning) {\n const transitionDuration = Util.getTransitionDurationFromElement(active)\n\n $(active)\n .removeClass(CLASS_NAME_SHOW)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n complete()\n }\n }\n\n _transitionComplete(element, active, callback) {\n if (active) {\n $(active).removeClass(CLASS_NAME_ACTIVE)\n\n const dropdownChild = $(active.parentNode).find(\n SELECTOR_DROPDOWN_ACTIVE_CHILD\n )[0]\n\n if (dropdownChild) {\n $(dropdownChild).removeClass(CLASS_NAME_ACTIVE)\n }\n\n if (active.getAttribute('role') === 'tab') {\n active.setAttribute('aria-selected', false)\n }\n }\n\n $(element).addClass(CLASS_NAME_ACTIVE)\n if (element.getAttribute('role') === 'tab') {\n element.setAttribute('aria-selected', true)\n }\n\n Util.reflow(element)\n\n if (element.classList.contains(CLASS_NAME_FADE)) {\n element.classList.add(CLASS_NAME_SHOW)\n }\n\n if (element.parentNode && $(element.parentNode).hasClass(CLASS_NAME_DROPDOWN_MENU)) {\n const dropdownElement = $(element).closest(SELECTOR_DROPDOWN)[0]\n\n if (dropdownElement) {\n const dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE))\n\n $(dropdownToggleList).addClass(CLASS_NAME_ACTIVE)\n }\n\n element.setAttribute('aria-expanded', true)\n }\n\n if (callback) {\n callback()\n }\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $this = $(this)\n let data = $this.data(DATA_KEY)\n\n if (!data) {\n data = new Tab(this)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n$(document)\n .on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n event.preventDefault()\n Tab._jQueryInterface.call($(this), 'show')\n })\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Tab._jQueryInterface\n$.fn[NAME].Constructor = Tab\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tab._jQueryInterface\n}\n\nexport default Tab\n"],"names":["NAME","VERSION","DATA_KEY","EVENT_KEY","DATA_API_KEY","JQUERY_NO_CONFLICT","$","fn","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_CLICK_DATA_API","CLASS_NAME_DROPDOWN_MENU","CLASS_NAME_ACTIVE","CLASS_NAME_DISABLED","CLASS_NAME_FADE","CLASS_NAME_SHOW","SELECTOR_DROPDOWN","SELECTOR_NAV_LIST_GROUP","SELECTOR_ACTIVE","SELECTOR_ACTIVE_UL","SELECTOR_DATA_TOGGLE","SELECTOR_DROPDOWN_TOGGLE","SELECTOR_DROPDOWN_ACTIVE_CHILD","Tab","element","_element","show","parentNode","nodeType","Node","ELEMENT_NODE","hasClass","target","previous","listElement","closest","selector","Util","getSelectorFromElement","itemSelector","nodeName","makeArray","find","length","hideEvent","Event","relatedTarget","showEvent","trigger","isDefaultPrevented","document","querySelector","_activate","complete","hiddenEvent","shownEvent","dispose","removeData","container","callback","activeElements","children","active","isTransitioning","_transitionComplete","transitionDuration","getTransitionDurationFromElement","removeClass","one","TRANSITION_END","emulateTransitionEnd","dropdownChild","getAttribute","setAttribute","addClass","reflow","classList","contains","add","dropdownElement","dropdownToggleList","slice","call","querySelectorAll","_jQueryInterface","config","each","$this","data","TypeError","on","event","preventDefault","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUA;EACA;EACA;EACA;EACA;;EAEA,IAAMA,IAAI,GAAG,KAAb;EACA,IAAMC,OAAO,GAAG,OAAhB;EACA,IAAMC,QAAQ,GAAG,QAAjB;EACA,IAAMC,SAAS,SAAOD,QAAtB;EACA,IAAME,YAAY,GAAG,WAArB;EACA,IAAMC,kBAAkB,GAAGC,qBAAC,CAACC,EAAF,CAAKP,IAAL,CAA3B;EAEA,IAAMQ,UAAU,YAAUL,SAA1B;EACA,IAAMM,YAAY,cAAYN,SAA9B;EACA,IAAMO,UAAU,YAAUP,SAA1B;EACA,IAAMQ,WAAW,aAAWR,SAA5B;EACA,IAAMS,oBAAoB,aAAWT,SAAX,GAAuBC,YAAjD;EAEA,IAAMS,wBAAwB,GAAG,eAAjC;EACA,IAAMC,iBAAiB,GAAG,QAA1B;EACA,IAAMC,mBAAmB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0B9E,qBAAC,CAAC,IAAD,CAA3B,EAAmC,MAAnC;EACD,CAJH;EAMA;EACA;EACA;EACA;EACA;;AAEAA,uBAAC,CAACC,EAAF,CAAKP,IAAL,IAAayB,GAAG,CAAC6D,gBAAjB;AACAhF,uBAAC,CAACC,EAAF,CAAKP,IAAL,EAAW+F,WAAX,GAAyBtE,GAAzB;;AACAnB,uBAAC,CAACC,EAAF,CAAKP,IAAL,EAAWgG,UAAX,GAAwB,YAAM;EAC5B1F,EAAAA,qBAAC,CAACC,EAAF,CAAKP,IAAL,IAAaK,kBAAb;EACA,SAAOoB,GAAG,CAAC6D,gBAAX;EACD,CAHD;;;;;;;;"} \ No newline at end of file
+{"version":3,"file":"tab.js","sources":["../src/util/index.js","../src/tab.js"],"sourcesContent":["import SelectorEngine from '../dom/selector-engine'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = `#${hrefAttr.split('#')[1]}`\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => {\n if (!obj || typeof obj !== 'object') {\n return false\n }\n\n if (typeof obj.jquery !== 'undefined') {\n obj = obj[0]\n }\n\n return typeof obj.nodeType !== 'undefined'\n}\n\nconst getElement = obj => {\n if (isElement(obj)) { // it's a jQuery object or a node element\n return obj.jquery ? obj[0] : obj\n }\n\n if (typeof obj === 'string' && obj.length > 0) {\n return SelectorEngine.findOne(obj)\n }\n\n return null\n}\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = callback => {\n if (typeof callback === 'function') {\n callback()\n }\n}\n\nexport {\n getElement,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n isDisabled,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin,\n execute\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getElementFromSelector,\n isDisabled,\n reflow\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'tab'\nconst DATA_KEY = 'bs.tab'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_ACTIVE_UL = ':scope > li > .active'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"tab\"], [data-bs-toggle=\"pill\"], [data-bs-toggle=\"list\"]'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\nconst SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Tab extends BaseComponent {\n // Getters\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n show() {\n if ((this._element.parentNode &&\n this._element.parentNode.nodeType === Node.ELEMENT_NODE &&\n this._element.classList.contains(CLASS_NAME_ACTIVE))) {\n return\n }\n\n let previous\n const target = getElementFromSelector(this._element)\n const listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP)\n\n if (listElement) {\n const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE\n previous = SelectorEngine.find(itemSelector, listElement)\n previous = previous[previous.length - 1]\n }\n\n const hideEvent = previous ?\n EventHandler.trigger(previous, EVENT_HIDE, {\n relatedTarget: this._element\n }) :\n null\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {\n relatedTarget: previous\n })\n\n if (showEvent.defaultPrevented || (hideEvent !== null && hideEvent.defaultPrevented)) {\n return\n }\n\n this._activate(this._element, listElement)\n\n const complete = () => {\n EventHandler.trigger(previous, EVENT_HIDDEN, {\n relatedTarget: this._element\n })\n EventHandler.trigger(this._element, EVENT_SHOWN, {\n relatedTarget: previous\n })\n }\n\n if (target) {\n this._activate(target, target.parentNode, complete)\n } else {\n complete()\n }\n }\n\n // Private\n\n _activate(element, container, callback) {\n const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ?\n SelectorEngine.find(SELECTOR_ACTIVE_UL, container) :\n SelectorEngine.children(container, SELECTOR_ACTIVE)\n\n const active = activeElements[0]\n const isTransitioning = callback && (active && active.classList.contains(CLASS_NAME_FADE))\n\n const complete = () => this._transitionComplete(element, active, callback)\n\n if (active && isTransitioning) {\n active.classList.remove(CLASS_NAME_SHOW)\n this._queueCallback(complete, element, true)\n } else {\n complete()\n }\n }\n\n _transitionComplete(element, active, callback) {\n if (active) {\n active.classList.remove(CLASS_NAME_ACTIVE)\n\n const dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode)\n\n if (dropdownChild) {\n dropdownChild.classList.remove(CLASS_NAME_ACTIVE)\n }\n\n if (active.getAttribute('role') === 'tab') {\n active.setAttribute('aria-selected', false)\n }\n }\n\n element.classList.add(CLASS_NAME_ACTIVE)\n if (element.getAttribute('role') === 'tab') {\n element.setAttribute('aria-selected', true)\n }\n\n reflow(element)\n\n if (element.classList.contains(CLASS_NAME_FADE)) {\n element.classList.add(CLASS_NAME_SHOW)\n }\n\n let parent = element.parentNode\n if (parent && parent.nodeName === 'LI') {\n parent = parent.parentNode\n }\n\n if (parent && parent.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {\n const dropdownElement = element.closest(SELECTOR_DROPDOWN)\n\n if (dropdownElement) {\n SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE, dropdownElement)\n .forEach(dropdown => dropdown.classList.add(CLASS_NAME_ACTIVE))\n }\n\n element.setAttribute('aria-expanded', true)\n }\n\n if (callback) {\n callback()\n }\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Data.get(this, DATA_KEY) || new Tab(this)\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault()\n }\n\n if (isDisabled(this)) {\n return\n }\n\n const data = Data.get(this, DATA_KEY) || new Tab(this)\n data.show()\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Tab to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Tab)\n\nexport default Tab\n"],"names":["getSelector","element","selector","getAttribute","hrefAttr","includes","startsWith","split","trim","getElementFromSelector","document","querySelector","isDisabled","nodeType","Node","ELEMENT_NODE","classList","contains","disabled","hasAttribute","reflow","offsetHeight","getjQuery","jQuery","window","body","onDOMContentLoaded","callback","readyState","addEventListener","defineJQueryPlugin","plugin","$","name","NAME","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","DATA_KEY","EVENT_KEY","DATA_API_KEY","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_CLICK_DATA_API","CLASS_NAME_DROPDOWN_MENU","CLASS_NAME_ACTIVE","CLASS_NAME_FADE","CLASS_NAME_SHOW","SELECTOR_DROPDOWN","SELECTOR_NAV_LIST_GROUP","SELECTOR_ACTIVE","SELECTOR_ACTIVE_UL","SELECTOR_DATA_TOGGLE","SELECTOR_DROPDOWN_TOGGLE","SELECTOR_DROPDOWN_ACTIVE_CHILD","Tab","BaseComponent","show","_element","parentNode","previous","target","listElement","closest","itemSelector","nodeName","SelectorEngine","find","length","hideEvent","EventHandler","trigger","relatedTarget","showEvent","defaultPrevented","_activate","complete","container","activeElements","children","active","isTransitioning","_transitionComplete","remove","_queueCallback","dropdownChild","findOne","setAttribute","add","parent","dropdownElement","forEach","dropdown","config","each","data","Data","get","TypeError","on","event","tagName","preventDefault"],"mappings":";;;;;;;;;;;;;;;;;;EAoCA,MAAMA,WAAW,GAAGC,OAAO,IAAI;EAC7B,MAAIC,QAAQ,G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eAArB,EAAsC,IAAtC;EACD;;EAED,QAAIhE,QAAJ,EAAc;EACZA,MAAAA,QAAQ;EACT;EACF,GA3H6B;;;EA+HR,SAAfU,eAAe,CAAC4D,MAAD,EAAS;EAC7B,WAAO,KAAKC,IAAL,CAAU,YAAY;EAC3B,YAAMC,IAAI,GAAGC,wBAAI,CAACC,GAAL,CAAS,IAAT,EAAe7D,QAAf,KAA4B,IAAImB,GAAJ,CAAQ,IAAR,CAAzC;;EAEA,UAAI,OAAOsC,MAAP,KAAkB,QAAtB,EAAgC;EAC9B,YAAI,OAAOE,IAAI,CAACF,MAAD,CAAX,KAAwB,WAA5B,EAAyC;EACvC,gBAAM,IAAIK,SAAJ,CAAe,oBAAmBL,MAAO,GAAzC,CAAN;EACD;;EAEDE,QAAAA,IAAI,CAACF,MAAD,CAAJ;EACD;EACF,KAVM,CAAP;EAWD;;EA3I6B;EA8IhC;EACA;EACA;EACA;EACA;;;AAEAvB,kCAAY,CAAC6B,EAAb,CAAgB7F,QAAhB,EAA0BqC,oBAA1B,EAAgDS,oBAAhD,EAAsE,UAAUgD,KAAV,EAAiB;EACrF,MAAI,CAAC,GAAD,EAAM,MAAN,EAAcnG,QAAd,CAAuB,KAAKoG,OAA5B,CAAJ,EAA0C;EACxCD,IAAAA,KAAK,CAACE,cAAN;EACD;;EAED,MAAI9F,UAAU,CAAC,IAAD,CAAd,EAAsB;EACpB;EACD;;EAED,QAAMuF,IAAI,GAAGC,wBAAI,CAACC,GAAL,CAAS,IAAT,EAAe7D,QAAf,KAA4B,IAAImB,GAAJ,CAAQ,IAAR,CAAzC;EACAwC,EAAAA,IAAI,CAACtC,IAAL;EACD,CAXD;EAaA;EACA;EACA;EACA;EACA;EACA;;EAEA/B,kBAAkB,CAAC6B,GAAD,CAAlB;;;;;;;;"} \ No newline at end of file
diff --git a/vendor/twbs/bootstrap/js/dist/toast.js b/vendor/twbs/bootstrap/js/dist/toast.js
index 62694e44b..1d3d9854f 100644
--- a/vendor/twbs/bootstrap/js/dist/toast.js
+++ b/vendor/twbs/bootstrap/js/dist/toast.js
@@ -1,110 +1,168 @@
/*!
- * Bootstrap toast.js v4.6.0 (https://getbootstrap.com/)
+ * Bootstrap toast.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
- typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.jQuery, global.Util));
-}(this, (function ($, Util) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.Data, global.EventHandler, global.Manipulator, global.Base));
+}(this, (function (Data, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
- var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
+ var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
+ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
+ var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
+ var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
+ const toType = obj => {
+ if (obj === null || obj === undefined) {
+ return `${obj}`;
}
- }
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
- }
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
+ };
- function _extends() {
- _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
+ const isElement = obj => {
+ if (!obj || typeof obj !== 'object') {
+ return false;
+ }
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
+ if (typeof obj.jquery !== 'undefined') {
+ obj = obj[0];
+ }
+
+ return typeof obj.nodeType !== 'undefined';
+ };
+
+ const typeCheckConfig = (componentName, config, configTypes) => {
+ Object.keys(configTypes).forEach(property => {
+ const expectedTypes = configTypes[property];
+ const value = config[property];
+ const valueType = value && isElement(value) ? 'element' : toType(value);
+
+ if (!new RegExp(expectedTypes).test(valueType)) {
+ throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
}
+ });
+ };
- return target;
- };
+ const reflow = element => element.offsetHeight;
- return _extends.apply(this, arguments);
- }
+ const getjQuery = () => {
+ const {
+ jQuery
+ } = window;
+
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ const onDOMContentLoaded = callback => {
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', callback);
+ } else {
+ callback();
+ }
+ };
+
+ const defineJQueryPlugin = plugin => {
+ onDOMContentLoaded(() => {
+ const $ = getjQuery();
+ /* istanbul ignore if */
+
+ if ($) {
+ const name = plugin.NAME;
+ const JQUERY_NO_CONFLICT = $.fn[name];
+ $.fn[name] = plugin.jQueryInterface;
+ $.fn[name].Constructor = plugin;
+
+ $.fn[name].noConflict = () => {
+ $.fn[name] = JQUERY_NO_CONFLICT;
+ return plugin.jQueryInterface;
+ };
+ }
+ });
+ };
/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.1): toast.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
- var NAME = 'toast';
- var VERSION = '4.6.0';
- var DATA_KEY = 'bs.toast';
- var EVENT_KEY = "." + DATA_KEY;
- var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
- var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
- var EVENT_HIDE = "hide" + EVENT_KEY;
- var EVENT_HIDDEN = "hidden" + EVENT_KEY;
- var EVENT_SHOW = "show" + EVENT_KEY;
- var EVENT_SHOWN = "shown" + EVENT_KEY;
- var CLASS_NAME_FADE = 'fade';
- var CLASS_NAME_HIDE = 'hide';
- var CLASS_NAME_SHOW = 'show';
- var CLASS_NAME_SHOWING = 'showing';
- var DefaultType = {
+ const NAME = 'toast';
+ const DATA_KEY = 'bs.toast';
+ const EVENT_KEY = `.${DATA_KEY}`;
+ const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
+ const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
+ const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
+ const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
+ const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;
+ const EVENT_HIDE = `hide${EVENT_KEY}`;
+ const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
+ const EVENT_SHOW = `show${EVENT_KEY}`;
+ const EVENT_SHOWN = `shown${EVENT_KEY}`;
+ const CLASS_NAME_FADE = 'fade';
+ const CLASS_NAME_HIDE = 'hide';
+ const CLASS_NAME_SHOW = 'show';
+ const CLASS_NAME_SHOWING = 'showing';
+ const DefaultType = {
animation: 'boolean',
autohide: 'boolean',
delay: 'number'
};
- var Default = {
+ const Default = {
animation: true,
autohide: true,
- delay: 500
+ delay: 5000
};
- var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
+ const SELECTOR_DATA_DISMISS = '[data-bs-dismiss="toast"]';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
- var Toast = /*#__PURE__*/function () {
- function Toast(element, config) {
- this._element = element;
+ class Toast extends BaseComponent__default['default'] {
+ constructor(element, config) {
+ super(element);
this._config = this._getConfig(config);
this._timeout = null;
+ this._hasMouseInteraction = false;
+ this._hasKeyboardInteraction = false;
this._setListeners();
} // Getters
- var _proto = Toast.prototype;
+ static get DefaultType() {
+ return DefaultType;
+ }
- // Public
- _proto.show = function show() {
- var _this = this;
+ static get Default() {
+ return Default;
+ }
- var showEvent = $__default['default'].Event(EVENT_SHOW);
- $__default['default'](this._element).trigger(showEvent);
+ static get NAME() {
+ return NAME;
+ } // Public
- if (showEvent.isDefaultPrevented()) {
+
+ show() {
+ const showEvent = EventHandler__default['default'].trigger(this._element, EVENT_SHOW);
+
+ if (showEvent.defaultPrevented) {
return;
}
@@ -114,157 +172,153 @@
this._element.classList.add(CLASS_NAME_FADE);
}
- var complete = function complete() {
- _this._element.classList.remove(CLASS_NAME_SHOWING);
+ const complete = () => {
+ this._element.classList.remove(CLASS_NAME_SHOWING);
- _this._element.classList.add(CLASS_NAME_SHOW);
+ this._element.classList.add(CLASS_NAME_SHOW);
- $__default['default'](_this._element).trigger(EVENT_SHOWN);
+ EventHandler__default['default'].trigger(this._element, EVENT_SHOWN);
- if (_this._config.autohide) {
- _this._timeout = setTimeout(function () {
- _this.hide();
- }, _this._config.delay);
- }
+ this._maybeScheduleHide();
};
this._element.classList.remove(CLASS_NAME_HIDE);
- Util__default['default'].reflow(this._element);
+ reflow(this._element);
this._element.classList.add(CLASS_NAME_SHOWING);
- if (this._config.animation) {
- var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
- $__default['default'](this._element).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
- } else {
- complete();
- }
- };
+ this._queueCallback(complete, this._element, this._config.animation);
+ }
- _proto.hide = function hide() {
+ hide() {
if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
return;
}
- var hideEvent = $__default['default'].Event(EVENT_HIDE);
- $__default['default'](this._element).trigger(hideEvent);
+ const hideEvent = EventHandler__default['default'].trigger(this._element, EVENT_HIDE);
- if (hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
return;
}
- this._close();
- };
+ const complete = () => {
+ this._element.classList.add(CLASS_NAME_HIDE);
+
+ EventHandler__default['default'].trigger(this._element, EVENT_HIDDEN);
+ };
- _proto.dispose = function dispose() {
+ this._element.classList.remove(CLASS_NAME_SHOW);
+
+ this._queueCallback(complete, this._element, this._config.animation);
+ }
+
+ dispose() {
this._clearTimeout();
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
this._element.classList.remove(CLASS_NAME_SHOW);
}
- $__default['default'](this._element).off(EVENT_CLICK_DISMISS);
- $__default['default'].removeData(this._element, DATA_KEY);
- this._element = null;
- this._config = null;
+ super.dispose();
} // Private
- ;
- _proto._getConfig = function _getConfig(config) {
- config = _extends({}, Default, $__default['default'](this._element).data(), typeof config === 'object' && config ? config : {});
- Util__default['default'].typeCheckConfig(NAME, config, this.constructor.DefaultType);
+
+ _getConfig(config) {
+ config = { ...Default,
+ ...Manipulator__default['default'].getDataAttributes(this._element),
+ ...(typeof config === 'object' && config ? config : {})
+ };
+ typeCheckConfig(NAME, config, this.constructor.DefaultType);
return config;
- };
+ }
- _proto._setListeners = function _setListeners() {
- var _this2 = this;
+ _maybeScheduleHide() {
+ if (!this._config.autohide) {
+ return;
+ }
- $__default['default'](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
- return _this2.hide();
- });
- };
+ if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
+ return;
+ }
- _proto._close = function _close() {
- var _this3 = this;
+ this._timeout = setTimeout(() => {
+ this.hide();
+ }, this._config.delay);
+ }
- var complete = function complete() {
- _this3._element.classList.add(CLASS_NAME_HIDE);
+ _onInteraction(event, isInteracting) {
+ switch (event.type) {
+ case 'mouseover':
+ case 'mouseout':
+ this._hasMouseInteraction = isInteracting;
+ break;
+
+ case 'focusin':
+ case 'focusout':
+ this._hasKeyboardInteraction = isInteracting;
+ break;
+ }
- $__default['default'](_this3._element).trigger(EVENT_HIDDEN);
- };
+ if (isInteracting) {
+ this._clearTimeout();
- this._element.classList.remove(CLASS_NAME_SHOW);
+ return;
+ }
- if (this._config.animation) {
- var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this._element);
- $__default['default'](this._element).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
- } else {
- complete();
+ const nextElement = event.relatedTarget;
+
+ if (this._element === nextElement || this._element.contains(nextElement)) {
+ return;
}
- };
- _proto._clearTimeout = function _clearTimeout() {
+ this._maybeScheduleHide();
+ }
+
+ _setListeners() {
+ EventHandler__default['default'].on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide());
+ EventHandler__default['default'].on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
+ EventHandler__default['default'].on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
+ EventHandler__default['default'].on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
+ EventHandler__default['default'].on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
+ }
+
+ _clearTimeout() {
clearTimeout(this._timeout);
this._timeout = null;
} // Static
- ;
- Toast._jQueryInterface = function _jQueryInterface(config) {
+
+ static jQueryInterface(config) {
return this.each(function () {
- var $element = $__default['default'](this);
- var data = $element.data(DATA_KEY);
+ let data = Data__default['default'].get(this, DATA_KEY);
- var _config = typeof config === 'object' && config;
+ const _config = typeof config === 'object' && config;
if (!data) {
data = new Toast(this, _config);
- $element.data(DATA_KEY, data);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
- throw new TypeError("No method named \"" + config + "\"");
+ throw new TypeError(`No method named "${config}"`);
}
data[config](this);
}
});
- };
-
- _createClass(Toast, null, [{
- key: "VERSION",
- get: function get() {
- return VERSION;
- }
- }, {
- key: "DefaultType",
- get: function get() {
- return DefaultType;
- }
- }, {
- key: "Default",
- get: function get() {
- return Default;
- }
- }]);
+ }
- return Toast;
- }();
+ }
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Toast to jQuery only if jQuery is present
*/
- $__default['default'].fn[NAME] = Toast._jQueryInterface;
- $__default['default'].fn[NAME].Constructor = Toast;
-
- $__default['default'].fn[NAME].noConflict = function () {
- $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
- return Toast._jQueryInterface;
- };
+ defineJQueryPlugin(Toast);
return Toast;
diff --git a/vendor/twbs/bootstrap/js/dist/toast.js.map b/vendor/twbs/bootstrap/js/dist/toast.js.map
index eafaad649..ff0827174 100644
--- a/vendor/twbs/bootstrap/js/dist/toast.js.map
+++ b/vendor/twbs/bootstrap/js/dist/toast.js.map
@@ -1 +1 @@
-{"version":3,"file":"toast.js","sources":["../src/toast.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.0): toast.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'toast'\nconst VERSION = '4.6.0'\nconst DATA_KEY = 'bs.toast'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\n\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_HIDE = 'hide'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_SHOWING = 'showing'\n\nconst DefaultType = {\n animation: 'boolean',\n autohide: 'boolean',\n delay: 'number'\n}\n\nconst Default = {\n animation: true,\n autohide: true,\n delay: 500\n}\n\nconst SELECTOR_DATA_DISMISS = '[data-dismiss=\"toast\"]'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Toast {\n constructor(element, config) {\n this._element = element\n this._config = this._getConfig(config)\n this._timeout = null\n this._setListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n show() {\n const showEvent = $.Event(EVENT_SHOW)\n\n $(this._element).trigger(showEvent)\n if (showEvent.isDefaultPrevented()) {\n return\n }\n\n this._clearTimeout()\n\n if (this._config.animation) {\n this._element.classList.add(CLASS_NAME_FADE)\n }\n\n const complete = () => {\n this._element.classList.remove(CLASS_NAME_SHOWING)\n this._element.classList.add(CLASS_NAME_SHOW)\n\n $(this._element).trigger(EVENT_SHOWN)\n\n if (this._config.autohide) {\n this._timeout = setTimeout(() => {\n this.hide()\n }, this._config.delay)\n }\n }\n\n this._element.classList.remove(CLASS_NAME_HIDE)\n Util.reflow(this._element)\n this._element.classList.add(CLASS_NAME_SHOWING)\n if (this._config.animation) {\n const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n complete()\n }\n }\n\n hide() {\n if (!this._element.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const hideEvent = $.Event(EVENT_HIDE)\n\n $(this._element).trigger(hideEvent)\n if (hideEvent.isDefaultPrevented()) {\n return\n }\n\n this._close()\n }\n\n dispose() {\n this._clearTimeout()\n\n if (this._element.classList.contains(CLASS_NAME_SHOW)) {\n this._element.classList.remove(CLASS_NAME_SHOW)\n }\n\n $(this._element).off(EVENT_CLICK_DISMISS)\n\n $.removeData(this._element, DATA_KEY)\n this._element = null\n this._config = null\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...$(this._element).data(),\n ...(typeof config === 'object' && config ? config : {})\n }\n\n Util.typeCheckConfig(\n NAME,\n config,\n this.constructor.DefaultType\n )\n\n return config\n }\n\n _setListeners() {\n $(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide())\n }\n\n _close() {\n const complete = () => {\n this._element.classList.add(CLASS_NAME_HIDE)\n $(this._element).trigger(EVENT_HIDDEN)\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW)\n if (this._config.animation) {\n const transitionDuration = Util.getTransitionDurationFromElement(this._element)\n\n $(this._element)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n complete()\n }\n }\n\n _clearTimeout() {\n clearTimeout(this._timeout)\n this._timeout = null\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $element = $(this)\n let data = $element.data(DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data) {\n data = new Toast(this, _config)\n $element.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](this)\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Toast._jQueryInterface\n$.fn[NAME].Constructor = Toast\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Toast._jQueryInterface\n}\n\nexport default Toast\n"],"names":["NAME","VERSION","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","$","fn","EVENT_CLICK_DISMISS","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","CLASS_NAME_FADE","CLASS_NAME_HIDE","CLASS_NAME_SHOW","CLASS_NAME_SHOWING","DefaultType","animation","autohide","delay","Default","SELECTOR_DATA_DISMISS","Toast","element","config","_element","_config","_getConfig","_timeout","_setListeners","show","showEvent","Event","trigger","isDefaultPrevented","_clearTimeout","classList","add","complete","remove","setTimeout","hide","Util","reflow","transitionDuration","getTransitionDurationFromElement","one","TRANSITION_END","emulateTransitionEnd","contains","hideEvent","_close","dispose","off","removeData","data","typeCheckConfig","constructor","on","clearTimeout","_jQueryInterface","each","$element","TypeError","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUA;EACA;EACA;EACA;EACA;;EAEA,IAAMA,IAAI,GAAG,OAAb;EACA,IAAMC,OAAO,GAAG,OAAhB;EACA,IAAMC,QAAQ,GAAG,UAAjB;EACA,IAAMC,SAAS,SAAOD,QAAtB;EACA,IAAME,kBAAkB,GAAGC,qBAAC,CAACC,EAAF,CAAKN,IAAL,CAA3B;EAEA,IAAMO,mBAAmB,qBAAmBJ,SAA5C;EACA,IAAMK,UAAU,YAAUL,SAA1B;EACA,IAAMM,YAAY,cAAYN,SAA9B;EACA,IAAMO,UAAU,YAAUP,SAA1B;EACA,IAAMQ,WAAW,aAAWR,SAA5B;EAEA,IAAMS,eAAe,GAAG,MAAxB;EACA,IAAMC,eAAe,GAAG,MAAxB;EACA,IAAMC,eAAe,GAAG,MAAxB;EACA,IAAMC,kBAAkB,GAAG,SAA3B;EAEA,IAAMC,WAAW,GAAG;EAClBC,EAAAA,SAAS,EAAE,SADO;EAElBC,EAAAA,QAAQ,EAAE,SAFQ;EAGlBC,EAAAA,KAAK,EAAE;EAHW,CAApB;EAMA,IAAMC,OAAO,GAAG;EACdH,EAAAA,SAAS,EAAE,IADG;EAEdC,EAAAA,QAAQ,EAAE,IAFI;EAGdC,EAAAA,KAAK,EAAE;EA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ast.js","sources":["../src/util/index.js","../src/toast.js"],"sourcesContent":["import SelectorEngine from '../dom/selector-engine'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = `#${hrefAttr.split('#')[1]}`\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => {\n if (!obj || typeof obj !== 'object') {\n return false\n }\n\n if (typeof obj.jquery !== 'undefined') {\n obj = obj[0]\n }\n\n return typeof obj.nodeType !== 'undefined'\n}\n\nconst getElement = obj => {\n if (isElement(obj)) { // it's a jQuery object or a node element\n return obj.jquery ? obj[0] : obj\n }\n\n if (typeof obj === 'string' && obj.length > 0) {\n return SelectorEngine.findOne(obj)\n }\n\n return null\n}\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = callback => {\n if (typeof callback === 'function') {\n callback()\n }\n}\n\nexport {\n getElement,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n isDisabled,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin,\n execute\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): toast.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n reflow,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'toast'\nconst DATA_KEY = 'bs.toast'\nconst EVENT_KEY = `.${DATA_KEY}`\n\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`\nconst EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`\nconst EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`\nconst EVENT_FOCUSIN = `focusin${EVENT_KEY}`\nconst EVENT_FOCUSOUT = `focusout${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_HIDE = 'hide'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_SHOWING = 'showing'\n\nconst DefaultType = {\n animation: 'boolean',\n autohide: 'boolean',\n delay: 'number'\n}\n\nconst Default = {\n animation: true,\n autohide: true,\n delay: 5000\n}\n\nconst SELECTOR_DATA_DISMISS = '[data-bs-dismiss=\"toast\"]'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Toast extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._config = this._getConfig(config)\n this._timeout = null\n this._hasMouseInteraction = false\n this._hasKeyboardInteraction = false\n this._setListeners()\n }\n\n // Getters\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n show() {\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW)\n\n if (showEvent.defaultPrevented) {\n return\n }\n\n this._clearTimeout()\n\n if (this._config.animation) {\n this._element.classList.add(CLASS_NAME_FADE)\n }\n\n const complete = () => {\n this._element.classList.remove(CLASS_NAME_SHOWING)\n this._element.classList.add(CLASS_NAME_SHOW)\n\n EventHandler.trigger(this._element, EVENT_SHOWN)\n\n this._maybeScheduleHide()\n }\n\n this._element.classList.remove(CLASS_NAME_HIDE)\n reflow(this._element)\n this._element.classList.add(CLASS_NAME_SHOWING)\n\n this._queueCallback(complete, this._element, this._config.animation)\n }\n\n hide() {\n if (!this._element.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n if (hideEvent.defaultPrevented) {\n return\n }\n\n const complete = () => {\n this._element.classList.add(CLASS_NAME_HIDE)\n EventHandler.trigger(this._element, EVENT_HIDDEN)\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW)\n this._queueCallback(complete, this._element, this._config.animation)\n }\n\n dispose() {\n this._clearTimeout()\n\n if (this._element.classList.contains(CLASS_NAME_SHOW)) {\n this._element.classList.remove(CLASS_NAME_SHOW)\n }\n\n super.dispose()\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' && config ? config : {})\n }\n\n typeCheckConfig(NAME, config, this.constructor.DefaultType)\n\n return config\n }\n\n _maybeScheduleHide() {\n if (!this._config.autohide) {\n return\n }\n\n if (this._hasMouseInteraction || this._hasKeyboardInteraction) {\n return\n }\n\n this._timeout = setTimeout(() => {\n this.hide()\n }, this._config.delay)\n }\n\n _onInteraction(event, isInteracting) {\n switch (event.type) {\n case 'mouseover':\n case 'mouseout':\n this._hasMouseInteraction = isInteracting\n break\n case 'focusin':\n case 'focusout':\n this._hasKeyboardInteraction = isInteracting\n break\n default:\n break\n }\n\n if (isInteracting) {\n this._clearTimeout()\n return\n }\n\n const nextElement = event.relatedTarget\n if (this._element === nextElement || this._element.contains(nextElement)) {\n return\n }\n\n this._maybeScheduleHide()\n }\n\n _setListeners() {\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide())\n EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true))\n EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false))\n EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true))\n EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false))\n }\n\n _clearTimeout() {\n clearTimeout(this._timeout)\n this._timeout = null\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.get(this, DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data) {\n data = new Toast(this, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](this)\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Toast to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Toast)\n\nexport default Toast\n"],"names":["toType","obj","undefined","toString","call","match","toLowerCase","isElement","jquery","nodeType","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","TypeError","toUpperCase","reflow","element","offsetHeight","getjQuery","jQuery","window","document","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","defineJQueryPlugin","plugin","$","name","NAME","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","DATA_KEY","EVENT_KEY","EVENT_CLICK_DISMISS","EVENT_MOUSEOVER","EVENT_MOUSEOUT","EVENT_FOCUSIN","EVENT_FOCUSOUT","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","CLASS_NAME_FADE","CLASS_NAME_HIDE","CLASS_NAME_SHOW","CLASS_NAME_SHOWING","DefaultType","animation","autohide","delay","Default","SELECTOR_DATA_DISMISS","Toast","BaseComponent","constructor","_config","_getConfig","_timeout","_hasMouseInteraction","_hasKeyboardInteraction","_setListeners","show","showEvent","EventHandler","trigger","_element","defaultPrevented","_clearTimeout","classList","add","complete","remove","_maybeScheduleHide","_queueCallback","hide","contains","hideEvent","dispose","Manipulator","getDataAttributes","setTimeout","_onInteraction","event","isInteracting","type","nextElement","relatedTarget","on","clearTimeout","each","data","Data","get"],"mappings":";;;;;;;;;;;;;;;;;;EAcA,MAAMA,MAAM,GAAGC,GAAG,IAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,WAAQ,GAAED,GAAI,EAAd;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC,WAA9C,EAAP;EACD,CAND;;EA0FA,MAAMC,SAAS,GAAGN,GAAG,IAAI;EACvB,MAAI,CAACA,GAAD,IAAQ,OAAOA,GAAP,KAAe,QAA3B,EAAqC;EACnC,WAAO,KAAP;EACD;;EAED,MAAI,OAAOA,GAAG,CAACO,MAAX,KAAsB,WAA1B,EAAuC;EACrCP,IAAAA,GAAG,GAAGA,GAAG,CAAC,CAAD,CAAT;EACD;;EAED,SAAO,OAAOA,GAAG,CAACQ,QAAX,KAAwB,WAA/B;EACD,CAVD;;EA0CA,MAAMC,eAAe,GAAG,CAACC,aAAD,EAAgBC,MAAhB,EAAwBC,WAAxB,KAAwC;EAC9DC,EAAAA,MAAM,CAACC,IAAP,CAAYF,WAAZ,EAAyBG,OAAzB,CAAiCC,QAAQ,IAAI;EAC3C,UAAMC,aAAa,GAAGL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;;EA7K+B;EAgLlC;EACA;EACA;EACA;EACA;EACA;;;EAEA0B,kBAAkB,CAAC+B,KAAD,CAAlB;;;;;;;;"} \ No newline at end of file
diff --git a/vendor/twbs/bootstrap/js/dist/tooltip.js b/vendor/twbs/bootstrap/js/dist/tooltip.js
index ae6ec8ed7..91a235d86 100644
--- a/vendor/twbs/bootstrap/js/dist/tooltip.js
+++ b/vendor/twbs/bootstrap/js/dist/tooltip.js
@@ -1,63 +1,223 @@
/*!
- * Bootstrap tooltip.js v4.6.0 (https://getbootstrap.com/)
+ * Bootstrap tooltip.js v5.0.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
- typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util));
-}(this, (function ($, Popper, Util) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./dom/selector-engine.js'), require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./base-component.js')) :
+ typeof define === 'function' && define.amd ? define(['@popperjs/core', './dom/selector-engine', './dom/data', './dom/event-handler', './dom/manipulator', './base-component'], factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.Popper, global.SelectorEngine, global.Data, global.EventHandler, global.Manipulator, global.Base));
+}(this, (function (Popper, SelectorEngine, Data, EventHandler, Manipulator, BaseComponent) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
- var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
- var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
-
- function _defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
+ function _interopNamespace(e) {
+ if (e && e.__esModule) return e;
+ var n = Object.create(null);
+ if (e) {
+ Object.keys(e).forEach(function (k) {
+ if (k !== 'default') {
+ var d = Object.getOwnPropertyDescriptor(e, k);
+ Object.defineProperty(n, k, d.get ? d : {
+ enumerable: true,
+ get: function () {
+ return e[k];
+ }
+ });
+ }
+ });
}
+ n['default'] = e;
+ return Object.freeze(n);
}
- function _createClass(Constructor, protoProps, staticProps) {
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
- if (staticProps) _defineProperties(Constructor, staticProps);
- return Constructor;
- }
+ var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
+ var SelectorEngine__default = /*#__PURE__*/_interopDefaultLegacy(SelectorEngine);
+ var Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
+ var EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
+ var Manipulator__default = /*#__PURE__*/_interopDefaultLegacy(Manipulator);
+ var BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
- function _extends() {
- _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.1): util/index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
+ const MAX_UID = 1000000;
+
+ const toType = obj => {
+ if (obj === null || obj === undefined) {
+ return `${obj}`;
+ }
+
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
+ };
+ /**
+ * --------------------------------------------------------------------------
+ * Public Util Api
+ * --------------------------------------------------------------------------
+ */
+
+
+ const getUID = prefix => {
+ do {
+ prefix += Math.floor(Math.random() * MAX_UID);
+ } while (document.getElementById(prefix));
+
+ return prefix;
+ };
+
+ const isElement = obj => {
+ if (!obj || typeof obj !== 'object') {
+ return false;
+ }
+
+ if (typeof obj.jquery !== 'undefined') {
+ obj = obj[0];
+ }
+
+ return typeof obj.nodeType !== 'undefined';
+ };
+
+ const getElement = obj => {
+ if (isElement(obj)) {
+ // it's a jQuery object or a node element
+ return obj.jquery ? obj[0] : obj;
+ }
+
+ if (typeof obj === 'string' && obj.length > 0) {
+ return SelectorEngine__default['default'].findOne(obj);
+ }
+
+ return null;
+ };
+
+ const typeCheckConfig = (componentName, config, configTypes) => {
+ Object.keys(configTypes).forEach(property => {
+ const expectedTypes = configTypes[property];
+ const value = config[property];
+ const valueType = value && isElement(value) ? 'element' : toType(value);
+
+ if (!new RegExp(expectedTypes).test(valueType)) {
+ throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
}
+ });
+ };
- return target;
- };
+ const findShadowRoot = element => {
+ if (!document.documentElement.attachShadow) {
+ return null;
+ } // Can find the shadow root otherwise it'll return the document
- return _extends.apply(this, arguments);
- }
+
+ if (typeof element.getRootNode === 'function') {
+ const root = element.getRootNode();
+ return root instanceof ShadowRoot ? root : null;
+ }
+
+ if (element instanceof ShadowRoot) {
+ return element;
+ } // when we don't find a shadow root
+
+
+ if (!element.parentNode) {
+ return null;
+ }
+
+ return findShadowRoot(element.parentNode);
+ };
+
+ const noop = () => {};
+
+ const getjQuery = () => {
+ const {
+ jQuery
+ } = window;
+
+ if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ const onDOMContentLoaded = callback => {
+ if (document.readyState === 'loading') {
+ document.addEventListener('DOMContentLoaded', callback);
+ } else {
+ callback();
+ }
+ };
+
+ const isRTL = () => document.documentElement.dir === 'rtl';
+
+ const defineJQueryPlugin = plugin => {
+ onDOMContentLoaded(() => {
+ const $ = getjQuery();
+ /* istanbul ignore if */
+
+ if ($) {
+ const name = plugin.NAME;
+ const JQUERY_NO_CONFLICT = $.fn[name];
+ $.fn[name] = plugin.jQueryInterface;
+ $.fn[name].Constructor = plugin;
+
+ $.fn[name].noConflict = () => {
+ $.fn[name] = JQUERY_NO_CONFLICT;
+ return plugin.jQueryInterface;
+ };
+ }
+ });
+ };
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): tools/sanitizer.js
+ * Bootstrap (v5.0.1): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
- var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
- var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
- var DefaultWhitelist = {
+ const uriAttrs = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
+ const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
+ /**
+ * A pattern that recognizes a commonly useful subset of URLs that are safe.
+ *
+ * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
+ */
+
+ const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i;
+ /**
+ * A pattern that matches safe data URLs. Only matches image, video and audio types.
+ *
+ * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
+ */
+
+ 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;
+
+ const allowedAttribute = (attr, allowedAttributeList) => {
+ const attrName = attr.nodeName.toLowerCase();
+
+ if (allowedAttributeList.includes(attrName)) {
+ if (uriAttrs.has(attrName)) {
+ return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
+ }
+
+ return true;
+ }
+
+ const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp); // Check if a regular expression validates the attribute.
+
+ for (let i = 0, len = regExp.length; i < len; i++) {
+ if (regExp[i].test(attrName)) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+ const DefaultAllowlist = {
// Global attributes allowed on any supplied element below.
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
a: ['target', 'href', 'title', 'rel'],
@@ -90,47 +250,8 @@
u: [],
ul: []
};
- /**
- * A pattern that recognizes a commonly useful subset of URLs that are safe.
- *
- * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
- */
-
- var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi;
- /**
- * A pattern that matches safe data URLs. Only matches image, video and audio types.
- *
- * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
- */
-
- var 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;
-
- function allowedAttribute(attr, allowedAttributeList) {
- var attrName = attr.nodeName.toLowerCase();
-
- if (allowedAttributeList.indexOf(attrName) !== -1) {
- if (uriAttrs.indexOf(attrName) !== -1) {
- return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
- }
-
- return true;
- }
-
- var regExp = allowedAttributeList.filter(function (attrRegex) {
- return attrRegex instanceof RegExp;
- }); // Check if a regular expression validates the attribute.
-
- for (var i = 0, len = regExp.length; i < len; i++) {
- if (attrName.match(regExp[i])) {
- return true;
- }
- }
-
- return false;
- }
-
- function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
- if (unsafeHtml.length === 0) {
+ function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
+ if (!unsafeHtml.length) {
return unsafeHtml;
}
@@ -138,53 +259,51 @@
return sanitizeFn(unsafeHtml);
}
- var domParser = new window.DOMParser();
- var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
- var whitelistKeys = Object.keys(whiteList);
- var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
+ const domParser = new window.DOMParser();
+ const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
+ const allowlistKeys = Object.keys(allowList);
+ const elements = [].concat(...createdDocument.body.querySelectorAll('*'));
- var _loop = function _loop(i, len) {
- var el = elements[i];
- var elName = el.nodeName.toLowerCase();
+ for (let i = 0, len = elements.length; i < len; i++) {
+ const el = elements[i];
+ const elName = el.nodeName.toLowerCase();
- if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
+ if (!allowlistKeys.includes(elName)) {
el.parentNode.removeChild(el);
- return "continue";
+ continue;
}
- var attributeList = [].slice.call(el.attributes);
- var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
- attributeList.forEach(function (attr) {
- if (!allowedAttribute(attr, whitelistedAttributes)) {
+ const attributeList = [].concat(...el.attributes);
+ const allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || []);
+ attributeList.forEach(attr => {
+ if (!allowedAttribute(attr, allowedAttributes)) {
el.removeAttribute(attr.nodeName);
}
});
- };
-
- for (var i = 0, len = elements.length; i < len; i++) {
- var _ret = _loop(i);
-
- if (_ret === "continue") continue;
}
return createdDocument.body.innerHTML;
}
/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.1): tooltip.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ /**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
- var NAME = 'tooltip';
- var VERSION = '4.6.0';
- var DATA_KEY = 'bs.tooltip';
- var EVENT_KEY = "." + DATA_KEY;
- var JQUERY_NO_CONFLICT = $__default['default'].fn[NAME];
- var CLASS_PREFIX = 'bs-tooltip';
- var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
- var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
- var DefaultType = {
+ const NAME = 'tooltip';
+ const DATA_KEY = 'bs.tooltip';
+ const EVENT_KEY = `.${DATA_KEY}`;
+ const CLASS_PREFIX = 'bs-tooltip';
+ const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
+ const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
+ const DefaultType = {
animation: 'boolean',
template: 'string',
title: '(string|element|function)',
@@ -193,76 +312,77 @@
html: 'boolean',
selector: '(string|boolean)',
placement: '(string|function)',
- offset: '(number|string|function)',
+ offset: '(array|string|function)',
container: '(string|element|boolean)',
- fallbackPlacement: '(string|array)',
+ fallbackPlacements: 'array',
boundary: '(string|element)',
customClass: '(string|function)',
sanitize: 'boolean',
sanitizeFn: '(null|function)',
- whiteList: 'object',
- popperConfig: '(null|object)'
+ allowList: 'object',
+ popperConfig: '(null|object|function)'
};
- var AttachmentMap = {
+ const AttachmentMap = {
AUTO: 'auto',
TOP: 'top',
- RIGHT: 'right',
+ RIGHT: isRTL() ? 'left' : 'right',
BOTTOM: 'bottom',
- LEFT: 'left'
+ LEFT: isRTL() ? 'right' : 'left'
};
- var Default = {
+ const Default = {
animation: true,
- template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
+ template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
trigger: 'hover focus',
title: '',
delay: 0,
html: false,
selector: false,
placement: 'top',
- offset: 0,
+ offset: [0, 0],
container: false,
- fallbackPlacement: 'flip',
- boundary: 'scrollParent',
+ fallbackPlacements: ['top', 'right', 'bottom', 'left'],
+ boundary: 'clippingParents',
customClass: '',
sanitize: true,
sanitizeFn: null,
- whiteList: DefaultWhitelist,
+ allowList: DefaultAllowlist,
popperConfig: null
};
- var HOVER_STATE_SHOW = 'show';
- var HOVER_STATE_OUT = 'out';
- var Event = {
- HIDE: "hide" + EVENT_KEY,
- HIDDEN: "hidden" + EVENT_KEY,
- SHOW: "show" + EVENT_KEY,
- SHOWN: "shown" + EVENT_KEY,
- INSERTED: "inserted" + EVENT_KEY,
- CLICK: "click" + EVENT_KEY,
- FOCUSIN: "focusin" + EVENT_KEY,
- FOCUSOUT: "focusout" + EVENT_KEY,
- MOUSEENTER: "mouseenter" + EVENT_KEY,
- MOUSELEAVE: "mouseleave" + EVENT_KEY
+ const Event = {
+ HIDE: `hide${EVENT_KEY}`,
+ HIDDEN: `hidden${EVENT_KEY}`,
+ SHOW: `show${EVENT_KEY}`,
+ SHOWN: `shown${EVENT_KEY}`,
+ INSERTED: `inserted${EVENT_KEY}`,
+ CLICK: `click${EVENT_KEY}`,
+ FOCUSIN: `focusin${EVENT_KEY}`,
+ FOCUSOUT: `focusout${EVENT_KEY}`,
+ MOUSEENTER: `mouseenter${EVENT_KEY}`,
+ MOUSELEAVE: `mouseleave${EVENT_KEY}`
};
- var CLASS_NAME_FADE = 'fade';
- var CLASS_NAME_SHOW = 'show';
- var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
- var SELECTOR_ARROW = '.arrow';
- var TRIGGER_HOVER = 'hover';
- var TRIGGER_FOCUS = 'focus';
- var TRIGGER_CLICK = 'click';
- var TRIGGER_MANUAL = 'manual';
+ const CLASS_NAME_FADE = 'fade';
+ const CLASS_NAME_MODAL = 'modal';
+ const CLASS_NAME_SHOW = 'show';
+ const HOVER_STATE_SHOW = 'show';
+ const HOVER_STATE_OUT = 'out';
+ const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
+ const TRIGGER_HOVER = 'hover';
+ const TRIGGER_FOCUS = 'focus';
+ const TRIGGER_CLICK = 'click';
+ const TRIGGER_MANUAL = 'manual';
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
- var Tooltip = /*#__PURE__*/function () {
- function Tooltip(element, config) {
- if (typeof Popper__default['default'] === 'undefined') {
+ class Tooltip extends BaseComponent__default['default'] {
+ constructor(element, config) {
+ if (typeof Popper__namespace === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
- } // private
+ }
+ super(element); // private
this._isEnabled = true;
this._timeout = 0;
@@ -270,42 +390,49 @@
this._activeTrigger = {};
this._popper = null; // Protected
- this.element = element;
- this.config = this._getConfig(config);
+ this._config = this._getConfig(config);
this.tip = null;
this._setListeners();
} // Getters
- var _proto = Tooltip.prototype;
+ static get Default() {
+ return Default;
+ }
+
+ static get NAME() {
+ return NAME;
+ }
- // Public
- _proto.enable = function enable() {
+ static get Event() {
+ return Event;
+ }
+
+ static get DefaultType() {
+ return DefaultType;
+ } // Public
+
+
+ enable() {
this._isEnabled = true;
- };
+ }
- _proto.disable = function disable() {
+ disable() {
this._isEnabled = false;
- };
+ }
- _proto.toggleEnabled = function toggleEnabled() {
+ toggleEnabled() {
this._isEnabled = !this._isEnabled;
- };
+ }
- _proto.toggle = function toggle(event) {
+ toggle(event) {
if (!this._isEnabled) {
return;
}
if (event) {
- var dataKey = this.constructor.DATA_KEY;
- var context = $__default['default'](event.currentTarget).data(dataKey);
-
- if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $__default['default'](event.currentTarget).data(dataKey, context);
- }
+ const context = this._initializeOnDelegatedTarget(event);
context._activeTrigger.click = !context._activeTrigger.click;
@@ -315,7 +442,7 @@
context._leave(null, context);
}
} else {
- if ($__default['default'](this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {
+ if (this.getTipElement().classList.contains(CLASS_NAME_SHOW)) {
this._leave(null, this);
return;
@@ -323,348 +450,372 @@
this._enter(null, this);
}
- };
+ }
- _proto.dispose = function dispose() {
+ dispose() {
clearTimeout(this._timeout);
- $__default['default'].removeData(this.element, this.constructor.DATA_KEY);
- $__default['default'](this.element).off(this.constructor.EVENT_KEY);
- $__default['default'](this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
+ EventHandler__default['default'].off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
- if (this.tip) {
- $__default['default'](this.tip).remove();
+ if (this.tip && this.tip.parentNode) {
+ this.tip.parentNode.removeChild(this.tip);
}
- this._isEnabled = null;
- this._timeout = null;
- this._hoverState = null;
- this._activeTrigger = null;
-
if (this._popper) {
this._popper.destroy();
}
- this._popper = null;
- this.element = null;
- this.config = null;
- this.tip = null;
- };
-
- _proto.show = function show() {
- var _this = this;
+ super.dispose();
+ }
- if ($__default['default'](this.element).css('display') === 'none') {
+ show() {
+ if (this._element.style.display === 'none') {
throw new Error('Please use show on visible elements');
}
- var showEvent = $__default['default'].Event(this.constructor.Event.SHOW);
+ if (!(this.isWithContent() && this._isEnabled)) {
+ return;
+ }
- if (this.isWithContent() && this._isEnabled) {
- $__default['default'](this.element).trigger(showEvent);
- var shadowRoot = Util__default['default'].findShadowRoot(this.element);
- var isInTheDom = $__default['default'].contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
+ const showEvent = EventHandler__default['default'].trigger(this._element, this.constructor.Event.SHOW);
+ const shadowRoot = findShadowRoot(this._element);
+ const isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);
- if (showEvent.isDefaultPrevented() || !isInTheDom) {
- return;
- }
+ if (showEvent.defaultPrevented || !isInTheDom) {
+ return;
+ }
- var tip = this.getTipElement();
- var tipId = Util__default['default'].getUID(this.constructor.NAME);
- tip.setAttribute('id', tipId);
- this.element.setAttribute('aria-describedby', tipId);
- this.setContent();
+ const tip = this.getTipElement();
+ const tipId = getUID(this.constructor.NAME);
+ tip.setAttribute('id', tipId);
- if (this.config.animation) {
- $__default['default'](tip).addClass(CLASS_NAME_FADE);
- }
+ this._element.setAttribute('aria-describedby', tipId);
- var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
+ this.setContent();
- var attachment = this._getAttachment(placement);
+ if (this._config.animation) {
+ tip.classList.add(CLASS_NAME_FADE);
+ }
- this.addAttachmentClass(attachment);
+ const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
- var container = this._getContainer();
+ const attachment = this._getAttachment(placement);
- $__default['default'](tip).data(this.constructor.DATA_KEY, this);
+ this._addAttachmentClass(attachment);
- if (!$__default['default'].contains(this.element.ownerDocument.documentElement, this.tip)) {
- $__default['default'](tip).appendTo(container);
- }
+ const {
+ container
+ } = this._config;
+ Data__default['default'].set(tip, this.constructor.DATA_KEY, this);
- $__default['default'](this.element).trigger(this.constructor.Event.INSERTED);
- this._popper = new Popper__default['default'](this.element, tip, this._getPopperConfig(attachment));
- $__default['default'](tip).addClass(CLASS_NAME_SHOW);
- $__default['default'](tip).addClass(this.config.customClass); // If this is a touch-enabled device we add extra
- // empty mouseover listeners to the body's immediate children;
- // only needed because of broken event delegation on iOS
- // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
+ if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
+ container.appendChild(tip);
+ EventHandler__default['default'].trigger(this._element, this.constructor.Event.INSERTED);
+ }
- if ('ontouchstart' in document.documentElement) {
- $__default['default'](document.body).children().on('mouseover', null, $__default['default'].noop);
- }
+ if (this._popper) {
+ this._popper.update();
+ } else {
+ this._popper = Popper__namespace.createPopper(this._element, tip, this._getPopperConfig(attachment));
+ }
- var complete = function complete() {
- if (_this.config.animation) {
- _this._fixTransition();
- }
+ tip.classList.add(CLASS_NAME_SHOW);
+ const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass;
- var prevHoverState = _this._hoverState;
- _this._hoverState = null;
- $__default['default'](_this.element).trigger(_this.constructor.Event.SHOWN);
+ if (customClass) {
+ tip.classList.add(...customClass.split(' '));
+ } // If this is a touch-enabled device we add extra
+ // empty mouseover listeners to the body's immediate children;
+ // only needed because of broken event delegation on iOS
+ // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
- if (prevHoverState === HOVER_STATE_OUT) {
- _this._leave(null, _this);
- }
- };
- if ($__default['default'](this.tip).hasClass(CLASS_NAME_FADE)) {
- var transitionDuration = Util__default['default'].getTransitionDurationFromElement(this.tip);
- $__default['default'](this.tip).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
- } else {
- complete();
+ if ('ontouchstart' in document.documentElement) {
+ [].concat(...document.body.children).forEach(element => {
+ EventHandler__default['default'].on(element, 'mouseover', noop);
+ });
+ }
+
+ const complete = () => {
+ const prevHoverState = this._hoverState;
+ this._hoverState = null;
+ EventHandler__default['default'].trigger(this._element, this.constructor.Event.SHOWN);
+
+ if (prevHoverState === HOVER_STATE_OUT) {
+ this._leave(null, this);
}
+ };
+
+ const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE);
+
+ this._queueCallback(complete, this.tip, isAnimated);
+ }
+
+ hide() {
+ if (!this._popper) {
+ return;
}
- };
- _proto.hide = function hide(callback) {
- var _this2 = this;
+ const tip = this.getTipElement();
- var tip = this.getTipElement();
- var hideEvent = $__default['default'].Event(this.constructor.Event.HIDE);
+ const complete = () => {
+ if (this._isWithActiveTrigger()) {
+ return;
+ }
- var complete = function complete() {
- if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
+ if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
tip.parentNode.removeChild(tip);
}
- _this2._cleanTipClass();
+ this._cleanTipClass();
- _this2.element.removeAttribute('aria-describedby');
+ this._element.removeAttribute('aria-describedby');
- $__default['default'](_this2.element).trigger(_this2.constructor.Event.HIDDEN);
+ EventHandler__default['default'].trigger(this._element, this.constructor.Event.HIDDEN);
- if (_this2._popper !== null) {
- _this2._popper.destroy();
- }
+ if (this._popper) {
+ this._popper.destroy();
- if (callback) {
- callback();
+ this._popper = null;
}
};
- $__default['default'](this.element).trigger(hideEvent);
+ const hideEvent = EventHandler__default['default'].trigger(this._element, this.constructor.Event.HIDE);
- if (hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
return;
}
- $__default['default'](tip).removeClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra
+ tip.classList.remove(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) {
- $__default['default'](document.body).children().off('mouseover', null, $__default['default'].noop);
+ [].concat(...document.body.children).forEach(element => EventHandler__default['default'].off(element, 'mouseover', noop));
}
this._activeTrigger[TRIGGER_CLICK] = false;
this._activeTrigger[TRIGGER_FOCUS] = false;
this._activeTrigger[TRIGGER_HOVER] = false;
+ const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE);
- if ($__default['default'](this.tip).hasClass(CLASS_NAME_FADE)) {
- var transitionDuration = Util__default['default'].getTransitionDurationFromElement(tip);
- $__default['default'](tip).one(Util__default['default'].TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
- } else {
- complete();
- }
+ this._queueCallback(complete, this.tip, isAnimated);
this._hoverState = '';
- };
+ }
- _proto.update = function update() {
+ update() {
if (this._popper !== null) {
- this._popper.scheduleUpdate();
+ this._popper.update();
}
} // Protected
- ;
- _proto.isWithContent = function isWithContent() {
+
+ isWithContent() {
return Boolean(this.getTitle());
- };
+ }
- _proto.addAttachmentClass = function addAttachmentClass(attachment) {
- $__default['default'](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
- };
+ getTipElement() {
+ if (this.tip) {
+ return this.tip;
+ }
- _proto.getTipElement = function getTipElement() {
- this.tip = this.tip || $__default['default'](this.config.template)[0];
+ const element = document.createElement('div');
+ element.innerHTML = this._config.template;
+ this.tip = element.children[0];
return this.tip;
- };
-
- _proto.setContent = function setContent() {
- var tip = this.getTipElement();
- this.setElementContent($__default['default'](tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
- $__default['default'](tip).removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
- };
-
- _proto.setElementContent = function setElementContent($element, content) {
- if (typeof content === 'object' && (content.nodeType || content.jquery)) {
- // Content is a DOM node or a jQuery
- if (this.config.html) {
- if (!$__default['default'](content).parent().is($element)) {
- $element.empty().append(content);
+ }
+
+ setContent() {
+ const tip = this.getTipElement();
+ this.setElementContent(SelectorEngine__default['default'].findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
+ tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
+ }
+
+ setElementContent(element, content) {
+ if (element === null) {
+ return;
+ }
+
+ if (isElement(content)) {
+ content = getElement(content); // content is a DOM node or a jQuery
+
+ if (this._config.html) {
+ if (content.parentNode !== element) {
+ element.innerHTML = '';
+ element.appendChild(content);
}
} else {
- $element.text($__default['default'](content).text());
+ element.textContent = content.textContent;
}
return;
}
- if (this.config.html) {
- if (this.config.sanitize) {
- content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
+ if (this._config.html) {
+ if (this._config.sanitize) {
+ content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn);
}
- $element.html(content);
+ element.innerHTML = content;
} else {
- $element.text(content);
+ element.textContent = content;
}
- };
+ }
- _proto.getTitle = function getTitle() {
- var title = this.element.getAttribute('data-original-title');
+ getTitle() {
+ let title = this._element.getAttribute('data-bs-original-title');
if (!title) {
- title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
+ title = typeof this._config.title === 'function' ? this._config.title.call(this._element) : this._config.title;
}
return title;
- } // Private
- ;
+ }
- _proto._getPopperConfig = function _getPopperConfig(attachment) {
- var _this3 = this;
+ updateAttachment(attachment) {
+ if (attachment === 'right') {
+ return 'end';
+ }
- var defaultBsConfig = {
- placement: attachment,
- modifiers: {
- offset: this._getOffset(),
- flip: {
- behavior: this.config.fallbackPlacement
- },
- arrow: {
- element: SELECTOR_ARROW
- },
- preventOverflow: {
- boundariesElement: this.config.boundary
- }
- },
- onCreate: function onCreate(data) {
- if (data.originalPlacement !== data.placement) {
- _this3._handlePopperPlacementChange(data);
- }
- },
- onUpdate: function onUpdate(data) {
- return _this3._handlePopperPlacementChange(data);
- }
- };
- return _extends({}, defaultBsConfig, this.config.popperConfig);
- };
+ if (attachment === 'left') {
+ return 'start';
+ }
- _proto._getOffset = function _getOffset() {
- var _this4 = this;
+ return attachment;
+ } // Private
- var offset = {};
- if (typeof this.config.offset === 'function') {
- offset.fn = function (data) {
- data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element) || {});
- return data;
- };
- } else {
- offset.offset = this.config.offset;
+ _initializeOnDelegatedTarget(event, context) {
+ const dataKey = this.constructor.DATA_KEY;
+ context = context || Data__default['default'].get(event.delegateTarget, dataKey);
+
+ if (!context) {
+ context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
+ Data__default['default'].set(event.delegateTarget, dataKey, context);
}
- return offset;
- };
+ return context;
+ }
+
+ _getOffset() {
+ const {
+ offset
+ } = this._config;
- _proto._getContainer = function _getContainer() {
- if (this.config.container === false) {
- return document.body;
+ if (typeof offset === 'string') {
+ return offset.split(',').map(val => Number.parseInt(val, 10));
}
- if (Util__default['default'].isElement(this.config.container)) {
- return $__default['default'](this.config.container);
+ if (typeof offset === 'function') {
+ return popperData => offset(popperData, this._element);
}
- return $__default['default'](document).find(this.config.container);
- };
+ return offset;
+ }
- _proto._getAttachment = function _getAttachment(placement) {
+ _getPopperConfig(attachment) {
+ const defaultBsPopperConfig = {
+ placement: attachment,
+ modifiers: [{
+ name: 'flip',
+ options: {
+ fallbackPlacements: this._config.fallbackPlacements
+ }
+ }, {
+ name: 'offset',
+ options: {
+ offset: this._getOffset()
+ }
+ }, {
+ name: 'preventOverflow',
+ options: {
+ boundary: this._config.boundary
+ }
+ }, {
+ name: 'arrow',
+ options: {
+ element: `.${this.constructor.NAME}-arrow`
+ }
+ }, {
+ name: 'onChange',
+ enabled: true,
+ phase: 'afterWrite',
+ fn: data => this._handlePopperPlacementChange(data)
+ }],
+ onFirstUpdate: data => {
+ if (data.options.placement !== data.placement) {
+ this._handlePopperPlacementChange(data);
+ }
+ }
+ };
+ return { ...defaultBsPopperConfig,
+ ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
+ };
+ }
+
+ _addAttachmentClass(attachment) {
+ this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
+ }
+
+ _getAttachment(placement) {
return AttachmentMap[placement.toUpperCase()];
- };
+ }
- _proto._setListeners = function _setListeners() {
- var _this5 = this;
+ _setListeners() {
+ const triggers = this._config.trigger.split(' ');
- var triggers = this.config.trigger.split(' ');
- triggers.forEach(function (trigger) {
+ triggers.forEach(trigger => {
if (trigger === 'click') {
- $__default['default'](_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
- return _this5.toggle(event);
- });
+ EventHandler__default['default'].on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event));
} else if (trigger !== TRIGGER_MANUAL) {
- var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
- var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
- $__default['default'](_this5.element).on(eventIn, _this5.config.selector, function (event) {
- return _this5._enter(event);
- }).on(eventOut, _this5.config.selector, function (event) {
- return _this5._leave(event);
- });
+ const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;
+ const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;
+ EventHandler__default['default'].on(this._element, eventIn, this._config.selector, event => this._enter(event));
+ EventHandler__default['default'].on(this._element, eventOut, this._config.selector, event => this._leave(event));
}
});
- this._hideModalHandler = function () {
- if (_this5.element) {
- _this5.hide();
+ this._hideModalHandler = () => {
+ if (this._element) {
+ this.hide();
}
};
- $__default['default'](this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
+ EventHandler__default['default'].on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);
- if (this.config.selector) {
- this.config = _extends({}, this.config, {
+ if (this._config.selector) {
+ this._config = { ...this._config,
trigger: 'manual',
selector: ''
- });
+ };
} else {
this._fixTitle();
}
- };
+ }
- _proto._fixTitle = function _fixTitle() {
- var titleType = typeof this.element.getAttribute('data-original-title');
+ _fixTitle() {
+ const title = this._element.getAttribute('title');
- if (this.element.getAttribute('title') || titleType !== 'string') {
- this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
- this.element.setAttribute('title', '');
- }
- };
+ const originalTitleType = typeof this._element.getAttribute('data-bs-original-title');
- _proto._enter = function _enter(event, context) {
- var dataKey = this.constructor.DATA_KEY;
- context = context || $__default['default'](event.currentTarget).data(dataKey);
+ if (title || originalTitleType !== 'string') {
+ this._element.setAttribute('data-bs-original-title', title || '');
- if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $__default['default'](event.currentTarget).data(dataKey, context);
+ if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {
+ this._element.setAttribute('aria-label', title);
+ }
+
+ this._element.setAttribute('title', '');
}
+ }
+
+ _enter(event, context) {
+ context = this._initializeOnDelegatedTarget(event, context);
if (event) {
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
}
- if ($__default['default'](context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
+ if (context.getTipElement().classList.contains(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
context._hoverState = HOVER_STATE_SHOW;
return;
}
@@ -672,29 +823,23 @@
clearTimeout(context._timeout);
context._hoverState = HOVER_STATE_SHOW;
- if (!context.config.delay || !context.config.delay.show) {
+ if (!context._config.delay || !context._config.delay.show) {
context.show();
return;
}
- context._timeout = setTimeout(function () {
+ context._timeout = setTimeout(() => {
if (context._hoverState === HOVER_STATE_SHOW) {
context.show();
}
- }, context.config.delay.show);
- };
-
- _proto._leave = function _leave(event, context) {
- var dataKey = this.constructor.DATA_KEY;
- context = context || $__default['default'](event.currentTarget).data(dataKey);
+ }, context._config.delay.show);
+ }
- if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $__default['default'](event.currentTarget).data(dataKey, context);
- }
+ _leave(event, context) {
+ context = this._initializeOnDelegatedTarget(event, context);
if (event) {
- context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
+ context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);
}
if (context._isWithActiveTrigger()) {
@@ -704,36 +849,40 @@
clearTimeout(context._timeout);
context._hoverState = HOVER_STATE_OUT;
- if (!context.config.delay || !context.config.delay.hide) {
+ if (!context._config.delay || !context._config.delay.hide) {
context.hide();
return;
}
- context._timeout = setTimeout(function () {
+ context._timeout = setTimeout(() => {
if (context._hoverState === HOVER_STATE_OUT) {
context.hide();
}
- }, context.config.delay.hide);
- };
+ }, context._config.delay.hide);
+ }
- _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
- for (var trigger in this._activeTrigger) {
+ _isWithActiveTrigger() {
+ for (const trigger in this._activeTrigger) {
if (this._activeTrigger[trigger]) {
return true;
}
}
return false;
- };
+ }
- _proto._getConfig = function _getConfig(config) {
- var dataAttributes = $__default['default'](this.element).data();
- Object.keys(dataAttributes).forEach(function (dataAttr) {
- if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
+ _getConfig(config) {
+ const dataAttributes = Manipulator__default['default'].getDataAttributes(this._element);
+ Object.keys(dataAttributes).forEach(dataAttr => {
+ if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {
delete dataAttributes[dataAttr];
}
});
- config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
+ config = { ...this.constructor.Default,
+ ...dataAttributes,
+ ...(typeof config === 'object' && config ? config : {})
+ };
+ config.container = config.container === false ? document.body : getElement(config.container);
if (typeof config.delay === 'number') {
config.delay = {
@@ -750,68 +899,60 @@
config.content = config.content.toString();
}
- Util__default['default'].typeCheckConfig(NAME, config, this.constructor.DefaultType);
+ typeCheckConfig(NAME, config, this.constructor.DefaultType);
if (config.sanitize) {
- config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
+ config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn);
}
return config;
- };
+ }
- _proto._getDelegateConfig = function _getDelegateConfig() {
- var config = {};
+ _getDelegateConfig() {
+ const config = {};
- if (this.config) {
- for (var key in this.config) {
- if (this.constructor.Default[key] !== this.config[key]) {
- config[key] = this.config[key];
+ if (this._config) {
+ for (const key in this._config) {
+ if (this.constructor.Default[key] !== this._config[key]) {
+ config[key] = this._config[key];
}
}
}
return config;
- };
+ }
- _proto._cleanTipClass = function _cleanTipClass() {
- var $tip = $__default['default'](this.getTipElement());
- var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
+ _cleanTipClass() {
+ const tip = this.getTipElement();
+ const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
- if (tabClass !== null && tabClass.length) {
- $tip.removeClass(tabClass.join(''));
+ if (tabClass !== null && tabClass.length > 0) {
+ tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
}
- };
-
- _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
- this.tip = popperData.instance.popper;
-
- this._cleanTipClass();
-
- this.addAttachmentClass(this._getAttachment(popperData.placement));
- };
+ }
- _proto._fixTransition = function _fixTransition() {
- var tip = this.getTipElement();
- var initConfigAnimation = this.config.animation;
+ _handlePopperPlacementChange(popperData) {
+ const {
+ state
+ } = popperData;
- if (tip.getAttribute('x-placement') !== null) {
+ if (!state) {
return;
}
- $__default['default'](tip).removeClass(CLASS_NAME_FADE);
- this.config.animation = false;
- this.hide();
- this.show();
- this.config.animation = initConfigAnimation;
+ this.tip = state.elements.popper;
+
+ this._cleanTipClass();
+
+ this._addAttachmentClass(this._getAttachment(state.placement));
} // Static
- ;
- Tooltip._jQueryInterface = function _jQueryInterface(config) {
+
+ static jQueryInterface(config) {
return this.each(function () {
- var $element = $__default['default'](this);
- var data = $element.data(DATA_KEY);
+ let data = Data__default['default'].get(this, DATA_KEY);
- var _config = typeof config === 'object' && config;
+ const _config = typeof config === 'object' && config;
if (!data && /dispose|hide/.test(config)) {
return;
@@ -819,72 +960,28 @@
if (!data) {
data = new Tooltip(this, _config);
- $element.data(DATA_KEY, data);
}
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
- throw new TypeError("No method named \"" + config + "\"");
+ throw new TypeError(`No method named "${config}"`);
}
data[config]();
}
});
- };
-
- _createClass(Tooltip, null, [{
- key: "VERSION",
- get: function get() {
- return VERSION;
- }
- }, {
- key: "Default",
- get: function get() {
- return Default;
- }
- }, {
- key: "NAME",
- get: function get() {
- return NAME;
- }
- }, {
- key: "DATA_KEY",
- get: function get() {
- return DATA_KEY;
- }
- }, {
- key: "Event",
- get: function get() {
- return Event;
- }
- }, {
- key: "EVENT_KEY",
- get: function get() {
- return EVENT_KEY;
- }
- }, {
- key: "DefaultType",
- get: function get() {
- return DefaultType;
- }
- }]);
-
- return Tooltip;
- }();
+ }
+
+ }
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Tooltip to jQuery only if jQuery is present
*/
- $__default['default'].fn[NAME] = Tooltip._jQueryInterface;
- $__default['default'].fn[NAME].Constructor = Tooltip;
-
- $__default['default'].fn[NAME].noConflict = function () {
- $__default['default'].fn[NAME] = JQUERY_NO_CONFLICT;
- return Tooltip._jQueryInterface;
- };
+ defineJQueryPlugin(Tooltip);
return Tooltip;
diff --git a/vendor/twbs/bootstrap/js/dist/tooltip.js.map b/vendor/twbs/bootstrap/js/dist/tooltip.js.map
index 065d3e743..abf8d3317 100644
--- a/vendor/twbs/bootstrap/js/dist/tooltip.js.map
+++ b/vendor/twbs/bootstrap/js/dist/tooltip.js.map
@@ -1 +1 @@
-{"version":3,"file":"tooltip.js","sources":["../src/tools/sanitizer.js","../src/tooltip.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.0): tools/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst uriAttrs = [\n 'background',\n 'cite',\n 'href',\n 'itemtype',\n 'longdesc',\n 'poster',\n 'src',\n 'xlink:href'\n]\n\nconst ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\nexport const DefaultWhitelist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n}\n\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi\n\n/**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst 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\n\nfunction allowedAttribute(attr, allowedAttributeList) {\n const attrName = attr.nodeName.toLowerCase()\n\n if (allowedAttributeList.indexOf(attrName) !== -1) {\n if (uriAttrs.indexOf(attrName) !== -1) {\n return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))\n }\n\n return true\n }\n\n const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp)\n\n // Check if a regular expression validates the attribute.\n for (let i = 0, len = regExp.length; i < len; i++) {\n if (attrName.match(regExp[i])) {\n return true\n }\n }\n\n return false\n}\n\nexport function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {\n if (unsafeHtml.length === 0) {\n return unsafeHtml\n }\n\n if (sanitizeFn && typeof sanitizeFn === 'function') {\n return sanitizeFn(unsafeHtml)\n }\n\n const domParser = new window.DOMParser()\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html')\n const whitelistKeys = Object.keys(whiteList)\n const elements = [].slice.call(createdDocument.body.querySelectorAll('*'))\n\n for (let i = 0, len = elements.length; i < len; i++) {\n const el = elements[i]\n const elName = el.nodeName.toLowerCase()\n\n if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {\n el.parentNode.removeChild(el)\n\n continue\n }\n\n const attributeList = [].slice.call(el.attributes)\n const whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])\n\n attributeList.forEach(attr => {\n if (!allowedAttribute(attr, whitelistedAttributes)) {\n el.removeAttribute(attr.nodeName)\n }\n })\n }\n\n return createdDocument.body.innerHTML\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.0): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n DefaultWhitelist,\n sanitizeHtml\n} from './tools/sanitizer'\nimport $ from 'jquery'\nimport Popper from 'popper.js'\nimport Util from './util'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'tooltip'\nconst VERSION = '4.6.0'\nconst DATA_KEY = 'bs.tooltip'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst JQUERY_NO_CONFLICT = $.fn[NAME]\nconst CLASS_PREFIX = 'bs-tooltip'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\nconst DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']\n\nconst DefaultType = {\n animation: 'boolean',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string',\n delay: '(number|object)',\n html: 'boolean',\n selector: '(string|boolean)',\n placement: '(string|function)',\n offset: '(number|string|function)',\n container: '(string|element|boolean)',\n fallbackPlacement: '(string|array)',\n boundary: '(string|element)',\n customClass: '(string|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n whiteList: 'object',\n popperConfig: '(null|object)'\n}\n\nconst AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: 'right',\n BOTTOM: 'bottom',\n LEFT: 'left'\n}\n\nconst Default = {\n animation: true,\n template: '<div class=\"tooltip\" role=\"tooltip\">' +\n '<div class=\"arrow\"></div>' +\n '<div class=\"tooltip-inner\"></div></div>',\n trigger: 'hover focus',\n title: '',\n delay: 0,\n html: false,\n selector: false,\n placement: 'top',\n offset: 0,\n container: false,\n fallbackPlacement: 'flip',\n boundary: 'scrollParent',\n customClass: '',\n sanitize: true,\n sanitizeFn: null,\n whiteList: DefaultWhitelist,\n popperConfig: null\n}\n\nconst HOVER_STATE_SHOW = 'show'\nconst HOVER_STATE_OUT = 'out'\n\nconst Event = {\n HIDE: `hide${EVENT_KEY}`,\n HIDDEN: `hidden${EVENT_KEY}`,\n SHOW: `show${EVENT_KEY}`,\n SHOWN: `shown${EVENT_KEY}`,\n INSERTED: `inserted${EVENT_KEY}`,\n CLICK: `click${EVENT_KEY}`,\n FOCUSIN: `focusin${EVENT_KEY}`,\n FOCUSOUT: `focusout${EVENT_KEY}`,\n MOUSEENTER: `mouseenter${EVENT_KEY}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY}`\n}\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_TOOLTIP_INNER = '.tooltip-inner'\nconst SELECTOR_ARROW = '.arrow'\n\nconst TRIGGER_HOVER = 'hover'\nconst TRIGGER_FOCUS = 'focus'\nconst TRIGGER_CLICK = 'click'\nconst TRIGGER_MANUAL = 'manual'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Tooltip {\n constructor(element, config) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)')\n }\n\n // private\n this._isEnabled = true\n this._timeout = 0\n this._hoverState = ''\n this._activeTrigger = {}\n this._popper = null\n\n // Protected\n this.element = element\n this.config = this._getConfig(config)\n this.tip = null\n\n this._setListeners()\n }\n\n // Getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n static get EVENT_KEY() {\n return EVENT_KEY\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Public\n\n enable() {\n this._isEnabled = true\n }\n\n disable() {\n this._isEnabled = false\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled\n }\n\n toggle(event) {\n if (!this._isEnabled) {\n return\n }\n\n if (event) {\n const dataKey = this.constructor.DATA_KEY\n let context = $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n context._activeTrigger.click = !context._activeTrigger.click\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context)\n } else {\n context._leave(null, context)\n }\n } else {\n if ($(this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {\n this._leave(null, this)\n return\n }\n\n this._enter(null, this)\n }\n }\n\n dispose() {\n clearTimeout(this._timeout)\n\n $.removeData(this.element, this.constructor.DATA_KEY)\n\n $(this.element).off(this.constructor.EVENT_KEY)\n $(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler)\n\n if (this.tip) {\n $(this.tip).remove()\n }\n\n this._isEnabled = null\n this._timeout = null\n this._hoverState = null\n this._activeTrigger = null\n if (this._popper) {\n this._popper.destroy()\n }\n\n this._popper = null\n this.element = null\n this.config = null\n this.tip = null\n }\n\n show() {\n if ($(this.element).css('display') === 'none') {\n throw new Error('Please use show on visible elements')\n }\n\n const showEvent = $.Event(this.constructor.Event.SHOW)\n if (this.isWithContent() && this._isEnabled) {\n $(this.element).trigger(showEvent)\n\n const shadowRoot = Util.findShadowRoot(this.element)\n const isInTheDom = $.contains(\n shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement,\n this.element\n )\n\n if (showEvent.isDefaultPrevented() || !isInTheDom) {\n return\n }\n\n const tip = this.getTipElement()\n const tipId = Util.getUID(this.constructor.NAME)\n\n tip.setAttribute('id', tipId)\n this.element.setAttribute('aria-describedby', tipId)\n\n this.setContent()\n\n if (this.config.animation) {\n $(tip).addClass(CLASS_NAME_FADE)\n }\n\n const placement = typeof this.config.placement === 'function' ?\n this.config.placement.call(this, tip, this.element) :\n this.config.placement\n\n const attachment = this._getAttachment(placement)\n this.addAttachmentClass(attachment)\n\n const container = this._getContainer()\n $(tip).data(this.constructor.DATA_KEY, this)\n\n if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {\n $(tip).appendTo(container)\n }\n\n $(this.element).trigger(this.constructor.Event.INSERTED)\n\n this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment))\n\n $(tip).addClass(CLASS_NAME_SHOW)\n $(tip).addClass(this.config.customClass)\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement) {\n $(document.body).children().on('mouseover', null, $.noop)\n }\n\n const complete = () => {\n if (this.config.animation) {\n this._fixTransition()\n }\n\n const prevHoverState = this._hoverState\n this._hoverState = null\n\n $(this.element).trigger(this.constructor.Event.SHOWN)\n\n if (prevHoverState === HOVER_STATE_OUT) {\n this._leave(null, this)\n }\n }\n\n if ($(this.tip).hasClass(CLASS_NAME_FADE)) {\n const transitionDuration = Util.getTransitionDurationFromElement(this.tip)\n\n $(this.tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n complete()\n }\n }\n }\n\n hide(callback) {\n const tip = this.getTipElement()\n const hideEvent = $.Event(this.constructor.Event.HIDE)\n const complete = () => {\n if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {\n tip.parentNode.removeChild(tip)\n }\n\n this._cleanTipClass()\n this.element.removeAttribute('aria-describedby')\n $(this.element).trigger(this.constructor.Event.HIDDEN)\n if (this._popper !== null) {\n this._popper.destroy()\n }\n\n if (callback) {\n callback()\n }\n }\n\n $(this.element).trigger(hideEvent)\n\n if (hideEvent.isDefaultPrevented()) {\n return\n }\n\n $(tip).removeClass(CLASS_NAME_SHOW)\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n $(document.body).children().off('mouseover', null, $.noop)\n }\n\n this._activeTrigger[TRIGGER_CLICK] = false\n this._activeTrigger[TRIGGER_FOCUS] = false\n this._activeTrigger[TRIGGER_HOVER] = false\n\n if ($(this.tip).hasClass(CLASS_NAME_FADE)) {\n const transitionDuration = Util.getTransitionDurationFromElement(tip)\n\n $(tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(transitionDuration)\n } else {\n complete()\n }\n\n this._hoverState = ''\n }\n\n update() {\n if (this._popper !== null) {\n this._popper.scheduleUpdate()\n }\n }\n\n // Protected\n\n isWithContent() {\n return Boolean(this.getTitle())\n }\n\n addAttachmentClass(attachment) {\n $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)\n }\n\n getTipElement() {\n this.tip = this.tip || $(this.config.template)[0]\n return this.tip\n }\n\n setContent() {\n const tip = this.getTipElement()\n this.setElementContent($(tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle())\n $(tip).removeClass(`${CLASS_NAME_FADE} ${CLASS_NAME_SHOW}`)\n }\n\n setElementContent($element, content) {\n if (typeof content === 'object' && (content.nodeType || content.jquery)) {\n // Content is a DOM node or a jQuery\n if (this.config.html) {\n if (!$(content).parent().is($element)) {\n $element.empty().append(content)\n }\n } else {\n $element.text($(content).text())\n }\n\n return\n }\n\n if (this.config.html) {\n if (this.config.sanitize) {\n content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn)\n }\n\n $element.html(content)\n } else {\n $element.text(content)\n }\n }\n\n getTitle() {\n let title = this.element.getAttribute('data-original-title')\n\n if (!title) {\n title = typeof this.config.title === 'function' ?\n this.config.title.call(this.element) :\n this.config.title\n }\n\n return title\n }\n\n // Private\n\n _getPopperConfig(attachment) {\n const defaultBsConfig = {\n placement: attachment,\n modifiers: {\n offset: this._getOffset(),\n flip: {\n behavior: this.config.fallbackPlacement\n },\n arrow: {\n element: SELECTOR_ARROW\n },\n preventOverflow: {\n boundariesElement: this.config.boundary\n }\n },\n onCreate: data => {\n if (data.originalPlacement !== data.placement) {\n this._handlePopperPlacementChange(data)\n }\n },\n onUpdate: data => this._handlePopperPlacementChange(data)\n }\n\n return {\n ...defaultBsConfig,\n ...this.config.popperConfig\n }\n }\n\n _getOffset() {\n const offset = {}\n\n if (typeof this.config.offset === 'function') {\n offset.fn = data => {\n data.offsets = {\n ...data.offsets,\n ...(this.config.offset(data.offsets, this.element) || {})\n }\n\n return data\n }\n } else {\n offset.offset = this.config.offset\n }\n\n return offset\n }\n\n _getContainer() {\n if (this.config.container === false) {\n return document.body\n }\n\n if (Util.isElement(this.config.container)) {\n return $(this.config.container)\n }\n\n return $(document).find(this.config.container)\n }\n\n _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()]\n }\n\n _setListeners() {\n const triggers = this.config.trigger.split(' ')\n\n triggers.forEach(trigger => {\n if (trigger === 'click') {\n $(this.element).on(\n this.constructor.Event.CLICK,\n this.config.selector,\n event => this.toggle(event)\n )\n } else if (trigger !== TRIGGER_MANUAL) {\n const eventIn = trigger === TRIGGER_HOVER ?\n this.constructor.Event.MOUSEENTER :\n this.constructor.Event.FOCUSIN\n const eventOut = trigger === TRIGGER_HOVER ?\n this.constructor.Event.MOUSELEAVE :\n this.constructor.Event.FOCUSOUT\n\n $(this.element)\n .on(eventIn, this.config.selector, event => this._enter(event))\n .on(eventOut, this.config.selector, event => this._leave(event))\n }\n })\n\n this._hideModalHandler = () => {\n if (this.element) {\n this.hide()\n }\n }\n\n $(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler)\n\n if (this.config.selector) {\n this.config = {\n ...this.config,\n trigger: 'manual',\n selector: ''\n }\n } else {\n this._fixTitle()\n }\n }\n\n _fixTitle() {\n const titleType = typeof this.element.getAttribute('data-original-title')\n\n if (this.element.getAttribute('title') || titleType !== 'string') {\n this.element.setAttribute(\n 'data-original-title',\n this.element.getAttribute('title') || ''\n )\n\n this.element.setAttribute('title', '')\n }\n }\n\n _enter(event, context) {\n const dataKey = this.constructor.DATA_KEY\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER\n ] = true\n }\n\n if ($(context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {\n context._hoverState = HOVER_STATE_SHOW\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HOVER_STATE_SHOW\n\n if (!context.config.delay || !context.config.delay.show) {\n context.show()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_SHOW) {\n context.show()\n }\n }, context.config.delay.show)\n }\n\n _leave(event, context) {\n const dataKey = this.constructor.DATA_KEY\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER\n ] = false\n }\n\n if (context._isWithActiveTrigger()) {\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HOVER_STATE_OUT\n\n if (!context.config.delay || !context.config.delay.hide) {\n context.hide()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_OUT) {\n context.hide()\n }\n }, context.config.delay.hide)\n }\n\n _isWithActiveTrigger() {\n for (const trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true\n }\n }\n\n return false\n }\n\n _getConfig(config) {\n const dataAttributes = $(this.element).data()\n\n Object.keys(dataAttributes)\n .forEach(dataAttr => {\n if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {\n delete dataAttributes[dataAttr]\n }\n })\n\n config = {\n ...this.constructor.Default,\n ...dataAttributes,\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n }\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString()\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString()\n }\n\n Util.typeCheckConfig(\n NAME,\n config,\n this.constructor.DefaultType\n )\n\n if (config.sanitize) {\n config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn)\n }\n\n return config\n }\n\n _getDelegateConfig() {\n const config = {}\n\n if (this.config) {\n for (const key in this.config) {\n if (this.constructor.Default[key] !== this.config[key]) {\n config[key] = this.config[key]\n }\n }\n }\n\n return config\n }\n\n _cleanTipClass() {\n const $tip = $(this.getTipElement())\n const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length) {\n $tip.removeClass(tabClass.join(''))\n }\n }\n\n _handlePopperPlacementChange(popperData) {\n this.tip = popperData.instance.popper\n this._cleanTipClass()\n this.addAttachmentClass(this._getAttachment(popperData.placement))\n }\n\n _fixTransition() {\n const tip = this.getTipElement()\n const initConfigAnimation = this.config.animation\n\n if (tip.getAttribute('x-placement') !== null) {\n return\n }\n\n $(tip).removeClass(CLASS_NAME_FADE)\n this.config.animation = false\n this.hide()\n this.show()\n this.config.animation = initConfigAnimation\n }\n\n // Static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n const $element = $(this)\n let data = $element.data(DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data && /dispose|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Tooltip(this, _config)\n $element.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n$.fn[NAME] = Tooltip._jQueryInterface\n$.fn[NAME].Constructor = Tooltip\n$.fn[NAME].noConflict = () => {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tooltip._jQueryInterface\n}\n\nexport default Tooltip\n"],"names":["uriAttrs","ARIA_ATTRIBUTE_PATTERN","DefaultWhitelist","a","area","b","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","i","img","li","ol","p","pre","s","small","span","sub","sup","strong","u","ul","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","attr","allowedAttributeList","attrName","nodeName","toLowerCase","indexOf","Boolean","nodeValue","match","regExp","filter","attrRegex","RegExp","len","length","sanitizeHtml","unsafeHtml","whiteList","sanitizeFn","domParser","window","DOMParser","createdDocument","parseFromString","whitelistKeys","Object","keys","elements","slice","call","body","querySelectorAll","el","elName","parentNode","removeChild","attributeList","attributes","whitelistedAttributes","concat","forEach","removeAttribute","innerHTML","NAME","VERSION","DATA_KEY","EVENT_KEY","JQUERY_NO_CONFLICT","$","fn","CLASS_PREFIX","BSCLS_PREFIX_REGEX","DISALLOWED_ATTRIBUTES","DefaultType","animation","template","title","trigger","delay","html","selector","placement","offset","container","fallbackPlacement","boundary","customClass","sanitize","popperConfig","AttachmentMap","AUTO","TOP","RIGHT","BOTTOM","LEFT","Default","HOVER_STATE_SHOW","HOVER_STATE_OUT","Event","HIDE","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","CLASS_NAME_FADE","CLASS_NAME_SHOW","SELECTOR_TOOLTIP_INNER","SELECTOR_ARROW","TRIGGER_HOVER","TRIGGER_FOCUS","TRIGGER_CLICK","TRIGGER_MANUAL","Tooltip","element","config","Popper","TypeError","_isEnabled","_timeout","_hoverState","_activeTrigger","_popper","_getConfig","tip","_setListeners","enable","disable","toggleEnabled","toggle","event","dataKey","constructor","context","currentTarget","data","_getDelegateConfig","click","_isWithActiveTrigger","_enter","_leave","getTipElement","hasClass","dispose","clearTimeout","removeData","off","closest","_hideModalHandler","remove","destroy","show","css","Error","showEvent","isWithContent","shadowRoot","Util","findShadowRoot","isInTheDom","contains","ownerDocument","documentElement","isDefaultPrevented","tipId","getUID","setAttribute","setContent","addClass","attachment","_getAttachment","addAttachmentClass","_getContainer","appendTo","_getPopperConfig","document","children","on","noop","complete","_fixTransition","prevHoverState","transitionDuration","getTransitionDurationFromElement","one","TRANSITION_END","emulateTransitionEnd","hide","callback","hideEvent","_cleanTipClass","removeClass","update","scheduleUpdate","getTitle","setElementContent","$element","content","nodeType","jquery","parent","is","empty","append","text","getAttribute","defaultBsConfig","modifiers","_getOffset","flip","behavior","arrow","preventOverflow","boundariesElement","onCreate","originalPlacement","_handlePopperPlacementChange","onUpdate","offsets","isElement","find","toUpperCase","triggers","split","eventIn","eventOut","_fixTitle","titleType","type","setTimeout","dataAttributes","dataAttr","toString","typeCheckConfig","key","$tip","tabClass","join","popperData","instance","popper","initConfigAnimation","_jQueryInterface","each","_config","test","Constructor","noConflict"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAEA,IAAMA,QAAQ,GAAG,CACf,YADe,EAEf,MAFe,EAGf,MAHe,EAIf,UAJe,EAKf,UALe,EAMf,QANe,EAOf,KAPe,EAQf,YARe,CAAjB;EAWA,IAAMC,sBAAsB,GAAG,gBAA/B;EAEO,IAAMC,gBAAgB,GAAG;EAC9B;EACA,OAAK,CAAC,OAAD,EAAU,KAAV,EAAiB,IAAjB,EAAuB,MAAvB,EAA+B,MAA/B,EAAuCD,sBAAvC,CAFyB;EAG9BE,EAAAA,CAAC,EAAE,CAAC,QAAD,EAAW,MAAX,EAAmB,OAAnB,EAA4B,KAA5B,CAH2B;EAI9BC,EAAAA,IAAI,EAAE,EAJwB;EAK9BC,EAAAA,CAAC,EAAE,EAL2B;EAM9BC,EAAAA,EAAE,EAAE,EAN0B;EAO9BC,EAAAA,GAAG,EAAE,EAPyB;EAQ9BC,EAAAA,IAAI,EAAE,EARwB;EAS9BC,EAAAA,GAAG,EAAE,EATyB;EAU9BC,EA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;;;;0BAjnBoB;EACnB,aAAOvD,OAAP;EACD;;;0BAEoB;EACnB,aAAO+B,OAAP;EACD;;;0BAEiB;EAChB,aAAOhC,IAAP;EACD;;;0BAEqB;EACpB,aAAOE,QAAP;EACD;;;0BAEkB;EACjB,aAAOiC,KAAP;EACD;;;0BAEsB;EACrB,aAAOhC,SAAP;EACD;;;0BAEwB;EACvB,aAAOO,WAAP;EACD;;;;;EA0lBH;EACA;EACA;EACA;EACA;;;AAEAL,uBAAC,CAACC,EAAF,CAAKN,IAAL,IAAasD,OAAO,CAACiI,gBAArB;AACAlL,uBAAC,CAACC,EAAF,CAAKN,IAAL,EAAW2L,WAAX,GAAyBrI,OAAzB;;AACAjD,uBAAC,CAACC,EAAF,CAAKN,IAAL,EAAW4L,UAAX,GAAwB,YAAM;EAC5BvL,EAAAA,qBAAC,CAACC,EAAF,CAAKN,IAAL,IAAaI,kBAAb;EACA,SAAOkD,OAAO,CAACiI,gBAAf;EACD,CAHD;;;;;;;;"} \ No newline at end of file
+{"version":3,"file":"tooltip.js","sources":["../src/util/index.js","../src/util/sanitizer.js","../src/tooltip.js"],"sourcesContent":["import SelectorEngine from '../dom/selector-engine'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = `#${hrefAttr.split('#')[1]}`\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => {\n if (!obj || typeof obj !== 'object') {\n return false\n }\n\n if (typeof obj.jquery !== 'undefined') {\n obj = obj[0]\n }\n\n return typeof obj.nodeType !== 'undefined'\n}\n\nconst getElement = obj => {\n if (isElement(obj)) { // it's a jQuery object or a node element\n return obj.jquery ? obj[0] : obj\n }\n\n if (typeof obj === 'string' && obj.length > 0) {\n return SelectorEngine.findOne(obj)\n }\n\n return null\n}\n\nconst emulateTransitionEnd = (element, duration) => {\n let called = false\n const durationPadding = 5\n const emulatedDuration = duration + durationPadding\n\n function listener() {\n called = true\n element.removeEventListener(TRANSITION_END, listener)\n }\n\n element.addEventListener(TRANSITION_END, listener)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(element)\n }\n }, emulatedDuration)\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!element) {\n return false\n }\n\n if (element.style && element.parentNode && element.parentNode.style) {\n const elementStyle = getComputedStyle(element)\n const parentNodeStyle = getComputedStyle(element.parentNode)\n\n return elementStyle.display !== 'none' &&\n parentNodeStyle.display !== 'none' &&\n elementStyle.visibility !== 'hidden'\n }\n\n return false\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = callback => {\n if (typeof callback === 'function') {\n callback()\n }\n}\n\nexport {\n getElement,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n emulateTransitionEnd,\n typeCheckConfig,\n isVisible,\n isDisabled,\n findShadowRoot,\n noop,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin,\n execute\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst uriAttrs = new Set([\n 'background',\n 'cite',\n 'href',\n 'itemtype',\n 'longdesc',\n 'poster',\n 'src',\n 'xlink:href'\n])\n\nconst ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i\n\n/**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst 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\n\nconst allowedAttribute = (attr, allowedAttributeList) => {\n const attrName = attr.nodeName.toLowerCase()\n\n if (allowedAttributeList.includes(attrName)) {\n if (uriAttrs.has(attrName)) {\n return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue))\n }\n\n return true\n }\n\n const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp)\n\n // Check if a regular expression validates the attribute.\n for (let i = 0, len = regExp.length; i < len; i++) {\n if (regExp[i].test(attrName)) {\n return true\n }\n }\n\n return false\n}\n\nexport const DefaultAllowlist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n}\n\nexport function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {\n if (!unsafeHtml.length) {\n return unsafeHtml\n }\n\n if (sanitizeFn && typeof sanitizeFn === 'function') {\n return sanitizeFn(unsafeHtml)\n }\n\n const domParser = new window.DOMParser()\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html')\n const allowlistKeys = Object.keys(allowList)\n const elements = [].concat(...createdDocument.body.querySelectorAll('*'))\n\n for (let i = 0, len = elements.length; i < len; i++) {\n const el = elements[i]\n const elName = el.nodeName.toLowerCase()\n\n if (!allowlistKeys.includes(elName)) {\n el.parentNode.removeChild(el)\n\n continue\n }\n\n const attributeList = [].concat(...el.attributes)\n const allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || [])\n\n attributeList.forEach(attr => {\n if (!allowedAttribute(attr, allowedAttributes)) {\n el.removeAttribute(attr.nodeName)\n }\n })\n }\n\n return createdDocument.body.innerHTML\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.1): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\n\nimport {\n defineJQueryPlugin,\n findShadowRoot,\n getElement,\n getUID,\n isElement,\n isRTL,\n noop,\n typeCheckConfig\n} from './util/index'\nimport {\n DefaultAllowlist,\n sanitizeHtml\n} from './util/sanitizer'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'tooltip'\nconst DATA_KEY = 'bs.tooltip'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst CLASS_PREFIX = 'bs-tooltip'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\nconst DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn'])\n\nconst DefaultType = {\n animation: 'boolean',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string',\n delay: '(number|object)',\n html: 'boolean',\n selector: '(string|boolean)',\n placement: '(string|function)',\n offset: '(array|string|function)',\n container: '(string|element|boolean)',\n fallbackPlacements: 'array',\n boundary: '(string|element)',\n customClass: '(string|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n allowList: 'object',\n popperConfig: '(null|object|function)'\n}\n\nconst AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: isRTL() ? 'left' : 'right',\n BOTTOM: 'bottom',\n LEFT: isRTL() ? 'right' : 'left'\n}\n\nconst Default = {\n animation: true,\n template: '<div class=\"tooltip\" role=\"tooltip\">' +\n '<div class=\"tooltip-arrow\"></div>' +\n '<div class=\"tooltip-inner\"></div>' +\n '</div>',\n trigger: 'hover focus',\n title: '',\n delay: 0,\n html: false,\n selector: false,\n placement: 'top',\n offset: [0, 0],\n container: false,\n fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n boundary: 'clippingParents',\n customClass: '',\n sanitize: true,\n sanitizeFn: null,\n allowList: DefaultAllowlist,\n popperConfig: null\n}\n\nconst Event = {\n HIDE: `hide${EVENT_KEY}`,\n HIDDEN: `hidden${EVENT_KEY}`,\n SHOW: `show${EVENT_KEY}`,\n SHOWN: `shown${EVENT_KEY}`,\n INSERTED: `inserted${EVENT_KEY}`,\n CLICK: `click${EVENT_KEY}`,\n FOCUSIN: `focusin${EVENT_KEY}`,\n FOCUSOUT: `focusout${EVENT_KEY}`,\n MOUSEENTER: `mouseenter${EVENT_KEY}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY}`\n}\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_MODAL = 'modal'\nconst CLASS_NAME_SHOW = 'show'\n\nconst HOVER_STATE_SHOW = 'show'\nconst HOVER_STATE_OUT = 'out'\n\nconst SELECTOR_TOOLTIP_INNER = '.tooltip-inner'\n\nconst TRIGGER_HOVER = 'hover'\nconst TRIGGER_FOCUS = 'focus'\nconst TRIGGER_CLICK = 'click'\nconst TRIGGER_MANUAL = 'manual'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Tooltip extends BaseComponent {\n constructor(element, config) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)')\n }\n\n super(element)\n\n // private\n this._isEnabled = true\n this._timeout = 0\n this._hoverState = ''\n this._activeTrigger = {}\n this._popper = null\n\n // Protected\n this._config = this._getConfig(config)\n this.tip = null\n\n this._setListeners()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get Event() {\n return Event\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Public\n\n enable() {\n this._isEnabled = true\n }\n\n disable() {\n this._isEnabled = false\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled\n }\n\n toggle(event) {\n if (!this._isEnabled) {\n return\n }\n\n if (event) {\n const context = this._initializeOnDelegatedTarget(event)\n\n context._activeTrigger.click = !context._activeTrigger.click\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context)\n } else {\n context._leave(null, context)\n }\n } else {\n if (this.getTipElement().classList.contains(CLASS_NAME_SHOW)) {\n this._leave(null, this)\n return\n }\n\n this._enter(null, this)\n }\n }\n\n dispose() {\n clearTimeout(this._timeout)\n\n EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler)\n\n if (this.tip && this.tip.parentNode) {\n this.tip.parentNode.removeChild(this.tip)\n }\n\n if (this._popper) {\n this._popper.destroy()\n }\n\n super.dispose()\n }\n\n show() {\n if (this._element.style.display === 'none') {\n throw new Error('Please use show on visible elements')\n }\n\n if (!(this.isWithContent() && this._isEnabled)) {\n return\n }\n\n const showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW)\n const shadowRoot = findShadowRoot(this._element)\n const isInTheDom = shadowRoot === null ?\n this._element.ownerDocument.documentElement.contains(this._element) :\n shadowRoot.contains(this._element)\n\n if (showEvent.defaultPrevented || !isInTheDom) {\n return\n }\n\n const tip = this.getTipElement()\n const tipId = getUID(this.constructor.NAME)\n\n tip.setAttribute('id', tipId)\n this._element.setAttribute('aria-describedby', tipId)\n\n this.setContent()\n\n if (this._config.animation) {\n tip.classList.add(CLASS_NAME_FADE)\n }\n\n const placement = typeof this._config.placement === 'function' ?\n this._config.placement.call(this, tip, this._element) :\n this._config.placement\n\n const attachment = this._getAttachment(placement)\n this._addAttachmentClass(attachment)\n\n const { container } = this._config\n Data.set(tip, this.constructor.DATA_KEY, this)\n\n if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n container.appendChild(tip)\n EventHandler.trigger(this._element, this.constructor.Event.INSERTED)\n }\n\n if (this._popper) {\n this._popper.update()\n } else {\n this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment))\n }\n\n tip.classList.add(CLASS_NAME_SHOW)\n\n const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass\n if (customClass) {\n tip.classList.add(...customClass.split(' '))\n }\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children).forEach(element => {\n EventHandler.on(element, 'mouseover', noop)\n })\n }\n\n const complete = () => {\n const prevHoverState = this._hoverState\n\n this._hoverState = null\n EventHandler.trigger(this._element, this.constructor.Event.SHOWN)\n\n if (prevHoverState === HOVER_STATE_OUT) {\n this._leave(null, this)\n }\n }\n\n const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE)\n this._queueCallback(complete, this.tip, isAnimated)\n }\n\n hide() {\n if (!this._popper) {\n return\n }\n\n const tip = this.getTipElement()\n const complete = () => {\n if (this._isWithActiveTrigger()) {\n return\n }\n\n if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {\n tip.parentNode.removeChild(tip)\n }\n\n this._cleanTipClass()\n this._element.removeAttribute('aria-describedby')\n EventHandler.trigger(this._element, this.constructor.Event.HIDDEN)\n\n if (this._popper) {\n this._popper.destroy()\n this._popper = null\n }\n }\n\n const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE)\n if (hideEvent.defaultPrevented) {\n return\n }\n\n tip.classList.remove(CLASS_NAME_SHOW)\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children)\n .forEach(element => EventHandler.off(element, 'mouseover', noop))\n }\n\n this._activeTrigger[TRIGGER_CLICK] = false\n this._activeTrigger[TRIGGER_FOCUS] = false\n this._activeTrigger[TRIGGER_HOVER] = false\n\n const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE)\n this._queueCallback(complete, this.tip, isAnimated)\n this._hoverState = ''\n }\n\n update() {\n if (this._popper !== null) {\n this._popper.update()\n }\n }\n\n // Protected\n\n isWithContent() {\n return Boolean(this.getTitle())\n }\n\n getTipElement() {\n if (this.tip) {\n return this.tip\n }\n\n const element = document.createElement('div')\n element.innerHTML = this._config.template\n\n this.tip = element.children[0]\n return this.tip\n }\n\n setContent() {\n const tip = this.getTipElement()\n this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle())\n tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)\n }\n\n setElementContent(element, content) {\n if (element === null) {\n return\n }\n\n if (isElement(content)) {\n content = getElement(content)\n\n // content is a DOM node or a jQuery\n if (this._config.html) {\n if (content.parentNode !== element) {\n element.innerHTML = ''\n element.appendChild(content)\n }\n } else {\n element.textContent = content.textContent\n }\n\n return\n }\n\n if (this._config.html) {\n if (this._config.sanitize) {\n content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn)\n }\n\n element.innerHTML = content\n } else {\n element.textContent = content\n }\n }\n\n getTitle() {\n let title = this._element.getAttribute('data-bs-original-title')\n\n if (!title) {\n title = typeof this._config.title === 'function' ?\n this._config.title.call(this._element) :\n this._config.title\n }\n\n return title\n }\n\n updateAttachment(attachment) {\n if (attachment === 'right') {\n return 'end'\n }\n\n if (attachment === 'left') {\n return 'start'\n }\n\n return attachment\n }\n\n // Private\n\n _initializeOnDelegatedTarget(event, context) {\n const dataKey = this.constructor.DATA_KEY\n context = context || Data.get(event.delegateTarget, dataKey)\n\n if (!context) {\n context = new this.constructor(event.delegateTarget, this._getDelegateConfig())\n Data.set(event.delegateTarget, dataKey, context)\n }\n\n return context\n }\n\n _getOffset() {\n const { offset } = this._config\n\n if (typeof offset === 'string') {\n return offset.split(',').map(val => Number.parseInt(val, 10))\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element)\n }\n\n return offset\n }\n\n _getPopperConfig(attachment) {\n const defaultBsPopperConfig = {\n placement: attachment,\n modifiers: [\n {\n name: 'flip',\n options: {\n fallbackPlacements: this._config.fallbackPlacements\n }\n },\n {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n },\n {\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n },\n {\n name: 'arrow',\n options: {\n element: `.${this.constructor.NAME}-arrow`\n }\n },\n {\n name: 'onChange',\n enabled: true,\n phase: 'afterWrite',\n fn: data => this._handlePopperPlacementChange(data)\n }\n ],\n onFirstUpdate: data => {\n if (data.options.placement !== data.placement) {\n this._handlePopperPlacementChange(data)\n }\n }\n }\n\n return {\n ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n }\n }\n\n _addAttachmentClass(attachment) {\n this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`)\n }\n\n _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()]\n }\n\n _setListeners() {\n const triggers = this._config.trigger.split(' ')\n\n triggers.forEach(trigger => {\n if (trigger === 'click') {\n EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event))\n } else if (trigger !== TRIGGER_MANUAL) {\n const eventIn = trigger === TRIGGER_HOVER ?\n this.constructor.Event.MOUSEENTER :\n this.constructor.Event.FOCUSIN\n const eventOut = trigger === TRIGGER_HOVER ?\n this.constructor.Event.MOUSELEAVE :\n this.constructor.Event.FOCUSOUT\n\n EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event))\n EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event))\n }\n })\n\n this._hideModalHandler = () => {\n if (this._element) {\n this.hide()\n }\n }\n\n EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler)\n\n if (this._config.selector) {\n this._config = {\n ...this._config,\n trigger: 'manual',\n selector: ''\n }\n } else {\n this._fixTitle()\n }\n }\n\n _fixTitle() {\n const title = this._element.getAttribute('title')\n const originalTitleType = typeof this._element.getAttribute('data-bs-original-title')\n\n if (title || originalTitleType !== 'string') {\n this._element.setAttribute('data-bs-original-title', title || '')\n if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {\n this._element.setAttribute('aria-label', title)\n }\n\n this._element.setAttribute('title', '')\n }\n }\n\n _enter(event, context) {\n context = this._initializeOnDelegatedTarget(event, context)\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER\n ] = true\n }\n\n if (context.getTipElement().classList.contains(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {\n context._hoverState = HOVER_STATE_SHOW\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HOVER_STATE_SHOW\n\n if (!context._config.delay || !context._config.delay.show) {\n context.show()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_SHOW) {\n context.show()\n }\n }, context._config.delay.show)\n }\n\n _leave(event, context) {\n context = this._initializeOnDelegatedTarget(event, context)\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER\n ] = context._element.contains(event.relatedTarget)\n }\n\n if (context._isWithActiveTrigger()) {\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HOVER_STATE_OUT\n\n if (!context._config.delay || !context._config.delay.hide) {\n context.hide()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_OUT) {\n context.hide()\n }\n }, context._config.delay.hide)\n }\n\n _isWithActiveTrigger() {\n for (const trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true\n }\n }\n\n return false\n }\n\n _getConfig(config) {\n const dataAttributes = Manipulator.getDataAttributes(this._element)\n\n Object.keys(dataAttributes).forEach(dataAttr => {\n if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {\n delete dataAttributes[dataAttr]\n }\n })\n\n config = {\n ...this.constructor.Default,\n ...dataAttributes,\n ...(typeof config === 'object' && config ? config : {})\n }\n\n config.container = config.container === false ? document.body : getElement(config.container)\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n }\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString()\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString()\n }\n\n typeCheckConfig(NAME, config, this.constructor.DefaultType)\n\n if (config.sanitize) {\n config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn)\n }\n\n return config\n }\n\n _getDelegateConfig() {\n const config = {}\n\n if (this._config) {\n for (const key in this._config) {\n if (this.constructor.Default[key] !== this._config[key]) {\n config[key] = this._config[key]\n }\n }\n }\n\n return config\n }\n\n _cleanTipClass() {\n const tip = this.getTipElement()\n const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length > 0) {\n tabClass.map(token => token.trim())\n .forEach(tClass => tip.classList.remove(tClass))\n }\n }\n\n _handlePopperPlacementChange(popperData) {\n const { state } = popperData\n\n if (!state) {\n return\n }\n\n this.tip = state.elements.popper\n this._cleanTipClass()\n this._addAttachmentClass(this._getAttachment(state.placement))\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n let data = Data.get(this, DATA_KEY)\n const _config = typeof config === 'object' && config\n\n if (!data && /dispose|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Tooltip(this, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Tooltip to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Tooltip)\n\nexport default Tooltip\n"],"names":["MAX_UID","toType","obj","undefined","toString","call","match","toLowerCase","getUID","prefix","Math","floor","random","document","getElementById","isElement","jquery","nodeType","getElement","length","SelectorEngine","findOne","typeCheckConfig","componentName","config","configTypes","Object","keys","forEach","property","expectedTypes","value","valueType","RegExp","test","TypeError","toUpperCase","findShadowRoot","element","documentElement","attachShadow","getRootNode","root","ShadowRoot","parentNode","noop","getjQuery","jQuery","window","body","hasAttribute","onDOMContentLoaded","callback","readyState","addEventListener","isRTL","dir","defineJQueryPlugin","plugin","$","name","NAME","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","uriAttrs","Set","ARIA_ATTRIBUTE_PATTERN","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","attr","allowedAttributeList","attrName","nodeName","includes","has","Boolean","nodeValue","regExp","filter","attrRegex","i","len","DefaultAllowlist","a","area","b","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","img","li","ol","p","pre","s","small","span","sub","sup","strong","u","ul","sanitizeHtml","unsafeHtml","allowList","sanitizeFn","domParser","DOMParser","createdDocument","parseFromString","allowlistKeys","elements","concat","querySelectorAll","el","elName","removeChild","attributeList","attributes","allowedAttributes","removeAttribute","innerHTML","DATA_KEY","EVENT_KEY","CLASS_PREFIX","BSCLS_PREFIX_REGEX","DISALLOWED_ATTRIBUTES","DefaultType","animation","template","title","trigger","delay","html","selector","placement","offset","container","fallbackPlacements","boundary","customClass","sanitize","popperConfig","AttachmentMap","AUTO","TOP","RIGHT","BOTTOM","LEFT","Default","Event","HIDE","HIDDEN","SHOW","SHOWN","INSERTED","CLICK","FOCUSIN","FOCUSOUT","MOUSEENTER","MOUSELEAVE","CLASS_NAME_FADE","CLASS_NAME_MODAL","CLASS_NAME_SHOW","HOVER_STATE_SHOW","HOVER_STATE_OUT","SELECTOR_TOOLTIP_INNER","TRIGGER_HOVER","TRIGGER_FOCUS","TRIGGER_CLICK","TRIGGER_MANUAL","Tooltip","BaseComponent","constructor","Popper","_isEnabled","_timeout","_hoverState","_activeTrigger","_popper","_config","_getConfig","tip","_setListeners","enable","disable","toggleEnabled","toggle","event","context","_initializeOnDelegatedTarget","click","_isWithActiveTrigger","_enter","_leave","getTipElement","classList","contains","dispose","clearTimeout","EventHandler","off","_element","closest","_hideModalHandler","destroy","show","style","display","Error","isWithContent","showEvent","shadowRoot","isInTheDom","ownerDocument","defaultPrevented","tipId","setAttribute","setContent","add","attachment","_getAttachment","_addAttachmentClass","Data","set","appendChild","update","createPopper","_getPopperConfig","split","children","on","complete","prevHoverState","isAnimated","_queueCallback","hide","_cleanTipClass","hideEvent","remove","getTitle","createElement","setElementContent","content","textContent","getAttribute","updateAttachment","dataKey","get","delegateTarget","_getDelegateConfig","_getOffset","map","val","Number","parseInt","popperData","defaultBsPopperConfig","modifiers","options","enabled","phase","data","_handlePopperPlacementChange","onFirstUpdate","triggers","eventIn","eventOut","_fixTitle","originalTitleType","type","setTimeout","relatedTarget","dataAttributes","Manipulator","getDataAttributes","dataAttr","key","tabClass","token","trim","tClass","state","popper","each"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEA;EACA;EACA;EACA;EACA;EACA;;EAEA,MAAMA,OAAO,GAAG,OAAhB;;EAKA,MAAMC,MAAM,GAAGC,GAAG,IAAI;EACpB,MAAIA,GAAG,KAAK,IAAR,IAAgBA,GAAG,KAAKC,SAA5B,EAAuC;EACrC,WAAQ,GAAED,GAAI,EAAd;EACD;;EAED,SAAO,GAAGE,QAAH,CAAYC,IAAZ,CAAiBH,GAAjB,EAAsBI,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8C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.js
deleted file mode 100644
index 55b6d244b..000000000
--- a/vendor/twbs/bootstrap/js/dist/util.js
+++ /dev/null
@@ -1,193 +0,0 @@
-/*!
- * Bootstrap util.js v4.6.0 (https://getbootstrap.com/)
- * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
- */
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
- typeof define === 'function' && define.amd ? define(['jquery'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Util = factory(global.jQuery));
-}(this, (function ($) { 'use strict';
-
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
-
- var $__default = /*#__PURE__*/_interopDefaultLegacy($);
-
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): util.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
- * --------------------------------------------------------------------------
- */
- /**
- * ------------------------------------------------------------------------
- * Private TransitionEnd Helpers
- * ------------------------------------------------------------------------
- */
-
- var TRANSITION_END = 'transitionend';
- var MAX_UID = 1000000;
- var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
-
- function toType(obj) {
- if (obj === null || typeof obj === 'undefined') {
- return "" + obj;
- }
-
- return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
- }
-
- function getSpecialTransitionEndEvent() {
- return {
- bindType: TRANSITION_END,
- delegateType: TRANSITION_END,
- handle: function handle(event) {
- if ($__default['default'](event.target).is(this)) {
- return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
- }
-
- return undefined;
- }
- };
- }
-
- function transitionEndEmulator(duration) {
- var _this = this;
-
- var called = false;
- $__default['default'](this).one(Util.TRANSITION_END, function () {
- called = true;
- });
- setTimeout(function () {
- if (!called) {
- Util.triggerTransitionEnd(_this);
- }
- }, duration);
- return this;
- }
-
- function setTransitionEndSupport() {
- $__default['default'].fn.emulateTransitionEnd = transitionEndEmulator;
- $__default['default'].event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
- }
- /**
- * --------------------------------------------------------------------------
- * Public Util Api
- * --------------------------------------------------------------------------
- */
-
-
- var Util = {
- TRANSITION_END: 'bsTransitionEnd',
- getUID: function getUID(prefix) {
- do {
- prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
- } while (document.getElementById(prefix));
-
- return prefix;
- },
- getSelectorFromElement: function getSelectorFromElement(element) {
- var selector = element.getAttribute('data-target');
-
- if (!selector || selector === '#') {
- var hrefAttr = element.getAttribute('href');
- selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
- }
-
- try {
- return document.querySelector(selector) ? selector : null;
- } catch (_) {
- return null;
- }
- },
- getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
- if (!element) {
- return 0;
- } // Get transition-duration of the element
-
-
- var transitionDuration = $__default['default'](element).css('transition-duration');
- var transitionDelay = $__default['default'](element).css('transition-delay');
- var floatTransitionDuration = parseFloat(transitionDuration);
- var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
-
- if (!floatTransitionDuration && !floatTransitionDelay) {
- return 0;
- } // If multiple durations are defined, take the first
-
-
- transitionDuration = transitionDuration.split(',')[0];
- transitionDelay = transitionDelay.split(',')[0];
- return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
- },
- reflow: function reflow(element) {
- return element.offsetHeight;
- },
- triggerTransitionEnd: function triggerTransitionEnd(element) {
- $__default['default'](element).trigger(TRANSITION_END);
- },
- supportsTransitionEnd: function supportsTransitionEnd() {
- return Boolean(TRANSITION_END);
- },
- isElement: function isElement(obj) {
- return (obj[0] || obj).nodeType;
- },
- typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
- for (var property in configTypes) {
- if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
- var expectedTypes = configTypes[property];
- var value = config[property];
- var valueType = value && Util.isElement(value) ? 'element' : toType(value);
-
- if (!new RegExp(expectedTypes).test(valueType)) {
- throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
- }
- }
- }
- },
- findShadowRoot: function findShadowRoot(element) {
- if (!document.documentElement.attachShadow) {
- return null;
- } // Can find the shadow root otherwise it'll return the document
-
-
- if (typeof element.getRootNode === 'function') {
- var root = element.getRootNode();
- return root instanceof ShadowRoot ? root : null;
- }
-
- if (element instanceof ShadowRoot) {
- return element;
- } // when we don't find a shadow root
-
-
- if (!element.parentNode) {
- return null;
- }
-
- return Util.findShadowRoot(element.parentNode);
- },
- jQueryDetection: function jQueryDetection() {
- if (typeof $__default['default'] === 'undefined') {
- throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
- }
-
- var version = $__default['default'].fn.jquery.split(' ')[0].split('.');
- var minMajor = 1;
- var ltMajor = 2;
- var minMinor = 9;
- var minPatch = 1;
- var maxMajor = 4;
-
- if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
- throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
- }
- }
- };
- Util.jQueryDetection();
- setTransitionEndSupport();
-
- return Util;
-
-})));
-//# sourceMappingURL=util.js.map
diff --git a/vendor/twbs/bootstrap/js/dist/util.js.map b/vendor/twbs/bootstrap/js/dist/util.js.map
deleted file mode 100644
index 1740a2f3b..000000000
--- a/vendor/twbs/bootstrap/js/dist/util.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"util.js","sources":["../src/util.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.6.0): util.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport $ from 'jquery'\n\n/**\n * ------------------------------------------------------------------------\n * Private TransitionEnd Helpers\n * ------------------------------------------------------------------------\n */\n\nconst TRANSITION_END = 'transitionend'\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nfunction toType(obj) {\n if (obj === null || typeof obj === 'undefined') {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\nfunction getSpecialTransitionEndEvent() {\n return {\n bindType: TRANSITION_END,\n delegateType: TRANSITION_END,\n handle(event) {\n if ($(event.target).is(this)) {\n return event.handleObj.handler.apply(this, arguments) // eslint-disable-line prefer-rest-params\n }\n\n return undefined\n }\n }\n}\n\nfunction transitionEndEmulator(duration) {\n let called = false\n\n $(this).one(Util.TRANSITION_END, () => {\n called = true\n })\n\n setTimeout(() => {\n if (!called) {\n Util.triggerTransitionEnd(this)\n }\n }, duration)\n\n return this\n}\n\nfunction setTransitionEndSupport() {\n $.fn.emulateTransitionEnd = transitionEndEmulator\n $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst Util = {\n TRANSITION_END: 'bsTransitionEnd',\n\n getUID(prefix) {\n do {\n prefix += ~~(Math.random() * MAX_UID) // \"~~\" acts like a faster Math.floor() here\n } while (document.getElementById(prefix))\n\n return prefix\n },\n\n getSelectorFromElement(element) {\n let selector = element.getAttribute('data-target')\n\n if (!selector || selector === '#') {\n const hrefAttr = element.getAttribute('href')\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : ''\n }\n\n try {\n return document.querySelector(selector) ? selector : null\n } catch (_) {\n return null\n }\n },\n\n getTransitionDurationFromElement(element) {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let transitionDuration = $(element).css('transition-duration')\n let transitionDelay = $(element).css('transition-delay')\n\n const floatTransitionDuration = parseFloat(transitionDuration)\n const floatTransitionDelay = parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n },\n\n reflow(element) {\n return element.offsetHeight\n },\n\n triggerTransitionEnd(element) {\n $(element).trigger(TRANSITION_END)\n },\n\n supportsTransitionEnd() {\n return Boolean(TRANSITION_END)\n },\n\n isElement(obj) {\n return (obj[0] || obj).nodeType\n },\n\n typeCheckConfig(componentName, config, configTypes) {\n for (const property in configTypes) {\n if (Object.prototype.hasOwnProperty.call(configTypes, property)) {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && Util.isElement(value) ?\n 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new Error(\n `${componentName.toUpperCase()}: ` +\n `Option \"${property}\" provided type \"${valueType}\" ` +\n `but expected type \"${expectedTypes}\".`)\n }\n }\n }\n },\n\n findShadowRoot(element) {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return Util.findShadowRoot(element.parentNode)\n },\n\n jQueryDetection() {\n if (typeof $ === 'undefined') {\n throw new TypeError('Bootstrap\\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\\'s JavaScript.')\n }\n\n const version = $.fn.jquery.split(' ')[0].split('.')\n const minMajor = 1\n const ltMajor = 2\n const minMinor = 9\n const minPatch = 1\n const maxMajor = 4\n\n if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {\n throw new Error('Bootstrap\\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')\n }\n }\n}\n\nUtil.jQueryDetection()\nsetTransitionEndSupport()\n\nexport default Util\n"],"names":["TRANSITION_END","MAX_UID","MILLISECONDS_MULTIPLIER","toType","obj","toString","call","match","toLowerCase","getSpecialTransitionEndEvent","bindType","delegateType","handle","event","$","target","is","handleObj","handler","apply","arguments","undefined","transitionEndEmulator","duration","called","one","Util","setTimeout","triggerTransitionEnd","setTransitionEndSupport","fn","emulateTransitionEnd","special","getUID","prefix","Math","random","document","getElementById","getSelectorFromElement","element","selector","getAttribute","hrefAttr","trim","querySelector","_","getTransitionDurationFromElement","transitionDuration","css","transitionDelay","floatTransitionDuration","parseFloat","floatTransitionDelay","split","reflow","offsetHeight","trigger","supportsTransitionEnd","Boolean","isElement","nodeType","typeCheckConfig","componentName","config","configTypes","property","Object","prototype","hasOwnProperty","expectedTypes","value","valueType","RegExp","test","Error","toUpperCase","findShadowRoot","documentElement","attachShadow","getRootNode","root","ShadowRoot","parentNode","jQueryDetection","TypeError","version","jquery","minMajor","ltMajor","minMinor","minPatch","maxMajor"],"mappings":";;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;EAIA;EACA;EACA;EACA;EACA;;EAEA,IAAMA,cAAc,GAAG,eAAvB;EACA,IAAMC,OAAO,GAAG,OAAhB;EACA,IAAMC,uBAAuB,GAAG,IAAhC;;EAGA,SAASC,MAAT,CAAgBC,GAAhB,EAAqB;EACnB,MAAIA,GAAG,KAAK,IAAR,IAAgB,OAAOA,GAAP,KAAe,WAAnC,EAAgD;EAC9C,gBAAUA,GAAV;EACD;;EAED,SAAO,GAAGC,QAAH,CAAYC,IAAZ,CAAiBF,GAAjB,EAAsBG,KAAtB,CAA4B,aAA5B,EAA2C,CAA3C,EAA8CC,WAA9C,EAAP;EACD;;EAED,SAASC,4BAAT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AAaK,QAApH,IAAgIL,OAAO,CAAC,CAAD,CAAP,IAAcM,QAAlJ,EAA4J;EAC1J,YAAM,IAAIjB,KAAJ,CAAU,8EAAV,CAAN;EACD;EACF;EA1HU;EA6HbjD,IAAI,CAAC0D,eAAL;EACAvD,uBAAuB;;;;;;;;"} \ No newline at end of file
diff --git a/vendor/twbs/bootstrap/js/index.js b/vendor/twbs/bootstrap/js/index.js
deleted file mode 100644
index 4f96305a3..000000000
--- a/vendor/twbs/bootstrap/js/index.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): index.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
- * --------------------------------------------------------------------------
- */
-
-import Alert from './src/alert'
-import Button from './src/button'
-import Carousel from './src/carousel'
-import Collapse from './src/collapse'
-import Dropdown from './src/dropdown'
-import Modal from './src/modal'
-import Popover from './src/popover'
-import Scrollspy from './src/scrollspy'
-import Tab from './src/tab'
-import Toast from './src/toast'
-import Tooltip from './src/tooltip'
-import Util from './src/util'
-
-export {
- Util,
- Alert,
- Button,
- Carousel,
- Collapse,
- Dropdown,
- Modal,
- Popover,
- Scrollspy,
- Tab,
- Toast,
- Tooltip
-}
diff --git a/vendor/twbs/bootstrap/js/src/alert.js b/vendor/twbs/bootstrap/js/src/alert.js
index afd7736c7..87cc7e731 100644
--- a/vendor/twbs/bootstrap/js/src/alert.js
+++ b/vendor/twbs/bootstrap/js/src/alert.js
@@ -1,12 +1,17 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): alert.js
+ * Bootstrap (v5.0.1): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
-import $ from 'jquery'
-import Util from './util'
+import {
+ defineJQueryPlugin,
+ getElementFromSelector
+} from './util/index'
+import Data from './dom/data'
+import EventHandler from './dom/event-handler'
+import BaseComponent from './base-component'
/**
* ------------------------------------------------------------------------
@@ -15,13 +20,11 @@ import Util from './util'
*/
const NAME = 'alert'
-const VERSION = '4.6.0'
const DATA_KEY = 'bs.alert'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
-const JQUERY_NO_CONFLICT = $.fn[NAME]
-const SELECTOR_DISMISS = '[data-dismiss="alert"]'
+const SELECTOR_DISMISS = '[data-bs-dismiss="alert"]'
const EVENT_CLOSE = `close${EVENT_KEY}`
const EVENT_CLOSED = `closed${EVENT_KEY}`
@@ -37,95 +40,59 @@ const CLASS_NAME_SHOW = 'show'
* ------------------------------------------------------------------------
*/
-class Alert {
- constructor(element) {
- this._element = element
- }
-
+class Alert extends BaseComponent {
// Getters
- static get VERSION() {
- return VERSION
+ static get NAME() {
+ return NAME
}
// Public
close(element) {
- let rootElement = this._element
- if (element) {
- rootElement = this._getRootElement(element)
- }
-
+ const rootElement = element ? this._getRootElement(element) : this._element
const customEvent = this._triggerCloseEvent(rootElement)
- if (customEvent.isDefaultPrevented()) {
+ if (customEvent === null || customEvent.defaultPrevented) {
return
}
this._removeElement(rootElement)
}
- dispose() {
- $.removeData(this._element, DATA_KEY)
- this._element = null
- }
-
// Private
_getRootElement(element) {
- const selector = Util.getSelectorFromElement(element)
- let parent = false
-
- if (selector) {
- parent = document.querySelector(selector)
- }
-
- if (!parent) {
- parent = $(element).closest(`.${CLASS_NAME_ALERT}`)[0]
- }
-
- return parent
+ return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`)
}
_triggerCloseEvent(element) {
- const closeEvent = $.Event(EVENT_CLOSE)
-
- $(element).trigger(closeEvent)
- return closeEvent
+ return EventHandler.trigger(element, EVENT_CLOSE)
}
_removeElement(element) {
- $(element).removeClass(CLASS_NAME_SHOW)
-
- if (!$(element).hasClass(CLASS_NAME_FADE)) {
- this._destroyElement(element)
- return
- }
+ element.classList.remove(CLASS_NAME_SHOW)
- const transitionDuration = Util.getTransitionDurationFromElement(element)
-
- $(element)
- .one(Util.TRANSITION_END, event => this._destroyElement(element, event))
- .emulateTransitionEnd(transitionDuration)
+ const isAnimated = element.classList.contains(CLASS_NAME_FADE)
+ this._queueCallback(() => this._destroyElement(element), element, isAnimated)
}
_destroyElement(element) {
- $(element)
- .detach()
- .trigger(EVENT_CLOSED)
- .remove()
+ if (element.parentNode) {
+ element.parentNode.removeChild(element)
+ }
+
+ EventHandler.trigger(element, EVENT_CLOSED)
}
// Static
- static _jQueryInterface(config) {
+ static jQueryInterface(config) {
return this.each(function () {
- const $element = $(this)
- let data = $element.data(DATA_KEY)
+ let data = Data.get(this, DATA_KEY)
if (!data) {
data = new Alert(this)
- $element.data(DATA_KEY, data)
}
if (config === 'close') {
@@ -134,7 +101,7 @@ class Alert {
})
}
- static _handleDismiss(alertInstance) {
+ static handleDismiss(alertInstance) {
return function (event) {
if (event) {
event.preventDefault()
@@ -151,23 +118,15 @@ class Alert {
* ------------------------------------------------------------------------
*/
-$(document).on(
- EVENT_CLICK_DATA_API,
- SELECTOR_DISMISS,
- Alert._handleDismiss(new Alert())
-)
+EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()))
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Alert to jQuery only if jQuery is present
*/
-$.fn[NAME] = Alert._jQueryInterface
-$.fn[NAME].Constructor = Alert
-$.fn[NAME].noConflict = () => {
- $.fn[NAME] = JQUERY_NO_CONFLICT
- return Alert._jQueryInterface
-}
+defineJQueryPlugin(Alert)
export default Alert
diff --git a/vendor/twbs/bootstrap/js/src/button.js b/vendor/twbs/bootstrap/js/src/button.js
index 316387e8e..6ef753136 100644
--- a/vendor/twbs/bootstrap/js/src/button.js
+++ b/vendor/twbs/bootstrap/js/src/button.js
@@ -1,11 +1,14 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): button.js
+ * Bootstrap (v5.0.1): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
-import $ from 'jquery'
+import { defineJQueryPlugin } from './util/index'
+import Data from './dom/data'
+import EventHandler from './dom/event-handler'
+import BaseComponent from './base-component'
/**
* ------------------------------------------------------------------------
@@ -14,28 +17,15 @@ import $ from 'jquery'
*/
const NAME = 'button'
-const VERSION = '4.6.0'
const DATA_KEY = 'bs.button'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
-const JQUERY_NO_CONFLICT = $.fn[NAME]
const CLASS_NAME_ACTIVE = 'active'
-const CLASS_NAME_BUTTON = 'btn'
-const CLASS_NAME_FOCUS = 'focus'
-const SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]'
-const SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]'
-const SELECTOR_DATA_TOGGLE = '[data-toggle="button"]'
-const SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn'
-const SELECTOR_INPUT = 'input:not([type="hidden"])'
-const SELECTOR_ACTIVE = '.active'
-const SELECTOR_BUTTON = '.btn'
+const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="button"]'
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
-const EVENT_FOCUS_BLUR_DATA_API = `focus${EVENT_KEY}${DATA_API_KEY} ` +
- `blur${EVENT_KEY}${DATA_API_KEY}`
-const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
/**
* ------------------------------------------------------------------------
@@ -43,87 +33,30 @@ const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
* ------------------------------------------------------------------------
*/
-class Button {
- constructor(element) {
- this._element = element
- this.shouldAvoidTriggerChange = false
- }
-
+class Button extends BaseComponent {
// Getters
- static get VERSION() {
- return VERSION
+ static get NAME() {
+ return NAME
}
// Public
toggle() {
- let triggerChangeEvent = true
- let addAriaPressed = true
- const rootElement = $(this._element).closest(SELECTOR_DATA_TOGGLES)[0]
-
- if (rootElement) {
- const input = this._element.querySelector(SELECTOR_INPUT)
-
- if (input) {
- if (input.type === 'radio') {
- if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
- triggerChangeEvent = false
- } else {
- const activeElement = rootElement.querySelector(SELECTOR_ACTIVE)
-
- if (activeElement) {
- $(activeElement).removeClass(CLASS_NAME_ACTIVE)
- }
- }
- }
-
- if (triggerChangeEvent) {
- // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
- if (input.type === 'checkbox' || input.type === 'radio') {
- input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE)
- }
-
- if (!this.shouldAvoidTriggerChange) {
- $(input).trigger('change')
- }
- }
-
- input.focus()
- addAriaPressed = false
- }
- }
-
- if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) {
- if (addAriaPressed) {
- this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE))
- }
-
- if (triggerChangeEvent) {
- $(this._element).toggleClass(CLASS_NAME_ACTIVE)
- }
- }
- }
-
- dispose() {
- $.removeData(this._element, DATA_KEY)
- this._element = null
+ // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method
+ this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE))
}
// Static
- static _jQueryInterface(config, avoidTriggerChange) {
+ static jQueryInterface(config) {
return this.each(function () {
- const $element = $(this)
- let data = $element.data(DATA_KEY)
+ let data = Data.get(this, DATA_KEY)
if (!data) {
data = new Button(this)
- $element.data(DATA_KEY, data)
}
- data.shouldAvoidTriggerChange = avoidTriggerChange
-
if (config === 'toggle') {
data[config]()
}
@@ -137,73 +70,26 @@ class Button {
* ------------------------------------------------------------------------
*/
-$(document)
- .on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, event => {
- let button = event.target
- const initialButton = button
-
- if (!$(button).hasClass(CLASS_NAME_BUTTON)) {
- button = $(button).closest(SELECTOR_BUTTON)[0]
- }
-
- if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) {
- event.preventDefault() // work around Firefox bug #1540995
- } else {
- const inputBtn = button.querySelector(SELECTOR_INPUT)
+EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {
+ event.preventDefault()
- if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
- event.preventDefault() // work around Firefox bug #1540995
- return
- }
+ const button = event.target.closest(SELECTOR_DATA_TOGGLE)
- if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') {
- Button._jQueryInterface.call($(button), 'toggle', initialButton.tagName === 'INPUT')
- }
- }
- })
- .on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, event => {
- const button = $(event.target).closest(SELECTOR_BUTTON)[0]
- $(button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type))
- })
-
-$(window).on(EVENT_LOAD_DATA_API, () => {
- // ensure correct active class is set to match the controls' actual values/states
-
- // find all checkboxes/readio buttons inside data-toggle groups
- let buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS))
- for (let i = 0, len = buttons.length; i < len; i++) {
- const button = buttons[i]
- const input = button.querySelector(SELECTOR_INPUT)
- if (input.checked || input.hasAttribute('checked')) {
- button.classList.add(CLASS_NAME_ACTIVE)
- } else {
- button.classList.remove(CLASS_NAME_ACTIVE)
- }
+ let data = Data.get(button, DATA_KEY)
+ if (!data) {
+ data = new Button(button)
}
- // find all button toggles
- buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE))
- for (let i = 0, len = buttons.length; i < len; i++) {
- const button = buttons[i]
- if (button.getAttribute('aria-pressed') === 'true') {
- button.classList.add(CLASS_NAME_ACTIVE)
- } else {
- button.classList.remove(CLASS_NAME_ACTIVE)
- }
- }
+ data.toggle()
})
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Button to jQuery only if jQuery is present
*/
-$.fn[NAME] = Button._jQueryInterface
-$.fn[NAME].Constructor = Button
-$.fn[NAME].noConflict = () => {
- $.fn[NAME] = JQUERY_NO_CONFLICT
- return Button._jQueryInterface
-}
+defineJQueryPlugin(Button)
export default Button
diff --git a/vendor/twbs/bootstrap/js/src/carousel.js b/vendor/twbs/bootstrap/js/src/carousel.js
index b63d406bd..bb894e9c3 100644
--- a/vendor/twbs/bootstrap/js/src/carousel.js
+++ b/vendor/twbs/bootstrap/js/src/carousel.js
@@ -1,12 +1,24 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): carousel.js
+ * Bootstrap (v5.0.1): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
-import $ from 'jquery'
-import Util from './util'
+import {
+ defineJQueryPlugin,
+ getElementFromSelector,
+ isRTL,
+ isVisible,
+ reflow,
+ triggerTransitionEnd,
+ typeCheckConfig
+} from './util/index'
+import Data from './dom/data'
+import EventHandler from './dom/event-handler'
+import Manipulator from './dom/manipulator'
+import SelectorEngine from './dom/selector-engine'
+import BaseComponent from './base-component'
/**
* ------------------------------------------------------------------------
@@ -15,13 +27,12 @@ import Util from './util'
*/
const NAME = 'carousel'
-const VERSION = '4.6.0'
const DATA_KEY = 'bs.carousel'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
-const JQUERY_NO_CONFLICT = $.fn[NAME]
-const ARROW_LEFT_KEYCODE = 37 // KeyboardEvent.which value for left arrow key
-const ARROW_RIGHT_KEYCODE = 39 // KeyboardEvent.which value for right arrow key
+
+const ARROW_LEFT_KEY = 'ArrowLeft'
+const ARROW_RIGHT_KEY = 'ArrowRight'
const TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch
const SWIPE_THRESHOLD = 40
@@ -43,8 +54,8 @@ const DefaultType = {
touch: 'boolean'
}
-const DIRECTION_NEXT = 'next'
-const DIRECTION_PREV = 'prev'
+const ORDER_NEXT = 'next'
+const ORDER_PREV = 'prev'
const DIRECTION_LEFT = 'left'
const DIRECTION_RIGHT = 'right'
@@ -65,8 +76,8 @@ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const CLASS_NAME_CAROUSEL = 'carousel'
const CLASS_NAME_ACTIVE = 'active'
const CLASS_NAME_SLIDE = 'slide'
-const CLASS_NAME_RIGHT = 'carousel-item-right'
-const CLASS_NAME_LEFT = 'carousel-item-left'
+const CLASS_NAME_END = 'carousel-item-end'
+const CLASS_NAME_START = 'carousel-item-start'
const CLASS_NAME_NEXT = 'carousel-item-next'
const CLASS_NAME_PREV = 'carousel-item-prev'
const CLASS_NAME_POINTER_EVENT = 'pointer-event'
@@ -77,21 +88,22 @@ const SELECTOR_ITEM = '.carousel-item'
const SELECTOR_ITEM_IMG = '.carousel-item img'
const SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'
const SELECTOR_INDICATORS = '.carousel-indicators'
-const SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]'
-const SELECTOR_DATA_RIDE = '[data-ride="carousel"]'
+const SELECTOR_INDICATOR = '[data-bs-target]'
+const SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'
+const SELECTOR_DATA_RIDE = '[data-bs-ride="carousel"]'
-const PointerType = {
- TOUCH: 'touch',
- PEN: 'pen'
-}
+const POINTER_TYPE_TOUCH = 'touch'
+const POINTER_TYPE_PEN = 'pen'
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
-class Carousel {
+class Carousel extends BaseComponent {
constructor(element, config) {
+ super(element)
+
this._items = null
this._interval = null
this._activeElement = null
@@ -102,45 +114,42 @@ class Carousel {
this.touchDeltaX = 0
this._config = this._getConfig(config)
- this._element = element
- this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS)
+ this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element)
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0
- this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent)
+ this._pointerEvent = Boolean(window.PointerEvent)
this._addEventListeners()
}
// Getters
- static get VERSION() {
- return VERSION
- }
-
static get Default() {
return Default
}
+ static get NAME() {
+ return NAME
+ }
+
// Public
next() {
if (!this._isSliding) {
- this._slide(DIRECTION_NEXT)
+ this._slide(ORDER_NEXT)
}
}
nextWhenVisible() {
- const $element = $(this._element)
// Don't call next when the page isn't visible
// or the carousel or its parent isn't visible
- if (!document.hidden &&
- ($element.is(':visible') && $element.css('visibility') !== 'hidden')) {
+ if (!document.hidden && isVisible(this._element)) {
this.next()
}
}
prev() {
if (!this._isSliding) {
- this._slide(DIRECTION_PREV)
+ this._slide(ORDER_PREV)
}
}
@@ -149,8 +158,8 @@ class Carousel {
this._isPaused = true
}
- if (this._element.querySelector(SELECTOR_NEXT_PREV)) {
- Util.triggerTransitionEnd(this._element)
+ if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {
+ triggerTransitionEnd(this._element)
this.cycle(true)
}
@@ -168,7 +177,7 @@ class Carousel {
this._interval = null
}
- if (this._config.interval && !this._isPaused) {
+ if (this._config && this._config.interval && !this._isPaused) {
this._updateInterval()
this._interval = setInterval(
@@ -179,8 +188,7 @@ class Carousel {
}
to(index) {
- this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM)
-
+ this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)
const activeIndex = this._getItemIndex(this._activeElement)
if (index > this._items.length - 1 || index < 0) {
@@ -188,7 +196,7 @@ class Carousel {
}
if (this._isSliding) {
- $(this._element).one(EVENT_SLID, () => this.to(index))
+ EventHandler.one(this._element, EVENT_SLID, () => this.to(index))
return
}
@@ -198,25 +206,11 @@ class Carousel {
return
}
- const direction = index > activeIndex ?
- DIRECTION_NEXT :
- DIRECTION_PREV
+ const order = index > activeIndex ?
+ ORDER_NEXT :
+ ORDER_PREV
- this._slide(direction, this._items[index])
- }
-
- dispose() {
- $(this._element).off(EVENT_KEY)
- $.removeData(this._element, DATA_KEY)
-
- this._items = null
- this._config = null
- this._element = null
- this._interval = null
- this._isPaused = null
- this._isSliding = null
- this._activeElement = null
- this._indicatorsElement = null
+ this._slide(order, this._items[index])
}
// Private
@@ -226,7 +220,7 @@ class Carousel {
...Default,
...config
}
- Util.typeCheckConfig(NAME, config, DefaultType)
+ typeCheckConfig(NAME, config, DefaultType)
return config
}
@@ -241,58 +235,47 @@ class Carousel {
this.touchDeltaX = 0
- // swipe left
- if (direction > 0) {
- this.prev()
+ if (!direction) {
+ return
}
- // swipe right
- if (direction < 0) {
- this.next()
- }
+ this._slide(direction > 0 ? DIRECTION_RIGHT : DIRECTION_LEFT)
}
_addEventListeners() {
if (this._config.keyboard) {
- $(this._element).on(EVENT_KEYDOWN, event => this._keydown(event))
+ EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event))
}
if (this._config.pause === 'hover') {
- $(this._element)
- .on(EVENT_MOUSEENTER, event => this.pause(event))
- .on(EVENT_MOUSELEAVE, event => this.cycle(event))
+ EventHandler.on(this._element, EVENT_MOUSEENTER, event => this.pause(event))
+ EventHandler.on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event))
}
- if (this._config.touch) {
+ if (this._config.touch && this._touchSupported) {
this._addTouchEventListeners()
}
}
_addTouchEventListeners() {
- if (!this._touchSupported) {
- return
- }
-
const start = event => {
- if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
- this.touchStartX = event.originalEvent.clientX
+ if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
+ this.touchStartX = event.clientX
} else if (!this._pointerEvent) {
- this.touchStartX = event.originalEvent.touches[0].clientX
+ this.touchStartX = event.touches[0].clientX
}
}
const move = event => {
// ensure swiping with one touch and not pinching
- if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
- this.touchDeltaX = 0
- } else {
- this.touchDeltaX = event.originalEvent.touches[0].clientX - this.touchStartX
- }
+ this.touchDeltaX = event.touches && event.touches.length > 1 ?
+ 0 :
+ event.touches[0].clientX - this.touchStartX
}
const end = event => {
- if (this._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
- this.touchDeltaX = event.originalEvent.clientX - this.touchStartX
+ if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
+ this.touchDeltaX = event.clientX - this.touchStartX
}
this._handleSwipe()
@@ -314,18 +297,19 @@ class Carousel {
}
}
- $(this._element.querySelectorAll(SELECTOR_ITEM_IMG))
- .on(EVENT_DRAG_START, e => e.preventDefault())
+ SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {
+ EventHandler.on(itemImg, EVENT_DRAG_START, e => e.preventDefault())
+ })
if (this._pointerEvent) {
- $(this._element).on(EVENT_POINTERDOWN, event => start(event))
- $(this._element).on(EVENT_POINTERUP, event => end(event))
+ EventHandler.on(this._element, EVENT_POINTERDOWN, event => start(event))
+ EventHandler.on(this._element, EVENT_POINTERUP, event => end(event))
this._element.classList.add(CLASS_NAME_POINTER_EVENT)
} else {
- $(this._element).on(EVENT_TOUCHSTART, event => start(event))
- $(this._element).on(EVENT_TOUCHMOVE, event => move(event))
- $(this._element).on(EVENT_TOUCHEND, event => end(event))
+ EventHandler.on(this._element, EVENT_TOUCHSTART, event => start(event))
+ EventHandler.on(this._element, EVENT_TOUCHMOVE, event => move(event))
+ EventHandler.on(this._element, EVENT_TOUCHEND, event => end(event))
}
}
@@ -334,83 +318,81 @@ class Carousel {
return
}
- switch (event.which) {
- case ARROW_LEFT_KEYCODE:
- event.preventDefault()
- this.prev()
- break
- case ARROW_RIGHT_KEYCODE:
- event.preventDefault()
- this.next()
- break
- default:
+ if (event.key === ARROW_LEFT_KEY) {
+ event.preventDefault()
+ this._slide(DIRECTION_RIGHT)
+ } else if (event.key === ARROW_RIGHT_KEY) {
+ event.preventDefault()
+ this._slide(DIRECTION_LEFT)
}
}
_getItemIndex(element) {
this._items = element && element.parentNode ?
- [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) :
+ SelectorEngine.find(SELECTOR_ITEM, element.parentNode) :
[]
+
return this._items.indexOf(element)
}
- _getItemByDirection(direction, activeElement) {
- const isNextDirection = direction === DIRECTION_NEXT
- const isPrevDirection = direction === DIRECTION_PREV
+ _getItemByOrder(order, activeElement) {
+ const isNext = order === ORDER_NEXT
+ const isPrev = order === ORDER_PREV
const activeIndex = this._getItemIndex(activeElement)
const lastItemIndex = this._items.length - 1
- const isGoingToWrap = isPrevDirection && activeIndex === 0 ||
- isNextDirection && activeIndex === lastItemIndex
+ const isGoingToWrap = (isPrev && activeIndex === 0) || (isNext && activeIndex === lastItemIndex)
if (isGoingToWrap && !this._config.wrap) {
return activeElement
}
- const delta = direction === DIRECTION_PREV ? -1 : 1
+ const delta = isPrev ? -1 : 1
const itemIndex = (activeIndex + delta) % this._items.length
return itemIndex === -1 ?
- this._items[this._items.length - 1] : this._items[itemIndex]
+ this._items[this._items.length - 1] :
+ this._items[itemIndex]
}
_triggerSlideEvent(relatedTarget, eventDirectionName) {
const targetIndex = this._getItemIndex(relatedTarget)
- const fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM))
- const slideEvent = $.Event(EVENT_SLIDE, {
+ const fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element))
+
+ return EventHandler.trigger(this._element, EVENT_SLIDE, {
relatedTarget,
direction: eventDirectionName,
from: fromIndex,
to: targetIndex
})
-
- $(this._element).trigger(slideEvent)
-
- return slideEvent
}
_setActiveIndicatorElement(element) {
if (this._indicatorsElement) {
- const indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE))
- $(indicators).removeClass(CLASS_NAME_ACTIVE)
+ const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement)
- const nextIndicator = this._indicatorsElement.children[
- this._getItemIndex(element)
- ]
+ activeIndicator.classList.remove(CLASS_NAME_ACTIVE)
+ activeIndicator.removeAttribute('aria-current')
- if (nextIndicator) {
- $(nextIndicator).addClass(CLASS_NAME_ACTIVE)
+ const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement)
+
+ for (let i = 0; i < indicators.length; i++) {
+ if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) {
+ indicators[i].classList.add(CLASS_NAME_ACTIVE)
+ indicators[i].setAttribute('aria-current', 'true')
+ break
+ }
}
}
}
_updateInterval() {
- const element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM)
+ const element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)
if (!element) {
return
}
- const elementInterval = parseInt(element.getAttribute('data-interval'), 10)
+ const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10)
if (elementInterval) {
this._config.defaultInterval = this._config.defaultInterval || this._config.interval
@@ -420,35 +402,27 @@ class Carousel {
}
}
- _slide(direction, element) {
- const activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM)
+ _slide(directionOrOrder, element) {
+ const order = this._directionToOrder(directionOrOrder)
+ const activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)
const activeElementIndex = this._getItemIndex(activeElement)
- const nextElement = element || activeElement &&
- this._getItemByDirection(direction, activeElement)
+ const nextElement = element || this._getItemByOrder(order, activeElement)
+
const nextElementIndex = this._getItemIndex(nextElement)
const isCycling = Boolean(this._interval)
- let directionalClassName
- let orderClassName
- let eventDirectionName
-
- if (direction === DIRECTION_NEXT) {
- directionalClassName = CLASS_NAME_LEFT
- orderClassName = CLASS_NAME_NEXT
- eventDirectionName = DIRECTION_LEFT
- } else {
- directionalClassName = CLASS_NAME_RIGHT
- orderClassName = CLASS_NAME_PREV
- eventDirectionName = DIRECTION_RIGHT
- }
+ const isNext = order === ORDER_NEXT
+ const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END
+ const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV
+ const eventDirectionName = this._orderToDirection(order)
- if (nextElement && $(nextElement).hasClass(CLASS_NAME_ACTIVE)) {
+ if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) {
this._isSliding = false
return
}
const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName)
- if (slideEvent.isDefaultPrevented()) {
+ if (slideEvent.defaultPrevented) {
return
}
@@ -466,42 +440,41 @@ class Carousel {
this._setActiveIndicatorElement(nextElement)
this._activeElement = nextElement
- const slidEvent = $.Event(EVENT_SLID, {
- relatedTarget: nextElement,
- direction: eventDirectionName,
- from: activeElementIndex,
- to: nextElementIndex
- })
+ const triggerSlidEvent = () => {
+ EventHandler.trigger(this._element, EVENT_SLID, {
+ relatedTarget: nextElement,
+ direction: eventDirectionName,
+ from: activeElementIndex,
+ to: nextElementIndex
+ })
+ }
- if ($(this._element).hasClass(CLASS_NAME_SLIDE)) {
- $(nextElement).addClass(orderClassName)
+ if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
+ nextElement.classList.add(orderClassName)
- Util.reflow(nextElement)
+ reflow(nextElement)
- $(activeElement).addClass(directionalClassName)
- $(nextElement).addClass(directionalClassName)
+ activeElement.classList.add(directionalClassName)
+ nextElement.classList.add(directionalClassName)
- const transitionDuration = Util.getTransitionDurationFromElement(activeElement)
+ const completeCallBack = () => {
+ nextElement.classList.remove(directionalClassName, orderClassName)
+ nextElement.classList.add(CLASS_NAME_ACTIVE)
- $(activeElement)
- .one(Util.TRANSITION_END, () => {
- $(nextElement)
- .removeClass(`${directionalClassName} ${orderClassName}`)
- .addClass(CLASS_NAME_ACTIVE)
+ activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName)
- $(activeElement).removeClass(`${CLASS_NAME_ACTIVE} ${orderClassName} ${directionalClassName}`)
+ this._isSliding = false
- this._isSliding = false
+ setTimeout(triggerSlidEvent, 0)
+ }
- setTimeout(() => $(this._element).trigger(slidEvent), 0)
- })
- .emulateTransitionEnd(transitionDuration)
+ this._queueCallback(completeCallBack, activeElement, true)
} else {
- $(activeElement).removeClass(CLASS_NAME_ACTIVE)
- $(nextElement).addClass(CLASS_NAME_ACTIVE)
+ activeElement.classList.remove(CLASS_NAME_ACTIVE)
+ nextElement.classList.add(CLASS_NAME_ACTIVE)
this._isSliding = false
- $(this._element).trigger(slidEvent)
+ triggerSlidEvent()
}
if (isCycling) {
@@ -509,72 +482,93 @@ class Carousel {
}
}
+ _directionToOrder(direction) {
+ if (![DIRECTION_RIGHT, DIRECTION_LEFT].includes(direction)) {
+ return direction
+ }
+
+ if (isRTL()) {
+ return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT
+ }
+
+ return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV
+ }
+
+ _orderToDirection(order) {
+ if (![ORDER_NEXT, ORDER_PREV].includes(order)) {
+ return order
+ }
+
+ if (isRTL()) {
+ return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT
+ }
+
+ return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT
+ }
+
// Static
- static _jQueryInterface(config) {
- return this.each(function () {
- let data = $(this).data(DATA_KEY)
- let _config = {
- ...Default,
- ...$(this).data()
- }
+ static carouselInterface(element, config) {
+ let data = Data.get(element, DATA_KEY)
+ let _config = {
+ ...Default,
+ ...Manipulator.getDataAttributes(element)
+ }
- if (typeof config === 'object') {
- _config = {
- ..._config,
- ...config
- }
+ if (typeof config === 'object') {
+ _config = {
+ ..._config,
+ ...config
}
+ }
+
+ const action = typeof config === 'string' ? config : _config.slide
- const action = typeof config === 'string' ? config : _config.slide
+ if (!data) {
+ data = new Carousel(element, _config)
+ }
- if (!data) {
- data = new Carousel(this, _config)
- $(this).data(DATA_KEY, data)
+ if (typeof config === 'number') {
+ data.to(config)
+ } else if (typeof action === 'string') {
+ if (typeof data[action] === 'undefined') {
+ throw new TypeError(`No method named "${action}"`)
}
- if (typeof config === 'number') {
- data.to(config)
- } else if (typeof action === 'string') {
- if (typeof data[action] === 'undefined') {
- throw new TypeError(`No method named "${action}"`)
- }
+ data[action]()
+ } else if (_config.interval && _config.ride) {
+ data.pause()
+ data.cycle()
+ }
+ }
- data[action]()
- } else if (_config.interval && _config.ride) {
- data.pause()
- data.cycle()
- }
+ static jQueryInterface(config) {
+ return this.each(function () {
+ Carousel.carouselInterface(this, config)
})
}
- static _dataApiClickHandler(event) {
- const selector = Util.getSelectorFromElement(this)
-
- if (!selector) {
- return
- }
-
- const target = $(selector)[0]
+ static dataApiClickHandler(event) {
+ const target = getElementFromSelector(this)
- if (!target || !$(target).hasClass(CLASS_NAME_CAROUSEL)) {
+ if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
return
}
const config = {
- ...$(target).data(),
- ...$(this).data()
+ ...Manipulator.getDataAttributes(target),
+ ...Manipulator.getDataAttributes(this)
}
- const slideIndex = this.getAttribute('data-slide-to')
+ const slideIndex = this.getAttribute('data-bs-slide-to')
if (slideIndex) {
config.interval = false
}
- Carousel._jQueryInterface.call($(target), config)
+ Carousel.carouselInterface(target, config)
if (slideIndex) {
- $(target).data(DATA_KEY).to(slideIndex)
+ Data.get(target, DATA_KEY).to(slideIndex)
}
event.preventDefault()
@@ -587,13 +581,13 @@ class Carousel {
* ------------------------------------------------------------------------
*/
-$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler)
+EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler)
+
+EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
+ const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE)
-$(window).on(EVENT_LOAD_DATA_API, () => {
- const carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE))
for (let i = 0, len = carousels.length; i < len; i++) {
- const $carousel = $(carousels[i])
- Carousel._jQueryInterface.call($carousel, $carousel.data())
+ Carousel.carouselInterface(carousels[i], Data.get(carousels[i], DATA_KEY))
}
})
@@ -601,13 +595,9 @@ $(window).on(EVENT_LOAD_DATA_API, () => {
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Carousel to jQuery only if jQuery is present
*/
-$.fn[NAME] = Carousel._jQueryInterface
-$.fn[NAME].Constructor = Carousel
-$.fn[NAME].noConflict = () => {
- $.fn[NAME] = JQUERY_NO_CONFLICT
- return Carousel._jQueryInterface
-}
+defineJQueryPlugin(Carousel)
export default Carousel
diff --git a/vendor/twbs/bootstrap/js/src/collapse.js b/vendor/twbs/bootstrap/js/src/collapse.js
index af3163be9..fd85fbde2 100644
--- a/vendor/twbs/bootstrap/js/src/collapse.js
+++ b/vendor/twbs/bootstrap/js/src/collapse.js
@@ -1,12 +1,23 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): collapse.js
+ * Bootstrap (v5.0.1): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
-import $ from 'jquery'
-import Util from './util'
+import {
+ defineJQueryPlugin,
+ getElement,
+ getSelectorFromElement,
+ getElementFromSelector,
+ reflow,
+ typeCheckConfig
+} from './util/index'
+import Data from './dom/data'
+import EventHandler from './dom/event-handler'
+import Manipulator from './dom/manipulator'
+import SelectorEngine from './dom/selector-engine'
+import BaseComponent from './base-component'
/**
* ------------------------------------------------------------------------
@@ -15,11 +26,9 @@ import Util from './util'
*/
const NAME = 'collapse'
-const VERSION = '4.6.0'
const DATA_KEY = 'bs.collapse'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
-const JQUERY_NO_CONFLICT = $.fn[NAME]
const Default = {
toggle: true,
@@ -42,11 +51,11 @@ const CLASS_NAME_COLLAPSE = 'collapse'
const CLASS_NAME_COLLAPSING = 'collapsing'
const CLASS_NAME_COLLAPSED = 'collapsed'
-const DIMENSION_WIDTH = 'width'
-const DIMENSION_HEIGHT = 'height'
+const WIDTH = 'width'
+const HEIGHT = 'height'
const SELECTOR_ACTIVES = '.show, .collapsing'
-const SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]'
+const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="collapse"]'
/**
* ------------------------------------------------------------------------
@@ -54,24 +63,26 @@ const SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]'
* ------------------------------------------------------------------------
*/
-class Collapse {
+class Collapse extends BaseComponent {
constructor(element, config) {
+ super(element)
+
this._isTransitioning = false
- this._element = element
this._config = this._getConfig(config)
- this._triggerArray = [].slice.call(document.querySelectorAll(
- `[data-toggle="collapse"][href="#${element.id}"],` +
- `[data-toggle="collapse"][data-target="#${element.id}"]`
- ))
+ this._triggerArray = SelectorEngine.find(
+ `${SELECTOR_DATA_TOGGLE}[href="#${this._element.id}"],` +
+ `${SELECTOR_DATA_TOGGLE}[data-bs-target="#${this._element.id}"]`
+ )
+
+ const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE)
- const toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE))
for (let i = 0, len = toggleList.length; i < len; i++) {
const elem = toggleList[i]
- const selector = Util.getSelectorFromElement(elem)
- const filterElement = [].slice.call(document.querySelectorAll(selector))
- .filter(foundElem => foundElem === element)
+ const selector = getSelectorFromElement(elem)
+ const filterElement = SelectorEngine.find(selector)
+ .filter(foundElem => foundElem === this._element)
- if (selector !== null && filterElement.length > 0) {
+ if (selector !== null && filterElement.length) {
this._selector = selector
this._triggerArray.push(elem)
}
@@ -90,18 +101,18 @@ class Collapse {
// Getters
- static get VERSION() {
- return VERSION
- }
-
static get Default() {
return Default
}
+ static get NAME() {
+ return NAME
+ }
+
// Public
toggle() {
- if ($(this._element).hasClass(CLASS_NAME_SHOW)) {
+ if (this._element.classList.contains(CLASS_NAME_SHOW)) {
this.hide()
} else {
this.show()
@@ -109,8 +120,7 @@ class Collapse {
}
show() {
- if (this._isTransitioning ||
- $(this._element).hasClass(CLASS_NAME_SHOW)) {
+ if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
return
}
@@ -118,10 +128,10 @@ class Collapse {
let activesData
if (this._parent) {
- actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES))
+ actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent)
.filter(elem => {
if (typeof this._config.parent === 'string') {
- return elem.getAttribute('data-parent') === this._config.parent
+ return elem.getAttribute('data-bs-parent') === this._config.parent
}
return elem.classList.contains(CLASS_NAME_COLLAPSE)
@@ -132,74 +142,74 @@ class Collapse {
}
}
+ const container = SelectorEngine.findOne(this._selector)
if (actives) {
- activesData = $(actives).not(this._selector).data(DATA_KEY)
+ const tempActiveData = actives.find(elem => container !== elem)
+ activesData = tempActiveData ? Data.get(tempActiveData, DATA_KEY) : null
+
if (activesData && activesData._isTransitioning) {
return
}
}
- const startEvent = $.Event(EVENT_SHOW)
- $(this._element).trigger(startEvent)
- if (startEvent.isDefaultPrevented()) {
+ const startEvent = EventHandler.trigger(this._element, EVENT_SHOW)
+ if (startEvent.defaultPrevented) {
return
}
if (actives) {
- Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide')
- if (!activesData) {
- $(actives).data(DATA_KEY, null)
- }
+ actives.forEach(elemActive => {
+ if (container !== elemActive) {
+ Collapse.collapseInterface(elemActive, 'hide')
+ }
+
+ if (!activesData) {
+ Data.set(elemActive, DATA_KEY, null)
+ }
+ })
}
const dimension = this._getDimension()
- $(this._element)
- .removeClass(CLASS_NAME_COLLAPSE)
- .addClass(CLASS_NAME_COLLAPSING)
+ this._element.classList.remove(CLASS_NAME_COLLAPSE)
+ this._element.classList.add(CLASS_NAME_COLLAPSING)
this._element.style[dimension] = 0
if (this._triggerArray.length) {
- $(this._triggerArray)
- .removeClass(CLASS_NAME_COLLAPSED)
- .attr('aria-expanded', true)
+ this._triggerArray.forEach(element => {
+ element.classList.remove(CLASS_NAME_COLLAPSED)
+ element.setAttribute('aria-expanded', true)
+ })
}
this.setTransitioning(true)
const complete = () => {
- $(this._element)
- .removeClass(CLASS_NAME_COLLAPSING)
- .addClass(`${CLASS_NAME_COLLAPSE} ${CLASS_NAME_SHOW}`)
+ this._element.classList.remove(CLASS_NAME_COLLAPSING)
+ this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)
this._element.style[dimension] = ''
this.setTransitioning(false)
- $(this._element).trigger(EVENT_SHOWN)
+ EventHandler.trigger(this._element, EVENT_SHOWN)
}
const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)
const scrollSize = `scroll${capitalizedDimension}`
- const transitionDuration = Util.getTransitionDurationFromElement(this._element)
-
- $(this._element)
- .one(Util.TRANSITION_END, complete)
- .emulateTransitionEnd(transitionDuration)
+ this._queueCallback(complete, this._element, true)
this._element.style[dimension] = `${this._element[scrollSize]}px`
}
hide() {
- if (this._isTransitioning ||
- !$(this._element).hasClass(CLASS_NAME_SHOW)) {
+ if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
return
}
- const startEvent = $.Event(EVENT_HIDE)
- $(this._element).trigger(startEvent)
- if (startEvent.isDefaultPrevented()) {
+ const startEvent = EventHandler.trigger(this._element, EVENT_HIDE)
+ if (startEvent.defaultPrevented) {
return
}
@@ -207,24 +217,20 @@ class Collapse {
this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`
- Util.reflow(this._element)
+ reflow(this._element)
- $(this._element)
- .addClass(CLASS_NAME_COLLAPSING)
- .removeClass(`${CLASS_NAME_COLLAPSE} ${CLASS_NAME_SHOW}`)
+ this._element.classList.add(CLASS_NAME_COLLAPSING)
+ this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)
const triggerArrayLength = this._triggerArray.length
if (triggerArrayLength > 0) {
for (let i = 0; i < triggerArrayLength; i++) {
const trigger = this._triggerArray[i]
- const selector = Util.getSelectorFromElement(trigger)
+ const elem = getElementFromSelector(trigger)
- if (selector !== null) {
- const $elem = $([].slice.call(document.querySelectorAll(selector)))
- if (!$elem.hasClass(CLASS_NAME_SHOW)) {
- $(trigger).addClass(CLASS_NAME_COLLAPSED)
- .attr('aria-expanded', false)
- }
+ if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {
+ trigger.classList.add(CLASS_NAME_COLLAPSED)
+ trigger.setAttribute('aria-expanded', false)
}
}
}
@@ -233,34 +239,20 @@ class Collapse {
const complete = () => {
this.setTransitioning(false)
- $(this._element)
- .removeClass(CLASS_NAME_COLLAPSING)
- .addClass(CLASS_NAME_COLLAPSE)
- .trigger(EVENT_HIDDEN)
+ this._element.classList.remove(CLASS_NAME_COLLAPSING)
+ this._element.classList.add(CLASS_NAME_COLLAPSE)
+ EventHandler.trigger(this._element, EVENT_HIDDEN)
}
this._element.style[dimension] = ''
- const transitionDuration = Util.getTransitionDurationFromElement(this._element)
- $(this._element)
- .one(Util.TRANSITION_END, complete)
- .emulateTransitionEnd(transitionDuration)
+ this._queueCallback(complete, this._element, true)
}
setTransitioning(isTransitioning) {
this._isTransitioning = isTransitioning
}
- dispose() {
- $.removeData(this._element, DATA_KEY)
-
- this._config = null
- this._parent = null
- this._element = null
- this._triggerArray = null
- this._isTransitioning = null
- }
-
// Private
_getConfig(config) {
@@ -269,85 +261,82 @@ class Collapse {
...config
}
config.toggle = Boolean(config.toggle) // Coerce string values
- Util.typeCheckConfig(NAME, config, DefaultType)
+ typeCheckConfig(NAME, config, DefaultType)
return config
}
_getDimension() {
- const hasWidth = $(this._element).hasClass(DIMENSION_WIDTH)
- return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT
+ return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT
}
_getParent() {
- let parent
+ let { parent } = this._config
- if (Util.isElement(this._config.parent)) {
- parent = this._config.parent
+ parent = getElement(parent)
- // It's a jQuery object
- if (typeof this._config.parent.jquery !== 'undefined') {
- parent = this._config.parent[0]
- }
- } else {
- parent = document.querySelector(this._config.parent)
- }
+ const selector = `${SELECTOR_DATA_TOGGLE}[data-bs-parent="${parent}"]`
- const selector = `[data-toggle="collapse"][data-parent="${this._config.parent}"]`
- const children = [].slice.call(parent.querySelectorAll(selector))
+ SelectorEngine.find(selector, parent)
+ .forEach(element => {
+ const selected = getElementFromSelector(element)
- $(children).each((i, element) => {
- this._addAriaAndCollapsedClass(
- Collapse._getTargetFromElement(element),
- [element]
- )
- })
+ this._addAriaAndCollapsedClass(
+ selected,
+ [element]
+ )
+ })
return parent
}
_addAriaAndCollapsedClass(element, triggerArray) {
- const isOpen = $(element).hasClass(CLASS_NAME_SHOW)
-
- if (triggerArray.length) {
- $(triggerArray)
- .toggleClass(CLASS_NAME_COLLAPSED, !isOpen)
- .attr('aria-expanded', isOpen)
+ if (!element || !triggerArray.length) {
+ return
}
+
+ const isOpen = element.classList.contains(CLASS_NAME_SHOW)
+
+ triggerArray.forEach(elem => {
+ if (isOpen) {
+ elem.classList.remove(CLASS_NAME_COLLAPSED)
+ } else {
+ elem.classList.add(CLASS_NAME_COLLAPSED)
+ }
+
+ elem.setAttribute('aria-expanded', isOpen)
+ })
}
// Static
- static _getTargetFromElement(element) {
- const selector = Util.getSelectorFromElement(element)
- return selector ? document.querySelector(selector) : null
- }
+ static collapseInterface(element, config) {
+ let data = Data.get(element, DATA_KEY)
+ const _config = {
+ ...Default,
+ ...Manipulator.getDataAttributes(element),
+ ...(typeof config === 'object' && config ? config : {})
+ }
- static _jQueryInterface(config) {
- return this.each(function () {
- const $element = $(this)
- let data = $element.data(DATA_KEY)
- const _config = {
- ...Default,
- ...$element.data(),
- ...(typeof config === 'object' && config ? config : {})
- }
+ if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
+ _config.toggle = false
+ }
- if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
- _config.toggle = false
- }
+ if (!data) {
+ data = new Collapse(element, _config)
+ }
- if (!data) {
- data = new Collapse(this, _config)
- $element.data(DATA_KEY, data)
+ if (typeof config === 'string') {
+ if (typeof data[config] === 'undefined') {
+ throw new TypeError(`No method named "${config}"`)
}
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new TypeError(`No method named "${config}"`)
- }
+ data[config]()
+ }
+ }
- data[config]()
- }
+ static jQueryInterface(config) {
+ return this.each(function () {
+ Collapse.collapseInterface(this, config)
})
}
}
@@ -358,21 +347,32 @@ class Collapse {
* ------------------------------------------------------------------------
*/
-$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
+EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
- if (event.currentTarget.tagName === 'A') {
+ if (event.target.tagName === 'A' || (event.delegateTarget && event.delegateTarget.tagName === 'A')) {
event.preventDefault()
}
- const $trigger = $(this)
- const selector = Util.getSelectorFromElement(this)
- const selectors = [].slice.call(document.querySelectorAll(selector))
+ const triggerData = Manipulator.getDataAttributes(this)
+ const selector = getSelectorFromElement(this)
+ const selectorElements = SelectorEngine.find(selector)
+
+ selectorElements.forEach(element => {
+ const data = Data.get(element, DATA_KEY)
+ let config
+ if (data) {
+ // update parent attribute
+ if (data._parent === null && typeof triggerData.parent === 'string') {
+ data._config.parent = triggerData.parent
+ data._parent = data._getParent()
+ }
- $(selectors).each(function () {
- const $target = $(this)
- const data = $target.data(DATA_KEY)
- const config = data ? 'toggle' : $trigger.data()
- Collapse._jQueryInterface.call($target, config)
+ config = 'toggle'
+ } else {
+ config = triggerData
+ }
+
+ Collapse.collapseInterface(element, config)
})
})
@@ -380,13 +380,9 @@ $(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Collapse to jQuery only if jQuery is present
*/
-$.fn[NAME] = Collapse._jQueryInterface
-$.fn[NAME].Constructor = Collapse
-$.fn[NAME].noConflict = () => {
- $.fn[NAME] = JQUERY_NO_CONFLICT
- return Collapse._jQueryInterface
-}
+defineJQueryPlugin(Collapse)
export default Collapse
diff --git a/vendor/twbs/bootstrap/js/src/dropdown.js b/vendor/twbs/bootstrap/js/src/dropdown.js
index 76dda8f57..565edb892 100644
--- a/vendor/twbs/bootstrap/js/src/dropdown.js
+++ b/vendor/twbs/bootstrap/js/src/dropdown.js
@@ -1,13 +1,28 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): dropdown.js
+ * Bootstrap (v5.0.1): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
-import $ from 'jquery'
-import Popper from 'popper.js'
-import Util from './util'
+import * as Popper from '@popperjs/core'
+
+import {
+ defineJQueryPlugin,
+ getElement,
+ getElementFromSelector,
+ isDisabled,
+ isElement,
+ isVisible,
+ isRTL,
+ noop,
+ typeCheckConfig
+} from './util/index'
+import Data from './dom/data'
+import EventHandler from './dom/event-handler'
+import Manipulator from './dom/manipulator'
+import SelectorEngine from './dom/selector-engine'
+import BaseComponent from './base-component'
/**
* ------------------------------------------------------------------------
@@ -16,18 +31,18 @@ import Util from './util'
*/
const NAME = 'dropdown'
-const VERSION = '4.6.0'
const DATA_KEY = 'bs.dropdown'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
-const JQUERY_NO_CONFLICT = $.fn[NAME]
-const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key
-const SPACE_KEYCODE = 32 // KeyboardEvent.which value for space key
-const TAB_KEYCODE = 9 // KeyboardEvent.which value for tab key
-const ARROW_UP_KEYCODE = 38 // KeyboardEvent.which value for up arrow key
-const ARROW_DOWN_KEYCODE = 40 // KeyboardEvent.which value for down arrow key
-const RIGHT_MOUSE_BUTTON_WHICH = 3 // MouseEvent.which value for the right button (assuming a right-handed mouse)
-const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEYCODE}|${ARROW_DOWN_KEYCODE}|${ESCAPE_KEYCODE}`)
+
+const ESCAPE_KEY = 'Escape'
+const SPACE_KEY = 'Space'
+const TAB_KEY = 'Tab'
+const ARROW_UP_KEY = 'ArrowUp'
+const ARROW_DOWN_KEY = 'ArrowDown'
+const RIGHT_MOUSE_BUTTON = 2 // MouseEvent.button value for the secondary button, usually the right button
+
+const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY}`)
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
@@ -38,43 +53,40 @@ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`
const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`
-const CLASS_NAME_DISABLED = 'disabled'
const CLASS_NAME_SHOW = 'show'
const CLASS_NAME_DROPUP = 'dropup'
-const CLASS_NAME_DROPRIGHT = 'dropright'
-const CLASS_NAME_DROPLEFT = 'dropleft'
-const CLASS_NAME_MENURIGHT = 'dropdown-menu-right'
-const CLASS_NAME_POSITION_STATIC = 'position-static'
+const CLASS_NAME_DROPEND = 'dropend'
+const CLASS_NAME_DROPSTART = 'dropstart'
+const CLASS_NAME_NAVBAR = 'navbar'
-const SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]'
-const SELECTOR_FORM_CHILD = '.dropdown form'
+const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="dropdown"]'
const SELECTOR_MENU = '.dropdown-menu'
const SELECTOR_NAVBAR_NAV = '.navbar-nav'
const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'
-const PLACEMENT_TOP = 'top-start'
-const PLACEMENT_TOPEND = 'top-end'
-const PLACEMENT_BOTTOM = 'bottom-start'
-const PLACEMENT_BOTTOMEND = 'bottom-end'
-const PLACEMENT_RIGHT = 'right-start'
-const PLACEMENT_LEFT = 'left-start'
+const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start'
+const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end'
+const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start'
+const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end'
+const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start'
+const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start'
const Default = {
- offset: 0,
- flip: true,
- boundary: 'scrollParent',
+ offset: [0, 2],
+ boundary: 'clippingParents',
reference: 'toggle',
display: 'dynamic',
- popperConfig: null
+ popperConfig: null,
+ autoClose: true
}
const DefaultType = {
- offset: '(number|string|function)',
- flip: 'boolean',
+ offset: '(array|string|function)',
boundary: '(string|element)',
- reference: '(string|element)',
+ reference: '(string|element|object)',
display: 'string',
- popperConfig: '(null|object)'
+ popperConfig: '(null|object|function)',
+ autoClose: '(boolean|string)'
}
/**
@@ -83,9 +95,10 @@ const DefaultType = {
* ------------------------------------------------------------------------
*/
-class Dropdown {
+class Dropdown extends BaseComponent {
constructor(element, config) {
- this._element = element
+ super(element)
+
this._popper = null
this._config = this._getConfig(config)
this._menu = this._getMenuElement()
@@ -96,10 +109,6 @@ class Dropdown {
// Getters
- static get VERSION() {
- return VERSION
- }
-
static get Default() {
return Default
}
@@ -108,47 +117,47 @@ class Dropdown {
return DefaultType
}
+ static get NAME() {
+ return NAME
+ }
+
// Public
toggle() {
- if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED)) {
+ if (isDisabled(this._element)) {
return
}
- const isActive = $(this._menu).hasClass(CLASS_NAME_SHOW)
-
- Dropdown._clearMenus()
+ const isActive = this._element.classList.contains(CLASS_NAME_SHOW)
if (isActive) {
+ this.hide()
return
}
- this.show(true)
+ this.show()
}
- show(usePopper = false) {
- if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || $(this._menu).hasClass(CLASS_NAME_SHOW)) {
+ show() {
+ if (isDisabled(this._element) || this._menu.classList.contains(CLASS_NAME_SHOW)) {
return
}
+ const parent = Dropdown.getParentFromElement(this._element)
const relatedTarget = {
relatedTarget: this._element
}
- const showEvent = $.Event(EVENT_SHOW, relatedTarget)
- const parent = Dropdown._getParentFromElement(this._element)
- $(parent).trigger(showEvent)
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget)
- if (showEvent.isDefaultPrevented()) {
+ if (showEvent.defaultPrevented) {
return
}
// Totally disable Popper for Dropdowns in Navbar
- if (!this._inNavbar && usePopper) {
- /**
- * Check for Popper dependency
- * Popper - https://popper.js.org
- */
+ if (this._inNavbar) {
+ Manipulator.setDataAttribute(this._menu, 'popper', 'none')
+ } else {
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)')
}
@@ -157,23 +166,20 @@ class Dropdown {
if (this._config.reference === 'parent') {
referenceElement = parent
- } else if (Util.isElement(this._config.reference)) {
+ } else if (isElement(this._config.reference)) {
+ referenceElement = getElement(this._config.reference)
+ } else if (typeof this._config.reference === 'object') {
referenceElement = this._config.reference
-
- // Check if it's jQuery element
- if (typeof this._config.reference.jquery !== 'undefined') {
- referenceElement = this._config.reference[0]
- }
}
- // If boundary is not `scrollParent`, then set position to `static`
- // to allow the menu to "escape" the scroll parent's boundaries
- // https://github.com/twbs/bootstrap/issues/24251
- if (this._config.boundary !== 'scrollParent') {
- $(parent).addClass(CLASS_NAME_POSITION_STATIC)
- }
+ const popperConfig = this._getPopperConfig()
+ const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false)
- this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig())
+ this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig)
+
+ if (isDisplayStatic) {
+ Manipulator.setDataAttribute(this._menu, 'popper', 'static')
+ }
}
// If this is a touch-enabled device we add extra
@@ -181,266 +187,273 @@ class Dropdown {
// only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement &&
- $(parent).closest(SELECTOR_NAVBAR_NAV).length === 0) {
- $(document.body).children().on('mouseover', null, $.noop)
+ !parent.closest(SELECTOR_NAVBAR_NAV)) {
+ [].concat(...document.body.children)
+ .forEach(elem => EventHandler.on(elem, 'mouseover', noop))
}
this._element.focus()
this._element.setAttribute('aria-expanded', true)
- $(this._menu).toggleClass(CLASS_NAME_SHOW)
- $(parent)
- .toggleClass(CLASS_NAME_SHOW)
- .trigger($.Event(EVENT_SHOWN, relatedTarget))
+ this._menu.classList.toggle(CLASS_NAME_SHOW)
+ this._element.classList.toggle(CLASS_NAME_SHOW)
+ EventHandler.trigger(this._element, EVENT_SHOWN, relatedTarget)
}
hide() {
- if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || !$(this._menu).hasClass(CLASS_NAME_SHOW)) {
+ if (isDisabled(this._element) || !this._menu.classList.contains(CLASS_NAME_SHOW)) {
return
}
const relatedTarget = {
relatedTarget: this._element
}
- const hideEvent = $.Event(EVENT_HIDE, relatedTarget)
- const parent = Dropdown._getParentFromElement(this._element)
-
- $(parent).trigger(hideEvent)
- if (hideEvent.isDefaultPrevented()) {
- return
- }
-
- if (this._popper) {
- this._popper.destroy()
- }
-
- $(this._menu).toggleClass(CLASS_NAME_SHOW)
- $(parent)
- .toggleClass(CLASS_NAME_SHOW)
- .trigger($.Event(EVENT_HIDDEN, relatedTarget))
+ this._completeHide(relatedTarget)
}
dispose() {
- $.removeData(this._element, DATA_KEY)
- $(this._element).off(EVENT_KEY)
- this._element = null
- this._menu = null
- if (this._popper !== null) {
+ if (this._popper) {
this._popper.destroy()
- this._popper = null
}
+
+ super.dispose()
}
update() {
this._inNavbar = this._detectNavbar()
- if (this._popper !== null) {
- this._popper.scheduleUpdate()
+ if (this._popper) {
+ this._popper.update()
}
}
// Private
_addEventListeners() {
- $(this._element).on(EVENT_CLICK, event => {
+ EventHandler.on(this._element, EVENT_CLICK, event => {
event.preventDefault()
- event.stopPropagation()
this.toggle()
})
}
+ _completeHide(relatedTarget) {
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE, relatedTarget)
+ if (hideEvent.defaultPrevented) {
+ return
+ }
+
+ // If this is a touch-enabled device we remove the extra
+ // empty mouseover listeners we added for iOS support
+ if ('ontouchstart' in document.documentElement) {
+ [].concat(...document.body.children)
+ .forEach(elem => EventHandler.off(elem, 'mouseover', noop))
+ }
+
+ if (this._popper) {
+ this._popper.destroy()
+ }
+
+ this._menu.classList.remove(CLASS_NAME_SHOW)
+ this._element.classList.remove(CLASS_NAME_SHOW)
+ this._element.setAttribute('aria-expanded', 'false')
+ Manipulator.removeDataAttribute(this._menu, 'popper')
+ EventHandler.trigger(this._element, EVENT_HIDDEN, relatedTarget)
+ }
+
_getConfig(config) {
config = {
...this.constructor.Default,
- ...$(this._element).data(),
+ ...Manipulator.getDataAttributes(this._element),
...config
}
- Util.typeCheckConfig(
- NAME,
- config,
- this.constructor.DefaultType
- )
+ typeCheckConfig(NAME, config, this.constructor.DefaultType)
+
+ if (typeof config.reference === 'object' && !isElement(config.reference) &&
+ typeof config.reference.getBoundingClientRect !== 'function'
+ ) {
+ // Popper virtual elements require a getBoundingClientRect method
+ throw new TypeError(`${NAME.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`)
+ }
return config
}
_getMenuElement() {
- if (!this._menu) {
- const parent = Dropdown._getParentFromElement(this._element)
+ return SelectorEngine.next(this._element, SELECTOR_MENU)[0]
+ }
- if (parent) {
- this._menu = parent.querySelector(SELECTOR_MENU)
- }
+ _getPlacement() {
+ const parentDropdown = this._element.parentNode
+
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
+ return PLACEMENT_RIGHT
}
- return this._menu
- }
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
+ return PLACEMENT_LEFT
+ }
- _getPlacement() {
- const $parentDropdown = $(this._element.parentNode)
- let placement = PLACEMENT_BOTTOM
-
- // Handle dropup
- if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) {
- placement = $(this._menu).hasClass(CLASS_NAME_MENURIGHT) ?
- PLACEMENT_TOPEND :
- PLACEMENT_TOP
- } else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) {
- placement = PLACEMENT_RIGHT
- } else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
- placement = PLACEMENT_LEFT
- } else if ($(this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
- placement = PLACEMENT_BOTTOMEND
- }
-
- return placement
+ // We need to trim the value because custom properties can also include spaces
+ const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end'
+
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
+ return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP
+ }
+
+ return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM
}
_detectNavbar() {
- return $(this._element).closest('.navbar').length > 0
+ return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null
}
_getOffset() {
- const offset = {}
+ const { offset } = this._config
- if (typeof this._config.offset === 'function') {
- offset.fn = data => {
- data.offsets = {
- ...data.offsets,
- ...(this._config.offset(data.offsets, this._element) || {})
- }
+ if (typeof offset === 'string') {
+ return offset.split(',').map(val => Number.parseInt(val, 10))
+ }
- return data
- }
- } else {
- offset.offset = this._config.offset
+ if (typeof offset === 'function') {
+ return popperData => offset(popperData, this._element)
}
return offset
}
_getPopperConfig() {
- const popperConfig = {
+ const defaultBsPopperConfig = {
placement: this._getPlacement(),
- modifiers: {
- offset: this._getOffset(),
- flip: {
- enabled: this._config.flip
- },
- preventOverflow: {
- boundariesElement: this._config.boundary
+ modifiers: [{
+ name: 'preventOverflow',
+ options: {
+ boundary: this._config.boundary
}
- }
+ },
+ {
+ name: 'offset',
+ options: {
+ offset: this._getOffset()
+ }
+ }]
}
// Disable Popper if we have a static display
if (this._config.display === 'static') {
- popperConfig.modifiers.applyStyle = {
+ defaultBsPopperConfig.modifiers = [{
+ name: 'applyStyles',
enabled: false
- }
+ }]
}
return {
- ...popperConfig,
- ...this._config.popperConfig
+ ...defaultBsPopperConfig,
+ ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
}
}
+ _selectMenuItem(event) {
+ const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible)
+
+ if (!items.length) {
+ return
+ }
+
+ let index = items.indexOf(event.target)
+
+ // Up
+ if (event.key === ARROW_UP_KEY && index > 0) {
+ index--
+ }
+
+ // Down
+ if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
+ index++
+ }
+
+ // index is -1 if the first keydown is an ArrowUp
+ index = index === -1 ? 0 : index
+
+ items[index].focus()
+ }
+
// Static
- static _jQueryInterface(config) {
- return this.each(function () {
- let data = $(this).data(DATA_KEY)
- const _config = typeof config === 'object' ? config : null
+ static dropdownInterface(element, config) {
+ let data = Data.get(element, DATA_KEY)
+ const _config = typeof config === 'object' ? config : null
+
+ if (!data) {
+ data = new Dropdown(element, _config)
+ }
- if (!data) {
- data = new Dropdown(this, _config)
- $(this).data(DATA_KEY, data)
+ if (typeof config === 'string') {
+ if (typeof data[config] === 'undefined') {
+ throw new TypeError(`No method named "${config}"`)
}
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new TypeError(`No method named "${config}"`)
- }
+ data[config]()
+ }
+ }
- data[config]()
- }
+ static jQueryInterface(config) {
+ return this.each(function () {
+ Dropdown.dropdownInterface(this, config)
})
}
- static _clearMenus(event) {
- if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH ||
- event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
+ static clearMenus(event) {
+ if (event && (event.button === RIGHT_MOUSE_BUTTON || (event.type === 'keyup' && event.key !== TAB_KEY))) {
return
}
- const toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE))
+ const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE)
for (let i = 0, len = toggles.length; i < len; i++) {
- const parent = Dropdown._getParentFromElement(toggles[i])
- const context = $(toggles[i]).data(DATA_KEY)
- const relatedTarget = {
- relatedTarget: toggles[i]
- }
-
- if (event && event.type === 'click') {
- relatedTarget.clickEvent = event
- }
-
- if (!context) {
- continue
- }
-
- const dropdownMenu = context._menu
- if (!$(parent).hasClass(CLASS_NAME_SHOW)) {
+ const context = Data.get(toggles[i], DATA_KEY)
+ if (!context || context._config.autoClose === false) {
continue
}
- if (event && (event.type === 'click' &&
- /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) &&
- $.contains(parent, event.target)) {
+ if (!context._element.classList.contains(CLASS_NAME_SHOW)) {
continue
}
- const hideEvent = $.Event(EVENT_HIDE, relatedTarget)
- $(parent).trigger(hideEvent)
- if (hideEvent.isDefaultPrevented()) {
- continue
+ const relatedTarget = {
+ relatedTarget: context._element
}
- // If this is a touch-enabled device we remove the extra
- // empty mouseover listeners we added for iOS support
- if ('ontouchstart' in document.documentElement) {
- $(document.body).children().off('mouseover', null, $.noop)
- }
+ if (event) {
+ const composedPath = event.composedPath()
+ const isMenuTarget = composedPath.includes(context._menu)
+ if (
+ composedPath.includes(context._element) ||
+ (context._config.autoClose === 'inside' && !isMenuTarget) ||
+ (context._config.autoClose === 'outside' && isMenuTarget)
+ ) {
+ continue
+ }
- toggles[i].setAttribute('aria-expanded', 'false')
+ // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu
+ if (context._menu.contains(event.target) && ((event.type === 'keyup' && event.key === TAB_KEY) || /input|select|option|textarea|form/i.test(event.target.tagName))) {
+ continue
+ }
- if (context._popper) {
- context._popper.destroy()
+ if (event.type === 'click') {
+ relatedTarget.clickEvent = event
+ }
}
- $(dropdownMenu).removeClass(CLASS_NAME_SHOW)
- $(parent)
- .removeClass(CLASS_NAME_SHOW)
- .trigger($.Event(EVENT_HIDDEN, relatedTarget))
+ context._completeHide(relatedTarget)
}
}
- static _getParentFromElement(element) {
- let parent
- const selector = Util.getSelectorFromElement(element)
-
- if (selector) {
- parent = document.querySelector(selector)
- }
-
- return parent || element.parentNode
+ static getParentFromElement(element) {
+ return getElementFromSelector(element) || element.parentNode
}
- // eslint-disable-next-line complexity
- static _dataApiKeydownHandler(event) {
+ static dataApiKeydownHandler(event) {
// If not input/textarea:
// - And not a key in REGEXP_KEYDOWN => not a dropdown command
// If input/textarea:
@@ -449,57 +462,45 @@ class Dropdown {
// - If key is not up or down => not a dropdown command
// - If trigger inside the menu => not a dropdown command
if (/input|textarea/i.test(event.target.tagName) ?
- event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE &&
- (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE ||
- $(event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
- return
- }
-
- if (this.disabled || $(this).hasClass(CLASS_NAME_DISABLED)) {
+ event.key === SPACE_KEY || (event.key !== ESCAPE_KEY &&
+ ((event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY) ||
+ event.target.closest(SELECTOR_MENU))) :
+ !REGEXP_KEYDOWN.test(event.key)) {
return
}
- const parent = Dropdown._getParentFromElement(this)
- const isActive = $(parent).hasClass(CLASS_NAME_SHOW)
+ const isActive = this.classList.contains(CLASS_NAME_SHOW)
- if (!isActive && event.which === ESCAPE_KEYCODE) {
+ if (!isActive && event.key === ESCAPE_KEY) {
return
}
event.preventDefault()
event.stopPropagation()
- if (!isActive || (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
- if (event.which === ESCAPE_KEYCODE) {
- $(parent.querySelector(SELECTOR_DATA_TOGGLE)).trigger('focus')
- }
-
- $(this).trigger('click')
+ if (isDisabled(this)) {
return
}
- const items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS))
- .filter(item => $(item).is(':visible'))
+ const getToggleButton = () => this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0]
- if (items.length === 0) {
+ if (event.key === ESCAPE_KEY) {
+ getToggleButton().focus()
+ Dropdown.clearMenus()
return
}
- let index = items.indexOf(event.target)
-
- if (event.which === ARROW_UP_KEYCODE && index > 0) { // Up
- index--
- }
-
- if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { // Down
- index++
+ if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) {
+ getToggleButton().click()
+ return
}
- if (index < 0) {
- index = 0
+ if (!isActive || event.key === SPACE_KEY) {
+ Dropdown.clearMenus()
+ return
}
- items[index].focus()
+ Dropdown.getInstance(getToggleButton())._selectMenuItem(event)
}
}
@@ -509,30 +510,22 @@ class Dropdown {
* ------------------------------------------------------------------------
*/
-$(document)
- .on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown._dataApiKeydownHandler)
- .on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler)
- .on(`${EVENT_CLICK_DATA_API} ${EVENT_KEYUP_DATA_API}`, Dropdown._clearMenus)
- .on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
- event.preventDefault()
- event.stopPropagation()
- Dropdown._jQueryInterface.call($(this), 'toggle')
- })
- .on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, e => {
- e.stopPropagation()
- })
+EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler)
+EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler)
+EventHandler.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus)
+EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus)
+EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
+ event.preventDefault()
+ Dropdown.dropdownInterface(this)
+})
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Dropdown to jQuery only if jQuery is present
*/
-$.fn[NAME] = Dropdown._jQueryInterface
-$.fn[NAME].Constructor = Dropdown
-$.fn[NAME].noConflict = () => {
- $.fn[NAME] = JQUERY_NO_CONFLICT
- return Dropdown._jQueryInterface
-}
+defineJQueryPlugin(Dropdown)
export default Dropdown
diff --git a/vendor/twbs/bootstrap/js/src/modal.js b/vendor/twbs/bootstrap/js/src/modal.js
index 2e3017024..d4436bf4f 100644
--- a/vendor/twbs/bootstrap/js/src/modal.js
+++ b/vendor/twbs/bootstrap/js/src/modal.js
@@ -1,12 +1,26 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): modal.js
+ * Bootstrap (v5.0.1): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
-import $ from 'jquery'
-import Util from './util'
+import {
+ defineJQueryPlugin,
+ emulateTransitionEnd,
+ getElementFromSelector,
+ getTransitionDurationFromElement,
+ isRTL,
+ isVisible,
+ reflow,
+ typeCheckConfig
+} from './util/index'
+import EventHandler from './dom/event-handler'
+import Manipulator from './dom/manipulator'
+import SelectorEngine from './dom/selector-engine'
+import { getWidth as getScrollBarWidth, hide as scrollBarHide, reset as scrollBarReset } from './util/scrollbar'
+import BaseComponent from './base-component'
+import Backdrop from './util/backdrop'
/**
* ------------------------------------------------------------------------
@@ -15,25 +29,21 @@ import Util from './util'
*/
const NAME = 'modal'
-const VERSION = '4.6.0'
const DATA_KEY = 'bs.modal'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
-const JQUERY_NO_CONFLICT = $.fn[NAME]
-const ESCAPE_KEYCODE = 27 // KeyboardEvent.which value for Escape (Esc) key
+const ESCAPE_KEY = 'Escape'
const Default = {
backdrop: true,
keyboard: true,
- focus: true,
- show: true
+ focus: true
}
const DefaultType = {
backdrop: '(boolean|string)',
keyboard: 'boolean',
- focus: 'boolean',
- show: 'boolean'
+ focus: 'boolean'
}
const EVENT_HIDE = `hide${EVENT_KEY}`
@@ -49,9 +59,6 @@ const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}`
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
-const CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable'
-const CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure'
-const CLASS_NAME_BACKDROP = 'modal-backdrop'
const CLASS_NAME_OPEN = 'modal-open'
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
@@ -59,10 +66,8 @@ const CLASS_NAME_STATIC = 'modal-static'
const SELECTOR_DIALOG = '.modal-dialog'
const SELECTOR_MODAL_BODY = '.modal-body'
-const SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]'
-const SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]'
-const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'
-const SELECTOR_STICKY_CONTENT = '.sticky-top'
+const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="modal"]'
+const SELECTOR_DATA_DISMISS = '[data-bs-dismiss="modal"]'
/**
* ------------------------------------------------------------------------
@@ -70,29 +75,28 @@ const SELECTOR_STICKY_CONTENT = '.sticky-top'
* ------------------------------------------------------------------------
*/
-class Modal {
+class Modal extends BaseComponent {
constructor(element, config) {
+ super(element)
+
this._config = this._getConfig(config)
- this._element = element
- this._dialog = element.querySelector(SELECTOR_DIALOG)
- this._backdrop = null
+ this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element)
+ this._backdrop = this._initializeBackDrop()
this._isShown = false
- this._isBodyOverflowing = false
this._ignoreBackdropClick = false
this._isTransitioning = false
- this._scrollbarWidth = 0
}
// Getters
- static get VERSION() {
- return VERSION
- }
-
static get Default() {
return Default
}
+ static get NAME() {
+ return NAME
+ }
+
// Public
toggle(relatedTarget) {
@@ -104,39 +108,34 @@ class Modal {
return
}
- if ($(this._element).hasClass(CLASS_NAME_FADE)) {
+ if (this._isAnimated()) {
this._isTransitioning = true
}
- const showEvent = $.Event(EVENT_SHOW, {
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {
relatedTarget
})
- $(this._element).trigger(showEvent)
-
- if (this._isShown || showEvent.isDefaultPrevented()) {
+ if (this._isShown || showEvent.defaultPrevented) {
return
}
this._isShown = true
- this._checkScrollbar()
- this._setScrollbar()
+ scrollBarHide()
+
+ document.body.classList.add(CLASS_NAME_OPEN)
this._adjustDialog()
this._setEscapeEvent()
this._setResizeEvent()
- $(this._element).on(
- EVENT_CLICK_DISMISS,
- SELECTOR_DATA_DISMISS,
- event => this.hide(event)
- )
+ EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, event => this.hide(event))
- $(this._dialog).on(EVENT_MOUSEDOWN_DISMISS, () => {
- $(this._element).one(EVENT_MOUSEUP_DISMISS, event => {
- if ($(event.target).is(this._element)) {
+ EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {
+ EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {
+ if (event.target === this._element) {
this._ignoreBackdropClick = true
}
})
@@ -154,64 +153,45 @@ class Modal {
return
}
- const hideEvent = $.Event(EVENT_HIDE)
-
- $(this._element).trigger(hideEvent)
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)
- if (!this._isShown || hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
return
}
this._isShown = false
- const transition = $(this._element).hasClass(CLASS_NAME_FADE)
+ const isAnimated = this._isAnimated()
- if (transition) {
+ if (isAnimated) {
this._isTransitioning = true
}
this._setEscapeEvent()
this._setResizeEvent()
- $(document).off(EVENT_FOCUSIN)
+ EventHandler.off(document, EVENT_FOCUSIN)
- $(this._element).removeClass(CLASS_NAME_SHOW)
+ this._element.classList.remove(CLASS_NAME_SHOW)
- $(this._element).off(EVENT_CLICK_DISMISS)
- $(this._dialog).off(EVENT_MOUSEDOWN_DISMISS)
+ EventHandler.off(this._element, EVENT_CLICK_DISMISS)
+ EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS)
- if (transition) {
- const transitionDuration = Util.getTransitionDurationFromElement(this._element)
-
- $(this._element)
- .one(Util.TRANSITION_END, event => this._hideModal(event))
- .emulateTransitionEnd(transitionDuration)
- } else {
- this._hideModal()
- }
+ this._queueCallback(() => this._hideModal(), this._element, isAnimated)
}
dispose() {
- [window, this._element, this._dialog]
- .forEach(htmlElement => $(htmlElement).off(EVENT_KEY))
+ [window, this._dialog]
+ .forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY))
+
+ this._backdrop.dispose()
+ super.dispose()
/**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
* Do not move `document` in `htmlElements` array
* It will remove `EVENT_CLICK_DATA_API` event that should remain
*/
- $(document).off(EVENT_FOCUSIN)
-
- $.removeData(this._element, DATA_KEY)
-
- this._config = null
- this._element = null
- this._dialog = null
- this._backdrop = null
- this._isShown = null
- this._isBodyOverflowing = null
- this._ignoreBackdropClick = null
- this._isTransitioning = null
- this._scrollbarWidth = null
+ EventHandler.off(document, EVENT_FOCUSIN)
}
handleUpdate() {
@@ -220,53 +200,28 @@ class Modal {
// Private
+ _initializeBackDrop() {
+ return new Backdrop({
+ isVisible: Boolean(this._config.backdrop), // 'static' option will be translated to true, and booleans will keep their value
+ isAnimated: this._isAnimated()
+ })
+ }
+
_getConfig(config) {
config = {
...Default,
+ ...Manipulator.getDataAttributes(this._element),
...config
}
- Util.typeCheckConfig(NAME, config, DefaultType)
+ typeCheckConfig(NAME, config, DefaultType)
return config
}
- _triggerBackdropTransition() {
- const hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED)
-
- $(this._element).trigger(hideEventPrevented)
- if (hideEventPrevented.isDefaultPrevented()) {
- return
- }
-
- const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight
-
- if (!isModalOverflowing) {
- this._element.style.overflowY = 'hidden'
- }
-
- this._element.classList.add(CLASS_NAME_STATIC)
-
- const modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog)
- $(this._element).off(Util.TRANSITION_END)
-
- $(this._element).one(Util.TRANSITION_END, () => {
- this._element.classList.remove(CLASS_NAME_STATIC)
- if (!isModalOverflowing) {
- $(this._element).one(Util.TRANSITION_END, () => {
- this._element.style.overflowY = ''
- })
- .emulateTransitionEnd(this._element, modalTransitionDuration)
- }
- })
- .emulateTransitionEnd(modalTransitionDuration)
- this._element.focus()
- }
-
_showElement(relatedTarget) {
- const transition = $(this._element).hasClass(CLASS_NAME_FADE)
- const modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null
+ const isAnimated = this._isAnimated()
+ const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog)
- if (!this._element.parentNode ||
- this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
+ if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position
document.body.appendChild(this._element)
}
@@ -275,79 +230,67 @@ class Modal {
this._element.removeAttribute('aria-hidden')
this._element.setAttribute('aria-modal', true)
this._element.setAttribute('role', 'dialog')
+ this._element.scrollTop = 0
- if ($(this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
+ if (modalBody) {
modalBody.scrollTop = 0
- } else {
- this._element.scrollTop = 0
}
- if (transition) {
- Util.reflow(this._element)
+ if (isAnimated) {
+ reflow(this._element)
}
- $(this._element).addClass(CLASS_NAME_SHOW)
+ this._element.classList.add(CLASS_NAME_SHOW)
if (this._config.focus) {
this._enforceFocus()
}
- const shownEvent = $.Event(EVENT_SHOWN, {
- relatedTarget
- })
-
const transitionComplete = () => {
if (this._config.focus) {
this._element.focus()
}
this._isTransitioning = false
- $(this._element).trigger(shownEvent)
+ EventHandler.trigger(this._element, EVENT_SHOWN, {
+ relatedTarget
+ })
}
- if (transition) {
- const transitionDuration = Util.getTransitionDurationFromElement(this._dialog)
-
- $(this._dialog)
- .one(Util.TRANSITION_END, transitionComplete)
- .emulateTransitionEnd(transitionDuration)
- } else {
- transitionComplete()
- }
+ this._queueCallback(transitionComplete, this._dialog, isAnimated)
}
_enforceFocus() {
- $(document)
- .off(EVENT_FOCUSIN) // Guard against infinite focus loop
- .on(EVENT_FOCUSIN, event => {
- if (document !== event.target &&
- this._element !== event.target &&
- $(this._element).has(event.target).length === 0) {
- this._element.focus()
- }
- })
+ EventHandler.off(document, EVENT_FOCUSIN) // guard against infinite focus loop
+ EventHandler.on(document, EVENT_FOCUSIN, event => {
+ if (document !== event.target &&
+ this._element !== event.target &&
+ !this._element.contains(event.target)) {
+ this._element.focus()
+ }
+ })
}
_setEscapeEvent() {
if (this._isShown) {
- $(this._element).on(EVENT_KEYDOWN_DISMISS, event => {
- if (this._config.keyboard && event.which === ESCAPE_KEYCODE) {
+ EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
+ if (this._config.keyboard && event.key === ESCAPE_KEY) {
event.preventDefault()
this.hide()
- } else if (!this._config.keyboard && event.which === ESCAPE_KEYCODE) {
+ } else if (!this._config.keyboard && event.key === ESCAPE_KEY) {
this._triggerBackdropTransition()
}
})
- } else if (!this._isShown) {
- $(this._element).off(EVENT_KEYDOWN_DISMISS)
+ } else {
+ EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS)
}
}
_setResizeEvent() {
if (this._isShown) {
- $(window).on(EVENT_RESIZE, event => this.handleUpdate(event))
+ EventHandler.on(window, EVENT_RESIZE, () => this._adjustDialog())
} else {
- $(window).off(EVENT_RESIZE)
+ EventHandler.off(window, EVENT_RESIZE)
}
}
@@ -357,110 +300,82 @@ class Modal {
this._element.removeAttribute('aria-modal')
this._element.removeAttribute('role')
this._isTransitioning = false
- this._showBackdrop(() => {
- $(document.body).removeClass(CLASS_NAME_OPEN)
+ this._backdrop.hide(() => {
+ document.body.classList.remove(CLASS_NAME_OPEN)
this._resetAdjustments()
- this._resetScrollbar()
- $(this._element).trigger(EVENT_HIDDEN)
+ scrollBarReset()
+ EventHandler.trigger(this._element, EVENT_HIDDEN)
})
}
- _removeBackdrop() {
- if (this._backdrop) {
- $(this._backdrop).remove()
- this._backdrop = null
- }
- }
-
_showBackdrop(callback) {
- const animate = $(this._element).hasClass(CLASS_NAME_FADE) ?
- CLASS_NAME_FADE : ''
-
- if (this._isShown && this._config.backdrop) {
- this._backdrop = document.createElement('div')
- this._backdrop.className = CLASS_NAME_BACKDROP
-
- if (animate) {
- this._backdrop.classList.add(animate)
- }
-
- $(this._backdrop).appendTo(document.body)
-
- $(this._element).on(EVENT_CLICK_DISMISS, event => {
- if (this._ignoreBackdropClick) {
- this._ignoreBackdropClick = false
- return
- }
-
- if (event.target !== event.currentTarget) {
- return
- }
-
- if (this._config.backdrop === 'static') {
- this._triggerBackdropTransition()
- } else {
- this.hide()
- }
- })
-
- if (animate) {
- Util.reflow(this._backdrop)
+ EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => {
+ if (this._ignoreBackdropClick) {
+ this._ignoreBackdropClick = false
+ return
}
- $(this._backdrop).addClass(CLASS_NAME_SHOW)
-
- if (!callback) {
+ if (event.target !== event.currentTarget) {
return
}
- if (!animate) {
- callback()
- return
+ if (this._config.backdrop === true) {
+ this.hide()
+ } else if (this._config.backdrop === 'static') {
+ this._triggerBackdropTransition()
}
+ })
- const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop)
+ this._backdrop.show(callback)
+ }
- $(this._backdrop)
- .one(Util.TRANSITION_END, callback)
- .emulateTransitionEnd(backdropTransitionDuration)
- } else if (!this._isShown && this._backdrop) {
- $(this._backdrop).removeClass(CLASS_NAME_SHOW)
+ _isAnimated() {
+ return this._element.classList.contains(CLASS_NAME_FADE)
+ }
- const callbackRemove = () => {
- this._removeBackdrop()
- if (callback) {
- callback()
- }
- }
+ _triggerBackdropTransition() {
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)
+ if (hideEvent.defaultPrevented) {
+ return
+ }
- if ($(this._element).hasClass(CLASS_NAME_FADE)) {
- const backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop)
+ const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight
- $(this._backdrop)
- .one(Util.TRANSITION_END, callbackRemove)
- .emulateTransitionEnd(backdropTransitionDuration)
- } else {
- callbackRemove()
- }
- } else if (callback) {
- callback()
+ if (!isModalOverflowing) {
+ this._element.style.overflowY = 'hidden'
}
+
+ this._element.classList.add(CLASS_NAME_STATIC)
+ const modalTransitionDuration = getTransitionDurationFromElement(this._dialog)
+ EventHandler.off(this._element, 'transitionend')
+ EventHandler.one(this._element, 'transitionend', () => {
+ this._element.classList.remove(CLASS_NAME_STATIC)
+ if (!isModalOverflowing) {
+ EventHandler.one(this._element, 'transitionend', () => {
+ this._element.style.overflowY = ''
+ })
+ emulateTransitionEnd(this._element, modalTransitionDuration)
+ }
+ })
+ emulateTransitionEnd(this._element, modalTransitionDuration)
+ this._element.focus()
}
// ----------------------------------------------------------------------
// the following methods are used to handle overflowing modals
- // todo (fat): these should probably be refactored out of modal.js
// ----------------------------------------------------------------------
_adjustDialog() {
const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight
+ const scrollbarWidth = getScrollBarWidth()
+ const isBodyOverflowing = scrollbarWidth > 0
- if (!this._isBodyOverflowing && isModalOverflowing) {
- this._element.style.paddingLeft = `${this._scrollbarWidth}px`
+ if ((!isBodyOverflowing && isModalOverflowing && !isRTL()) || (isBodyOverflowing && !isModalOverflowing && isRTL())) {
+ this._element.style.paddingLeft = `${scrollbarWidth}px`
}
- if (this._isBodyOverflowing && !isModalOverflowing) {
- this._element.style.paddingRight = `${this._scrollbarWidth}px`
+ if ((isBodyOverflowing && !isModalOverflowing && !isRTL()) || (!isBodyOverflowing && isModalOverflowing && isRTL())) {
+ this._element.style.paddingRight = `${scrollbarWidth}px`
}
}
@@ -469,106 +384,21 @@ class Modal {
this._element.style.paddingRight = ''
}
- _checkScrollbar() {
- const rect = document.body.getBoundingClientRect()
- this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth
- this._scrollbarWidth = this._getScrollbarWidth()
- }
-
- _setScrollbar() {
- if (this._isBodyOverflowing) {
- // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
- // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
- const fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT))
- const stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT))
-
- // Adjust fixed content padding
- $(fixedContent).each((index, element) => {
- const actualPadding = element.style.paddingRight
- const calculatedPadding = $(element).css('padding-right')
- $(element)
- .data('padding-right', actualPadding)
- .css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)
- })
-
- // Adjust sticky content margin
- $(stickyContent).each((index, element) => {
- const actualMargin = element.style.marginRight
- const calculatedMargin = $(element).css('margin-right')
- $(element)
- .data('margin-right', actualMargin)
- .css('margin-right', `${parseFloat(calculatedMargin) - this._scrollbarWidth}px`)
- })
-
- // Adjust body padding
- const actualPadding = document.body.style.paddingRight
- const calculatedPadding = $(document.body).css('padding-right')
- $(document.body)
- .data('padding-right', actualPadding)
- .css('padding-right', `${parseFloat(calculatedPadding) + this._scrollbarWidth}px`)
- }
-
- $(document.body).addClass(CLASS_NAME_OPEN)
- }
-
- _resetScrollbar() {
- // Restore fixed content padding
- const fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT))
- $(fixedContent).each((index, element) => {
- const padding = $(element).data('padding-right')
- $(element).removeData('padding-right')
- element.style.paddingRight = padding ? padding : ''
- })
-
- // Restore sticky content
- const elements = [].slice.call(document.querySelectorAll(`${SELECTOR_STICKY_CONTENT}`))
- $(elements).each((index, element) => {
- const margin = $(element).data('margin-right')
- if (typeof margin !== 'undefined') {
- $(element).css('margin-right', margin).removeData('margin-right')
- }
- })
-
- // Restore body padding
- const padding = $(document.body).data('padding-right')
- $(document.body).removeData('padding-right')
- document.body.style.paddingRight = padding ? padding : ''
- }
-
- _getScrollbarWidth() { // thx d.walsh
- const scrollDiv = document.createElement('div')
- scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER
- document.body.appendChild(scrollDiv)
- const scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth
- document.body.removeChild(scrollDiv)
- return scrollbarWidth
- }
-
// Static
- static _jQueryInterface(config, relatedTarget) {
+ static jQueryInterface(config, relatedTarget) {
return this.each(function () {
- let data = $(this).data(DATA_KEY)
- const _config = {
- ...Default,
- ...$(this).data(),
- ...(typeof config === 'object' && config ? config : {})
- }
+ const data = Modal.getInstance(this) || new Modal(this, typeof config === 'object' ? config : {})
- if (!data) {
- data = new Modal(this, _config)
- $(this).data(DATA_KEY, data)
+ if (typeof config !== 'string') {
+ return
}
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new TypeError(`No method named "${config}"`)
- }
-
- data[config](relatedTarget)
- } else if (_config.show) {
- data.show(relatedTarget)
+ if (typeof data[config] === 'undefined') {
+ throw new TypeError(`No method named "${config}"`)
}
+
+ data[config](relatedTarget)
})
}
}
@@ -579,51 +409,38 @@ class Modal {
* ------------------------------------------------------------------------
*/
-$(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
- let target
- const selector = Util.getSelectorFromElement(this)
-
- if (selector) {
- target = document.querySelector(selector)
- }
+EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
+ const target = getElementFromSelector(this)
- const config = $(target).data(DATA_KEY) ?
- 'toggle' : {
- ...$(target).data(),
- ...$(this).data()
- }
-
- if (this.tagName === 'A' || this.tagName === 'AREA') {
+ if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault()
}
- const $target = $(target).one(EVENT_SHOW, showEvent => {
- if (showEvent.isDefaultPrevented()) {
- // Only register focus restorer if modal will actually get shown
+ EventHandler.one(target, EVENT_SHOW, showEvent => {
+ if (showEvent.defaultPrevented) {
+ // only register focus restorer if modal will actually get shown
return
}
- $target.one(EVENT_HIDDEN, () => {
- if ($(this).is(':visible')) {
+ EventHandler.one(target, EVENT_HIDDEN, () => {
+ if (isVisible(this)) {
this.focus()
}
})
})
- Modal._jQueryInterface.call($(target), config, this)
+ const data = Modal.getInstance(target) || new Modal(target)
+
+ data.toggle(this)
})
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Modal to jQuery only if jQuery is present
*/
-$.fn[NAME] = Modal._jQueryInterface
-$.fn[NAME].Constructor = Modal
-$.fn[NAME].noConflict = () => {
- $.fn[NAME] = JQUERY_NO_CONFLICT
- return Modal._jQueryInterface
-}
+defineJQueryPlugin(Modal)
export default Modal
diff --git a/vendor/twbs/bootstrap/js/src/popover.js b/vendor/twbs/bootstrap/js/src/popover.js
index 4e2c260b9..b39985124 100644
--- a/vendor/twbs/bootstrap/js/src/popover.js
+++ b/vendor/twbs/bootstrap/js/src/popover.js
@@ -1,11 +1,13 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): popover.js
+ * Bootstrap (v5.0.1): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
-import $ from 'jquery'
+import { defineJQueryPlugin } from './util/index'
+import Data from './dom/data'
+import SelectorEngine from './dom/selector-engine'
import Tooltip from './tooltip'
/**
@@ -15,22 +17,22 @@ import Tooltip from './tooltip'
*/
const NAME = 'popover'
-const VERSION = '4.6.0'
const DATA_KEY = 'bs.popover'
const EVENT_KEY = `.${DATA_KEY}`
-const JQUERY_NO_CONFLICT = $.fn[NAME]
const CLASS_PREFIX = 'bs-popover'
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g')
const Default = {
...Tooltip.Default,
placement: 'right',
+ offset: [0, 8],
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' +
- '<div class="arrow"></div>' +
- '<h3 class="popover-header"></h3>' +
- '<div class="popover-body"></div></div>'
+ '<div class="popover-arrow"></div>' +
+ '<h3 class="popover-header"></h3>' +
+ '<div class="popover-body"></div>' +
+ '</div>'
}
const DefaultType = {
@@ -38,12 +40,6 @@ const DefaultType = {
content: '(string|element|function)'
}
-const CLASS_NAME_FADE = 'fade'
-const CLASS_NAME_SHOW = 'show'
-
-const SELECTOR_TITLE = '.popover-header'
-const SELECTOR_CONTENT = '.popover-body'
-
const Event = {
HIDE: `hide${EVENT_KEY}`,
HIDDEN: `hidden${EVENT_KEY}`,
@@ -57,6 +53,12 @@ const Event = {
MOUSELEAVE: `mouseleave${EVENT_KEY}`
}
+const CLASS_NAME_FADE = 'fade'
+const CLASS_NAME_SHOW = 'show'
+
+const SELECTOR_TITLE = '.popover-header'
+const SELECTOR_CONTENT = '.popover-body'
+
/**
* ------------------------------------------------------------------------
* Class Definition
@@ -66,10 +68,6 @@ const Event = {
class Popover extends Tooltip {
// Getters
- static get VERSION() {
- return VERSION
- }
-
static get Default() {
return Default
}
@@ -78,18 +76,10 @@ class Popover extends Tooltip {
return NAME
}
- static get DATA_KEY() {
- return DATA_KEY
- }
-
static get Event() {
return Event
}
- static get EVENT_KEY() {
- return EVENT_KEY
- }
-
static get DefaultType() {
return DefaultType
}
@@ -100,50 +90,45 @@ class Popover extends Tooltip {
return this.getTitle() || this._getContent()
}
- addAttachmentClass(attachment) {
- $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)
- }
-
- getTipElement() {
- this.tip = this.tip || $(this.config.template)[0]
- return this.tip
- }
-
setContent() {
- const $tip = $(this.getTipElement())
+ const tip = this.getTipElement()
- // We use append for html objects to maintain js events
- this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle())
+ // we use append for html objects to maintain js events
+ this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle())
let content = this._getContent()
if (typeof content === 'function') {
- content = content.call(this.element)
+ content = content.call(this._element)
}
- this.setElementContent($tip.find(SELECTOR_CONTENT), content)
+ this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content)
- $tip.removeClass(`${CLASS_NAME_FADE} ${CLASS_NAME_SHOW}`)
+ tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)
}
// Private
+ _addAttachmentClass(attachment) {
+ this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`)
+ }
+
_getContent() {
- return this.element.getAttribute('data-content') ||
- this.config.content
+ return this._element.getAttribute('data-bs-content') || this._config.content
}
_cleanTipClass() {
- const $tip = $(this.getTipElement())
- const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)
+ const tip = this.getTipElement()
+ const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX)
if (tabClass !== null && tabClass.length > 0) {
- $tip.removeClass(tabClass.join(''))
+ tabClass.map(token => token.trim())
+ .forEach(tClass => tip.classList.remove(tClass))
}
}
// Static
- static _jQueryInterface(config) {
+ static jQueryInterface(config) {
return this.each(function () {
- let data = $(this).data(DATA_KEY)
+ let data = Data.get(this, DATA_KEY)
const _config = typeof config === 'object' ? config : null
if (!data && /dispose|hide/.test(config)) {
@@ -152,7 +137,7 @@ class Popover extends Tooltip {
if (!data) {
data = new Popover(this, _config)
- $(this).data(DATA_KEY, data)
+ Data.set(this, DATA_KEY, data)
}
if (typeof config === 'string') {
@@ -170,13 +155,9 @@ class Popover extends Tooltip {
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Popover to jQuery only if jQuery is present
*/
-$.fn[NAME] = Popover._jQueryInterface
-$.fn[NAME].Constructor = Popover
-$.fn[NAME].noConflict = () => {
- $.fn[NAME] = JQUERY_NO_CONFLICT
- return Popover._jQueryInterface
-}
+defineJQueryPlugin(Popover)
export default Popover
diff --git a/vendor/twbs/bootstrap/js/src/scrollspy.js b/vendor/twbs/bootstrap/js/src/scrollspy.js
index 351df0649..3297c45c2 100644
--- a/vendor/twbs/bootstrap/js/src/scrollspy.js
+++ b/vendor/twbs/bootstrap/js/src/scrollspy.js
@@ -1,12 +1,21 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): scrollspy.js
+ * Bootstrap (v5.0.1): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
-import $ from 'jquery'
-import Util from './util'
+import {
+ defineJQueryPlugin,
+ getSelectorFromElement,
+ getUID,
+ isElement,
+ typeCheckConfig
+} from './util/index'
+import EventHandler from './dom/event-handler'
+import Manipulator from './dom/manipulator'
+import SelectorEngine from './dom/selector-engine'
+import BaseComponent from './base-component'
/**
* ------------------------------------------------------------------------
@@ -15,11 +24,9 @@ import Util from './util'
*/
const NAME = 'scrollspy'
-const VERSION = '4.6.0'
const DATA_KEY = 'bs.scrollspy'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
-const JQUERY_NO_CONFLICT = $.fn[NAME]
const Default = {
offset: 10,
@@ -40,13 +47,12 @@ const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'
const CLASS_NAME_ACTIVE = 'active'
-const SELECTOR_DATA_SPY = '[data-spy="scroll"]'
+const SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]'
const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'
const SELECTOR_NAV_LINKS = '.nav-link'
const SELECTOR_NAV_ITEMS = '.nav-item'
const SELECTOR_LIST_ITEMS = '.list-group-item'
const SELECTOR_DROPDOWN = '.dropdown'
-const SELECTOR_DROPDOWN_ITEMS = '.dropdown-item'
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'
const METHOD_OFFSET = 'offset'
@@ -58,20 +64,18 @@ const METHOD_POSITION = 'position'
* ------------------------------------------------------------------------
*/
-class ScrollSpy {
+class ScrollSpy extends BaseComponent {
constructor(element, config) {
- this._element = element
- this._scrollElement = element.tagName === 'BODY' ? window : element
+ super(element)
+ this._scrollElement = this._element.tagName === 'BODY' ? window : this._element
this._config = this._getConfig(config)
- this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS},` +
- `${this._config.target} ${SELECTOR_LIST_ITEMS},` +
- `${this._config.target} ${SELECTOR_DROPDOWN_ITEMS}`
+ this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`
this._offsets = []
this._targets = []
this._activeTarget = null
this._scrollHeight = 0
- $(this._scrollElement).on(EVENT_SCROLL, event => this._process(event))
+ EventHandler.on(this._scrollElement, EVENT_SCROLL, () => this._process())
this.refresh()
this._process()
@@ -79,55 +83,51 @@ class ScrollSpy {
// Getters
- static get VERSION() {
- return VERSION
- }
-
static get Default() {
return Default
}
+ static get NAME() {
+ return NAME
+ }
+
// Public
refresh() {
const autoMethod = this._scrollElement === this._scrollElement.window ?
- METHOD_OFFSET : METHOD_POSITION
+ METHOD_OFFSET :
+ METHOD_POSITION
const offsetMethod = this._config.method === 'auto' ?
- autoMethod : this._config.method
+ autoMethod :
+ this._config.method
const offsetBase = offsetMethod === METHOD_POSITION ?
- this._getScrollTop() : 0
+ this._getScrollTop() :
+ 0
this._offsets = []
this._targets = []
-
this._scrollHeight = this._getScrollHeight()
- const targets = [].slice.call(document.querySelectorAll(this._selector))
+ const targets = SelectorEngine.find(this._selector)
- targets
- .map(element => {
- let target
- const targetSelector = Util.getSelectorFromElement(element)
+ targets.map(element => {
+ const targetSelector = getSelectorFromElement(element)
+ const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null
- if (targetSelector) {
- target = document.querySelector(targetSelector)
- }
-
- if (target) {
- const targetBCR = target.getBoundingClientRect()
- if (targetBCR.width || targetBCR.height) {
- // TODO (fat): remove sketch reliance on jQuery position/offset
- return [
- $(target)[offsetMethod]().top + offsetBase,
- targetSelector
- ]
- }
+ if (target) {
+ const targetBCR = target.getBoundingClientRect()
+ if (targetBCR.width || targetBCR.height) {
+ return [
+ Manipulator[offsetMethod](target).top + offsetBase,
+ targetSelector
+ ]
}
+ }
- return null
- })
+ return null
+ })
.filter(item => item)
.sort((a, b) => a[0] - b[0])
.forEach(item => {
@@ -137,17 +137,8 @@ class ScrollSpy {
}
dispose() {
- $.removeData(this._element, DATA_KEY)
- $(this._scrollElement).off(EVENT_KEY)
-
- this._element = null
- this._scrollElement = null
- this._config = null
- this._selector = null
- this._offsets = null
- this._targets = null
- this._activeTarget = null
- this._scrollHeight = null
+ EventHandler.off(this._scrollElement, EVENT_KEY)
+ super.dispose()
}
// Private
@@ -155,27 +146,29 @@ class ScrollSpy {
_getConfig(config) {
config = {
...Default,
+ ...Manipulator.getDataAttributes(this._element),
...(typeof config === 'object' && config ? config : {})
}
- if (typeof config.target !== 'string' && Util.isElement(config.target)) {
- let id = $(config.target).attr('id')
+ if (typeof config.target !== 'string' && isElement(config.target)) {
+ let { id } = config.target
if (!id) {
- id = Util.getUID(NAME)
- $(config.target).attr('id', id)
+ id = getUID(NAME)
+ config.target.id = id
}
config.target = `#${id}`
}
- Util.typeCheckConfig(NAME, config, DefaultType)
+ typeCheckConfig(NAME, config, DefaultType)
return config
}
_getScrollTop() {
return this._scrollElement === window ?
- this._scrollElement.pageYOffset : this._scrollElement.scrollTop
+ this._scrollElement.pageYOffset :
+ this._scrollElement.scrollTop
}
_getScrollHeight() {
@@ -187,7 +180,8 @@ class ScrollSpy {
_getOffsetHeight() {
return this._scrollElement === window ?
- window.innerHeight : this._scrollElement.getBoundingClientRect().height
+ window.innerHeight :
+ this._scrollElement.getBoundingClientRect().height
}
_process() {
@@ -218,8 +212,7 @@ class ScrollSpy {
for (let i = this._offsets.length; i--;) {
const isActiveTarget = this._activeTarget !== this._targets[i] &&
scrollTop >= this._offsets[i] &&
- (typeof this._offsets[i + 1] === 'undefined' ||
- scrollTop < this._offsets[i + 1])
+ (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1])
if (isActiveTarget) {
this._activate(this._targets[i])
@@ -232,62 +225,62 @@ class ScrollSpy {
this._clear()
- const queries = this._selector
- .split(',')
- .map(selector => `${selector}[data-target="${target}"],${selector}[href="${target}"]`)
+ const queries = this._selector.split(',')
+ .map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`)
+
+ const link = SelectorEngine.findOne(queries.join(','))
- const $link = $([].slice.call(document.querySelectorAll(queries.join(','))))
+ if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
+ SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, link.closest(SELECTOR_DROPDOWN))
+ .classList.add(CLASS_NAME_ACTIVE)
- if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
- $link.closest(SELECTOR_DROPDOWN)
- .find(SELECTOR_DROPDOWN_TOGGLE)
- .addClass(CLASS_NAME_ACTIVE)
- $link.addClass(CLASS_NAME_ACTIVE)
+ link.classList.add(CLASS_NAME_ACTIVE)
} else {
// Set triggered link as active
- $link.addClass(CLASS_NAME_ACTIVE)
- // Set triggered links parents as active
- // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
- $link.parents(SELECTOR_NAV_LIST_GROUP)
- .prev(`${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`)
- .addClass(CLASS_NAME_ACTIVE)
- // Handle special case when .nav-link is inside .nav-item
- $link.parents(SELECTOR_NAV_LIST_GROUP)
- .prev(SELECTOR_NAV_ITEMS)
- .children(SELECTOR_NAV_LINKS)
- .addClass(CLASS_NAME_ACTIVE)
+ link.classList.add(CLASS_NAME_ACTIVE)
+
+ SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP)
+ .forEach(listGroup => {
+ // Set triggered links parents as active
+ // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
+ SelectorEngine.prev(listGroup, `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`)
+ .forEach(item => item.classList.add(CLASS_NAME_ACTIVE))
+
+ // Handle special case when .nav-link is inside .nav-item
+ SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS)
+ .forEach(navItem => {
+ SelectorEngine.children(navItem, SELECTOR_NAV_LINKS)
+ .forEach(item => item.classList.add(CLASS_NAME_ACTIVE))
+ })
+ })
}
- $(this._scrollElement).trigger(EVENT_ACTIVATE, {
+ EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {
relatedTarget: target
})
}
_clear() {
- [].slice.call(document.querySelectorAll(this._selector))
+ SelectorEngine.find(this._selector)
.filter(node => node.classList.contains(CLASS_NAME_ACTIVE))
.forEach(node => node.classList.remove(CLASS_NAME_ACTIVE))
}
// Static
- static _jQueryInterface(config) {
+ static jQueryInterface(config) {
return this.each(function () {
- let data = $(this).data(DATA_KEY)
- const _config = typeof config === 'object' && config
+ const data = ScrollSpy.getInstance(this) || new ScrollSpy(this, typeof config === 'object' ? config : {})
- if (!data) {
- data = new ScrollSpy(this, _config)
- $(this).data(DATA_KEY, data)
+ if (typeof config !== 'string') {
+ return
}
- if (typeof config === 'string') {
- if (typeof data[config] === 'undefined') {
- throw new TypeError(`No method named "${config}"`)
- }
-
- data[config]()
+ if (typeof data[config] === 'undefined') {
+ throw new TypeError(`No method named "${config}"`)
}
+
+ data[config]()
})
}
}
@@ -298,27 +291,18 @@ class ScrollSpy {
* ------------------------------------------------------------------------
*/
-$(window).on(EVENT_LOAD_DATA_API, () => {
- const scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY))
- const scrollSpysLength = scrollSpys.length
-
- for (let i = scrollSpysLength; i--;) {
- const $spy = $(scrollSpys[i])
- ScrollSpy._jQueryInterface.call($spy, $spy.data())
- }
+EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
+ SelectorEngine.find(SELECTOR_DATA_SPY)
+ .forEach(spy => new ScrollSpy(spy))
})
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .ScrollSpy to jQuery only if jQuery is present
*/
-$.fn[NAME] = ScrollSpy._jQueryInterface
-$.fn[NAME].Constructor = ScrollSpy
-$.fn[NAME].noConflict = () => {
- $.fn[NAME] = JQUERY_NO_CONFLICT
- return ScrollSpy._jQueryInterface
-}
+defineJQueryPlugin(ScrollSpy)
export default ScrollSpy
diff --git a/vendor/twbs/bootstrap/js/src/tab.js b/vendor/twbs/bootstrap/js/src/tab.js
index e9a6f555f..51deb170f 100644
--- a/vendor/twbs/bootstrap/js/src/tab.js
+++ b/vendor/twbs/bootstrap/js/src/tab.js
@@ -1,12 +1,20 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): tab.js
+ * Bootstrap (v5.0.1): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
-import $ from 'jquery'
-import Util from './util'
+import {
+ defineJQueryPlugin,
+ getElementFromSelector,
+ isDisabled,
+ reflow
+} from './util/index'
+import Data from './dom/data'
+import EventHandler from './dom/event-handler'
+import SelectorEngine from './dom/selector-engine'
+import BaseComponent from './base-component'
/**
* ------------------------------------------------------------------------
@@ -15,11 +23,9 @@ import Util from './util'
*/
const NAME = 'tab'
-const VERSION = '4.6.0'
const DATA_KEY = 'bs.tab'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
-const JQUERY_NO_CONFLICT = $.fn[NAME]
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
@@ -29,17 +35,16 @@ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'
const CLASS_NAME_ACTIVE = 'active'
-const CLASS_NAME_DISABLED = 'disabled'
const CLASS_NAME_FADE = 'fade'
const CLASS_NAME_SHOW = 'show'
const SELECTOR_DROPDOWN = '.dropdown'
const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'
const SELECTOR_ACTIVE = '.active'
-const SELECTOR_ACTIVE_UL = '> li > .active'
-const SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]'
+const SELECTOR_ACTIVE_UL = ':scope > li > .active'
+const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'
-const SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active'
+const SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active'
/**
* ------------------------------------------------------------------------
@@ -47,77 +52,55 @@ const SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active'
* ------------------------------------------------------------------------
*/
-class Tab {
- constructor(element) {
- this._element = element
- }
-
+class Tab extends BaseComponent {
// Getters
- static get VERSION() {
- return VERSION
+ static get NAME() {
+ return NAME
}
// Public
show() {
- if (this._element.parentNode &&
- this._element.parentNode.nodeType === Node.ELEMENT_NODE &&
- $(this._element).hasClass(CLASS_NAME_ACTIVE) ||
- $(this._element).hasClass(CLASS_NAME_DISABLED)) {
+ if ((this._element.parentNode &&
+ this._element.parentNode.nodeType === Node.ELEMENT_NODE &&
+ this._element.classList.contains(CLASS_NAME_ACTIVE))) {
return
}
- let target
let previous
- const listElement = $(this._element).closest(SELECTOR_NAV_LIST_GROUP)[0]
- const selector = Util.getSelectorFromElement(this._element)
+ const target = getElementFromSelector(this._element)
+ const listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP)
if (listElement) {
const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE
- previous = $.makeArray($(listElement).find(itemSelector))
+ previous = SelectorEngine.find(itemSelector, listElement)
previous = previous[previous.length - 1]
}
- const hideEvent = $.Event(EVENT_HIDE, {
- relatedTarget: this._element
- })
+ const hideEvent = previous ?
+ EventHandler.trigger(previous, EVENT_HIDE, {
+ relatedTarget: this._element
+ }) :
+ null
- const showEvent = $.Event(EVENT_SHOW, {
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {
relatedTarget: previous
})
- if (previous) {
- $(previous).trigger(hideEvent)
- }
-
- $(this._element).trigger(showEvent)
-
- if (showEvent.isDefaultPrevented() ||
- hideEvent.isDefaultPrevented()) {
+ if (showEvent.defaultPrevented || (hideEvent !== null && hideEvent.defaultPrevented)) {
return
}
- if (selector) {
- target = document.querySelector(selector)
- }
-
- this._activate(
- this._element,
- listElement
- )
+ this._activate(this._element, listElement)
const complete = () => {
- const hiddenEvent = $.Event(EVENT_HIDDEN, {
+ EventHandler.trigger(previous, EVENT_HIDDEN, {
relatedTarget: this._element
})
-
- const shownEvent = $.Event(EVENT_SHOWN, {
+ EventHandler.trigger(this._element, EVENT_SHOWN, {
relatedTarget: previous
})
-
- $(previous).trigger(hiddenEvent)
- $(this._element).trigger(shownEvent)
}
if (target) {
@@ -127,33 +110,21 @@ class Tab {
}
}
- dispose() {
- $.removeData(this._element, DATA_KEY)
- this._element = null
- }
-
// Private
_activate(element, container, callback) {
const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ?
- $(container).find(SELECTOR_ACTIVE_UL) :
- $(container).children(SELECTOR_ACTIVE)
+ SelectorEngine.find(SELECTOR_ACTIVE_UL, container) :
+ SelectorEngine.children(container, SELECTOR_ACTIVE)
const active = activeElements[0]
- const isTransitioning = callback && (active && $(active).hasClass(CLASS_NAME_FADE))
- const complete = () => this._transitionComplete(
- element,
- active,
- callback
- )
+ const isTransitioning = callback && (active && active.classList.contains(CLASS_NAME_FADE))
- if (active && isTransitioning) {
- const transitionDuration = Util.getTransitionDurationFromElement(active)
+ const complete = () => this._transitionComplete(element, active, callback)
- $(active)
- .removeClass(CLASS_NAME_SHOW)
- .one(Util.TRANSITION_END, complete)
- .emulateTransitionEnd(transitionDuration)
+ if (active && isTransitioning) {
+ active.classList.remove(CLASS_NAME_SHOW)
+ this._queueCallback(complete, element, true)
} else {
complete()
}
@@ -161,14 +132,12 @@ class Tab {
_transitionComplete(element, active, callback) {
if (active) {
- $(active).removeClass(CLASS_NAME_ACTIVE)
+ active.classList.remove(CLASS_NAME_ACTIVE)
- const dropdownChild = $(active.parentNode).find(
- SELECTOR_DROPDOWN_ACTIVE_CHILD
- )[0]
+ const dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode)
if (dropdownChild) {
- $(dropdownChild).removeClass(CLASS_NAME_ACTIVE)
+ dropdownChild.classList.remove(CLASS_NAME_ACTIVE)
}
if (active.getAttribute('role') === 'tab') {
@@ -176,24 +145,28 @@ class Tab {
}
}
- $(element).addClass(CLASS_NAME_ACTIVE)
+ element.classList.add(CLASS_NAME_ACTIVE)
if (element.getAttribute('role') === 'tab') {
element.setAttribute('aria-selected', true)
}
- Util.reflow(element)
+ reflow(element)
if (element.classList.contains(CLASS_NAME_FADE)) {
element.classList.add(CLASS_NAME_SHOW)
}
- if (element.parentNode && $(element.parentNode).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
- const dropdownElement = $(element).closest(SELECTOR_DROPDOWN)[0]
+ let parent = element.parentNode
+ if (parent && parent.nodeName === 'LI') {
+ parent = parent.parentNode
+ }
+
+ if (parent && parent.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
+ const dropdownElement = element.closest(SELECTOR_DROPDOWN)
if (dropdownElement) {
- const dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE))
-
- $(dropdownToggleList).addClass(CLASS_NAME_ACTIVE)
+ SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE, dropdownElement)
+ .forEach(dropdown => dropdown.classList.add(CLASS_NAME_ACTIVE))
}
element.setAttribute('aria-expanded', true)
@@ -206,15 +179,9 @@ class Tab {
// Static
- static _jQueryInterface(config) {
+ static jQueryInterface(config) {
return this.each(function () {
- const $this = $(this)
- let data = $this.data(DATA_KEY)
-
- if (!data) {
- data = new Tab(this)
- $this.data(DATA_KEY, data)
- }
+ const data = Data.get(this, DATA_KEY) || new Tab(this)
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
@@ -233,23 +200,26 @@ class Tab {
* ------------------------------------------------------------------------
*/
-$(document)
- .on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
+EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
+ if (['A', 'AREA'].includes(this.tagName)) {
event.preventDefault()
- Tab._jQueryInterface.call($(this), 'show')
- })
+ }
+
+ if (isDisabled(this)) {
+ return
+ }
+
+ const data = Data.get(this, DATA_KEY) || new Tab(this)
+ data.show()
+})
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Tab to jQuery only if jQuery is present
*/
-$.fn[NAME] = Tab._jQueryInterface
-$.fn[NAME].Constructor = Tab
-$.fn[NAME].noConflict = () => {
- $.fn[NAME] = JQUERY_NO_CONFLICT
- return Tab._jQueryInterface
-}
+defineJQueryPlugin(Tab)
export default Tab
diff --git a/vendor/twbs/bootstrap/js/src/toast.js b/vendor/twbs/bootstrap/js/src/toast.js
index 0c2186908..40cd40d9a 100644
--- a/vendor/twbs/bootstrap/js/src/toast.js
+++ b/vendor/twbs/bootstrap/js/src/toast.js
@@ -1,12 +1,19 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): toast.js
+ * Bootstrap (v5.0.1): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
-import $ from 'jquery'
-import Util from './util'
+import {
+ defineJQueryPlugin,
+ reflow,
+ typeCheckConfig
+} from './util/index'
+import Data from './dom/data'
+import EventHandler from './dom/event-handler'
+import Manipulator from './dom/manipulator'
+import BaseComponent from './base-component'
/**
* ------------------------------------------------------------------------
@@ -15,12 +22,14 @@ import Util from './util'
*/
const NAME = 'toast'
-const VERSION = '4.6.0'
const DATA_KEY = 'bs.toast'
const EVENT_KEY = `.${DATA_KEY}`
-const JQUERY_NO_CONFLICT = $.fn[NAME]
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`
+const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`
+const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`
+const EVENT_FOCUSIN = `focusin${EVENT_KEY}`
+const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`
const EVENT_HIDE = `hide${EVENT_KEY}`
const EVENT_HIDDEN = `hidden${EVENT_KEY}`
const EVENT_SHOW = `show${EVENT_KEY}`
@@ -40,10 +49,10 @@ const DefaultType = {
const Default = {
animation: true,
autohide: true,
- delay: 500
+ delay: 5000
}
-const SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]'
+const SELECTOR_DATA_DISMISS = '[data-bs-dismiss="toast"]'
/**
* ------------------------------------------------------------------------
@@ -51,20 +60,19 @@ const SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]'
* ------------------------------------------------------------------------
*/
-class Toast {
+class Toast extends BaseComponent {
constructor(element, config) {
- this._element = element
+ super(element)
+
this._config = this._getConfig(config)
this._timeout = null
+ this._hasMouseInteraction = false
+ this._hasKeyboardInteraction = false
this._setListeners()
}
// Getters
- static get VERSION() {
- return VERSION
- }
-
static get DefaultType() {
return DefaultType
}
@@ -73,13 +81,16 @@ class Toast {
return Default
}
+ static get NAME() {
+ return NAME
+ }
+
// Public
show() {
- const showEvent = $.Event(EVENT_SHOW)
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW)
- $(this._element).trigger(showEvent)
- if (showEvent.isDefaultPrevented()) {
+ if (showEvent.defaultPrevented) {
return
}
@@ -93,27 +104,16 @@ class Toast {
this._element.classList.remove(CLASS_NAME_SHOWING)
this._element.classList.add(CLASS_NAME_SHOW)
- $(this._element).trigger(EVENT_SHOWN)
+ EventHandler.trigger(this._element, EVENT_SHOWN)
- if (this._config.autohide) {
- this._timeout = setTimeout(() => {
- this.hide()
- }, this._config.delay)
- }
+ this._maybeScheduleHide()
}
this._element.classList.remove(CLASS_NAME_HIDE)
- Util.reflow(this._element)
+ reflow(this._element)
this._element.classList.add(CLASS_NAME_SHOWING)
- if (this._config.animation) {
- const transitionDuration = Util.getTransitionDurationFromElement(this._element)
- $(this._element)
- .one(Util.TRANSITION_END, complete)
- .emulateTransitionEnd(transitionDuration)
- } else {
- complete()
- }
+ this._queueCallback(complete, this._element, this._config.animation)
}
hide() {
@@ -121,14 +121,19 @@ class Toast {
return
}
- const hideEvent = $.Event(EVENT_HIDE)
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)
- $(this._element).trigger(hideEvent)
- if (hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
return
}
- this._close()
+ const complete = () => {
+ this._element.classList.add(CLASS_NAME_HIDE)
+ EventHandler.trigger(this._element, EVENT_HIDDEN)
+ }
+
+ this._element.classList.remove(CLASS_NAME_SHOW)
+ this._queueCallback(complete, this._element, this._config.animation)
}
dispose() {
@@ -138,11 +143,7 @@ class Toast {
this._element.classList.remove(CLASS_NAME_SHOW)
}
- $(this._element).off(EVENT_CLICK_DISMISS)
-
- $.removeData(this._element, DATA_KEY)
- this._element = null
- this._config = null
+ super.dispose()
}
// Private
@@ -150,39 +151,62 @@ class Toast {
_getConfig(config) {
config = {
...Default,
- ...$(this._element).data(),
+ ...Manipulator.getDataAttributes(this._element),
...(typeof config === 'object' && config ? config : {})
}
- Util.typeCheckConfig(
- NAME,
- config,
- this.constructor.DefaultType
- )
+ typeCheckConfig(NAME, config, this.constructor.DefaultType)
return config
}
- _setListeners() {
- $(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide())
+ _maybeScheduleHide() {
+ if (!this._config.autohide) {
+ return
+ }
+
+ if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
+ return
+ }
+
+ this._timeout = setTimeout(() => {
+ this.hide()
+ }, this._config.delay)
}
- _close() {
- const complete = () => {
- this._element.classList.add(CLASS_NAME_HIDE)
- $(this._element).trigger(EVENT_HIDDEN)
+ _onInteraction(event, isInteracting) {
+ switch (event.type) {
+ case 'mouseover':
+ case 'mouseout':
+ this._hasMouseInteraction = isInteracting
+ break
+ case 'focusin':
+ case 'focusout':
+ this._hasKeyboardInteraction = isInteracting
+ break
+ default:
+ break
}
- this._element.classList.remove(CLASS_NAME_SHOW)
- if (this._config.animation) {
- const transitionDuration = Util.getTransitionDurationFromElement(this._element)
+ if (isInteracting) {
+ this._clearTimeout()
+ return
+ }
- $(this._element)
- .one(Util.TRANSITION_END, complete)
- .emulateTransitionEnd(transitionDuration)
- } else {
- complete()
+ const nextElement = event.relatedTarget
+ if (this._element === nextElement || this._element.contains(nextElement)) {
+ return
}
+
+ this._maybeScheduleHide()
+ }
+
+ _setListeners() {
+ EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide())
+ EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true))
+ EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false))
+ EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true))
+ EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false))
}
_clearTimeout() {
@@ -192,15 +216,13 @@ class Toast {
// Static
- static _jQueryInterface(config) {
+ static jQueryInterface(config) {
return this.each(function () {
- const $element = $(this)
- let data = $element.data(DATA_KEY)
+ let data = Data.get(this, DATA_KEY)
const _config = typeof config === 'object' && config
if (!data) {
data = new Toast(this, _config)
- $element.data(DATA_KEY, data)
}
if (typeof config === 'string') {
@@ -218,13 +240,9 @@ class Toast {
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Toast to jQuery only if jQuery is present
*/
-$.fn[NAME] = Toast._jQueryInterface
-$.fn[NAME].Constructor = Toast
-$.fn[NAME].noConflict = () => {
- $.fn[NAME] = JQUERY_NO_CONFLICT
- return Toast._jQueryInterface
-}
+defineJQueryPlugin(Toast)
export default Toast
diff --git a/vendor/twbs/bootstrap/js/src/tools/sanitizer.js b/vendor/twbs/bootstrap/js/src/tools/sanitizer.js
deleted file mode 100644
index 45fd6106c..000000000
--- a/vendor/twbs/bootstrap/js/src/tools/sanitizer.js
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): tools/sanitizer.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
- * --------------------------------------------------------------------------
- */
-
-const uriAttrs = [
- 'background',
- 'cite',
- 'href',
- 'itemtype',
- 'longdesc',
- 'poster',
- 'src',
- 'xlink:href'
-]
-
-const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i
-
-export const DefaultWhitelist = {
- // Global attributes allowed on any supplied element below.
- '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
- a: ['target', 'href', 'title', 'rel'],
- area: [],
- b: [],
- br: [],
- col: [],
- code: [],
- div: [],
- em: [],
- hr: [],
- h1: [],
- h2: [],
- h3: [],
- h4: [],
- h5: [],
- h6: [],
- i: [],
- img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
- li: [],
- ol: [],
- p: [],
- pre: [],
- s: [],
- small: [],
- span: [],
- sub: [],
- sup: [],
- strong: [],
- u: [],
- ul: []
-}
-
-/**
- * A pattern that recognizes a commonly useful subset of URLs that are safe.
- *
- * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
- */
-const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi
-
-/**
- * A pattern that matches safe data URLs. Only matches image, video and audio types.
- *
- * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
- */
-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
-
-function allowedAttribute(attr, allowedAttributeList) {
- const attrName = attr.nodeName.toLowerCase()
-
- if (allowedAttributeList.indexOf(attrName) !== -1) {
- if (uriAttrs.indexOf(attrName) !== -1) {
- return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))
- }
-
- return true
- }
-
- const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp)
-
- // Check if a regular expression validates the attribute.
- for (let i = 0, len = regExp.length; i < len; i++) {
- if (attrName.match(regExp[i])) {
- return true
- }
- }
-
- return false
-}
-
-export function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
- if (unsafeHtml.length === 0) {
- return unsafeHtml
- }
-
- if (sanitizeFn && typeof sanitizeFn === 'function') {
- return sanitizeFn(unsafeHtml)
- }
-
- const domParser = new window.DOMParser()
- const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html')
- const whitelistKeys = Object.keys(whiteList)
- const elements = [].slice.call(createdDocument.body.querySelectorAll('*'))
-
- for (let i = 0, len = elements.length; i < len; i++) {
- const el = elements[i]
- const elName = el.nodeName.toLowerCase()
-
- if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
- el.parentNode.removeChild(el)
-
- continue
- }
-
- const attributeList = [].slice.call(el.attributes)
- const whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])
-
- attributeList.forEach(attr => {
- if (!allowedAttribute(attr, whitelistedAttributes)) {
- el.removeAttribute(attr.nodeName)
- }
- })
- }
-
- return createdDocument.body.innerHTML
-}
diff --git a/vendor/twbs/bootstrap/js/src/tooltip.js b/vendor/twbs/bootstrap/js/src/tooltip.js
index fd6ceea67..d164da2b3 100644
--- a/vendor/twbs/bootstrap/js/src/tooltip.js
+++ b/vendor/twbs/bootstrap/js/src/tooltip.js
@@ -1,17 +1,31 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): tooltip.js
+ * Bootstrap (v5.0.1): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
+import * as Popper from '@popperjs/core'
+
+import {
+ defineJQueryPlugin,
+ findShadowRoot,
+ getElement,
+ getUID,
+ isElement,
+ isRTL,
+ noop,
+ typeCheckConfig
+} from './util/index'
import {
- DefaultWhitelist,
+ DefaultAllowlist,
sanitizeHtml
-} from './tools/sanitizer'
-import $ from 'jquery'
-import Popper from 'popper.js'
-import Util from './util'
+} from './util/sanitizer'
+import Data from './dom/data'
+import EventHandler from './dom/event-handler'
+import Manipulator from './dom/manipulator'
+import SelectorEngine from './dom/selector-engine'
+import BaseComponent from './base-component'
/**
* ------------------------------------------------------------------------
@@ -20,13 +34,11 @@ import Util from './util'
*/
const NAME = 'tooltip'
-const VERSION = '4.6.0'
const DATA_KEY = 'bs.tooltip'
const EVENT_KEY = `.${DATA_KEY}`
-const JQUERY_NO_CONFLICT = $.fn[NAME]
const CLASS_PREFIX = 'bs-tooltip'
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g')
-const DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']
+const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn'])
const DefaultType = {
animation: 'boolean',
@@ -37,50 +49,48 @@ const DefaultType = {
html: 'boolean',
selector: '(string|boolean)',
placement: '(string|function)',
- offset: '(number|string|function)',
+ offset: '(array|string|function)',
container: '(string|element|boolean)',
- fallbackPlacement: '(string|array)',
+ fallbackPlacements: 'array',
boundary: '(string|element)',
customClass: '(string|function)',
sanitize: 'boolean',
sanitizeFn: '(null|function)',
- whiteList: 'object',
- popperConfig: '(null|object)'
+ allowList: 'object',
+ popperConfig: '(null|object|function)'
}
const AttachmentMap = {
AUTO: 'auto',
TOP: 'top',
- RIGHT: 'right',
+ RIGHT: isRTL() ? 'left' : 'right',
BOTTOM: 'bottom',
- LEFT: 'left'
+ LEFT: isRTL() ? 'right' : 'left'
}
const Default = {
animation: true,
template: '<div class="tooltip" role="tooltip">' +
- '<div class="arrow"></div>' +
- '<div class="tooltip-inner"></div></div>',
+ '<div class="tooltip-arrow"></div>' +
+ '<div class="tooltip-inner"></div>' +
+ '</div>',
trigger: 'hover focus',
title: '',
delay: 0,
html: false,
selector: false,
placement: 'top',
- offset: 0,
+ offset: [0, 0],
container: false,
- fallbackPlacement: 'flip',
- boundary: 'scrollParent',
+ fallbackPlacements: ['top', 'right', 'bottom', 'left'],
+ boundary: 'clippingParents',
customClass: '',
sanitize: true,
sanitizeFn: null,
- whiteList: DefaultWhitelist,
+ allowList: DefaultAllowlist,
popperConfig: null
}
-const HOVER_STATE_SHOW = 'show'
-const HOVER_STATE_OUT = 'out'
-
const Event = {
HIDE: `hide${EVENT_KEY}`,
HIDDEN: `hidden${EVENT_KEY}`,
@@ -95,10 +105,13 @@ const Event = {
}
const CLASS_NAME_FADE = 'fade'
+const CLASS_NAME_MODAL = 'modal'
const CLASS_NAME_SHOW = 'show'
+const HOVER_STATE_SHOW = 'show'
+const HOVER_STATE_OUT = 'out'
+
const SELECTOR_TOOLTIP_INNER = '.tooltip-inner'
-const SELECTOR_ARROW = '.arrow'
const TRIGGER_HOVER = 'hover'
const TRIGGER_FOCUS = 'focus'
@@ -111,12 +124,14 @@ const TRIGGER_MANUAL = 'manual'
* ------------------------------------------------------------------------
*/
-class Tooltip {
+class Tooltip extends BaseComponent {
constructor(element, config) {
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)')
}
+ super(element)
+
// private
this._isEnabled = true
this._timeout = 0
@@ -125,8 +140,7 @@ class Tooltip {
this._popper = null
// Protected
- this.element = element
- this.config = this._getConfig(config)
+ this._config = this._getConfig(config)
this.tip = null
this._setListeners()
@@ -134,10 +148,6 @@ class Tooltip {
// Getters
- static get VERSION() {
- return VERSION
- }
-
static get Default() {
return Default
}
@@ -146,18 +156,10 @@ class Tooltip {
return NAME
}
- static get DATA_KEY() {
- return DATA_KEY
- }
-
static get Event() {
return Event
}
- static get EVENT_KEY() {
- return EVENT_KEY
- }
-
static get DefaultType() {
return DefaultType
}
@@ -182,16 +184,7 @@ class Tooltip {
}
if (event) {
- const dataKey = this.constructor.DATA_KEY
- let context = $(event.currentTarget).data(dataKey)
-
- if (!context) {
- context = new this.constructor(
- event.currentTarget,
- this._getDelegateConfig()
- )
- $(event.currentTarget).data(dataKey, context)
- }
+ const context = this._initializeOnDelegatedTarget(event)
context._activeTrigger.click = !context._activeTrigger.click
@@ -201,7 +194,7 @@ class Tooltip {
context._leave(null, context)
}
} else {
- if ($(this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {
+ if (this.getTipElement().classList.contains(CLASS_NAME_SHOW)) {
this._leave(null, this)
return
}
@@ -213,170 +206,154 @@ class Tooltip {
dispose() {
clearTimeout(this._timeout)
- $.removeData(this.element, this.constructor.DATA_KEY)
+ EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler)
- $(this.element).off(this.constructor.EVENT_KEY)
- $(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler)
-
- if (this.tip) {
- $(this.tip).remove()
+ if (this.tip && this.tip.parentNode) {
+ this.tip.parentNode.removeChild(this.tip)
}
- this._isEnabled = null
- this._timeout = null
- this._hoverState = null
- this._activeTrigger = null
if (this._popper) {
this._popper.destroy()
}
- this._popper = null
- this.element = null
- this.config = null
- this.tip = null
+ super.dispose()
}
show() {
- if ($(this.element).css('display') === 'none') {
+ if (this._element.style.display === 'none') {
throw new Error('Please use show on visible elements')
}
- const showEvent = $.Event(this.constructor.Event.SHOW)
- if (this.isWithContent() && this._isEnabled) {
- $(this.element).trigger(showEvent)
-
- const shadowRoot = Util.findShadowRoot(this.element)
- const isInTheDom = $.contains(
- shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement,
- this.element
- )
+ if (!(this.isWithContent() && this._isEnabled)) {
+ return
+ }
- if (showEvent.isDefaultPrevented() || !isInTheDom) {
- return
- }
+ const showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW)
+ const shadowRoot = findShadowRoot(this._element)
+ const isInTheDom = shadowRoot === null ?
+ this._element.ownerDocument.documentElement.contains(this._element) :
+ shadowRoot.contains(this._element)
- const tip = this.getTipElement()
- const tipId = Util.getUID(this.constructor.NAME)
+ if (showEvent.defaultPrevented || !isInTheDom) {
+ return
+ }
- tip.setAttribute('id', tipId)
- this.element.setAttribute('aria-describedby', tipId)
+ const tip = this.getTipElement()
+ const tipId = getUID(this.constructor.NAME)
- this.setContent()
+ tip.setAttribute('id', tipId)
+ this._element.setAttribute('aria-describedby', tipId)
- if (this.config.animation) {
- $(tip).addClass(CLASS_NAME_FADE)
- }
+ this.setContent()
- const placement = typeof this.config.placement === 'function' ?
- this.config.placement.call(this, tip, this.element) :
- this.config.placement
+ if (this._config.animation) {
+ tip.classList.add(CLASS_NAME_FADE)
+ }
- const attachment = this._getAttachment(placement)
- this.addAttachmentClass(attachment)
+ const placement = typeof this._config.placement === 'function' ?
+ this._config.placement.call(this, tip, this._element) :
+ this._config.placement
- const container = this._getContainer()
- $(tip).data(this.constructor.DATA_KEY, this)
+ const attachment = this._getAttachment(placement)
+ this._addAttachmentClass(attachment)
- if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
- $(tip).appendTo(container)
- }
+ const { container } = this._config
+ Data.set(tip, this.constructor.DATA_KEY, this)
- $(this.element).trigger(this.constructor.Event.INSERTED)
+ if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
+ container.appendChild(tip)
+ EventHandler.trigger(this._element, this.constructor.Event.INSERTED)
+ }
- this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment))
+ if (this._popper) {
+ this._popper.update()
+ } else {
+ this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment))
+ }
- $(tip).addClass(CLASS_NAME_SHOW)
- $(tip).addClass(this.config.customClass)
+ tip.classList.add(CLASS_NAME_SHOW)
- // If this is a touch-enabled device we add extra
- // empty mouseover listeners to the body's immediate children;
- // only needed because of broken event delegation on iOS
- // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
- if ('ontouchstart' in document.documentElement) {
- $(document.body).children().on('mouseover', null, $.noop)
- }
+ const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass
+ if (customClass) {
+ tip.classList.add(...customClass.split(' '))
+ }
- const complete = () => {
- if (this.config.animation) {
- this._fixTransition()
- }
+ // If this is a touch-enabled device we add extra
+ // empty mouseover listeners to the body's immediate children;
+ // only needed because of broken event delegation on iOS
+ // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
+ if ('ontouchstart' in document.documentElement) {
+ [].concat(...document.body.children).forEach(element => {
+ EventHandler.on(element, 'mouseover', noop)
+ })
+ }
- const prevHoverState = this._hoverState
- this._hoverState = null
+ const complete = () => {
+ const prevHoverState = this._hoverState
- $(this.element).trigger(this.constructor.Event.SHOWN)
+ this._hoverState = null
+ EventHandler.trigger(this._element, this.constructor.Event.SHOWN)
- if (prevHoverState === HOVER_STATE_OUT) {
- this._leave(null, this)
- }
+ if (prevHoverState === HOVER_STATE_OUT) {
+ this._leave(null, this)
}
+ }
- if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
- const transitionDuration = Util.getTransitionDurationFromElement(this.tip)
+ const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE)
+ this._queueCallback(complete, this.tip, isAnimated)
+ }
- $(this.tip)
- .one(Util.TRANSITION_END, complete)
- .emulateTransitionEnd(transitionDuration)
- } else {
- complete()
- }
+ hide() {
+ if (!this._popper) {
+ return
}
- }
- hide(callback) {
const tip = this.getTipElement()
- const hideEvent = $.Event(this.constructor.Event.HIDE)
const complete = () => {
+ if (this._isWithActiveTrigger()) {
+ return
+ }
+
if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
tip.parentNode.removeChild(tip)
}
this._cleanTipClass()
- this.element.removeAttribute('aria-describedby')
- $(this.element).trigger(this.constructor.Event.HIDDEN)
- if (this._popper !== null) {
- this._popper.destroy()
- }
+ this._element.removeAttribute('aria-describedby')
+ EventHandler.trigger(this._element, this.constructor.Event.HIDDEN)
- if (callback) {
- callback()
+ if (this._popper) {
+ this._popper.destroy()
+ this._popper = null
}
}
- $(this.element).trigger(hideEvent)
-
- if (hideEvent.isDefaultPrevented()) {
+ const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE)
+ if (hideEvent.defaultPrevented) {
return
}
- $(tip).removeClass(CLASS_NAME_SHOW)
+ tip.classList.remove(CLASS_NAME_SHOW)
// If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) {
- $(document.body).children().off('mouseover', null, $.noop)
+ [].concat(...document.body.children)
+ .forEach(element => EventHandler.off(element, 'mouseover', noop))
}
this._activeTrigger[TRIGGER_CLICK] = false
this._activeTrigger[TRIGGER_FOCUS] = false
this._activeTrigger[TRIGGER_HOVER] = false
- if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
- const transitionDuration = Util.getTransitionDurationFromElement(tip)
-
- $(tip)
- .one(Util.TRANSITION_END, complete)
- .emulateTransitionEnd(transitionDuration)
- } else {
- complete()
- }
-
+ const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE)
+ this._queueCallback(complete, this.tip, isAnimated)
this._hoverState = ''
}
update() {
if (this._popper !== null) {
- this._popper.scheduleUpdate()
+ this._popper.update()
}
}
@@ -386,118 +363,158 @@ class Tooltip {
return Boolean(this.getTitle())
}
- addAttachmentClass(attachment) {
- $(this.getTipElement()).addClass(`${CLASS_PREFIX}-${attachment}`)
- }
-
getTipElement() {
- this.tip = this.tip || $(this.config.template)[0]
+ if (this.tip) {
+ return this.tip
+ }
+
+ const element = document.createElement('div')
+ element.innerHTML = this._config.template
+
+ this.tip = element.children[0]
return this.tip
}
setContent() {
const tip = this.getTipElement()
- this.setElementContent($(tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle())
- $(tip).removeClass(`${CLASS_NAME_FADE} ${CLASS_NAME_SHOW}`)
+ this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle())
+ tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)
}
- setElementContent($element, content) {
- if (typeof content === 'object' && (content.nodeType || content.jquery)) {
- // Content is a DOM node or a jQuery
- if (this.config.html) {
- if (!$(content).parent().is($element)) {
- $element.empty().append(content)
+ setElementContent(element, content) {
+ if (element === null) {
+ return
+ }
+
+ if (isElement(content)) {
+ content = getElement(content)
+
+ // content is a DOM node or a jQuery
+ if (this._config.html) {
+ if (content.parentNode !== element) {
+ element.innerHTML = ''
+ element.appendChild(content)
}
} else {
- $element.text($(content).text())
+ element.textContent = content.textContent
}
return
}
- if (this.config.html) {
- if (this.config.sanitize) {
- content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn)
+ if (this._config.html) {
+ if (this._config.sanitize) {
+ content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn)
}
- $element.html(content)
+ element.innerHTML = content
} else {
- $element.text(content)
+ element.textContent = content
}
}
getTitle() {
- let title = this.element.getAttribute('data-original-title')
+ let title = this._element.getAttribute('data-bs-original-title')
if (!title) {
- title = typeof this.config.title === 'function' ?
- this.config.title.call(this.element) :
- this.config.title
+ title = typeof this._config.title === 'function' ?
+ this._config.title.call(this._element) :
+ this._config.title
}
return title
}
- // Private
+ updateAttachment(attachment) {
+ if (attachment === 'right') {
+ return 'end'
+ }
- _getPopperConfig(attachment) {
- const defaultBsConfig = {
- placement: attachment,
- modifiers: {
- offset: this._getOffset(),
- flip: {
- behavior: this.config.fallbackPlacement
- },
- arrow: {
- element: SELECTOR_ARROW
- },
- preventOverflow: {
- boundariesElement: this.config.boundary
- }
- },
- onCreate: data => {
- if (data.originalPlacement !== data.placement) {
- this._handlePopperPlacementChange(data)
- }
- },
- onUpdate: data => this._handlePopperPlacementChange(data)
+ if (attachment === 'left') {
+ return 'start'
}
- return {
- ...defaultBsConfig,
- ...this.config.popperConfig
+ return attachment
+ }
+
+ // Private
+
+ _initializeOnDelegatedTarget(event, context) {
+ const dataKey = this.constructor.DATA_KEY
+ context = context || Data.get(event.delegateTarget, dataKey)
+
+ if (!context) {
+ context = new this.constructor(event.delegateTarget, this._getDelegateConfig())
+ Data.set(event.delegateTarget, dataKey, context)
}
+
+ return context
}
_getOffset() {
- const offset = {}
+ const { offset } = this._config
- if (typeof this.config.offset === 'function') {
- offset.fn = data => {
- data.offsets = {
- ...data.offsets,
- ...(this.config.offset(data.offsets, this.element) || {})
- }
+ if (typeof offset === 'string') {
+ return offset.split(',').map(val => Number.parseInt(val, 10))
+ }
- return data
- }
- } else {
- offset.offset = this.config.offset
+ if (typeof offset === 'function') {
+ return popperData => offset(popperData, this._element)
}
return offset
}
- _getContainer() {
- if (this.config.container === false) {
- return document.body
+ _getPopperConfig(attachment) {
+ const defaultBsPopperConfig = {
+ placement: attachment,
+ modifiers: [
+ {
+ name: 'flip',
+ options: {
+ fallbackPlacements: this._config.fallbackPlacements
+ }
+ },
+ {
+ name: 'offset',
+ options: {
+ offset: this._getOffset()
+ }
+ },
+ {
+ name: 'preventOverflow',
+ options: {
+ boundary: this._config.boundary
+ }
+ },
+ {
+ name: 'arrow',
+ options: {
+ element: `.${this.constructor.NAME}-arrow`
+ }
+ },
+ {
+ name: 'onChange',
+ enabled: true,
+ phase: 'afterWrite',
+ fn: data => this._handlePopperPlacementChange(data)
+ }
+ ],
+ onFirstUpdate: data => {
+ if (data.options.placement !== data.placement) {
+ this._handlePopperPlacementChange(data)
+ }
+ }
}
- if (Util.isElement(this.config.container)) {
- return $(this.config.container)
+ return {
+ ...defaultBsPopperConfig,
+ ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
}
+ }
- return $(document).find(this.config.container)
+ _addAttachmentClass(attachment) {
+ this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`)
}
_getAttachment(placement) {
@@ -505,15 +522,11 @@ class Tooltip {
}
_setListeners() {
- const triggers = this.config.trigger.split(' ')
+ const triggers = this._config.trigger.split(' ')
triggers.forEach(trigger => {
if (trigger === 'click') {
- $(this.element).on(
- this.constructor.Event.CLICK,
- this.config.selector,
- event => this.toggle(event)
- )
+ EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event))
} else if (trigger !== TRIGGER_MANUAL) {
const eventIn = trigger === TRIGGER_HOVER ?
this.constructor.Event.MOUSEENTER :
@@ -522,23 +535,22 @@ class Tooltip {
this.constructor.Event.MOUSELEAVE :
this.constructor.Event.FOCUSOUT
- $(this.element)
- .on(eventIn, this.config.selector, event => this._enter(event))
- .on(eventOut, this.config.selector, event => this._leave(event))
+ EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event))
+ EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event))
}
})
this._hideModalHandler = () => {
- if (this.element) {
+ if (this._element) {
this.hide()
}
}
- $(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler)
+ EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler)
- if (this.config.selector) {
- this.config = {
- ...this.config,
+ if (this._config.selector) {
+ this._config = {
+ ...this._config,
trigger: 'manual',
selector: ''
}
@@ -548,29 +560,21 @@ class Tooltip {
}
_fixTitle() {
- const titleType = typeof this.element.getAttribute('data-original-title')
+ const title = this._element.getAttribute('title')
+ const originalTitleType = typeof this._element.getAttribute('data-bs-original-title')
- if (this.element.getAttribute('title') || titleType !== 'string') {
- this.element.setAttribute(
- 'data-original-title',
- this.element.getAttribute('title') || ''
- )
+ if (title || originalTitleType !== 'string') {
+ this._element.setAttribute('data-bs-original-title', title || '')
+ if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {
+ this._element.setAttribute('aria-label', title)
+ }
- this.element.setAttribute('title', '')
+ this._element.setAttribute('title', '')
}
}
_enter(event, context) {
- const dataKey = this.constructor.DATA_KEY
- context = context || $(event.currentTarget).data(dataKey)
-
- if (!context) {
- context = new this.constructor(
- event.currentTarget,
- this._getDelegateConfig()
- )
- $(event.currentTarget).data(dataKey, context)
- }
+ context = this._initializeOnDelegatedTarget(event, context)
if (event) {
context._activeTrigger[
@@ -578,7 +582,7 @@ class Tooltip {
] = true
}
- if ($(context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
+ if (context.getTipElement().classList.contains(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
context._hoverState = HOVER_STATE_SHOW
return
}
@@ -587,7 +591,7 @@ class Tooltip {
context._hoverState = HOVER_STATE_SHOW
- if (!context.config.delay || !context.config.delay.show) {
+ if (!context._config.delay || !context._config.delay.show) {
context.show()
return
}
@@ -596,25 +600,16 @@ class Tooltip {
if (context._hoverState === HOVER_STATE_SHOW) {
context.show()
}
- }, context.config.delay.show)
+ }, context._config.delay.show)
}
_leave(event, context) {
- const dataKey = this.constructor.DATA_KEY
- context = context || $(event.currentTarget).data(dataKey)
-
- if (!context) {
- context = new this.constructor(
- event.currentTarget,
- this._getDelegateConfig()
- )
- $(event.currentTarget).data(dataKey, context)
- }
+ context = this._initializeOnDelegatedTarget(event, context)
if (event) {
context._activeTrigger[
event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER
- ] = false
+ ] = context._element.contains(event.relatedTarget)
}
if (context._isWithActiveTrigger()) {
@@ -625,7 +620,7 @@ class Tooltip {
context._hoverState = HOVER_STATE_OUT
- if (!context.config.delay || !context.config.delay.hide) {
+ if (!context._config.delay || !context._config.delay.hide) {
context.hide()
return
}
@@ -634,7 +629,7 @@ class Tooltip {
if (context._hoverState === HOVER_STATE_OUT) {
context.hide()
}
- }, context.config.delay.hide)
+ }, context._config.delay.hide)
}
_isWithActiveTrigger() {
@@ -648,14 +643,13 @@ class Tooltip {
}
_getConfig(config) {
- const dataAttributes = $(this.element).data()
+ const dataAttributes = Manipulator.getDataAttributes(this._element)
- Object.keys(dataAttributes)
- .forEach(dataAttr => {
- if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
- delete dataAttributes[dataAttr]
- }
- })
+ Object.keys(dataAttributes).forEach(dataAttr => {
+ if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {
+ delete dataAttributes[dataAttr]
+ }
+ })
config = {
...this.constructor.Default,
@@ -663,6 +657,8 @@ class Tooltip {
...(typeof config === 'object' && config ? config : {})
}
+ config.container = config.container === false ? document.body : getElement(config.container)
+
if (typeof config.delay === 'number') {
config.delay = {
show: config.delay,
@@ -678,14 +674,10 @@ class Tooltip {
config.content = config.content.toString()
}
- Util.typeCheckConfig(
- NAME,
- config,
- this.constructor.DefaultType
- )
+ typeCheckConfig(NAME, config, this.constructor.DefaultType)
if (config.sanitize) {
- config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn)
+ config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn)
}
return config
@@ -694,10 +686,10 @@ class Tooltip {
_getDelegateConfig() {
const config = {}
- if (this.config) {
- for (const key in this.config) {
- if (this.constructor.Default[key] !== this.config[key]) {
- config[key] = this.config[key]
+ if (this._config) {
+ for (const key in this._config) {
+ if (this.constructor.Default[key] !== this._config[key]) {
+ config[key] = this._config[key]
}
}
}
@@ -706,40 +698,31 @@ class Tooltip {
}
_cleanTipClass() {
- const $tip = $(this.getTipElement())
- const tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX)
- if (tabClass !== null && tabClass.length) {
- $tip.removeClass(tabClass.join(''))
+ const tip = this.getTipElement()
+ const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX)
+ if (tabClass !== null && tabClass.length > 0) {
+ tabClass.map(token => token.trim())
+ .forEach(tClass => tip.classList.remove(tClass))
}
}
_handlePopperPlacementChange(popperData) {
- this.tip = popperData.instance.popper
- this._cleanTipClass()
- this.addAttachmentClass(this._getAttachment(popperData.placement))
- }
+ const { state } = popperData
- _fixTransition() {
- const tip = this.getTipElement()
- const initConfigAnimation = this.config.animation
-
- if (tip.getAttribute('x-placement') !== null) {
+ if (!state) {
return
}
- $(tip).removeClass(CLASS_NAME_FADE)
- this.config.animation = false
- this.hide()
- this.show()
- this.config.animation = initConfigAnimation
+ this.tip = state.elements.popper
+ this._cleanTipClass()
+ this._addAttachmentClass(this._getAttachment(state.placement))
}
// Static
- static _jQueryInterface(config) {
+ static jQueryInterface(config) {
return this.each(function () {
- const $element = $(this)
- let data = $element.data(DATA_KEY)
+ let data = Data.get(this, DATA_KEY)
const _config = typeof config === 'object' && config
if (!data && /dispose|hide/.test(config)) {
@@ -748,7 +731,6 @@ class Tooltip {
if (!data) {
data = new Tooltip(this, _config)
- $element.data(DATA_KEY, data)
}
if (typeof config === 'string') {
@@ -766,13 +748,9 @@ class Tooltip {
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .Tooltip to jQuery only if jQuery is present
*/
-$.fn[NAME] = Tooltip._jQueryInterface
-$.fn[NAME].Constructor = Tooltip
-$.fn[NAME].noConflict = () => {
- $.fn[NAME] = JQUERY_NO_CONFLICT
- return Tooltip._jQueryInterface
-}
+defineJQueryPlugin(Tooltip)
export default Tooltip
diff --git a/vendor/twbs/bootstrap/js/src/util.js b/vendor/twbs/bootstrap/js/src/util.js
deleted file mode 100644
index cd9d5e3b8..000000000
--- a/vendor/twbs/bootstrap/js/src/util.js
+++ /dev/null
@@ -1,198 +0,0 @@
-/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.6.0): util.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
- * --------------------------------------------------------------------------
- */
-
-import $ from 'jquery'
-
-/**
- * ------------------------------------------------------------------------
- * Private TransitionEnd Helpers
- * ------------------------------------------------------------------------
- */
-
-const TRANSITION_END = 'transitionend'
-const MAX_UID = 1000000
-const MILLISECONDS_MULTIPLIER = 1000
-
-// Shoutout AngusCroll (https://goo.gl/pxwQGp)
-function toType(obj) {
- if (obj === null || typeof obj === 'undefined') {
- return `${obj}`
- }
-
- return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase()
-}
-
-function getSpecialTransitionEndEvent() {
- return {
- bindType: TRANSITION_END,
- delegateType: TRANSITION_END,
- handle(event) {
- if ($(event.target).is(this)) {
- return event.handleObj.handler.apply(this, arguments) // eslint-disable-line prefer-rest-params
- }
-
- return undefined
- }
- }
-}
-
-function transitionEndEmulator(duration) {
- let called = false
-
- $(this).one(Util.TRANSITION_END, () => {
- called = true
- })
-
- setTimeout(() => {
- if (!called) {
- Util.triggerTransitionEnd(this)
- }
- }, duration)
-
- return this
-}
-
-function setTransitionEndSupport() {
- $.fn.emulateTransitionEnd = transitionEndEmulator
- $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent()
-}
-
-/**
- * --------------------------------------------------------------------------
- * Public Util Api
- * --------------------------------------------------------------------------
- */
-
-const Util = {
- TRANSITION_END: 'bsTransitionEnd',
-
- getUID(prefix) {
- do {
- prefix += ~~(Math.random() * MAX_UID) // "~~" acts like a faster Math.floor() here
- } while (document.getElementById(prefix))
-
- return prefix
- },
-
- getSelectorFromElement(element) {
- let selector = element.getAttribute('data-target')
-
- if (!selector || selector === '#') {
- const hrefAttr = element.getAttribute('href')
- selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : ''
- }
-
- try {
- return document.querySelector(selector) ? selector : null
- } catch (_) {
- return null
- }
- },
-
- getTransitionDurationFromElement(element) {
- if (!element) {
- return 0
- }
-
- // Get transition-duration of the element
- let transitionDuration = $(element).css('transition-duration')
- let transitionDelay = $(element).css('transition-delay')
-
- const floatTransitionDuration = parseFloat(transitionDuration)
- const floatTransitionDelay = parseFloat(transitionDelay)
-
- // Return 0 if element or transition duration is not found
- if (!floatTransitionDuration && !floatTransitionDelay) {
- return 0
- }
-
- // If multiple durations are defined, take the first
- transitionDuration = transitionDuration.split(',')[0]
- transitionDelay = transitionDelay.split(',')[0]
-
- return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER
- },
-
- reflow(element) {
- return element.offsetHeight
- },
-
- triggerTransitionEnd(element) {
- $(element).trigger(TRANSITION_END)
- },
-
- supportsTransitionEnd() {
- return Boolean(TRANSITION_END)
- },
-
- isElement(obj) {
- return (obj[0] || obj).nodeType
- },
-
- typeCheckConfig(componentName, config, configTypes) {
- for (const property in configTypes) {
- if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
- const expectedTypes = configTypes[property]
- const value = config[property]
- const valueType = value && Util.isElement(value) ?
- 'element' : toType(value)
-
- if (!new RegExp(expectedTypes).test(valueType)) {
- throw new Error(
- `${componentName.toUpperCase()}: ` +
- `Option "${property}" provided type "${valueType}" ` +
- `but expected type "${expectedTypes}".`)
- }
- }
- }
- },
-
- findShadowRoot(element) {
- if (!document.documentElement.attachShadow) {
- return null
- }
-
- // Can find the shadow root otherwise it'll return the document
- if (typeof element.getRootNode === 'function') {
- const root = element.getRootNode()
- return root instanceof ShadowRoot ? root : null
- }
-
- if (element instanceof ShadowRoot) {
- return element
- }
-
- // when we don't find a shadow root
- if (!element.parentNode) {
- return null
- }
-
- return Util.findShadowRoot(element.parentNode)
- },
-
- jQueryDetection() {
- if (typeof $ === 'undefined') {
- throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.')
- }
-
- const version = $.fn.jquery.split(' ')[0].split('.')
- const minMajor = 1
- const ltMajor = 2
- const minMinor = 9
- const minPatch = 1
- const maxMajor = 4
-
- if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
- throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
- }
- }
-}
-
-Util.jQueryDetection()
-setTransitionEndSupport()
-
-export default Util