Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Mazovetskiy <glex.spb@gmail.com>2020-08-09 11:11:29 +0300
committerGleb Mazovetskiy <glex.spb@gmail.com>2020-08-09 11:11:29 +0300
commit7a49218515236263500473bae362eecfd8884435 (patch)
tree118d4156ec0ee3b9699964d4e8c28b088a487aff
parent43f87174d8d3a9b473c12fd807511b46bf7b4bd4 (diff)
rake update[a1708ec2a38d331c4c9eacac08ce9c9839649476]
-rw-r--r--assets/javascripts/bootstrap-sprockets.js20
-rw-r--r--assets/javascripts/bootstrap.js3088
-rw-r--r--assets/javascripts/bootstrap.min.js4
-rw-r--r--assets/javascripts/bootstrap/alert.js181
-rw-r--r--assets/javascripts/bootstrap/button.js179
-rw-r--r--assets/javascripts/bootstrap/carousel.js397
-rw-r--r--assets/javascripts/bootstrap/collapse.js391
-rw-r--r--assets/javascripts/bootstrap/dom/data.js81
-rw-r--r--assets/javascripts/bootstrap/dom/event-handler.js311
-rw-r--r--assets/javascripts/bootstrap/dom/manipulator.js100
-rw-r--r--assets/javascripts/bootstrap/dom/polyfill.js110
-rw-r--r--assets/javascripts/bootstrap/dom/selector-engine.js98
-rw-r--r--assets/javascripts/bootstrap/dropdown.js396
-rw-r--r--assets/javascripts/bootstrap/modal.js515
-rw-r--r--assets/javascripts/bootstrap/popover.js113
-rw-r--r--assets/javascripts/bootstrap/scrollspy.js207
-rw-r--r--assets/javascripts/bootstrap/tab.js215
-rw-r--r--assets/javascripts/bootstrap/toast.js228
-rw-r--r--assets/javascripts/bootstrap/tooltip.js491
-rw-r--r--assets/javascripts/bootstrap/util.js192
-rw-r--r--assets/stylesheets/_bootstrap-grid.scss66
-rw-r--r--assets/stylesheets/_bootstrap-reboot.scss5
-rw-r--r--assets/stylesheets/_bootstrap.scss22
-rw-r--r--assets/stylesheets/bootstrap/_alert.scss6
-rw-r--r--assets/stylesheets/bootstrap/_badge.scss29
-rw-r--r--assets/stylesheets/bootstrap/_breadcrumb.scss20
-rw-r--r--assets/stylesheets/bootstrap/_button-group.scss54
-rw-r--r--assets/stylesheets/bootstrap/_buttons.scss72
-rw-r--r--assets/stylesheets/bootstrap/_card.scss82
-rw-r--r--assets/stylesheets/bootstrap/_carousel.scss28
-rw-r--r--assets/stylesheets/bootstrap/_close.scss22
-rw-r--r--assets/stylesheets/bootstrap/_code.scss48
-rw-r--r--assets/stylesheets/bootstrap/_containers.scss41
-rw-r--r--assets/stylesheets/bootstrap/_custom-forms.scss523
-rw-r--r--assets/stylesheets/bootstrap/_dropdown.scss17
-rw-r--r--assets/stylesheets/bootstrap/_forms.scss356
-rw-r--r--assets/stylesheets/bootstrap/_functions.scss102
-rw-r--r--assets/stylesheets/bootstrap/_grid.scss57
-rw-r--r--assets/stylesheets/bootstrap/_helpers.scss7
-rw-r--r--assets/stylesheets/bootstrap/_input-group.scss192
-rw-r--r--assets/stylesheets/bootstrap/_jumbotron.scss17
-rw-r--r--assets/stylesheets/bootstrap/_list-group.scss9
-rw-r--r--assets/stylesheets/bootstrap/_media.scss8
-rw-r--r--assets/stylesheets/bootstrap/_mixins.scss18
-rw-r--r--assets/stylesheets/bootstrap/_modal.scss73
-rw-r--r--assets/stylesheets/bootstrap/_nav.scss16
-rw-r--r--assets/stylesheets/bootstrap/_navbar.scss116
-rw-r--r--assets/stylesheets/bootstrap/_pagination.scss27
-rw-r--r--assets/stylesheets/bootstrap/_popover.scss10
-rw-r--r--assets/stylesheets/bootstrap/_print.scss141
-rw-r--r--assets/stylesheets/bootstrap/_progress.scss6
-rw-r--r--assets/stylesheets/bootstrap/_reboot.scss464
-rw-r--r--assets/stylesheets/bootstrap/_root.scss14
-rw-r--r--assets/stylesheets/bootstrap/_spinners.scss4
-rw-r--r--assets/stylesheets/bootstrap/_tables.scss194
-rw-r--r--assets/stylesheets/bootstrap/_toasts.scss6
-rw-r--r--assets/stylesheets/bootstrap/_tooltip.scss10
-rw-r--r--assets/stylesheets/bootstrap/_transitions.scss1
-rw-r--r--assets/stylesheets/bootstrap/_type.scss97
-rw-r--r--assets/stylesheets/bootstrap/_utilities.scss521
-rw-r--r--assets/stylesheets/bootstrap/_variables.scss968
-rw-r--r--assets/stylesheets/bootstrap/bootstrap-utilities.scss18
-rw-r--r--assets/stylesheets/bootstrap/forms/_form-check.scss142
-rw-r--r--assets/stylesheets/bootstrap/forms/_form-control.scss116
-rw-r--r--assets/stylesheets/bootstrap/forms/_form-file.scss91
-rw-r--r--assets/stylesheets/bootstrap/forms/_form-range.scss136
-rw-r--r--assets/stylesheets/bootstrap/forms/_form-select.scss82
-rw-r--r--assets/stylesheets/bootstrap/forms/_form-text.scss11
-rw-r--r--assets/stylesheets/bootstrap/forms/_input-group.scss140
-rw-r--r--assets/stylesheets/bootstrap/forms/_labels.scss36
-rw-r--r--assets/stylesheets/bootstrap/forms/_validation.scss12
-rw-r--r--assets/stylesheets/bootstrap/helpers/_clearfix.scss (renamed from assets/stylesheets/bootstrap/utilities/_clearfix.scss)0
-rw-r--r--assets/stylesheets/bootstrap/helpers/_colored-links.scss12
-rw-r--r--assets/stylesheets/bootstrap/helpers/_embed.scss31
-rw-r--r--assets/stylesheets/bootstrap/helpers/_position.scss30
-rw-r--r--assets/stylesheets/bootstrap/helpers/_screenreaders.scss8
-rw-r--r--assets/stylesheets/bootstrap/helpers/_stretched-link.scss15
-rw-r--r--assets/stylesheets/bootstrap/helpers/_text-truncation.scss7
-rw-r--r--assets/stylesheets/bootstrap/mixins/_alert.scss4
-rw-r--r--assets/stylesheets/bootstrap/mixins/_background-variant.scss23
-rw-r--r--assets/stylesheets/bootstrap/mixins/_badge.scss17
-rw-r--r--assets/stylesheets/bootstrap/mixins/_breakpoints.scss19
-rw-r--r--assets/stylesheets/bootstrap/mixins/_buttons.scss109
-rw-r--r--assets/stylesheets/bootstrap/mixins/_caret.scss8
-rw-r--r--assets/stylesheets/bootstrap/mixins/_clearfix.scss2
-rw-r--r--assets/stylesheets/bootstrap/mixins/_container.scss9
-rw-r--r--assets/stylesheets/bootstrap/mixins/_float.scss14
-rw-r--r--assets/stylesheets/bootstrap/mixins/_forms.scss89
-rw-r--r--assets/stylesheets/bootstrap/mixins/_gradients.scss20
-rw-r--r--assets/stylesheets/bootstrap/mixins/_grid-framework.scss80
-rw-r--r--assets/stylesheets/bootstrap/mixins/_grid.scss116
-rw-r--r--assets/stylesheets/bootstrap/mixins/_hover.scss37
-rw-r--r--assets/stylesheets/bootstrap/mixins/_image.scss22
-rw-r--r--assets/stylesheets/bootstrap/mixins/_list-group.scss3
-rw-r--r--assets/stylesheets/bootstrap/mixins/_lists.scss2
-rw-r--r--assets/stylesheets/bootstrap/mixins/_nav-divider.scss11
-rw-r--r--assets/stylesheets/bootstrap/mixins/_pagination.scss23
-rw-r--r--assets/stylesheets/bootstrap/mixins/_reset-text.scss4
-rw-r--r--assets/stylesheets/bootstrap/mixins/_screen-reader.scss38
-rw-r--r--assets/stylesheets/bootstrap/mixins/_size.scss7
-rw-r--r--assets/stylesheets/bootstrap/mixins/_table-row.scss39
-rw-r--r--assets/stylesheets/bootstrap/mixins/_table-variants.scss21
-rw-r--r--assets/stylesheets/bootstrap/mixins/_text-emphasis.scss17
-rw-r--r--assets/stylesheets/bootstrap/mixins/_text-hide.scss11
-rw-r--r--assets/stylesheets/bootstrap/mixins/_transition.scss2
-rw-r--r--assets/stylesheets/bootstrap/mixins/_utilities.scss49
-rw-r--r--assets/stylesheets/bootstrap/mixins/_visibility.scss8
-rw-r--r--assets/stylesheets/bootstrap/utilities/_align.scss8
-rw-r--r--assets/stylesheets/bootstrap/utilities/_api.scss47
-rw-r--r--assets/stylesheets/bootstrap/utilities/_background.scss19
-rw-r--r--assets/stylesheets/bootstrap/utilities/_borders.scss75
-rw-r--r--assets/stylesheets/bootstrap/utilities/_display.scss26
-rw-r--r--assets/stylesheets/bootstrap/utilities/_embed.scss39
-rw-r--r--assets/stylesheets/bootstrap/utilities/_flex.scss51
-rw-r--r--assets/stylesheets/bootstrap/utilities/_float.scss11
-rw-r--r--assets/stylesheets/bootstrap/utilities/_interactions.scss5
-rw-r--r--assets/stylesheets/bootstrap/utilities/_overflow.scss5
-rw-r--r--assets/stylesheets/bootstrap/utilities/_position.scss32
-rw-r--r--assets/stylesheets/bootstrap/utilities/_screenreaders.scss11
-rw-r--r--assets/stylesheets/bootstrap/utilities/_shadows.scss6
-rw-r--r--assets/stylesheets/bootstrap/utilities/_sizing.scss20
-rw-r--r--assets/stylesheets/bootstrap/utilities/_spacing.scss73
-rw-r--r--assets/stylesheets/bootstrap/utilities/_stretched-link.scss19
-rw-r--r--assets/stylesheets/bootstrap/utilities/_text.scss72
-rw-r--r--assets/stylesheets/bootstrap/utilities/_visibility.scss13
-rw-r--r--assets/stylesheets/bootstrap/vendor/_rfs.scss360
-rw-r--r--lib/bootstrap/version.rb2
127 files changed, 8139 insertions, 6232 deletions
diff --git a/assets/javascripts/bootstrap-sprockets.js b/assets/javascripts/bootstrap-sprockets.js
index 52c9ec0..3158d3a 100644
--- a/assets/javascripts/bootstrap-sprockets.js
+++ b/assets/javascripts/bootstrap-sprockets.js
@@ -1,12 +1,16 @@
-//= require ./bootstrap/util
-//= require ./bootstrap/tooltip
-//= require ./bootstrap/modal
-//= require ./bootstrap/popover
+//= require ./bootstrap/dom/data
+//= require ./bootstrap/dom/event-handler
//= require ./bootstrap/alert
-//= require ./bootstrap/dropdown
+//= require ./bootstrap/button
+//= require ./bootstrap/dom/manipulator
+//= require ./bootstrap/dom/selector-engine
+//= require ./bootstrap/carousel
//= require ./bootstrap/collapse
+//= require ./bootstrap/dom/polyfill
+//= require ./bootstrap/dropdown
+//= require ./bootstrap/modal
+//= require ./bootstrap/tooltip
+//= require ./bootstrap/popover
+//= require ./bootstrap/scrollspy
//= require ./bootstrap/tab
-//= require ./bootstrap/carousel
//= require ./bootstrap/toast
-//= require ./bootstrap/button
-//= require ./bootstrap/scrollspy
diff --git a/assets/javascripts/bootstrap.js b/assets/javascripts/bootstrap.js
index 55487b8..a10f2ee 100644
--- a/assets/javascripts/bootstrap.js
+++ b/assets/javascripts/bootstrap.js
@@ -1,15 +1,14 @@
/*!
- * Bootstrap v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 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' ? factory(exports, require('jquery'), require('popper.js')) :
- typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.bootstrap = {}, global.jQuery, global.Popper));
-}(this, (function (exports, $, Popper) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('popper.js')) :
+ typeof define === 'function' && define.amd ? define(['popper.js'], factory) :
+ (global = global || self, global.bootstrap = factory(global.Popper));
+}(this, (function (Popper) { 'use strict';
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
function _defineProperties(target, props) {
@@ -28,22 +27,53 @@
return Constructor;
}
- function _extends() {
- _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
+ function _defineProperty(obj, key, value) {
+ if (key in obj) {
+ Object.defineProperty(obj, key, {
+ value: value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ } else {
+ obj[key] = value;
+ }
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
+ return obj;
+ }
- return target;
- };
+ function ownKeys(object, enumerableOnly) {
+ var keys = Object.keys(object);
+
+ if (Object.getOwnPropertySymbols) {
+ var symbols = Object.getOwnPropertySymbols(object);
+ if (enumerableOnly) symbols = symbols.filter(function (sym) {
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
+ });
+ keys.push.apply(keys, symbols);
+ }
+
+ return keys;
+ }
+
+ function _objectSpread2(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i] != null ? arguments[i] : {};
- return _extends.apply(this, arguments);
+ if (i % 2) {
+ ownKeys(Object(source), true).forEach(function (key) {
+ _defineProperty(target, key, source[key]);
+ });
+ } else if (Object.getOwnPropertyDescriptors) {
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
+ } else {
+ ownKeys(Object(source)).forEach(function (key) {
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
+ });
+ }
+ }
+
+ return target;
}
function _inheritsLoose(subClass, superClass) {
@@ -54,179 +84,596 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.2): util.js
+ * Bootstrap (v5.0.0-alpha1): util/index.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)
+ var MILLISECONDS_MULTIPLIER = 1000;
+ var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
- function toType(obj) {
- if (obj === null || typeof obj === 'undefined') {
+ var toType = function toType(obj) {
+ if (obj === null || obj === undefined) {
return "" + obj;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
- }
+ };
+ /**
+ * --------------------------------------------------------------------------
+ * Public Util Api
+ * --------------------------------------------------------------------------
+ */
- function getSpecialTransitionEndEvent() {
- return {
- bindType: TRANSITION_END,
- delegateType: TRANSITION_END,
- handle: function handle(event) {
- if ($(event.target).is(this)) {
- return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
- }
- return undefined;
- }
- };
- }
+ var getUID = function getUID(prefix) {
+ do {
+ prefix += Math.floor(Math.random() * MAX_UID);
+ } while (document.getElementById(prefix));
+
+ return prefix;
+ };
+
+ var getSelector = function getSelector(element) {
+ var selector = element.getAttribute('data-target');
+
+ if (!selector || selector === '#') {
+ var hrefAttr = element.getAttribute('href');
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
+ }
+
+ return selector;
+ };
+
+ var getSelectorFromElement = function getSelectorFromElement(element) {
+ var selector = getSelector(element);
+
+ if (selector) {
+ return document.querySelector(selector) ? selector : null;
+ }
+
+ return null;
+ };
+
+ var getElementFromSelector = function getElementFromSelector(element) {
+ var selector = getSelector(element);
+ return selector ? document.querySelector(selector) : null;
+ };
+
+ var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
+ if (!element) {
+ return 0;
+ } // Get transition-duration of the element
+
+
+ var _window$getComputedSt = window.getComputedStyle(element),
+ transitionDuration = _window$getComputedSt.transitionDuration,
+ transitionDelay = _window$getComputedSt.transitionDelay;
+
+ var floatTransitionDuration = parseFloat(transitionDuration);
+ var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
- function transitionEndEmulator(duration) {
- var _this = this;
+ 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;
+ };
+
+ var triggerTransitionEnd = function triggerTransitionEnd(element) {
+ element.dispatchEvent(new Event(TRANSITION_END));
+ };
+
+ var isElement = function isElement(obj) {
+ return (obj[0] || obj).nodeType;
+ };
+
+ var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
var called = false;
- $(this).one(Util.TRANSITION_END, function () {
+ var durationPadding = 5;
+ var emulatedDuration = duration + durationPadding;
+
+ function listener() {
called = true;
- });
+ element.removeEventListener(TRANSITION_END, listener);
+ }
+
+ element.addEventListener(TRANSITION_END, listener);
setTimeout(function () {
if (!called) {
- Util.triggerTransitionEnd(_this);
+ triggerTransitionEnd(element);
}
- }, duration);
- return this;
- }
+ }, emulatedDuration);
+ };
+
+ var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
+ Object.keys(configTypes).forEach(function (property) {
+ var expectedTypes = configTypes[property];
+ var value = config[property];
+ var valueType = value && 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 + "\"."));
+ }
+ });
+ };
+
+ var isVisible = function isVisible(element) {
+ if (!element) {
+ return false;
+ }
+
+ if (element.style && element.parentNode && element.parentNode.style) {
+ var elementStyle = getComputedStyle(element);
+ var parentNodeStyle = getComputedStyle(element.parentNode);
+ return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
+ }
+
+ return false;
+ };
+
+ var 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 findShadowRoot(element.parentNode);
+ };
+
+ var noop = function noop() {
+ return function () {};
+ };
+
+ var reflow = function reflow(element) {
+ return element.offsetHeight;
+ };
+
+ var getjQuery = function getjQuery() {
+ var _window = window,
+ jQuery = _window.jQuery;
+
+ if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
- function setTransitionEndSupport() {
- $.fn.emulateTransitionEnd = transitionEndEmulator;
- $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
- }
/**
* --------------------------------------------------------------------------
- * Public Util Api
+ * Bootstrap (v5.0.0-alpha1): dom/data.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ var mapData = function () {
+ var storeData = {};
+ var id = 1;
+ return {
+ set: function set(element, key, data) {
+ if (typeof element.key === 'undefined') {
+ element.key = {
+ key: key,
+ id: id
+ };
+ id++;
+ }
- var Util = {
- TRANSITION_END: 'bsTransitionEnd',
- getUID: function getUID(prefix) {
- do {
- // eslint-disable-next-line no-bitwise
- prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
- } while (document.getElementById(prefix));
+ storeData[element.key.id] = data;
+ },
+ get: function get(element, key) {
+ if (!element || typeof element.key === 'undefined') {
+ return null;
+ }
+
+ var keyProperties = element.key;
+
+ if (keyProperties.key === key) {
+ return storeData[keyProperties.id];
+ }
+
+ return null;
+ },
+ delete: function _delete(element, key) {
+ if (typeof element.key === 'undefined') {
+ return;
+ }
+
+ var keyProperties = element.key;
+
+ if (keyProperties.key === key) {
+ delete storeData[keyProperties.id];
+ delete element.key;
+ }
+ }
+ };
+ }();
- return prefix;
+ var Data = {
+ setData: function setData(instance, key, data) {
+ mapData.set(instance, key, data);
},
- getSelectorFromElement: function getSelectorFromElement(element) {
- var selector = element.getAttribute('data-target');
+ getData: function getData(instance, key) {
+ return mapData.get(instance, key);
+ },
+ removeData: function removeData(instance, key) {
+ mapData.delete(instance, key);
+ }
+ };
+
+ /* istanbul ignore file */
+ var find = Element.prototype.querySelectorAll;
+ var findOne = Element.prototype.querySelector; // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
+
+ var defaultPreventedPreservedOnDispatch = function () {
+ var e = new CustomEvent('Bootstrap', {
+ cancelable: true
+ });
+ var element = document.createElement('div');
+ element.addEventListener('Bootstrap', function () {
+ return null;
+ });
+ e.preventDefault();
+ element.dispatchEvent(e);
+ return e.defaultPrevented;
+ }();
+
+ var scopeSelectorRegex = /:scope\b/;
- if (!selector || selector === '#') {
- var hrefAttr = element.getAttribute('href');
- selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
+ var supportScopeQuery = function () {
+ var element = document.createElement('div');
+
+ try {
+ element.querySelectorAll(':scope *');
+ } catch (_) {
+ return false;
+ }
+
+ return true;
+ }();
+
+ if (!supportScopeQuery) {
+ find = function find(selector) {
+ if (!scopeSelectorRegex.test(selector)) {
+ return this.querySelectorAll(selector);
+ }
+
+ var hasId = Boolean(this.id);
+
+ if (!hasId) {
+ this.id = getUID('scope');
}
+ var nodeList = null;
+
try {
- return document.querySelector(selector) ? selector : null;
- } catch (err) {
- return null;
+ selector = selector.replace(scopeSelectorRegex, "#" + this.id);
+ nodeList = this.querySelectorAll(selector);
+ } finally {
+ if (!hasId) {
+ this.removeAttribute('id');
+ }
}
- },
- getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
- if (!element) {
- return 0;
- } // Get transition-duration of the element
+ return nodeList;
+ };
- var transitionDuration = $(element).css('transition-duration');
- var transitionDelay = $(element).css('transition-delay');
- var floatTransitionDuration = parseFloat(transitionDuration);
- var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
+ findOne = function findOne(selector) {
+ if (!scopeSelectorRegex.test(selector)) {
+ return this.querySelector(selector);
+ }
- if (!floatTransitionDuration && !floatTransitionDelay) {
- return 0;
- } // If multiple durations are defined, take the first
+ var matches = find.call(this, selector);
+ if (typeof matches[0] !== 'undefined') {
+ return matches[0];
+ }
- 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) {
- $(element).trigger(TRANSITION_END);
- },
- // TODO: Remove in v5
- supportsTransitionEnd: function supportsTransitionEnd() {
- return Boolean(TRANSITION_END);
+ return null;
+ };
+ }
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): dom/event-handler.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ var $ = getjQuery();
+ var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
+ var stripNameRegex = /\..*/;
+ var stripUidRegex = /::\d+$/;
+ var eventRegistry = {}; // Events storage
+
+ var uidEvent = 1;
+ var customEvents = {
+ mouseenter: 'mouseover',
+ mouseleave: 'mouseout'
+ };
+ var nativeEvents = ['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll'];
+ /**
+ * ------------------------------------------------------------------------
+ * Private methods
+ * ------------------------------------------------------------------------
+ */
+
+ function getUidEvent(element, uid) {
+ return uid && uid + "::" + uidEvent++ || element.uidEvent || uidEvent++;
+ }
+
+ function getEvent(element) {
+ var uid = getUidEvent(element);
+ element.uidEvent = uid;
+ eventRegistry[uid] = eventRegistry[uid] || {};
+ return eventRegistry[uid];
+ }
+
+ function bootstrapHandler(element, fn) {
+ return function handler(event) {
+ if (handler.oneOff) {
+ EventHandler.off(element, event.type, fn);
+ }
+
+ return fn.apply(element, [event]);
+ };
+ }
+
+ function bootstrapDelegationHandler(element, selector, fn) {
+ return function handler(event) {
+ var domElements = element.querySelectorAll(selector);
+
+ for (var target = event.target; target && target !== this; target = target.parentNode) {
+ for (var i = domElements.length; i--;) {
+ if (domElements[i] === target) {
+ if (handler.oneOff) {
+ EventHandler.off(element, event.type, fn);
+ }
+
+ return fn.apply(target, [event]);
+ }
+ }
+ } // To please ESLint
+
+
+ return null;
+ };
+ }
+
+ function findHandler(events, handler, delegationSelector) {
+ if (delegationSelector === void 0) {
+ delegationSelector = null;
+ }
+
+ var uidEventList = Object.keys(events);
+
+ for (var i = 0, len = uidEventList.length; i < len; i++) {
+ var event = events[uidEventList[i]];
+
+ if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
+ return event;
+ }
+ }
+
+ return null;
+ }
+
+ function normalizeParams(originalTypeEvent, handler, delegationFn) {
+ var delegation = typeof handler === 'string';
+ var originalHandler = delegation ? delegationFn : handler; // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
+
+ var typeEvent = originalTypeEvent.replace(stripNameRegex, '');
+ var custom = customEvents[typeEvent];
+
+ if (custom) {
+ typeEvent = custom;
+ }
+
+ var isNative = nativeEvents.indexOf(typeEvent) > -1;
+
+ if (!isNative) {
+ typeEvent = originalTypeEvent;
+ }
+
+ return [delegation, originalHandler, typeEvent];
+ }
+
+ function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
+ if (typeof originalTypeEvent !== 'string' || !element) {
+ return;
+ }
+
+ if (!handler) {
+ handler = delegationFn;
+ delegationFn = null;
+ }
+
+ var _normalizeParams = normalizeParams(originalTypeEvent, handler, delegationFn),
+ delegation = _normalizeParams[0],
+ originalHandler = _normalizeParams[1],
+ typeEvent = _normalizeParams[2];
+
+ var events = getEvent(element);
+ var handlers = events[typeEvent] || (events[typeEvent] = {});
+ var previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
+
+ if (previousFn) {
+ previousFn.oneOff = previousFn.oneOff && oneOff;
+ return;
+ }
+
+ var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
+ var fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
+ fn.delegationSelector = delegation ? handler : null;
+ fn.originalHandler = originalHandler;
+ fn.oneOff = oneOff;
+ fn.uidEvent = uid;
+ handlers[uid] = fn;
+ element.addEventListener(typeEvent, fn, delegation);
+ }
+
+ function removeHandler(element, events, typeEvent, handler, delegationSelector) {
+ var fn = findHandler(events[typeEvent], handler, delegationSelector);
+
+ if (!fn) {
+ return;
+ }
+
+ element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
+ delete events[typeEvent][fn.uidEvent];
+ }
+
+ function removeNamespacedHandlers(element, events, typeEvent, namespace) {
+ var storeElementEvent = events[typeEvent] || {};
+ Object.keys(storeElementEvent).forEach(function (handlerKey) {
+ if (handlerKey.indexOf(namespace) > -1) {
+ var event = storeElementEvent[handlerKey];
+ removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
+ }
+ });
+ }
+
+ var EventHandler = {
+ on: function on(element, event, handler, delegationFn) {
+ addHandler(element, event, handler, delegationFn, false);
},
- isElement: function isElement(obj) {
- return (obj[0] || obj).nodeType;
+ one: function one(element, event, handler, delegationFn) {
+ addHandler(element, event, handler, delegationFn, true);
},
- 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 + "\"."));
- }
+ off: function off(element, originalTypeEvent, handler, delegationFn) {
+ if (typeof originalTypeEvent !== 'string' || !element) {
+ return;
+ }
+
+ var _normalizeParams2 = normalizeParams(originalTypeEvent, handler, delegationFn),
+ delegation = _normalizeParams2[0],
+ originalHandler = _normalizeParams2[1],
+ typeEvent = _normalizeParams2[2];
+
+ var inNamespace = typeEvent !== originalTypeEvent;
+ var events = getEvent(element);
+ var isNamespace = originalTypeEvent.charAt(0) === '.';
+
+ if (typeof originalHandler !== 'undefined') {
+ // Simplest case: handler is passed, remove that listener ONLY.
+ if (!events || !events[typeEvent]) {
+ return;
}
+
+ removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
+ return;
+ }
+
+ if (isNamespace) {
+ Object.keys(events).forEach(function (elementEvent) {
+ removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
+ });
}
+
+ var storeElementEvent = events[typeEvent] || {};
+ Object.keys(storeElementEvent).forEach(function (keyHandlers) {
+ var handlerKey = keyHandlers.replace(stripUidRegex, '');
+
+ if (!inNamespace || originalTypeEvent.indexOf(handlerKey) > -1) {
+ var event = storeElementEvent[keyHandlers];
+ removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
+ }
+ });
},
- findShadowRoot: function findShadowRoot(element) {
- if (!document.documentElement.attachShadow) {
+ trigger: function trigger(element, event, args) {
+ if (typeof event !== 'string' || !element) {
return null;
- } // Can find the shadow root otherwise it'll return the document
+ }
+ var typeEvent = event.replace(stripNameRegex, '');
+ var inNamespace = event !== typeEvent;
+ var isNative = nativeEvents.indexOf(typeEvent) > -1;
+ var jQueryEvent;
+ var bubbles = true;
+ var nativeDispatch = true;
+ var defaultPrevented = false;
+ var evt = null;
- if (typeof element.getRootNode === 'function') {
- var root = element.getRootNode();
- return root instanceof ShadowRoot ? root : null;
+ if (inNamespace && $) {
+ jQueryEvent = $.Event(event, args);
+ $(element).trigger(jQueryEvent);
+ bubbles = !jQueryEvent.isPropagationStopped();
+ nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
+ defaultPrevented = jQueryEvent.isDefaultPrevented();
}
- if (element instanceof ShadowRoot) {
- return element;
- } // when we don't find a shadow root
+ if (isNative) {
+ evt = document.createEvent('HTMLEvents');
+ evt.initEvent(typeEvent, bubbles, true);
+ } else {
+ evt = new CustomEvent(event, {
+ bubbles: bubbles,
+ cancelable: true
+ });
+ } // merge custom informations in our event
- if (!element.parentNode) {
- return null;
+ if (typeof args !== 'undefined') {
+ Object.keys(args).forEach(function (key) {
+ Object.defineProperty(evt, key, {
+ get: function get() {
+ return args[key];
+ }
+ });
+ });
}
- return Util.findShadowRoot(element.parentNode);
- },
- jQueryDetection: function jQueryDetection() {
- if (typeof $ === 'undefined') {
- throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
+ if (defaultPrevented) {
+ evt.preventDefault();
+
+ if (!defaultPreventedPreservedOnDispatch) {
+ Object.defineProperty(evt, 'defaultPrevented', {
+ get: function get() {
+ return true;
+ }
+ });
+ }
}
- var version = $.fn.jquery.split(' ')[0].split('.');
- var minMajor = 1;
- var ltMajor = 2;
- var minMinor = 9;
- var minPatch = 1;
- var maxMajor = 4;
+ if (nativeDispatch) {
+ element.dispatchEvent(evt);
+ }
- 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');
+ if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
+ jQueryEvent.preventDefault();
}
+
+ return evt;
}
};
- Util.jQueryDetection();
- setTransitionEndSupport();
/**
* ------------------------------------------------------------------------
@@ -235,18 +682,17 @@
*/
var NAME = 'alert';
- var VERSION = '4.5.2';
+ var VERSION = '5.0.0-alpha1';
var DATA_KEY = 'bs.alert';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.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';
+ var CLASSNAME_ALERT = 'alert';
+ var CLASSNAME_FADE = 'fade';
+ var CLASSNAME_SHOW = 'show';
/**
* ------------------------------------------------------------------------
* Class Definition
@@ -256,6 +702,10 @@
var Alert = /*#__PURE__*/function () {
function Alert(element) {
this._element = element;
+
+ if (this._element) {
+ Data.setData(element, DATA_KEY, this);
+ }
} // Getters
@@ -271,7 +721,7 @@
var customEvent = this._triggerCloseEvent(rootElement);
- if (customEvent.isDefaultPrevented()) {
+ if (customEvent === null || customEvent.defaultPrevented) {
return;
}
@@ -279,62 +729,52 @@
};
_proto.dispose = function dispose() {
- $.removeData(this._element, DATA_KEY);
+ Data.removeData(this._element, DATA_KEY);
this._element = null;
} // Private
;
_proto._getRootElement = function _getRootElement(element) {
- var selector = Util.getSelectorFromElement(element);
- var parent = false;
-
- if (selector) {
- parent = document.querySelector(selector);
- }
-
- if (!parent) {
- parent = $(element).closest("." + CLASS_NAME_ALERT)[0];
- }
-
- return parent;
+ return getElementFromSelector(element) || element.closest("." + CLASSNAME_ALERT);
};
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
- var closeEvent = $.Event(EVENT_CLOSE);
- $(element).trigger(closeEvent);
- return closeEvent;
+ return EventHandler.trigger(element, EVENT_CLOSE);
};
_proto._removeElement = function _removeElement(element) {
var _this = this;
- $(element).removeClass(CLASS_NAME_SHOW);
+ element.classList.remove(CLASSNAME_SHOW);
- if (!$(element).hasClass(CLASS_NAME_FADE)) {
+ if (!element.classList.contains(CLASSNAME_FADE)) {
this._destroyElement(element);
return;
}
- var transitionDuration = Util.getTransitionDurationFromElement(element);
- $(element).one(Util.TRANSITION_END, function (event) {
- return _this._destroyElement(element, event);
- }).emulateTransitionEnd(transitionDuration);
+ var transitionDuration = getTransitionDurationFromElement(element);
+ EventHandler.one(element, TRANSITION_END, function () {
+ return _this._destroyElement(element);
+ });
+ emulateTransitionEnd(element, transitionDuration);
};
_proto._destroyElement = function _destroyElement(element) {
- $(element).detach().trigger(EVENT_CLOSED).remove();
+ if (element.parentNode) {
+ element.parentNode.removeChild(element);
+ }
+
+ EventHandler.trigger(element, EVENT_CLOSED);
} // Static
;
- Alert._jQueryInterface = function _jQueryInterface(config) {
+ Alert.jQueryInterface = function jQueryInterface(config) {
return this.each(function () {
- var $element = $(this);
- var data = $element.data(DATA_KEY);
+ var data = Data.getData(this, DATA_KEY);
if (!data) {
data = new Alert(this);
- $element.data(DATA_KEY, data);
}
if (config === 'close') {
@@ -343,7 +783,7 @@
});
};
- Alert._handleDismiss = function _handleDismiss(alertInstance) {
+ Alert.handleDismiss = function handleDismiss(alertInstance) {
return function (event) {
if (event) {
event.preventDefault();
@@ -353,6 +793,10 @@
};
};
+ Alert.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY);
+ };
+
_createClass(Alert, null, [{
key: "VERSION",
get: function get() {
@@ -369,20 +813,27 @@
*/
- $(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()));
+ var $$1 = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .alert to jQuery only if jQuery is present
*/
- $.fn[NAME] = Alert._jQueryInterface;
- $.fn[NAME].Constructor = Alert;
+ /* istanbul ignore if */
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Alert._jQueryInterface;
- };
+ if ($$1) {
+ var JQUERY_NO_CONFLICT = $$1.fn[NAME];
+ $$1.fn[NAME] = Alert.jQueryInterface;
+ $$1.fn[NAME].Constructor = Alert;
+
+ $$1.fn[NAME].noConflict = function () {
+ $$1.fn[NAME] = JQUERY_NO_CONFLICT;
+ return Alert.jQueryInterface;
+ };
+ }
/**
* ------------------------------------------------------------------------
@@ -391,24 +842,13 @@
*/
var NAME$1 = 'button';
- var VERSION$1 = '4.5.2';
+ var VERSION$1 = '5.0.0-alpha1';
var DATA_KEY$1 = 'bs.button';
var EVENT_KEY$1 = "." + DATA_KEY$1;
var DATA_API_KEY$1 = '.data-api';
- var JQUERY_NO_CONFLICT$1 = $.fn[NAME$1];
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$1 = "click" + EVENT_KEY$1 + DATA_API_KEY$1;
- var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY$1 + DATA_API_KEY$1 + " " + ("blur" + EVENT_KEY$1 + DATA_API_KEY$1);
- var EVENT_LOAD_DATA_API = "load" + EVENT_KEY$1 + DATA_API_KEY$1;
/**
* ------------------------------------------------------------------------
* Class Definition
@@ -418,6 +858,7 @@
var Button = /*#__PURE__*/function () {
function Button(element) {
this._element = element;
+ Data.setData(element, DATA_KEY$1, this);
} // Getters
@@ -425,64 +866,22 @@
// Public
_proto.toggle = function toggle() {
- var triggerChangeEvent = true;
- var addAriaPressed = true;
- var rootElement = $(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) {
- $(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);
- }
-
- $(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);
- }
- }
+ // 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));
};
_proto.dispose = function dispose() {
- $.removeData(this._element, DATA_KEY$1);
+ Data.removeData(this._element, DATA_KEY$1);
this._element = null;
} // Static
;
- Button._jQueryInterface = function _jQueryInterface(config) {
+ Button.jQueryInterface = function jQueryInterface(config) {
return this.each(function () {
- var data = $(this).data(DATA_KEY$1);
+ var data = Data.getData(this, DATA_KEY$1);
if (!data) {
data = new Button(this);
- $(this).data(DATA_KEY$1, data);
}
if (config === 'toggle') {
@@ -491,6 +890,10 @@
});
};
+ Button.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY$1);
+ };
+
_createClass(Button, null, [{
key: "VERSION",
get: function get() {
@@ -507,74 +910,200 @@
*/
- $(document).on(EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
- var button = event.target;
- var initialButton = button;
+ EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE, function (event) {
+ event.preventDefault();
+ var button = event.target.closest(SELECTOR_DATA_TOGGLE);
+ var data = Data.getData(button, DATA_KEY$1);
- if (!$(button).hasClass(CLASS_NAME_BUTTON)) {
- button = $(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);
+ data.toggle();
+ });
+ var $$2 = getjQuery();
+ /**
+ * ------------------------------------------------------------------------
+ * jQuery
+ * ------------------------------------------------------------------------
+ * add .button to jQuery only if jQuery is present
+ */
- if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) {
- event.preventDefault(); // work around Firefox bug #1540995
+ /* istanbul ignore if */
- return;
- }
+ if ($$2) {
+ var JQUERY_NO_CONFLICT$1 = $$2.fn[NAME$1];
+ $$2.fn[NAME$1] = Button.jQueryInterface;
+ $$2.fn[NAME$1].Constructor = Button;
- if (initialButton.tagName !== 'LABEL' || inputBtn && inputBtn.type !== 'checkbox') {
- Button._jQueryInterface.call($(button), 'toggle');
- }
+ $$2.fn[NAME$1].noConflict = function () {
+ $$2.fn[NAME$1] = JQUERY_NO_CONFLICT$1;
+ return Button.jQueryInterface;
+ };
+ }
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): dom/manipulator.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ function normalizeData(val) {
+ if (val === 'true') {
+ return true;
}
- }).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
- var button = $(event.target).closest(SELECTOR_BUTTON)[0];
- $(button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
- });
- $(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 (val === 'false') {
+ return false;
+ }
- if (input.checked || input.hasAttribute('checked')) {
- button.classList.add(CLASS_NAME_ACTIVE);
- } else {
- button.classList.remove(CLASS_NAME_ACTIVE);
- }
- } // find all button toggles
+ if (val === Number(val).toString()) {
+ return Number(val);
+ }
+
+ if (val === '' || val === 'null') {
+ return null;
+ }
+
+ return val;
+ }
+ function normalizeDataKey(key) {
+ return key.replace(/[A-Z]/g, function (chr) {
+ return "-" + chr.toLowerCase();
+ });
+ }
+
+ var Manipulator = {
+ setDataAttribute: function setDataAttribute(element, key, value) {
+ element.setAttribute("data-" + normalizeDataKey(key), value);
+ },
+ removeDataAttribute: function removeDataAttribute(element, key) {
+ element.removeAttribute("data-" + normalizeDataKey(key));
+ },
+ getDataAttributes: function getDataAttributes(element) {
+ if (!element) {
+ return {};
+ }
- buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
+ var attributes = _objectSpread2({}, element.dataset);
- for (var _i = 0, _len = buttons.length; _i < _len; _i++) {
- var _button = buttons[_i];
+ Object.keys(attributes).forEach(function (key) {
+ attributes[key] = normalizeData(attributes[key]);
+ });
+ return attributes;
+ },
+ getDataAttribute: function getDataAttribute(element, key) {
+ return normalizeData(element.getAttribute("data-" + normalizeDataKey(key)));
+ },
+ offset: function offset(element) {
+ var rect = element.getBoundingClientRect();
+ return {
+ top: rect.top + document.body.scrollTop,
+ left: rect.left + document.body.scrollLeft
+ };
+ },
+ position: function position(element) {
+ return {
+ top: element.offsetTop,
+ left: element.offsetLeft
+ };
+ },
+ toggleClass: function toggleClass(element, className) {
+ if (!element) {
+ return;
+ }
- if (_button.getAttribute('aria-pressed') === 'true') {
- _button.classList.add(CLASS_NAME_ACTIVE);
+ if (element.classList.contains(className)) {
+ element.classList.remove(className);
} else {
- _button.classList.remove(CLASS_NAME_ACTIVE);
+ element.classList.add(className);
}
}
- });
+ };
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): dom/selector-engine.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
/**
* ------------------------------------------------------------------------
- * jQuery
+ * Constants
* ------------------------------------------------------------------------
*/
- $.fn[NAME$1] = Button._jQueryInterface;
- $.fn[NAME$1].Constructor = Button;
+ var NODE_TEXT = 3;
+ var SelectorEngine = {
+ matches: function matches(element, selector) {
+ return element.matches(selector);
+ },
+ find: function find$1(selector, element) {
+ var _ref;
+
+ if (element === void 0) {
+ element = document.documentElement;
+ }
+
+ return (_ref = []).concat.apply(_ref, find.call(element, selector));
+ },
+ findOne: function findOne$1(selector, element) {
+ if (element === void 0) {
+ element = document.documentElement;
+ }
+
+ return findOne.call(element, selector);
+ },
+ children: function children(element, selector) {
+ var _ref2;
+
+ var children = (_ref2 = []).concat.apply(_ref2, element.children);
+
+ return children.filter(function (child) {
+ return child.matches(selector);
+ });
+ },
+ parents: function parents(element, selector) {
+ var parents = [];
+ var ancestor = element.parentNode;
+
+ while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
+ if (this.matches(ancestor, selector)) {
+ parents.push(ancestor);
+ }
+
+ ancestor = ancestor.parentNode;
+ }
+
+ return parents;
+ },
+ prev: function prev(element, selector) {
+ var previous = element.previousElementSibling;
+
+ while (previous) {
+ if (previous.matches(selector)) {
+ return [previous];
+ }
+
+ previous = previous.previousElementSibling;
+ }
+
+ return [];
+ },
+ next: function next(element, selector) {
+ var next = element.nextElementSibling;
+
+ while (next) {
+ if (this.matches(next, selector)) {
+ return [next];
+ }
+
+ next = next.nextElementSibling;
+ }
- $.fn[NAME$1].noConflict = function () {
- $.fn[NAME$1] = JQUERY_NO_CONFLICT$1;
- return Button._jQueryInterface;
+ return [];
+ }
};
/**
@@ -584,15 +1113,12 @@
*/
var NAME$2 = 'carousel';
- var VERSION$2 = '4.5.2';
+ var VERSION$2 = '5.0.0-alpha1';
var DATA_KEY$2 = 'bs.carousel';
var EVENT_KEY$2 = "." + DATA_KEY$2;
var DATA_API_KEY$2 = '.data-api';
- var JQUERY_NO_CONFLICT$2 = $.fn[NAME$2];
- 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 ARROW_LEFT_KEY = 'ArrowLeft';
+ var ARROW_RIGHT_KEY = 'ArrowRight';
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
var SWIPE_THRESHOLD = 40;
@@ -627,7 +1153,7 @@
var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY$2;
var EVENT_POINTERUP = "pointerup" + EVENT_KEY$2;
var EVENT_DRAG_START = "dragstart" + EVENT_KEY$2;
- var EVENT_LOAD_DATA_API$1 = "load" + EVENT_KEY$2 + DATA_API_KEY$2;
+ var EVENT_LOAD_DATA_API = "load" + EVENT_KEY$2 + DATA_API_KEY$2;
var EVENT_CLICK_DATA_API$2 = "click" + EVENT_KEY$2 + DATA_API_KEY$2;
var CLASS_NAME_CAROUSEL = 'carousel';
var CLASS_NAME_ACTIVE$1 = 'active';
@@ -637,7 +1163,7 @@
var CLASS_NAME_NEXT = 'carousel-item-next';
var CLASS_NAME_PREV = 'carousel-item-prev';
var CLASS_NAME_POINTER_EVENT = 'pointer-event';
- var SELECTOR_ACTIVE$1 = '.active';
+ var SELECTOR_ACTIVE = '.active';
var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
var SELECTOR_ITEM = '.carousel-item';
var SELECTOR_ITEM_IMG = '.carousel-item img';
@@ -667,11 +1193,13 @@
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();
+
+ Data.setData(element, DATA_KEY$2, this);
} // Getters
@@ -687,7 +1215,7 @@
_proto.nextWhenVisible = function nextWhenVisible() {
// Don't call next when the page isn't visible
// or the carousel or its parent isn't visible
- if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
+ if (!document.hidden && isVisible(this._element)) {
this.next();
}
};
@@ -703,8 +1231,8 @@
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);
}
@@ -722,7 +1250,7 @@
this._interval = null;
}
- if (this._config.interval && !this._isPaused) {
+ if (this._config && this._config.interval && !this._isPaused) {
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
}
};
@@ -730,7 +1258,7 @@
_proto.to = function to(index) {
var _this = this;
- this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
+ this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
var activeIndex = this._getItemIndex(this._activeElement);
@@ -739,7 +1267,7 @@
}
if (this._isSliding) {
- $(this._element).one(EVENT_SLID, function () {
+ EventHandler.one(this._element, EVENT_SLID, function () {
return _this.to(index);
});
return;
@@ -757,8 +1285,8 @@
};
_proto.dispose = function dispose() {
- $(this._element).off(EVENT_KEY$2);
- $.removeData(this._element, DATA_KEY$2);
+ EventHandler.off(this._element, EVENT_KEY$2);
+ Data.removeData(this._element, DATA_KEY$2);
this._items = null;
this._config = null;
this._element = null;
@@ -771,8 +1299,8 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _extends({}, Default, config);
- Util.typeCheckConfig(NAME$2, config, DefaultType);
+ config = _objectSpread2(_objectSpread2({}, Default), config);
+ typeCheckConfig(NAME$2, config, DefaultType);
return config;
};
@@ -800,20 +1328,21 @@
var _this2 = this;
if (this._config.keyboard) {
- $(this._element).on(EVENT_KEYDOWN, function (event) {
+ EventHandler.on(this._element, EVENT_KEYDOWN, function (event) {
return _this2._keydown(event);
});
}
if (this._config.pause === 'hover') {
- $(this._element).on(EVENT_MOUSEENTER, function (event) {
+ EventHandler.on(this._element, EVENT_MOUSEENTER, function (event) {
return _this2.pause(event);
- }).on(EVENT_MOUSELEAVE, function (event) {
+ });
+ EventHandler.on(this._element, EVENT_MOUSELEAVE, function (event) {
return _this2.cycle(event);
});
}
- if (this._config.touch) {
+ if (this._config.touch && this._touchSupported) {
this._addTouchEventListeners();
}
};
@@ -821,30 +1350,26 @@
_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;
+ if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
+ _this3.touchStartX = event.clientX;
} else if (!_this3._pointerEvent) {
- _this3.touchStartX = event.originalEvent.touches[0].clientX;
+ _this3.touchStartX = event.touches[0].clientX;
}
};
var move = function move(event) {
// ensure swiping with one touch and not pinching
- if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
+ if (event.touches && event.touches.length > 1) {
_this3.touchDeltaX = 0;
} else {
- _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
+ _this3.touchDeltaX = event.touches[0].clientX - _this3.touchStartX;
}
};
var end = function end(event) {
- if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
- _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
+ if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
+ _this3.touchDeltaX = event.clientX - _this3.touchStartX;
}
_this3._handleSwipe();
@@ -869,27 +1394,29 @@
}
};
- $(this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
- return e.preventDefault();
+ SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(function (itemImg) {
+ EventHandler.on(itemImg, EVENT_DRAG_START, function (e) {
+ return e.preventDefault();
+ });
});
if (this._pointerEvent) {
- $(this._element).on(EVENT_POINTERDOWN, function (event) {
+ EventHandler.on(this._element, EVENT_POINTERDOWN, function (event) {
return start(event);
});
- $(this._element).on(EVENT_POINTERUP, function (event) {
+ EventHandler.on(this._element, EVENT_POINTERUP, function (event) {
return end(event);
});
this._element.classList.add(CLASS_NAME_POINTER_EVENT);
} else {
- $(this._element).on(EVENT_TOUCHSTART, function (event) {
+ EventHandler.on(this._element, EVENT_TOUCHSTART, function (event) {
return start(event);
});
- $(this._element).on(EVENT_TOUCHMOVE, function (event) {
+ EventHandler.on(this._element, EVENT_TOUCHMOVE, function (event) {
return move(event);
});
- $(this._element).on(EVENT_TOUCHEND, function (event) {
+ EventHandler.on(this._element, EVENT_TOUCHEND, function (event) {
return end(event);
});
}
@@ -900,13 +1427,13 @@
return;
}
- switch (event.which) {
- case ARROW_LEFT_KEYCODE:
+ switch (event.key) {
+ case ARROW_LEFT_KEY:
event.preventDefault();
this.prev();
break;
- case ARROW_RIGHT_KEYCODE:
+ case ARROW_RIGHT_KEY:
event.preventDefault();
this.next();
break;
@@ -914,7 +1441,7 @@
};
_proto._getItemIndex = function _getItemIndex(element) {
- this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : [];
+ this._items = element && element.parentNode ? SelectorEngine.find(SELECTOR_ITEM, element.parentNode) : [];
return this._items.indexOf(element);
};
@@ -939,27 +1466,28 @@
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
var targetIndex = this._getItemIndex(relatedTarget);
- var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
+ var fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element));
- var slideEvent = $.Event(EVENT_SLIDE, {
+ return EventHandler.trigger(this._element, EVENT_SLIDE, {
relatedTarget: relatedTarget,
direction: eventDirectionName,
from: fromIndex,
to: targetIndex
});
- $(this._element).trigger(slideEvent);
- return slideEvent;
};
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
if (this._indicatorsElement) {
- var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE$1));
- $(indicators).removeClass(CLASS_NAME_ACTIVE$1);
+ var indicators = SelectorEngine.find(SELECTOR_ACTIVE, this._indicatorsElement);
+
+ for (var i = 0; i < indicators.length; i++) {
+ indicators[i].classList.remove(CLASS_NAME_ACTIVE$1);
+ }
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
if (nextIndicator) {
- $(nextIndicator).addClass(CLASS_NAME_ACTIVE$1);
+ nextIndicator.classList.add(CLASS_NAME_ACTIVE$1);
}
}
};
@@ -967,7 +1495,7 @@
_proto._slide = function _slide(direction, element) {
var _this4 = this;
- var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
+ var activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
var activeElementIndex = this._getItemIndex(activeElement);
@@ -990,14 +1518,14 @@
eventDirectionName = DIRECTION_RIGHT;
}
- if (nextElement && $(nextElement).hasClass(CLASS_NAME_ACTIVE$1)) {
+ if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE$1)) {
this._isSliding = false;
return;
}
var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
- if (slideEvent.isDefaultPrevented()) {
+ if (slideEvent.defaultPrevented) {
return;
}
@@ -1014,18 +1542,11 @@
this._setActiveIndicatorElement(nextElement);
- var slidEvent = $.Event(EVENT_SLID, {
- relatedTarget: nextElement,
- direction: eventDirectionName,
- from: activeElementIndex,
- to: nextElementIndex
- });
-
- if ($(this._element).hasClass(CLASS_NAME_SLIDE)) {
- $(nextElement).addClass(orderClassName);
- Util.reflow(nextElement);
- $(activeElement).addClass(directionalClassName);
- $(nextElement).addClass(directionalClassName);
+ if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
+ nextElement.classList.add(orderClassName);
+ reflow(nextElement);
+ activeElement.classList.add(directionalClassName);
+ nextElement.classList.add(directionalClassName);
var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
if (nextElementInterval) {
@@ -1035,20 +1556,32 @@
this._config.interval = this._config.defaultInterval || this._config.interval;
}
- var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
- $(activeElement).one(Util.TRANSITION_END, function () {
- $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE$1);
- $(activeElement).removeClass(CLASS_NAME_ACTIVE$1 + " " + orderClassName + " " + directionalClassName);
+ var transitionDuration = getTransitionDurationFromElement(activeElement);
+ EventHandler.one(activeElement, TRANSITION_END, function () {
+ nextElement.classList.remove(directionalClassName, orderClassName);
+ nextElement.classList.add(CLASS_NAME_ACTIVE$1);
+ activeElement.classList.remove(CLASS_NAME_ACTIVE$1, orderClassName, directionalClassName);
_this4._isSliding = false;
setTimeout(function () {
- return $(_this4._element).trigger(slidEvent);
+ EventHandler.trigger(_this4._element, EVENT_SLID, {
+ relatedTarget: nextElement,
+ direction: eventDirectionName,
+ from: activeElementIndex,
+ to: nextElementIndex
+ });
}, 0);
- }).emulateTransitionEnd(transitionDuration);
+ });
+ emulateTransitionEnd(activeElement, transitionDuration);
} else {
- $(activeElement).removeClass(CLASS_NAME_ACTIVE$1);
- $(nextElement).addClass(CLASS_NAME_ACTIVE$1);
+ activeElement.classList.remove(CLASS_NAME_ACTIVE$1);
+ nextElement.classList.add(CLASS_NAME_ACTIVE$1);
this._isSliding = false;
- $(this._element).trigger(slidEvent);
+ EventHandler.trigger(this._element, EVENT_SLID, {
+ relatedTarget: nextElement,
+ direction: eventDirectionName,
+ from: activeElementIndex,
+ to: nextElementIndex
+ });
}
if (isCycling) {
@@ -1057,52 +1590,49 @@
} // Static
;
- Carousel._jQueryInterface = function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY$2);
+ Carousel.carouselInterface = function carouselInterface(element, config) {
+ var data = Data.getData(element, DATA_KEY$2);
- var _config = _extends({}, Default, $(this).data());
+ var _config = _objectSpread2(_objectSpread2({}, Default), Manipulator.getDataAttributes(element));
- if (typeof config === 'object') {
- _config = _extends({}, _config, config);
- }
+ if (typeof config === 'object') {
+ _config = _objectSpread2(_objectSpread2({}, _config), config);
+ }
- var action = typeof config === 'string' ? config : _config.slide;
+ var action = typeof config === 'string' ? config : _config.slide;
- if (!data) {
- data = new Carousel(this, _config);
- $(this).data(DATA_KEY$2, data);
+ 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 + "\"");
}
- 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();
- }
+ Carousel.jQueryInterface = function jQueryInterface(config) {
+ return this.each(function () {
+ Carousel.carouselInterface(this, config);
});
};
- Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
- var selector = Util.getSelectorFromElement(this);
+ Carousel.dataApiClickHandler = function dataApiClickHandler(event) {
+ var target = getElementFromSelector(this);
- if (!selector) {
+ if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
return;
}
- var target = $(selector)[0];
-
- if (!target || !$(target).hasClass(CLASS_NAME_CAROUSEL)) {
- return;
- }
-
- var config = _extends({}, $(target).data(), $(this).data());
+ var config = _objectSpread2(_objectSpread2({}, Manipulator.getDataAttributes(target)), Manipulator.getDataAttributes(this));
var slideIndex = this.getAttribute('data-slide-to');
@@ -1110,15 +1640,19 @@
config.interval = false;
}
- Carousel._jQueryInterface.call($(target), config);
+ Carousel.carouselInterface(target, config);
if (slideIndex) {
- $(target).data(DATA_KEY$2).to(slideIndex);
+ Data.getData(target, DATA_KEY$2).to(slideIndex);
}
event.preventDefault();
};
+ Carousel.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY$2);
+ };
+
_createClass(Carousel, null, [{
key: "VERSION",
get: function get() {
@@ -1140,29 +1674,34 @@
*/
- $(document).on(EVENT_CLICK_DATA_API$2, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
- $(window).on(EVENT_LOAD_DATA_API$1, function () {
- var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
+ EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
+ EventHandler.on(window, EVENT_LOAD_DATA_API, function () {
+ var carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
for (var i = 0, len = carousels.length; i < len; i++) {
- var $carousel = $(carousels[i]);
-
- Carousel._jQueryInterface.call($carousel, $carousel.data());
+ Carousel.carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY$2));
}
});
+ var $$3 = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .carousel to jQuery only if jQuery is present
*/
- $.fn[NAME$2] = Carousel._jQueryInterface;
- $.fn[NAME$2].Constructor = Carousel;
+ /* istanbul ignore if */
- $.fn[NAME$2].noConflict = function () {
- $.fn[NAME$2] = JQUERY_NO_CONFLICT$2;
- return Carousel._jQueryInterface;
- };
+ if ($$3) {
+ var JQUERY_NO_CONFLICT$2 = $$3.fn[NAME$2];
+ $$3.fn[NAME$2] = Carousel.jQueryInterface;
+ $$3.fn[NAME$2].Constructor = Carousel;
+
+ $$3.fn[NAME$2].noConflict = function () {
+ $$3.fn[NAME$2] = JQUERY_NO_CONFLICT$2;
+ return Carousel.jQueryInterface;
+ };
+ }
/**
* ------------------------------------------------------------------------
@@ -1171,11 +1710,10 @@
*/
var NAME$3 = 'collapse';
- var VERSION$3 = '4.5.2';
+ var VERSION$3 = '5.0.0-alpha1';
var DATA_KEY$3 = 'bs.collapse';
var EVENT_KEY$3 = "." + DATA_KEY$3;
var DATA_API_KEY$3 = '.data-api';
- var JQUERY_NO_CONFLICT$3 = $.fn[NAME$3];
var Default$1 = {
toggle: true,
parent: ''
@@ -1189,12 +1727,12 @@
var EVENT_HIDE = "hide" + EVENT_KEY$3;
var EVENT_HIDDEN = "hidden" + EVENT_KEY$3;
var EVENT_CLICK_DATA_API$3 = "click" + EVENT_KEY$3 + DATA_API_KEY$3;
- var CLASS_NAME_SHOW$1 = 'show';
+ 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 WIDTH = 'width';
+ var HEIGHT = 'height';
var SELECTOR_ACTIVES = '.show, .collapsing';
var SELECTOR_DATA_TOGGLE$1 = '[data-toggle="collapse"]';
/**
@@ -1208,17 +1746,17 @@
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$1));
+ this._triggerArray = SelectorEngine.find(SELECTOR_DATA_TOGGLE$1 + "[href=\"#" + element.id + "\"]," + (SELECTOR_DATA_TOGGLE$1 + "[data-target=\"#" + element.id + "\"]"));
+ var toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$1);
for (var i = 0, len = toggleList.length; i < len; i++) {
var elem = toggleList[i];
- var selector = Util.getSelectorFromElement(elem);
- var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
+ var selector = getSelectorFromElement(elem);
+ var filterElement = SelectorEngine.find(selector).filter(function (foundElem) {
return foundElem === element;
});
- if (selector !== null && filterElement.length > 0) {
+ if (selector !== null && filterElement.length) {
this._selector = selector;
this._triggerArray.push(elem);
@@ -1234,6 +1772,8 @@
if (this._config.toggle) {
this.toggle();
}
+
+ Data.setData(element, DATA_KEY$3, this);
} // Getters
@@ -1241,7 +1781,7 @@
// Public
_proto.toggle = function toggle() {
- if ($(this._element).hasClass(CLASS_NAME_SHOW$1)) {
+ if (this._element.classList.contains(CLASS_NAME_SHOW)) {
this.hide();
} else {
this.show();
@@ -1251,7 +1791,7 @@
_proto.show = function show() {
var _this = this;
- if (this._isTransitioning || $(this._element).hasClass(CLASS_NAME_SHOW$1)) {
+ if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
return;
}
@@ -1259,7 +1799,7 @@
var activesData;
if (this._parent) {
- actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)).filter(function (elem) {
+ actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(function (elem) {
if (typeof _this._config.parent === 'string') {
return elem.getAttribute('data-parent') === _this._config.parent;
}
@@ -1272,88 +1812,106 @@
}
}
+ var container = SelectorEngine.findOne(this._selector);
+
if (actives) {
- activesData = $(actives).not(this._selector).data(DATA_KEY$3);
+ var tempActiveData = actives.filter(function (elem) {
+ return container !== elem;
+ });
+ activesData = tempActiveData[0] ? Data.getData(tempActiveData[0], DATA_KEY$3) : null;
if (activesData && activesData._isTransitioning) {
return;
}
}
- var startEvent = $.Event(EVENT_SHOW);
- $(this._element).trigger(startEvent);
+ var startEvent = EventHandler.trigger(this._element, EVENT_SHOW);
- if (startEvent.isDefaultPrevented()) {
+ if (startEvent.defaultPrevented) {
return;
}
if (actives) {
- Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide');
+ actives.forEach(function (elemActive) {
+ if (container !== elemActive) {
+ Collapse.collapseInterface(elemActive, 'hide');
+ }
- if (!activesData) {
- $(actives).data(DATA_KEY$3, null);
- }
+ if (!activesData) {
+ Data.setData(elemActive, DATA_KEY$3, null);
+ }
+ });
}
var 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(function (element) {
+ element.classList.remove(CLASS_NAME_COLLAPSED);
+ element.setAttribute('aria-expanded', true);
+ });
}
this.setTransitioning(true);
var complete = function complete() {
- $(_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$1);
+ _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);
};
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
var scrollSize = "scroll" + capitalizedDimension;
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
- $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ var transitionDuration = getTransitionDurationFromElement(this._element);
+ EventHandler.one(this._element, TRANSITION_END, complete);
+ emulateTransitionEnd(this._element, transitionDuration);
this._element.style[dimension] = this._element[scrollSize] + "px";
};
_proto.hide = function hide() {
var _this2 = this;
- if (this._isTransitioning || !$(this._element).hasClass(CLASS_NAME_SHOW$1)) {
+ if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
return;
}
- var startEvent = $.Event(EVENT_HIDE);
- $(this._element).trigger(startEvent);
+ var startEvent = EventHandler.trigger(this._element, EVENT_HIDE);
- if (startEvent.isDefaultPrevented()) {
+ if (startEvent.defaultPrevented) {
return;
}
var dimension = this._getDimension();
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
- Util.reflow(this._element);
- $(this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$1);
+ reflow(this._element);
+
+ this._element.classList.add(CLASS_NAME_COLLAPSING);
+
+ this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
+
var triggerArrayLength = this._triggerArray.length;
if (triggerArrayLength > 0) {
for (var i = 0; i < triggerArrayLength; i++) {
var trigger = this._triggerArray[i];
- var selector = Util.getSelectorFromElement(trigger);
+ var elem = getElementFromSelector(trigger);
- if (selector !== null) {
- var $elem = $([].slice.call(document.querySelectorAll(selector)));
-
- if (!$elem.hasClass(CLASS_NAME_SHOW$1)) {
- $(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);
}
}
}
@@ -1363,12 +1921,17 @@
var complete = function complete() {
_this2.setTransitioning(false);
- $(_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN);
+ _this2._element.classList.remove(CLASS_NAME_COLLAPSING);
+
+ _this2._element.classList.add(CLASS_NAME_COLLAPSE);
+
+ EventHandler.trigger(_this2._element, EVENT_HIDDEN);
};
this._element.style[dimension] = '';
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
- $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ var transitionDuration = getTransitionDurationFromElement(this._element);
+ EventHandler.one(this._element, TRANSITION_END, complete);
+ emulateTransitionEnd(this._element, transitionDuration);
};
_proto.setTransitioning = function setTransitioning(isTransitioning) {
@@ -1376,7 +1939,7 @@
};
_proto.dispose = function dispose() {
- $.removeData(this._element, DATA_KEY$3);
+ Data.removeData(this._element, DATA_KEY$3);
this._config = null;
this._parent = null;
this._element = null;
@@ -1386,81 +1949,93 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _extends({}, Default$1, config);
+ config = _objectSpread2(_objectSpread2({}, Default$1), config);
config.toggle = Boolean(config.toggle); // Coerce string values
- Util.typeCheckConfig(NAME$3, config, DefaultType$1);
+ typeCheckConfig(NAME$3, config, DefaultType$1);
return config;
};
_proto._getDimension = function _getDimension() {
- var hasWidth = $(this._element).hasClass(DIMENSION_WIDTH);
- return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT;
+ var hasWidth = this._element.classList.contains(WIDTH);
+
+ return hasWidth ? WIDTH : HEIGHT;
};
_proto._getParent = function _getParent() {
var _this3 = this;
- var parent;
+ var parent = this._config.parent;
- if (Util.isElement(this._config.parent)) {
- parent = this._config.parent; // It's a jQuery object
-
- if (typeof this._config.parent.jquery !== 'undefined') {
- parent = this._config.parent[0];
+ if (isElement(parent)) {
+ // it's a jQuery object
+ if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
+ parent = parent[0];
}
} else {
- parent = document.querySelector(this._config.parent);
+ parent = SelectorEngine.findOne(parent);
}
- var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
- var children = [].slice.call(parent.querySelectorAll(selector));
- $(children).each(function (i, element) {
- _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
+ var selector = SELECTOR_DATA_TOGGLE$1 + "[data-parent=\"" + parent + "\"]";
+ SelectorEngine.find(selector, parent).forEach(function (element) {
+ var selected = getElementFromSelector(element);
+
+ _this3._addAriaAndCollapsedClass(selected, [element]);
});
return parent;
};
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
- var isOpen = $(element).hasClass(CLASS_NAME_SHOW$1);
+ if (element) {
+ var isOpen = element.classList.contains(CLASS_NAME_SHOW);
- if (triggerArray.length) {
- $(triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
+ if (triggerArray.length) {
+ triggerArray.forEach(function (elem) {
+ if (isOpen) {
+ elem.classList.remove(CLASS_NAME_COLLAPSED);
+ } else {
+ elem.classList.add(CLASS_NAME_COLLAPSED);
+ }
+
+ elem.setAttribute('aria-expanded', isOpen);
+ });
+ }
}
} // Static
;
- Collapse._getTargetFromElement = function _getTargetFromElement(element) {
- var selector = Util.getSelectorFromElement(element);
- return selector ? document.querySelector(selector) : null;
- };
+ Collapse.collapseInterface = function collapseInterface(element, config) {
+ var data = Data.getData(element, DATA_KEY$3);
- Collapse._jQueryInterface = function _jQueryInterface(config) {
- return this.each(function () {
- var $this = $(this);
- var data = $this.data(DATA_KEY$3);
+ var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default$1), Manipulator.getDataAttributes(element)), typeof config === 'object' && config ? config : {});
- var _config = _extends({}, Default$1, $this.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);
- $this.data(DATA_KEY$3, 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]();
- }
+ Collapse.jQueryInterface = function jQueryInterface(config) {
+ return this.each(function () {
+ Collapse.collapseInterface(this, config);
});
};
+ Collapse.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY$3);
+ };
+
_createClass(Collapse, null, [{
key: "VERSION",
get: function get() {
@@ -1482,36 +2057,54 @@
*/
- $(document).on(EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$1, function (event) {
+ EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$1, 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.preventDefault();
}
- var $trigger = $(this);
- var selector = Util.getSelectorFromElement(this);
- var selectors = [].slice.call(document.querySelectorAll(selector));
- $(selectors).each(function () {
- var $target = $(this);
- var data = $target.data(DATA_KEY$3);
- var config = data ? 'toggle' : $trigger.data();
+ var triggerData = Manipulator.getDataAttributes(this);
+ var selector = getSelectorFromElement(this);
+ var selectorElements = SelectorEngine.find(selector);
+ selectorElements.forEach(function (element) {
+ var data = Data.getData(element, DATA_KEY$3);
+ var 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);
});
});
+ var $$4 = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .collapse to jQuery only if jQuery is present
*/
- $.fn[NAME$3] = Collapse._jQueryInterface;
- $.fn[NAME$3].Constructor = Collapse;
+ /* istanbul ignore if */
- $.fn[NAME$3].noConflict = function () {
- $.fn[NAME$3] = JQUERY_NO_CONFLICT$3;
- return Collapse._jQueryInterface;
- };
+ if ($$4) {
+ var JQUERY_NO_CONFLICT$3 = $$4.fn[NAME$3];
+ $$4.fn[NAME$3] = Collapse.jQueryInterface;
+ $$4.fn[NAME$3].Constructor = Collapse;
+
+ $$4.fn[NAME$3].noConflict = function () {
+ $$4.fn[NAME$3] = JQUERY_NO_CONFLICT$3;
+ return Collapse.jQueryInterface;
+ };
+ }
/**
* ------------------------------------------------------------------------
@@ -1520,24 +2113,18 @@
*/
var NAME$4 = 'dropdown';
- var VERSION$4 = '4.5.2';
+ var VERSION$4 = '5.0.0-alpha1';
var DATA_KEY$4 = 'bs.dropdown';
var EVENT_KEY$4 = "." + DATA_KEY$4;
var DATA_API_KEY$4 = '.data-api';
- var JQUERY_NO_CONFLICT$4 = $.fn[NAME$4];
- 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 ESCAPE_KEY = 'Escape';
+ var SPACE_KEY = 'Space';
+ var TAB_KEY = 'Tab';
+ var ARROW_UP_KEY = 'ArrowUp';
+ var ARROW_DOWN_KEY = 'ArrowDown';
+ var RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
+
+ var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEY + "|" + ARROW_DOWN_KEY + "|" + ESCAPE_KEY);
var EVENT_HIDE$1 = "hide" + EVENT_KEY$4;
var EVENT_HIDDEN$1 = "hidden" + EVENT_KEY$4;
var EVENT_SHOW$1 = "show" + EVENT_KEY$4;
@@ -1547,11 +2134,12 @@
var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY$4 + DATA_API_KEY$4;
var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY$4 + DATA_API_KEY$4;
var CLASS_NAME_DISABLED = 'disabled';
- var CLASS_NAME_SHOW$2 = 'show';
+ var CLASS_NAME_SHOW$1 = '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_NAVBAR = 'navbar';
var CLASS_NAME_POSITION_STATIC = 'position-static';
var SELECTOR_DATA_TOGGLE$2 = '[data-toggle="dropdown"]';
var SELECTOR_FORM_CHILD = '.dropdown form';
@@ -1595,6 +2183,8 @@
this._inNavbar = this._detectNavbar();
this._addEventListeners();
+
+ Data.setData(element, DATA_KEY$4, this);
} // Getters
@@ -1602,58 +2192,47 @@
// Public
_proto.toggle = function toggle() {
- if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED)) {
+ if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED)) {
return;
}
- var isActive = $(this._menu).hasClass(CLASS_NAME_SHOW$2);
+ var isActive = this._element.classList.contains(CLASS_NAME_SHOW$1);
- Dropdown._clearMenus();
+ Dropdown.clearMenus();
if (isActive) {
return;
}
- this.show(true);
+ this.show();
};
- _proto.show = function show(usePopper) {
- if (usePopper === void 0) {
- usePopper = false;
- }
-
- if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || $(this._menu).hasClass(CLASS_NAME_SHOW$2)) {
+ _proto.show = function show() {
+ if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW$1)) {
return;
}
+ var parent = Dropdown.getParentFromElement(this._element);
var relatedTarget = {
relatedTarget: this._element
};
- var showEvent = $.Event(EVENT_SHOW$1, relatedTarget);
+ var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$1, relatedTarget);
- var parent = Dropdown._getParentFromElement(this._element);
-
- $(parent).trigger(showEvent);
-
- if (showEvent.isDefaultPrevented()) {
+ if (showEvent.defaultPrevented) {
return;
} // Disable totally Popper.js for Dropdown in Navbar
- if (!this._inNavbar && usePopper) {
- /**
- * Check for Popper dependency
- * Popper - https://popper.js.org
- */
+ if (!this._inNavbar) {
if (typeof Popper === 'undefined') {
- throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)');
+ throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org)');
}
var referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
- } else if (Util.isElement(this._config.reference)) {
+ } else if (isElement(this._config.reference)) {
referenceElement = this._config.reference; // Check if it's jQuery element
if (typeof this._config.reference.jquery !== 'undefined') {
@@ -1665,7 +2244,7 @@
if (this._config.boundary !== 'scrollParent') {
- $(parent).addClass(CLASS_NAME_POSITION_STATIC);
+ parent.classList.add(CLASS_NAME_POSITION_STATIC);
}
this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
@@ -1675,33 +2254,35 @@
// 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);
+ if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {
+ var _ref;
+
+ (_ref = []).concat.apply(_ref, document.body.children).forEach(function (elem) {
+ return EventHandler.on(elem, 'mouseover', null, noop());
+ });
}
this._element.focus();
this._element.setAttribute('aria-expanded', true);
- $(this._menu).toggleClass(CLASS_NAME_SHOW$2);
- $(parent).toggleClass(CLASS_NAME_SHOW$2).trigger($.Event(EVENT_SHOWN$1, relatedTarget));
+ Manipulator.toggleClass(this._menu, CLASS_NAME_SHOW$1);
+ Manipulator.toggleClass(this._element, CLASS_NAME_SHOW$1);
+ EventHandler.trigger(parent, EVENT_SHOWN$1, relatedTarget);
};
_proto.hide = function hide() {
- if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || !$(this._menu).hasClass(CLASS_NAME_SHOW$2)) {
+ if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW$1)) {
return;
}
+ var parent = Dropdown.getParentFromElement(this._element);
var relatedTarget = {
relatedTarget: this._element
};
- var hideEvent = $.Event(EVENT_HIDE$1, relatedTarget);
-
- var parent = Dropdown._getParentFromElement(this._element);
+ var hideEvent = EventHandler.trigger(parent, EVENT_HIDE$1, relatedTarget);
- $(parent).trigger(hideEvent);
-
- if (hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
return;
}
@@ -1709,17 +2290,18 @@
this._popper.destroy();
}
- $(this._menu).toggleClass(CLASS_NAME_SHOW$2);
- $(parent).toggleClass(CLASS_NAME_SHOW$2).trigger($.Event(EVENT_HIDDEN$1, relatedTarget));
+ Manipulator.toggleClass(this._menu, CLASS_NAME_SHOW$1);
+ Manipulator.toggleClass(this._element, CLASS_NAME_SHOW$1);
+ EventHandler.trigger(parent, EVENT_HIDDEN$1, relatedTarget);
};
_proto.dispose = function dispose() {
- $.removeData(this._element, DATA_KEY$4);
- $(this._element).off(EVENT_KEY$4);
+ Data.removeData(this._element, DATA_KEY$4);
+ EventHandler.off(this._element, EVENT_KEY$4);
this._element = null;
this._menu = null;
- if (this._popper !== null) {
+ if (this._popper) {
this._popper.destroy();
this._popper = null;
@@ -1729,7 +2311,7 @@
_proto.update = function update() {
this._inNavbar = this._detectNavbar();
- if (this._popper !== null) {
+ if (this._popper) {
this._popper.scheduleUpdate();
}
} // Private
@@ -1738,7 +2320,7 @@
_proto._addEventListeners = function _addEventListeners() {
var _this = this;
- $(this._element).on(EVENT_CLICK, function (event) {
+ EventHandler.on(this._element, EVENT_CLICK, function (event) {
event.preventDefault();
event.stopPropagation();
@@ -1747,34 +2329,30 @@
};
_proto._getConfig = function _getConfig(config) {
- config = _extends({}, this.constructor.Default, $(this._element).data(), config);
- Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
+ config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), Manipulator.getDataAttributes(this._element)), config);
+ typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
return config;
};
_proto._getMenuElement = function _getMenuElement() {
- if (!this._menu) {
- var parent = Dropdown._getParentFromElement(this._element);
-
- if (parent) {
- this._menu = parent.querySelector(SELECTOR_MENU);
- }
- }
-
- return this._menu;
+ return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
};
_proto._getPlacement = function _getPlacement() {
- var $parentDropdown = $(this._element.parentNode);
+ var parentDropdown = this._element.parentNode;
var 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)) {
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
+ placement = PLACEMENT_TOP;
+
+ if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
+ placement = PLACEMENT_TOPEND;
+ }
+ } else if (parentDropdown.classList.contains(CLASS_NAME_DROPRIGHT)) {
placement = PLACEMENT_RIGHT;
- } else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
+ } else if (parentDropdown.classList.contains(CLASS_NAME_DROPLEFT)) {
placement = PLACEMENT_LEFT;
- } else if ($(this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
+ } else if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
placement = PLACEMENT_BOTTOMEND;
}
@@ -1782,7 +2360,7 @@
};
_proto._detectNavbar = function _detectNavbar() {
- return $(this._element).closest('.navbar').length > 0;
+ return Boolean(this._element.closest("." + CLASS_NAME_NAVBAR));
};
_proto._getOffset = function _getOffset() {
@@ -1792,7 +2370,7 @@
if (typeof this._config.offset === 'function') {
offset.fn = function (data) {
- data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
+ data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this2._config.offset(data.offsets, _this2._element) || {});
return data;
};
} else {
@@ -1822,42 +2400,44 @@
};
}
- return _extends({}, popperConfig, this._config.popperConfig);
+ return _objectSpread2(_objectSpread2({}, popperConfig), this._config.popperConfig);
} // Static
;
- Dropdown._jQueryInterface = function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY$4);
+ Dropdown.dropdownInterface = function dropdownInterface(element, config) {
+ var data = Data.getData(element, DATA_KEY$4);
- var _config = typeof config === 'object' ? config : null;
+ var _config = typeof config === 'object' ? config : null;
- if (!data) {
- data = new Dropdown(this, _config);
- $(this).data(DATA_KEY$4, data);
+ if (!data) {
+ data = new Dropdown(element, _config);
+ }
+
+ 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]();
- }
+ Dropdown.jQueryInterface = function jQueryInterface(config) {
+ return this.each(function () {
+ Dropdown.dropdownInterface(this, config);
});
};
- Dropdown._clearMenus = function _clearMenus(event) {
- if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
+ Dropdown.clearMenus = function clearMenus(event) {
+ if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
return;
}
- var toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$2));
+ var toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$2);
for (var i = 0, len = toggles.length; i < len; i++) {
- var parent = Dropdown._getParentFromElement(toggles[i]);
-
- var context = $(toggles[i]).data(DATA_KEY$4);
+ var parent = Dropdown.getParentFromElement(toggles[i]);
+ var context = Data.getData(toggles[i], DATA_KEY$4);
var relatedTarget = {
relatedTarget: toggles[i]
};
@@ -1872,25 +2452,28 @@
var dropdownMenu = context._menu;
- if (!$(parent).hasClass(CLASS_NAME_SHOW$2)) {
+ if (!toggles[i].classList.contains(CLASS_NAME_SHOW$1)) {
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 (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.key === TAB_KEY) && dropdownMenu.contains(event.target)) {
continue;
}
- var hideEvent = $.Event(EVENT_HIDE$1, relatedTarget);
- $(parent).trigger(hideEvent);
+ var hideEvent = EventHandler.trigger(parent, EVENT_HIDE$1, relatedTarget);
- if (hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
continue;
} // 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);
+ var _ref2;
+
+ (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (elem) {
+ return EventHandler.off(elem, 'mouseover', null, noop());
+ });
}
toggles[i].setAttribute('aria-expanded', 'false');
@@ -1899,24 +2482,17 @@
context._popper.destroy();
}
- $(dropdownMenu).removeClass(CLASS_NAME_SHOW$2);
- $(parent).removeClass(CLASS_NAME_SHOW$2).trigger($.Event(EVENT_HIDDEN$1, relatedTarget));
+ dropdownMenu.classList.remove(CLASS_NAME_SHOW$1);
+ toggles[i].classList.remove(CLASS_NAME_SHOW$1);
+ EventHandler.trigger(parent, EVENT_HIDDEN$1, relatedTarget);
}
};
- Dropdown._getParentFromElement = function _getParentFromElement(element) {
- var parent;
- var selector = Util.getSelectorFromElement(element);
-
- if (selector) {
- parent = document.querySelector(selector);
- }
-
- return parent || element.parentNode;
- } // eslint-disable-next-line complexity
- ;
+ Dropdown.getParentFromElement = function getParentFromElement(element) {
+ return getElementFromSelector(element) || element.parentNode;
+ };
- Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
+ Dropdown.dataApiKeydownHandler = function dataApiKeydownHandler(event) {
// If not input/textarea:
// - And not a key in REGEXP_KEYDOWN => not a dropdown command
// If input/textarea:
@@ -1924,61 +2500,59 @@
// - 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 || $(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 || $(this).hasClass(CLASS_NAME_DISABLED)) {
+ event.preventDefault();
+ event.stopPropagation();
+
+ if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) {
return;
}
- var parent = Dropdown._getParentFromElement(this);
-
- var isActive = $(parent).hasClass(CLASS_NAME_SHOW$2);
+ var parent = Dropdown.getParentFromElement(this);
+ var isActive = this.classList.contains(CLASS_NAME_SHOW$1);
- if (!isActive && event.which === ESCAPE_KEYCODE) {
+ if (event.key === ESCAPE_KEY) {
+ var button = this.matches(SELECTOR_DATA_TOGGLE$2) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$2)[0];
+ button.focus();
+ Dropdown.clearMenus();
return;
}
- event.preventDefault();
- event.stopPropagation();
-
- if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
- if (event.which === ESCAPE_KEYCODE) {
- $(parent.querySelector(SELECTOR_DATA_TOGGLE$2)).trigger('focus');
- }
-
- $(this).trigger('click');
+ if (!isActive || event.key === SPACE_KEY) {
+ Dropdown.clearMenus();
return;
}
- var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) {
- return $(item).is(':visible');
- });
+ var items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, parent).filter(isVisible);
- if (items.length === 0) {
+ if (!items.length) {
return;
}
var index = items.indexOf(event.target);
- if (event.which === ARROW_UP_KEYCODE && index > 0) {
+ if (event.key === ARROW_UP_KEY && index > 0) {
// Up
index--;
}
- if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
+ if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
// Down
index++;
- }
+ } // index is -1 if the first keydown is an ArrowUp
- if (index < 0) {
- index = 0;
- }
+ index = index === -1 ? 0 : index;
items[index].focus();
};
+ Dropdown.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY$4);
+ };
+
_createClass(Dropdown, null, [{
key: "VERSION",
get: function get() {
@@ -2005,27 +2579,38 @@
*/
- $(document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$2, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API$4 + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$2, function (event) {
+ EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$2, Dropdown.dataApiKeydownHandler);
+ EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
+ EventHandler.on(document, EVENT_CLICK_DATA_API$4, Dropdown.clearMenus);
+ EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
+ EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$2, function (event) {
event.preventDefault();
event.stopPropagation();
-
- Dropdown._jQueryInterface.call($(this), 'toggle');
- }).on(EVENT_CLICK_DATA_API$4, SELECTOR_FORM_CHILD, function (e) {
- e.stopPropagation();
+ Dropdown.dropdownInterface(this, 'toggle');
+ });
+ EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_FORM_CHILD, function (e) {
+ return e.stopPropagation();
});
+ var $$5 = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .dropdown to jQuery only if jQuery is present
*/
- $.fn[NAME$4] = Dropdown._jQueryInterface;
- $.fn[NAME$4].Constructor = Dropdown;
+ /* istanbul ignore if */
- $.fn[NAME$4].noConflict = function () {
- $.fn[NAME$4] = JQUERY_NO_CONFLICT$4;
- return Dropdown._jQueryInterface;
- };
+ if ($$5) {
+ var JQUERY_NO_CONFLICT$4 = $$5.fn[NAME$4];
+ $$5.fn[NAME$4] = Dropdown.jQueryInterface;
+ $$5.fn[NAME$4].Constructor = Dropdown;
+
+ $$5.fn[NAME$4].noConflict = function () {
+ $$5.fn[NAME$4] = JQUERY_NO_CONFLICT$4;
+ return Dropdown.jQueryInterface;
+ };
+ }
/**
* ------------------------------------------------------------------------
@@ -2034,13 +2619,11 @@
*/
var NAME$5 = 'modal';
- var VERSION$5 = '4.5.2';
+ var VERSION$5 = '5.0.0-alpha1';
var DATA_KEY$5 = 'bs.modal';
var EVENT_KEY$5 = "." + DATA_KEY$5;
var DATA_API_KEY$5 = '.data-api';
- var JQUERY_NO_CONFLICT$5 = $.fn[NAME$5];
- var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key
-
+ var ESCAPE_KEY$1 = 'Escape';
var Default$3 = {
backdrop: true,
keyboard: true,
@@ -2065,12 +2648,11 @@
var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY$5;
var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY$5;
var EVENT_CLICK_DATA_API$5 = "click" + EVENT_KEY$5 + DATA_API_KEY$5;
- 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$1 = 'fade';
- var CLASS_NAME_SHOW$3 = 'show';
+ var CLASS_NAME_FADE = 'fade';
+ var CLASS_NAME_SHOW$2 = 'show';
var CLASS_NAME_STATIC = 'modal-static';
var SELECTOR_DIALOG = '.modal-dialog';
var SELECTOR_MODAL_BODY = '.modal-body';
@@ -2088,13 +2670,14 @@
function Modal(element, config) {
this._config = this._getConfig(config);
this._element = element;
- this._dialog = element.querySelector(SELECTOR_DIALOG);
+ this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, element);
this._backdrop = null;
this._isShown = false;
this._isBodyOverflowing = false;
this._ignoreBackdropClick = false;
this._isTransitioning = false;
this._scrollbarWidth = 0;
+ Data.setData(element, DATA_KEY$5, this);
} // Getters
@@ -2112,16 +2695,15 @@
return;
}
- if ($(this._element).hasClass(CLASS_NAME_FADE$1)) {
+ if (this._element.classList.contains(CLASS_NAME_FADE)) {
this._isTransitioning = true;
}
- var showEvent = $.Event(EVENT_SHOW$2, {
+ var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$2, {
relatedTarget: relatedTarget
});
- $(this._element).trigger(showEvent);
- if (this._isShown || showEvent.isDefaultPrevented()) {
+ if (this._isShown || showEvent.defaultPrevented) {
return;
}
@@ -2137,12 +2719,12 @@
this._setResizeEvent();
- $(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
+ EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
return _this.hide(event);
});
- $(this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
- $(_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
- if ($(event.target).is(_this._element)) {
+ EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, function () {
+ EventHandler.one(_this._element, EVENT_MOUSEUP_DISMISS, function (event) {
+ if (event.target === _this._element) {
_this._ignoreBackdropClick = true;
}
});
@@ -2164,15 +2746,15 @@
return;
}
- var hideEvent = $.Event(EVENT_HIDE$2);
- $(this._element).trigger(hideEvent);
+ var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$2);
- if (!this._isShown || hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
return;
}
this._isShown = false;
- var transition = $(this._element).hasClass(CLASS_NAME_FADE$1);
+
+ var transition = this._element.classList.contains(CLASS_NAME_FADE);
if (transition) {
this._isTransitioning = true;
@@ -2182,16 +2764,19 @@
this._setResizeEvent();
- $(document).off(EVENT_FOCUSIN);
- $(this._element).removeClass(CLASS_NAME_SHOW$3);
- $(this._element).off(EVENT_CLICK_DISMISS);
- $(this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
+ EventHandler.off(document, EVENT_FOCUSIN);
+
+ this._element.classList.remove(CLASS_NAME_SHOW$2);
+
+ EventHandler.off(this._element, EVENT_CLICK_DISMISS);
+ EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
if (transition) {
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
- $(this._element).one(Util.TRANSITION_END, function (event) {
+ var transitionDuration = getTransitionDurationFromElement(this._element);
+ EventHandler.one(this._element, TRANSITION_END, function (event) {
return _this2._hideModal(event);
- }).emulateTransitionEnd(transitionDuration);
+ });
+ emulateTransitionEnd(this._element, transitionDuration);
} else {
this._hideModal();
}
@@ -2199,7 +2784,7 @@
_proto.dispose = function dispose() {
[window, this._element, this._dialog].forEach(function (htmlElement) {
- return $(htmlElement).off(EVENT_KEY$5);
+ return EventHandler.off(htmlElement, EVENT_KEY$5);
});
/**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
@@ -2207,8 +2792,8 @@
* It will remove `EVENT_CLICK_DATA_API` event that should remain
*/
- $(document).off(EVENT_FOCUSIN);
- $.removeData(this._element, DATA_KEY$5);
+ EventHandler.off(document, EVENT_FOCUSIN);
+ Data.removeData(this._element, DATA_KEY$5);
this._config = null;
this._element = null;
this._dialog = null;
@@ -2226,53 +2811,17 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _extends({}, Default$3, config);
- Util.typeCheckConfig(NAME$5, config, DefaultType$3);
+ config = _objectSpread2(_objectSpread2({}, Default$3), config);
+ typeCheckConfig(NAME$5, config, DefaultType$3);
return config;
};
- _proto._triggerBackdropTransition = function _triggerBackdropTransition() {
+ _proto._showElement = function _showElement(relatedTarget) {
var _this3 = this;
- if (this._config.backdrop === 'static') {
- var hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED);
- $(this._element).trigger(hideEventPrevented);
-
- if (hideEventPrevented.defaultPrevented) {
- 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.getTransitionDurationFromElement(this._dialog);
- $(this._element).off(Util.TRANSITION_END);
- $(this._element).one(Util.TRANSITION_END, function () {
- _this3._element.classList.remove(CLASS_NAME_STATIC);
+ var transition = this._element.classList.contains(CLASS_NAME_FADE);
- if (!isModalOverflowing) {
- $(_this3._element).one(Util.TRANSITION_END, function () {
- _this3._element.style.overflowY = '';
- }).emulateTransitionEnd(_this3._element, modalTransitionDuration);
- }
- }).emulateTransitionEnd(modalTransitionDuration);
-
- this._element.focus();
- } else {
- this.hide();
- }
- };
-
- _proto._showElement = function _showElement(relatedTarget) {
- var _this4 = this;
-
- var transition = $(this._element).hasClass(CLASS_NAME_FADE$1);
- var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null;
+ var modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position
@@ -2287,86 +2836,86 @@
this._element.setAttribute('role', 'dialog');
- if ($(this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
+ this._element.scrollTop = 0;
+
+ if (modalBody) {
modalBody.scrollTop = 0;
- } else {
- this._element.scrollTop = 0;
}
if (transition) {
- Util.reflow(this._element);
+ reflow(this._element);
}
- $(this._element).addClass(CLASS_NAME_SHOW$3);
+ this._element.classList.add(CLASS_NAME_SHOW$2);
if (this._config.focus) {
this._enforceFocus();
}
- var shownEvent = $.Event(EVENT_SHOWN$2, {
- relatedTarget: relatedTarget
- });
-
var transitionComplete = function transitionComplete() {
- if (_this4._config.focus) {
- _this4._element.focus();
+ if (_this3._config.focus) {
+ _this3._element.focus();
}
- _this4._isTransitioning = false;
- $(_this4._element).trigger(shownEvent);
+ _this3._isTransitioning = false;
+ EventHandler.trigger(_this3._element, EVENT_SHOWN$2, {
+ relatedTarget: relatedTarget
+ });
};
if (transition) {
- var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
- $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
+ var transitionDuration = getTransitionDurationFromElement(this._dialog);
+ EventHandler.one(this._dialog, TRANSITION_END, transitionComplete);
+ emulateTransitionEnd(this._dialog, transitionDuration);
} else {
transitionComplete();
}
};
_proto._enforceFocus = function _enforceFocus() {
- var _this5 = this;
+ var _this4 = this;
+
+ EventHandler.off(document, EVENT_FOCUSIN); // guard against infinite focus loop
- $(document).off(EVENT_FOCUSIN) // Guard against infinite focus loop
- .on(EVENT_FOCUSIN, function (event) {
- if (document !== event.target && _this5._element !== event.target && $(_this5._element).has(event.target).length === 0) {
- _this5._element.focus();
+ EventHandler.on(document, EVENT_FOCUSIN, function (event) {
+ if (document !== event.target && _this4._element !== event.target && !_this4._element.contains(event.target)) {
+ _this4._element.focus();
}
});
};
_proto._setEscapeEvent = function _setEscapeEvent() {
- var _this6 = this;
+ var _this5 = this;
if (this._isShown) {
- $(this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
- if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE$1) {
+ EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, function (event) {
+ if (_this5._config.keyboard && event.key === ESCAPE_KEY$1) {
event.preventDefault();
- _this6.hide();
- } else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE$1) {
- _this6._triggerBackdropTransition();
+ _this5.hide();
+ } else if (!_this5._config.keyboard && event.key === ESCAPE_KEY$1) {
+ _this5._triggerBackdropTransition();
}
});
- } else if (!this._isShown) {
- $(this._element).off(EVENT_KEYDOWN_DISMISS);
+ } else {
+ EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS);
}
};
_proto._setResizeEvent = function _setResizeEvent() {
- var _this7 = this;
+ var _this6 = this;
if (this._isShown) {
- $(window).on(EVENT_RESIZE, function (event) {
- return _this7.handleUpdate(event);
+ EventHandler.on(window, EVENT_RESIZE, function () {
+ return _this6._adjustDialog();
});
} else {
- $(window).off(EVENT_RESIZE);
+ EventHandler.off(window, EVENT_RESIZE);
}
};
_proto._hideModal = function _hideModal() {
- var _this8 = this;
+ var _this7 = this;
this._element.style.display = 'none';
@@ -2379,27 +2928,26 @@
this._isTransitioning = false;
this._showBackdrop(function () {
- $(document.body).removeClass(CLASS_NAME_OPEN);
+ document.body.classList.remove(CLASS_NAME_OPEN);
- _this8._resetAdjustments();
+ _this7._resetAdjustments();
- _this8._resetScrollbar();
+ _this7._resetScrollbar();
- $(_this8._element).trigger(EVENT_HIDDEN$2);
+ EventHandler.trigger(_this7._element, EVENT_HIDDEN$2);
});
};
_proto._removeBackdrop = function _removeBackdrop() {
- if (this._backdrop) {
- $(this._backdrop).remove();
- this._backdrop = null;
- }
+ this._backdrop.parentNode.removeChild(this._backdrop);
+
+ this._backdrop = null;
};
_proto._showBackdrop = function _showBackdrop(callback) {
- var _this9 = this;
+ var _this8 = this;
- var animate = $(this._element).hasClass(CLASS_NAME_FADE$1) ? CLASS_NAME_FADE$1 : '';
+ var animate = this._element.classList.contains(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
if (this._isShown && this._config.backdrop) {
this._backdrop = document.createElement('div');
@@ -2409,10 +2957,10 @@
this._backdrop.classList.add(animate);
}
- $(this._backdrop).appendTo(document.body);
- $(this._element).on(EVENT_CLICK_DISMISS, function (event) {
- if (_this9._ignoreBackdropClick) {
- _this9._ignoreBackdropClick = false;
+ document.body.appendChild(this._backdrop);
+ EventHandler.on(this._element, EVENT_CLICK_DISMISS, function (event) {
+ if (_this8._ignoreBackdropClick) {
+ _this8._ignoreBackdropClick = false;
return;
}
@@ -2420,50 +2968,69 @@
return;
}
- _this9._triggerBackdropTransition();
+ _this8._triggerBackdropTransition();
});
if (animate) {
- Util.reflow(this._backdrop);
+ reflow(this._backdrop);
}
- $(this._backdrop).addClass(CLASS_NAME_SHOW$3);
-
- if (!callback) {
- return;
- }
+ this._backdrop.classList.add(CLASS_NAME_SHOW$2);
if (!animate) {
callback();
return;
}
- var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
- $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
+ var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
+ EventHandler.one(this._backdrop, TRANSITION_END, callback);
+ emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
} else if (!this._isShown && this._backdrop) {
- $(this._backdrop).removeClass(CLASS_NAME_SHOW$3);
+ this._backdrop.classList.remove(CLASS_NAME_SHOW$2);
var callbackRemove = function callbackRemove() {
- _this9._removeBackdrop();
+ _this8._removeBackdrop();
- if (callback) {
- callback();
- }
+ callback();
};
- if ($(this._element).hasClass(CLASS_NAME_FADE$1)) {
- var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
+ if (this._element.classList.contains(CLASS_NAME_FADE)) {
+ var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
- $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
+ EventHandler.one(this._backdrop, TRANSITION_END, callbackRemove);
+ emulateTransitionEnd(this._backdrop, _backdropTransitionDuration);
} else {
callbackRemove();
}
- } else if (callback) {
+ } else {
callback();
}
+ };
+
+ _proto._triggerBackdropTransition = function _triggerBackdropTransition() {
+ var _this9 = this;
+
+ if (this._config.backdrop === 'static') {
+ var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
+
+ if (hideEvent.defaultPrevented) {
+ return;
+ }
+
+ this._element.classList.add(CLASS_NAME_STATIC);
+
+ var modalTransitionDuration = getTransitionDurationFromElement(this._element);
+ EventHandler.one(this._element, TRANSITION_END, function () {
+ _this9._element.classList.remove(CLASS_NAME_STATIC);
+ });
+ emulateTransitionEnd(this._element, modalTransitionDuration);
+
+ this._element.focus();
+ } else {
+ this.hide();
+ }
} // ----------------------------------------------------------------------
// the following methods are used to handle overflowing modals
- // todo (fat): these should probably be refactored out of modal.js
// ----------------------------------------------------------------------
;
@@ -2496,50 +3063,58 @@
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
-
- $(fixedContent).each(function (index, element) {
+ // Adjust fixed content padding
+ SelectorEngine.find(SELECTOR_FIXED_CONTENT).forEach(function (element) {
var actualPadding = element.style.paddingRight;
- var calculatedPadding = $(element).css('padding-right');
- $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
+ var calculatedPadding = window.getComputedStyle(element)['padding-right'];
+ Manipulator.setDataAttribute(element, 'padding-right', actualPadding);
+ element.style.paddingRight = parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px";
}); // Adjust sticky content margin
- $(stickyContent).each(function (index, element) {
+ SelectorEngine.find(SELECTOR_STICKY_CONTENT).forEach(function (element) {
var actualMargin = element.style.marginRight;
- var calculatedMargin = $(element).css('margin-right');
- $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
+ var calculatedMargin = window.getComputedStyle(element)['margin-right'];
+ Manipulator.setDataAttribute(element, 'margin-right', actualMargin);
+ element.style.marginRight = parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px";
}); // Adjust body padding
var actualPadding = document.body.style.paddingRight;
- var calculatedPadding = $(document.body).css('padding-right');
- $(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
+ var calculatedPadding = window.getComputedStyle(document.body)['padding-right'];
+ Manipulator.setDataAttribute(document.body, 'padding-right', actualPadding);
+ document.body.style.paddingRight = parseFloat(calculatedPadding) + this._scrollbarWidth + "px";
}
- $(document.body).addClass(CLASS_NAME_OPEN);
+ document.body.classList.add(CLASS_NAME_OPEN);
};
_proto._resetScrollbar = function _resetScrollbar() {
// Restore fixed content padding
- var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
- $(fixedContent).each(function (index, element) {
- var padding = $(element).data('padding-right');
- $(element).removeData('padding-right');
- element.style.paddingRight = padding ? padding : '';
- }); // Restore sticky content
+ SelectorEngine.find(SELECTOR_FIXED_CONTENT).forEach(function (element) {
+ var padding = Manipulator.getDataAttribute(element, 'padding-right');
- var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT));
- $(elements).each(function (index, element) {
- var margin = $(element).data('margin-right');
+ if (typeof padding !== 'undefined') {
+ Manipulator.removeDataAttribute(element, 'padding-right');
+ element.style.paddingRight = padding;
+ }
+ }); // Restore sticky content and navbar-toggler margin
+
+ SelectorEngine.find("" + SELECTOR_STICKY_CONTENT).forEach(function (element) {
+ var margin = Manipulator.getDataAttribute(element, 'margin-right');
if (typeof margin !== 'undefined') {
- $(element).css('margin-right', margin).removeData('margin-right');
+ Manipulator.removeDataAttribute(element, 'margin-right');
+ element.style.marginRight = margin;
}
}); // Restore body padding
- var padding = $(document.body).data('padding-right');
- $(document.body).removeData('padding-right');
- document.body.style.paddingRight = padding ? padding : '';
+ var padding = Manipulator.getDataAttribute(document.body, 'padding-right');
+
+ if (typeof padding === 'undefined') {
+ document.body.style.paddingRight = '';
+ } else {
+ Manipulator.removeDataAttribute(document.body, 'padding-right');
+ document.body.style.paddingRight = padding;
+ }
};
_proto._getScrollbarWidth = function _getScrollbarWidth() {
@@ -2553,15 +3128,14 @@
} // Static
;
- Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
+ Modal.jQueryInterface = function jQueryInterface(config, relatedTarget) {
return this.each(function () {
- var data = $(this).data(DATA_KEY$5);
+ var data = Data.getData(this, DATA_KEY$5);
- var _config = _extends({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {});
+ var _config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default$3), Manipulator.getDataAttributes(this)), typeof config === 'object' && config ? config : {});
if (!data) {
data = new Modal(this, _config);
- $(this).data(DATA_KEY$5, data);
}
if (typeof config === 'string') {
@@ -2576,6 +3150,10 @@
});
};
+ Modal.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY$5);
+ };
+
_createClass(Modal, null, [{
key: "VERSION",
get: function get() {
@@ -2597,92 +3175,66 @@
*/
- $(document).on(EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE$3, function (event) {
+ EventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE$3, function (event) {
var _this11 = this;
- var target;
- var selector = Util.getSelectorFromElement(this);
-
- if (selector) {
- target = document.querySelector(selector);
- }
-
- var config = $(target).data(DATA_KEY$5) ? 'toggle' : _extends({}, $(target).data(), $(this).data());
+ var target = getElementFromSelector(this);
if (this.tagName === 'A' || this.tagName === 'AREA') {
event.preventDefault();
}
- var $target = $(target).one(EVENT_SHOW$2, function (showEvent) {
- if (showEvent.isDefaultPrevented()) {
- // Only register focus restorer if modal will actually get shown
+ EventHandler.one(target, EVENT_SHOW$2, function (showEvent) {
+ if (showEvent.defaultPrevented) {
+ // only register focus restorer if modal will actually get shown
return;
}
- $target.one(EVENT_HIDDEN$2, function () {
- if ($(_this11).is(':visible')) {
+ EventHandler.one(target, EVENT_HIDDEN$2, function () {
+ if (isVisible(_this11)) {
_this11.focus();
}
});
});
+ var data = Data.getData(target, DATA_KEY$5);
+
+ if (!data) {
+ var config = _objectSpread2(_objectSpread2({}, Manipulator.getDataAttributes(target)), Manipulator.getDataAttributes(this));
+
+ data = new Modal(target, config);
+ }
- Modal._jQueryInterface.call($(target), config, this);
+ data.show(this);
});
+ var $$6 = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .modal to jQuery only if jQuery is present
*/
- $.fn[NAME$5] = Modal._jQueryInterface;
- $.fn[NAME$5].Constructor = Modal;
+ /* istanbul ignore if */
- $.fn[NAME$5].noConflict = function () {
- $.fn[NAME$5] = JQUERY_NO_CONFLICT$5;
- return Modal._jQueryInterface;
- };
+ if ($$6) {
+ var JQUERY_NO_CONFLICT$5 = $$6.fn[NAME$5];
+ $$6.fn[NAME$5] = Modal.jQueryInterface;
+ $$6.fn[NAME$5].Constructor = Modal;
+
+ $$6.fn[NAME$5].noConflict = function () {
+ $$6.fn[NAME$5] = JQUERY_NO_CONFLICT$5;
+ return Modal.jQueryInterface;
+ };
+ }
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.2): tools/sanitizer.js
+ * Bootstrap (v5.0.0-alpha1): 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 = {
- // 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.
*
@@ -2698,7 +3250,7 @@
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 allowedAttribute = function allowedAttribute(attr, allowedAttributeList) {
var attrName = attr.nodeName.toLowerCase();
if (allowedAttributeList.indexOf(attrName) !== -1) {
@@ -2720,10 +3272,45 @@
}
return false;
- }
+ };
+ var 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: []
+ };
function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
- if (unsafeHtml.length === 0) {
+ var _ref;
+
+ if (!unsafeHtml.length) {
return unsafeHtml;
}
@@ -2734,18 +3321,22 @@
var domParser = new window.DOMParser();
var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
var whitelistKeys = Object.keys(whiteList);
- var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
+
+ var elements = (_ref = []).concat.apply(_ref, createdDocument.body.querySelectorAll('*'));
var _loop = function _loop(i, len) {
+ var _ref2;
+
var el = elements[i];
var elName = el.nodeName.toLowerCase();
- if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
+ if (whitelistKeys.indexOf(elName) === -1) {
el.parentNode.removeChild(el);
return "continue";
}
- var attributeList = [].slice.call(el.attributes);
+ var attributeList = (_ref2 = []).concat.apply(_ref2, el.attributes);
+
var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
attributeList.forEach(function (attr) {
if (!allowedAttribute(attr, whitelistedAttributes)) {
@@ -2770,10 +3361,9 @@
*/
var NAME$6 = 'tooltip';
- var VERSION$6 = '4.5.2';
+ var VERSION$6 = '5.0.0-alpha1';
var DATA_KEY$6 = 'bs.tooltip';
var EVENT_KEY$6 = "." + DATA_KEY$6;
- var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6];
var CLASS_PREFIX = 'bs-tooltip';
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
@@ -2804,7 +3394,7 @@
};
var Default$4 = {
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,
@@ -2820,9 +3410,7 @@
whiteList: DefaultWhitelist,
popperConfig: null
};
- var HOVER_STATE_SHOW = 'show';
- var HOVER_STATE_OUT = 'out';
- var Event = {
+ var Event$1 = {
HIDE: "hide" + EVENT_KEY$6,
HIDDEN: "hidden" + EVENT_KEY$6,
SHOW: "show" + EVENT_KEY$6,
@@ -2834,10 +3422,12 @@
MOUSEENTER: "mouseenter" + EVENT_KEY$6,
MOUSELEAVE: "mouseleave" + EVENT_KEY$6
};
- var CLASS_NAME_FADE$2 = 'fade';
- var CLASS_NAME_SHOW$4 = 'show';
+ var CLASS_NAME_FADE$1 = 'fade';
+ var CLASS_NAME_MODAL = 'modal';
+ var CLASS_NAME_SHOW$3 = 'show';
+ var HOVER_STATE_SHOW = 'show';
+ var HOVER_STATE_OUT = 'out';
var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
- var SELECTOR_ARROW = '.arrow';
var TRIGGER_HOVER = 'hover';
var TRIGGER_FOCUS = 'focus';
var TRIGGER_CLICK = 'click';
@@ -2851,7 +3441,7 @@
var Tooltip = /*#__PURE__*/function () {
function Tooltip(element, config) {
if (typeof Popper === 'undefined') {
- throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
+ throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org)');
} // private
@@ -2866,6 +3456,8 @@
this.tip = null;
this._setListeners();
+
+ Data.setData(element, this.constructor.DATA_KEY, this);
} // Getters
@@ -2891,11 +3483,11 @@
if (event) {
var dataKey = this.constructor.DATA_KEY;
- var context = $(event.currentTarget).data(dataKey);
+ var context = Data.getData(event.target, dataKey);
if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $(event.currentTarget).data(dataKey, context);
+ context = new this.constructor(event.target, this._getDelegateConfig());
+ Data.setData(event.target, dataKey, context);
}
context._activeTrigger.click = !context._activeTrigger.click;
@@ -2906,7 +3498,7 @@
context._leave(null, context);
}
} else {
- if ($(this.getTipElement()).hasClass(CLASS_NAME_SHOW$4)) {
+ if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$3)) {
this._leave(null, this);
return;
@@ -2918,12 +3510,12 @@
_proto.dispose = function dispose() {
clearTimeout(this._timeout);
- $.removeData(this.element, this.constructor.DATA_KEY);
- $(this.element).off(this.constructor.EVENT_KEY);
- $(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
+ Data.removeData(this.element, this.constructor.DATA_KEY);
+ EventHandler.off(this.element, this.constructor.EVENT_KEY);
+ EventHandler.off(this.element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
if (this.tip) {
- $(this.tip).remove();
+ this.tip.parentNode.removeChild(this.tip);
}
this._isEnabled = null;
@@ -2944,54 +3536,56 @@
_proto.show = function show() {
var _this = this;
- if ($(this.element).css('display') === 'none') {
+ if (this.element.style.display === 'none') {
throw new Error('Please use show on visible elements');
}
- var showEvent = $.Event(this.constructor.Event.SHOW);
-
if (this.isWithContent() && this._isEnabled) {
- $(this.element).trigger(showEvent);
- var shadowRoot = Util.findShadowRoot(this.element);
- var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
+ var showEvent = EventHandler.trigger(this.element, this.constructor.Event.SHOW);
+ var shadowRoot = findShadowRoot(this.element);
+ var isInTheDom = shadowRoot === null ? this.element.ownerDocument.documentElement.contains(this.element) : shadowRoot.contains(this.element);
- if (showEvent.isDefaultPrevented() || !isInTheDom) {
+ if (showEvent.defaultPrevented || !isInTheDom) {
return;
}
var tip = this.getTipElement();
- var tipId = Util.getUID(this.constructor.NAME);
+ var tipId = getUID(this.constructor.NAME);
tip.setAttribute('id', tipId);
this.element.setAttribute('aria-describedby', tipId);
this.setContent();
if (this.config.animation) {
- $(tip).addClass(CLASS_NAME_FADE$2);
+ tip.classList.add(CLASS_NAME_FADE$1);
}
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
var attachment = this._getAttachment(placement);
- this.addAttachmentClass(attachment);
+ this._addAttachmentClass(attachment);
var container = this._getContainer();
- $(tip).data(this.constructor.DATA_KEY, this);
+ Data.setData(tip, this.constructor.DATA_KEY, this);
- if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
- $(tip).appendTo(container);
+ if (!this.element.ownerDocument.documentElement.contains(this.tip)) {
+ container.appendChild(tip);
}
- $(this.element).trigger(this.constructor.Event.INSERTED);
+ EventHandler.trigger(this.element, this.constructor.Event.INSERTED);
this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
- $(tip).addClass(CLASS_NAME_SHOW$4); // If this is a touch-enabled device we add extra
+ tip.classList.add(CLASS_NAME_SHOW$3); // 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);
+ var _ref;
+
+ (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) {
+ EventHandler.on(element, 'mouseover', noop());
+ });
}
var complete = function complete() {
@@ -3001,27 +3595,27 @@
var prevHoverState = _this._hoverState;
_this._hoverState = null;
- $(_this.element).trigger(_this.constructor.Event.SHOWN);
+ EventHandler.trigger(_this.element, _this.constructor.Event.SHOWN);
if (prevHoverState === HOVER_STATE_OUT) {
_this._leave(null, _this);
}
};
- if ($(this.tip).hasClass(CLASS_NAME_FADE$2)) {
- var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
- $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ if (this.tip.classList.contains(CLASS_NAME_FADE$1)) {
+ var transitionDuration = getTransitionDurationFromElement(this.tip);
+ EventHandler.one(this.tip, TRANSITION_END, complete);
+ emulateTransitionEnd(this.tip, transitionDuration);
} else {
complete();
}
}
};
- _proto.hide = function hide(callback) {
+ _proto.hide = function hide() {
var _this2 = this;
var tip = this.getTipElement();
- var hideEvent = $.Event(this.constructor.Event.HIDE);
var complete = function complete() {
if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
@@ -3032,37 +3626,36 @@
_this2.element.removeAttribute('aria-describedby');
- $(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
-
- if (_this2._popper !== null) {
- _this2._popper.destroy();
- }
+ EventHandler.trigger(_this2.element, _this2.constructor.Event.HIDDEN);
- if (callback) {
- callback();
- }
+ _this2._popper.destroy();
};
- $(this.element).trigger(hideEvent);
+ var hideEvent = EventHandler.trigger(this.element, this.constructor.Event.HIDE);
- if (hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
return;
}
- $(tip).removeClass(CLASS_NAME_SHOW$4); // If this is a touch-enabled device we remove the extra
+ tip.classList.remove(CLASS_NAME_SHOW$3); // 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);
+ var _ref2;
+
+ (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (element) {
+ return 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$2)) {
- var transitionDuration = Util.getTransitionDurationFromElement(tip);
- $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ if (this.tip.classList.contains(CLASS_NAME_FADE$1)) {
+ var transitionDuration = getTransitionDurationFromElement(tip);
+ EventHandler.one(tip, TRANSITION_END, complete);
+ emulateTransitionEnd(tip, transitionDuration);
} else {
complete();
}
@@ -3081,30 +3674,41 @@
return Boolean(this.getTitle());
};
- _proto.addAttachmentClass = function addAttachmentClass(attachment) {
- $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
- };
-
_proto.getTipElement = function getTipElement() {
- this.tip = this.tip || $(this.config.template)[0];
+ if (this.tip) {
+ return this.tip;
+ }
+
+ var 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($(tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
- $(tip).removeClass(CLASS_NAME_FADE$2 + " " + CLASS_NAME_SHOW$4);
+ this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
+ tip.classList.remove(CLASS_NAME_FADE$1, CLASS_NAME_SHOW$3);
};
- _proto.setElementContent = function setElementContent($element, content) {
- if (typeof content === 'object' && (content.nodeType || content.jquery)) {
- // Content is a DOM node or a jQuery
+ _proto.setElementContent = function setElementContent(element, content) {
+ if (element === null) {
+ return;
+ }
+
+ if (typeof content === 'object' && isElement(content)) {
+ if (content.jquery) {
+ content = content[0];
+ } // content is a DOM node or a jQuery
+
+
if (this.config.html) {
- if (!$(content).parent().is($element)) {
- $element.empty().append(content);
+ if (content.parentNode !== element) {
+ element.innerHTML = '';
+ element.appendChild(content);
}
} else {
- $element.text($(content).text());
+ element.textContent = content.textContent;
}
return;
@@ -3115,9 +3719,9 @@
content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
}
- $element.html(content);
+ element.innerHTML = content;
} else {
- $element.text(content);
+ element.textContent = content;
}
};
@@ -3143,7 +3747,7 @@
behavior: this.config.fallbackPlacement
},
arrow: {
- element: SELECTOR_ARROW
+ element: "." + this.constructor.NAME + "-arrow"
},
preventOverflow: {
boundariesElement: this.config.boundary
@@ -3158,7 +3762,11 @@
return _this3._handlePopperPlacementChange(data);
}
};
- return _extends({}, defaultBsConfig, this.config.popperConfig);
+ return _objectSpread2(_objectSpread2({}, defaultBsConfig), this.config.popperConfig);
+ };
+
+ _proto._addAttachmentClass = function _addAttachmentClass(attachment) {
+ this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
};
_proto._getOffset = function _getOffset() {
@@ -3168,7 +3776,7 @@
if (typeof this.config.offset === 'function') {
offset.fn = function (data) {
- data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element) || {});
+ data.offsets = _objectSpread2(_objectSpread2({}, data.offsets), _this4.config.offset(data.offsets, _this4.element) || {});
return data;
};
} else {
@@ -3183,11 +3791,11 @@
return document.body;
}
- if (Util.isElement(this.config.container)) {
- return $(this.config.container);
+ if (isElement(this.config.container)) {
+ return this.config.container;
}
- return $(document).find(this.config.container);
+ return SelectorEngine.findOne(this.config.container);
};
_proto._getAttachment = function _getAttachment(placement) {
@@ -3200,15 +3808,16 @@
var triggers = this.config.trigger.split(' ');
triggers.forEach(function (trigger) {
if (trigger === 'click') {
- $(_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
+ EventHandler.on(_this5.element, _this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
return _this5.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;
- $(_this5.element).on(eventIn, _this5.config.selector, function (event) {
+ EventHandler.on(_this5.element, eventIn, _this5.config.selector, function (event) {
return _this5._enter(event);
- }).on(eventOut, _this5.config.selector, function (event) {
+ });
+ EventHandler.on(_this5.element, eventOut, _this5.config.selector, function (event) {
return _this5._leave(event);
});
}
@@ -3220,10 +3829,10 @@
}
};
- $(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 = _extends({}, this.config, {
+ this.config = _objectSpread2(_objectSpread2({}, this.config), {}, {
trigger: 'manual',
selector: ''
});
@@ -3243,18 +3852,18 @@
_proto._enter = function _enter(event, context) {
var dataKey = this.constructor.DATA_KEY;
- context = context || $(event.currentTarget).data(dataKey);
+ context = context || Data.getData(event.target, dataKey);
if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $(event.currentTarget).data(dataKey, context);
+ context = new this.constructor(event.target, this._getDelegateConfig());
+ Data.setData(event.target, dataKey, context);
}
if (event) {
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
}
- if ($(context.getTipElement()).hasClass(CLASS_NAME_SHOW$4) || context._hoverState === HOVER_STATE_SHOW) {
+ if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) {
context._hoverState = HOVER_STATE_SHOW;
return;
}
@@ -3276,11 +3885,11 @@
_proto._leave = function _leave(event, context) {
var dataKey = this.constructor.DATA_KEY;
- context = context || $(event.currentTarget).data(dataKey);
+ context = context || Data.getData(event.target, dataKey);
if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $(event.currentTarget).data(dataKey, context);
+ context = new this.constructor(event.target, this._getDelegateConfig());
+ Data.setData(event.target, dataKey, context);
}
if (event) {
@@ -3317,13 +3926,18 @@
};
_proto._getConfig = function _getConfig(config) {
- var dataAttributes = $(this.element).data();
+ var dataAttributes = Manipulator.getDataAttributes(this.element);
Object.keys(dataAttributes).forEach(function (dataAttr) {
if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
delete dataAttributes[dataAttr];
}
});
- config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
+
+ if (config && typeof config.container === 'object' && config.container.jquery) {
+ config.container = config.container[0];
+ }
+
+ config = _objectSpread2(_objectSpread2(_objectSpread2({}, this.constructor.Default), dataAttributes), typeof config === 'object' && config ? config : {});
if (typeof config.delay === 'number') {
config.delay = {
@@ -3340,7 +3954,7 @@
config.content = config.content.toString();
}
- Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
+ typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
if (config.sanitize) {
config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
@@ -3364,20 +3978,25 @@
};
_proto._cleanTipClass = function _cleanTipClass() {
- var $tip = $(this.getTipElement());
- var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
+ var tip = this.getTipElement();
+ var 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(function (token) {
+ return token.trim();
+ }).forEach(function (tClass) {
+ return tip.classList.remove(tClass);
+ });
}
};
_proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
- this.tip = popperData.instance.popper;
+ var popperInstance = popperData.instance;
+ this.tip = popperInstance.popper;
this._cleanTipClass();
- this.addAttachmentClass(this._getAttachment(popperData.placement));
+ this._addAttachmentClass(this._getAttachment(popperData.placement));
};
_proto._fixTransition = function _fixTransition() {
@@ -3388,7 +4007,7 @@
return;
}
- $(tip).removeClass(CLASS_NAME_FADE$2);
+ tip.classList.remove(CLASS_NAME_FADE$1);
this.config.animation = false;
this.hide();
this.show();
@@ -3396,9 +4015,9 @@
} // Static
;
- Tooltip._jQueryInterface = function _jQueryInterface(config) {
+ Tooltip.jQueryInterface = function jQueryInterface(config) {
return this.each(function () {
- var data = $(this).data(DATA_KEY$6);
+ var data = Data.getData(this, DATA_KEY$6);
var _config = typeof config === 'object' && config;
@@ -3408,7 +4027,6 @@
if (!data) {
data = new Tooltip(this, _config);
- $(this).data(DATA_KEY$6, data);
}
if (typeof config === 'string') {
@@ -3421,6 +4039,10 @@
});
};
+ Tooltip.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY$6);
+ };
+
_createClass(Tooltip, null, [{
key: "VERSION",
get: function get() {
@@ -3444,7 +4066,7 @@
}, {
key: "Event",
get: function get() {
- return Event;
+ return Event$1;
}
}, {
key: "EVENT_KEY",
@@ -3460,20 +4082,27 @@
return Tooltip;
}();
+
+ var $$7 = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .tooltip to jQuery only if jQuery is present
*/
+ /* istanbul ignore if */
- $.fn[NAME$6] = Tooltip._jQueryInterface;
- $.fn[NAME$6].Constructor = Tooltip;
+ if ($$7) {
+ var JQUERY_NO_CONFLICT$6 = $$7.fn[NAME$6];
+ $$7.fn[NAME$6] = Tooltip.jQueryInterface;
+ $$7.fn[NAME$6].Constructor = Tooltip;
- $.fn[NAME$6].noConflict = function () {
- $.fn[NAME$6] = JQUERY_NO_CONFLICT$6;
- return Tooltip._jQueryInterface;
- };
+ $$7.fn[NAME$6].noConflict = function () {
+ $$7.fn[NAME$6] = JQUERY_NO_CONFLICT$6;
+ return Tooltip.jQueryInterface;
+ };
+ }
/**
* ------------------------------------------------------------------------
@@ -3482,29 +4111,24 @@
*/
var NAME$7 = 'popover';
- var VERSION$7 = '4.5.2';
+ var VERSION$7 = '5.0.0-alpha1';
var DATA_KEY$7 = 'bs.popover';
var EVENT_KEY$7 = "." + DATA_KEY$7;
- var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7];
var CLASS_PREFIX$1 = 'bs-popover';
var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
- var Default$5 = _extends({}, Tooltip.Default, {
+ var Default$5 = _objectSpread2(_objectSpread2({}, Tooltip.Default), {}, {
placement: 'right',
trigger: 'click',
content: '',
- template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
+ template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
});
- var DefaultType$5 = _extends({}, Tooltip.DefaultType, {
+ var DefaultType$5 = _objectSpread2(_objectSpread2({}, Tooltip.DefaultType), {}, {
content: '(string|element|function)'
});
- var CLASS_NAME_FADE$3 = 'fade';
- var CLASS_NAME_SHOW$5 = 'show';
- var SELECTOR_TITLE = '.popover-header';
- var SELECTOR_CONTENT = '.popover-body';
- var Event$1 = {
+ var Event$2 = {
HIDE: "hide" + EVENT_KEY$7,
HIDDEN: "hidden" + EVENT_KEY$7,
SHOW: "show" + EVENT_KEY$7,
@@ -3516,6 +4140,10 @@
MOUSEENTER: "mouseenter" + EVENT_KEY$7,
MOUSELEAVE: "mouseleave" + EVENT_KEY$7
};
+ var CLASS_NAME_FADE$2 = 'fade';
+ var CLASS_NAME_SHOW$4 = 'show';
+ var SELECTOR_TITLE = '.popover-header';
+ var SELECTOR_CONTENT = '.popover-body';
/**
* ------------------------------------------------------------------------
* Class Definition
@@ -3536,19 +4164,10 @@
return this.getTitle() || this._getContent();
};
- _proto.addAttachmentClass = function addAttachmentClass(attachment) {
- $(this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment);
- };
-
- _proto.getTipElement = function getTipElement() {
- this.tip = this.tip || $(this.config.template)[0];
- return this.tip;
- };
-
_proto.setContent = function setContent() {
- var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events
+ var tip = this.getTipElement(); // we use append for html objects to maintain js events
- this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
+ this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());
var content = this._getContent();
@@ -3556,8 +4175,12 @@
content = content.call(this.element);
}
- this.setElementContent($tip.find(SELECTOR_CONTENT), content);
- $tip.removeClass(CLASS_NAME_FADE$3 + " " + CLASS_NAME_SHOW$5);
+ this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
+ tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$4);
+ };
+
+ _proto._addAttachmentClass = function _addAttachmentClass(attachment) {
+ this.getTipElement().classList.add(CLASS_PREFIX$1 + "-" + attachment);
} // Private
;
@@ -3566,18 +4189,22 @@
};
_proto._cleanTipClass = function _cleanTipClass() {
- var $tip = $(this.getTipElement());
- var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1);
+ var tip = this.getTipElement();
+ var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1);
if (tabClass !== null && tabClass.length > 0) {
- $tip.removeClass(tabClass.join(''));
+ tabClass.map(function (token) {
+ return token.trim();
+ }).forEach(function (tClass) {
+ return tip.classList.remove(tClass);
+ });
}
} // Static
;
- Popover._jQueryInterface = function _jQueryInterface(config) {
+ Popover.jQueryInterface = function jQueryInterface(config) {
return this.each(function () {
- var data = $(this).data(DATA_KEY$7);
+ var data = Data.getData(this, DATA_KEY$7);
var _config = typeof config === 'object' ? config : null;
@@ -3587,7 +4214,7 @@
if (!data) {
data = new Popover(this, _config);
- $(this).data(DATA_KEY$7, data);
+ Data.setData(this, DATA_KEY$7, data);
}
if (typeof config === 'string') {
@@ -3600,6 +4227,10 @@
});
};
+ Popover.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY$7);
+ };
+
_createClass(Popover, null, [{
key: "VERSION",
// Getters
@@ -3624,7 +4255,7 @@
}, {
key: "Event",
get: function get() {
- return Event$1;
+ return Event$2;
}
}, {
key: "EVENT_KEY",
@@ -3640,20 +4271,26 @@
return Popover;
}(Tooltip);
+
+ var $$8 = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
+ /* istanbul ignore if */
- $.fn[NAME$7] = Popover._jQueryInterface;
- $.fn[NAME$7].Constructor = Popover;
+ if ($$8) {
+ var JQUERY_NO_CONFLICT$7 = $$8.fn[NAME$7];
+ $$8.fn[NAME$7] = Popover.jQueryInterface;
+ $$8.fn[NAME$7].Constructor = Popover;
- $.fn[NAME$7].noConflict = function () {
- $.fn[NAME$7] = JQUERY_NO_CONFLICT$7;
- return Popover._jQueryInterface;
- };
+ $$8.fn[NAME$7].noConflict = function () {
+ $$8.fn[NAME$7] = JQUERY_NO_CONFLICT$7;
+ return Popover.jQueryInterface;
+ };
+ }
/**
* ------------------------------------------------------------------------
@@ -3662,11 +4299,10 @@
*/
var NAME$8 = 'scrollspy';
- var VERSION$8 = '4.5.2';
+ var VERSION$8 = '5.0.0-alpha1';
var DATA_KEY$8 = 'bs.scrollspy';
var EVENT_KEY$8 = "." + DATA_KEY$8;
var DATA_API_KEY$6 = '.data-api';
- var JQUERY_NO_CONFLICT$8 = $.fn[NAME$8];
var Default$6 = {
offset: 10,
method: 'auto',
@@ -3679,7 +4315,7 @@
};
var EVENT_ACTIVATE = "activate" + EVENT_KEY$8;
var EVENT_SCROLL = "scroll" + EVENT_KEY$8;
- var EVENT_LOAD_DATA_API$2 = "load" + EVENT_KEY$8 + DATA_API_KEY$6;
+ var EVENT_LOAD_DATA_API$1 = "load" + EVENT_KEY$8 + DATA_API_KEY$6;
var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
var CLASS_NAME_ACTIVE$2 = 'active';
var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
@@ -3688,7 +4324,6 @@
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';
@@ -3705,17 +4340,19 @@
this._element = element;
this._scrollElement = element.tagName === 'BODY' ? window : 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, function (event) {
+ EventHandler.on(this._scrollElement, EVENT_SCROLL, function (event) {
return _this._process(event);
});
this.refresh();
this._process();
+
+ Data.setData(element, DATA_KEY$8, this);
} // Getters
@@ -3731,21 +4368,20 @@
this._offsets = [];
this._targets = [];
this._scrollHeight = this._getScrollHeight();
- var targets = [].slice.call(document.querySelectorAll(this._selector));
+ var targets = SelectorEngine.find(this._selector);
targets.map(function (element) {
var target;
- var targetSelector = Util.getSelectorFromElement(element);
+ var targetSelector = getSelectorFromElement(element);
if (targetSelector) {
- target = document.querySelector(targetSelector);
+ target = SelectorEngine.findOne(targetSelector);
}
if (target) {
var targetBCR = target.getBoundingClientRect();
if (targetBCR.width || targetBCR.height) {
- // TODO (fat): remove sketch reliance on jQuery position/offset
- return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
+ return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];
}
}
@@ -3762,8 +4398,8 @@
};
_proto.dispose = function dispose() {
- $.removeData(this._element, DATA_KEY$8);
- $(this._scrollElement).off(EVENT_KEY$8);
+ Data.removeData(this._element, DATA_KEY$8);
+ EventHandler.off(this._scrollElement, EVENT_KEY$8);
this._element = null;
this._scrollElement = null;
this._config = null;
@@ -3776,20 +4412,20 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _extends({}, Default$6, typeof config === 'object' && config ? config : {});
+ config = _objectSpread2(_objectSpread2({}, Default$6), typeof config === 'object' && config ? config : {});
- if (typeof config.target !== 'string' && Util.isElement(config.target)) {
- var id = $(config.target).attr('id');
+ if (typeof config.target !== 'string' && isElement(config.target)) {
+ var id = config.target.id;
if (!id) {
- id = Util.getUID(NAME$8);
- $(config.target).attr('id', id);
+ id = getUID(NAME$8);
+ config.target.id = id;
}
config.target = "#" + id;
}
- Util.typeCheckConfig(NAME$8, config, DefaultType$6);
+ typeCheckConfig(NAME$8, config, DefaultType$6);
return config;
};
@@ -3852,28 +4488,36 @@
return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
});
- var $link = $([].slice.call(document.querySelectorAll(queries.join(','))));
+ var link = SelectorEngine.findOne(queries.join(','));
- if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) {
- $link.closest(SELECTOR_DROPDOWN).find(SELECTOR_DROPDOWN_TOGGLE).addClass(CLASS_NAME_ACTIVE$2);
- $link.addClass(CLASS_NAME_ACTIVE$2);
+ if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
+ SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, link.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$2);
+ link.classList.add(CLASS_NAME_ACTIVE$2);
} else {
// Set triggered link as active
- $link.addClass(CLASS_NAME_ACTIVE$2); // 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$2); // 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$2);
+ link.classList.add(CLASS_NAME_ACTIVE$2);
+ SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP).forEach(function (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(function (item) {
+ return item.classList.add(CLASS_NAME_ACTIVE$2);
+ }); // Handle special case when .nav-link is inside .nav-item
+
+ SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(function (navItem) {
+ SelectorEngine.children(navItem, SELECTOR_NAV_LINKS).forEach(function (item) {
+ return item.classList.add(CLASS_NAME_ACTIVE$2);
+ });
+ });
+ });
}
- $(this._scrollElement).trigger(EVENT_ACTIVATE, {
+ EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {
relatedTarget: target
});
};
_proto._clear = function _clear() {
- [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
+ SelectorEngine.find(this._selector).filter(function (node) {
return node.classList.contains(CLASS_NAME_ACTIVE$2);
}).forEach(function (node) {
return node.classList.remove(CLASS_NAME_ACTIVE$2);
@@ -3881,15 +4525,14 @@
} // Static
;
- ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
+ ScrollSpy.jQueryInterface = function jQueryInterface(config) {
return this.each(function () {
- var data = $(this).data(DATA_KEY$8);
+ var data = Data.getData(this, DATA_KEY$8);
var _config = typeof config === 'object' && config;
if (!data) {
data = new ScrollSpy(this, _config);
- $(this).data(DATA_KEY$8, data);
}
if (typeof config === 'string') {
@@ -3902,6 +4545,10 @@
});
};
+ ScrollSpy.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY$8);
+ };
+
_createClass(ScrollSpy, null, [{
key: "VERSION",
get: function get() {
@@ -3923,29 +4570,30 @@
*/
- $(window).on(EVENT_LOAD_DATA_API$2, function () {
- var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY));
- var scrollSpysLength = scrollSpys.length;
-
- for (var i = scrollSpysLength; i--;) {
- var $spy = $(scrollSpys[i]);
-
- ScrollSpy._jQueryInterface.call($spy, $spy.data());
- }
+ EventHandler.on(window, EVENT_LOAD_DATA_API$1, function () {
+ SelectorEngine.find(SELECTOR_DATA_SPY).forEach(function (spy) {
+ return new ScrollSpy(spy, Manipulator.getDataAttributes(spy));
+ });
});
+ var $$9 = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
- $.fn[NAME$8] = ScrollSpy._jQueryInterface;
- $.fn[NAME$8].Constructor = ScrollSpy;
+ /* istanbul ignore if */
- $.fn[NAME$8].noConflict = function () {
- $.fn[NAME$8] = JQUERY_NO_CONFLICT$8;
- return ScrollSpy._jQueryInterface;
- };
+ if ($$9) {
+ var JQUERY_NO_CONFLICT$8 = $$9.fn[NAME$8];
+ $$9.fn[NAME$8] = ScrollSpy.jQueryInterface;
+ $$9.fn[NAME$8].Constructor = ScrollSpy;
+
+ $$9.fn[NAME$8].noConflict = function () {
+ $$9.fn[NAME$8] = JQUERY_NO_CONFLICT$8;
+ return ScrollSpy.jQueryInterface;
+ };
+ }
/**
* ------------------------------------------------------------------------
@@ -3954,11 +4602,10 @@
*/
var NAME$9 = 'tab';
- var VERSION$9 = '4.5.2';
+ var VERSION$9 = '5.0.0-alpha1';
var DATA_KEY$9 = 'bs.tab';
var EVENT_KEY$9 = "." + DATA_KEY$9;
var DATA_API_KEY$7 = '.data-api';
- var JQUERY_NO_CONFLICT$9 = $.fn[NAME$9];
var EVENT_HIDE$3 = "hide" + EVENT_KEY$9;
var EVENT_HIDDEN$3 = "hidden" + EVENT_KEY$9;
var EVENT_SHOW$3 = "show" + EVENT_KEY$9;
@@ -3967,15 +4614,15 @@
var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
var CLASS_NAME_ACTIVE$3 = 'active';
var CLASS_NAME_DISABLED$1 = 'disabled';
- var CLASS_NAME_FADE$4 = 'fade';
- var CLASS_NAME_SHOW$6 = 'show';
+ var CLASS_NAME_FADE$3 = 'fade';
+ var CLASS_NAME_SHOW$5 = 'show';
var SELECTOR_DROPDOWN$1 = '.dropdown';
var SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';
- var SELECTOR_ACTIVE$2 = '.active';
- var SELECTOR_ACTIVE_UL = '> li > .active';
+ var SELECTOR_ACTIVE$1 = '.active';
+ var SELECTOR_ACTIVE_UL = ':scope > li > .active';
var SELECTOR_DATA_TOGGLE$4 = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]';
var SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
- var SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active';
+ var SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';
/**
* ------------------------------------------------------------------------
* Class Definition
@@ -3985,6 +4632,7 @@
var Tab = /*#__PURE__*/function () {
function Tab(element) {
this._element = element;
+ Data.setData(this._element, DATA_KEY$9, this);
} // Getters
@@ -3994,53 +4642,46 @@
_proto.show = function show() {
var _this = this;
- if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(CLASS_NAME_ACTIVE$3) || $(this._element).hasClass(CLASS_NAME_DISABLED$1)) {
+ if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(CLASS_NAME_ACTIVE$3) || this._element.classList.contains(CLASS_NAME_DISABLED$1)) {
return;
}
- var target;
var previous;
- var listElement = $(this._element).closest(SELECTOR_NAV_LIST_GROUP$1)[0];
- var selector = Util.getSelectorFromElement(this._element);
+ var target = getElementFromSelector(this._element);
+
+ var listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP$1);
if (listElement) {
- var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE$2;
- previous = $.makeArray($(listElement).find(itemSelector));
+ var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE$1;
+ previous = SelectorEngine.find(itemSelector, listElement);
previous = previous[previous.length - 1];
}
- var hideEvent = $.Event(EVENT_HIDE$3, {
- relatedTarget: this._element
- });
- var showEvent = $.Event(EVENT_SHOW$3, {
- relatedTarget: previous
- });
+ var hideEvent = null;
if (previous) {
- $(previous).trigger(hideEvent);
+ hideEvent = EventHandler.trigger(previous, EVENT_HIDE$3, {
+ relatedTarget: this._element
+ });
}
- $(this._element).trigger(showEvent);
+ var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {
+ relatedTarget: previous
+ });
- 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 = $.Event(EVENT_HIDDEN$3, {
+ EventHandler.trigger(previous, EVENT_HIDDEN$3, {
relatedTarget: _this._element
});
- var shownEvent = $.Event(EVENT_SHOWN$3, {
+ EventHandler.trigger(_this._element, EVENT_SHOWN$3, {
relatedTarget: previous
});
- $(previous).trigger(hiddenEvent);
- $(_this._element).trigger(shownEvent);
};
if (target) {
@@ -4051,7 +4692,7 @@
};
_proto.dispose = function dispose() {
- $.removeData(this._element, DATA_KEY$9);
+ Data.removeData(this._element, DATA_KEY$9);
this._element = null;
} // Private
;
@@ -4059,17 +4700,19 @@
_proto._activate = function _activate(element, container, callback) {
var _this2 = this;
- var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(SELECTOR_ACTIVE_UL) : $(container).children(SELECTOR_ACTIVE$2);
+ var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine.children(container, SELECTOR_ACTIVE$1);
var active = activeElements[0];
- var isTransitioning = callback && active && $(active).hasClass(CLASS_NAME_FADE$4);
+ var isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE$3);
var complete = function complete() {
return _this2._transitionComplete(element, active, callback);
};
if (active && isTransitioning) {
- var transitionDuration = Util.getTransitionDurationFromElement(active);
- $(active).removeClass(CLASS_NAME_SHOW$6).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ var transitionDuration = getTransitionDurationFromElement(active);
+ active.classList.remove(CLASS_NAME_SHOW$5);
+ EventHandler.one(active, TRANSITION_END, complete);
+ emulateTransitionEnd(active, transitionDuration);
} else {
complete();
}
@@ -4077,11 +4720,11 @@
_proto._transitionComplete = function _transitionComplete(element, active, callback) {
if (active) {
- $(active).removeClass(CLASS_NAME_ACTIVE$3);
- var dropdownChild = $(active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0];
+ active.classList.remove(CLASS_NAME_ACTIVE$3);
+ var dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode);
if (dropdownChild) {
- $(dropdownChild).removeClass(CLASS_NAME_ACTIVE$3);
+ dropdownChild.classList.remove(CLASS_NAME_ACTIVE$3);
}
if (active.getAttribute('role') === 'tab') {
@@ -4089,24 +4732,25 @@
}
}
- $(element).addClass(CLASS_NAME_ACTIVE$3);
+ element.classList.add(CLASS_NAME_ACTIVE$3);
if (element.getAttribute('role') === 'tab') {
element.setAttribute('aria-selected', true);
}
- Util.reflow(element);
+ reflow(element);
- if (element.classList.contains(CLASS_NAME_FADE$4)) {
- element.classList.add(CLASS_NAME_SHOW$6);
+ if (element.classList.contains(CLASS_NAME_FADE$3)) {
+ element.classList.add(CLASS_NAME_SHOW$5);
}
- if (element.parentNode && $(element.parentNode).hasClass(CLASS_NAME_DROPDOWN_MENU)) {
- var dropdownElement = $(element).closest(SELECTOR_DROPDOWN$1)[0];
+ if (element.parentNode && element.parentNode.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
+ var dropdownElement = element.closest(SELECTOR_DROPDOWN$1);
if (dropdownElement) {
- var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE$1));
- $(dropdownToggleList).addClass(CLASS_NAME_ACTIVE$3);
+ SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE$1).forEach(function (dropdown) {
+ return dropdown.classList.add(CLASS_NAME_ACTIVE$3);
+ });
}
element.setAttribute('aria-expanded', true);
@@ -4118,15 +4762,9 @@
} // Static
;
- Tab._jQueryInterface = function _jQueryInterface(config) {
+ Tab.jQueryInterface = function jQueryInterface(config) {
return this.each(function () {
- var $this = $(this);
- var data = $this.data(DATA_KEY$9);
-
- if (!data) {
- data = new Tab(this);
- $this.data(DATA_KEY$9, data);
- }
+ var data = Data.getData(this, DATA_KEY$9) || new Tab(this);
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
@@ -4138,6 +4776,10 @@
});
};
+ Tab.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY$9);
+ };
+
_createClass(Tab, null, [{
key: "VERSION",
get: function get() {
@@ -4154,24 +4796,31 @@
*/
- $(document).on(EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$4, function (event) {
+ EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$4, function (event) {
event.preventDefault();
-
- Tab._jQueryInterface.call($(this), 'show');
+ var data = Data.getData(this, DATA_KEY$9) || new Tab(this);
+ data.show();
});
+ var $$a = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .tab to jQuery only if jQuery is present
*/
- $.fn[NAME$9] = Tab._jQueryInterface;
- $.fn[NAME$9].Constructor = Tab;
+ /* istanbul ignore if */
- $.fn[NAME$9].noConflict = function () {
- $.fn[NAME$9] = JQUERY_NO_CONFLICT$9;
- return Tab._jQueryInterface;
- };
+ if ($$a) {
+ var JQUERY_NO_CONFLICT$9 = $$a.fn[NAME$9];
+ $$a.fn[NAME$9] = Tab.jQueryInterface;
+ $$a.fn[NAME$9].Constructor = Tab;
+
+ $$a.fn[NAME$9].noConflict = function () {
+ $$a.fn[NAME$9] = JQUERY_NO_CONFLICT$9;
+ return Tab.jQueryInterface;
+ };
+ }
/**
* ------------------------------------------------------------------------
@@ -4180,18 +4829,17 @@
*/
var NAME$a = 'toast';
- var VERSION$a = '4.5.2';
+ var VERSION$a = '5.0.0-alpha1';
var DATA_KEY$a = 'bs.toast';
var EVENT_KEY$a = "." + DATA_KEY$a;
- var JQUERY_NO_CONFLICT$a = $.fn[NAME$a];
var EVENT_CLICK_DISMISS$1 = "click.dismiss" + EVENT_KEY$a;
var EVENT_HIDE$4 = "hide" + EVENT_KEY$a;
var EVENT_HIDDEN$4 = "hidden" + EVENT_KEY$a;
var EVENT_SHOW$4 = "show" + EVENT_KEY$a;
var EVENT_SHOWN$4 = "shown" + EVENT_KEY$a;
- var CLASS_NAME_FADE$5 = 'fade';
+ var CLASS_NAME_FADE$4 = 'fade';
var CLASS_NAME_HIDE = 'hide';
- var CLASS_NAME_SHOW$7 = 'show';
+ var CLASS_NAME_SHOW$6 = 'show';
var CLASS_NAME_SHOWING = 'showing';
var DefaultType$7 = {
animation: 'boolean',
@@ -4217,6 +4865,8 @@
this._timeout = null;
this._setListeners();
+
+ Data.setData(element, DATA_KEY$a, this);
} // Getters
@@ -4226,25 +4876,22 @@
_proto.show = function show() {
var _this = this;
- var showEvent = $.Event(EVENT_SHOW$4);
- $(this._element).trigger(showEvent);
+ var showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4);
- if (showEvent.isDefaultPrevented()) {
+ if (showEvent.defaultPrevented) {
return;
}
- this._clearTimeout();
-
if (this._config.animation) {
- this._element.classList.add(CLASS_NAME_FADE$5);
+ this._element.classList.add(CLASS_NAME_FADE$4);
}
var complete = function complete() {
_this._element.classList.remove(CLASS_NAME_SHOWING);
- _this._element.classList.add(CLASS_NAME_SHOW$7);
+ _this._element.classList.add(CLASS_NAME_SHOW$6);
- $(_this._element).trigger(EVENT_SHOWN$4);
+ EventHandler.trigger(_this._element, EVENT_SHOWN$4);
if (_this._config.autohide) {
_this._timeout = setTimeout(function () {
@@ -4255,96 +4902,87 @@
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) {
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
- $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ var transitionDuration = getTransitionDurationFromElement(this._element);
+ EventHandler.one(this._element, TRANSITION_END, complete);
+ emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
};
_proto.hide = function hide() {
- if (!this._element.classList.contains(CLASS_NAME_SHOW$7)) {
+ var _this2 = this;
+
+ if (!this._element.classList.contains(CLASS_NAME_SHOW$6)) {
return;
}
- var hideEvent = $.Event(EVENT_HIDE$4);
- $(this._element).trigger(hideEvent);
+ var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4);
- if (hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
return;
}
- this._close();
+ var complete = function complete() {
+ _this2._element.classList.add(CLASS_NAME_HIDE);
+
+ EventHandler.trigger(_this2._element, EVENT_HIDDEN$4);
+ };
+
+ this._element.classList.remove(CLASS_NAME_SHOW$6);
+
+ if (this._config.animation) {
+ var transitionDuration = getTransitionDurationFromElement(this._element);
+ EventHandler.one(this._element, TRANSITION_END, complete);
+ emulateTransitionEnd(this._element, transitionDuration);
+ } else {
+ complete();
+ }
};
_proto.dispose = function dispose() {
- this._clearTimeout();
+ clearTimeout(this._timeout);
+ this._timeout = null;
- if (this._element.classList.contains(CLASS_NAME_SHOW$7)) {
- this._element.classList.remove(CLASS_NAME_SHOW$7);
+ if (this._element.classList.contains(CLASS_NAME_SHOW$6)) {
+ this._element.classList.remove(CLASS_NAME_SHOW$6);
}
- $(this._element).off(EVENT_CLICK_DISMISS$1);
- $.removeData(this._element, DATA_KEY$a);
+ EventHandler.off(this._element, EVENT_CLICK_DISMISS$1);
+ Data.removeData(this._element, DATA_KEY$a);
this._element = null;
this._config = null;
} // Private
;
_proto._getConfig = function _getConfig(config) {
- config = _extends({}, Default$7, $(this._element).data(), typeof config === 'object' && config ? config : {});
- Util.typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
+ config = _objectSpread2(_objectSpread2(_objectSpread2({}, Default$7), Manipulator.getDataAttributes(this._element)), typeof config === 'object' && config ? config : {});
+ typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
return config;
};
_proto._setListeners = function _setListeners() {
- var _this2 = this;
-
- $(this._element).on(EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, function () {
- return _this2.hide();
- });
- };
-
- _proto._close = function _close() {
var _this3 = this;
- var complete = function complete() {
- _this3._element.classList.add(CLASS_NAME_HIDE);
-
- $(_this3._element).trigger(EVENT_HIDDEN$4);
- };
-
- this._element.classList.remove(CLASS_NAME_SHOW$7);
-
- if (this._config.animation) {
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
- $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
- } else {
- complete();
- }
- };
-
- _proto._clearTimeout = function _clearTimeout() {
- clearTimeout(this._timeout);
- this._timeout = null;
+ EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, function () {
+ return _this3.hide();
+ });
} // Static
;
- Toast._jQueryInterface = function _jQueryInterface(config) {
+ Toast.jQueryInterface = function jQueryInterface(config) {
return this.each(function () {
- var $element = $(this);
- var data = $element.data(DATA_KEY$a);
+ var data = Data.getData(this, DATA_KEY$a);
var _config = typeof config === 'object' && config;
if (!data) {
data = new Toast(this, _config);
- $element.data(DATA_KEY$a, data);
}
if (typeof config === 'string') {
@@ -4357,6 +4995,10 @@
});
};
+ Toast.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY$a);
+ };
+
_createClass(Toast, null, [{
key: "VERSION",
get: function get() {
@@ -4376,34 +5018,48 @@
return Toast;
}();
+
+ var $$b = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .toast to jQuery only if jQuery is present
*/
+ /* istanbul ignore if */
- $.fn[NAME$a] = Toast._jQueryInterface;
- $.fn[NAME$a].Constructor = Toast;
+ if ($$b) {
+ var JQUERY_NO_CONFLICT$a = $$b.fn[NAME$a];
+ $$b.fn[NAME$a] = Toast.jQueryInterface;
+ $$b.fn[NAME$a].Constructor = Toast;
- $.fn[NAME$a].noConflict = function () {
- $.fn[NAME$a] = JQUERY_NO_CONFLICT$a;
- return Toast._jQueryInterface;
+ $$b.fn[NAME$a].noConflict = function () {
+ $$b.fn[NAME$a] = JQUERY_NO_CONFLICT$a;
+ return Toast.jQueryInterface;
+ };
+ }
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): index.umd.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ var index_umd = {
+ Alert: Alert,
+ Button: Button,
+ Carousel: Carousel,
+ Collapse: Collapse,
+ Dropdown: Dropdown,
+ Modal: Modal,
+ Popover: Popover,
+ ScrollSpy: ScrollSpy,
+ Tab: Tab,
+ Toast: Toast,
+ Tooltip: Tooltip
};
- exports.Alert = Alert;
- exports.Button = Button;
- exports.Carousel = Carousel;
- exports.Collapse = Collapse;
- exports.Dropdown = Dropdown;
- exports.Modal = Modal;
- exports.Popover = Popover;
- exports.Scrollspy = ScrollSpy;
- exports.Tab = Tab;
- exports.Toast = Toast;
- exports.Tooltip = Tooltip;
- exports.Util = Util;
-
- Object.defineProperty(exports, '__esModule', { value: true });
+ return index_umd;
})));
diff --git a/assets/javascripts/bootstrap.min.js b/assets/javascripts/bootstrap.min.js
index b3b85a6..7abb1ff 100644
--- a/assets/javascripts/bootstrap.min.js
+++ b/assets/javascripts/bootstrap.min.js
@@ -1,6 +1,6 @@
/*!
- * Bootstrap v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap={},t.jQuery,t.Popper)}(this,(function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e,n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;function r(t){var n=this,i=!1;return e(this).one(a.TRANSITION_END,(function(){i=!0})),setTimeout((function(){i||a.triggerTransitionEnd(n)}),t),this}var a={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var n=e(t).css("transition-duration"),i=e(t).css("transition-delay"),o=parseFloat(n),s=parseFloat(i);return o||s?(n=n.split(",")[0],i=i.split(",")[0],1e3*(parseFloat(n)+parseFloat(i))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){e(t).trigger("transitionend")},supportsTransitionEnd:function(){return Boolean("transitionend")},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],s=e[i],r=s&&a.isElement(s)?"element":null===(l=s)||"undefined"==typeof l?""+l:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(r))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+r+'" but expected type "'+o+'".')}var l},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?a.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if("undefined"==typeof e)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};a.jQueryDetection(),e.fn.emulateTransitionEnd=r,e.event.special[a.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var l="alert",c=e.fn[l],h=function(){function t(t){this._element=t}var n=t.prototype;return n.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},n.dispose=function(){e.removeData(this._element,"bs.alert"),this._element=null},n._getRootElement=function(t){var n=a.getSelectorFromElement(t),i=!1;return n&&(i=document.querySelector(n)),i||(i=e(t).closest(".alert")[0]),i},n._triggerCloseEvent=function(t){var n=e.Event("close.bs.alert");return e(t).trigger(n),n},n._removeElement=function(t){var n=this;if(e(t).removeClass("show"),e(t).hasClass("fade")){var i=a.getTransitionDurationFromElement(t);e(t).one(a.TRANSITION_END,(function(e){return n._destroyElement(t,e)})).emulateTransitionEnd(i)}else this._destroyElement(t)},n._destroyElement=function(t){e(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.alert");o||(o=new t(this),i.data("bs.alert",o)),"close"===n&&o[n](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}}]),t}();e(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',h._handleDismiss(new h)),e.fn[l]=h._jQueryInterface,e.fn[l].Constructor=h,e.fn[l].noConflict=function(){return e.fn[l]=c,h._jQueryInterface};var u=e.fn.button,d=function(){function t(t){this._element=t}var n=t.prototype;return n.toggle=function(){var t=!0,n=!0,i=e(this._element).closest('[data-toggle="buttons"]')[0];if(i){var o=this._element.querySelector('input:not([type="hidden"])');if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains("active"))t=!1;else{var s=i.querySelector(".active");s&&e(s).removeClass("active")}t&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains("active")),e(o).trigger("change")),o.focus(),n=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(n&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&e(this._element).toggleClass("active"))},n.dispose=function(){e.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.button");i||(i=new t(this),e(this).data("bs.button",i)),"toggle"===n&&i[n]()}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}}]),t}();e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=t.target,i=n;if(e(n).hasClass("btn")||(n=e(n).closest(".btn")[0]),!n||n.hasAttribute("disabled")||n.classList.contains("disabled"))t.preventDefault();else{var o=n.querySelector('input:not([type="hidden"])');if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void t.preventDefault();("LABEL"!==i.tagName||o&&"checkbox"!==o.type)&&d._jQueryInterface.call(e(n),"toggle")}})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=e(t.target).closest(".btn")[0];e(n).toggleClass("focus",/^focus(in)?$/.test(t.type))})),e(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector('input:not([type="hidden"])');o.checked||o.hasAttribute("checked")?i.classList.add("active"):i.classList.remove("active")}for(var s=0,r=(t=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;s<r;s++){var a=t[s];"true"===a.getAttribute("aria-pressed")?a.classList.add("active"):a.classList.remove("active")}})),e.fn.button=d._jQueryInterface,e.fn.button.Constructor=d,e.fn.button.noConflict=function(){return e.fn.button=u,d._jQueryInterface};var f="carousel",g=".bs.carousel",m=e.fn[f],p={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},_={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},v={TOUCH:"touch",PEN:"pen"},b=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(".carousel-indicators"),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var n=t.prototype;return n.next=function(){this._isSliding||this._slide("next")},n.nextWhenVisible=function(){!document.hidden&&e(this._element).is(":visible")&&"hidden"!==e(this._element).css("visibility")&&this.next()},n.prev=function(){this._isSliding||this._slide("prev")},n.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(a.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},n.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(t){var n=this;this._activeElement=this._element.querySelector(".active.carousel-item");var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)e(this._element).one("slid.bs.carousel",(function(){return n.to(t)}));else{if(i===t)return this.pause(),void this.cycle();var o=t>i?"next":"prev";this._slide(o,this._items[t])}},n.dispose=function(){e(this._element).off(g),e.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},n._getConfig=function(t){return t=s({},p,t),a.typeCheckConfig(f,t,_),t},n._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},n._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&e(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var n=function(e){t._pointerEvent&&v[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},i=function(e){t._pointerEvent&&v[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};e(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(e(this._element).on("pointerdown.bs.carousel",(function(t){return n(t)})),e(this._element).on("pointerup.bs.carousel",(function(t){return i(t)})),this._element.classList.add("pointer-event")):(e(this._element).on("touchstart.bs.carousel",(function(t){return n(t)})),e(this._element).on("touchmove.bs.carousel",(function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),e(this._element).on("touchend.bs.carousel",(function(t){return i(t)})))}},n._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},n._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},n._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),s=this._items.length-1;if((i&&0===o||n&&o===s)&&!this._config.wrap)return e;var r=(o+("prev"===t?-1:1))%this._items.length;return-1===r?this._items[this._items.length-1]:this._items[r]},n._triggerSlideEvent=function(t,n){var i=this._getItemIndex(t),o=this._getItemIndex(this._element.querySelector(".active.carousel-item")),s=e.Event("slide.bs.carousel",{relatedTarget:t,direction:n,from:o,to:i});return e(this._element).trigger(s),s},n._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var n=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));e(n).removeClass("active");var i=this._indicatorsElement.children[this._getItemIndex(t)];i&&e(i).addClass("active")}},n._slide=function(t,n){var i,o,s,r=this,l=this._element.querySelector(".active.carousel-item"),c=this._getItemIndex(l),h=n||l&&this._getItemByDirection(t,l),u=this._getItemIndex(h),d=Boolean(this._interval);if("next"===t?(i="carousel-item-left",o="carousel-item-next",s="left"):(i="carousel-item-right",o="carousel-item-prev",s="right"),h&&e(h).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(h,s).isDefaultPrevented()&&l&&h){this._isSliding=!0,d&&this.pause(),this._setActiveIndicatorElement(h);var f=e.Event("slid.bs.carousel",{relatedTarget:h,direction:s,from:c,to:u});if(e(this._element).hasClass("slide")){e(h).addClass(o),a.reflow(h),e(l).addClass(i),e(h).addClass(i);var g=parseInt(h.getAttribute("data-interval"),10);g?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=g):this._config.interval=this._config.defaultInterval||this._config.interval;var m=a.getTransitionDurationFromElement(l);e(l).one(a.TRANSITION_END,(function(){e(h).removeClass(i+" "+o).addClass("active"),e(l).removeClass("active "+o+" "+i),r._isSliding=!1,setTimeout((function(){return e(r._element).trigger(f)}),0)})).emulateTransitionEnd(m)}else e(l).removeClass("active"),e(h).addClass("active"),this._isSliding=!1,e(this._element).trigger(f);d&&this.cycle()}},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.carousel"),o=s({},p,e(this).data());"object"==typeof n&&(o=s({},o,n));var r="string"==typeof n?n:o.slide;if(i||(i=new t(this,o),e(this).data("bs.carousel",i)),"number"==typeof n)i.to(n);else if("string"==typeof r){if("undefined"==typeof i[r])throw new TypeError('No method named "'+r+'"');i[r]()}else o.interval&&o.ride&&(i.pause(),i.cycle())}))},t._dataApiClickHandler=function(n){var i=a.getSelectorFromElement(this);if(i){var o=e(i)[0];if(o&&e(o).hasClass("carousel")){var r=s({},e(o).data(),e(this).data()),l=this.getAttribute("data-slide-to");l&&(r.interval=!1),t._jQueryInterface.call(e(o),r),l&&e(o).data("bs.carousel").to(l),n.preventDefault()}}},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return p}}]),t}();e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",b._dataApiClickHandler),e(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),n=0,i=t.length;n<i;n++){var o=e(t[n]);b._jQueryInterface.call(o,o.data())}})),e.fn[f]=b._jQueryInterface,e.fn[f].Constructor=b,e.fn[f].noConflict=function(){return e.fn[f]=m,b._jQueryInterface};var y="collapse",E=e.fn[y],w={toggle:!0,parent:""},T={toggle:"boolean",parent:"(string|element)"},C=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var n=[].slice.call(document.querySelectorAll('[data-toggle="collapse"]')),i=0,o=n.length;i<o;i++){var s=n[i],r=a.getSelectorFromElement(s),l=[].slice.call(document.querySelectorAll(r)).filter((function(e){return e===t}));null!==r&&l.length>0&&(this._selector=r,this._triggerArray.push(s))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var n=t.prototype;return n.toggle=function(){e(this._element).hasClass("show")?this.hide():this.show()},n.show=function(){var n,i,o=this;if(!this._isTransitioning&&!e(this._element).hasClass("show")&&(this._parent&&0===(n=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof o._config.parent?t.getAttribute("data-parent")===o._config.parent:t.classList.contains("collapse")}))).length&&(n=null),!(n&&(i=e(n).not(this._selector).data("bs.collapse"))&&i._isTransitioning))){var s=e.Event("show.bs.collapse");if(e(this._element).trigger(s),!s.isDefaultPrevented()){n&&(t._jQueryInterface.call(e(n).not(this._selector),"hide"),i||e(n).data("bs.collapse",null));var r=this._getDimension();e(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[r]=0,this._triggerArray.length&&e(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var l="scroll"+(r[0].toUpperCase()+r.slice(1)),c=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,(function(){e(o._element).removeClass("collapsing").addClass("collapse show"),o._element.style[r]="",o.setTransitioning(!1),e(o._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(c),this._element.style[r]=this._element[l]+"px"}}},n.hide=function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass("show")){var n=e.Event("hide.bs.collapse");if(e(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",a.reflow(this._element),e(this._element).addClass("collapsing").removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var s=0;s<o;s++){var r=this._triggerArray[s],l=a.getSelectorFromElement(r);if(null!==l)e([].slice.call(document.querySelectorAll(l))).hasClass("show")||e(r).addClass("collapsed").attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[i]="";var c=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,(function(){t.setTransitioning(!1),e(t._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")})).emulateTransitionEnd(c)}}},n.setTransitioning=function(t){this._isTransitioning=t},n.dispose=function(){e.removeData(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},n._getConfig=function(t){return(t=s({},w,t)).toggle=Boolean(t.toggle),a.typeCheckConfig(y,t,T),t},n._getDimension=function(){return e(this._element).hasClass("width")?"width":"height"},n._getParent=function(){var n,i=this;a.isElement(this._config.parent)?(n=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(n=this._config.parent[0])):n=document.querySelector(this._config.parent);var o='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',s=[].slice.call(n.querySelectorAll(o));return e(s).each((function(e,n){i._addAriaAndCollapsedClass(t._getTargetFromElement(n),[n])})),n},n._addAriaAndCollapsedClass=function(t,n){var i=e(t).hasClass("show");n.length&&e(n).toggleClass("collapsed",!i).attr("aria-expanded",i)},t._getTargetFromElement=function(t){var e=a.getSelectorFromElement(t);return e?document.querySelector(e):null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.collapse"),r=s({},w,i.data(),"object"==typeof n&&n?n:{});if(!o&&r.toggle&&"string"==typeof n&&/show|hide/.test(n)&&(r.toggle=!1),o||(o=new t(this,r),i.data("bs.collapse",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return w}}]),t}();e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var n=e(this),i=a.getSelectorFromElement(this),o=[].slice.call(document.querySelectorAll(i));e(o).each((function(){var t=e(this),i=t.data("bs.collapse")?"toggle":n.data();C._jQueryInterface.call(t,i)}))})),e.fn[y]=C._jQueryInterface,e.fn[y].Constructor=C,e.fn[y].noConflict=function(){return e.fn[y]=E,C._jQueryInterface};var S="dropdown",k=e.fn[S],D=new RegExp("38|40|27"),N={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},A={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},I=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var i=t.prototype;return i.toggle=function(){if(!this._element.disabled&&!e(this._element).hasClass("disabled")){var n=e(this._menu).hasClass("show");t._clearMenus(),n||this.show(!0)}},i.show=function(i){if(void 0===i&&(i=!1),!(this._element.disabled||e(this._element).hasClass("disabled")||e(this._menu).hasClass("show"))){var o={relatedTarget:this._element},s=e.Event("show.bs.dropdown",o),r=t._getParentFromElement(this._element);if(e(r).trigger(s),!s.isDefaultPrevented()){if(!this._inNavbar&&i){if("undefined"==typeof n)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var l=this._element;"parent"===this._config.reference?l=r:a.isElement(this._config.reference)&&(l=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(l=this._config.reference[0])),"scrollParent"!==this._config.boundary&&e(r).addClass("position-static"),this._popper=new n(l,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===e(r).closest(".navbar-nav").length&&e(document.body).children().on("mouseover",null,e.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),e(this._menu).toggleClass("show"),e(r).toggleClass("show").trigger(e.Event("shown.bs.dropdown",o))}}},i.hide=function(){if(!this._element.disabled&&!e(this._element).hasClass("disabled")&&e(this._menu).hasClass("show")){var n={relatedTarget:this._element},i=e.Event("hide.bs.dropdown",n),o=t._getParentFromElement(this._element);e(o).trigger(i),i.isDefaultPrevented()||(this._popper&&this._popper.destroy(),e(this._menu).toggleClass("show"),e(o).toggleClass("show").trigger(e.Event("hidden.bs.dropdown",n)))}},i.dispose=function(){e.removeData(this._element,"bs.dropdown"),e(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},i.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},i._addEventListeners=function(){var t=this;e(this._element).on("click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},i._getConfig=function(t){return t=s({},this.constructor.Default,e(this._element).data(),t),a.typeCheckConfig(S,t,this.constructor.DefaultType),t},i._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(".dropdown-menu"))}return this._menu},i._getPlacement=function(){var t=e(this._element.parentNode),n="bottom-start";return t.hasClass("dropup")?n=e(this._menu).hasClass("dropdown-menu-right")?"top-end":"top-start":t.hasClass("dropright")?n="right-start":t.hasClass("dropleft")?n="left-start":e(this._menu).hasClass("dropdown-menu-right")&&(n="bottom-end"),n},i._detectNavbar=function(){return e(this._element).closest(".navbar").length>0},i._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=s({},e.offsets,t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},i._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),s({},t,this._config.popperConfig)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.dropdown");if(i||(i=new t(this,"object"==typeof n?n:null),e(this).data("bs.dropdown",i)),"string"==typeof n){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},t._clearMenus=function(n){if(!n||3!==n.which&&("keyup"!==n.type||9===n.which))for(var i=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),o=0,s=i.length;o<s;o++){var r=t._getParentFromElement(i[o]),a=e(i[o]).data("bs.dropdown"),l={relatedTarget:i[o]};if(n&&"click"===n.type&&(l.clickEvent=n),a){var c=a._menu;if(e(r).hasClass("show")&&!(n&&("click"===n.type&&/input|textarea/i.test(n.target.tagName)||"keyup"===n.type&&9===n.which)&&e.contains(r,n.target))){var h=e.Event("hide.bs.dropdown",l);e(r).trigger(h),h.isDefaultPrevented()||("ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),i[o].setAttribute("aria-expanded","false"),a._popper&&a._popper.destroy(),e(c).removeClass("show"),e(r).removeClass("show").trigger(e.Event("hidden.bs.dropdown",l)))}}}},t._getParentFromElement=function(t){var e,n=a.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},t._dataApiKeydownHandler=function(n){if(!(/input|textarea/i.test(n.target.tagName)?32===n.which||27!==n.which&&(40!==n.which&&38!==n.which||e(n.target).closest(".dropdown-menu").length):!D.test(n.which))&&!this.disabled&&!e(this).hasClass("disabled")){var i=t._getParentFromElement(this),o=e(i).hasClass("show");if(o||27!==n.which){if(n.preventDefault(),n.stopPropagation(),!o||o&&(27===n.which||32===n.which))return 27===n.which&&e(i.querySelector('[data-toggle="dropdown"]')).trigger("focus"),void e(this).trigger("click");var s=[].slice.call(i.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter((function(t){return e(t).is(":visible")}));if(0!==s.length){var r=s.indexOf(n.target);38===n.which&&r>0&&r--,40===n.which&&r<s.length-1&&r++,r<0&&(r=0),s[r].focus()}}}},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return N}},{key:"DefaultType",get:function(){return A}}]),t}();e(document).on("keydown.bs.dropdown.data-api",'[data-toggle="dropdown"]',I._dataApiKeydownHandler).on("keydown.bs.dropdown.data-api",".dropdown-menu",I._dataApiKeydownHandler).on("click.bs.dropdown.data-api keyup.bs.dropdown.data-api",I._clearMenus).on("click.bs.dropdown.data-api",'[data-toggle="dropdown"]',(function(t){t.preventDefault(),t.stopPropagation(),I._jQueryInterface.call(e(this),"toggle")})).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})),e.fn[S]=I._jQueryInterface,e.fn[S].Constructor=I,e.fn[S].noConflict=function(){return e.fn[S]=k,I._jQueryInterface};var O=e.fn.modal,j={backdrop:!0,keyboard:!0,focus:!0,show:!0},x={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},P=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(".modal-dialog"),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var n=t.prototype;return n.toggle=function(t){return this._isShown?this.hide():this.show(t)},n.show=function(t){var n=this;if(!this._isShown&&!this._isTransitioning){e(this._element).hasClass("fade")&&(this._isTransitioning=!0);var i=e.Event("show.bs.modal",{relatedTarget:t});e(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),e(this._element).on("click.dismiss.bs.modal",'[data-dismiss="modal"]',(function(t){return n.hide(t)})),e(this._dialog).on("mousedown.dismiss.bs.modal",(function(){e(n._element).one("mouseup.dismiss.bs.modal",(function(t){e(t.target).is(n._element)&&(n._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return n._showElement(t)})))}},n.hide=function(t){var n=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var i=e.Event("hide.bs.modal");if(e(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented()){this._isShown=!1;var o=e(this._element).hasClass("fade");if(o&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),e(document).off("focusin.bs.modal"),e(this._element).removeClass("show"),e(this._element).off("click.dismiss.bs.modal"),e(this._dialog).off("mousedown.dismiss.bs.modal"),o){var s=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,(function(t){return n._hideModal(t)})).emulateTransitionEnd(s)}else this._hideModal()}}},n.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return e(t).off(".bs.modal")})),e(document).off("focusin.bs.modal"),e.removeData(this._element,"bs.modal"),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},n.handleUpdate=function(){this._adjustDialog()},n._getConfig=function(t){return t=s({},j,t),a.typeCheckConfig("modal",t,x),t},n._triggerBackdropTransition=function(){var t=this;if("static"===this._config.backdrop){var n=e.Event("hidePrevented.bs.modal");if(e(this._element).trigger(n),n.defaultPrevented)return;var i=this._element.scrollHeight>document.documentElement.clientHeight;i||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");var o=a.getTransitionDurationFromElement(this._dialog);e(this._element).off(a.TRANSITION_END),e(this._element).one(a.TRANSITION_END,(function(){t._element.classList.remove("modal-static"),i||e(t._element).one(a.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,o)})).emulateTransitionEnd(o),this._element.focus()}else this.hide()},n._showElement=function(t){var n=this,i=e(this._element).hasClass("fade"),o=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),e(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,i&&a.reflow(this._element),e(this._element).addClass("show"),this._config.focus&&this._enforceFocus();var s=e.Event("shown.bs.modal",{relatedTarget:t}),r=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,e(n._element).trigger(s)};if(i){var l=a.getTransitionDurationFromElement(this._dialog);e(this._dialog).one(a.TRANSITION_END,r).emulateTransitionEnd(l)}else r()},n._enforceFocus=function(){var t=this;e(document).off("focusin.bs.modal").on("focusin.bs.modal",(function(n){document!==n.target&&t._element!==n.target&&0===e(t._element).has(n.target).length&&t._element.focus()}))},n._setEscapeEvent=function(){var t=this;this._isShown?e(this._element).on("keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||e(this._element).off("keydown.dismiss.bs.modal")},n._setResizeEvent=function(){var t=this;this._isShown?e(window).on("resize.bs.modal",(function(e){return t.handleUpdate(e)})):e(window).off("resize.bs.modal")},n._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){e(document.body).removeClass("modal-open"),t._resetAdjustments(),t._resetScrollbar(),e(t._element).trigger("hidden.bs.modal")}))},n._removeBackdrop=function(){this._backdrop&&(e(this._backdrop).remove(),this._backdrop=null)},n._showBackdrop=function(t){var n=this,i=e(this._element).hasClass("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",i&&this._backdrop.classList.add(i),e(this._backdrop).appendTo(document.body),e(this._element).on("click.dismiss.bs.modal",(function(t){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:t.target===t.currentTarget&&n._triggerBackdropTransition()})),i&&a.reflow(this._backdrop),e(this._backdrop).addClass("show"),!t)return;if(!i)return void t();var o=a.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(a.TRANSITION_END,t).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){e(this._backdrop).removeClass("show");var s=function(){n._removeBackdrop(),t&&t()};if(e(this._element).hasClass("fade")){var r=a.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(a.TRANSITION_END,s).emulateTransitionEnd(r)}else s()}else t&&t()},n._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},n._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){var n=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")),i=[].slice.call(document.querySelectorAll(".sticky-top"));e(n).each((function(n,i){var o=i.style.paddingRight,s=e(i).css("padding-right");e(i).data("padding-right",o).css("padding-right",parseFloat(s)+t._scrollbarWidth+"px")})),e(i).each((function(n,i){var o=i.style.marginRight,s=e(i).css("margin-right");e(i).data("margin-right",o).css("margin-right",parseFloat(s)-t._scrollbarWidth+"px")}));var o=document.body.style.paddingRight,s=e(document.body).css("padding-right");e(document.body).data("padding-right",o).css("padding-right",parseFloat(s)+this._scrollbarWidth+"px")}e(document.body).addClass("modal-open")},n._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"));e(t).each((function(t,n){var i=e(n).data("padding-right");e(n).removeData("padding-right"),n.style.paddingRight=i||""}));var n=[].slice.call(document.querySelectorAll(".sticky-top"));e(n).each((function(t,n){var i=e(n).data("margin-right");"undefined"!=typeof i&&e(n).css("margin-right",i).removeData("margin-right")}));var i=e(document.body).data("padding-right");e(document.body).removeData("padding-right"),document.body.style.paddingRight=i||""},n._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(n,i){return this.each((function(){var o=e(this).data("bs.modal"),r=s({},j,e(this).data(),"object"==typeof n&&n?n:{});if(o||(o=new t(this,r),e(this).data("bs.modal",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n](i)}else r.show&&o.show(i)}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return j}}]),t}();e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(t){var n,i=this,o=a.getSelectorFromElement(this);o&&(n=document.querySelector(o));var r=e(n).data("bs.modal")?"toggle":s({},e(n).data(),e(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var l=e(n).one("show.bs.modal",(function(t){t.isDefaultPrevented()||l.one("hidden.bs.modal",(function(){e(i).is(":visible")&&i.focus()}))}));P._jQueryInterface.call(e(n),r,this)})),e.fn.modal=P._jQueryInterface,e.fn.modal.Constructor=P,e.fn.modal.noConflict=function(){return e.fn.modal=O,P._jQueryInterface};var R=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],L={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],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:[]},q=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,F=/^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 Q(t,e,n){if(0===t.length)return t;if(n&&"function"==typeof n)return n(t);for(var i=(new window.DOMParser).parseFromString(t,"text/html"),o=Object.keys(e),s=[].slice.call(i.body.querySelectorAll("*")),r=function(t,n){var i=s[t],r=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var a=[].slice.call(i.attributes),l=[].concat(e["*"]||[],e[r]||[]);a.forEach((function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===R.indexOf(n)||Boolean(t.nodeValue.match(q)||t.nodeValue.match(F));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,s=i.length;o<s;o++)if(n.match(i[o]))return!0;return!1})(t,l)||i.removeAttribute(t.nodeName)}))},a=0,l=s.length;a<l;a++)r(a);return i.body.innerHTML}var B="tooltip",H=e.fn[B],U=new RegExp("(^|\\s)bs-tooltip\\S+","g"),M=["sanitize","whiteList","sanitizeFn"],W={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},V={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},z={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:L,popperConfig:null},K={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},X=function(){function t(t,e){if("undefined"==typeof n)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var i=t.prototype;return i.enable=function(){this._isEnabled=!0},i.disable=function(){this._isEnabled=!1},i.toggleEnabled=function(){this._isEnabled=!this._isEnabled},i.toggle=function(t){if(this._isEnabled)if(t){var n=this.constructor.DATA_KEY,i=e(t.currentTarget).data(n);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(e(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},i.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&e(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},i.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var i=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(i);var o=a.findShadowRoot(this.element),s=e.contains(null!==o?o:this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!s)return;var r=this.getTipElement(),l=a.getUID(this.constructor.NAME);r.setAttribute("id",l),this.element.setAttribute("aria-describedby",l),this.setContent(),this.config.animation&&e(r).addClass("fade");var c="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,h=this._getAttachment(c);this.addAttachmentClass(h);var u=this._getContainer();e(r).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(r).appendTo(u),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,this._getPopperConfig(h)),e(r).addClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().on("mouseover",null,e.noop);var d=function(){t.config.animation&&t._fixTransition();var n=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),"out"===n&&t._leave(null,t)};if(e(this.tip).hasClass("fade")){var f=a.getTransitionDurationFromElement(this.tip);e(this.tip).one(a.TRANSITION_END,d).emulateTransitionEnd(f)}else d()}},i.hide=function(t){var n=this,i=this.getTipElement(),o=e.Event(this.constructor.Event.HIDE),s=function(){"show"!==n._hoverState&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),e(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),t&&t()};if(e(this.element).trigger(o),!o.isDefaultPrevented()){if(e(i).removeClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,e(this.tip).hasClass("fade")){var r=a.getTransitionDurationFromElement(i);e(i).one(a.TRANSITION_END,s).emulateTransitionEnd(r)}else s();this._hoverState=""}},i.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},i.isWithContent=function(){return Boolean(this.getTitle())},i.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-tooltip-"+t)},i.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},i.setContent=function(){var t=this.getTipElement();this.setElementContent(e(t.querySelectorAll(".tooltip-inner")),this.getTitle()),e(t).removeClass("fade show")},i.setElementContent=function(t,n){"object"!=typeof n||!n.nodeType&&!n.jquery?this.config.html?(this.config.sanitize&&(n=Q(n,this.config.whiteList,this.config.sanitizeFn)),t.html(n)):t.text(n):this.config.html?e(n).parent().is(t)||t.empty().append(n):t.text(e(n).text())},i.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},i._getPopperConfig=function(t){var e=this;return s({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},i._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=s({},e.offsets,t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},i._getContainer=function(){return!1===this.config.container?document.body:a.isElement(this.config.container)?e(this.config.container):e(document).find(this.config.container)},i._getAttachment=function(t){return V[t.toUpperCase()]},i._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(n){if("click"===n)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==n){var i="hover"===n?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o="hover"===n?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(i,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},e(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=s({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},i._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},i._enter=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e(n.getTipElement()).hasClass("show")||"show"===n._hoverState?n._hoverState="show":(clearTimeout(n._timeout),n._hoverState="show",n.config.delay&&n.config.delay.show?n._timeout=setTimeout((function(){"show"===n._hoverState&&n.show()}),n.config.delay.show):n.show())},i._leave=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState="out",n.config.delay&&n.config.delay.hide?n._timeout=setTimeout((function(){"out"===n._hoverState&&n.hide()}),n.config.delay.hide):n.hide())},i._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},i._getConfig=function(t){var n=e(this.element).data();return Object.keys(n).forEach((function(t){-1!==M.indexOf(t)&&delete n[t]})),"number"==typeof(t=s({},this.constructor.Default,n,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),a.typeCheckConfig(B,t,this.constructor.DefaultType),t.sanitize&&(t.template=Q(t.template,t.whiteList,t.sanitizeFn)),t},i._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},i._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(U);null!==n&&n.length&&t.removeClass(n.join(""))},i._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},i._fixTransition=function(){var t=this.getTipElement(),n=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.tooltip"),o="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new t(this,o),e(this).data("bs.tooltip",i)),"string"==typeof n)){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return z}},{key:"NAME",get:function(){return B}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return K}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return W}}]),t}();e.fn[B]=X._jQueryInterface,e.fn[B].Constructor=X,e.fn[B].noConflict=function(){return e.fn[B]=H,X._jQueryInterface};var Y="popover",$=e.fn[Y],J=new RegExp("(^|\\s)bs-popover\\S+","g"),G=s({},X.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Z=s({},X.DefaultType,{content:"(string|element|function)"}),tt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},et=function(t){var n,i;function s(){return t.apply(this,arguments)||this}i=t,(n=s).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var r=s.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},r.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},r.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(t.find(".popover-body"),n),t.removeClass("fade show")},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(J);null!==n&&n.length>0&&t.removeClass(n.join(""))},s._jQueryInterface=function(t){return this.each((function(){var n=e(this).data("bs.popover"),i="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new s(this,i),e(this).data("bs.popover",n)),"string"==typeof t)){if("undefined"==typeof n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(s,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return G}},{key:"NAME",get:function(){return Y}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return tt}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return Z}}]),s}(X);e.fn[Y]=et._jQueryInterface,e.fn[Y].Constructor=et,e.fn[Y].noConflict=function(){return e.fn[Y]=$,et._jQueryInterface};var nt="scrollspy",it=e.fn[nt],ot={offset:10,method:"auto",target:""},st={offset:"number",method:"string",target:"(string|element)"},rt=function(){function t(t,n){var i=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(n),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return i._process(t)})),this.refresh(),this._process()}var n=t.prototype;return n.refresh=function(){var t=this,n=this._scrollElement===this._scrollElement.window?"offset":"position",i="auto"===this._config.method?n:this._config.method,o="position"===i?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var n,s=a.getSelectorFromElement(t);if(s&&(n=document.querySelector(s)),n){var r=n.getBoundingClientRect();if(r.width||r.height)return[e(n)[i]().top+o,s]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},n.dispose=function(){e.removeData(this._element,"bs.scrollspy"),e(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},n._getConfig=function(t){if("string"!=typeof(t=s({},ot,"object"==typeof t&&t?t:{})).target&&a.isElement(t.target)){var n=e(t.target).attr("id");n||(n=a.getUID(nt),e(t.target).attr("id",n)),t.target="#"+n}return a.typeCheckConfig(nt,t,st),t},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},n._activate=function(t){this._activeTarget=t,this._clear();var n=this._selector.split(",").map((function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'})),i=e([].slice.call(document.querySelectorAll(n.join(","))));i.hasClass("dropdown-item")?(i.closest(".dropdown").find(".dropdown-toggle").addClass("active"),i.addClass("active")):(i.addClass("active"),i.parents(".nav, .list-group").prev(".nav-link, .list-group-item").addClass("active"),i.parents(".nav, .list-group").prev(".nav-item").children(".nav-link").addClass("active")),e(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:t})},n._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains("active")})).forEach((function(t){return t.classList.remove("active")}))},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.scrollspy");if(i||(i=new t(this,"object"==typeof n&&n),e(this).data("bs.scrollspy",i)),"string"==typeof n){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"Default",get:function(){return ot}}]),t}();e(window).on("load.bs.scrollspy.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),n=t.length;n--;){var i=e(t[n]);rt._jQueryInterface.call(i,i.data())}})),e.fn[nt]=rt._jQueryInterface,e.fn[nt].Constructor=rt,e.fn[nt].noConflict=function(){return e.fn[nt]=it,rt._jQueryInterface};var at=e.fn.tab,lt=function(){function t(t){this._element=t}var n=t.prototype;return n.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&e(this._element).hasClass("active")||e(this._element).hasClass("disabled"))){var n,i,o=e(this._element).closest(".nav, .list-group")[0],s=a.getSelectorFromElement(this._element);if(o){var r="UL"===o.nodeName||"OL"===o.nodeName?"> li > .active":".active";i=(i=e.makeArray(e(o).find(r)))[i.length-1]}var l=e.Event("hide.bs.tab",{relatedTarget:this._element}),c=e.Event("show.bs.tab",{relatedTarget:i});if(i&&e(i).trigger(l),e(this._element).trigger(c),!c.isDefaultPrevented()&&!l.isDefaultPrevented()){s&&(n=document.querySelector(s)),this._activate(this._element,o);var h=function(){var n=e.Event("hidden.bs.tab",{relatedTarget:t._element}),o=e.Event("shown.bs.tab",{relatedTarget:i});e(i).trigger(n),e(t._element).trigger(o)};n?this._activate(n,n.parentNode,h):h()}}},n.dispose=function(){e.removeData(this._element,"bs.tab"),this._element=null},n._activate=function(t,n,i){var o=this,s=(!n||"UL"!==n.nodeName&&"OL"!==n.nodeName?e(n).children(".active"):e(n).find("> li > .active"))[0],r=i&&s&&e(s).hasClass("fade"),l=function(){return o._transitionComplete(t,s,i)};if(s&&r){var c=a.getTransitionDurationFromElement(s);e(s).removeClass("show").one(a.TRANSITION_END,l).emulateTransitionEnd(c)}else l()},n._transitionComplete=function(t,n,i){if(n){e(n).removeClass("active");var o=e(n.parentNode).find("> .dropdown-menu .active")[0];o&&e(o).removeClass("active"),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(e(t).addClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),a.reflow(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&e(t.parentNode).hasClass("dropdown-menu")){var s=e(t).closest(".dropdown")[0];if(s){var r=[].slice.call(s.querySelectorAll(".dropdown-toggle"));e(r).addClass("active")}t.setAttribute("aria-expanded",!0)}i&&i()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.tab");if(o||(o=new t(this),i.data("bs.tab",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}}]),t}();e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),lt._jQueryInterface.call(e(this),"show")})),e.fn.tab=lt._jQueryInterface,e.fn.tab.Constructor=lt,e.fn.tab.noConflict=function(){return e.fn.tab=at,lt._jQueryInterface};var ct=e.fn.toast,ht={animation:"boolean",autohide:"boolean",delay:"number"},ut={animation:!0,autohide:!0,delay:500},dt=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var n=t.prototype;return n.show=function(){var t=this,n=e.Event("show.bs.toast");if(e(this._element).trigger(n),!n.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var i=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),e(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),a.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var o=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,i).emulateTransitionEnd(o)}else i()}},n.hide=function(){if(this._element.classList.contains("show")){var t=e.Event("hide.bs.toast");e(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},n.dispose=function(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),e(this._element).off("click.dismiss.bs.toast"),e.removeData(this._element,"bs.toast"),this._element=null,this._config=null},n._getConfig=function(t){return t=s({},ut,e(this._element).data(),"object"==typeof t&&t?t:{}),a.typeCheckConfig("toast",t,this.constructor.DefaultType),t},n._setListeners=function(){var t=this;e(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return t.hide()}))},n._close=function(){var t=this,n=function(){t._element.classList.add("hide"),e(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var i=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,n).emulateTransitionEnd(i)}else n()},n._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.toast");if(o||(o=new t(this,"object"==typeof n&&n),i.data("bs.toast",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n](this)}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.2"}},{key:"DefaultType",get:function(){return ht}},{key:"Default",get:function(){return ut}}]),t}();e.fn.toast=dt._jQueryInterface,e.fn.toast.Constructor=dt,e.fn.toast.noConflict=function(){return e.fn.toast=ct,dt._jQueryInterface},t.Alert=h,t.Button=d,t.Carousel=b,t.Collapse=C,t.Dropdown=I,t.Modal=P,t.Popover=et,t.Scrollspy=rt,t.Tab=lt,t.Toast=dt,t.Tooltip=X,t.Util=a,Object.defineProperty(t,"__esModule",{value:!0})}));
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("popper.js")):"function"==typeof define&&define.amd?define(["popper.js"],e):(t=t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function n(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var r,a,l,c,u=function(t){do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t},h=function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():null}return e},f=function(t){var e=h(t);return e&&document.querySelector(e)?e:null},d=function(t){var e=h(t);return e?document.querySelector(e):null},g=function(t){if(!t)return 0;var e=window.getComputedStyle(t),n=e.transitionDuration,i=e.transitionDelay,o=parseFloat(n),s=parseFloat(i);return o||s?(n=n.split(",")[0],i=i.split(",")[0],1e3*(parseFloat(n)+parseFloat(i))):0},p=function(t){t.dispatchEvent(new Event("transitionend"))},m=function(t){return(t[0]||t).nodeType},_=function(t,e){var n=!1,i=e+5;t.addEventListener("transitionend",(function e(){n=!0,t.removeEventListener("transitionend",e)})),setTimeout((function(){n||p(t)}),i)},v=function(t,e,n){Object.keys(n).forEach((function(i){var o,s=n[i],r=e[i],a=r&&m(r)?"element":null==(o=r)?""+o:{}.toString.call(o).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(a))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+a+'" but expected type "'+s+'".')}))},b=function(t){if(!t)return!1;if(t.style&&t.parentNode&&t.parentNode.style){var e=getComputedStyle(t),n=getComputedStyle(t.parentNode);return"none"!==e.display&&"none"!==n.display&&"hidden"!==e.visibility}return!1},y=function(){return function(){}},w=function(t){return t.offsetHeight},E=function(){var t=window.jQuery;return t&&!document.body.hasAttribute("data-no-jquery")?t:null},k=(r={},a=1,{set:function(t,e,n){void 0===t.key&&(t.key={key:e,id:a},a++),r[t.key.id]=n},get:function(t,e){if(!t||void 0===t.key)return null;var n=t.key;return n.key===e?r[n.id]:null},delete:function(t,e){if(void 0!==t.key){var n=t.key;n.key===e&&(delete r[n.id],delete t.key)}}}),T=function(t,e,n){k.set(t,e,n)},L=function(t,e){return k.get(t,e)},C=function(t,e){k.delete(t,e)},A=Element.prototype.querySelectorAll,S=Element.prototype.querySelector,O=(l=new CustomEvent("Bootstrap",{cancelable:!0}),(c=document.createElement("div")).addEventListener("Bootstrap",(function(){return null})),l.preventDefault(),c.dispatchEvent(l),l.defaultPrevented),D=/:scope\b/;(function(){var t=document.createElement("div");try{t.querySelectorAll(":scope *")}catch(t){return!1}return!0})()||(A=function(t){if(!D.test(t))return this.querySelectorAll(t);var e=Boolean(this.id);e||(this.id=u("scope"));var n=null;try{t=t.replace(D,"#"+this.id),n=this.querySelectorAll(t)}finally{e||this.removeAttribute("id")}return n},S=function(t){if(!D.test(t))return this.querySelector(t);var e=A.call(this,t);return void 0!==e[0]?e[0]:null});var I=E(),N=/[^.]*(?=\..*)\.|.*/,j=/\..*/,P=/::\d+$/,x={},R=1,H={mouseenter:"mouseover",mouseleave:"mouseout"},B=["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"];function M(t,e){return e&&e+"::"+R++||t.uidEvent||R++}function Q(t){var e=M(t);return t.uidEvent=e,x[e]=x[e]||{},x[e]}function U(t,e,n){void 0===n&&(n=null);for(var i=Object.keys(t),o=0,s=i.length;o<s;o++){var r=t[i[o]];if(r.originalHandler===e&&r.delegationSelector===n)return r}return null}function F(t,e,n){var i="string"==typeof e,o=i?n:e,s=t.replace(j,""),r=H[s];return r&&(s=r),B.indexOf(s)>-1||(s=t),[i,o,s]}function W(t,e,n,i,o){if("string"==typeof e&&t){n||(n=i,i=null);var s=F(e,n,i),r=s[0],a=s[1],l=s[2],c=Q(t),u=c[l]||(c[l]={}),h=U(u,a,r?n:null);if(h)h.oneOff=h.oneOff&&o;else{var f=M(a,e.replace(N,"")),d=r?function(t,e,n){return function i(o){for(var s=t.querySelectorAll(e),r=o.target;r&&r!==this;r=r.parentNode)for(var a=s.length;a--;)if(s[a]===r)return i.oneOff&&q.off(t,o.type,n),n.apply(r,[o]);return null}}(t,n,i):function(t,e){return function n(i){return n.oneOff&&q.off(t,i.type,e),e.apply(t,[i])}}(t,n);d.delegationSelector=r?n:null,d.originalHandler=a,d.oneOff=o,d.uidEvent=f,u[f]=d,t.addEventListener(l,d,r)}}}function V(t,e,n,i,o){var s=U(e[n],i,o);s&&(t.removeEventListener(n,s,Boolean(o)),delete e[n][s.uidEvent])}var q={on:function(t,e,n,i){W(t,e,n,i,!1)},one:function(t,e,n,i){W(t,e,n,i,!0)},off:function(t,e,n,i){if("string"==typeof e&&t){var o=F(e,n,i),s=o[0],r=o[1],a=o[2],l=a!==e,c=Q(t),u="."===e.charAt(0);if(void 0===r){u&&Object.keys(c).forEach((function(n){!function(t,e,n,i){var o=e[n]||{};Object.keys(o).forEach((function(s){if(s.indexOf(i)>-1){var r=o[s];V(t,e,n,r.originalHandler,r.delegationSelector)}}))}(t,c,n,e.slice(1))}));var h=c[a]||{};Object.keys(h).forEach((function(n){var i=n.replace(P,"");if(!l||e.indexOf(i)>-1){var o=h[n];V(t,c,a,o.originalHandler,o.delegationSelector)}}))}else{if(!c||!c[a])return;V(t,c,a,r,s?n:null)}}},trigger:function(t,e,n){if("string"!=typeof e||!t)return null;var i,o=e.replace(j,""),s=e!==o,r=B.indexOf(o)>-1,a=!0,l=!0,c=!1,u=null;return s&&I&&(i=I.Event(e,n),I(t).trigger(i),a=!i.isPropagationStopped(),l=!i.isImmediatePropagationStopped(),c=i.isDefaultPrevented()),r?(u=document.createEvent("HTMLEvents")).initEvent(o,a,!0):u=new CustomEvent(e,{bubbles:a,cancelable:!0}),void 0!==n&&Object.keys(n).forEach((function(t){Object.defineProperty(u,t,{get:function(){return n[t]}})})),c&&(u.preventDefault(),O||Object.defineProperty(u,"defaultPrevented",{get:function(){return!0}})),l&&t.dispatchEvent(u),u.defaultPrevented&&void 0!==i&&i.preventDefault(),u}},z="alert",K=function(){function t(t){this._element=t,this._element&&T(t,"bs.alert",this)}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t));var n=this._triggerCloseEvent(e);null===n||n.defaultPrevented||this._removeElement(e)},e.dispose=function(){C(this._element,"bs.alert"),this._element=null},e._getRootElement=function(t){return d(t)||t.closest(".alert")},e._triggerCloseEvent=function(t){return q.trigger(t,"close.bs.alert")},e._removeElement=function(t){var e=this;if(t.classList.remove("show"),t.classList.contains("fade")){var n=g(t);q.one(t,"transitionend",(function(){return e._destroyElement(t)})),_(t,n)}else this._destroyElement(t)},e._destroyElement=function(t){t.parentNode&&t.parentNode.removeChild(t),q.trigger(t,"closed.bs.alert")},t.jQueryInterface=function(e){return this.each((function(){var n=L(this,"bs.alert");n||(n=new t(this)),"close"===e&&n[e](this)}))},t.handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},t.getInstance=function(t){return L(t,"bs.alert")},n(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}}]),t}();q.on(document,"click.bs.alert.data-api",'[data-dismiss="alert"]',K.handleDismiss(new K));var X=E();if(X){var Y=X.fn[z];X.fn[z]=K.jQueryInterface,X.fn[z].Constructor=K,X.fn[z].noConflict=function(){return X.fn[z]=Y,K.jQueryInterface}}var $=function(){function t(t){this._element=t,T(t,"bs.button",this)}var e=t.prototype;return e.toggle=function(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))},e.dispose=function(){C(this._element,"bs.button"),this._element=null},t.jQueryInterface=function(e){return this.each((function(){var n=L(this,"bs.button");n||(n=new t(this)),"toggle"===e&&n[e]()}))},t.getInstance=function(t){return L(t,"bs.button")},n(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}}]),t}();q.on(document,"click.bs.button.data-api",'[data-toggle="button"]',(function(t){t.preventDefault();var e=t.target.closest('[data-toggle="button"]'),n=L(e,"bs.button");n||(n=new $(e)),n.toggle()}));var G=E();if(G){var Z=G.fn.button;G.fn.button=$.jQueryInterface,G.fn.button.Constructor=$,G.fn.button.noConflict=function(){return G.fn.button=Z,$.jQueryInterface}}function J(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function tt(t){return t.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}))}var et={setDataAttribute:function(t,e,n){t.setAttribute("data-"+tt(e),n)},removeDataAttribute:function(t,e){t.removeAttribute("data-"+tt(e))},getDataAttributes:function(t){if(!t)return{};var e=s({},t.dataset);return Object.keys(e).forEach((function(t){e[t]=J(e[t])})),e},getDataAttribute:function(t,e){return J(t.getAttribute("data-"+tt(e)))},offset:function(t){var e=t.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},position:function(t){return{top:t.offsetTop,left:t.offsetLeft}},toggleClass:function(t,e){t&&(t.classList.contains(e)?t.classList.remove(e):t.classList.add(e))}},nt={matches:function(t,e){return t.matches(e)},find:function(t,e){var n;return void 0===e&&(e=document.documentElement),(n=[]).concat.apply(n,A.call(e,t))},findOne:function(t,e){return void 0===e&&(e=document.documentElement),S.call(e,t)},children:function(t,e){var n,i=(n=[]).concat.apply(n,t.children);return i.filter((function(t){return t.matches(e)}))},parents:function(t,e){for(var n=[],i=t.parentNode;i&&i.nodeType===Node.ELEMENT_NODE&&3!==i.nodeType;)this.matches(i,e)&&n.push(i),i=i.parentNode;return n},prev:function(t,e){for(var n=t.previousElementSibling;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next:function(t,e){for(var n=t.nextElementSibling;n;){if(this.matches(n,e))return[n];n=n.nextElementSibling}return[]}},it="carousel",ot=".bs.carousel",st={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},rt={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},at={TOUCH:"touch",PEN:"pen"},lt=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=nt.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners(),T(t,"bs.carousel",this)}var e=t.prototype;return e.next=function(){this._isSliding||this._slide("next")},e.nextWhenVisible=function(){!document.hidden&&b(this._element)&&this.next()},e.prev=function(){this._isSliding||this._slide("prev")},e.pause=function(t){t||(this._isPaused=!0),nt.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(p(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=nt.findOne(".active.carousel-item",this._element);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)q.one(this._element,"slid.bs.carousel",(function(){return e.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var i=t>n?"next":"prev";this._slide(i,this._items[t])}},e.dispose=function(){q.off(this._element,ot),C(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=s(s({},st),t),v(it,t,rt),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&q.on(this._element,"keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&(q.on(this._element,"mouseenter.bs.carousel",(function(e){return t.pause(e)})),q.on(this._element,"mouseleave.bs.carousel",(function(e){return t.cycle(e)}))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this,e=function(e){t._pointerEvent&&at[e.pointerType.toUpperCase()]?t.touchStartX=e.clientX:t._pointerEvent||(t.touchStartX=e.touches[0].clientX)},n=function(e){t._pointerEvent&&at[e.pointerType.toUpperCase()]&&(t.touchDeltaX=e.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};nt.find(".carousel-item img",this._element).forEach((function(t){q.on(t,"dragstart.bs.carousel",(function(t){return t.preventDefault()}))})),this._pointerEvent?(q.on(this._element,"pointerdown.bs.carousel",(function(t){return e(t)})),q.on(this._element,"pointerup.bs.carousel",(function(t){return n(t)})),this._element.classList.add("pointer-event")):(q.on(this._element,"touchstart.bs.carousel",(function(t){return e(t)})),q.on(this._element,"touchmove.bs.carousel",(function(e){return function(e){e.touches&&e.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.touches[0].clientX-t.touchStartX}(e)})),q.on(this._element,"touchend.bs.carousel",(function(t){return n(t)})))},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.key){case"ArrowLeft":t.preventDefault(),this.prev();break;case"ArrowRight":t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?nt.find(".carousel-item",t.parentNode):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),s=this._items.length-1;if((i&&0===o||n&&o===s)&&!this._config.wrap)return e;var r=(o+("prev"===t?-1:1))%this._items.length;return-1===r?this._items[this._items.length-1]:this._items[r]},e._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(nt.findOne(".active.carousel-item",this._element));return q.trigger(this._element,"slide.bs.carousel",{relatedTarget:t,direction:e,from:i,to:n})},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){for(var e=nt.find(".active",this._indicatorsElement),n=0;n<e.length;n++)e[n].classList.remove("active");var i=this._indicatorsElement.children[this._getItemIndex(t)];i&&i.classList.add("active")}},e._slide=function(t,e){var n,i,o,s=this,r=nt.findOne(".active.carousel-item",this._element),a=this._getItemIndex(r),l=e||r&&this._getItemByDirection(t,r),c=this._getItemIndex(l),u=Boolean(this._interval);if("next"===t?(n="carousel-item-left",i="carousel-item-next",o="left"):(n="carousel-item-right",i="carousel-item-prev",o="right"),l&&l.classList.contains("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(l,o).defaultPrevented&&r&&l){if(this._isSliding=!0,u&&this.pause(),this._setActiveIndicatorElement(l),this._element.classList.contains("slide")){l.classList.add(i),w(l),r.classList.add(n),l.classList.add(n);var h=parseInt(l.getAttribute("data-interval"),10);h?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=h):this._config.interval=this._config.defaultInterval||this._config.interval;var f=g(r);q.one(r,"transitionend",(function(){l.classList.remove(n,i),l.classList.add("active"),r.classList.remove("active",i,n),s._isSliding=!1,setTimeout((function(){q.trigger(s._element,"slid.bs.carousel",{relatedTarget:l,direction:o,from:a,to:c})}),0)})),_(r,f)}else r.classList.remove("active"),l.classList.add("active"),this._isSliding=!1,q.trigger(this._element,"slid.bs.carousel",{relatedTarget:l,direction:o,from:a,to:c});u&&this.cycle()}},t.carouselInterface=function(e,n){var i=L(e,"bs.carousel"),o=s(s({},st),et.getDataAttributes(e));"object"==typeof n&&(o=s(s({},o),n));var r="string"==typeof n?n:o.slide;if(i||(i=new t(e,o)),"number"==typeof n)i.to(n);else if("string"==typeof r){if(void 0===i[r])throw new TypeError('No method named "'+r+'"');i[r]()}else o.interval&&o.ride&&(i.pause(),i.cycle())},t.jQueryInterface=function(e){return this.each((function(){t.carouselInterface(this,e)}))},t.dataApiClickHandler=function(e){var n=d(this);if(n&&n.classList.contains("carousel")){var i=s(s({},et.getDataAttributes(n)),et.getDataAttributes(this)),o=this.getAttribute("data-slide-to");o&&(i.interval=!1),t.carouselInterface(n,i),o&&L(n,"bs.carousel").to(o),e.preventDefault()}},t.getInstance=function(t){return L(t,"bs.carousel")},n(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"Default",get:function(){return st}}]),t}();q.on(document,"click.bs.carousel.data-api","[data-slide], [data-slide-to]",lt.dataApiClickHandler),q.on(window,"load.bs.carousel.data-api",(function(){for(var t=nt.find('[data-ride="carousel"]'),e=0,n=t.length;e<n;e++)lt.carouselInterface(t[e],L(t[e],"bs.carousel"))}));var ct=E();if(ct){var ut=ct.fn[it];ct.fn[it]=lt.jQueryInterface,ct.fn[it].Constructor=lt,ct.fn[it].noConflict=function(){return ct.fn[it]=ut,lt.jQueryInterface}}var ht="collapse",ft={toggle:!0,parent:""},dt={toggle:"boolean",parent:"(string|element)"},gt=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=nt.find('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]');for(var n=nt.find('[data-toggle="collapse"]'),i=0,o=n.length;i<o;i++){var s=n[i],r=f(s),a=nt.find(r).filter((function(e){return e===t}));null!==r&&a.length&&(this._selector=r,this._triggerArray.push(s))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle(),T(t,"bs.collapse",this)}var e=t.prototype;return e.toggle=function(){this._element.classList.contains("show")?this.hide():this.show()},e.show=function(){var e=this;if(!this._isTransitioning&&!this._element.classList.contains("show")){var n,i;this._parent&&0===(n=nt.find(".show, .collapsing",this._parent).filter((function(t){return"string"==typeof e._config.parent?t.getAttribute("data-parent")===e._config.parent:t.classList.contains("collapse")}))).length&&(n=null);var o=nt.findOne(this._selector);if(n){var s=n.filter((function(t){return o!==t}));if((i=s[0]?L(s[0],"bs.collapse"):null)&&i._isTransitioning)return}if(!q.trigger(this._element,"show.bs.collapse").defaultPrevented){n&&n.forEach((function(e){o!==e&&t.collapseInterface(e,"hide"),i||T(e,"bs.collapse",null)}));var r=this._getDimension();this._element.classList.remove("collapse"),this._element.classList.add("collapsing"),this._element.style[r]=0,this._triggerArray.length&&this._triggerArray.forEach((function(t){t.classList.remove("collapsed"),t.setAttribute("aria-expanded",!0)})),this.setTransitioning(!0);var a="scroll"+(r[0].toUpperCase()+r.slice(1)),l=g(this._element);q.one(this._element,"transitionend",(function(){e._element.classList.remove("collapsing"),e._element.classList.add("collapse","show"),e._element.style[r]="",e.setTransitioning(!1),q.trigger(e._element,"shown.bs.collapse")})),_(this._element,l),this._element.style[r]=this._element[a]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&this._element.classList.contains("show")&&!q.trigger(this._element,"hide.bs.collapse").defaultPrevented){var e=this._getDimension();this._element.style[e]=this._element.getBoundingClientRect()[e]+"px",w(this._element),this._element.classList.add("collapsing"),this._element.classList.remove("collapse","show");var n=this._triggerArray.length;if(n>0)for(var i=0;i<n;i++){var o=this._triggerArray[i],s=d(o);s&&!s.classList.contains("show")&&(o.classList.add("collapsed"),o.setAttribute("aria-expanded",!1))}this.setTransitioning(!0);this._element.style[e]="";var r=g(this._element);q.one(this._element,"transitionend",(function(){t.setTransitioning(!1),t._element.classList.remove("collapsing"),t._element.classList.add("collapse"),q.trigger(t._element,"hidden.bs.collapse")})),_(this._element,r)}},e.setTransitioning=function(t){this._isTransitioning=t},e.dispose=function(){C(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},e._getConfig=function(t){return(t=s(s({},ft),t)).toggle=Boolean(t.toggle),v(ht,t,dt),t},e._getDimension=function(){return this._element.classList.contains("width")?"width":"height"},e._getParent=function(){var t=this,e=this._config.parent;m(e)?void 0===e.jquery&&void 0===e[0]||(e=e[0]):e=nt.findOne(e);var n='[data-toggle="collapse"][data-parent="'+e+'"]';return nt.find(n,e).forEach((function(e){var n=d(e);t._addAriaAndCollapsedClass(n,[e])})),e},e._addAriaAndCollapsedClass=function(t,e){if(t){var n=t.classList.contains("show");e.length&&e.forEach((function(t){n?t.classList.remove("collapsed"):t.classList.add("collapsed"),t.setAttribute("aria-expanded",n)}))}},t.collapseInterface=function(e,n){var i=L(e,"bs.collapse"),o=s(s(s({},ft),et.getDataAttributes(e)),"object"==typeof n&&n?n:{});if(!i&&o.toggle&&"string"==typeof n&&/show|hide/.test(n)&&(o.toggle=!1),i||(i=new t(e,o)),"string"==typeof n){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}},t.jQueryInterface=function(e){return this.each((function(){t.collapseInterface(this,e)}))},t.getInstance=function(t){return L(t,"bs.collapse")},n(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"Default",get:function(){return ft}}]),t}();q.on(document,"click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){"A"===t.target.tagName&&t.preventDefault();var e=et.getDataAttributes(this),n=f(this);nt.find(n).forEach((function(t){var n,i=L(t,"bs.collapse");i?(null===i._parent&&"string"==typeof e.parent&&(i._config.parent=e.parent,i._parent=i._getParent()),n="toggle"):n=e,gt.collapseInterface(t,n)}))}));var pt=E();if(pt){var mt=pt.fn[ht];pt.fn[ht]=gt.jQueryInterface,pt.fn[ht].Constructor=gt,pt.fn[ht].noConflict=function(){return pt.fn[ht]=mt,gt.jQueryInterface}}var _t="dropdown",vt=new RegExp("ArrowUp|ArrowDown|Escape"),bt={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},yt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},wt=function(){function e(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners(),T(t,"bs.dropdown",this)}var i=e.prototype;return i.toggle=function(){if(!this._element.disabled&&!this._element.classList.contains("disabled")){var t=this._element.classList.contains("show");e.clearMenus(),t||this.show()}},i.show=function(){if(!(this._element.disabled||this._element.classList.contains("disabled")||this._menu.classList.contains("show"))){var n=e.getParentFromElement(this._element),i={relatedTarget:this._element};if(!q.trigger(this._element,"show.bs.dropdown",i).defaultPrevented){if(!this._inNavbar){if(void 0===t)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org)");var o=this._element;"parent"===this._config.reference?o=n:m(this._config.reference)&&(o=this._config.reference,void 0!==this._config.reference.jquery&&(o=this._config.reference[0])),"scrollParent"!==this._config.boundary&&n.classList.add("position-static"),this._popper=new t(o,this._menu,this._getPopperConfig())}var s;if("ontouchstart"in document.documentElement&&!n.closest(".navbar-nav"))(s=[]).concat.apply(s,document.body.children).forEach((function(t){return q.on(t,"mouseover",null,(function(){}))}));this._element.focus(),this._element.setAttribute("aria-expanded",!0),et.toggleClass(this._menu,"show"),et.toggleClass(this._element,"show"),q.trigger(n,"shown.bs.dropdown",i)}}},i.hide=function(){if(!this._element.disabled&&!this._element.classList.contains("disabled")&&this._menu.classList.contains("show")){var t=e.getParentFromElement(this._element),n={relatedTarget:this._element};q.trigger(t,"hide.bs.dropdown",n).defaultPrevented||(this._popper&&this._popper.destroy(),et.toggleClass(this._menu,"show"),et.toggleClass(this._element,"show"),q.trigger(t,"hidden.bs.dropdown",n))}},i.dispose=function(){C(this._element,"bs.dropdown"),q.off(this._element,".bs.dropdown"),this._element=null,this._menu=null,this._popper&&(this._popper.destroy(),this._popper=null)},i.update=function(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.scheduleUpdate()},i._addEventListeners=function(){var t=this;q.on(this._element,"click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},i._getConfig=function(t){return t=s(s(s({},this.constructor.Default),et.getDataAttributes(this._element)),t),v(_t,t,this.constructor.DefaultType),t},i._getMenuElement=function(){return nt.next(this._element,".dropdown-menu")[0]},i._getPlacement=function(){var t=this._element.parentNode,e="bottom-start";return t.classList.contains("dropup")?(e="top-start",this._menu.classList.contains("dropdown-menu-right")&&(e="top-end")):t.classList.contains("dropright")?e="right-start":t.classList.contains("dropleft")?e="left-start":this._menu.classList.contains("dropdown-menu-right")&&(e="bottom-end"),e},i._detectNavbar=function(){return Boolean(this._element.closest(".navbar"))},i._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=s(s({},e.offsets),t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},i._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),s(s({},t),this._config.popperConfig)},e.dropdownInterface=function(t,n){var i=L(t,"bs.dropdown");if(i||(i=new e(t,"object"==typeof n?n:null)),"string"==typeof n){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}},e.jQueryInterface=function(t){return this.each((function(){e.dropdownInterface(this,t)}))},e.clearMenus=function(t){if(!t||2!==t.button&&("keyup"!==t.type||"Tab"===t.key))for(var n=nt.find('[data-toggle="dropdown"]'),i=0,o=n.length;i<o;i++){var s=e.getParentFromElement(n[i]),r=L(n[i],"bs.dropdown"),a={relatedTarget:n[i]};if(t&&"click"===t.type&&(a.clickEvent=t),r){var l=r._menu;if(n[i].classList.contains("show"))if(!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&"Tab"===t.key)&&l.contains(t.target)))if(!q.trigger(s,"hide.bs.dropdown",a).defaultPrevented){var c;if("ontouchstart"in document.documentElement)(c=[]).concat.apply(c,document.body.children).forEach((function(t){return q.off(t,"mouseover",null,(function(){}))}));n[i].setAttribute("aria-expanded","false"),r._popper&&r._popper.destroy(),l.classList.remove("show"),n[i].classList.remove("show"),q.trigger(s,"hidden.bs.dropdown",a)}}}},e.getParentFromElement=function(t){return d(t)||t.parentNode},e.dataApiKeydownHandler=function(t){if(!(/input|textarea/i.test(t.target.tagName)?"Space"===t.key||"Escape"!==t.key&&("ArrowDown"!==t.key&&"ArrowUp"!==t.key||t.target.closest(".dropdown-menu")):!vt.test(t.key))&&(t.preventDefault(),t.stopPropagation(),!this.disabled&&!this.classList.contains("disabled"))){var n=e.getParentFromElement(this),i=this.classList.contains("show");if("Escape"===t.key)return(this.matches('[data-toggle="dropdown"]')?this:nt.prev(this,'[data-toggle="dropdown"]')[0]).focus(),void e.clearMenus();if(i&&"Space"!==t.key){var o=nt.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",n).filter(b);if(o.length){var s=o.indexOf(t.target);"ArrowUp"===t.key&&s>0&&s--,"ArrowDown"===t.key&&s<o.length-1&&s++,o[s=-1===s?0:s].focus()}}else e.clearMenus()}},e.getInstance=function(t){return L(t,"bs.dropdown")},n(e,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"Default",get:function(){return bt}},{key:"DefaultType",get:function(){return yt}}]),e}();q.on(document,"keydown.bs.dropdown.data-api",'[data-toggle="dropdown"]',wt.dataApiKeydownHandler),q.on(document,"keydown.bs.dropdown.data-api",".dropdown-menu",wt.dataApiKeydownHandler),q.on(document,"click.bs.dropdown.data-api",wt.clearMenus),q.on(document,"keyup.bs.dropdown.data-api",wt.clearMenus),q.on(document,"click.bs.dropdown.data-api",'[data-toggle="dropdown"]',(function(t){t.preventDefault(),t.stopPropagation(),wt.dropdownInterface(this,"toggle")})),q.on(document,"click.bs.dropdown.data-api",".dropdown form",(function(t){return t.stopPropagation()}));var Et=E();if(Et){var kt=Et.fn[_t];Et.fn[_t]=wt.jQueryInterface,Et.fn[_t].Constructor=wt,Et.fn[_t].noConflict=function(){return Et.fn[_t]=kt,wt.jQueryInterface}}var Tt={backdrop:!0,keyboard:!0,focus:!0,show:!0},Lt={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},Ct=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=nt.findOne(".modal-dialog",t),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0,T(t,"bs.modal",this)}var e=t.prototype;return e.toggle=function(t){return this._isShown?this.hide():this.show(t)},e.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){this._element.classList.contains("fade")&&(this._isTransitioning=!0);var n=q.trigger(this._element,"show.bs.modal",{relatedTarget:t});this._isShown||n.defaultPrevented||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),q.on(this._element,"click.dismiss.bs.modal",'[data-dismiss="modal"]',(function(t){return e.hide(t)})),q.on(this._dialog,"mousedown.dismiss.bs.modal",(function(){q.one(e._element,"mouseup.dismiss.bs.modal",(function(t){t.target===e._element&&(e._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return e._showElement(t)})))}},e.hide=function(t){var e=this;if((t&&t.preventDefault(),this._isShown&&!this._isTransitioning)&&!q.trigger(this._element,"hide.bs.modal").defaultPrevented){this._isShown=!1;var n=this._element.classList.contains("fade");if(n&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),q.off(document,"focusin.bs.modal"),this._element.classList.remove("show"),q.off(this._element,"click.dismiss.bs.modal"),q.off(this._dialog,"mousedown.dismiss.bs.modal"),n){var i=g(this._element);q.one(this._element,"transitionend",(function(t){return e._hideModal(t)})),_(this._element,i)}else this._hideModal()}},e.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return q.off(t,".bs.modal")})),q.off(document,"focusin.bs.modal"),C(this._element,"bs.modal"),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},e.handleUpdate=function(){this._adjustDialog()},e._getConfig=function(t){return t=s(s({},Tt),t),v("modal",t,Lt),t},e._showElement=function(t){var e=this,n=this._element.classList.contains("fade"),i=nt.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,i&&(i.scrollTop=0),n&&w(this._element),this._element.classList.add("show"),this._config.focus&&this._enforceFocus();var o=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,q.trigger(e._element,"shown.bs.modal",{relatedTarget:t})};if(n){var s=g(this._dialog);q.one(this._dialog,"transitionend",o),_(this._dialog,s)}else o()},e._enforceFocus=function(){var t=this;q.off(document,"focusin.bs.modal"),q.on(document,"focusin.bs.modal",(function(e){document===e.target||t._element===e.target||t._element.contains(e.target)||t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?q.on(this._element,"keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&"Escape"===e.key?(e.preventDefault(),t.hide()):t._config.keyboard||"Escape"!==e.key||t._triggerBackdropTransition()})):q.off(this._element,"keydown.dismiss.bs.modal")},e._setResizeEvent=function(){var t=this;this._isShown?q.on(window,"resize.bs.modal",(function(){return t._adjustDialog()})):q.off(window,"resize.bs.modal")},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){document.body.classList.remove("modal-open"),t._resetAdjustments(),t._resetScrollbar(),q.trigger(t._element,"hidden.bs.modal")}))},e._removeBackdrop=function(){this._backdrop.parentNode.removeChild(this._backdrop),this._backdrop=null},e._showBackdrop=function(t){var e=this,n=this._element.classList.contains("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),document.body.appendChild(this._backdrop),q.on(this._element,"click.dismiss.bs.modal",(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&e._triggerBackdropTransition()})),n&&w(this._backdrop),this._backdrop.classList.add("show"),!n)return void t();var i=g(this._backdrop);q.one(this._backdrop,"transitionend",t),_(this._backdrop,i)}else if(!this._isShown&&this._backdrop){this._backdrop.classList.remove("show");var o=function(){e._removeBackdrop(),t()};if(this._element.classList.contains("fade")){var s=g(this._backdrop);q.one(this._backdrop,"transitionend",o),_(this._backdrop,s)}else o()}else t()},e._triggerBackdropTransition=function(){var t=this;if("static"===this._config.backdrop){if(q.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;this._element.classList.add("modal-static");var e=g(this._element);q.one(this._element,"transitionend",(function(){t._element.classList.remove("modal-static")})),_(this._element,e),this._element.focus()}else this.hide()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},e._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){nt.find(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top").forEach((function(e){var n=e.style.paddingRight,i=window.getComputedStyle(e)["padding-right"];et.setDataAttribute(e,"padding-right",n),e.style.paddingRight=parseFloat(i)+t._scrollbarWidth+"px"})),nt.find(".sticky-top").forEach((function(e){var n=e.style.marginRight,i=window.getComputedStyle(e)["margin-right"];et.setDataAttribute(e,"margin-right",n),e.style.marginRight=parseFloat(i)-t._scrollbarWidth+"px"}));var e=document.body.style.paddingRight,n=window.getComputedStyle(document.body)["padding-right"];et.setDataAttribute(document.body,"padding-right",e),document.body.style.paddingRight=parseFloat(n)+this._scrollbarWidth+"px"}document.body.classList.add("modal-open")},e._resetScrollbar=function(){nt.find(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top").forEach((function(t){var e=et.getDataAttribute(t,"padding-right");void 0!==e&&(et.removeDataAttribute(t,"padding-right"),t.style.paddingRight=e)})),nt.find(".sticky-top").forEach((function(t){var e=et.getDataAttribute(t,"margin-right");void 0!==e&&(et.removeDataAttribute(t,"margin-right"),t.style.marginRight=e)}));var t=et.getDataAttribute(document.body,"padding-right");void 0===t?document.body.style.paddingRight="":(et.removeDataAttribute(document.body,"padding-right"),document.body.style.paddingRight=t)},e._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t.jQueryInterface=function(e,n){return this.each((function(){var i=L(this,"bs.modal"),o=s(s(s({},Tt),et.getDataAttributes(this)),"object"==typeof e&&e?e:{});if(i||(i=new t(this,o)),"string"==typeof e){if(void 0===i[e])throw new TypeError('No method named "'+e+'"');i[e](n)}else o.show&&i.show(n)}))},t.getInstance=function(t){return L(t,"bs.modal")},n(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"Default",get:function(){return Tt}}]),t}();q.on(document,"click.bs.modal.data-api",'[data-toggle="modal"]',(function(t){var e=this,n=d(this);"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault(),q.one(n,"show.bs.modal",(function(t){t.defaultPrevented||q.one(n,"hidden.bs.modal",(function(){b(e)&&e.focus()}))}));var i=L(n,"bs.modal");if(!i){var o=s(s({},et.getDataAttributes(n)),et.getDataAttributes(this));i=new Ct(n,o)}i.show(this)}));var At=E();if(At){var St=At.fn.modal;At.fn.modal=Ct.jQueryInterface,At.fn.modal.Constructor=Ct,At.fn.modal.noConflict=function(){return At.fn.modal=St,Ct.jQueryInterface}}var Ot=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],Dt=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,It=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Nt={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],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:[]};function jt(t,e,n){var i;if(!t.length)return t;if(n&&"function"==typeof n)return n(t);for(var o=(new window.DOMParser).parseFromString(t,"text/html"),s=Object.keys(e),r=(i=[]).concat.apply(i,o.body.querySelectorAll("*")),a=function(t,n){var i,o=r[t],a=o.nodeName.toLowerCase();if(-1===s.indexOf(a))return o.parentNode.removeChild(o),"continue";var l=(i=[]).concat.apply(i,o.attributes),c=[].concat(e["*"]||[],e[a]||[]);l.forEach((function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===Ot.indexOf(n)||Boolean(t.nodeValue.match(Dt)||t.nodeValue.match(It));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,s=i.length;o<s;o++)if(n.match(i[o]))return!0;return!1})(t,c)||o.removeAttribute(t.nodeName)}))},l=0,c=r.length;l<c;l++)a(l);return o.body.innerHTML}var Pt="tooltip",xt=new RegExp("(^|\\s)bs-tooltip\\S+","g"),Rt=["sanitize","whiteList","sanitizeFn"],Ht={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},Bt={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},Mt={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:Nt,popperConfig:null},Qt={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Ut=function(){function e(e,n){if(void 0===t)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(n),this.tip=null,this._setListeners(),T(e,this.constructor.DATA_KEY,this)}var i=e.prototype;return i.enable=function(){this._isEnabled=!0},i.disable=function(){this._isEnabled=!1},i.toggleEnabled=function(){this._isEnabled=!this._isEnabled},i.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=L(t.target,e);n||(n=new this.constructor(t.target,this._getDelegateConfig()),T(t.target,e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(this.getTipElement().classList.contains("show"))return void this._leave(null,this);this._enter(null,this)}},i.dispose=function(){clearTimeout(this._timeout),C(this.element,this.constructor.DATA_KEY),q.off(this.element,this.constructor.EVENT_KEY),q.off(this.element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.tip&&this.tip.parentNode.removeChild(this.tip),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},i.show=function(){var e=this;if("none"===this.element.style.display)throw new Error("Please use show on visible elements");if(this.isWithContent()&&this._isEnabled){var n=q.trigger(this.element,this.constructor.Event.SHOW),i=function t(e){if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){var n=e.getRootNode();return n instanceof ShadowRoot?n:null}return e instanceof ShadowRoot?e:e.parentNode?t(e.parentNode):null}(this.element),o=null===i?this.element.ownerDocument.documentElement.contains(this.element):i.contains(this.element);if(n.defaultPrevented||!o)return;var s=this.getTipElement(),r=u(this.constructor.NAME);s.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&s.classList.add("fade");var a="function"==typeof this.config.placement?this.config.placement.call(this,s,this.element):this.config.placement,l=this._getAttachment(a);this._addAttachmentClass(l);var c,h=this._getContainer();if(T(s,this.constructor.DATA_KEY,this),this.element.ownerDocument.documentElement.contains(this.tip)||h.appendChild(s),q.trigger(this.element,this.constructor.Event.INSERTED),this._popper=new t(this.element,s,this._getPopperConfig(l)),s.classList.add("show"),"ontouchstart"in document.documentElement)(c=[]).concat.apply(c,document.body.children).forEach((function(t){q.on(t,"mouseover",(function(){}))}));var f=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,q.trigger(e.element,e.constructor.Event.SHOWN),"out"===t&&e._leave(null,e)};if(this.tip.classList.contains("fade")){var d=g(this.tip);q.one(this.tip,"transitionend",f),_(this.tip,d)}else f()}},i.hide=function(){var t=this,e=this.getTipElement(),n=function(){"show"!==t._hoverState&&e.parentNode&&e.parentNode.removeChild(e),t._cleanTipClass(),t.element.removeAttribute("aria-describedby"),q.trigger(t.element,t.constructor.Event.HIDDEN),t._popper.destroy()};if(!q.trigger(this.element,this.constructor.Event.HIDE).defaultPrevented){var i;if(e.classList.remove("show"),"ontouchstart"in document.documentElement)(i=[]).concat.apply(i,document.body.children).forEach((function(t){return q.off(t,"mouseover",y)}));if(this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this.tip.classList.contains("fade")){var o=g(e);q.one(e,"transitionend",n),_(e,o)}else n();this._hoverState=""}},i.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},i.isWithContent=function(){return Boolean(this.getTitle())},i.getTipElement=function(){if(this.tip)return this.tip;var t=document.createElement("div");return t.innerHTML=this.config.template,this.tip=t.children[0],this.tip},i.setContent=function(){var t=this.getTipElement();this.setElementContent(nt.findOne(".tooltip-inner",t),this.getTitle()),t.classList.remove("fade","show")},i.setElementContent=function(t,e){if(null!==t)return"object"==typeof e&&m(e)?(e.jquery&&(e=e[0]),void(this.config.html?e.parentNode!==t&&(t.innerHTML="",t.appendChild(e)):t.textContent=e.textContent)):void(this.config.html?(this.config.sanitize&&(e=jt(e,this.config.whiteList,this.config.sanitizeFn)),t.innerHTML=e):t.textContent=e)},i.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},i._getPopperConfig=function(t){var e=this;return s(s({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:"."+this.constructor.NAME+"-arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),this.config.popperConfig)},i._addAttachmentClass=function(t){this.getTipElement().classList.add("bs-tooltip-"+t)},i._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=s(s({},e.offsets),t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},i._getContainer=function(){return!1===this.config.container?document.body:m(this.config.container)?this.config.container:nt.findOne(this.config.container)},i._getAttachment=function(t){return Bt[t.toUpperCase()]},i._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)q.on(t.element,t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n="hover"===e?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,i="hover"===e?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;q.on(t.element,n,t.config.selector,(function(e){return t._enter(e)})),q.on(t.element,i,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},q.on(this.element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=s(s({},this.config),{},{trigger:"manual",selector:""}):this._fixTitle()},i._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},i._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||L(t.target,n))||(e=new this.constructor(t.target,this._getDelegateConfig()),T(t.target,n,e)),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e.getTipElement().classList.contains("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){"show"===e._hoverState&&e.show()}),e.config.delay.show):e.show())},i._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||L(t.target,n))||(e=new this.constructor(t.target,this._getDelegateConfig()),T(t.target,n,e)),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){"out"===e._hoverState&&e.hide()}),e.config.delay.hide):e.hide())},i._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},i._getConfig=function(t){var e=et.getDataAttributes(this.element);return Object.keys(e).forEach((function(t){-1!==Rt.indexOf(t)&&delete e[t]})),t&&"object"==typeof t.container&&t.container.jquery&&(t.container=t.container[0]),"number"==typeof(t=s(s(s({},this.constructor.Default),e),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),v(Pt,t,this.constructor.DefaultType),t.sanitize&&(t.template=jt(t.template,t.whiteList,t.sanitizeFn)),t},i._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},i._cleanTipClass=function(){var t=this.getTipElement(),e=t.getAttribute("class").match(xt);null!==e&&e.length>0&&e.map((function(t){return t.trim()})).forEach((function(e){return t.classList.remove(e)}))},i._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(t.placement))},i._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(t.classList.remove("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},e.jQueryInterface=function(t){return this.each((function(){var n=L(this,"bs.tooltip"),i="object"==typeof t&&t;if((n||!/dispose|hide/.test(t))&&(n||(n=new e(this,i)),"string"==typeof t)){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},e.getInstance=function(t){return L(t,"bs.tooltip")},n(e,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"Default",get:function(){return Mt}},{key:"NAME",get:function(){return Pt}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return Qt}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return Ht}}]),e}(),Ft=E();if(Ft){var Wt=Ft.fn[Pt];Ft.fn[Pt]=Ut.jQueryInterface,Ft.fn[Pt].Constructor=Ut,Ft.fn[Pt].noConflict=function(){return Ft.fn[Pt]=Wt,Ut.jQueryInterface}}var Vt="popover",qt=new RegExp("(^|\\s)bs-popover\\S+","g"),zt=s(s({},Ut.Default),{},{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Kt=s(s({},Ut.DefaultType),{},{content:"(string|element|function)"}),Xt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},Yt=function(t){var e,i;function o(){return t.apply(this,arguments)||this}i=t,(e=o).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var s=o.prototype;return s.isWithContent=function(){return this.getTitle()||this._getContent()},s.setContent=function(){var t=this.getTipElement();this.setElementContent(nt.findOne(".popover-header",t),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(nt.findOne(".popover-body",t),e),t.classList.remove("fade","show")},s._addAttachmentClass=function(t){this.getTipElement().classList.add("bs-popover-"+t)},s._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},s._cleanTipClass=function(){var t=this.getTipElement(),e=t.getAttribute("class").match(qt);null!==e&&e.length>0&&e.map((function(t){return t.trim()})).forEach((function(e){return t.classList.remove(e)}))},o.jQueryInterface=function(t){return this.each((function(){var e=L(this,"bs.popover"),n="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new o(this,n),T(this,"bs.popover",e)),"string"==typeof t)){if(void 0===e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},o.getInstance=function(t){return L(t,"bs.popover")},n(o,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"Default",get:function(){return zt}},{key:"NAME",get:function(){return Vt}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return Xt}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return Kt}}]),o}(Ut),$t=E();if($t){var Gt=$t.fn[Vt];$t.fn[Vt]=Yt.jQueryInterface,$t.fn[Vt].Constructor=Yt,$t.fn[Vt].noConflict=function(){return $t.fn[Vt]=Gt,Yt.jQueryInterface}}var Zt="scrollspy",Jt={offset:10,method:"auto",target:""},te={offset:"number",method:"string",target:"(string|element)"},ee=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,q.on(this._scrollElement,"scroll.bs.scrollspy",(function(t){return n._process(t)})),this.refresh(),this._process(),T(t,"bs.scrollspy",this)}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":"position",n="auto"===this._config.method?e:this._config.method,i="position"===n?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),nt.find(this._selector).map((function(t){var e,o=f(t);if(o&&(e=nt.findOne(o)),e){var s=e.getBoundingClientRect();if(s.width||s.height)return[et[n](e).top+i,o]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){C(this._element,"bs.scrollspy"),q.off(this._scrollElement,".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=s(s({},Jt),"object"==typeof t&&t?t:{})).target&&m(t.target)){var e=t.target.id;e||(e=u(Zt),t.target.id=e),t.target="#"+e}return v(Zt,t,te),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&(void 0===this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},e._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'})),n=nt.findOne(e.join(","));n.classList.contains("dropdown-item")?(nt.findOne(".dropdown-toggle",n.closest(".dropdown")).classList.add("active"),n.classList.add("active")):(n.classList.add("active"),nt.parents(n,".nav, .list-group").forEach((function(t){nt.prev(t,".nav-link, .list-group-item").forEach((function(t){return t.classList.add("active")})),nt.prev(t,".nav-item").forEach((function(t){nt.children(t,".nav-link").forEach((function(t){return t.classList.add("active")}))}))}))),q.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:t})},e._clear=function(){nt.find(this._selector).filter((function(t){return t.classList.contains("active")})).forEach((function(t){return t.classList.remove("active")}))},t.jQueryInterface=function(e){return this.each((function(){var n=L(this,"bs.scrollspy");if(n||(n=new t(this,"object"==typeof e&&e)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t.getInstance=function(t){return L(t,"bs.scrollspy")},n(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"Default",get:function(){return Jt}}]),t}();q.on(window,"load.bs.scrollspy.data-api",(function(){nt.find('[data-spy="scroll"]').forEach((function(t){return new ee(t,et.getDataAttributes(t))}))}));var ne=E();if(ne){var ie=ne.fn[Zt];ne.fn[Zt]=ee.jQueryInterface,ne.fn[Zt].Constructor=ee,ne.fn[Zt].noConflict=function(){return ne.fn[Zt]=ie,ee.jQueryInterface}}var oe=function(){function t(t){this._element=t,T(this._element,"bs.tab",this)}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains("active")||this._element.classList.contains("disabled"))){var e,n=d(this._element),i=this._element.closest(".nav, .list-group");if(i){var o="UL"===i.nodeName||"OL"===i.nodeName?":scope > li > .active":".active";e=(e=nt.find(o,i))[e.length-1]}var s=null;if(e&&(s=q.trigger(e,"hide.bs.tab",{relatedTarget:this._element})),!(q.trigger(this._element,"show.bs.tab",{relatedTarget:e}).defaultPrevented||null!==s&&s.defaultPrevented)){this._activate(this._element,i);var r=function(){q.trigger(e,"hidden.bs.tab",{relatedTarget:t._element}),q.trigger(t._element,"shown.bs.tab",{relatedTarget:e})};n?this._activate(n,n.parentNode,r):r()}}},e.dispose=function(){C(this._element,"bs.tab"),this._element=null},e._activate=function(t,e,n){var i=this,o=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?nt.children(e,".active"):nt.find(":scope > li > .active",e))[0],s=n&&o&&o.classList.contains("fade"),r=function(){return i._transitionComplete(t,o,n)};if(o&&s){var a=g(o);o.classList.remove("show"),q.one(o,"transitionend",r),_(o,a)}else r()},e._transitionComplete=function(t,e,n){if(e){e.classList.remove("active");var i=nt.findOne(":scope > .dropdown-menu .active",e.parentNode);i&&i.classList.remove("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}(t.classList.add("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),w(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&t.parentNode.classList.contains("dropdown-menu"))&&(t.closest(".dropdown")&&nt.find(".dropdown-toggle").forEach((function(t){return t.classList.add("active")})),t.setAttribute("aria-expanded",!0));n&&n()},t.jQueryInterface=function(e){return this.each((function(){var n=L(this,"bs.tab")||new t(this);if("string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t.getInstance=function(t){return L(t,"bs.tab")},n(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}}]),t}();q.on(document,"click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),(L(this,"bs.tab")||new oe(this)).show()}));var se=E();if(se){var re=se.fn.tab;se.fn.tab=oe.jQueryInterface,se.fn.tab.Constructor=oe,se.fn.tab.noConflict=function(){return se.fn.tab=re,oe.jQueryInterface}}var ae={animation:"boolean",autohide:"boolean",delay:"number"},le={animation:!0,autohide:!0,delay:500},ce=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners(),T(t,"bs.toast",this)}var e=t.prototype;return e.show=function(){var t=this;if(!q.trigger(this._element,"show.bs.toast").defaultPrevented){this._config.animation&&this._element.classList.add("fade");var e=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),q.trigger(t._element,"shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),w(this._element),this._element.classList.add("showing"),this._config.animation){var n=g(this._element);q.one(this._element,"transitionend",e),_(this._element,n)}else e()}},e.hide=function(){var t=this;if(this._element.classList.contains("show")&&!q.trigger(this._element,"hide.bs.toast").defaultPrevented){var e=function(){t._element.classList.add("hide"),q.trigger(t._element,"hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var n=g(this._element);q.one(this._element,"transitionend",e),_(this._element,n)}else e()}},e.dispose=function(){clearTimeout(this._timeout),this._timeout=null,this._element.classList.contains("show")&&this._element.classList.remove("show"),q.off(this._element,"click.dismiss.bs.toast"),C(this._element,"bs.toast"),this._element=null,this._config=null},e._getConfig=function(t){return t=s(s(s({},le),et.getDataAttributes(this._element)),"object"==typeof t&&t?t:{}),v("toast",t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;q.on(this._element,"click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return t.hide()}))},t.jQueryInterface=function(e){return this.each((function(){var n=L(this,"bs.toast");if(n||(n=new t(this,"object"==typeof e&&e)),"string"==typeof e){if(void 0===n[e])throw new TypeError('No method named "'+e+'"');n[e](this)}}))},t.getInstance=function(t){return L(t,"bs.toast")},n(t,null,[{key:"VERSION",get:function(){return"5.0.0-alpha1"}},{key:"DefaultType",get:function(){return ae}},{key:"Default",get:function(){return le}}]),t}(),ue=E();if(ue){var he=ue.fn.toast;ue.fn.toast=ce.jQueryInterface,ue.fn.toast.Constructor=ce,ue.fn.toast.noConflict=function(){return ue.fn.toast=he,ce.jQueryInterface}}return{Alert:K,Button:$,Carousel:lt,Collapse:gt,Dropdown:wt,Modal:Ct,Popover:Yt,ScrollSpy:ee,Tab:oe,Toast:ce,Tooltip:Ut}}));
diff --git a/assets/javascripts/bootstrap/alert.js b/assets/javascripts/bootstrap/alert.js
index 279348f..bde03b3 100644
--- a/assets/javascripts/bootstrap/alert.js
+++ b/assets/javascripts/bootstrap/alert.js
@@ -1,16 +1,97 @@
/*!
- * Bootstrap alert.js v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap alert.js v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 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.js'], 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/data.js'), require('./dom/event-handler.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js'], factory) :
+ (global = global || self, global.Alert = factory(global.Data, global.EventHandler));
+}(this, (function (Data, EventHandler) { 'use strict';
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
- Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
+ Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
+ EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): util/index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ var MILLISECONDS_MULTIPLIER = 1000;
+ var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
+
+ var getSelector = function getSelector(element) {
+ var selector = element.getAttribute('data-target');
+
+ if (!selector || selector === '#') {
+ var hrefAttr = element.getAttribute('href');
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
+ }
+
+ return selector;
+ };
+
+ var getElementFromSelector = function getElementFromSelector(element) {
+ var selector = getSelector(element);
+ return selector ? document.querySelector(selector) : null;
+ };
+
+ var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
+ if (!element) {
+ return 0;
+ } // Get transition-duration of the element
+
+
+ var _window$getComputedSt = window.getComputedStyle(element),
+ transitionDuration = _window$getComputedSt.transitionDuration,
+ transitionDelay = _window$getComputedSt.transitionDelay;
+
+ 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;
+ };
+
+ var triggerTransitionEnd = function triggerTransitionEnd(element) {
+ element.dispatchEvent(new Event(TRANSITION_END));
+ };
+
+ var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
+ var called = false;
+ var durationPadding = 5;
+ var emulatedDuration = duration + durationPadding;
+
+ function listener() {
+ called = true;
+ element.removeEventListener(TRANSITION_END, listener);
+ }
+
+ element.addEventListener(TRANSITION_END, listener);
+ setTimeout(function () {
+ if (!called) {
+ triggerTransitionEnd(element);
+ }
+ }, emulatedDuration);
+ };
+
+ var getjQuery = function getjQuery() {
+ var _window = window,
+ jQuery = _window.jQuery;
+
+ if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
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); } }
@@ -22,18 +103,17 @@
*/
var NAME = 'alert';
- var VERSION = '4.5.2';
+ var VERSION = '5.0.0-alpha1';
var DATA_KEY = 'bs.alert';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.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';
+ var CLASSNAME_ALERT = 'alert';
+ var CLASSNAME_FADE = 'fade';
+ var CLASSNAME_SHOW = 'show';
/**
* ------------------------------------------------------------------------
* Class Definition
@@ -43,6 +123,10 @@
var Alert = /*#__PURE__*/function () {
function Alert(element) {
this._element = element;
+
+ if (this._element) {
+ Data.setData(element, DATA_KEY, this);
+ }
} // Getters
@@ -58,7 +142,7 @@
var customEvent = this._triggerCloseEvent(rootElement);
- if (customEvent.isDefaultPrevented()) {
+ if (customEvent === null || customEvent.defaultPrevented) {
return;
}
@@ -66,62 +150,52 @@
};
_proto.dispose = function dispose() {
- $.removeData(this._element, DATA_KEY);
+ Data.removeData(this._element, DATA_KEY);
this._element = null;
} // Private
;
_proto._getRootElement = function _getRootElement(element) {
- var selector = Util.getSelectorFromElement(element);
- var parent = false;
-
- if (selector) {
- parent = document.querySelector(selector);
- }
-
- if (!parent) {
- parent = $(element).closest("." + CLASS_NAME_ALERT)[0];
- }
-
- return parent;
+ return getElementFromSelector(element) || element.closest("." + CLASSNAME_ALERT);
};
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
- var closeEvent = $.Event(EVENT_CLOSE);
- $(element).trigger(closeEvent);
- return closeEvent;
+ return EventHandler.trigger(element, EVENT_CLOSE);
};
_proto._removeElement = function _removeElement(element) {
var _this = this;
- $(element).removeClass(CLASS_NAME_SHOW);
+ element.classList.remove(CLASSNAME_SHOW);
- if (!$(element).hasClass(CLASS_NAME_FADE)) {
+ if (!element.classList.contains(CLASSNAME_FADE)) {
this._destroyElement(element);
return;
}
- var transitionDuration = Util.getTransitionDurationFromElement(element);
- $(element).one(Util.TRANSITION_END, function (event) {
- return _this._destroyElement(element, event);
- }).emulateTransitionEnd(transitionDuration);
+ var transitionDuration = getTransitionDurationFromElement(element);
+ EventHandler.one(element, TRANSITION_END, function () {
+ return _this._destroyElement(element);
+ });
+ emulateTransitionEnd(element, transitionDuration);
};
_proto._destroyElement = function _destroyElement(element) {
- $(element).detach().trigger(EVENT_CLOSED).remove();
+ if (element.parentNode) {
+ element.parentNode.removeChild(element);
+ }
+
+ EventHandler.trigger(element, EVENT_CLOSED);
} // Static
;
- Alert._jQueryInterface = function _jQueryInterface(config) {
+ Alert.jQueryInterface = function jQueryInterface(config) {
return this.each(function () {
- var $element = $(this);
- var data = $element.data(DATA_KEY);
+ var data = Data.getData(this, DATA_KEY);
if (!data) {
data = new Alert(this);
- $element.data(DATA_KEY, data);
}
if (config === 'close') {
@@ -130,7 +204,7 @@
});
};
- Alert._handleDismiss = function _handleDismiss(alertInstance) {
+ Alert.handleDismiss = function handleDismiss(alertInstance) {
return function (event) {
if (event) {
event.preventDefault();
@@ -140,6 +214,10 @@
};
};
+ Alert.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY);
+ };
+
_createClass(Alert, null, [{
key: "VERSION",
get: function get() {
@@ -156,20 +234,27 @@
*/
- $(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()));
+ var $ = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .alert to jQuery only if jQuery is present
*/
- $.fn[NAME] = Alert._jQueryInterface;
- $.fn[NAME].Constructor = Alert;
+ /* istanbul ignore if */
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Alert._jQueryInterface;
- };
+ if ($) {
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
+ $.fn[NAME] = Alert.jQueryInterface;
+ $.fn[NAME].Constructor = Alert;
+
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
+ return Alert.jQueryInterface;
+ };
+ }
return Alert;
diff --git a/assets/javascripts/bootstrap/button.js b/assets/javascripts/bootstrap/button.js
index b937cc5..1c6e2c7 100644
--- a/assets/javascripts/bootstrap/button.js
+++ b/assets/javascripts/bootstrap/button.js
@@ -1,15 +1,34 @@
/*!
- * Bootstrap button.js v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap button.js v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 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/data.js'), require('./dom/event-handler.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js'], factory) :
+ (global = global || self, global.Button = factory(global.Data, global.EventHandler));
+}(this, (function (Data, EventHandler) { 'use strict';
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
+ Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
+ EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): util/index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+ var getjQuery = function getjQuery() {
+ var _window = window,
+ jQuery = _window.jQuery;
+
+ if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
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); } }
@@ -21,24 +40,13 @@
*/
var NAME = 'button';
- var VERSION = '4.5.2';
+ var VERSION = '5.0.0-alpha1';
var DATA_KEY = 'bs.button';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.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;
/**
* ------------------------------------------------------------------------
* Class Definition
@@ -48,6 +56,7 @@
var Button = /*#__PURE__*/function () {
function Button(element) {
this._element = element;
+ Data.setData(element, DATA_KEY, this);
} // Getters
@@ -55,64 +64,22 @@
// Public
_proto.toggle = function toggle() {
- var triggerChangeEvent = true;
- var addAriaPressed = true;
- var rootElement = $(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) {
- $(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);
- }
-
- $(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);
- }
- }
+ // 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));
};
_proto.dispose = function dispose() {
- $.removeData(this._element, DATA_KEY);
+ Data.removeData(this._element, DATA_KEY);
this._element = null;
} // Static
;
- Button._jQueryInterface = function _jQueryInterface(config) {
+ Button.jQueryInterface = function jQueryInterface(config) {
return this.each(function () {
- var data = $(this).data(DATA_KEY);
+ var data = Data.getData(this, DATA_KEY);
if (!data) {
data = new Button(this);
- $(this).data(DATA_KEY, data);
}
if (config === 'toggle') {
@@ -121,6 +88,10 @@
});
};
+ Button.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY);
+ };
+
_createClass(Button, null, [{
key: "VERSION",
get: function get() {
@@ -137,75 +108,37 @@
*/
- $(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
- var button = event.target;
- var initialButton = button;
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
+ event.preventDefault();
+ var button = event.target.closest(SELECTOR_DATA_TOGGLE);
+ var data = Data.getData(button, DATA_KEY);
- if (!$(button).hasClass(CLASS_NAME_BUTTON)) {
- button = $(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 !== 'LABEL' || inputBtn && inputBtn.type !== 'checkbox') {
- Button._jQueryInterface.call($(button), 'toggle');
- }
- }
- }).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
- var button = $(event.target).closest(SELECTOR_BUTTON)[0];
- $(button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type));
- });
- $(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();
});
+ var $ = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .button to jQuery only if jQuery is present
*/
- $.fn[NAME] = Button._jQueryInterface;
- $.fn[NAME].Constructor = Button;
+ /* istanbul ignore if */
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Button._jQueryInterface;
- };
+ if ($) {
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
+ $.fn[NAME] = Button.jQueryInterface;
+ $.fn[NAME].Constructor = Button;
+
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
+ return Button.jQueryInterface;
+ };
+ }
return Button;
diff --git a/assets/javascripts/bootstrap/carousel.js b/assets/javascripts/bootstrap/carousel.js
index e0ca023..a0afbe4 100644
--- a/assets/javascripts/bootstrap/carousel.js
+++ b/assets/javascripts/bootstrap/carousel.js
@@ -1,18 +1,147 @@
/*!
- * Bootstrap carousel.js v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap carousel.js v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 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.js'], 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/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', './dom/selector-engine.js'], factory) :
+ (global = global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
+}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
- Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
+ Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
+ EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
+ Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
+ SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
- 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]; } } } return target; }; return _extends.apply(this, arguments); }
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): util/index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ var MILLISECONDS_MULTIPLIER = 1000;
+ var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
+
+ var toType = function toType(obj) {
+ if (obj === null || obj === undefined) {
+ return "" + obj;
+ }
+
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
+ };
+
+ var getSelector = function getSelector(element) {
+ var selector = element.getAttribute('data-target');
+
+ if (!selector || selector === '#') {
+ var hrefAttr = element.getAttribute('href');
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
+ }
+
+ return selector;
+ };
+
+ var getElementFromSelector = function getElementFromSelector(element) {
+ var selector = getSelector(element);
+ return selector ? document.querySelector(selector) : null;
+ };
+
+ var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
+ if (!element) {
+ return 0;
+ } // Get transition-duration of the element
+
+
+ var _window$getComputedSt = window.getComputedStyle(element),
+ transitionDuration = _window$getComputedSt.transitionDuration,
+ transitionDelay = _window$getComputedSt.transitionDelay;
+
+ 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;
+ };
+
+ var triggerTransitionEnd = function triggerTransitionEnd(element) {
+ element.dispatchEvent(new Event(TRANSITION_END));
+ };
+
+ var isElement = function isElement(obj) {
+ return (obj[0] || obj).nodeType;
+ };
+
+ var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
+ var called = false;
+ var durationPadding = 5;
+ var emulatedDuration = duration + durationPadding;
+
+ function listener() {
+ called = true;
+ element.removeEventListener(TRANSITION_END, listener);
+ }
+
+ element.addEventListener(TRANSITION_END, listener);
+ setTimeout(function () {
+ if (!called) {
+ triggerTransitionEnd(element);
+ }
+ }, emulatedDuration);
+ };
+
+ var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
+ Object.keys(configTypes).forEach(function (property) {
+ var expectedTypes = configTypes[property];
+ var value = config[property];
+ var valueType = value && 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 + "\"."));
+ }
+ });
+ };
+
+ var isVisible = function isVisible(element) {
+ if (!element) {
+ return false;
+ }
+
+ if (element.style && element.parentNode && element.parentNode.style) {
+ var elementStyle = getComputedStyle(element);
+ var parentNodeStyle = getComputedStyle(element.parentNode);
+ return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
+ }
+
+ return false;
+ };
+
+ var reflow = function reflow(element) {
+ return element.offsetHeight;
+ };
+
+ var getjQuery = function getjQuery() {
+ var _window = window,
+ jQuery = _window.jQuery;
+
+ if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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); } }
@@ -24,15 +153,12 @@
*/
var NAME = 'carousel';
- var VERSION = '4.5.2';
+ var VERSION = '5.0.0-alpha1';
var DATA_KEY = 'bs.carousel';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.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 ARROW_LEFT_KEY = 'ArrowLeft';
+ var ARROW_RIGHT_KEY = 'ArrowRight';
var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
var SWIPE_THRESHOLD = 40;
@@ -107,11 +233,13 @@
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();
+
+ Data.setData(element, DATA_KEY, this);
} // Getters
@@ -127,7 +255,7 @@
_proto.nextWhenVisible = function nextWhenVisible() {
// Don't call next when the page isn't visible
// or the carousel or its parent isn't visible
- if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
+ if (!document.hidden && isVisible(this._element)) {
this.next();
}
};
@@ -143,8 +271,8 @@
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);
}
@@ -162,7 +290,7 @@
this._interval = null;
}
- if (this._config.interval && !this._isPaused) {
+ if (this._config && this._config.interval && !this._isPaused) {
this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
}
};
@@ -170,7 +298,7 @@
_proto.to = function to(index) {
var _this = this;
- this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
+ this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
var activeIndex = this._getItemIndex(this._activeElement);
@@ -179,7 +307,7 @@
}
if (this._isSliding) {
- $(this._element).one(EVENT_SLID, function () {
+ EventHandler.one(this._element, EVENT_SLID, function () {
return _this.to(index);
});
return;
@@ -197,8 +325,8 @@
};
_proto.dispose = function dispose() {
- $(this._element).off(EVENT_KEY);
- $.removeData(this._element, DATA_KEY);
+ EventHandler.off(this._element, EVENT_KEY);
+ Data.removeData(this._element, DATA_KEY);
this._items = null;
this._config = null;
this._element = null;
@@ -211,8 +339,8 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _extends({}, Default, config);
- Util.typeCheckConfig(NAME, config, DefaultType);
+ config = _objectSpread(_objectSpread({}, Default), config);
+ typeCheckConfig(NAME, config, DefaultType);
return config;
};
@@ -240,20 +368,21 @@
var _this2 = this;
if (this._config.keyboard) {
- $(this._element).on(EVENT_KEYDOWN, function (event) {
+ EventHandler.on(this._element, EVENT_KEYDOWN, function (event) {
return _this2._keydown(event);
});
}
if (this._config.pause === 'hover') {
- $(this._element).on(EVENT_MOUSEENTER, function (event) {
+ EventHandler.on(this._element, EVENT_MOUSEENTER, function (event) {
return _this2.pause(event);
- }).on(EVENT_MOUSELEAVE, function (event) {
+ });
+ EventHandler.on(this._element, EVENT_MOUSELEAVE, function (event) {
return _this2.cycle(event);
});
}
- if (this._config.touch) {
+ if (this._config.touch && this._touchSupported) {
this._addTouchEventListeners();
}
};
@@ -261,30 +390,26 @@
_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;
+ if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
+ _this3.touchStartX = event.clientX;
} else if (!_this3._pointerEvent) {
- _this3.touchStartX = event.originalEvent.touches[0].clientX;
+ _this3.touchStartX = event.touches[0].clientX;
}
};
var move = function move(event) {
// ensure swiping with one touch and not pinching
- if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
+ if (event.touches && event.touches.length > 1) {
_this3.touchDeltaX = 0;
} else {
- _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
+ _this3.touchDeltaX = event.touches[0].clientX - _this3.touchStartX;
}
};
var end = function end(event) {
- if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
- _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
+ if (_this3._pointerEvent && PointerType[event.pointerType.toUpperCase()]) {
+ _this3.touchDeltaX = event.clientX - _this3.touchStartX;
}
_this3._handleSwipe();
@@ -309,27 +434,29 @@
}
};
- $(this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) {
- return e.preventDefault();
+ SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(function (itemImg) {
+ EventHandler.on(itemImg, EVENT_DRAG_START, function (e) {
+ return e.preventDefault();
+ });
});
if (this._pointerEvent) {
- $(this._element).on(EVENT_POINTERDOWN, function (event) {
+ EventHandler.on(this._element, EVENT_POINTERDOWN, function (event) {
return start(event);
});
- $(this._element).on(EVENT_POINTERUP, function (event) {
+ EventHandler.on(this._element, EVENT_POINTERUP, function (event) {
return end(event);
});
this._element.classList.add(CLASS_NAME_POINTER_EVENT);
} else {
- $(this._element).on(EVENT_TOUCHSTART, function (event) {
+ EventHandler.on(this._element, EVENT_TOUCHSTART, function (event) {
return start(event);
});
- $(this._element).on(EVENT_TOUCHMOVE, function (event) {
+ EventHandler.on(this._element, EVENT_TOUCHMOVE, function (event) {
return move(event);
});
- $(this._element).on(EVENT_TOUCHEND, function (event) {
+ EventHandler.on(this._element, EVENT_TOUCHEND, function (event) {
return end(event);
});
}
@@ -340,13 +467,13 @@
return;
}
- switch (event.which) {
- case ARROW_LEFT_KEYCODE:
+ switch (event.key) {
+ case ARROW_LEFT_KEY:
event.preventDefault();
this.prev();
break;
- case ARROW_RIGHT_KEYCODE:
+ case ARROW_RIGHT_KEY:
event.preventDefault();
this.next();
break;
@@ -354,7 +481,7 @@
};
_proto._getItemIndex = function _getItemIndex(element) {
- this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : [];
+ this._items = element && element.parentNode ? SelectorEngine.find(SELECTOR_ITEM, element.parentNode) : [];
return this._items.indexOf(element);
};
@@ -379,27 +506,28 @@
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
var targetIndex = this._getItemIndex(relatedTarget);
- var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM));
+ var fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element));
- var slideEvent = $.Event(EVENT_SLIDE, {
+ return EventHandler.trigger(this._element, EVENT_SLIDE, {
relatedTarget: relatedTarget,
direction: eventDirectionName,
from: fromIndex,
to: targetIndex
});
- $(this._element).trigger(slideEvent);
- return slideEvent;
};
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
if (this._indicatorsElement) {
- var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE));
- $(indicators).removeClass(CLASS_NAME_ACTIVE);
+ var indicators = SelectorEngine.find(SELECTOR_ACTIVE, this._indicatorsElement);
+
+ for (var i = 0; i < indicators.length; i++) {
+ indicators[i].classList.remove(CLASS_NAME_ACTIVE);
+ }
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
if (nextIndicator) {
- $(nextIndicator).addClass(CLASS_NAME_ACTIVE);
+ nextIndicator.classList.add(CLASS_NAME_ACTIVE);
}
}
};
@@ -407,7 +535,7 @@
_proto._slide = function _slide(direction, element) {
var _this4 = this;
- var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM);
+ var activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
var activeElementIndex = this._getItemIndex(activeElement);
@@ -430,14 +558,14 @@
eventDirectionName = DIRECTION_RIGHT;
}
- if (nextElement && $(nextElement).hasClass(CLASS_NAME_ACTIVE)) {
+ if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) {
this._isSliding = false;
return;
}
var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
- if (slideEvent.isDefaultPrevented()) {
+ if (slideEvent.defaultPrevented) {
return;
}
@@ -454,18 +582,11 @@
this._setActiveIndicatorElement(nextElement);
- var slidEvent = $.Event(EVENT_SLID, {
- relatedTarget: nextElement,
- direction: eventDirectionName,
- from: activeElementIndex,
- to: nextElementIndex
- });
-
- if ($(this._element).hasClass(CLASS_NAME_SLIDE)) {
- $(nextElement).addClass(orderClassName);
- Util.reflow(nextElement);
- $(activeElement).addClass(directionalClassName);
- $(nextElement).addClass(directionalClassName);
+ if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
+ nextElement.classList.add(orderClassName);
+ reflow(nextElement);
+ activeElement.classList.add(directionalClassName);
+ nextElement.classList.add(directionalClassName);
var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
if (nextElementInterval) {
@@ -475,20 +596,32 @@
this._config.interval = this._config.defaultInterval || this._config.interval;
}
- var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
- $(activeElement).one(Util.TRANSITION_END, function () {
- $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE);
- $(activeElement).removeClass(CLASS_NAME_ACTIVE + " " + orderClassName + " " + directionalClassName);
+ var transitionDuration = getTransitionDurationFromElement(activeElement);
+ EventHandler.one(activeElement, TRANSITION_END, function () {
+ nextElement.classList.remove(directionalClassName, orderClassName);
+ nextElement.classList.add(CLASS_NAME_ACTIVE);
+ activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName);
_this4._isSliding = false;
setTimeout(function () {
- return $(_this4._element).trigger(slidEvent);
+ EventHandler.trigger(_this4._element, EVENT_SLID, {
+ relatedTarget: nextElement,
+ direction: eventDirectionName,
+ from: activeElementIndex,
+ to: nextElementIndex
+ });
}, 0);
- }).emulateTransitionEnd(transitionDuration);
+ });
+ emulateTransitionEnd(activeElement, transitionDuration);
} 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);
+ EventHandler.trigger(this._element, EVENT_SLID, {
+ relatedTarget: nextElement,
+ direction: eventDirectionName,
+ from: activeElementIndex,
+ to: nextElementIndex
+ });
}
if (isCycling) {
@@ -497,52 +630,49 @@
} // Static
;
- Carousel._jQueryInterface = function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
+ Carousel.carouselInterface = function carouselInterface(element, config) {
+ var data = Data.getData(element, DATA_KEY);
- var _config = _extends({}, Default, $(this).data());
+ var _config = _objectSpread(_objectSpread({}, Default), Manipulator.getDataAttributes(element));
- if (typeof config === 'object') {
- _config = _extends({}, _config, config);
- }
+ if (typeof config === 'object') {
+ _config = _objectSpread(_objectSpread({}, _config), config);
+ }
+
+ var action = typeof config === 'string' ? config : _config.slide;
- var 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();
- }
+ Carousel.jQueryInterface = function jQueryInterface(config) {
+ return this.each(function () {
+ Carousel.carouselInterface(this, config);
});
};
- Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
- var selector = Util.getSelectorFromElement(this);
+ Carousel.dataApiClickHandler = function dataApiClickHandler(event) {
+ var target = getElementFromSelector(this);
- if (!selector) {
+ if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
return;
}
- var target = $(selector)[0];
-
- if (!target || !$(target).hasClass(CLASS_NAME_CAROUSEL)) {
- return;
- }
-
- var config = _extends({}, $(target).data(), $(this).data());
+ var config = _objectSpread(_objectSpread({}, Manipulator.getDataAttributes(target)), Manipulator.getDataAttributes(this));
var slideIndex = this.getAttribute('data-slide-to');
@@ -550,15 +680,19 @@
config.interval = false;
}
- Carousel._jQueryInterface.call($(target), config);
+ Carousel.carouselInterface(target, config);
if (slideIndex) {
- $(target).data(DATA_KEY).to(slideIndex);
+ Data.getData(target, DATA_KEY).to(slideIndex);
}
event.preventDefault();
};
+ Carousel.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY);
+ };
+
_createClass(Carousel, null, [{
key: "VERSION",
get: function get() {
@@ -580,29 +714,34 @@
*/
- $(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler);
- $(window).on(EVENT_LOAD_DATA_API, function () {
- var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE));
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
+ EventHandler.on(window, EVENT_LOAD_DATA_API, function () {
+ var carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
for (var i = 0, len = carousels.length; i < len; i++) {
- var $carousel = $(carousels[i]);
-
- Carousel._jQueryInterface.call($carousel, $carousel.data());
+ Carousel.carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY));
}
});
+ var $ = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .carousel to jQuery only if jQuery is present
*/
- $.fn[NAME] = Carousel._jQueryInterface;
- $.fn[NAME].Constructor = Carousel;
+ /* istanbul ignore if */
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Carousel._jQueryInterface;
- };
+ if ($) {
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
+ $.fn[NAME] = Carousel.jQueryInterface;
+ $.fn[NAME].Constructor = Carousel;
+
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
+ return Carousel.jQueryInterface;
+ };
+ }
return Carousel;
diff --git a/assets/javascripts/bootstrap/collapse.js b/assets/javascripts/bootstrap/collapse.js
index 0b00a52..28e1130 100644
--- a/assets/javascripts/bootstrap/collapse.js
+++ b/assets/javascripts/bootstrap/collapse.js
@@ -1,18 +1,143 @@
/*!
- * Bootstrap collapse.js v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap collapse.js v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 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.js'], 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/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', './dom/selector-engine.js'], factory) :
+ (global = global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
+}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
- Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
+ Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
+ EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
+ Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
+ SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
- 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]; } } } return target; }; return _extends.apply(this, arguments); }
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): util/index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ var MILLISECONDS_MULTIPLIER = 1000;
+ var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
+
+ var toType = function toType(obj) {
+ if (obj === null || obj === undefined) {
+ return "" + obj;
+ }
+
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
+ };
+
+ var getSelector = function getSelector(element) {
+ var selector = element.getAttribute('data-target');
+
+ if (!selector || selector === '#') {
+ var hrefAttr = element.getAttribute('href');
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
+ }
+
+ return selector;
+ };
+
+ var getSelectorFromElement = function getSelectorFromElement(element) {
+ var selector = getSelector(element);
+
+ if (selector) {
+ return document.querySelector(selector) ? selector : null;
+ }
+
+ return null;
+ };
+
+ var getElementFromSelector = function getElementFromSelector(element) {
+ var selector = getSelector(element);
+ return selector ? document.querySelector(selector) : null;
+ };
+
+ var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
+ if (!element) {
+ return 0;
+ } // Get transition-duration of the element
+
+
+ var _window$getComputedSt = window.getComputedStyle(element),
+ transitionDuration = _window$getComputedSt.transitionDuration,
+ transitionDelay = _window$getComputedSt.transitionDelay;
+
+ 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;
+ };
+
+ var triggerTransitionEnd = function triggerTransitionEnd(element) {
+ element.dispatchEvent(new Event(TRANSITION_END));
+ };
+
+ var isElement = function isElement(obj) {
+ return (obj[0] || obj).nodeType;
+ };
+
+ var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
+ var called = false;
+ var durationPadding = 5;
+ var emulatedDuration = duration + durationPadding;
+
+ function listener() {
+ called = true;
+ element.removeEventListener(TRANSITION_END, listener);
+ }
+
+ element.addEventListener(TRANSITION_END, listener);
+ setTimeout(function () {
+ if (!called) {
+ triggerTransitionEnd(element);
+ }
+ }, emulatedDuration);
+ };
+
+ var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
+ Object.keys(configTypes).forEach(function (property) {
+ var expectedTypes = configTypes[property];
+ var value = config[property];
+ var valueType = value && 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 + "\"."));
+ }
+ });
+ };
+
+ var reflow = function reflow(element) {
+ return element.offsetHeight;
+ };
+
+ var getjQuery = function getjQuery() {
+ var _window = window,
+ jQuery = _window.jQuery;
+
+ if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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); } }
@@ -24,11 +149,10 @@
*/
var NAME = 'collapse';
- var VERSION = '4.5.2';
+ var VERSION = '5.0.0-alpha1';
var DATA_KEY = 'bs.collapse';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
toggle: true,
parent: ''
@@ -46,8 +170,8 @@
var CLASS_NAME_COLLAPSE = 'collapse';
var CLASS_NAME_COLLAPSING = 'collapsing';
var CLASS_NAME_COLLAPSED = 'collapsed';
- var DIMENSION_WIDTH = 'width';
- var DIMENSION_HEIGHT = 'height';
+ var WIDTH = 'width';
+ var HEIGHT = 'height';
var SELECTOR_ACTIVES = '.show, .collapsing';
var SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]';
/**
@@ -61,17 +185,17 @@
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));
+ this._triggerArray = SelectorEngine.find(SELECTOR_DATA_TOGGLE + "[href=\"#" + element.id + "\"]," + (SELECTOR_DATA_TOGGLE + "[data-target=\"#" + element.id + "\"]"));
+ var toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE);
for (var i = 0, len = toggleList.length; i < len; i++) {
var elem = toggleList[i];
- var selector = Util.getSelectorFromElement(elem);
- var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
+ var selector = getSelectorFromElement(elem);
+ var filterElement = SelectorEngine.find(selector).filter(function (foundElem) {
return foundElem === element;
});
- if (selector !== null && filterElement.length > 0) {
+ if (selector !== null && filterElement.length) {
this._selector = selector;
this._triggerArray.push(elem);
@@ -87,6 +211,8 @@
if (this._config.toggle) {
this.toggle();
}
+
+ Data.setData(element, DATA_KEY, this);
} // Getters
@@ -94,7 +220,7 @@
// Public
_proto.toggle = function toggle() {
- if ($(this._element).hasClass(CLASS_NAME_SHOW)) {
+ if (this._element.classList.contains(CLASS_NAME_SHOW)) {
this.hide();
} else {
this.show();
@@ -104,7 +230,7 @@
_proto.show = function show() {
var _this = this;
- if (this._isTransitioning || $(this._element).hasClass(CLASS_NAME_SHOW)) {
+ if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
return;
}
@@ -112,7 +238,7 @@
var activesData;
if (this._parent) {
- actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)).filter(function (elem) {
+ actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(function (elem) {
if (typeof _this._config.parent === 'string') {
return elem.getAttribute('data-parent') === _this._config.parent;
}
@@ -125,88 +251,106 @@
}
}
+ var container = SelectorEngine.findOne(this._selector);
+
if (actives) {
- activesData = $(actives).not(this._selector).data(DATA_KEY);
+ var tempActiveData = actives.filter(function (elem) {
+ return container !== elem;
+ });
+ activesData = tempActiveData[0] ? Data.getData(tempActiveData[0], DATA_KEY) : null;
if (activesData && activesData._isTransitioning) {
return;
}
}
- var startEvent = $.Event(EVENT_SHOW);
- $(this._element).trigger(startEvent);
+ var startEvent = EventHandler.trigger(this._element, EVENT_SHOW);
- if (startEvent.isDefaultPrevented()) {
+ if (startEvent.defaultPrevented) {
return;
}
if (actives) {
- Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide');
+ actives.forEach(function (elemActive) {
+ if (container !== elemActive) {
+ Collapse.collapseInterface(elemActive, 'hide');
+ }
- if (!activesData) {
- $(actives).data(DATA_KEY, null);
- }
+ if (!activesData) {
+ Data.setData(elemActive, DATA_KEY, null);
+ }
+ });
}
var 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(function (element) {
+ element.classList.remove(CLASS_NAME_COLLAPSED);
+ element.setAttribute('aria-expanded', true);
+ });
}
this.setTransitioning(true);
var complete = function 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);
};
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
var scrollSize = "scroll" + capitalizedDimension;
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
- $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ var transitionDuration = getTransitionDurationFromElement(this._element);
+ EventHandler.one(this._element, TRANSITION_END, complete);
+ emulateTransitionEnd(this._element, transitionDuration);
this._element.style[dimension] = this._element[scrollSize] + "px";
};
_proto.hide = function hide() {
var _this2 = this;
- if (this._isTransitioning || !$(this._element).hasClass(CLASS_NAME_SHOW)) {
+ if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
return;
}
- var startEvent = $.Event(EVENT_HIDE);
- $(this._element).trigger(startEvent);
+ var startEvent = EventHandler.trigger(this._element, EVENT_HIDE);
- if (startEvent.isDefaultPrevented()) {
+ if (startEvent.defaultPrevented) {
return;
}
var dimension = this._getDimension();
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
- Util.reflow(this._element);
- $(this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW);
+ reflow(this._element);
+
+ this._element.classList.add(CLASS_NAME_COLLAPSING);
+
+ this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW);
+
var triggerArrayLength = this._triggerArray.length;
if (triggerArrayLength > 0) {
for (var i = 0; i < triggerArrayLength; i++) {
var trigger = this._triggerArray[i];
- var selector = Util.getSelectorFromElement(trigger);
-
- if (selector !== null) {
- var $elem = $([].slice.call(document.querySelectorAll(selector)));
+ var elem = getElementFromSelector(trigger);
- 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);
}
}
}
@@ -216,12 +360,17 @@
var complete = function complete() {
_this2.setTransitioning(false);
- $(_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN);
+ _this2._element.classList.remove(CLASS_NAME_COLLAPSING);
+
+ _this2._element.classList.add(CLASS_NAME_COLLAPSE);
+
+ EventHandler.trigger(_this2._element, EVENT_HIDDEN);
};
this._element.style[dimension] = '';
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
- $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ var transitionDuration = getTransitionDurationFromElement(this._element);
+ EventHandler.one(this._element, TRANSITION_END, complete);
+ emulateTransitionEnd(this._element, transitionDuration);
};
_proto.setTransitioning = function setTransitioning(isTransitioning) {
@@ -229,7 +378,7 @@
};
_proto.dispose = function dispose() {
- $.removeData(this._element, DATA_KEY);
+ Data.removeData(this._element, DATA_KEY);
this._config = null;
this._parent = null;
this._element = null;
@@ -239,81 +388,93 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _extends({}, Default, config);
+ config = _objectSpread(_objectSpread({}, Default), config);
config.toggle = Boolean(config.toggle); // Coerce string values
- Util.typeCheckConfig(NAME, config, DefaultType);
+ typeCheckConfig(NAME, config, DefaultType);
return config;
};
_proto._getDimension = function _getDimension() {
- var hasWidth = $(this._element).hasClass(DIMENSION_WIDTH);
- return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT;
+ var hasWidth = this._element.classList.contains(WIDTH);
+
+ return hasWidth ? WIDTH : HEIGHT;
};
_proto._getParent = function _getParent() {
var _this3 = this;
- var parent;
+ var parent = this._config.parent;
- if (Util.isElement(this._config.parent)) {
- parent = this._config.parent; // It's a jQuery object
-
- if (typeof this._config.parent.jquery !== 'undefined') {
- parent = this._config.parent[0];
+ if (isElement(parent)) {
+ // it's a jQuery object
+ if (typeof parent.jquery !== 'undefined' || typeof parent[0] !== 'undefined') {
+ parent = parent[0];
}
} else {
- parent = document.querySelector(this._config.parent);
+ parent = SelectorEngine.findOne(parent);
}
- var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
- var children = [].slice.call(parent.querySelectorAll(selector));
- $(children).each(function (i, element) {
- _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
+ var selector = SELECTOR_DATA_TOGGLE + "[data-parent=\"" + parent + "\"]";
+ SelectorEngine.find(selector, parent).forEach(function (element) {
+ var selected = getElementFromSelector(element);
+
+ _this3._addAriaAndCollapsedClass(selected, [element]);
});
return parent;
};
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
- var isOpen = $(element).hasClass(CLASS_NAME_SHOW);
+ if (element) {
+ var isOpen = element.classList.contains(CLASS_NAME_SHOW);
+
+ if (triggerArray.length) {
+ triggerArray.forEach(function (elem) {
+ if (isOpen) {
+ elem.classList.remove(CLASS_NAME_COLLAPSED);
+ } else {
+ elem.classList.add(CLASS_NAME_COLLAPSED);
+ }
- if (triggerArray.length) {
- $(triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
+ elem.setAttribute('aria-expanded', isOpen);
+ });
+ }
}
} // Static
;
- Collapse._getTargetFromElement = function _getTargetFromElement(element) {
- var selector = Util.getSelectorFromElement(element);
- return selector ? document.querySelector(selector) : null;
- };
+ Collapse.collapseInterface = function collapseInterface(element, config) {
+ var data = Data.getData(element, DATA_KEY);
- Collapse._jQueryInterface = function _jQueryInterface(config) {
- return this.each(function () {
- var $this = $(this);
- var data = $this.data(DATA_KEY);
+ var _config = _objectSpread(_objectSpread(_objectSpread({}, Default), Manipulator.getDataAttributes(element)), typeof config === 'object' && config ? config : {});
- var _config = _extends({}, Default, $this.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);
- $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]();
- }
+ Collapse.jQueryInterface = function jQueryInterface(config) {
+ return this.each(function () {
+ Collapse.collapseInterface(this, config);
});
};
+ Collapse.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY);
+ };
+
_createClass(Collapse, null, [{
key: "VERSION",
get: function get() {
@@ -335,36 +496,54 @@
*/
- $(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.preventDefault();
}
- var $trigger = $(this);
- var selector = Util.getSelectorFromElement(this);
- var selectors = [].slice.call(document.querySelectorAll(selector));
- $(selectors).each(function () {
- var $target = $(this);
- var data = $target.data(DATA_KEY);
- var config = data ? 'toggle' : $trigger.data();
+ var triggerData = Manipulator.getDataAttributes(this);
+ var selector = getSelectorFromElement(this);
+ var selectorElements = SelectorEngine.find(selector);
+ selectorElements.forEach(function (element) {
+ var data = Data.getData(element, DATA_KEY);
+ var config;
+
+ if (data) {
+ // update parent attribute
+ if (data._parent === null && typeof triggerData.parent === 'string') {
+ data._config.parent = triggerData.parent;
+ data._parent = data._getParent();
+ }
- Collapse._jQueryInterface.call($target, config);
+ config = 'toggle';
+ } else {
+ config = triggerData;
+ }
+
+ Collapse.collapseInterface(element, config);
});
});
+ var $ = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .collapse to jQuery only if jQuery is present
*/
- $.fn[NAME] = Collapse._jQueryInterface;
- $.fn[NAME].Constructor = Collapse;
+ /* istanbul ignore if */
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Collapse._jQueryInterface;
- };
+ if ($) {
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
+ $.fn[NAME] = Collapse.jQueryInterface;
+ $.fn[NAME].Constructor = Collapse;
+
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
+ return Collapse.jQueryInterface;
+ };
+ }
return Collapse;
diff --git a/assets/javascripts/bootstrap/dom/data.js b/assets/javascripts/bootstrap/dom/data.js
new file mode 100644
index 0000000..ef663b7
--- /dev/null
+++ b/assets/javascripts/bootstrap/dom/data.js
@@ -0,0 +1,81 @@
+/*!
+ * Bootstrap data.js v5.0.0-alpha1 (https://getbootstrap.com/)
+ * Copyright 2011-2020 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() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global = global || self, global.Data = factory());
+}(this, (function () { 'use strict';
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): dom/data.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+ var mapData = function () {
+ var storeData = {};
+ var id = 1;
+ return {
+ set: function set(element, key, data) {
+ if (typeof element.key === 'undefined') {
+ element.key = {
+ key: key,
+ id: id
+ };
+ id++;
+ }
+
+ storeData[element.key.id] = data;
+ },
+ get: function get(element, key) {
+ if (!element || typeof element.key === 'undefined') {
+ return null;
+ }
+
+ var keyProperties = element.key;
+
+ if (keyProperties.key === key) {
+ return storeData[keyProperties.id];
+ }
+
+ return null;
+ },
+ delete: function _delete(element, key) {
+ if (typeof element.key === 'undefined') {
+ return;
+ }
+
+ var keyProperties = element.key;
+
+ if (keyProperties.key === key) {
+ delete storeData[keyProperties.id];
+ delete element.key;
+ }
+ }
+ };
+ }();
+
+ var Data = {
+ setData: function setData(instance, key, data) {
+ mapData.set(instance, key, data);
+ },
+ getData: function getData(instance, key) {
+ return mapData.get(instance, key);
+ },
+ removeData: function removeData(instance, key) {
+ mapData.delete(instance, key);
+ }
+ };
+
+ return Data;
+
+})));
diff --git a/assets/javascripts/bootstrap/dom/event-handler.js b/assets/javascripts/bootstrap/dom/event-handler.js
new file mode 100644
index 0000000..f5945ed
--- /dev/null
+++ b/assets/javascripts/bootstrap/dom/event-handler.js
@@ -0,0 +1,311 @@
+/*!
+ * Bootstrap event-handler.js v5.0.0-alpha1 (https://getbootstrap.com/)
+ * Copyright 2011-2020 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('./polyfill.js')) :
+ typeof define === 'function' && define.amd ? define(['./polyfill.js'], factory) :
+ (global = global || self, global.EventHandler = factory(global.Polyfill));
+}(this, (function (polyfill_js) { 'use strict';
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): util/index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+ var getjQuery = function getjQuery() {
+ var _window = window,
+ jQuery = _window.jQuery;
+
+ if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): dom/event-handler.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ var $ = getjQuery();
+ var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
+ var stripNameRegex = /\..*/;
+ var stripUidRegex = /::\d+$/;
+ var eventRegistry = {}; // Events storage
+
+ var uidEvent = 1;
+ var customEvents = {
+ mouseenter: 'mouseover',
+ mouseleave: 'mouseout'
+ };
+ var nativeEvents = ['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll'];
+ /**
+ * ------------------------------------------------------------------------
+ * Private methods
+ * ------------------------------------------------------------------------
+ */
+
+ function getUidEvent(element, uid) {
+ return uid && uid + "::" + uidEvent++ || element.uidEvent || uidEvent++;
+ }
+
+ function getEvent(element) {
+ var uid = getUidEvent(element);
+ element.uidEvent = uid;
+ eventRegistry[uid] = eventRegistry[uid] || {};
+ return eventRegistry[uid];
+ }
+
+ function bootstrapHandler(element, fn) {
+ return function handler(event) {
+ if (handler.oneOff) {
+ EventHandler.off(element, event.type, fn);
+ }
+
+ return fn.apply(element, [event]);
+ };
+ }
+
+ function bootstrapDelegationHandler(element, selector, fn) {
+ return function handler(event) {
+ var domElements = element.querySelectorAll(selector);
+
+ for (var target = event.target; target && target !== this; target = target.parentNode) {
+ for (var i = domElements.length; i--;) {
+ if (domElements[i] === target) {
+ if (handler.oneOff) {
+ EventHandler.off(element, event.type, fn);
+ }
+
+ return fn.apply(target, [event]);
+ }
+ }
+ } // To please ESLint
+
+
+ return null;
+ };
+ }
+
+ function findHandler(events, handler, delegationSelector) {
+ if (delegationSelector === void 0) {
+ delegationSelector = null;
+ }
+
+ var uidEventList = Object.keys(events);
+
+ for (var i = 0, len = uidEventList.length; i < len; i++) {
+ var event = events[uidEventList[i]];
+
+ if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
+ return event;
+ }
+ }
+
+ return null;
+ }
+
+ function normalizeParams(originalTypeEvent, handler, delegationFn) {
+ var delegation = typeof handler === 'string';
+ var originalHandler = delegation ? delegationFn : handler; // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
+
+ var typeEvent = originalTypeEvent.replace(stripNameRegex, '');
+ var custom = customEvents[typeEvent];
+
+ if (custom) {
+ typeEvent = custom;
+ }
+
+ var isNative = nativeEvents.indexOf(typeEvent) > -1;
+
+ if (!isNative) {
+ typeEvent = originalTypeEvent;
+ }
+
+ return [delegation, originalHandler, typeEvent];
+ }
+
+ function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
+ if (typeof originalTypeEvent !== 'string' || !element) {
+ return;
+ }
+
+ if (!handler) {
+ handler = delegationFn;
+ delegationFn = null;
+ }
+
+ var _normalizeParams = normalizeParams(originalTypeEvent, handler, delegationFn),
+ delegation = _normalizeParams[0],
+ originalHandler = _normalizeParams[1],
+ typeEvent = _normalizeParams[2];
+
+ var events = getEvent(element);
+ var handlers = events[typeEvent] || (events[typeEvent] = {});
+ var previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
+
+ if (previousFn) {
+ previousFn.oneOff = previousFn.oneOff && oneOff;
+ return;
+ }
+
+ var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
+ var fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
+ fn.delegationSelector = delegation ? handler : null;
+ fn.originalHandler = originalHandler;
+ fn.oneOff = oneOff;
+ fn.uidEvent = uid;
+ handlers[uid] = fn;
+ element.addEventListener(typeEvent, fn, delegation);
+ }
+
+ function removeHandler(element, events, typeEvent, handler, delegationSelector) {
+ var fn = findHandler(events[typeEvent], handler, delegationSelector);
+
+ if (!fn) {
+ return;
+ }
+
+ element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
+ delete events[typeEvent][fn.uidEvent];
+ }
+
+ function removeNamespacedHandlers(element, events, typeEvent, namespace) {
+ var storeElementEvent = events[typeEvent] || {};
+ Object.keys(storeElementEvent).forEach(function (handlerKey) {
+ if (handlerKey.indexOf(namespace) > -1) {
+ var event = storeElementEvent[handlerKey];
+ removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
+ }
+ });
+ }
+
+ var EventHandler = {
+ on: function on(element, event, handler, delegationFn) {
+ addHandler(element, event, handler, delegationFn, false);
+ },
+ one: function one(element, event, handler, delegationFn) {
+ addHandler(element, event, handler, delegationFn, true);
+ },
+ off: function off(element, originalTypeEvent, handler, delegationFn) {
+ if (typeof originalTypeEvent !== 'string' || !element) {
+ return;
+ }
+
+ var _normalizeParams2 = normalizeParams(originalTypeEvent, handler, delegationFn),
+ delegation = _normalizeParams2[0],
+ originalHandler = _normalizeParams2[1],
+ typeEvent = _normalizeParams2[2];
+
+ var inNamespace = typeEvent !== originalTypeEvent;
+ var events = getEvent(element);
+ var isNamespace = originalTypeEvent.charAt(0) === '.';
+
+ if (typeof originalHandler !== 'undefined') {
+ // Simplest case: handler is passed, remove that listener ONLY.
+ if (!events || !events[typeEvent]) {
+ return;
+ }
+
+ removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
+ return;
+ }
+
+ if (isNamespace) {
+ Object.keys(events).forEach(function (elementEvent) {
+ removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
+ });
+ }
+
+ var storeElementEvent = events[typeEvent] || {};
+ Object.keys(storeElementEvent).forEach(function (keyHandlers) {
+ var handlerKey = keyHandlers.replace(stripUidRegex, '');
+
+ if (!inNamespace || originalTypeEvent.indexOf(handlerKey) > -1) {
+ var event = storeElementEvent[keyHandlers];
+ removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
+ }
+ });
+ },
+ trigger: function trigger(element, event, args) {
+ if (typeof event !== 'string' || !element) {
+ return null;
+ }
+
+ var typeEvent = event.replace(stripNameRegex, '');
+ var inNamespace = event !== typeEvent;
+ var isNative = nativeEvents.indexOf(typeEvent) > -1;
+ var jQueryEvent;
+ var bubbles = true;
+ var nativeDispatch = true;
+ var defaultPrevented = false;
+ var evt = null;
+
+ if (inNamespace && $) {
+ jQueryEvent = $.Event(event, args);
+ $(element).trigger(jQueryEvent);
+ bubbles = !jQueryEvent.isPropagationStopped();
+ nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
+ defaultPrevented = jQueryEvent.isDefaultPrevented();
+ }
+
+ if (isNative) {
+ evt = document.createEvent('HTMLEvents');
+ evt.initEvent(typeEvent, bubbles, true);
+ } else {
+ evt = new CustomEvent(event, {
+ bubbles: bubbles,
+ cancelable: true
+ });
+ } // merge custom informations in our event
+
+
+ if (typeof args !== 'undefined') {
+ Object.keys(args).forEach(function (key) {
+ Object.defineProperty(evt, key, {
+ get: function get() {
+ return args[key];
+ }
+ });
+ });
+ }
+
+ if (defaultPrevented) {
+ evt.preventDefault();
+
+ if (!polyfill_js.defaultPreventedPreservedOnDispatch) {
+ Object.defineProperty(evt, 'defaultPrevented', {
+ get: function get() {
+ return true;
+ }
+ });
+ }
+ }
+
+ if (nativeDispatch) {
+ element.dispatchEvent(evt);
+ }
+
+ if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
+ jQueryEvent.preventDefault();
+ }
+
+ return evt;
+ }
+ };
+
+ return EventHandler;
+
+})));
diff --git a/assets/javascripts/bootstrap/dom/manipulator.js b/assets/javascripts/bootstrap/dom/manipulator.js
new file mode 100644
index 0000000..c28eaed
--- /dev/null
+++ b/assets/javascripts/bootstrap/dom/manipulator.js
@@ -0,0 +1,100 @@
+/*!
+ * Bootstrap manipulator.js v5.0.0-alpha1 (https://getbootstrap.com/)
+ * Copyright 2011-2020 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() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global = global || self, global.Manipulator = factory());
+}(this, (function () { 'use strict';
+
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): dom/manipulator.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ function normalizeData(val) {
+ if (val === 'true') {
+ return true;
+ }
+
+ if (val === 'false') {
+ return false;
+ }
+
+ if (val === Number(val).toString()) {
+ return Number(val);
+ }
+
+ if (val === '' || val === 'null') {
+ return null;
+ }
+
+ return val;
+ }
+
+ function normalizeDataKey(key) {
+ return key.replace(/[A-Z]/g, function (chr) {
+ return "-" + chr.toLowerCase();
+ });
+ }
+
+ var Manipulator = {
+ setDataAttribute: function setDataAttribute(element, key, value) {
+ element.setAttribute("data-" + normalizeDataKey(key), value);
+ },
+ removeDataAttribute: function removeDataAttribute(element, key) {
+ element.removeAttribute("data-" + normalizeDataKey(key));
+ },
+ getDataAttributes: function getDataAttributes(element) {
+ if (!element) {
+ return {};
+ }
+
+ var attributes = _objectSpread({}, element.dataset);
+
+ Object.keys(attributes).forEach(function (key) {
+ attributes[key] = normalizeData(attributes[key]);
+ });
+ return attributes;
+ },
+ getDataAttribute: function getDataAttribute(element, key) {
+ return normalizeData(element.getAttribute("data-" + normalizeDataKey(key)));
+ },
+ offset: function offset(element) {
+ var rect = element.getBoundingClientRect();
+ return {
+ top: rect.top + document.body.scrollTop,
+ left: rect.left + document.body.scrollLeft
+ };
+ },
+ position: function position(element) {
+ return {
+ top: element.offsetTop,
+ left: element.offsetLeft
+ };
+ },
+ toggleClass: function toggleClass(element, className) {
+ if (!element) {
+ return;
+ }
+
+ if (element.classList.contains(className)) {
+ element.classList.remove(className);
+ } else {
+ element.classList.add(className);
+ }
+ }
+ };
+
+ return Manipulator;
+
+})));
diff --git a/assets/javascripts/bootstrap/dom/polyfill.js b/assets/javascripts/bootstrap/dom/polyfill.js
new file mode 100644
index 0000000..c707c06
--- /dev/null
+++ b/assets/javascripts/bootstrap/dom/polyfill.js
@@ -0,0 +1,110 @@
+/*!
+ * Bootstrap polyfill.js v5.0.0-alpha1 (https://getbootstrap.com/)
+ * Copyright 2011-2020 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' ? factory(exports) :
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
+ (global = global || self, factory(global.Polyfill = {}));
+}(this, (function (exports) { 'use strict';
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): util/index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ var MAX_UID = 1000000;
+ /**
+ * --------------------------------------------------------------------------
+ * Public Util Api
+ * --------------------------------------------------------------------------
+ */
+
+
+ var getUID = function getUID(prefix) {
+ do {
+ prefix += Math.floor(Math.random() * MAX_UID);
+ } while (document.getElementById(prefix));
+
+ return prefix;
+ };
+
+ /* istanbul ignore file */
+ exports.find = Element.prototype.querySelectorAll;
+ exports.findOne = Element.prototype.querySelector; // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
+
+ var defaultPreventedPreservedOnDispatch = function () {
+ var e = new CustomEvent('Bootstrap', {
+ cancelable: true
+ });
+ var element = document.createElement('div');
+ element.addEventListener('Bootstrap', function () {
+ return null;
+ });
+ e.preventDefault();
+ element.dispatchEvent(e);
+ return e.defaultPrevented;
+ }();
+
+ var scopeSelectorRegex = /:scope\b/;
+
+ var supportScopeQuery = function () {
+ var element = document.createElement('div');
+
+ try {
+ element.querySelectorAll(':scope *');
+ } catch (_) {
+ return false;
+ }
+
+ return true;
+ }();
+
+ if (!supportScopeQuery) {
+ exports.find = function find(selector) {
+ if (!scopeSelectorRegex.test(selector)) {
+ return this.querySelectorAll(selector);
+ }
+
+ var hasId = Boolean(this.id);
+
+ if (!hasId) {
+ this.id = getUID('scope');
+ }
+
+ var nodeList = null;
+
+ try {
+ selector = selector.replace(scopeSelectorRegex, "#" + this.id);
+ nodeList = this.querySelectorAll(selector);
+ } finally {
+ if (!hasId) {
+ this.removeAttribute('id');
+ }
+ }
+
+ return nodeList;
+ };
+
+ exports.findOne = function findOne(selector) {
+ if (!scopeSelectorRegex.test(selector)) {
+ return this.querySelector(selector);
+ }
+
+ var matches = exports.find.call(this, selector);
+
+ if (typeof matches[0] !== 'undefined') {
+ return matches[0];
+ }
+
+ return null;
+ };
+ }
+
+ exports.defaultPreventedPreservedOnDispatch = defaultPreventedPreservedOnDispatch;
+
+ Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
diff --git a/assets/javascripts/bootstrap/dom/selector-engine.js b/assets/javascripts/bootstrap/dom/selector-engine.js
new file mode 100644
index 0000000..541d3bf
--- /dev/null
+++ b/assets/javascripts/bootstrap/dom/selector-engine.js
@@ -0,0 +1,98 @@
+/*!
+ * Bootstrap selector-engine.js v5.0.0-alpha1 (https://getbootstrap.com/)
+ * Copyright 2011-2020 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('./polyfill.js')) :
+ typeof define === 'function' && define.amd ? define(['./polyfill.js'], factory) :
+ (global = global || self, global.SelectorEngine = factory(global.Polyfill));
+}(this, (function (polyfill_js) { 'use strict';
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): dom/selector-engine.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ /**
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
+ */
+
+ var NODE_TEXT = 3;
+ var SelectorEngine = {
+ matches: function matches(element, selector) {
+ return element.matches(selector);
+ },
+ find: function find(selector, element) {
+ var _ref;
+
+ if (element === void 0) {
+ element = document.documentElement;
+ }
+
+ return (_ref = []).concat.apply(_ref, polyfill_js.find.call(element, selector));
+ },
+ findOne: function findOne(selector, element) {
+ if (element === void 0) {
+ element = document.documentElement;
+ }
+
+ return polyfill_js.findOne.call(element, selector);
+ },
+ children: function children(element, selector) {
+ var _ref2;
+
+ var children = (_ref2 = []).concat.apply(_ref2, element.children);
+
+ return children.filter(function (child) {
+ return child.matches(selector);
+ });
+ },
+ parents: function parents(element, selector) {
+ var parents = [];
+ var ancestor = element.parentNode;
+
+ while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
+ if (this.matches(ancestor, selector)) {
+ parents.push(ancestor);
+ }
+
+ ancestor = ancestor.parentNode;
+ }
+
+ return parents;
+ },
+ prev: function prev(element, selector) {
+ var previous = element.previousElementSibling;
+
+ while (previous) {
+ if (previous.matches(selector)) {
+ return [previous];
+ }
+
+ previous = previous.previousElementSibling;
+ }
+
+ return [];
+ },
+ next: function next(element, selector) {
+ var next = element.nextElementSibling;
+
+ while (next) {
+ if (this.matches(next, selector)) {
+ return [next];
+ }
+
+ next = next.nextElementSibling;
+ }
+
+ return [];
+ }
+ };
+
+ return SelectorEngine;
+
+})));
diff --git a/assets/javascripts/bootstrap/dropdown.js b/assets/javascripts/bootstrap/dropdown.js
index c1fe932..2182a2f 100644
--- a/assets/javascripts/bootstrap/dropdown.js
+++ b/assets/javascripts/bootstrap/dropdown.js
@@ -1,19 +1,101 @@
/*!
- * Bootstrap dropdown.js v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap dropdown.js v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 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.js'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Dropdown = factory(global.jQuery, global.Popper, global.Util));
-}(this, (function ($, Popper, Util) { 'use strict';
-
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('popper.js'), require('./dom/selector-engine.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', 'popper.js', './dom/selector-engine.js'], factory) :
+ (global = global || self, global.Dropdown = factory(global.Data, global.EventHandler, global.Manipulator, global.Popper, global.SelectorEngine));
+}(this, (function (Data, EventHandler, Manipulator, Popper, SelectorEngine) { 'use strict';
+
+ Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
+ EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
+ Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
- Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
+ SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): util/index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+ var toType = function toType(obj) {
+ if (obj === null || obj === undefined) {
+ return "" + obj;
+ }
+
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
+ };
+
+ var getSelector = function getSelector(element) {
+ var selector = element.getAttribute('data-target');
+
+ if (!selector || selector === '#') {
+ var hrefAttr = element.getAttribute('href');
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
+ }
+
+ return selector;
+ };
+
+ var getElementFromSelector = function getElementFromSelector(element) {
+ var selector = getSelector(element);
+ return selector ? document.querySelector(selector) : null;
+ };
+
+ var isElement = function isElement(obj) {
+ return (obj[0] || obj).nodeType;
+ };
+
+ var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
+ Object.keys(configTypes).forEach(function (property) {
+ var expectedTypes = configTypes[property];
+ var value = config[property];
+ var valueType = value && 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 + "\"."));
+ }
+ });
+ };
+
+ var isVisible = function isVisible(element) {
+ if (!element) {
+ return false;
+ }
+
+ if (element.style && element.parentNode && element.parentNode.style) {
+ var elementStyle = getComputedStyle(element);
+ var parentNodeStyle = getComputedStyle(element.parentNode);
+ return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
+ }
+
+ return false;
+ };
+
+ var noop = function noop() {
+ return function () {};
+ };
- 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]; } } } return target; }; return _extends.apply(this, arguments); }
+ var getjQuery = function getjQuery() {
+ var _window = window,
+ jQuery = _window.jQuery;
+
+ if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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); } }
@@ -25,24 +107,18 @@
*/
var NAME = 'dropdown';
- var VERSION = '4.5.2';
+ var VERSION = '5.0.0-alpha1';
var DATA_KEY = 'bs.dropdown';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.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 ESCAPE_KEY = 'Escape';
+ var SPACE_KEY = 'Space';
+ var TAB_KEY = 'Tab';
+ var ARROW_UP_KEY = 'ArrowUp';
+ var ARROW_DOWN_KEY = 'ArrowDown';
+ var RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button
+
+ var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEY + "|" + ARROW_DOWN_KEY + "|" + ESCAPE_KEY);
var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
var EVENT_SHOW = "show" + EVENT_KEY;
@@ -57,6 +133,7 @@
var CLASS_NAME_DROPRIGHT = 'dropright';
var CLASS_NAME_DROPLEFT = 'dropleft';
var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
+ var CLASS_NAME_NAVBAR = 'navbar';
var CLASS_NAME_POSITION_STATIC = 'position-static';
var SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]';
var SELECTOR_FORM_CHILD = '.dropdown form';
@@ -100,6 +177,8 @@
this._inNavbar = this._detectNavbar();
this._addEventListeners();
+
+ Data.setData(element, DATA_KEY, this);
} // Getters
@@ -107,58 +186,47 @@
// Public
_proto.toggle = function toggle() {
- if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED)) {
+ if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED)) {
return;
}
- var isActive = $(this._menu).hasClass(CLASS_NAME_SHOW);
+ var isActive = this._element.classList.contains(CLASS_NAME_SHOW);
- Dropdown._clearMenus();
+ Dropdown.clearMenus();
if (isActive) {
return;
}
- this.show(true);
+ this.show();
};
- _proto.show = function show(usePopper) {
- if (usePopper === void 0) {
- usePopper = false;
- }
-
- if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || $(this._menu).hasClass(CLASS_NAME_SHOW)) {
+ _proto.show = function show() {
+ if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW)) {
return;
}
+ var parent = Dropdown.getParentFromElement(this._element);
var relatedTarget = {
relatedTarget: this._element
};
- var showEvent = $.Event(EVENT_SHOW, relatedTarget);
-
- var parent = Dropdown._getParentFromElement(this._element);
-
- $(parent).trigger(showEvent);
+ var showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget);
- if (showEvent.isDefaultPrevented()) {
+ if (showEvent.defaultPrevented) {
return;
} // Disable totally Popper.js for Dropdown in Navbar
- if (!this._inNavbar && usePopper) {
- /**
- * Check for Popper dependency
- * Popper - https://popper.js.org
- */
+ if (!this._inNavbar) {
if (typeof Popper === 'undefined') {
- throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)');
+ throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org)');
}
var referenceElement = this._element;
if (this._config.reference === 'parent') {
referenceElement = parent;
- } else if (Util.isElement(this._config.reference)) {
+ } else if (isElement(this._config.reference)) {
referenceElement = this._config.reference; // Check if it's jQuery element
if (typeof this._config.reference.jquery !== 'undefined') {
@@ -170,7 +238,7 @@
if (this._config.boundary !== 'scrollParent') {
- $(parent).addClass(CLASS_NAME_POSITION_STATIC);
+ parent.classList.add(CLASS_NAME_POSITION_STATIC);
}
this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
@@ -180,33 +248,35 @@
// 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);
+ if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {
+ var _ref;
+
+ (_ref = []).concat.apply(_ref, document.body.children).forEach(function (elem) {
+ return EventHandler.on(elem, 'mouseover', null, 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));
+ Manipulator.toggleClass(this._menu, CLASS_NAME_SHOW);
+ Manipulator.toggleClass(this._element, CLASS_NAME_SHOW);
+ EventHandler.trigger(parent, EVENT_SHOWN, relatedTarget);
};
_proto.hide = function hide() {
- if (this._element.disabled || $(this._element).hasClass(CLASS_NAME_DISABLED) || !$(this._menu).hasClass(CLASS_NAME_SHOW)) {
+ if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW)) {
return;
}
+ var parent = Dropdown.getParentFromElement(this._element);
var relatedTarget = {
relatedTarget: this._element
};
- var hideEvent = $.Event(EVENT_HIDE, relatedTarget);
-
- var parent = Dropdown._getParentFromElement(this._element);
+ var hideEvent = EventHandler.trigger(parent, EVENT_HIDE, relatedTarget);
- $(parent).trigger(hideEvent);
-
- if (hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
return;
}
@@ -214,17 +284,18 @@
this._popper.destroy();
}
- $(this._menu).toggleClass(CLASS_NAME_SHOW);
- $(parent).toggleClass(CLASS_NAME_SHOW).trigger($.Event(EVENT_HIDDEN, relatedTarget));
+ Manipulator.toggleClass(this._menu, CLASS_NAME_SHOW);
+ Manipulator.toggleClass(this._element, CLASS_NAME_SHOW);
+ EventHandler.trigger(parent, EVENT_HIDDEN, relatedTarget);
};
_proto.dispose = function dispose() {
- $.removeData(this._element, DATA_KEY);
- $(this._element).off(EVENT_KEY);
+ Data.removeData(this._element, DATA_KEY);
+ EventHandler.off(this._element, EVENT_KEY);
this._element = null;
this._menu = null;
- if (this._popper !== null) {
+ if (this._popper) {
this._popper.destroy();
this._popper = null;
@@ -234,7 +305,7 @@
_proto.update = function update() {
this._inNavbar = this._detectNavbar();
- if (this._popper !== null) {
+ if (this._popper) {
this._popper.scheduleUpdate();
}
} // Private
@@ -243,7 +314,7 @@
_proto._addEventListeners = function _addEventListeners() {
var _this = this;
- $(this._element).on(EVENT_CLICK, function (event) {
+ EventHandler.on(this._element, EVENT_CLICK, function (event) {
event.preventDefault();
event.stopPropagation();
@@ -252,34 +323,30 @@
};
_proto._getConfig = function _getConfig(config) {
- config = _extends({}, this.constructor.Default, $(this._element).data(), config);
- Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
+ config = _objectSpread(_objectSpread(_objectSpread({}, this.constructor.Default), Manipulator.getDataAttributes(this._element)), config);
+ typeCheckConfig(NAME, config, this.constructor.DefaultType);
return config;
};
_proto._getMenuElement = function _getMenuElement() {
- if (!this._menu) {
- var parent = Dropdown._getParentFromElement(this._element);
-
- if (parent) {
- this._menu = parent.querySelector(SELECTOR_MENU);
- }
- }
-
- return this._menu;
+ return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
};
_proto._getPlacement = function _getPlacement() {
- var $parentDropdown = $(this._element.parentNode);
+ var parentDropdown = this._element.parentNode;
var 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)) {
+ if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
+ placement = PLACEMENT_TOP;
+
+ if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
+ placement = PLACEMENT_TOPEND;
+ }
+ } else if (parentDropdown.classList.contains(CLASS_NAME_DROPRIGHT)) {
placement = PLACEMENT_RIGHT;
- } else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) {
+ } else if (parentDropdown.classList.contains(CLASS_NAME_DROPLEFT)) {
placement = PLACEMENT_LEFT;
- } else if ($(this._menu).hasClass(CLASS_NAME_MENURIGHT)) {
+ } else if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
placement = PLACEMENT_BOTTOMEND;
}
@@ -287,7 +354,7 @@
};
_proto._detectNavbar = function _detectNavbar() {
- return $(this._element).closest('.navbar').length > 0;
+ return Boolean(this._element.closest("." + CLASS_NAME_NAVBAR));
};
_proto._getOffset = function _getOffset() {
@@ -297,7 +364,7 @@
if (typeof this._config.offset === 'function') {
offset.fn = function (data) {
- data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
+ data.offsets = _objectSpread(_objectSpread({}, data.offsets), _this2._config.offset(data.offsets, _this2._element) || {});
return data;
};
} else {
@@ -327,42 +394,44 @@
};
}
- return _extends({}, popperConfig, this._config.popperConfig);
+ return _objectSpread(_objectSpread({}, popperConfig), this._config.popperConfig);
} // Static
;
- Dropdown._jQueryInterface = function _jQueryInterface(config) {
- return this.each(function () {
- var data = $(this).data(DATA_KEY);
+ Dropdown.dropdownInterface = function dropdownInterface(element, config) {
+ var data = Data.getData(element, DATA_KEY);
+
+ var _config = typeof config === 'object' ? config : null;
- var _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]();
- }
+ Dropdown.jQueryInterface = function jQueryInterface(config) {
+ return this.each(function () {
+ Dropdown.dropdownInterface(this, config);
});
};
- Dropdown._clearMenus = function _clearMenus(event) {
- if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
+ Dropdown.clearMenus = function clearMenus(event) {
+ if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
return;
}
- var toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE));
+ var toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE);
for (var i = 0, len = toggles.length; i < len; i++) {
- var parent = Dropdown._getParentFromElement(toggles[i]);
-
- var context = $(toggles[i]).data(DATA_KEY);
+ var parent = Dropdown.getParentFromElement(toggles[i]);
+ var context = Data.getData(toggles[i], DATA_KEY);
var relatedTarget = {
relatedTarget: toggles[i]
};
@@ -377,25 +446,28 @@
var dropdownMenu = context._menu;
- if (!$(parent).hasClass(CLASS_NAME_SHOW)) {
+ if (!toggles[i].classList.contains(CLASS_NAME_SHOW)) {
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 (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.key === TAB_KEY) && dropdownMenu.contains(event.target)) {
continue;
}
- var hideEvent = $.Event(EVENT_HIDE, relatedTarget);
- $(parent).trigger(hideEvent);
+ var hideEvent = EventHandler.trigger(parent, EVENT_HIDE, relatedTarget);
- if (hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
continue;
} // 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);
+ var _ref2;
+
+ (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (elem) {
+ return EventHandler.off(elem, 'mouseover', null, noop());
+ });
}
toggles[i].setAttribute('aria-expanded', 'false');
@@ -404,24 +476,17 @@
context._popper.destroy();
}
- $(dropdownMenu).removeClass(CLASS_NAME_SHOW);
- $(parent).removeClass(CLASS_NAME_SHOW).trigger($.Event(EVENT_HIDDEN, relatedTarget));
+ dropdownMenu.classList.remove(CLASS_NAME_SHOW);
+ toggles[i].classList.remove(CLASS_NAME_SHOW);
+ EventHandler.trigger(parent, EVENT_HIDDEN, relatedTarget);
}
};
- Dropdown._getParentFromElement = function _getParentFromElement(element) {
- var parent;
- var selector = Util.getSelectorFromElement(element);
-
- if (selector) {
- parent = document.querySelector(selector);
- }
-
- return parent || element.parentNode;
- } // eslint-disable-next-line complexity
- ;
+ Dropdown.getParentFromElement = function getParentFromElement(element) {
+ return getElementFromSelector(element) || element.parentNode;
+ };
- Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
+ Dropdown.dataApiKeydownHandler = function dataApiKeydownHandler(event) {
// If not input/textarea:
// - And not a key in REGEXP_KEYDOWN => not a dropdown command
// If input/textarea:
@@ -429,61 +494,59 @@
// - 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 || $(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 || $(this).hasClass(CLASS_NAME_DISABLED)) {
+ event.preventDefault();
+ event.stopPropagation();
+
+ if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) {
return;
}
- var parent = Dropdown._getParentFromElement(this);
-
- var isActive = $(parent).hasClass(CLASS_NAME_SHOW);
+ var parent = Dropdown.getParentFromElement(this);
+ var isActive = this.classList.contains(CLASS_NAME_SHOW);
- if (!isActive && event.which === ESCAPE_KEYCODE) {
+ if (event.key === ESCAPE_KEY) {
+ var button = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0];
+ button.focus();
+ Dropdown.clearMenus();
return;
}
- event.preventDefault();
- event.stopPropagation();
-
- if (!isActive || 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 (!isActive || event.key === SPACE_KEY) {
+ Dropdown.clearMenus();
return;
}
- var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) {
- return $(item).is(':visible');
- });
+ var items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, parent).filter(isVisible);
- if (items.length === 0) {
+ if (!items.length) {
return;
}
var index = items.indexOf(event.target);
- if (event.which === ARROW_UP_KEYCODE && index > 0) {
+ if (event.key === ARROW_UP_KEY && index > 0) {
// Up
index--;
}
- if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
+ if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
// Down
index++;
- }
+ } // index is -1 if the first keydown is an ArrowUp
- if (index < 0) {
- index = 0;
- }
+ index = index === -1 ? 0 : index;
items[index].focus();
};
+ Dropdown.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY);
+ };
+
_createClass(Dropdown, null, [{
key: "VERSION",
get: function get() {
@@ -510,27 +573,38 @@
*/
- $(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.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();
event.stopPropagation();
-
- Dropdown._jQueryInterface.call($(this), 'toggle');
- }).on(EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, function (e) {
- e.stopPropagation();
+ Dropdown.dropdownInterface(this, 'toggle');
+ });
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, function (e) {
+ return e.stopPropagation();
});
+ var $ = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .dropdown to jQuery only if jQuery is present
*/
- $.fn[NAME] = Dropdown._jQueryInterface;
- $.fn[NAME].Constructor = Dropdown;
+ /* istanbul ignore if */
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Dropdown._jQueryInterface;
- };
+ if ($) {
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
+ $.fn[NAME] = Dropdown.jQueryInterface;
+ $.fn[NAME].Constructor = Dropdown;
+
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
+ return Dropdown.jQueryInterface;
+ };
+ }
return Dropdown;
diff --git a/assets/javascripts/bootstrap/modal.js b/assets/javascripts/bootstrap/modal.js
index e25b265..d95589d 100644
--- a/assets/javascripts/bootstrap/modal.js
+++ b/assets/javascripts/bootstrap/modal.js
@@ -1,18 +1,147 @@
/*!
- * Bootstrap modal.js v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap modal.js v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 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.js'], 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/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', './dom/selector-engine.js'], factory) :
+ (global = global || self, global.Modal = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
+}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
- Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
+ Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
+ EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
+ Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
+ SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
- 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]; } } } return target; }; return _extends.apply(this, arguments); }
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): util/index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ var MILLISECONDS_MULTIPLIER = 1000;
+ var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
+
+ var toType = function toType(obj) {
+ if (obj === null || obj === undefined) {
+ return "" + obj;
+ }
+
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
+ };
+
+ var getSelector = function getSelector(element) {
+ var selector = element.getAttribute('data-target');
+
+ if (!selector || selector === '#') {
+ var hrefAttr = element.getAttribute('href');
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
+ }
+
+ return selector;
+ };
+
+ var getElementFromSelector = function getElementFromSelector(element) {
+ var selector = getSelector(element);
+ return selector ? document.querySelector(selector) : null;
+ };
+
+ var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
+ if (!element) {
+ return 0;
+ } // Get transition-duration of the element
+
+
+ var _window$getComputedSt = window.getComputedStyle(element),
+ transitionDuration = _window$getComputedSt.transitionDuration,
+ transitionDelay = _window$getComputedSt.transitionDelay;
+
+ 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;
+ };
+
+ var triggerTransitionEnd = function triggerTransitionEnd(element) {
+ element.dispatchEvent(new Event(TRANSITION_END));
+ };
+
+ var isElement = function isElement(obj) {
+ return (obj[0] || obj).nodeType;
+ };
+
+ var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
+ var called = false;
+ var durationPadding = 5;
+ var emulatedDuration = duration + durationPadding;
+
+ function listener() {
+ called = true;
+ element.removeEventListener(TRANSITION_END, listener);
+ }
+
+ element.addEventListener(TRANSITION_END, listener);
+ setTimeout(function () {
+ if (!called) {
+ triggerTransitionEnd(element);
+ }
+ }, emulatedDuration);
+ };
+
+ var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
+ Object.keys(configTypes).forEach(function (property) {
+ var expectedTypes = configTypes[property];
+ var value = config[property];
+ var valueType = value && 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 + "\"."));
+ }
+ });
+ };
+
+ var isVisible = function isVisible(element) {
+ if (!element) {
+ return false;
+ }
+
+ if (element.style && element.parentNode && element.parentNode.style) {
+ var elementStyle = getComputedStyle(element);
+ var parentNodeStyle = getComputedStyle(element.parentNode);
+ return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
+ }
+
+ return false;
+ };
+
+ var reflow = function reflow(element) {
+ return element.offsetHeight;
+ };
+
+ var getjQuery = function getjQuery() {
+ var _window = window,
+ jQuery = _window.jQuery;
+
+ if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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); } }
@@ -24,13 +153,11 @@
*/
var NAME = 'modal';
- var VERSION = '4.5.2';
+ var VERSION = '5.0.0-alpha1';
var DATA_KEY = 'bs.modal';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.fn[NAME];
- var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
-
+ var ESCAPE_KEY = 'Escape';
var Default = {
backdrop: true,
keyboard: true,
@@ -55,7 +182,6 @@
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';
@@ -78,13 +204,14 @@
function Modal(element, config) {
this._config = this._getConfig(config);
this._element = element;
- this._dialog = element.querySelector(SELECTOR_DIALOG);
+ this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, element);
this._backdrop = null;
this._isShown = false;
this._isBodyOverflowing = false;
this._ignoreBackdropClick = false;
this._isTransitioning = false;
this._scrollbarWidth = 0;
+ Data.setData(element, DATA_KEY, this);
} // Getters
@@ -102,16 +229,15 @@
return;
}
- if ($(this._element).hasClass(CLASS_NAME_FADE)) {
+ if (this._element.classList.contains(CLASS_NAME_FADE)) {
this._isTransitioning = true;
}
- var showEvent = $.Event(EVENT_SHOW, {
+ var showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {
relatedTarget: relatedTarget
});
- $(this._element).trigger(showEvent);
- if (this._isShown || showEvent.isDefaultPrevented()) {
+ if (this._isShown || showEvent.defaultPrevented) {
return;
}
@@ -127,12 +253,12 @@
this._setResizeEvent();
- $(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
+ EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
return _this.hide(event);
});
- $(this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () {
- $(_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) {
- if ($(event.target).is(_this._element)) {
+ EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, function () {
+ EventHandler.one(_this._element, EVENT_MOUSEUP_DISMISS, function (event) {
+ if (event.target === _this._element) {
_this._ignoreBackdropClick = true;
}
});
@@ -154,15 +280,15 @@
return;
}
- var hideEvent = $.Event(EVENT_HIDE);
- $(this._element).trigger(hideEvent);
+ var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
- if (!this._isShown || hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
return;
}
this._isShown = false;
- var transition = $(this._element).hasClass(CLASS_NAME_FADE);
+
+ var transition = this._element.classList.contains(CLASS_NAME_FADE);
if (transition) {
this._isTransitioning = true;
@@ -172,16 +298,19 @@
this._setResizeEvent();
- $(document).off(EVENT_FOCUSIN);
- $(this._element).removeClass(CLASS_NAME_SHOW);
- $(this._element).off(EVENT_CLICK_DISMISS);
- $(this._dialog).off(EVENT_MOUSEDOWN_DISMISS);
+ EventHandler.off(document, EVENT_FOCUSIN);
+
+ this._element.classList.remove(CLASS_NAME_SHOW);
+
+ EventHandler.off(this._element, EVENT_CLICK_DISMISS);
+ EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
if (transition) {
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
- $(this._element).one(Util.TRANSITION_END, function (event) {
+ var transitionDuration = getTransitionDurationFromElement(this._element);
+ EventHandler.one(this._element, TRANSITION_END, function (event) {
return _this2._hideModal(event);
- }).emulateTransitionEnd(transitionDuration);
+ });
+ emulateTransitionEnd(this._element, transitionDuration);
} else {
this._hideModal();
}
@@ -189,7 +318,7 @@
_proto.dispose = function dispose() {
[window, this._element, this._dialog].forEach(function (htmlElement) {
- return $(htmlElement).off(EVENT_KEY);
+ return EventHandler.off(htmlElement, EVENT_KEY);
});
/**
* `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
@@ -197,8 +326,8 @@
* It will remove `EVENT_CLICK_DATA_API` event that should remain
*/
- $(document).off(EVENT_FOCUSIN);
- $.removeData(this._element, DATA_KEY);
+ EventHandler.off(document, EVENT_FOCUSIN);
+ Data.removeData(this._element, DATA_KEY);
this._config = null;
this._element = null;
this._dialog = null;
@@ -216,53 +345,17 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _extends({}, Default, config);
- Util.typeCheckConfig(NAME, config, DefaultType);
+ config = _objectSpread(_objectSpread({}, Default), config);
+ typeCheckConfig(NAME, config, DefaultType);
return config;
};
- _proto._triggerBackdropTransition = function _triggerBackdropTransition() {
+ _proto._showElement = function _showElement(relatedTarget) {
var _this3 = this;
- if (this._config.backdrop === 'static') {
- var hideEventPrevented = $.Event(EVENT_HIDE_PREVENTED);
- $(this._element).trigger(hideEventPrevented);
-
- if (hideEventPrevented.defaultPrevented) {
- 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.getTransitionDurationFromElement(this._dialog);
- $(this._element).off(Util.TRANSITION_END);
- $(this._element).one(Util.TRANSITION_END, function () {
- _this3._element.classList.remove(CLASS_NAME_STATIC);
-
- if (!isModalOverflowing) {
- $(_this3._element).one(Util.TRANSITION_END, function () {
- _this3._element.style.overflowY = '';
- }).emulateTransitionEnd(_this3._element, modalTransitionDuration);
- }
- }).emulateTransitionEnd(modalTransitionDuration);
-
- this._element.focus();
- } else {
- this.hide();
- }
- };
+ var transition = this._element.classList.contains(CLASS_NAME_FADE);
- _proto._showElement = function _showElement(relatedTarget) {
- var _this4 = this;
-
- var transition = $(this._element).hasClass(CLASS_NAME_FADE);
- var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null;
+ var modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position
@@ -277,86 +370,86 @@
this._element.setAttribute('role', 'dialog');
- if ($(this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) {
+ this._element.scrollTop = 0;
+
+ if (modalBody) {
modalBody.scrollTop = 0;
- } else {
- this._element.scrollTop = 0;
}
if (transition) {
- Util.reflow(this._element);
+ reflow(this._element);
}
- $(this._element).addClass(CLASS_NAME_SHOW);
+ this._element.classList.add(CLASS_NAME_SHOW);
if (this._config.focus) {
this._enforceFocus();
}
- var shownEvent = $.Event(EVENT_SHOWN, {
- relatedTarget: relatedTarget
- });
-
var transitionComplete = function transitionComplete() {
- if (_this4._config.focus) {
- _this4._element.focus();
+ if (_this3._config.focus) {
+ _this3._element.focus();
}
- _this4._isTransitioning = false;
- $(_this4._element).trigger(shownEvent);
+ _this3._isTransitioning = false;
+ EventHandler.trigger(_this3._element, EVENT_SHOWN, {
+ relatedTarget: relatedTarget
+ });
};
if (transition) {
- var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
- $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
+ var transitionDuration = getTransitionDurationFromElement(this._dialog);
+ EventHandler.one(this._dialog, TRANSITION_END, transitionComplete);
+ emulateTransitionEnd(this._dialog, transitionDuration);
} else {
transitionComplete();
}
};
_proto._enforceFocus = function _enforceFocus() {
- var _this5 = this;
+ var _this4 = this;
+
+ EventHandler.off(document, EVENT_FOCUSIN); // guard against infinite focus loop
- $(document).off(EVENT_FOCUSIN) // Guard against infinite focus loop
- .on(EVENT_FOCUSIN, function (event) {
- if (document !== event.target && _this5._element !== event.target && $(_this5._element).has(event.target).length === 0) {
- _this5._element.focus();
+ EventHandler.on(document, EVENT_FOCUSIN, function (event) {
+ if (document !== event.target && _this4._element !== event.target && !_this4._element.contains(event.target)) {
+ _this4._element.focus();
}
});
};
_proto._setEscapeEvent = function _setEscapeEvent() {
- var _this6 = this;
+ var _this5 = this;
if (this._isShown) {
- $(this._element).on(EVENT_KEYDOWN_DISMISS, function (event) {
- if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
+ EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, function (event) {
+ if (_this5._config.keyboard && event.key === ESCAPE_KEY) {
event.preventDefault();
- _this6.hide();
- } else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE) {
- _this6._triggerBackdropTransition();
+ _this5.hide();
+ } else if (!_this5._config.keyboard && event.key === ESCAPE_KEY) {
+ _this5._triggerBackdropTransition();
}
});
- } else if (!this._isShown) {
- $(this._element).off(EVENT_KEYDOWN_DISMISS);
+ } else {
+ EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS);
}
};
_proto._setResizeEvent = function _setResizeEvent() {
- var _this7 = this;
+ var _this6 = this;
if (this._isShown) {
- $(window).on(EVENT_RESIZE, function (event) {
- return _this7.handleUpdate(event);
+ EventHandler.on(window, EVENT_RESIZE, function () {
+ return _this6._adjustDialog();
});
} else {
- $(window).off(EVENT_RESIZE);
+ EventHandler.off(window, EVENT_RESIZE);
}
};
_proto._hideModal = function _hideModal() {
- var _this8 = this;
+ var _this7 = this;
this._element.style.display = 'none';
@@ -369,27 +462,26 @@
this._isTransitioning = false;
this._showBackdrop(function () {
- $(document.body).removeClass(CLASS_NAME_OPEN);
+ document.body.classList.remove(CLASS_NAME_OPEN);
- _this8._resetAdjustments();
+ _this7._resetAdjustments();
- _this8._resetScrollbar();
+ _this7._resetScrollbar();
- $(_this8._element).trigger(EVENT_HIDDEN);
+ EventHandler.trigger(_this7._element, EVENT_HIDDEN);
});
};
_proto._removeBackdrop = function _removeBackdrop() {
- if (this._backdrop) {
- $(this._backdrop).remove();
- this._backdrop = null;
- }
+ this._backdrop.parentNode.removeChild(this._backdrop);
+
+ this._backdrop = null;
};
_proto._showBackdrop = function _showBackdrop(callback) {
- var _this9 = this;
+ var _this8 = this;
- var animate = $(this._element).hasClass(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
+ var animate = this._element.classList.contains(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
if (this._isShown && this._config.backdrop) {
this._backdrop = document.createElement('div');
@@ -399,10 +491,10 @@
this._backdrop.classList.add(animate);
}
- $(this._backdrop).appendTo(document.body);
- $(this._element).on(EVENT_CLICK_DISMISS, function (event) {
- if (_this9._ignoreBackdropClick) {
- _this9._ignoreBackdropClick = false;
+ document.body.appendChild(this._backdrop);
+ EventHandler.on(this._element, EVENT_CLICK_DISMISS, function (event) {
+ if (_this8._ignoreBackdropClick) {
+ _this8._ignoreBackdropClick = false;
return;
}
@@ -410,50 +502,69 @@
return;
}
- _this9._triggerBackdropTransition();
+ _this8._triggerBackdropTransition();
});
if (animate) {
- Util.reflow(this._backdrop);
+ reflow(this._backdrop);
}
- $(this._backdrop).addClass(CLASS_NAME_SHOW);
-
- if (!callback) {
- return;
- }
+ this._backdrop.classList.add(CLASS_NAME_SHOW);
if (!animate) {
callback();
return;
}
- var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
- $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
+ var backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
+ EventHandler.one(this._backdrop, TRANSITION_END, callback);
+ emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
} else if (!this._isShown && this._backdrop) {
- $(this._backdrop).removeClass(CLASS_NAME_SHOW);
+ this._backdrop.classList.remove(CLASS_NAME_SHOW);
var callbackRemove = function callbackRemove() {
- _this9._removeBackdrop();
+ _this8._removeBackdrop();
- if (callback) {
- callback();
- }
+ callback();
};
- if ($(this._element).hasClass(CLASS_NAME_FADE)) {
- var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
+ if (this._element.classList.contains(CLASS_NAME_FADE)) {
+ var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
- $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
+ EventHandler.one(this._backdrop, TRANSITION_END, callbackRemove);
+ emulateTransitionEnd(this._backdrop, _backdropTransitionDuration);
} else {
callbackRemove();
}
- } else if (callback) {
+ } else {
callback();
}
+ };
+
+ _proto._triggerBackdropTransition = function _triggerBackdropTransition() {
+ var _this9 = this;
+
+ if (this._config.backdrop === 'static') {
+ var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
+
+ if (hideEvent.defaultPrevented) {
+ return;
+ }
+
+ this._element.classList.add(CLASS_NAME_STATIC);
+
+ var modalTransitionDuration = getTransitionDurationFromElement(this._element);
+ EventHandler.one(this._element, TRANSITION_END, function () {
+ _this9._element.classList.remove(CLASS_NAME_STATIC);
+ });
+ emulateTransitionEnd(this._element, modalTransitionDuration);
+
+ this._element.focus();
+ } else {
+ this.hide();
+ }
} // ----------------------------------------------------------------------
// the following methods are used to handle overflowing modals
- // todo (fat): these should probably be refactored out of modal.js
// ----------------------------------------------------------------------
;
@@ -486,50 +597,58 @@
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
-
- $(fixedContent).each(function (index, element) {
+ // Adjust fixed content padding
+ SelectorEngine.find(SELECTOR_FIXED_CONTENT).forEach(function (element) {
var actualPadding = element.style.paddingRight;
- var calculatedPadding = $(element).css('padding-right');
- $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px");
+ var calculatedPadding = window.getComputedStyle(element)['padding-right'];
+ Manipulator.setDataAttribute(element, 'padding-right', actualPadding);
+ element.style.paddingRight = parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px";
}); // Adjust sticky content margin
- $(stickyContent).each(function (index, element) {
+ SelectorEngine.find(SELECTOR_STICKY_CONTENT).forEach(function (element) {
var actualMargin = element.style.marginRight;
- var calculatedMargin = $(element).css('margin-right');
- $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px");
+ var calculatedMargin = window.getComputedStyle(element)['margin-right'];
+ Manipulator.setDataAttribute(element, 'margin-right', actualMargin);
+ element.style.marginRight = parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px";
}); // Adjust body padding
var actualPadding = document.body.style.paddingRight;
- var calculatedPadding = $(document.body).css('padding-right');
- $(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
+ var calculatedPadding = window.getComputedStyle(document.body)['padding-right'];
+ Manipulator.setDataAttribute(document.body, 'padding-right', actualPadding);
+ document.body.style.paddingRight = parseFloat(calculatedPadding) + this._scrollbarWidth + "px";
}
- $(document.body).addClass(CLASS_NAME_OPEN);
+ document.body.classList.add(CLASS_NAME_OPEN);
};
_proto._resetScrollbar = function _resetScrollbar() {
// Restore fixed content padding
- var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT));
- $(fixedContent).each(function (index, element) {
- var padding = $(element).data('padding-right');
- $(element).removeData('padding-right');
- element.style.paddingRight = padding ? padding : '';
- }); // Restore sticky content
+ SelectorEngine.find(SELECTOR_FIXED_CONTENT).forEach(function (element) {
+ var padding = Manipulator.getDataAttribute(element, 'padding-right');
- var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT));
- $(elements).each(function (index, element) {
- var margin = $(element).data('margin-right');
+ if (typeof padding !== 'undefined') {
+ Manipulator.removeDataAttribute(element, 'padding-right');
+ element.style.paddingRight = padding;
+ }
+ }); // Restore sticky content and navbar-toggler margin
+
+ SelectorEngine.find("" + SELECTOR_STICKY_CONTENT).forEach(function (element) {
+ var margin = Manipulator.getDataAttribute(element, 'margin-right');
if (typeof margin !== 'undefined') {
- $(element).css('margin-right', margin).removeData('margin-right');
+ Manipulator.removeDataAttribute(element, 'margin-right');
+ element.style.marginRight = margin;
}
}); // Restore body padding
- var padding = $(document.body).data('padding-right');
- $(document.body).removeData('padding-right');
- document.body.style.paddingRight = padding ? padding : '';
+ var padding = Manipulator.getDataAttribute(document.body, 'padding-right');
+
+ if (typeof padding === 'undefined') {
+ document.body.style.paddingRight = '';
+ } else {
+ Manipulator.removeDataAttribute(document.body, 'padding-right');
+ document.body.style.paddingRight = padding;
+ }
};
_proto._getScrollbarWidth = function _getScrollbarWidth() {
@@ -543,15 +662,14 @@
} // Static
;
- Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
+ Modal.jQueryInterface = function jQueryInterface(config, relatedTarget) {
return this.each(function () {
- var data = $(this).data(DATA_KEY);
+ var data = Data.getData(this, DATA_KEY);
- var _config = _extends({}, Default, $(this).data(), typeof config === 'object' && config ? config : {});
+ var _config = _objectSpread(_objectSpread(_objectSpread({}, Default), Manipulator.getDataAttributes(this)), typeof config === 'object' && config ? config : {});
if (!data) {
data = new Modal(this, _config);
- $(this).data(DATA_KEY, data);
}
if (typeof config === 'string') {
@@ -566,6 +684,10 @@
});
};
+ Modal.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY);
+ };
+
_createClass(Modal, null, [{
key: "VERSION",
get: function get() {
@@ -587,50 +709,57 @@
*/
- $(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
var _this11 = this;
- var target;
- var selector = Util.getSelectorFromElement(this);
-
- if (selector) {
- target = document.querySelector(selector);
- }
-
- var config = $(target).data(DATA_KEY) ? 'toggle' : _extends({}, $(target).data(), $(this).data());
+ var target = getElementFromSelector(this);
if (this.tagName === 'A' || this.tagName === 'AREA') {
event.preventDefault();
}
- var $target = $(target).one(EVENT_SHOW, function (showEvent) {
- if (showEvent.isDefaultPrevented()) {
- // Only register focus restorer if modal will actually get shown
+ EventHandler.one(target, EVENT_SHOW, function (showEvent) {
+ if (showEvent.defaultPrevented) {
+ // only register focus restorer if modal will actually get shown
return;
}
- $target.one(EVENT_HIDDEN, function () {
- if ($(_this11).is(':visible')) {
+ EventHandler.one(target, EVENT_HIDDEN, function () {
+ if (isVisible(_this11)) {
_this11.focus();
}
});
});
+ var data = Data.getData(target, DATA_KEY);
- Modal._jQueryInterface.call($(target), config, this);
+ if (!data) {
+ var config = _objectSpread(_objectSpread({}, Manipulator.getDataAttributes(target)), Manipulator.getDataAttributes(this));
+
+ data = new Modal(target, config);
+ }
+
+ data.show(this);
});
+ var $ = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .modal to jQuery only if jQuery is present
*/
- $.fn[NAME] = Modal._jQueryInterface;
- $.fn[NAME].Constructor = Modal;
+ /* istanbul ignore if */
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Modal._jQueryInterface;
- };
+ if ($) {
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
+ $.fn[NAME] = Modal.jQueryInterface;
+ $.fn[NAME].Constructor = Modal;
+
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
+ return Modal.jQueryInterface;
+ };
+ }
return Modal;
diff --git a/assets/javascripts/bootstrap/popover.js b/assets/javascripts/bootstrap/popover.js
index 4a9bdb8..344d1df 100644
--- a/assets/javascripts/bootstrap/popover.js
+++ b/assets/javascripts/bootstrap/popover.js
@@ -1,24 +1,47 @@
/*!
- * Bootstrap popover.js v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap popover.js v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 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.js'], 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/data.js'), require('./dom/selector-engine.js'), require('./tooltip.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/selector-engine.js', './tooltip.js'], factory) :
+ (global = global || self, global.Popover = factory(global.Data, global.SelectorEngine, global.Tooltip));
+}(this, (function (Data, SelectorEngine, Tooltip) { 'use strict';
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
+ Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
+ SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
Tooltip = Tooltip && Object.prototype.hasOwnProperty.call(Tooltip, 'default') ? Tooltip['default'] : Tooltip;
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): util/index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+ var getjQuery = function getjQuery() {
+ var _window = window,
+ jQuery = _window.jQuery;
+
+ if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
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 _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
- 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]; } } } return target; }; return _extends.apply(this, arguments); }
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
/**
* ------------------------------------------------------------------------
* Constants
@@ -26,28 +49,23 @@
*/
var NAME = 'popover';
- var VERSION = '4.5.2';
+ var VERSION = '5.0.0-alpha1';
var DATA_KEY = 'bs.popover';
var EVENT_KEY = "." + DATA_KEY;
- var JQUERY_NO_CONFLICT = $.fn[NAME];
var CLASS_PREFIX = 'bs-popover';
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
- var Default = _extends({}, Tooltip.Default, {
+ var Default = _objectSpread(_objectSpread({}, Tooltip.Default), {}, {
placement: 'right',
trigger: 'click',
content: '',
- template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
+ template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
});
- var DefaultType = _extends({}, Tooltip.DefaultType, {
+ var DefaultType = _objectSpread(_objectSpread({}, Tooltip.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,
@@ -60,6 +78,10 @@
MOUSEENTER: "mouseenter" + EVENT_KEY,
MOUSELEAVE: "mouseleave" + EVENT_KEY
};
+ var CLASS_NAME_FADE = 'fade';
+ var CLASS_NAME_SHOW = 'show';
+ var SELECTOR_TITLE = '.popover-header';
+ var SELECTOR_CONTENT = '.popover-body';
/**
* ------------------------------------------------------------------------
* Class Definition
@@ -80,19 +102,10 @@
return this.getTitle() || this._getContent();
};
- _proto.addAttachmentClass = function addAttachmentClass(attachment) {
- $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
- };
-
- _proto.getTipElement = function getTipElement() {
- this.tip = this.tip || $(this.config.template)[0];
- return this.tip;
- };
-
_proto.setContent = function setContent() {
- var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events
+ var tip = this.getTipElement(); // we use append for html objects to maintain js events
- this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle());
+ this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());
var content = this._getContent();
@@ -100,8 +113,12 @@
content = content.call(this.element);
}
- this.setElementContent($tip.find(SELECTOR_CONTENT), content);
- $tip.removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
+ this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
+ tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
+ };
+
+ _proto._addAttachmentClass = function _addAttachmentClass(attachment) {
+ this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
} // Private
;
@@ -110,18 +127,22 @@
};
_proto._cleanTipClass = function _cleanTipClass() {
- var $tip = $(this.getTipElement());
- var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
+ var tip = this.getTipElement();
+ var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length > 0) {
- $tip.removeClass(tabClass.join(''));
+ tabClass.map(function (token) {
+ return token.trim();
+ }).forEach(function (tClass) {
+ return tip.classList.remove(tClass);
+ });
}
} // Static
;
- Popover._jQueryInterface = function _jQueryInterface(config) {
+ Popover.jQueryInterface = function jQueryInterface(config) {
return this.each(function () {
- var data = $(this).data(DATA_KEY);
+ var data = Data.getData(this, DATA_KEY);
var _config = typeof config === 'object' ? config : null;
@@ -131,7 +152,7 @@
if (!data) {
data = new Popover(this, _config);
- $(this).data(DATA_KEY, data);
+ Data.setData(this, DATA_KEY, data);
}
if (typeof config === 'string') {
@@ -144,6 +165,10 @@
});
};
+ Popover.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY);
+ };
+
_createClass(Popover, null, [{
key: "VERSION",
// Getters
@@ -184,20 +209,26 @@
return Popover;
}(Tooltip);
+
+ var $ = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
+ /* istanbul ignore if */
- $.fn[NAME] = Popover._jQueryInterface;
- $.fn[NAME].Constructor = Popover;
+ if ($) {
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
+ $.fn[NAME] = Popover.jQueryInterface;
+ $.fn[NAME].Constructor = Popover;
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Popover._jQueryInterface;
- };
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
+ return Popover.jQueryInterface;
+ };
+ }
return Popover;
diff --git a/assets/javascripts/bootstrap/scrollspy.js b/assets/javascripts/bootstrap/scrollspy.js
index 7294f70..ee37c04 100644
--- a/assets/javascripts/bootstrap/scrollspy.js
+++ b/assets/javascripts/bootstrap/scrollspy.js
@@ -1,18 +1,102 @@
/*!
- * Bootstrap scrollspy.js v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap scrollspy.js v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 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.js'], 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/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./dom/selector-engine.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', './dom/selector-engine.js'], factory) :
+ (global = global || self, global.ScrollSpy = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
+}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
- Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
+ Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
+ EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
+ Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
+ SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
- 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]; } } } return target; }; return _extends.apply(this, arguments); }
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): util/index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ var MAX_UID = 1000000;
+
+ var toType = function toType(obj) {
+ if (obj === null || obj === undefined) {
+ return "" + obj;
+ }
+
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
+ };
+ /**
+ * --------------------------------------------------------------------------
+ * Public Util Api
+ * --------------------------------------------------------------------------
+ */
+
+
+ var getUID = function getUID(prefix) {
+ do {
+ prefix += Math.floor(Math.random() * MAX_UID);
+ } while (document.getElementById(prefix));
+
+ return prefix;
+ };
+
+ var getSelector = function getSelector(element) {
+ var selector = element.getAttribute('data-target');
+
+ if (!selector || selector === '#') {
+ var hrefAttr = element.getAttribute('href');
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
+ }
+
+ return selector;
+ };
+
+ var getSelectorFromElement = function getSelectorFromElement(element) {
+ var selector = getSelector(element);
+
+ if (selector) {
+ return document.querySelector(selector) ? selector : null;
+ }
+
+ return null;
+ };
+
+ var isElement = function isElement(obj) {
+ return (obj[0] || obj).nodeType;
+ };
+
+ var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
+ Object.keys(configTypes).forEach(function (property) {
+ var expectedTypes = configTypes[property];
+ var value = config[property];
+ var valueType = value && 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 + "\"."));
+ }
+ });
+ };
+
+ var getjQuery = function getjQuery() {
+ var _window = window,
+ jQuery = _window.jQuery;
+
+ if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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); } }
@@ -24,11 +108,10 @@
*/
var NAME = 'scrollspy';
- var VERSION = '4.5.2';
+ var VERSION = '5.0.0-alpha1';
var DATA_KEY = 'bs.scrollspy';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.fn[NAME];
var Default = {
offset: 10,
method: 'auto',
@@ -50,7 +133,6 @@
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';
@@ -67,17 +149,19 @@
this._element = element;
this._scrollElement = element.tagName === 'BODY' ? window : 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, function (event) {
+ EventHandler.on(this._scrollElement, EVENT_SCROLL, function (event) {
return _this._process(event);
});
this.refresh();
this._process();
+
+ Data.setData(element, DATA_KEY, this);
} // Getters
@@ -93,21 +177,20 @@
this._offsets = [];
this._targets = [];
this._scrollHeight = this._getScrollHeight();
- var targets = [].slice.call(document.querySelectorAll(this._selector));
+ var targets = SelectorEngine.find(this._selector);
targets.map(function (element) {
var target;
- var targetSelector = Util.getSelectorFromElement(element);
+ var targetSelector = getSelectorFromElement(element);
if (targetSelector) {
- target = document.querySelector(targetSelector);
+ target = SelectorEngine.findOne(targetSelector);
}
if (target) {
var targetBCR = target.getBoundingClientRect();
if (targetBCR.width || targetBCR.height) {
- // TODO (fat): remove sketch reliance on jQuery position/offset
- return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
+ return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];
}
}
@@ -124,8 +207,8 @@
};
_proto.dispose = function dispose() {
- $.removeData(this._element, DATA_KEY);
- $(this._scrollElement).off(EVENT_KEY);
+ Data.removeData(this._element, DATA_KEY);
+ EventHandler.off(this._scrollElement, EVENT_KEY);
this._element = null;
this._scrollElement = null;
this._config = null;
@@ -138,20 +221,20 @@
;
_proto._getConfig = function _getConfig(config) {
- config = _extends({}, Default, typeof config === 'object' && config ? config : {});
+ config = _objectSpread(_objectSpread({}, Default), typeof config === 'object' && config ? config : {});
- if (typeof config.target !== 'string' && Util.isElement(config.target)) {
- var id = $(config.target).attr('id');
+ if (typeof config.target !== 'string' && isElement(config.target)) {
+ var id = config.target.id;
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;
};
@@ -214,28 +297,36 @@
return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
});
- var $link = $([].slice.call(document.querySelectorAll(queries.join(','))));
+ var link = SelectorEngine.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.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.parents(link, SELECTOR_NAV_LIST_GROUP).forEach(function (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(function (item) {
+ return item.classList.add(CLASS_NAME_ACTIVE);
+ }); // Handle special case when .nav-link is inside .nav-item
+
+ SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(function (navItem) {
+ SelectorEngine.children(navItem, SELECTOR_NAV_LINKS).forEach(function (item) {
+ return item.classList.add(CLASS_NAME_ACTIVE);
+ });
+ });
+ });
}
- $(this._scrollElement).trigger(EVENT_ACTIVATE, {
+ EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {
relatedTarget: target
});
};
_proto._clear = function _clear() {
- [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
+ SelectorEngine.find(this._selector).filter(function (node) {
return node.classList.contains(CLASS_NAME_ACTIVE);
}).forEach(function (node) {
return node.classList.remove(CLASS_NAME_ACTIVE);
@@ -243,15 +334,14 @@
} // Static
;
- ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
+ ScrollSpy.jQueryInterface = function jQueryInterface(config) {
return this.each(function () {
- var data = $(this).data(DATA_KEY);
+ var data = Data.getData(this, DATA_KEY);
var _config = typeof config === 'object' && config;
if (!data) {
data = new ScrollSpy(this, _config);
- $(this).data(DATA_KEY, data);
}
if (typeof config === 'string') {
@@ -264,6 +354,10 @@
});
};
+ ScrollSpy.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY);
+ };
+
_createClass(ScrollSpy, null, [{
key: "VERSION",
get: function get() {
@@ -285,29 +379,30 @@
*/
- $(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 = $(scrollSpys[i]);
-
- ScrollSpy._jQueryInterface.call($spy, $spy.data());
- }
+ EventHandler.on(window, EVENT_LOAD_DATA_API, function () {
+ SelectorEngine.find(SELECTOR_DATA_SPY).forEach(function (spy) {
+ return new ScrollSpy(spy, Manipulator.getDataAttributes(spy));
+ });
});
+ var $ = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
- $.fn[NAME] = ScrollSpy._jQueryInterface;
- $.fn[NAME].Constructor = ScrollSpy;
+ /* istanbul ignore if */
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return ScrollSpy._jQueryInterface;
- };
+ if ($) {
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
+ $.fn[NAME] = ScrollSpy.jQueryInterface;
+ $.fn[NAME].Constructor = ScrollSpy;
+
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
+ return ScrollSpy.jQueryInterface;
+ };
+ }
return ScrollSpy;
diff --git a/assets/javascripts/bootstrap/tab.js b/assets/javascripts/bootstrap/tab.js
index 95451ca..7a8eb79 100644
--- a/assets/javascripts/bootstrap/tab.js
+++ b/assets/javascripts/bootstrap/tab.js
@@ -1,16 +1,102 @@
/*!
- * Bootstrap tab.js v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap tab.js v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 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.js'], 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/data.js'), require('./dom/event-handler.js'), require('./dom/selector-engine.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/selector-engine.js'], factory) :
+ (global = global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine));
+}(this, (function (Data, EventHandler, SelectorEngine) { 'use strict';
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
- Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
+ Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
+ EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
+ SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): util/index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ var MILLISECONDS_MULTIPLIER = 1000;
+ var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
+
+ var getSelector = function getSelector(element) {
+ var selector = element.getAttribute('data-target');
+
+ if (!selector || selector === '#') {
+ var hrefAttr = element.getAttribute('href');
+ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
+ }
+
+ return selector;
+ };
+
+ var getElementFromSelector = function getElementFromSelector(element) {
+ var selector = getSelector(element);
+ return selector ? document.querySelector(selector) : null;
+ };
+
+ var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
+ if (!element) {
+ return 0;
+ } // Get transition-duration of the element
+
+
+ var _window$getComputedSt = window.getComputedStyle(element),
+ transitionDuration = _window$getComputedSt.transitionDuration,
+ transitionDelay = _window$getComputedSt.transitionDelay;
+
+ 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;
+ };
+
+ var triggerTransitionEnd = function triggerTransitionEnd(element) {
+ element.dispatchEvent(new Event(TRANSITION_END));
+ };
+
+ var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
+ var called = false;
+ var durationPadding = 5;
+ var emulatedDuration = duration + durationPadding;
+
+ function listener() {
+ called = true;
+ element.removeEventListener(TRANSITION_END, listener);
+ }
+
+ element.addEventListener(TRANSITION_END, listener);
+ setTimeout(function () {
+ if (!called) {
+ triggerTransitionEnd(element);
+ }
+ }, emulatedDuration);
+ };
+
+ var reflow = function reflow(element) {
+ return element.offsetHeight;
+ };
+
+ var getjQuery = function getjQuery() {
+ var _window = window,
+ jQuery = _window.jQuery;
+
+ if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
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); } }
@@ -22,11 +108,10 @@
*/
var NAME = 'tab';
- var VERSION = '4.5.2';
+ var VERSION = '5.0.0-alpha1';
var DATA_KEY = 'bs.tab';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
- var JQUERY_NO_CONFLICT = $.fn[NAME];
var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
var EVENT_SHOW = "show" + EVENT_KEY;
@@ -40,10 +125,10 @@
var SELECTOR_DROPDOWN = '.dropdown';
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
var SELECTOR_ACTIVE = '.active';
- var SELECTOR_ACTIVE_UL = '> li > .active';
+ var SELECTOR_ACTIVE_UL = ':scope > 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';
+ var SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';
/**
* ------------------------------------------------------------------------
* Class Definition
@@ -53,6 +138,7 @@
var Tab = /*#__PURE__*/function () {
function Tab(element) {
this._element = element;
+ Data.setData(this._element, DATA_KEY, this);
} // Getters
@@ -62,53 +148,46 @@
_proto.show = function show() {
var _this = this;
- 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) || this._element.classList.contains(CLASS_NAME_DISABLED)) {
return;
}
- var target;
var previous;
- var listElement = $(this._element).closest(SELECTOR_NAV_LIST_GROUP)[0];
- var selector = Util.getSelectorFromElement(this._element);
+ var target = getElementFromSelector(this._element);
+
+ var listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP);
if (listElement) {
var 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];
}
- var hideEvent = $.Event(EVENT_HIDE, {
- relatedTarget: this._element
- });
- var showEvent = $.Event(EVENT_SHOW, {
- relatedTarget: previous
- });
+ var hideEvent = null;
if (previous) {
- $(previous).trigger(hideEvent);
+ hideEvent = EventHandler.trigger(previous, EVENT_HIDE, {
+ relatedTarget: this._element
+ });
}
- $(this._element).trigger(showEvent);
+ var showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {
+ relatedTarget: previous
+ });
- 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 = $.Event(EVENT_HIDDEN, {
+ EventHandler.trigger(previous, EVENT_HIDDEN, {
relatedTarget: _this._element
});
- var shownEvent = $.Event(EVENT_SHOWN, {
+ EventHandler.trigger(_this._element, EVENT_SHOWN, {
relatedTarget: previous
});
- $(previous).trigger(hiddenEvent);
- $(_this._element).trigger(shownEvent);
};
if (target) {
@@ -119,7 +198,7 @@
};
_proto.dispose = function dispose() {
- $.removeData(this._element, DATA_KEY);
+ Data.removeData(this._element, DATA_KEY);
this._element = null;
} // Private
;
@@ -127,17 +206,19 @@
_proto._activate = function _activate(element, container, callback) {
var _this2 = this;
- var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(SELECTOR_ACTIVE_UL) : $(container).children(SELECTOR_ACTIVE);
+ var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine.children(container, SELECTOR_ACTIVE);
var active = activeElements[0];
- var isTransitioning = callback && active && $(active).hasClass(CLASS_NAME_FADE);
+ var isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE);
var complete = function complete() {
return _this2._transitionComplete(element, active, callback);
};
if (active && isTransitioning) {
- var transitionDuration = Util.getTransitionDurationFromElement(active);
- $(active).removeClass(CLASS_NAME_SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ var transitionDuration = getTransitionDurationFromElement(active);
+ active.classList.remove(CLASS_NAME_SHOW);
+ EventHandler.one(active, TRANSITION_END, complete);
+ emulateTransitionEnd(active, transitionDuration);
} else {
complete();
}
@@ -145,11 +226,11 @@
_proto._transitionComplete = function _transitionComplete(element, active, callback) {
if (active) {
- $(active).removeClass(CLASS_NAME_ACTIVE);
- var dropdownChild = $(active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0];
+ active.classList.remove(CLASS_NAME_ACTIVE);
+ var 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') {
@@ -157,24 +238,25 @@
}
}
- $(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)) {
- var dropdownElement = $(element).closest(SELECTOR_DROPDOWN)[0];
+ if (element.parentNode && element.parentNode.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
+ var dropdownElement = element.closest(SELECTOR_DROPDOWN);
if (dropdownElement) {
- var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE));
- $(dropdownToggleList).addClass(CLASS_NAME_ACTIVE);
+ SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE).forEach(function (dropdown) {
+ return dropdown.classList.add(CLASS_NAME_ACTIVE);
+ });
}
element.setAttribute('aria-expanded', true);
@@ -186,15 +268,9 @@
} // Static
;
- Tab._jQueryInterface = function _jQueryInterface(config) {
+ Tab.jQueryInterface = function jQueryInterface(config) {
return this.each(function () {
- var $this = $(this);
- var data = $this.data(DATA_KEY);
-
- if (!data) {
- data = new Tab(this);
- $this.data(DATA_KEY, data);
- }
+ var data = Data.getData(this, DATA_KEY) || new Tab(this);
if (typeof config === 'string') {
if (typeof data[config] === 'undefined') {
@@ -206,6 +282,10 @@
});
};
+ Tab.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY);
+ };
+
_createClass(Tab, null, [{
key: "VERSION",
get: function get() {
@@ -222,24 +302,31 @@
*/
- $(document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
event.preventDefault();
-
- Tab._jQueryInterface.call($(this), 'show');
+ var data = Data.getData(this, DATA_KEY) || new Tab(this);
+ data.show();
});
+ var $ = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .tab to jQuery only if jQuery is present
*/
- $.fn[NAME] = Tab._jQueryInterface;
- $.fn[NAME].Constructor = Tab;
+ /* istanbul ignore if */
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Tab._jQueryInterface;
- };
+ if ($) {
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
+ $.fn[NAME] = Tab.jQueryInterface;
+ $.fn[NAME].Constructor = Tab;
+
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
+ return Tab.jQueryInterface;
+ };
+ }
return Tab;
diff --git a/assets/javascripts/bootstrap/toast.js b/assets/javascripts/bootstrap/toast.js
index 2ce7c7f..d010910 100644
--- a/assets/javascripts/bootstrap/toast.js
+++ b/assets/javascripts/bootstrap/toast.js
@@ -1,18 +1,116 @@
/*!
- * Bootstrap toast.js v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap toast.js v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 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.js'], 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')) :
+ typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js'], factory) :
+ (global = global || self, global.Toast = factory(global.Data, global.EventHandler, global.Manipulator));
+}(this, (function (Data, EventHandler, Manipulator) { 'use strict';
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
- Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
+ Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
+ EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
+ Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
- 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]; } } } return target; }; return _extends.apply(this, arguments); }
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): util/index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ var MILLISECONDS_MULTIPLIER = 1000;
+ var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
+
+ var toType = function toType(obj) {
+ if (obj === null || obj === undefined) {
+ return "" + obj;
+ }
+
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
+ };
+
+ var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
+ if (!element) {
+ return 0;
+ } // Get transition-duration of the element
+
+
+ var _window$getComputedSt = window.getComputedStyle(element),
+ transitionDuration = _window$getComputedSt.transitionDuration,
+ transitionDelay = _window$getComputedSt.transitionDelay;
+
+ 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;
+ };
+
+ var triggerTransitionEnd = function triggerTransitionEnd(element) {
+ element.dispatchEvent(new Event(TRANSITION_END));
+ };
+
+ var isElement = function isElement(obj) {
+ return (obj[0] || obj).nodeType;
+ };
+
+ var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
+ var called = false;
+ var durationPadding = 5;
+ var emulatedDuration = duration + durationPadding;
+
+ function listener() {
+ called = true;
+ element.removeEventListener(TRANSITION_END, listener);
+ }
+
+ element.addEventListener(TRANSITION_END, listener);
+ setTimeout(function () {
+ if (!called) {
+ triggerTransitionEnd(element);
+ }
+ }, emulatedDuration);
+ };
+
+ var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
+ Object.keys(configTypes).forEach(function (property) {
+ var expectedTypes = configTypes[property];
+ var value = config[property];
+ var valueType = value && 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 + "\"."));
+ }
+ });
+ };
+
+ var reflow = function reflow(element) {
+ return element.offsetHeight;
+ };
+
+ var getjQuery = function getjQuery() {
+ var _window = window,
+ jQuery = _window.jQuery;
+
+ if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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); } }
@@ -24,10 +122,9 @@
*/
var NAME = 'toast';
- var VERSION = '4.5.2';
+ var VERSION = '5.0.0-alpha1';
var DATA_KEY = 'bs.toast';
var EVENT_KEY = "." + DATA_KEY;
- var JQUERY_NO_CONFLICT = $.fn[NAME];
var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
var EVENT_HIDE = "hide" + EVENT_KEY;
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
@@ -61,6 +158,8 @@
this._timeout = null;
this._setListeners();
+
+ Data.setData(element, DATA_KEY, this);
} // Getters
@@ -70,15 +169,12 @@
_proto.show = function show() {
var _this = this;
- var showEvent = $.Event(EVENT_SHOW);
- $(this._element).trigger(showEvent);
+ var showEvent = EventHandler.trigger(this._element, EVENT_SHOW);
- if (showEvent.isDefaultPrevented()) {
+ if (showEvent.defaultPrevented) {
return;
}
- this._clearTimeout();
-
if (this._config.animation) {
this._element.classList.add(CLASS_NAME_FADE);
}
@@ -88,7 +184,7 @@
_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(function () {
@@ -99,96 +195,87 @@
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) {
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
- $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ var transitionDuration = getTransitionDurationFromElement(this._element);
+ EventHandler.one(this._element, TRANSITION_END, complete);
+ emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
};
_proto.hide = function hide() {
+ var _this2 = this;
+
if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
return;
}
- var hideEvent = $.Event(EVENT_HIDE);
- $(this._element).trigger(hideEvent);
+ var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
- if (hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
return;
}
- this._close();
+ var complete = function complete() {
+ _this2._element.classList.add(CLASS_NAME_HIDE);
+
+ EventHandler.trigger(_this2._element, EVENT_HIDDEN);
+ };
+
+ this._element.classList.remove(CLASS_NAME_SHOW);
+
+ if (this._config.animation) {
+ var transitionDuration = getTransitionDurationFromElement(this._element);
+ EventHandler.one(this._element, TRANSITION_END, complete);
+ emulateTransitionEnd(this._element, transitionDuration);
+ } else {
+ complete();
+ }
};
_proto.dispose = function dispose() {
- this._clearTimeout();
+ clearTimeout(this._timeout);
+ this._timeout = null;
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
this._element.classList.remove(CLASS_NAME_SHOW);
}
- $(this._element).off(EVENT_CLICK_DISMISS);
- $.removeData(this._element, DATA_KEY);
+ EventHandler.off(this._element, EVENT_CLICK_DISMISS);
+ Data.removeData(this._element, DATA_KEY);
this._element = null;
this._config = null;
} // Private
;
_proto._getConfig = function _getConfig(config) {
- config = _extends({}, Default, $(this._element).data(), typeof config === 'object' && config ? config : {});
- Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
+ config = _objectSpread(_objectSpread(_objectSpread({}, Default), Manipulator.getDataAttributes(this._element)), typeof config === 'object' && config ? config : {});
+ typeCheckConfig(NAME, config, this.constructor.DefaultType);
return config;
};
_proto._setListeners = function _setListeners() {
- var _this2 = this;
-
- $(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
- return _this2.hide();
- });
- };
-
- _proto._close = function _close() {
var _this3 = this;
- var complete = function complete() {
- _this3._element.classList.add(CLASS_NAME_HIDE);
-
- $(_this3._element).trigger(EVENT_HIDDEN);
- };
-
- this._element.classList.remove(CLASS_NAME_SHOW);
-
- if (this._config.animation) {
- var transitionDuration = Util.getTransitionDurationFromElement(this._element);
- $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
- } else {
- complete();
- }
- };
-
- _proto._clearTimeout = function _clearTimeout() {
- clearTimeout(this._timeout);
- this._timeout = null;
+ EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
+ return _this3.hide();
+ });
} // Static
;
- Toast._jQueryInterface = function _jQueryInterface(config) {
+ Toast.jQueryInterface = function jQueryInterface(config) {
return this.each(function () {
- var $element = $(this);
- var data = $element.data(DATA_KEY);
+ var data = Data.getData(this, DATA_KEY);
var _config = typeof config === 'object' && config;
if (!data) {
data = new Toast(this, _config);
- $element.data(DATA_KEY, data);
}
if (typeof config === 'string') {
@@ -201,6 +288,10 @@
});
};
+ Toast.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY);
+ };
+
_createClass(Toast, null, [{
key: "VERSION",
get: function get() {
@@ -220,20 +311,27 @@
return Toast;
}();
+
+ var $ = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .toast to jQuery only if jQuery is present
*/
+ /* istanbul ignore if */
- $.fn[NAME] = Toast._jQueryInterface;
- $.fn[NAME].Constructor = Toast;
+ if ($) {
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
+ $.fn[NAME] = Toast.jQueryInterface;
+ $.fn[NAME].Constructor = Toast;
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Toast._jQueryInterface;
- };
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
+ return Toast.jQueryInterface;
+ };
+ }
return Toast;
diff --git a/assets/javascripts/bootstrap/tooltip.js b/assets/javascripts/bootstrap/tooltip.js
index f1e7779..0302b75 100644
--- a/assets/javascripts/bootstrap/tooltip.js
+++ b/assets/javascripts/bootstrap/tooltip.js
@@ -1,59 +1,159 @@
/*!
- * Bootstrap tooltip.js v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap tooltip.js v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 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.js'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util));
-}(this, (function ($, Popper, Util) { 'use strict';
-
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('popper.js'), require('./dom/selector-engine.js')) :
+ typeof define === 'function' && define.amd ? define(['./dom/data.js', './dom/event-handler.js', './dom/manipulator.js', 'popper.js', './dom/selector-engine.js'], factory) :
+ (global = global || self, global.Tooltip = factory(global.Data, global.EventHandler, global.Manipulator, global.Popper, global.SelectorEngine));
+}(this, (function (Data, EventHandler, Manipulator, Popper, SelectorEngine) { 'use strict';
+
+ Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
+ EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
+ Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
- Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
+ SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
/**
* --------------------------------------------------------------------------
- * Bootstrap (v4.5.2): tools/sanitizer.js
+ * Bootstrap (v5.0.0-alpha1): util/index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+ var MAX_UID = 1000000;
+ var MILLISECONDS_MULTIPLIER = 1000;
+ var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
+
+ var toType = function toType(obj) {
+ if (obj === null || obj === undefined) {
+ return "" + obj;
+ }
+
+ return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
+ };
+ /**
+ * --------------------------------------------------------------------------
+ * Public Util Api
+ * --------------------------------------------------------------------------
+ */
+
+
+ var getUID = function getUID(prefix) {
+ do {
+ prefix += Math.floor(Math.random() * MAX_UID);
+ } while (document.getElementById(prefix));
+
+ return prefix;
+ };
+
+ var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
+ if (!element) {
+ return 0;
+ } // Get transition-duration of the element
+
+
+ var _window$getComputedSt = window.getComputedStyle(element),
+ transitionDuration = _window$getComputedSt.transitionDuration,
+ transitionDelay = _window$getComputedSt.transitionDelay;
+
+ 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;
+ };
+
+ var triggerTransitionEnd = function triggerTransitionEnd(element) {
+ element.dispatchEvent(new Event(TRANSITION_END));
+ };
+
+ var isElement = function isElement(obj) {
+ return (obj[0] || obj).nodeType;
+ };
+
+ var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
+ var called = false;
+ var durationPadding = 5;
+ var emulatedDuration = duration + durationPadding;
+
+ function listener() {
+ called = true;
+ element.removeEventListener(TRANSITION_END, listener);
+ }
+
+ element.addEventListener(TRANSITION_END, listener);
+ setTimeout(function () {
+ if (!called) {
+ triggerTransitionEnd(element);
+ }
+ }, emulatedDuration);
+ };
+
+ var typeCheckConfig = function typeCheckConfig(componentName, config, configTypes) {
+ Object.keys(configTypes).forEach(function (property) {
+ var expectedTypes = configTypes[property];
+ var value = config[property];
+ var valueType = value && 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 + "\"."));
+ }
+ });
+ };
+
+ var 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 findShadowRoot(element.parentNode);
+ };
+
+ var noop = function noop() {
+ return function () {};
+ };
+
+ var getjQuery = function getjQuery() {
+ var _window = window,
+ jQuery = _window.jQuery;
+
+ if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
+ return jQuery;
+ }
+
+ return null;
+ };
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.0.0-alpha1): 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 = {
- // 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.
*
@@ -69,7 +169,7 @@
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 allowedAttribute = function allowedAttribute(attr, allowedAttributeList) {
var attrName = attr.nodeName.toLowerCase();
if (allowedAttributeList.indexOf(attrName) !== -1) {
@@ -91,10 +191,45 @@
}
return false;
- }
+ };
+ var 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: []
+ };
function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
- if (unsafeHtml.length === 0) {
+ var _ref;
+
+ if (!unsafeHtml.length) {
return unsafeHtml;
}
@@ -105,18 +240,22 @@
var domParser = new window.DOMParser();
var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
var whitelistKeys = Object.keys(whiteList);
- var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
+
+ var elements = (_ref = []).concat.apply(_ref, createdDocument.body.querySelectorAll('*'));
var _loop = function _loop(i, len) {
+ var _ref2;
+
var el = elements[i];
var elName = el.nodeName.toLowerCase();
- if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
+ if (whitelistKeys.indexOf(elName) === -1) {
el.parentNode.removeChild(el);
return "continue";
}
- var attributeList = [].slice.call(el.attributes);
+ var attributeList = (_ref2 = []).concat.apply(_ref2, el.attributes);
+
var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
attributeList.forEach(function (attr) {
if (!allowedAttribute(attr, whitelistedAttributes)) {
@@ -134,7 +273,11 @@
return createdDocument.body.innerHTML;
}
- 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]; } } } return target; }; return _extends.apply(this, arguments); }
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
+
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
+
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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); } }
@@ -146,10 +289,9 @@
*/
var NAME = 'tooltip';
- var VERSION = '4.5.2';
+ var VERSION = '5.0.0-alpha1';
var DATA_KEY = 'bs.tooltip';
var EVENT_KEY = "." + DATA_KEY;
- var JQUERY_NO_CONFLICT = $.fn[NAME];
var CLASS_PREFIX = 'bs-tooltip';
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
@@ -180,7 +322,7 @@
};
var 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,
@@ -196,9 +338,7 @@
whiteList: DefaultWhitelist,
popperConfig: null
};
- var HOVER_STATE_SHOW = 'show';
- var HOVER_STATE_OUT = 'out';
- var Event = {
+ var Event$1 = {
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
SHOW: "show" + EVENT_KEY,
@@ -211,9 +351,11 @@
MOUSELEAVE: "mouseleave" + EVENT_KEY
};
var CLASS_NAME_FADE = 'fade';
+ var CLASS_NAME_MODAL = 'modal';
var CLASS_NAME_SHOW = 'show';
+ var HOVER_STATE_SHOW = 'show';
+ var HOVER_STATE_OUT = 'out';
var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
- var SELECTOR_ARROW = '.arrow';
var TRIGGER_HOVER = 'hover';
var TRIGGER_FOCUS = 'focus';
var TRIGGER_CLICK = 'click';
@@ -227,7 +369,7 @@
var Tooltip = /*#__PURE__*/function () {
function Tooltip(element, config) {
if (typeof Popper === 'undefined') {
- throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
+ throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org)');
} // private
@@ -242,6 +384,8 @@
this.tip = null;
this._setListeners();
+
+ Data.setData(element, this.constructor.DATA_KEY, this);
} // Getters
@@ -267,11 +411,11 @@
if (event) {
var dataKey = this.constructor.DATA_KEY;
- var context = $(event.currentTarget).data(dataKey);
+ var context = Data.getData(event.target, dataKey);
if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $(event.currentTarget).data(dataKey, context);
+ context = new this.constructor(event.target, this._getDelegateConfig());
+ Data.setData(event.target, dataKey, context);
}
context._activeTrigger.click = !context._activeTrigger.click;
@@ -282,7 +426,7 @@
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;
@@ -294,12 +438,12 @@
_proto.dispose = function dispose() {
clearTimeout(this._timeout);
- $.removeData(this.element, this.constructor.DATA_KEY);
- $(this.element).off(this.constructor.EVENT_KEY);
- $(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
+ Data.removeData(this.element, this.constructor.DATA_KEY);
+ EventHandler.off(this.element, this.constructor.EVENT_KEY);
+ EventHandler.off(this.element.closest("." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
if (this.tip) {
- $(this.tip).remove();
+ this.tip.parentNode.removeChild(this.tip);
}
this._isEnabled = null;
@@ -320,54 +464,56 @@
_proto.show = function show() {
var _this = this;
- if ($(this.element).css('display') === 'none') {
+ if (this.element.style.display === 'none') {
throw new Error('Please use show on visible elements');
}
- var showEvent = $.Event(this.constructor.Event.SHOW);
-
if (this.isWithContent() && this._isEnabled) {
- $(this.element).trigger(showEvent);
- var shadowRoot = Util.findShadowRoot(this.element);
- var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
+ var showEvent = EventHandler.trigger(this.element, this.constructor.Event.SHOW);
+ var shadowRoot = findShadowRoot(this.element);
+ var isInTheDom = shadowRoot === null ? this.element.ownerDocument.documentElement.contains(this.element) : shadowRoot.contains(this.element);
- if (showEvent.isDefaultPrevented() || !isInTheDom) {
+ if (showEvent.defaultPrevented || !isInTheDom) {
return;
}
var tip = this.getTipElement();
- var tipId = Util.getUID(this.constructor.NAME);
+ var tipId = getUID(this.constructor.NAME);
tip.setAttribute('id', tipId);
this.element.setAttribute('aria-describedby', tipId);
this.setContent();
if (this.config.animation) {
- $(tip).addClass(CLASS_NAME_FADE);
+ tip.classList.add(CLASS_NAME_FADE);
}
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
var attachment = this._getAttachment(placement);
- this.addAttachmentClass(attachment);
+ this._addAttachmentClass(attachment);
var container = this._getContainer();
- $(tip).data(this.constructor.DATA_KEY, this);
+ Data.setData(tip, this.constructor.DATA_KEY, this);
- if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
- $(tip).appendTo(container);
+ if (!this.element.ownerDocument.documentElement.contains(this.tip)) {
+ container.appendChild(tip);
}
- $(this.element).trigger(this.constructor.Event.INSERTED);
+ EventHandler.trigger(this.element, this.constructor.Event.INSERTED);
this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
- $(tip).addClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we add extra
+ 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);
+ var _ref;
+
+ (_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) {
+ EventHandler.on(element, 'mouseover', noop());
+ });
}
var complete = function complete() {
@@ -377,27 +523,27 @@
var prevHoverState = _this._hoverState;
_this._hoverState = null;
- $(_this.element).trigger(_this.constructor.Event.SHOWN);
+ EventHandler.trigger(_this.element, _this.constructor.Event.SHOWN);
if (prevHoverState === HOVER_STATE_OUT) {
_this._leave(null, _this);
}
};
- if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
- var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
- $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ if (this.tip.classList.contains(CLASS_NAME_FADE)) {
+ var transitionDuration = getTransitionDurationFromElement(this.tip);
+ EventHandler.one(this.tip, TRANSITION_END, complete);
+ emulateTransitionEnd(this.tip, transitionDuration);
} else {
complete();
}
}
};
- _proto.hide = function hide(callback) {
+ _proto.hide = function hide() {
var _this2 = this;
var tip = this.getTipElement();
- var hideEvent = $.Event(this.constructor.Event.HIDE);
var complete = function complete() {
if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
@@ -408,37 +554,36 @@
_this2.element.removeAttribute('aria-describedby');
- $(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
+ EventHandler.trigger(_this2.element, _this2.constructor.Event.HIDDEN);
- if (_this2._popper !== null) {
- _this2._popper.destroy();
- }
-
- if (callback) {
- callback();
- }
+ _this2._popper.destroy();
};
- $(this.element).trigger(hideEvent);
+ var hideEvent = EventHandler.trigger(this.element, this.constructor.Event.HIDE);
- if (hideEvent.isDefaultPrevented()) {
+ if (hideEvent.defaultPrevented) {
return;
}
- $(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) {
- $(document.body).children().off('mouseover', null, $.noop);
+ var _ref2;
+
+ (_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (element) {
+ return 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)) {
- var transitionDuration = Util.getTransitionDurationFromElement(tip);
- $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
+ if (this.tip.classList.contains(CLASS_NAME_FADE)) {
+ var transitionDuration = getTransitionDurationFromElement(tip);
+ EventHandler.one(tip, TRANSITION_END, complete);
+ emulateTransitionEnd(tip, transitionDuration);
} else {
complete();
}
@@ -457,30 +602,41 @@
return Boolean(this.getTitle());
};
- _proto.addAttachmentClass = function addAttachmentClass(attachment) {
- $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
- };
-
_proto.getTipElement = function getTipElement() {
- this.tip = this.tip || $(this.config.template)[0];
+ if (this.tip) {
+ return this.tip;
+ }
+
+ var 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($(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);
};
- _proto.setElementContent = function setElementContent($element, content) {
- if (typeof content === 'object' && (content.nodeType || content.jquery)) {
- // Content is a DOM node or a jQuery
+ _proto.setElementContent = function setElementContent(element, content) {
+ if (element === null) {
+ return;
+ }
+
+ if (typeof content === 'object' && isElement(content)) {
+ if (content.jquery) {
+ content = content[0];
+ } // content is a DOM node or a jQuery
+
+
if (this.config.html) {
- if (!$(content).parent().is($element)) {
- $element.empty().append(content);
+ if (content.parentNode !== element) {
+ element.innerHTML = '';
+ element.appendChild(content);
}
} else {
- $element.text($(content).text());
+ element.textContent = content.textContent;
}
return;
@@ -491,9 +647,9 @@
content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
}
- $element.html(content);
+ element.innerHTML = content;
} else {
- $element.text(content);
+ element.textContent = content;
}
};
@@ -519,7 +675,7 @@
behavior: this.config.fallbackPlacement
},
arrow: {
- element: SELECTOR_ARROW
+ element: "." + this.constructor.NAME + "-arrow"
},
preventOverflow: {
boundariesElement: this.config.boundary
@@ -534,7 +690,11 @@
return _this3._handlePopperPlacementChange(data);
}
};
- return _extends({}, defaultBsConfig, this.config.popperConfig);
+ return _objectSpread(_objectSpread({}, defaultBsConfig), this.config.popperConfig);
+ };
+
+ _proto._addAttachmentClass = function _addAttachmentClass(attachment) {
+ this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
};
_proto._getOffset = function _getOffset() {
@@ -544,7 +704,7 @@
if (typeof this.config.offset === 'function') {
offset.fn = function (data) {
- data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element) || {});
+ data.offsets = _objectSpread(_objectSpread({}, data.offsets), _this4.config.offset(data.offsets, _this4.element) || {});
return data;
};
} else {
@@ -559,11 +719,11 @@
return document.body;
}
- if (Util.isElement(this.config.container)) {
- return $(this.config.container);
+ if (isElement(this.config.container)) {
+ return this.config.container;
}
- return $(document).find(this.config.container);
+ return SelectorEngine.findOne(this.config.container);
};
_proto._getAttachment = function _getAttachment(placement) {
@@ -576,15 +736,16 @@
var triggers = this.config.trigger.split(' ');
triggers.forEach(function (trigger) {
if (trigger === 'click') {
- $(_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
+ EventHandler.on(_this5.element, _this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
return _this5.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;
- $(_this5.element).on(eventIn, _this5.config.selector, function (event) {
+ EventHandler.on(_this5.element, eventIn, _this5.config.selector, function (event) {
return _this5._enter(event);
- }).on(eventOut, _this5.config.selector, function (event) {
+ });
+ EventHandler.on(_this5.element, eventOut, _this5.config.selector, function (event) {
return _this5._leave(event);
});
}
@@ -596,10 +757,10 @@
}
};
- $(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 = _extends({}, this.config, {
+ this.config = _objectSpread(_objectSpread({}, this.config), {}, {
trigger: 'manual',
selector: ''
});
@@ -619,18 +780,18 @@
_proto._enter = function _enter(event, context) {
var dataKey = this.constructor.DATA_KEY;
- context = context || $(event.currentTarget).data(dataKey);
+ context = context || Data.getData(event.target, dataKey);
if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $(event.currentTarget).data(dataKey, context);
+ context = new this.constructor(event.target, this._getDelegateConfig());
+ Data.setData(event.target, dataKey, context);
}
if (event) {
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = 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;
}
@@ -652,11 +813,11 @@
_proto._leave = function _leave(event, context) {
var dataKey = this.constructor.DATA_KEY;
- context = context || $(event.currentTarget).data(dataKey);
+ context = context || Data.getData(event.target, dataKey);
if (!context) {
- context = new this.constructor(event.currentTarget, this._getDelegateConfig());
- $(event.currentTarget).data(dataKey, context);
+ context = new this.constructor(event.target, this._getDelegateConfig());
+ Data.setData(event.target, dataKey, context);
}
if (event) {
@@ -693,13 +854,18 @@
};
_proto._getConfig = function _getConfig(config) {
- var dataAttributes = $(this.element).data();
+ var dataAttributes = Manipulator.getDataAttributes(this.element);
Object.keys(dataAttributes).forEach(function (dataAttr) {
if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
delete dataAttributes[dataAttr];
}
});
- config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
+
+ if (config && typeof config.container === 'object' && config.container.jquery) {
+ config.container = config.container[0];
+ }
+
+ config = _objectSpread(_objectSpread(_objectSpread({}, this.constructor.Default), dataAttributes), typeof config === 'object' && config ? config : {});
if (typeof config.delay === 'number') {
config.delay = {
@@ -716,7 +882,7 @@
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);
@@ -740,20 +906,25 @@
};
_proto._cleanTipClass = function _cleanTipClass() {
- var $tip = $(this.getTipElement());
- var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
+ var tip = this.getTipElement();
+ var 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(function (token) {
+ return token.trim();
+ }).forEach(function (tClass) {
+ return tip.classList.remove(tClass);
+ });
}
};
_proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
- this.tip = popperData.instance.popper;
+ var popperInstance = popperData.instance;
+ this.tip = popperInstance.popper;
this._cleanTipClass();
- this.addAttachmentClass(this._getAttachment(popperData.placement));
+ this._addAttachmentClass(this._getAttachment(popperData.placement));
};
_proto._fixTransition = function _fixTransition() {
@@ -764,7 +935,7 @@
return;
}
- $(tip).removeClass(CLASS_NAME_FADE);
+ tip.classList.remove(CLASS_NAME_FADE);
this.config.animation = false;
this.hide();
this.show();
@@ -772,9 +943,9 @@
} // Static
;
- Tooltip._jQueryInterface = function _jQueryInterface(config) {
+ Tooltip.jQueryInterface = function jQueryInterface(config) {
return this.each(function () {
- var data = $(this).data(DATA_KEY);
+ var data = Data.getData(this, DATA_KEY);
var _config = typeof config === 'object' && config;
@@ -784,7 +955,6 @@
if (!data) {
data = new Tooltip(this, _config);
- $(this).data(DATA_KEY, data);
}
if (typeof config === 'string') {
@@ -797,6 +967,10 @@
});
};
+ Tooltip.getInstance = function getInstance(element) {
+ return Data.getData(element, DATA_KEY);
+ };
+
_createClass(Tooltip, null, [{
key: "VERSION",
get: function get() {
@@ -820,7 +994,7 @@
}, {
key: "Event",
get: function get() {
- return Event;
+ return Event$1;
}
}, {
key: "EVENT_KEY",
@@ -836,20 +1010,27 @@
return Tooltip;
}();
+
+ var $ = getjQuery();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
+ * add .tooltip to jQuery only if jQuery is present
*/
+ /* istanbul ignore if */
- $.fn[NAME] = Tooltip._jQueryInterface;
- $.fn[NAME].Constructor = Tooltip;
+ if ($) {
+ var JQUERY_NO_CONFLICT = $.fn[NAME];
+ $.fn[NAME] = Tooltip.jQueryInterface;
+ $.fn[NAME].Constructor = Tooltip;
- $.fn[NAME].noConflict = function () {
- $.fn[NAME] = JQUERY_NO_CONFLICT;
- return Tooltip._jQueryInterface;
- };
+ $.fn[NAME].noConflict = function () {
+ $.fn[NAME] = JQUERY_NO_CONFLICT;
+ return Tooltip.jQueryInterface;
+ };
+ }
return Tooltip;
diff --git a/assets/javascripts/bootstrap/util.js b/assets/javascripts/bootstrap/util.js
deleted file mode 100644
index 0a72582..0000000
--- a/assets/javascripts/bootstrap/util.js
+++ /dev/null
@@ -1,192 +0,0 @@
-/*!
- * Bootstrap util.js v4.5.2 (https://getbootstrap.com/)
- * Copyright 2011-2020 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';
-
- $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
-
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.5.2): 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 ($(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;
- $(this).one(Util.TRANSITION_END, function () {
- called = true;
- });
- setTimeout(function () {
- if (!called) {
- Util.triggerTransitionEnd(_this);
- }
- }, duration);
- return this;
- }
-
- function setTransitionEndSupport() {
- $.fn.emulateTransitionEnd = transitionEndEmulator;
- $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
- }
- /**
- * --------------------------------------------------------------------------
- * Public Util Api
- * --------------------------------------------------------------------------
- */
-
-
- var Util = {
- TRANSITION_END: 'bsTransitionEnd',
- getUID: function getUID(prefix) {
- do {
- // eslint-disable-next-line no-bitwise
- 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 (err) {
- return null;
- }
- },
- getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
- if (!element) {
- return 0;
- } // Get transition-duration of the element
-
-
- var transitionDuration = $(element).css('transition-duration');
- var transitionDelay = $(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) {
- $(element).trigger(TRANSITION_END);
- },
- // TODO: Remove in v5
- 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 $ === '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');
- }
- }
- };
- Util.jQueryDetection();
- setTransitionEndSupport();
-
- return Util;
-
-})));
diff --git a/assets/stylesheets/_bootstrap-grid.scss b/assets/stylesheets/_bootstrap-grid.scss
index 668ad18..323df71 100644
--- a/assets/stylesheets/_bootstrap-grid.scss
+++ b/assets/stylesheets/_bootstrap-grid.scss
@@ -1,29 +1,65 @@
/*!
- * Bootstrap Grid v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap Grid v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
-html {
- box-sizing: border-box;
- -ms-overflow-style: scrollbar;
-}
-
-*,
-*::before,
-*::after {
- box-sizing: inherit;
-}
+$include-column-box-sizing: true !default;
@import "bootstrap/functions";
@import "bootstrap/variables";
+@import "bootstrap/mixins/lists";
@import "bootstrap/mixins/breakpoints";
-@import "bootstrap/mixins/grid-framework";
+@import "bootstrap/mixins/container";
@import "bootstrap/mixins/grid";
+@import "bootstrap/mixins/utilities";
+
+@import "bootstrap/vendor/rfs";
+@import "bootstrap/containers";
@import "bootstrap/grid";
-@import "bootstrap/utilities/display";
-@import "bootstrap/utilities/flex";
-@import "bootstrap/utilities/spacing";
+
+@import "bootstrap/utilities";
+// Only use the utilities we need
+// stylelint-disable-next-line scss/dollar-variable-default
+$utilities: map-get-multiple(
+ $utilities,
+ (
+ "bootstrap/display",
+ "bootstrap/order",
+ "bootstrap/flex",
+ "bootstrap/flex-direction",
+ "bootstrap/flex-grow",
+ "bootstrap/flex-shrink"
+ "bootstrap/flex-wrap",
+ "bootstrap/justify-content",
+ "bootstrap/align-items",
+ "bootstrap/align-content",
+ "bootstrap/align-self",
+ "bootstrap/margin",
+ "bootstrap/margin-x",
+ "bootstrap/margin-y",
+ "bootstrap/margin-top",
+ "bootstrap/margin-right",
+ "bootstrap/margin-bottom",
+ "bootstrap/margin-left",
+ "bootstrap/negative-margin",
+ "bootstrap/negative-margin-x",
+ "bootstrap/negative-margin-y",
+ "bootstrap/negative-margin-top",
+ "bootstrap/negative-margin-right",
+ "bootstrap/negative-margin-bottom",
+ "bootstrap/negative-margin-left",
+ "bootstrap/padding",
+ "bootstrap/padding-x",
+ "bootstrap/padding-y",
+ "bootstrap/padding-top",
+ "bootstrap/padding-right",
+ "bootstrap/padding-bottom",
+ "bootstrap/padding-left",
+ )
+);
+
+@import "bootstrap/utilities/api";
diff --git a/assets/stylesheets/_bootstrap-reboot.scss b/assets/stylesheets/_bootstrap-reboot.scss
index d55c7ce..36ac1ad 100644
--- a/assets/stylesheets/_bootstrap-reboot.scss
+++ b/assets/stylesheets/_bootstrap-reboot.scss
@@ -1,5 +1,5 @@
/*!
- * Bootstrap Reboot v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap Reboot v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -8,5 +8,8 @@
@import "bootstrap/functions";
@import "bootstrap/variables";
+// Prevent the usage of custom properties since we don't add them to `:root` in reboot
+$font-family-base: $font-family-sans-serif; // stylelint-disable-line scss/dollar-variable-default
+$font-family-code: $font-family-monospace; // stylelint-disable-line scss/dollar-variable-default
@import "bootstrap/mixins";
@import "bootstrap/reboot";
diff --git a/assets/stylesheets/_bootstrap.scss b/assets/stylesheets/_bootstrap.scss
index b8a3178..1d706bc 100644
--- a/assets/stylesheets/_bootstrap.scss
+++ b/assets/stylesheets/_bootstrap.scss
@@ -1,18 +1,23 @@
/*!
- * Bootstrap v4.5.2 (https://getbootstrap.com/)
+ * Bootstrap v5.0.0-alpha1 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
+// scss-docs-start import-stack
+// Configuration
@import "bootstrap/functions";
@import "bootstrap/variables";
@import "bootstrap/mixins";
+@import "bootstrap/utilities";
+
+// Layout & components
@import "bootstrap/root";
@import "bootstrap/reboot";
@import "bootstrap/type";
@import "bootstrap/images";
-@import "bootstrap/code";
+@import "bootstrap/containers";
@import "bootstrap/grid";
@import "bootstrap/tables";
@import "bootstrap/forms";
@@ -20,18 +25,14 @@
@import "bootstrap/transitions";
@import "bootstrap/dropdown";
@import "bootstrap/button-group";
-@import "bootstrap/input-group";
-@import "bootstrap/custom-forms";
@import "bootstrap/nav";
@import "bootstrap/navbar";
@import "bootstrap/card";
@import "bootstrap/breadcrumb";
@import "bootstrap/pagination";
@import "bootstrap/badge";
-@import "bootstrap/jumbotron";
@import "bootstrap/alert";
@import "bootstrap/progress";
-@import "bootstrap/media";
@import "bootstrap/list-group";
@import "bootstrap/close";
@import "bootstrap/toasts";
@@ -40,5 +41,10 @@
@import "bootstrap/popover";
@import "bootstrap/carousel";
@import "bootstrap/spinners";
-@import "bootstrap/utilities";
-@import "bootstrap/print";
+
+// Helpers
+@import "bootstrap/helpers";
+
+// Utilities
+@import "bootstrap/utilities/api";
+// scss-docs-end import-stack
diff --git a/assets/stylesheets/bootstrap/_alert.scss b/assets/stylesheets/bootstrap/_alert.scss
index da2a98a..19157b2 100644
--- a/assets/stylesheets/bootstrap/_alert.scss
+++ b/assets/stylesheets/bootstrap/_alert.scss
@@ -40,12 +40,12 @@
}
-// Alternate styles
-//
+// scss-docs-start alert-modifiers
// Generate contextual modifier classes for colorizing the alert.
@each $color, $value in $theme-colors {
.alert-#{$color} {
- @include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level));
+ @include alert-variant(color-level($value, $alert-bg-level), color-level($value, $alert-border-level), color-level($value, $alert-color-level));
}
}
+// scss-docs-end alert-modifiers
diff --git a/assets/stylesheets/bootstrap/_badge.scss b/assets/stylesheets/bootstrap/_badge.scss
index 42c5d08..08df1b8 100644
--- a/assets/stylesheets/bootstrap/_badge.scss
+++ b/assets/stylesheets/bootstrap/_badge.scss
@@ -9,17 +9,12 @@
@include font-size($badge-font-size);
font-weight: $badge-font-weight;
line-height: 1;
+ color: $badge-color;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
@include border-radius($badge-border-radius);
- @include transition($badge-transition);
-
- @at-root a#{&} {
- @include hover-focus() {
- text-decoration: none;
- }
- }
+ @include gradient-bg();
// Empty badges collapse automatically
&:empty {
@@ -32,23 +27,3 @@
position: relative;
top: -1px;
}
-
-// Pill badges
-//
-// Make them extra rounded with a modifier to replace v3's badges.
-
-.badge-pill {
- padding-right: $badge-pill-padding-x;
- padding-left: $badge-pill-padding-x;
- @include border-radius($badge-pill-border-radius);
-}
-
-// Colors
-//
-// Contextual variations (linked badges get darker on :hover).
-
-@each $color, $value in $theme-colors {
- .badge-#{$color} {
- @include badge-variant($value);
- }
-}
diff --git a/assets/stylesheets/bootstrap/_breadcrumb.scss b/assets/stylesheets/bootstrap/_breadcrumb.scss
index a0cf7e2..db8e741 100644
--- a/assets/stylesheets/bootstrap/_breadcrumb.scss
+++ b/assets/stylesheets/bootstrap/_breadcrumb.scss
@@ -14,30 +14,16 @@
// The separator between breadcrumbs (by default, a forward-slash: "/")
+ .breadcrumb-item {
- padding-left: $breadcrumb-item-padding;
+ padding-left: $breadcrumb-item-padding-x;
&::before {
- display: inline-block; // Suppress underlining of the separator in modern browsers
- padding-right: $breadcrumb-item-padding;
+ display: inline-block; // Suppress underlining of the separator
+ padding-right: $breadcrumb-item-padding-x;
color: $breadcrumb-divider-color;
content: escape-svg($breadcrumb-divider);
}
}
- // IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
- // without `<ul>`s. The `::before` pseudo-element generates an element
- // *within* the .breadcrumb-item and thereby inherits the `text-decoration`.
- //
- // To trick IE into suppressing the underline, we give the pseudo-element an
- // underline and then immediately remove it.
- + .breadcrumb-item:hover::before {
- text-decoration: underline;
- }
- // stylelint-disable-next-line no-duplicate-selectors
- + .breadcrumb-item:hover::before {
- text-decoration: none;
- }
-
&.active {
color: $breadcrumb-active-color;
}
diff --git a/assets/stylesheets/bootstrap/_button-group.scss b/assets/stylesheets/bootstrap/_button-group.scss
index da02d79..b15c629 100644
--- a/assets/stylesheets/bootstrap/_button-group.scss
+++ b/assets/stylesheets/bootstrap/_button-group.scss
@@ -10,17 +10,17 @@
> .btn {
position: relative;
flex: 1 1 auto;
+ }
- // Bring the hover, focused, and "active" buttons to the front to overlay
- // the borders properly
- @include hover() {
- z-index: 1;
- }
- &:focus,
- &:active,
- &.active {
- z-index: 1;
- }
+ // Bring the hover, focused, and "active" buttons to the front to overlay
+ // the borders properly
+ > .btn-check:checked + .btn,
+ > .btn-check:focus + .btn,
+ > .btn:hover,
+ > .btn:focus,
+ > .btn:active,
+ > .btn.active {
+ z-index: 1;
}
}
@@ -48,7 +48,12 @@
@include border-right-radius(0);
}
- > .btn:not(:first-child),
+ // The left radius should be 0 if the button is:
+ // - the "third or more" child
+ // - the second child and the previous element isn't `.btn-check` (making it the first child visually)
+ // - part of a btn-group which isn't the first child
+ > .btn:nth-child(n + 3),
+ > :not(.btn-check) + .btn,
> .btn-group:not(:first-child) > .btn {
@include border-left-radius(0);
}
@@ -134,30 +139,3 @@
@include border-top-radius(0);
}
}
-
-
-// Checkbox and radio options
-//
-// In order to support the browser's form validation feedback, powered by the
-// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
-// `display: none;` or `visibility: hidden;` as that also hides the popover.
-// Simply visually hiding the inputs via `opacity` would leave them clickable in
-// certain cases which is prevented by using `clip` and `pointer-events`.
-// This way, we ensure a DOM element is visible to position the popover from.
-//
-// See https://github.com/twbs/bootstrap/pull/12794 and
-// https://github.com/twbs/bootstrap/pull/14559 for more information.
-
-.btn-group-toggle {
- > .btn,
- > .btn-group > .btn {
- margin-bottom: 0; // Override default `<label>` value
-
- input[type="radio"],
- input[type="checkbox"] {
- position: absolute;
- clip: rect(0, 0, 0, 0);
- pointer-events: none;
- }
- }
-}
diff --git a/assets/stylesheets/bootstrap/_buttons.scss b/assets/stylesheets/bootstrap/_buttons.scss
index 6ee24ba..e17d489 100644
--- a/assets/stylesheets/bootstrap/_buttons.scss
+++ b/assets/stylesheets/bootstrap/_buttons.scss
@@ -1,5 +1,3 @@
-// stylelint-disable selector-no-qualifying-type
-
//
// Base styles
//
@@ -8,53 +6,48 @@
display: inline-block;
font-family: $btn-font-family;
font-weight: $btn-font-weight;
+ line-height: $btn-line-height;
color: $body-color;
text-align: center;
text-decoration: if($link-decoration == none, null, none);
white-space: $btn-white-space;
vertical-align: middle;
+ cursor: if($enable-button-pointers, pointer, null);
user-select: none;
background-color: transparent;
border: $btn-border-width solid transparent;
- @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
+ @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-border-radius);
@include transition($btn-transition);
- @include hover() {
+ &:hover {
color: $body-color;
- text-decoration: none;
+ text-decoration: if($link-hover-decoration == underline, none, null);
}
- &:focus,
- &.focus {
+ .btn-check:focus + &,
+ &:focus {
outline: 0;
box-shadow: $btn-focus-box-shadow;
}
- // Disabled comes first so active can properly restyle
- &.disabled,
- &:disabled {
- opacity: $btn-disabled-opacity;
- @include box-shadow(none);
- }
+ .btn-check:checked + &,
+ .btn-check:active + &,
+ &:active,
+ &.active {
+ @include box-shadow($btn-active-box-shadow);
- &:not(:disabled):not(.disabled) {
- cursor: if($enable-pointer-cursor-for-buttons, pointer, null);
-
- &:active,
- &.active {
- @include box-shadow($btn-active-box-shadow);
-
- &:focus {
- @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
- }
+ &:focus {
+ @include box-shadow($btn-focus-box-shadow, $btn-active-box-shadow);
}
}
-}
-// Future-proof disabling of clicks on `<a>` elements
-a.btn.disabled,
-fieldset:disabled a.btn {
- pointer-events: none;
+ &:disabled,
+ &.disabled,
+ fieldset:disabled & {
+ pointer-events: none;
+ opacity: $btn-disabled-opacity;
+ @include box-shadow(none);
+ }
}
@@ -82,23 +75,21 @@ fieldset:disabled a.btn {
// Make a button look and behave like a link
.btn-link {
font-weight: $font-weight-normal;
- color: $link-color;
+ color: $btn-link-color;
text-decoration: $link-decoration;
- @include hover() {
- color: $link-hover-color;
+ &:hover {
+ color: $btn-link-hover-color;
text-decoration: $link-hover-decoration;
}
- &:focus,
- &.focus {
+ &:focus {
text-decoration: $link-hover-decoration;
}
&:disabled,
&.disabled {
color: $btn-link-disabled-color;
- pointer-events: none;
}
// No need for an active state here
@@ -110,11 +101,11 @@ fieldset:disabled a.btn {
//
.btn-lg {
- @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
+ @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-border-radius-lg);
}
.btn-sm {
- @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
+ @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm);
}
@@ -131,12 +122,3 @@ fieldset:disabled a.btn {
margin-top: $btn-block-spacing-y;
}
}
-
-// Specificity overrides
-input[type="submit"],
-input[type="reset"],
-input[type="button"] {
- &.btn-block {
- width: 100%;
- }
-}
diff --git a/assets/stylesheets/bootstrap/_card.scss b/assets/stylesheets/bootstrap/_card.scss
index 7c35f7e..697fe51 100644
--- a/assets/stylesheets/bootstrap/_card.scss
+++ b/assets/stylesheets/bootstrap/_card.scss
@@ -46,19 +46,16 @@
// Enable `flex-grow: 1` for decks and groups so that card blocks take up
// as much space as possible, ensuring footers are aligned to the bottom.
flex: 1 1 auto;
- // Workaround for the image size bug in IE
- // See: https://github.com/twbs/bootstrap/pull/28855
- min-height: 1px;
- padding: $card-spacer-x;
+ padding: $card-spacer-y $card-spacer-x;
color: $card-color;
}
.card-title {
- margin-bottom: $card-spacer-y;
+ margin-bottom: $card-title-spacer-y;
}
.card-subtitle {
- margin-top: -$card-spacer-y / 2;
+ margin-top: -$card-title-spacer-y / 2;
margin-bottom: 0;
}
@@ -67,7 +64,7 @@
}
.card-link {
- @include hover() {
+ &:hover {
text-decoration: none;
}
@@ -81,7 +78,7 @@
//
.card-header {
- padding: $card-spacer-y $card-spacer-x;
+ padding: $card-cap-padding-y $card-cap-padding-x;
margin-bottom: 0; // Removes the default margin-bottom of <hN>
color: $card-cap-color;
background-color: $card-cap-bg;
@@ -93,7 +90,7 @@
}
.card-footer {
- padding: $card-spacer-y $card-spacer-x;
+ padding: $card-cap-padding-y $card-cap-padding-x;
color: $card-cap-color;
background-color: $card-cap-bg;
border-top: $card-border-width solid $card-border-color;
@@ -109,15 +106,22 @@
//
.card-header-tabs {
- margin-right: -$card-spacer-x / 2;
- margin-bottom: -$card-spacer-y;
- margin-left: -$card-spacer-x / 2;
+ margin-right: -$card-cap-padding-x / 2;
+ margin-bottom: -$card-cap-padding-y;
+ margin-left: -$card-cap-padding-x / 2;
border-bottom: 0;
+
+ @if $nav-tabs-link-active-bg != $card-bg {
+ .nav-link.active {
+ background-color: $card-bg;
+ border-bottom-color: $card-bg;
+ }
+ }
}
.card-header-pills {
- margin-right: -$card-spacer-x / 2;
- margin-left: -$card-spacer-x / 2;
+ margin-right: -$card-cap-padding-x / 2;
+ margin-left: -$card-cap-padding-x / 2;
}
// Card image
@@ -134,7 +138,6 @@
.card-img,
.card-img-top,
.card-img-bottom {
- flex-shrink: 0; // For IE: https://github.com/twbs/bootstrap/issues/29396
width: 100%; // Required because we use flexbox and this inherently applies align-self: stretch
}
@@ -149,30 +152,6 @@
}
-// Card deck
-
-.card-deck {
- .card {
- margin-bottom: $card-deck-margin;
- }
-
- @include media-breakpoint-up(sm) {
- display: flex;
- flex-flow: row wrap;
- margin-right: -$card-deck-margin;
- margin-left: -$card-deck-margin;
-
- .card {
- // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
- flex: 1 0 0%;
- margin-right: $card-deck-margin;
- margin-bottom: 0; // Override the default
- margin-left: $card-deck-margin;
- }
- }
-}
-
-
//
// Card groups
//
@@ -237,35 +216,10 @@
//
-// Columns
-//
-
-.card-columns {
- .card {
- margin-bottom: $card-columns-margin;
- }
-
- @include media-breakpoint-up(sm) {
- column-count: $card-columns-count;
- column-gap: $card-columns-gap;
- orphans: 1;
- widows: 1;
-
- .card {
- display: inline-block; // Don't let them vertically span multiple columns
- width: 100%; // Don't let their width change
- }
- }
-}
-
-
-//
// Accordion
//
.accordion {
- overflow-anchor: none;
-
> .card {
overflow: hidden;
diff --git a/assets/stylesheets/bootstrap/_carousel.scss b/assets/stylesheets/bootstrap/_carousel.scss
index fb5e9f8..84ffd6c 100644
--- a/assets/stylesheets/bootstrap/_carousel.scss
+++ b/assets/stylesheets/bootstrap/_carousel.scss
@@ -101,7 +101,8 @@
@include transition($carousel-control-transition);
// Hover/focus state
- @include hover-focus() {
+ &:hover,
+ &:focus {
color: $carousel-control-color;
text-decoration: none;
outline: 0;
@@ -110,15 +111,11 @@
}
.carousel-control-prev {
left: 0;
- @if $enable-gradients {
- background-image: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
- }
+ background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null);
}
.carousel-control-next {
right: 0;
- @if $enable-gradients {
- background-image: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
- }
+ background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null);
}
// Icons for within
@@ -127,7 +124,9 @@
display: inline-block;
width: $carousel-control-icon-width;
height: $carousel-control-icon-width;
- background: no-repeat 50% / 100% 100%;
+ background-repeat: no-repeat;
+ background-position: 50%;
+ background-size: 100% 100%;
}
.carousel-control-prev-icon {
background-image: escape-svg($carousel-control-prev-icon-bg);
@@ -147,7 +146,7 @@
right: 0;
bottom: 0;
left: 0;
- z-index: 15;
+ z-index: 2;
display: flex;
justify-content: center;
padding-left: 0; // override <ol> default
@@ -170,12 +169,12 @@
// Use transparent borders to increase the hit area by 10px on top and bottom.
border-top: $carousel-indicator-hit-area-height solid transparent;
border-bottom: $carousel-indicator-hit-area-height solid transparent;
- opacity: .5;
+ opacity: $carousel-indicator-opacity;
@include transition($carousel-indicator-transition);
}
.active {
- opacity: 1;
+ opacity: $carousel-indicator-active-opacity;
}
}
@@ -187,11 +186,10 @@
.carousel-caption {
position: absolute;
right: (100% - $carousel-caption-width) / 2;
- bottom: 20px;
+ bottom: $carousel-caption-spacer;
left: (100% - $carousel-caption-width) / 2;
- z-index: 10;
- padding-top: 20px;
- padding-bottom: 20px;
+ padding-top: $carousel-caption-padding-y;
+ padding-bottom: $carousel-caption-padding-y;
color: $carousel-caption-color;
text-align: center;
}
diff --git a/assets/stylesheets/bootstrap/_close.scss b/assets/stylesheets/bootstrap/_close.scss
index 82e9593..dd6541e 100644
--- a/assets/stylesheets/bootstrap/_close.scss
+++ b/assets/stylesheets/bootstrap/_close.scss
@@ -1,5 +1,4 @@
.close {
- float: right;
@include font-size($close-font-size);
font-weight: $close-font-weight;
line-height: 1;
@@ -8,15 +7,19 @@
opacity: .5;
// Override <a>'s hover style
- @include hover() {
+ &:hover {
color: $close-color;
text-decoration: none;
}
- &:not(:disabled):not(.disabled) {
- @include hover-focus() {
- opacity: .75;
- }
+ &:hover,
+ &:focus {
+ opacity: .75;
+ }
+
+ &:disabled,
+ &.disabled {
+ pointer-events: none;
}
}
@@ -31,10 +34,3 @@ button.close {
background-color: transparent;
border: 0;
}
-
-// Future-proof disabling of clicks on `<a>` elements
-
-// stylelint-disable-next-line selector-no-qualifying-type
-a.close.disabled {
- pointer-events: none;
-}
diff --git a/assets/stylesheets/bootstrap/_code.scss b/assets/stylesheets/bootstrap/_code.scss
deleted file mode 100644
index 4bc117a..0000000
--- a/assets/stylesheets/bootstrap/_code.scss
+++ /dev/null
@@ -1,48 +0,0 @@
-// Inline code
-code {
- @include font-size($code-font-size);
- color: $code-color;
- word-wrap: break-word;
-
- // Streamline the style when inside anchors to avoid broken underline and more
- a > & {
- color: inherit;
- }
-}
-
-// User input typically entered via keyboard
-kbd {
- padding: $kbd-padding-y $kbd-padding-x;
- @include font-size($kbd-font-size);
- color: $kbd-color;
- background-color: $kbd-bg;
- @include border-radius($border-radius-sm);
- @include box-shadow($kbd-box-shadow);
-
- kbd {
- padding: 0;
- @include font-size(100%);
- font-weight: $nested-kbd-font-weight;
- @include box-shadow(none);
- }
-}
-
-// Blocks of code
-pre {
- display: block;
- @include font-size($code-font-size);
- color: $pre-color;
-
- // Account for some code outputs that place code tags in pre tags
- code {
- @include font-size(inherit);
- color: inherit;
- word-break: normal;
- }
-}
-
-// Enable scrollable blocks of code
-.pre-scrollable {
- max-height: $pre-scrollable-max-height;
- overflow-y: scroll;
-}
diff --git a/assets/stylesheets/bootstrap/_containers.scss b/assets/stylesheets/bootstrap/_containers.scss
new file mode 100644
index 0000000..f88f1e5
--- /dev/null
+++ b/assets/stylesheets/bootstrap/_containers.scss
@@ -0,0 +1,41 @@
+// Container widths
+//
+// Set the container width, and override it for fixed navbars in media queries.
+
+@if $enable-grid-classes {
+ // Single container class with breakpoint max-widths
+ .container,
+ // 100% wide container at all breakpoints
+ .container-fluid {
+ @include make-container();
+ }
+
+ // Responsive containers that are 100% wide until a breakpoint
+ @each $breakpoint, $container-max-width in $container-max-widths {
+ .container-#{$breakpoint} {
+ @extend .container-fluid;
+ }
+
+ @include media-breakpoint-up($breakpoint, $grid-breakpoints) {
+ %responsive-container-#{$breakpoint} {
+ max-width: $container-max-width;
+ }
+
+ // Extend each breakpoint which is smaller or equal to the current breakpoint
+ $extend-breakpoint: true;
+
+ @each $name, $width in $grid-breakpoints {
+ @if ($extend-breakpoint) {
+ .container#{breakpoint-infix($name, $grid-breakpoints)} {
+ @extend %responsive-container-#{$breakpoint};
+ }
+
+ // Once the current breakpoint is reached, stop extending
+ @if ($breakpoint == $name) {
+ $extend-breakpoint: false;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/assets/stylesheets/bootstrap/_custom-forms.scss b/assets/stylesheets/bootstrap/_custom-forms.scss
deleted file mode 100644
index 9aeeeda..0000000
--- a/assets/stylesheets/bootstrap/_custom-forms.scss
+++ /dev/null
@@ -1,523 +0,0 @@
-// Embedded icons from Open Iconic.
-// Released under MIT and copyright 2014 Waybury.
-// https://useiconic.com/open
-
-
-// Checkboxes and radios
-//
-// Base class takes care of all the key behavioral aspects.
-
-.custom-control {
- position: relative;
- z-index: 1;
- display: block;
- min-height: $font-size-base * $line-height-base;
- padding-left: $custom-control-gutter + $custom-control-indicator-size;
-}
-
-.custom-control-inline {
- display: inline-flex;
- margin-right: $custom-control-spacer-x;
-}
-
-.custom-control-input {
- position: absolute;
- left: 0;
- z-index: -1; // Put the input behind the label so it doesn't overlay text
- width: $custom-control-indicator-size;
- height: ($font-size-base * $line-height-base + $custom-control-indicator-size) / 2;
- opacity: 0;
-
- &:checked ~ .custom-control-label::before {
- color: $custom-control-indicator-checked-color;
- border-color: $custom-control-indicator-checked-border-color;
- @include gradient-bg($custom-control-indicator-checked-bg);
- @include box-shadow($custom-control-indicator-checked-box-shadow);
- }
-
- &:focus ~ .custom-control-label::before {
- // the mixin is not used here to make sure there is feedback
- @if $enable-shadows {
- box-shadow: $input-box-shadow, $input-focus-box-shadow;
- } @else {
- box-shadow: $custom-control-indicator-focus-box-shadow;
- }
- }
-
- &:focus:not(:checked) ~ .custom-control-label::before {
- border-color: $custom-control-indicator-focus-border-color;
- }
-
- &:not(:disabled):active ~ .custom-control-label::before {
- color: $custom-control-indicator-active-color;
- background-color: $custom-control-indicator-active-bg;
- border-color: $custom-control-indicator-active-border-color;
- @include box-shadow($custom-control-indicator-active-box-shadow);
- }
-
- // Use [disabled] and :disabled to work around https://github.com/twbs/bootstrap/issues/28247
- &[disabled],
- &:disabled {
- ~ .custom-control-label {
- color: $custom-control-label-disabled-color;
-
- &::before {
- background-color: $custom-control-indicator-disabled-bg;
- }
- }
- }
-}
-
-// Custom control indicators
-//
-// Build the custom controls out of pseudo-elements.
-
-.custom-control-label {
- position: relative;
- margin-bottom: 0;
- color: $custom-control-label-color;
- vertical-align: top;
- cursor: $custom-control-cursor;
-
- // Background-color and (when enabled) gradient
- &::before {
- position: absolute;
- top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
- left: -($custom-control-gutter + $custom-control-indicator-size);
- display: block;
- width: $custom-control-indicator-size;
- height: $custom-control-indicator-size;
- pointer-events: none;
- content: "";
- background-color: $custom-control-indicator-bg;
- border: $custom-control-indicator-border-color solid $custom-control-indicator-border-width;
- @include box-shadow($custom-control-indicator-box-shadow);
- }
-
- // Foreground (icon)
- &::after {
- position: absolute;
- top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
- left: -($custom-control-gutter + $custom-control-indicator-size);
- display: block;
- width: $custom-control-indicator-size;
- height: $custom-control-indicator-size;
- content: "";
- background: no-repeat 50% / #{$custom-control-indicator-bg-size};
- }
-}
-
-
-// Checkboxes
-//
-// Tweak just a few things for checkboxes.
-
-.custom-checkbox {
- .custom-control-label::before {
- @include border-radius($custom-checkbox-indicator-border-radius);
- }
-
- .custom-control-input:checked ~ .custom-control-label {
- &::after {
- background-image: escape-svg($custom-checkbox-indicator-icon-checked);
- }
- }
-
- .custom-control-input:indeterminate ~ .custom-control-label {
- &::before {
- border-color: $custom-checkbox-indicator-indeterminate-border-color;
- @include gradient-bg($custom-checkbox-indicator-indeterminate-bg);
- @include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow);
- }
- &::after {
- background-image: escape-svg($custom-checkbox-indicator-icon-indeterminate);
- }
- }
-
- .custom-control-input:disabled {
- &:checked ~ .custom-control-label::before {
- @include gradient-bg($custom-control-indicator-checked-disabled-bg);
- }
- &:indeterminate ~ .custom-control-label::before {
- @include gradient-bg($custom-control-indicator-checked-disabled-bg);
- }
- }
-}
-
-// Radios
-//
-// Tweak just a few things for radios.
-
-.custom-radio {
- .custom-control-label::before {
- // stylelint-disable-next-line property-blacklist
- border-radius: $custom-radio-indicator-border-radius;
- }
-
- .custom-control-input:checked ~ .custom-control-label {
- &::after {
- background-image: escape-svg($custom-radio-indicator-icon-checked);
- }
- }
-
- .custom-control-input:disabled {
- &:checked ~ .custom-control-label::before {
- @include gradient-bg($custom-control-indicator-checked-disabled-bg);
- }
- }
-}
-
-
-// switches
-//
-// Tweak a few things for switches
-
-.custom-switch {
- padding-left: $custom-switch-width + $custom-control-gutter;
-
- .custom-control-label {
- &::before {
- left: -($custom-switch-width + $custom-control-gutter);
- width: $custom-switch-width;
- pointer-events: all;
- // stylelint-disable-next-line property-blacklist
- border-radius: $custom-switch-indicator-border-radius;
- }
-
- &::after {
- top: add(($font-size-base * $line-height-base - $custom-control-indicator-size) / 2, $custom-control-indicator-border-width * 2);
- left: add(-($custom-switch-width + $custom-control-gutter), $custom-control-indicator-border-width * 2);
- width: $custom-switch-indicator-size;
- height: $custom-switch-indicator-size;
- background-color: $custom-control-indicator-border-color;
- // stylelint-disable-next-line property-blacklist
- border-radius: $custom-switch-indicator-border-radius;
- @include transition(transform .15s ease-in-out, $custom-forms-transition);
- }
- }
-
- .custom-control-input:checked ~ .custom-control-label {
- &::after {
- background-color: $custom-control-indicator-bg;
- transform: translateX($custom-switch-width - $custom-control-indicator-size);
- }
- }
-
- .custom-control-input:disabled {
- &:checked ~ .custom-control-label::before {
- @include gradient-bg($custom-control-indicator-checked-disabled-bg);
- }
- }
-}
-
-
-// Select
-//
-// Replaces the browser default select with a custom one, mostly pulled from
-// https://primer.github.io/.
-//
-
-.custom-select {
- display: inline-block;
- width: 100%;
- height: $custom-select-height;
- padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
- font-family: $custom-select-font-family;
- @include font-size($custom-select-font-size);
- font-weight: $custom-select-font-weight;
- line-height: $custom-select-line-height;
- color: $custom-select-color;
- vertical-align: middle;
- background: $custom-select-bg $custom-select-background;
- border: $custom-select-border-width solid $custom-select-border-color;
- @include border-radius($custom-select-border-radius, 0);
- @include box-shadow($custom-select-box-shadow);
- appearance: none;
-
- &:focus {
- border-color: $custom-select-focus-border-color;
- outline: 0;
- @if $enable-shadows {
- @include box-shadow($custom-select-box-shadow, $custom-select-focus-box-shadow);
- } @else {
- // Avoid using mixin so we can pass custom focus shadow properly
- box-shadow: $custom-select-focus-box-shadow;
- }
-
- &::-ms-value {
- // For visual consistency with other platforms/browsers,
- // suppress the default white text on blue background highlight given to
- // the selected option text when the (still closed) <select> receives focus
- // in IE and (under certain conditions) Edge.
- // See https://github.com/twbs/bootstrap/issues/19398.
- color: $input-color;
- background-color: $input-bg;
- }
- }
-
- &[multiple],
- &[size]:not([size="1"]) {
- height: auto;
- padding-right: $custom-select-padding-x;
- background-image: none;
- }
-
- &:disabled {
- color: $custom-select-disabled-color;
- background-color: $custom-select-disabled-bg;
- }
-
- // Hides the default caret in IE11
- &::-ms-expand {
- display: none;
- }
-
- // Remove outline from select box in FF
- &:-moz-focusring {
- color: transparent;
- text-shadow: 0 0 0 $custom-select-color;
- }
-}
-
-.custom-select-sm {
- height: $custom-select-height-sm;
- padding-top: $custom-select-padding-y-sm;
- padding-bottom: $custom-select-padding-y-sm;
- padding-left: $custom-select-padding-x-sm;
- @include font-size($custom-select-font-size-sm);
-}
-
-.custom-select-lg {
- height: $custom-select-height-lg;
- padding-top: $custom-select-padding-y-lg;
- padding-bottom: $custom-select-padding-y-lg;
- padding-left: $custom-select-padding-x-lg;
- @include font-size($custom-select-font-size-lg);
-}
-
-
-// File
-//
-// Custom file input.
-
-.custom-file {
- position: relative;
- display: inline-block;
- width: 100%;
- height: $custom-file-height;
- margin-bottom: 0;
-}
-
-.custom-file-input {
- position: relative;
- z-index: 2;
- width: 100%;
- height: $custom-file-height;
- margin: 0;
- opacity: 0;
-
- &:focus ~ .custom-file-label {
- border-color: $custom-file-focus-border-color;
- box-shadow: $custom-file-focus-box-shadow;
- }
-
- // Use [disabled] and :disabled to work around https://github.com/twbs/bootstrap/issues/28247
- &[disabled] ~ .custom-file-label,
- &:disabled ~ .custom-file-label {
- background-color: $custom-file-disabled-bg;
- }
-
- @each $lang, $value in $custom-file-text {
- &:lang(#{$lang}) ~ .custom-file-label::after {
- content: $value;
- }
- }
-
- ~ .custom-file-label[data-browse]::after {
- content: attr(data-browse);
- }
-}
-
-.custom-file-label {
- position: absolute;
- top: 0;
- right: 0;
- left: 0;
- z-index: 1;
- height: $custom-file-height;
- padding: $custom-file-padding-y $custom-file-padding-x;
- font-family: $custom-file-font-family;
- font-weight: $custom-file-font-weight;
- line-height: $custom-file-line-height;
- color: $custom-file-color;
- background-color: $custom-file-bg;
- border: $custom-file-border-width solid $custom-file-border-color;
- @include border-radius($custom-file-border-radius);
- @include box-shadow($custom-file-box-shadow);
-
- &::after {
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- z-index: 3;
- display: block;
- height: $custom-file-height-inner;
- padding: $custom-file-padding-y $custom-file-padding-x;
- line-height: $custom-file-line-height;
- color: $custom-file-button-color;
- content: "Browse";
- @include gradient-bg($custom-file-button-bg);
- border-left: inherit;
- @include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
- }
-}
-
-// Range
-//
-// Style range inputs the same across browsers. Vendor-specific rules for pseudo
-// elements cannot be mixed. As such, there are no shared styles for focus or
-// active states on prefixed selectors.
-
-.custom-range {
- width: 100%;
- height: add($custom-range-thumb-height, $custom-range-thumb-focus-box-shadow-width * 2);
- padding: 0; // Need to reset padding
- background-color: transparent;
- appearance: none;
-
- &:focus {
- outline: none;
-
- // Pseudo-elements must be split across multiple rulesets to have an effect.
- // No box-shadow() mixin for focus accessibility.
- &::-webkit-slider-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
- &::-moz-range-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
- &::-ms-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
- }
-
- &::-moz-focus-outer {
- border: 0;
- }
-
- &::-webkit-slider-thumb {
- width: $custom-range-thumb-width;
- height: $custom-range-thumb-height;
- margin-top: ($custom-range-track-height - $custom-range-thumb-height) / 2; // Webkit specific
- @include gradient-bg($custom-range-thumb-bg);
- border: $custom-range-thumb-border;
- @include border-radius($custom-range-thumb-border-radius);
- @include box-shadow($custom-range-thumb-box-shadow);
- @include transition($custom-forms-transition);
- appearance: none;
-
- &:active {
- @include gradient-bg($custom-range-thumb-active-bg);
- }
- }
-
- &::-webkit-slider-runnable-track {
- width: $custom-range-track-width;
- height: $custom-range-track-height;
- color: transparent; // Why?
- cursor: $custom-range-track-cursor;
- background-color: $custom-range-track-bg;
- border-color: transparent;
- @include border-radius($custom-range-track-border-radius);
- @include box-shadow($custom-range-track-box-shadow);
- }
-
- &::-moz-range-thumb {
- width: $custom-range-thumb-width;
- height: $custom-range-thumb-height;
- @include gradient-bg($custom-range-thumb-bg);
- border: $custom-range-thumb-border;
- @include border-radius($custom-range-thumb-border-radius);
- @include box-shadow($custom-range-thumb-box-shadow);
- @include transition($custom-forms-transition);
- appearance: none;
-
- &:active {
- @include gradient-bg($custom-range-thumb-active-bg);
- }
- }
-
- &::-moz-range-track {
- width: $custom-range-track-width;
- height: $custom-range-track-height;
- color: transparent;
- cursor: $custom-range-track-cursor;
- background-color: $custom-range-track-bg;
- border-color: transparent; // Firefox specific?
- @include border-radius($custom-range-track-border-radius);
- @include box-shadow($custom-range-track-box-shadow);
- }
-
- &::-ms-thumb {
- width: $custom-range-thumb-width;
- height: $custom-range-thumb-height;
- margin-top: 0; // Edge specific
- margin-right: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
- margin-left: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
- @include gradient-bg($custom-range-thumb-bg);
- border: $custom-range-thumb-border;
- @include border-radius($custom-range-thumb-border-radius);
- @include box-shadow($custom-range-thumb-box-shadow);
- @include transition($custom-forms-transition);
- appearance: none;
-
- &:active {
- @include gradient-bg($custom-range-thumb-active-bg);
- }
- }
-
- &::-ms-track {
- width: $custom-range-track-width;
- height: $custom-range-track-height;
- color: transparent;
- cursor: $custom-range-track-cursor;
- background-color: transparent;
- border-color: transparent;
- border-width: $custom-range-thumb-height / 2;
- @include box-shadow($custom-range-track-box-shadow);
- }
-
- &::-ms-fill-lower {
- background-color: $custom-range-track-bg;
- @include border-radius($custom-range-track-border-radius);
- }
-
- &::-ms-fill-upper {
- margin-right: 15px; // arbitrary?
- background-color: $custom-range-track-bg;
- @include border-radius($custom-range-track-border-radius);
- }
-
- &:disabled {
- &::-webkit-slider-thumb {
- background-color: $custom-range-thumb-disabled-bg;
- }
-
- &::-webkit-slider-runnable-track {
- cursor: default;
- }
-
- &::-moz-range-thumb {
- background-color: $custom-range-thumb-disabled-bg;
- }
-
- &::-moz-range-track {
- cursor: default;
- }
-
- &::-ms-thumb {
- background-color: $custom-range-thumb-disabled-bg;
- }
- }
-}
-
-.custom-control-label::before,
-.custom-file-label,
-.custom-select {
- @include transition($custom-forms-transition);
-}
diff --git a/assets/stylesheets/bootstrap/_dropdown.scss b/assets/stylesheets/bootstrap/_dropdown.scss
index 2ab7536..b30f2ba 100644
--- a/assets/stylesheets/bootstrap/_dropdown.scss
+++ b/assets/stylesheets/bootstrap/_dropdown.scss
@@ -20,7 +20,6 @@
left: 0;
z-index: $zindex-dropdown;
display: none; // none by default, but block on "open" of the menu
- float: left;
min-width: $dropdown-min-width;
padding: $dropdown-padding-y 0;
margin: $dropdown-spacer 0 0; // override default ul
@@ -35,6 +34,7 @@
@include box-shadow($dropdown-box-shadow);
}
+// scss-docs-start responsive-breakpoints
@each $breakpoint in map-keys($grid-breakpoints) {
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@@ -50,6 +50,7 @@
}
}
}
+// scss-docs-end responsive-breakpoints
// Allow for dropdowns to go bottom up (aka, dropup-menu)
// Just add .dropup after the standard .dropdown class and you're set.
@@ -114,7 +115,10 @@
// Dividers (basically an `<hr>`) within the dropdown
.dropdown-divider {
- @include nav-divider($dropdown-divider-bg, $dropdown-divider-margin-y, true);
+ height: 0;
+ margin: $dropdown-divider-margin-y 0;
+ overflow: hidden;
+ border-top: 1px solid $dropdown-divider-bg;
}
// Links, buttons, and more within the dropdown menu
@@ -145,9 +149,10 @@
}
}
- @include hover-focus() {
+ &:hover,
+ &:focus {
color: $dropdown-link-hover-color;
- text-decoration: none;
+ text-decoration: if($link-hover-decoration == underline, none, null);
@include gradient-bg($dropdown-link-hover-bg);
}
@@ -164,9 +169,7 @@
pointer-events: none;
background-color: transparent;
// Remove CSS gradients if they're enabled
- @if $enable-gradients {
- background-image: none;
- }
+ background-image: if($enable-gradients, none, null);
}
}
diff --git a/assets/stylesheets/bootstrap/_forms.scss b/assets/stylesheets/bootstrap/_forms.scss
index 66a4efe..39ba90d 100644
--- a/assets/stylesheets/bootstrap/_forms.scss
+++ b/assets/stylesheets/bootstrap/_forms.scss
@@ -1,347 +1,9 @@
-// stylelint-disable selector-no-qualifying-type
-
-//
-// Textual form controls
-//
-
-.form-control {
- display: block;
- width: 100%;
- height: $input-height;
- padding: $input-padding-y $input-padding-x;
- font-family: $input-font-family;
- @include font-size($input-font-size);
- font-weight: $input-font-weight;
- line-height: $input-line-height;
- color: $input-color;
- background-color: $input-bg;
- background-clip: padding-box;
- border: $input-border-width solid $input-border-color;
-
- // Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
- @include border-radius($input-border-radius, 0);
-
- @include box-shadow($input-box-shadow);
- @include transition($input-transition);
-
- // Unstyle the caret on `<select>`s in IE10+.
- &::-ms-expand {
- background-color: transparent;
- border: 0;
- }
-
- // Remove select outline from select box in FF
- &:-moz-focusring {
- color: transparent;
- text-shadow: 0 0 0 $input-color;
- }
-
- // Customize the `:focus` state to imitate native WebKit styles.
- @include form-control-focus($ignore-warning: true);
-
- // Placeholder
- &::placeholder {
- color: $input-placeholder-color;
- // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
- opacity: 1;
- }
-
- // Disabled and read-only inputs
- //
- // HTML5 says that controls under a fieldset > legend:first-child won't be
- // disabled if the fieldset is disabled. Due to implementation difficulty, we
- // don't honor that edge case; we style them as disabled anyway.
- &:disabled,
- &[readonly] {
- background-color: $input-disabled-bg;
- // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
- opacity: 1;
- }
-}
-
-input[type="date"],
-input[type="time"],
-input[type="datetime-local"],
-input[type="month"] {
- &.form-control {
- appearance: none; // Fix appearance for date inputs in Safari
- }
-}
-
-select.form-control {
- &:focus::-ms-value {
- // Suppress the nested default white text on blue background highlight given to
- // the selected option text when the (still closed) <select> receives focus
- // in IE and (under certain conditions) Edge, as it looks bad and cannot be made to
- // match the appearance of the native widget.
- // See https://github.com/twbs/bootstrap/issues/19398.
- color: $input-color;
- background-color: $input-bg;
- }
-}
-
-// Make file inputs better match text inputs by forcing them to new lines.
-.form-control-file,
-.form-control-range {
- display: block;
- width: 100%;
-}
-
-
-//
-// Labels
-//
-
-// For use with horizontal and inline forms, when you need the label (or legend)
-// text to align with the form controls.
-.col-form-label {
- padding-top: add($input-padding-y, $input-border-width);
- padding-bottom: add($input-padding-y, $input-border-width);
- margin-bottom: 0; // Override the `<label>/<legend>` default
- @include font-size(inherit); // Override the `<legend>` default
- line-height: $input-line-height;
-}
-
-.col-form-label-lg {
- padding-top: add($input-padding-y-lg, $input-border-width);
- padding-bottom: add($input-padding-y-lg, $input-border-width);
- @include font-size($input-font-size-lg);
- line-height: $input-line-height-lg;
-}
-
-.col-form-label-sm {
- padding-top: add($input-padding-y-sm, $input-border-width);
- padding-bottom: add($input-padding-y-sm, $input-border-width);
- @include font-size($input-font-size-sm);
- line-height: $input-line-height-sm;
-}
-
-
-// Readonly controls as plain text
-//
-// Apply class to a readonly input to make it appear like regular plain
-// text (without any border, background color, focus indicator)
-
-.form-control-plaintext {
- display: block;
- width: 100%;
- padding: $input-padding-y 0;
- margin-bottom: 0; // match inputs if this class comes on inputs with default margins
- @include font-size($input-font-size);
- line-height: $input-line-height;
- color: $input-plaintext-color;
- background-color: transparent;
- border: solid transparent;
- border-width: $input-border-width 0;
-
- &.form-control-sm,
- &.form-control-lg {
- padding-right: 0;
- padding-left: 0;
- }
-}
-
-
-// Form control sizing
-//
-// Build on `.form-control` with modifier classes to decrease or increase the
-// height and font-size of form controls.
-//
-// Repeated in `_input_group.scss` to avoid Sass extend issues.
-
-.form-control-sm {
- height: $input-height-sm;
- padding: $input-padding-y-sm $input-padding-x-sm;
- @include font-size($input-font-size-sm);
- line-height: $input-line-height-sm;
- @include border-radius($input-border-radius-sm);
-}
-
-.form-control-lg {
- height: $input-height-lg;
- padding: $input-padding-y-lg $input-padding-x-lg;
- @include font-size($input-font-size-lg);
- line-height: $input-line-height-lg;
- @include border-radius($input-border-radius-lg);
-}
-
-// stylelint-disable-next-line no-duplicate-selectors
-select.form-control {
- &[size],
- &[multiple] {
- height: auto;
- }
-}
-
-textarea.form-control {
- height: auto;
-}
-
-// Form groups
-//
-// Designed to help with the organization and spacing of vertical forms. For
-// horizontal forms, use the predefined grid classes.
-
-.form-group {
- margin-bottom: $form-group-margin-bottom;
-}
-
-.form-text {
- display: block;
- margin-top: $form-text-margin-top;
-}
-
-
-// Form grid
-//
-// Special replacement for our grid system's `.row` for tighter form layouts.
-
-.form-row {
- display: flex;
- flex-wrap: wrap;
- margin-right: -$form-grid-gutter-width / 2;
- margin-left: -$form-grid-gutter-width / 2;
-
- > .col,
- > [class*="col-"] {
- padding-right: $form-grid-gutter-width / 2;
- padding-left: $form-grid-gutter-width / 2;
- }
-}
-
-
-// Checkboxes and radios
-//
-// Indent the labels to position radios/checkboxes as hanging controls.
-
-.form-check {
- position: relative;
- display: block;
- padding-left: $form-check-input-gutter;
-}
-
-.form-check-input {
- position: absolute;
- margin-top: $form-check-input-margin-y;
- margin-left: -$form-check-input-gutter;
-
- // Use [disabled] and :disabled for workaround https://github.com/twbs/bootstrap/issues/28247
- &[disabled] ~ .form-check-label,
- &:disabled ~ .form-check-label {
- color: $text-muted;
- }
-}
-
-.form-check-label {
- margin-bottom: 0; // Override default `<label>` bottom margin
-}
-
-.form-check-inline {
- display: inline-flex;
- align-items: center;
- padding-left: 0; // Override base .form-check
- margin-right: $form-check-inline-margin-x;
-
- // Undo .form-check-input defaults and add some `margin-right`.
- .form-check-input {
- position: static;
- margin-top: 0;
- margin-right: $form-check-inline-input-margin-x;
- margin-left: 0;
- }
-}
-
-
-// Form validation
-//
-// Provide feedback to users when form field values are valid or invalid. Works
-// primarily for client-side validation via scoped `:invalid` and `:valid`
-// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
-// server side validation.
-
-@each $state, $data in $form-validation-states {
- @include form-validation-state($state, map-get($data, color), map-get($data, icon));
-}
-
-// Inline forms
-//
-// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
-// forms begin stacked on extra small (mobile) devices and then go inline when
-// viewports reach <768px.
-//
-// Requires wrapping inputs and labels with `.form-group` for proper display of
-// default HTML form controls and our custom form controls (e.g., input groups).
-
-.form-inline {
- display: flex;
- flex-flow: row wrap;
- align-items: center; // Prevent shorter elements from growing to same height as others (e.g., small buttons growing to normal sized button height)
-
- // Because we use flex, the initial sizing of checkboxes is collapsed and
- // doesn't occupy the full-width (which is what we want for xs grid tier),
- // so we force that here.
- .form-check {
- width: 100%;
- }
-
- // Kick in the inline
- @include media-breakpoint-up(sm) {
- label {
- display: flex;
- align-items: center;
- justify-content: center;
- margin-bottom: 0;
- }
-
- // Inline-block all the things for "inline"
- .form-group {
- display: flex;
- flex: 0 0 auto;
- flex-flow: row wrap;
- align-items: center;
- margin-bottom: 0;
- }
-
- // Allow folks to *not* use `.form-group`
- .form-control {
- display: inline-block;
- width: auto; // Prevent labels from stacking above inputs in `.form-group`
- vertical-align: middle;
- }
-
- // Make static controls behave like regular ones
- .form-control-plaintext {
- display: inline-block;
- }
-
- .input-group,
- .custom-select {
- width: auto;
- }
-
- // Remove default margin on radios/checkboxes that were used for stacking, and
- // then undo the floating of radios and checkboxes to match.
- .form-check {
- display: flex;
- align-items: center;
- justify-content: center;
- width: auto;
- padding-left: 0;
- }
- .form-check-input {
- position: relative;
- flex-shrink: 0;
- margin-top: 0;
- margin-right: $form-check-input-margin-x;
- margin-left: 0;
- }
-
- .custom-control {
- align-items: center;
- justify-content: center;
- }
- .custom-control-label {
- margin-bottom: 0;
- }
- }
-}
+@import "forms/labels";
+@import "forms/form-text";
+@import "forms/form-control";
+@import "forms/form-select";
+@import "forms/form-check";
+@import "forms/form-file";
+@import "forms/form-range";
+@import "forms/input-group";
+@import "forms/validation";
diff --git a/assets/stylesheets/bootstrap/_functions.scss b/assets/stylesheets/bootstrap/_functions.scss
index eb2471d..980efb0 100644
--- a/assets/stylesheets/bootstrap/_functions.scss
+++ b/assets/stylesheets/bootstrap/_functions.scss
@@ -32,6 +32,29 @@
}
}
+// Internal Bootstrap function to turn maps into its negative variant.
+// It prefixes the keys with `n` and makes the value negative.
+@function negativify-map($map) {
+ $result: ();
+ @each $key, $value in $map {
+ @if $key != 0 {
+ $result: map-merge($result, ("n" + $key: (-$value)));
+ }
+ }
+ @return $result;
+}
+
+// Get multiple keys from a sass map
+@function map-get-multiple($map, $values) {
+ $result: ();
+ @each $key, $value in $map {
+ @if (index($values, $key) != null) {
+ $result: map-merge($result, ($key: $value));
+ }
+ }
+ @return $result;
+}
+
// Replace `$search` with `$replace` in `$string`
// Used on our SVG icon backgrounds for custom forms.
//
@@ -67,41 +90,80 @@
}
// Color contrast
-@function color-yiq($color, $dark: $yiq-text-dark, $light: $yiq-text-light) {
- $r: red($color);
- $g: green($color);
- $b: blue($color);
+// See https://github.com/twbs/bootstrap/pull/30168
+
+// A list of pre-calculated numbers of pow(($value / 255 + .055) / 1.055, 2.4). (from 0 to 255)
+// stylelint-disable-next-line scss/dollar-variable-default, scss/dollar-variable-pattern
+$_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 .0033 .0037 .004 .0044 .0048 .0052 .0056 .006 .0065 .007 .0075 .008 .0086 .0091 .0097 .0103 .011 .0116 .0123 .013 .0137 .0144 .0152 .016 .0168 .0176 .0185 .0194 .0203 .0212 .0222 .0232 .0242 .0252 .0262 .0273 .0284 .0296 .0307 .0319 .0331 .0343 .0356 .0369 .0382 .0395 .0409 .0423 .0437 .0452 .0467 .0482 .0497 .0513 .0529 .0545 .0561 .0578 .0595 .0612 .063 .0648 .0666 .0685 .0704 .0723 .0742 .0762 .0782 .0802 .0823 .0844 .0865 .0887 .0908 .0931 .0953 .0976 .0999 .1022 .1046 .107 .1095 .1119 .1144 .117 .1195 .1221 .1248 .1274 .1301 .1329 .1356 .1384 .1413 .1441 .147 .15 .1529 .1559 .159 .162 .1651 .1683 .1714 .1746 .1779 .1812 .1845 .1878 .1912 .1946 .1981 .2016 .2051 .2086 .2122 .2159 .2195 .2232 .227 .2307 .2346 .2384 .2423 .2462 .2502 .2542 .2582 .2623 .2664 .2705 .2747 .2789 .2831 .2874 .2918 .2961 .3005 .305 .3095 .314 .3185 .3231 .3278 .3325 .3372 .3419 .3467 .3515 .3564 .3613 .3663 .3712 .3763 .3813 .3864 .3916 .3968 .402 .4072 .4125 .4179 .4233 .4287 .4342 .4397 .4452 .4508 .4564 .4621 .4678 .4735 .4793 .4851 .491 .4969 .5029 .5089 .5149 .521 .5271 .5333 .5395 .5457 .552 .5583 .5647 .5711 .5776 .5841 .5906 .5972 .6038 .6105 .6172 .624 .6308 .6376 .6445 .6514 .6584 .6654 .6724 .6795 .6867 .6939 .7011 .7084 .7157 .7231 .7305 .7379 .7454 .7529 .7605 .7682 .7758 .7835 .7913 .7991 .807 .8148 .8228 .8308 .8388 .8469 .855 .8632 .8714 .8796 .8879 .8963 .9047 .9131 .9216 .9301 .9387 .9473 .956 .9647 .9734 .9823 .9911 1;
+
+@function color-contrast($background, $color-contrast-dark: $color-contrast-dark, $color-contrast-light: $color-contrast-light, $min-contrast-ratio: $min-contrast-ratio) {
+ $foregrounds: $color-contrast-light, $color-contrast-dark, $white, $black;
+ $max-ratio: 0;
+ $max-ratio-color: null;
+
+ @each $color in $foregrounds {
+ $contrast-ratio: contrast-ratio($background, $color);
+ @if $contrast-ratio > $min-contrast-ratio {
+ @return $color;
+ } @else if $contrast-ratio > $max-ratio {
+ $max-ratio: $contrast-ratio;
+ $max-ratio-color: $color;
+ }
+ }
- $yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
+ @warn "Found no color leading to #{$min-contrast-ratio}:1 contrast ratio against #{$background}…";
- @if ($yiq >= $yiq-contrasted-threshold) {
- @return $dark;
- } @else {
- @return $light;
- }
+ @return $max-ratio-color;
}
-// Retrieve color Sass maps
-@function color($key: "blue") {
- @return map-get($colors, $key);
+@function contrast-ratio($background, $foreground: $color-contrast-light) {
+ $l1: luminance($background);
+ $l2: luminance(opaque($background, $foreground));
+
+ @return if($l1 > $l2, ($l1 + .05) / ($l2 + .05), ($l2 + .05) / ($l1 + .05));
}
-@function theme-color($key: "primary") {
- @return map-get($theme-colors, $key);
+// Return WCAG2.0 relative luminance
+// See https://www.w3.org/WAI/GL/wiki/Relative_luminance
+// See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
+@function luminance($color) {
+ $rgb: (
+ "r": red($color),
+ "g": green($color),
+ "b": blue($color)
+ );
+
+ @each $name, $value in $rgb {
+ $value: if($value / 255 < .03928, $value / 255 / 12.92, nth($_luminance-list, $value + 1));
+ $rgb: map-merge($rgb, ($name: $value));
+ }
+
+ @return (map-get($rgb, "r") * .2126) + (map-get($rgb, "g") * .7152) + (map-get($rgb, "b") * .0722);
}
-@function gray($key: "100") {
- @return map-get($grays, $key);
+// Return opaque color
+// opaque(#fff, rgba(0, 0, 0, .5)) => #808080
+@function opaque($background, $foreground) {
+ @return mix(rgba($foreground, 1), $background, opacity($foreground) * 100);
}
-// Request a theme color level
-@function theme-color-level($color-name: "primary", $level: 0) {
- $color: theme-color($color-name);
+// Request a color level
+// scss-docs-start color-level
+@function color-level($color: $primary, $level: 0) {
$color-base: if($level > 0, $black, $white);
$level: abs($level);
@return mix($color-base, $color, $level * $theme-color-interval);
}
+// scss-docs-end color-level
+
+@function tint-color($color, $level) {
+ @return mix(white, $color, $level * $theme-color-interval);
+}
+
+@function shade-color($color, $level) {
+ @return mix(black, $color, $level * $theme-color-interval);
+}
// Return valid calc
@function add($value1, $value2, $return-calc: true) {
diff --git a/assets/stylesheets/bootstrap/_grid.scss b/assets/stylesheets/bootstrap/_grid.scss
index 0bfe530..5686f31 100644
--- a/assets/stylesheets/bootstrap/_grid.scss
+++ b/assets/stylesheets/bootstrap/_grid.scss
@@ -1,46 +1,3 @@
-// Container widths
-//
-// Set the container width, and override it for fixed navbars in media queries.
-
-@if $enable-grid-classes {
- // Single container class with breakpoint max-widths
- .container,
- // 100% wide container at all breakpoints
- .container-fluid {
- @include make-container();
- }
-
- // Responsive containers that are 100% wide until a breakpoint
- @each $breakpoint, $container-max-width in $container-max-widths {
- .container-#{$breakpoint} {
- @extend .container-fluid;
- }
-
- @include media-breakpoint-up($breakpoint, $grid-breakpoints) {
- %responsive-container-#{$breakpoint} {
- max-width: $container-max-width;
- }
-
- // Extend each breakpoint which is smaller or equal to the current breakpoint
- $extend-breakpoint: true;
-
- @each $name, $width in $grid-breakpoints {
- @if ($extend-breakpoint) {
- .container#{breakpoint-infix($name, $grid-breakpoints)} {
- @extend %responsive-container-#{$breakpoint};
- }
-
- // Once the current breakpoint is reached, stop extending
- @if ($breakpoint == $name) {
- $extend-breakpoint: false;
- }
- }
- }
- }
- }
-}
-
-
// Row
//
// Rows contain your columns.
@@ -48,22 +5,14 @@
@if $enable-grid-classes {
.row {
@include make-row();
- }
- // Remove the negative margin from default .row, then the horizontal padding
- // from all immediate children columns (to prevent runaway style inheritance).
- .no-gutters {
- margin-right: 0;
- margin-left: 0;
-
- > .col,
- > [class*="col-"] {
- padding-right: 0;
- padding-left: 0;
+ > * {
+ @include make-col-ready();
}
}
}
+
// Columns
//
// Common styles for small and large grid columns
diff --git a/assets/stylesheets/bootstrap/_helpers.scss b/assets/stylesheets/bootstrap/_helpers.scss
new file mode 100644
index 0000000..1fdbc29
--- /dev/null
+++ b/assets/stylesheets/bootstrap/_helpers.scss
@@ -0,0 +1,7 @@
+@import "helpers/clearfix";
+@import "helpers/colored-links";
+@import "helpers/embed";
+@import "helpers/position";
+@import "helpers/screenreaders";
+@import "helpers/stretched-link";
+@import "helpers/text-truncation";
diff --git a/assets/stylesheets/bootstrap/_input-group.scss b/assets/stylesheets/bootstrap/_input-group.scss
deleted file mode 100644
index cad8ea3..0000000
--- a/assets/stylesheets/bootstrap/_input-group.scss
+++ /dev/null
@@ -1,192 +0,0 @@
-// stylelint-disable selector-no-qualifying-type
-
-//
-// Base styles
-//
-
-.input-group {
- position: relative;
- display: flex;
- flex-wrap: wrap; // For form validation feedback
- align-items: stretch;
- width: 100%;
-
- > .form-control,
- > .form-control-plaintext,
- > .custom-select,
- > .custom-file {
- position: relative; // For focus state's z-index
- flex: 1 1 auto;
- width: 1%;
- min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
- margin-bottom: 0;
-
- + .form-control,
- + .custom-select,
- + .custom-file {
- margin-left: -$input-border-width;
- }
- }
-
- // Bring the "active" form control to the top of surrounding elements
- > .form-control:focus,
- > .custom-select:focus,
- > .custom-file .custom-file-input:focus ~ .custom-file-label {
- z-index: 3;
- }
-
- // Bring the custom file input above the label
- > .custom-file .custom-file-input:focus {
- z-index: 4;
- }
-
- > .form-control,
- > .custom-select {
- &:not(:last-child) { @include border-right-radius(0); }
- &:not(:first-child) { @include border-left-radius(0); }
- }
-
- // Custom file inputs have more complex markup, thus requiring different
- // border-radius overrides.
- > .custom-file {
- display: flex;
- align-items: center;
-
- &:not(:last-child) .custom-file-label,
- &:not(:last-child) .custom-file-label::after { @include border-right-radius(0); }
- &:not(:first-child) .custom-file-label { @include border-left-radius(0); }
- }
-}
-
-
-// Prepend and append
-//
-// While it requires one extra layer of HTML for each, dedicated prepend and
-// append elements allow us to 1) be less clever, 2) simplify our selectors, and
-// 3) support HTML5 form validation.
-
-.input-group-prepend,
-.input-group-append {
- display: flex;
-
- // Ensure buttons are always above inputs for more visually pleasing borders.
- // This isn't needed for `.input-group-text` since it shares the same border-color
- // as our inputs.
- .btn {
- position: relative;
- z-index: 2;
-
- &:focus {
- z-index: 3;
- }
- }
-
- .btn + .btn,
- .btn + .input-group-text,
- .input-group-text + .input-group-text,
- .input-group-text + .btn {
- margin-left: -$input-border-width;
- }
-}
-
-.input-group-prepend { margin-right: -$input-border-width; }
-.input-group-append { margin-left: -$input-border-width; }
-
-
-// Textual addons
-//
-// Serves as a catch-all element for any text or radio/checkbox input you wish
-// to prepend or append to an input.
-
-.input-group-text {
- display: flex;
- align-items: center;
- padding: $input-padding-y $input-padding-x;
- margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom
- @include font-size($input-font-size); // Match inputs
- font-weight: $font-weight-normal;
- line-height: $input-line-height;
- color: $input-group-addon-color;
- text-align: center;
- white-space: nowrap;
- background-color: $input-group-addon-bg;
- border: $input-border-width solid $input-group-addon-border-color;
- @include border-radius($input-border-radius);
-
- // Nuke default margins from checkboxes and radios to vertically center within.
- input[type="radio"],
- input[type="checkbox"] {
- margin-top: 0;
- }
-}
-
-
-// Sizing
-//
-// Remix the default form control sizing classes into new ones for easier
-// manipulation.
-
-.input-group-lg > .form-control:not(textarea),
-.input-group-lg > .custom-select {
- height: $input-height-lg;
-}
-
-.input-group-lg > .form-control,
-.input-group-lg > .custom-select,
-.input-group-lg > .input-group-prepend > .input-group-text,
-.input-group-lg > .input-group-append > .input-group-text,
-.input-group-lg > .input-group-prepend > .btn,
-.input-group-lg > .input-group-append > .btn {
- padding: $input-padding-y-lg $input-padding-x-lg;
- @include font-size($input-font-size-lg);
- line-height: $input-line-height-lg;
- @include border-radius($input-border-radius-lg);
-}
-
-.input-group-sm > .form-control:not(textarea),
-.input-group-sm > .custom-select {
- height: $input-height-sm;
-}
-
-.input-group-sm > .form-control,
-.input-group-sm > .custom-select,
-.input-group-sm > .input-group-prepend > .input-group-text,
-.input-group-sm > .input-group-append > .input-group-text,
-.input-group-sm > .input-group-prepend > .btn,
-.input-group-sm > .input-group-append > .btn {
- padding: $input-padding-y-sm $input-padding-x-sm;
- @include font-size($input-font-size-sm);
- line-height: $input-line-height-sm;
- @include border-radius($input-border-radius-sm);
-}
-
-.input-group-lg > .custom-select,
-.input-group-sm > .custom-select {
- padding-right: $custom-select-padding-x + $custom-select-indicator-padding;
-}
-
-
-// Prepend and append rounded corners
-//
-// These rulesets must come after the sizing ones to properly override sm and lg
-// border-radius values when extending. They're more specific than we'd like
-// with the `.input-group >` part, but without it, we cannot override the sizing.
-
-
-.input-group > .input-group-prepend > .btn,
-.input-group > .input-group-prepend > .input-group-text,
-.input-group > .input-group-append:not(:last-child) > .btn,
-.input-group > .input-group-append:not(:last-child) > .input-group-text,
-.input-group > .input-group-append:last-child > .btn:not(:last-child):not(.dropdown-toggle),
-.input-group > .input-group-append:last-child > .input-group-text:not(:last-child) {
- @include border-right-radius(0);
-}
-
-.input-group > .input-group-append > .btn,
-.input-group > .input-group-append > .input-group-text,
-.input-group > .input-group-prepend:not(:first-child) > .btn,
-.input-group > .input-group-prepend:not(:first-child) > .input-group-text,
-.input-group > .input-group-prepend:first-child > .btn:not(:first-child),
-.input-group > .input-group-prepend:first-child > .input-group-text:not(:first-child) {
- @include border-left-radius(0);
-}
diff --git a/assets/stylesheets/bootstrap/_jumbotron.scss b/assets/stylesheets/bootstrap/_jumbotron.scss
deleted file mode 100644
index bcd7dca..0000000
--- a/assets/stylesheets/bootstrap/_jumbotron.scss
+++ /dev/null
@@ -1,17 +0,0 @@
-.jumbotron {
- padding: $jumbotron-padding ($jumbotron-padding / 2);
- margin-bottom: $jumbotron-padding;
- color: $jumbotron-color;
- background-color: $jumbotron-bg;
- @include border-radius($border-radius-lg);
-
- @include media-breakpoint-up(sm) {
- padding: ($jumbotron-padding * 2) $jumbotron-padding;
- }
-}
-
-.jumbotron-fluid {
- padding-right: 0;
- padding-left: 0;
- @include border-radius(0);
-}
diff --git a/assets/stylesheets/bootstrap/_list-group.scss b/assets/stylesheets/bootstrap/_list-group.scss
index 37c307e..9fb11bf 100644
--- a/assets/stylesheets/bootstrap/_list-group.scss
+++ b/assets/stylesheets/bootstrap/_list-group.scss
@@ -24,7 +24,8 @@
text-align: inherit; // For `<button>`s (anchors inherit)
// Hover state
- @include hover-focus() {
+ &:hover,
+ &:focus {
z-index: 1; // Place hover/focus items above their siblings for proper border styling
color: $list-group-action-hover-color;
text-decoration: none;
@@ -144,11 +145,13 @@
}
-// Contextual variants
+// scss-docs-start list-group-modifiers
+// List group contextual variants
//
// Add modifier classes to change text and background color on individual items.
// Organizationally, this must come after the `:hover` states.
@each $color, $value in $theme-colors {
- @include list-group-item-variant($color, theme-color-level($color, -9), theme-color-level($color, 6));
+ @include list-group-item-variant($color, color-level($value, $list-group-item-bg-level), color-level($value, $list-group-item-color-level));
}
+// scss-docs-end list-group-modifiers
diff --git a/assets/stylesheets/bootstrap/_media.scss b/assets/stylesheets/bootstrap/_media.scss
deleted file mode 100644
index b573052..0000000
--- a/assets/stylesheets/bootstrap/_media.scss
+++ /dev/null
@@ -1,8 +0,0 @@
-.media {
- display: flex;
- align-items: flex-start;
-}
-
-.media-body {
- flex: 1;
-}
diff --git a/assets/stylesheets/bootstrap/_mixins.scss b/assets/stylesheets/bootstrap/_mixins.scss
index 7e7a23d..8c00f31 100644
--- a/assets/stylesheets/bootstrap/_mixins.scss
+++ b/assets/stylesheets/bootstrap/_mixins.scss
@@ -8,19 +8,16 @@
// Deprecate
@import "mixins/deprecate";
-// Utilities
+// Helpers
@import "mixins/breakpoints";
-@import "mixins/hover";
@import "mixins/image";
-@import "mixins/badge";
@import "mixins/resize";
@import "mixins/screen-reader";
-@import "mixins/size";
@import "mixins/reset-text";
-@import "mixins/text-emphasis";
-@import "mixins/text-hide";
@import "mixins/text-truncate";
-@import "mixins/visibility";
+
+// Utilities
+@import "mixins/utilities";
// Components
@import "mixins/alert";
@@ -29,12 +26,10 @@
@import "mixins/pagination";
@import "mixins/lists";
@import "mixins/list-group";
-@import "mixins/nav-divider";
@import "mixins/forms";
-@import "mixins/table-row";
+@import "mixins/table-variants";
// Skins
-@import "mixins/background-variant";
@import "mixins/border-radius";
@import "mixins/box-shadow";
@import "mixins/gradients";
@@ -42,6 +37,5 @@
// Layout
@import "mixins/clearfix";
-@import "mixins/grid-framework";
+@import "mixins/container";
@import "mixins/grid";
-@import "mixins/float";
diff --git a/assets/stylesheets/bootstrap/_modal.scss b/assets/stylesheets/bootstrap/_modal.scss
index e43c70f..4451972 100644
--- a/assets/stylesheets/bootstrap/_modal.scss
+++ b/assets/stylesheets/bootstrap/_modal.scss
@@ -56,19 +56,12 @@
}
.modal-dialog-scrollable {
- display: flex; // IE10/11
max-height: subtract(100%, $modal-dialog-margin * 2);
.modal-content {
- max-height: subtract(100vh, $modal-dialog-margin * 2); // IE10/11
overflow: hidden;
}
- .modal-header,
- .modal-footer {
- flex-shrink: 0;
- }
-
.modal-body {
overflow-y: auto;
}
@@ -78,29 +71,6 @@
display: flex;
align-items: center;
min-height: subtract(100%, $modal-dialog-margin * 2);
-
- // Ensure `modal-dialog-centered` extends the full height of the view (IE10/11)
- &::before {
- display: block; // IE10
- height: subtract(100vh, $modal-dialog-margin * 2);
- height: min-content; // Reset height to 0 except on IE
- content: "";
- }
-
- // Ensure `.modal-body` shows scrollbar (IE10/11)
- &.modal-dialog-scrollable {
- flex-direction: column;
- justify-content: center;
- height: 100%;
-
- .modal-content {
- max-height: none;
- }
-
- &::before {
- content: none;
- }
- }
}
// Actual modal
@@ -140,6 +110,7 @@
// Top section of the modal w/ title and dismiss
.modal-header {
display: flex;
+ flex-shrink: 0;
align-items: flex-start; // so the close btn always stays on the upper right corner
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
padding: $modal-header-padding;
@@ -173,6 +144,7 @@
.modal-footer {
display: flex;
flex-wrap: wrap;
+ flex-shrink: 0;
align-items: center; // vertically center
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
padding: $modal-inner-padding - $modal-footer-margin-between / 2;
@@ -206,19 +178,10 @@
.modal-dialog-scrollable {
max-height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
-
- .modal-content {
- max-height: subtract(100vh, $modal-dialog-margin-y-sm-up * 2);
- }
}
.modal-dialog-centered {
min-height: subtract(100%, $modal-dialog-margin-y-sm-up * 2);
-
- &::before {
- height: subtract(100vh, $modal-dialog-margin-y-sm-up * 2);
- height: min-content;
- }
}
.modal-content {
@@ -238,3 +201,35 @@
@include media-breakpoint-up(xl) {
.modal-xl { max-width: $modal-xl; }
}
+
+@each $breakpoint in map-keys($grid-breakpoints) {
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
+ $postfix: if($infix != "", $infix + "-down", "");
+
+ @include media-breakpoint-down($breakpoint) {
+ .modal-fullscreen#{$postfix} {
+ width: 100vw;
+ max-width: none;
+ height: 100%;
+ margin: 0;
+
+ .modal-content {
+ height: 100%;
+ border: 0;
+ @include border-radius(0);
+ }
+
+ .modal-header {
+ @include border-radius(0);
+ }
+
+ .modal-body {
+ overflow-y: auto;
+ }
+
+ .modal-footer {
+ @include border-radius(0);
+ }
+ }
+ }
+}
diff --git a/assets/stylesheets/bootstrap/_nav.scss b/assets/stylesheets/bootstrap/_nav.scss
index d866c98..84d5224 100644
--- a/assets/stylesheets/bootstrap/_nav.scss
+++ b/assets/stylesheets/bootstrap/_nav.scss
@@ -15,9 +15,11 @@
display: block;
padding: $nav-link-padding-y $nav-link-padding-x;
text-decoration: if($link-decoration == none, null, none);
+ @include transition($nav-link-transition);
- @include hover-focus() {
- text-decoration: none;
+ &:hover,
+ &:focus {
+ text-decoration: if($link-hover-decoration == underline, none, null);
}
// Disabled state lightens text
@@ -35,15 +37,13 @@
.nav-tabs {
border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color;
- .nav-item {
- margin-bottom: -$nav-tabs-border-width;
- }
-
.nav-link {
+ margin-bottom: -$nav-tabs-border-width;
border: $nav-tabs-border-width solid transparent;
@include border-top-radius($nav-tabs-border-radius);
- @include hover-focus() {
+ &:hover,
+ &:focus {
border-color: $nav-tabs-link-hover-border-color;
}
@@ -82,7 +82,7 @@
.nav-link.active,
.show > .nav-link {
color: $nav-pills-link-active-color;
- background-color: $nav-pills-link-active-bg;
+ @include gradient-bg($nav-pills-link-active-bg);
}
}
diff --git a/assets/stylesheets/bootstrap/_navbar.scss b/assets/stylesheets/bootstrap/_navbar.scss
index 5f10a62..01d827f 100644
--- a/assets/stylesheets/bootstrap/_navbar.scss
+++ b/assets/stylesheets/bootstrap/_navbar.scss
@@ -4,7 +4,6 @@
// Navbar brand
// Navbar nav
// Navbar text
-// Navbar divider
// Responsive navbar
// Navbar position
// Navbar themes
@@ -21,19 +20,24 @@
flex-wrap: wrap; // allow us to do the line break for collapsing content
align-items: center;
justify-content: space-between; // space out brand from logo
- padding: $navbar-padding-y $navbar-padding-x;
+ padding-top: $navbar-padding-y;
+ padding-right: $navbar-padding-x; // default: null
+ padding-bottom: $navbar-padding-y;
+ padding-left: $navbar-padding-x; // default: null
+ @include gradient-bg();
// Because flex properties aren't inherited, we need to redeclare these first
// few properties so that content nested within behave properly.
+ // The `flex-wrap` property is inherited to simplify the expanded navbars
%container-flex-properties {
display: flex;
- flex-wrap: wrap;
+ flex-wrap: inherit;
align-items: center;
justify-content: space-between;
}
- .container,
- .container-fluid {
+ > .container,
+ > .container-fluid {
@extend %container-flex-properties;
}
@@ -50,16 +54,16 @@
// Used for brand, project, or site names.
.navbar-brand {
- display: inline-block;
padding-top: $navbar-brand-padding-y;
padding-bottom: $navbar-brand-padding-y;
- margin-right: $navbar-padding-x;
+ margin-right: $navbar-brand-margin-right;
@include font-size($navbar-brand-font-size);
- line-height: inherit;
+ text-decoration: if($link-decoration == none, null, none);
white-space: nowrap;
- @include hover-focus() {
- text-decoration: none;
+ &:hover,
+ &:focus {
+ text-decoration: if($link-hover-decoration == underline, none, null);
}
}
@@ -82,7 +86,6 @@
.dropdown-menu {
position: static;
- float: none;
}
}
@@ -92,7 +95,6 @@
//
.navbar-text {
- display: inline-block;
padding-top: $nav-link-padding-y;
padding-bottom: $nav-link-padding-y;
}
@@ -107,11 +109,10 @@
// the default flexbox row orientation. Requires the use of `flex-wrap: wrap`
// on the `.navbar` parent.
.navbar-collapse {
- flex-basis: 100%;
- flex-grow: 1;
// For always expanded or extra full navbars, ensure content aligns itself
// properly vertically. Can be easily overridden with flex utilities.
align-items: center;
+ width: 100%;
}
// Button for toggling the navbar when in its collapsed state
@@ -122,10 +123,17 @@
background-color: transparent; // remove default button style
border: $border-width solid transparent; // remove default button style
@include border-radius($navbar-toggler-border-radius);
+ @include transition($navbar-toggler-transition);
- @include hover-focus() {
+ &:hover {
text-decoration: none;
}
+
+ &:focus {
+ text-decoration: none;
+ outline: 0;
+ box-shadow: 0 0 0 $navbar-toggler-focus-width;
+ }
}
// Keep as a separate element so folks can easily override it with another icon
@@ -135,9 +143,9 @@
width: 1.5em;
height: 1.5em;
vertical-align: middle;
- content: "";
- background: no-repeat center center;
- background-size: 100% 100%;
+ background-repeat: no-repeat;
+ background-position: center;
+ background-size: 100%;
}
// Generate series of `.navbar-expand-*` responsive classes for configuring
@@ -148,26 +156,8 @@
$infix: breakpoint-infix($next, $grid-breakpoints);
&#{$infix} {
- @include media-breakpoint-down($breakpoint) {
- %container-navbar-expand-#{$breakpoint} {
- padding-right: 0;
- padding-left: 0;
- }
-
- > .container,
- > .container-fluid {
- @extend %container-navbar-expand-#{$breakpoint};
- }
-
- @each $size, $container-max-width in $container-max-widths {
- > .container#{breakpoint-infix($size, $container-max-widths)} {
- @extend %container-navbar-expand-#{$breakpoint};
- }
- }
- }
-
@include media-breakpoint-up($next) {
- flex-flow: row nowrap;
+ flex-wrap: nowrap;
justify-content: flex-start;
.navbar-nav {
@@ -183,27 +173,8 @@
}
}
- // For nesting containers, have to redeclare for alignment purposes
- %container-nesting-#{$breakpoint} {
- flex-wrap: nowrap;
- }
-
- > .container,
- > .container-fluid {
- @extend %container-nesting-#{$breakpoint};
- }
-
- @each $size, $container-max-width in $container-max-widths {
- > .container#{breakpoint-infix($size, $container-max-widths)} {
- @extend %container-nesting-#{$breakpoint};
- }
- }
-
.navbar-collapse {
display: flex !important; // stylelint-disable-line declaration-no-important
-
- // Changes flex-bases to auto because of an IE10 bug
- flex-basis: auto;
}
.navbar-toggler {
@@ -224,7 +195,8 @@
.navbar-brand {
color: $navbar-light-brand-color;
- @include hover-focus() {
+ &:hover,
+ &:focus {
color: $navbar-light-brand-hover-color;
}
}
@@ -233,7 +205,8 @@
.nav-link {
color: $navbar-light-color;
- @include hover-focus() {
+ &:hover,
+ &:focus {
color: $navbar-light-hover-color;
}
@@ -243,8 +216,6 @@
}
.show > .nav-link,
- .active > .nav-link,
- .nav-link.show,
.nav-link.active {
color: $navbar-light-active-color;
}
@@ -261,12 +232,11 @@
.navbar-text {
color: $navbar-light-color;
- a {
- color: $navbar-light-active-color;
- @include hover-focus() {
- color: $navbar-light-active-color;
- }
+ a,
+ a:hover,
+ a:focus {
+ color: $navbar-light-active-color;
}
}
}
@@ -276,7 +246,8 @@
.navbar-brand {
color: $navbar-dark-brand-color;
- @include hover-focus() {
+ &:hover,
+ &:focus {
color: $navbar-dark-brand-hover-color;
}
}
@@ -285,7 +256,8 @@
.nav-link {
color: $navbar-dark-color;
- @include hover-focus() {
+ &:hover,
+ &:focus {
color: $navbar-dark-hover-color;
}
@@ -295,8 +267,6 @@
}
.show > .nav-link,
- .active > .nav-link,
- .nav-link.show,
.nav-link.active {
color: $navbar-dark-active-color;
}
@@ -313,12 +283,10 @@
.navbar-text {
color: $navbar-dark-color;
- a {
+ a,
+ a:hover,
+ a:focus {
color: $navbar-dark-active-color;
-
- @include hover-focus() {
- color: $navbar-dark-active-color;
- }
}
}
}
diff --git a/assets/stylesheets/bootstrap/_pagination.scss b/assets/stylesheets/bootstrap/_pagination.scss
index d7d553c..40b100b 100644
--- a/assets/stylesheets/bootstrap/_pagination.scss
+++ b/assets/stylesheets/bootstrap/_pagination.scss
@@ -1,15 +1,11 @@
.pagination {
display: flex;
@include list-unstyled();
- @include border-radius();
}
.page-link {
position: relative;
display: block;
- padding: $pagination-padding-y $pagination-padding-x;
- margin-left: -$pagination-border-width;
- line-height: $pagination-line-height;
color: $pagination-color;
text-decoration: if($link-decoration == none, null, none);
background-color: $pagination-bg;
@@ -18,7 +14,7 @@
&:hover {
z-index: 2;
color: $pagination-hover-color;
- text-decoration: none;
+ text-decoration: if($link-hover-decoration == underline, none, null);
background-color: $pagination-hover-bg;
border-color: $pagination-hover-border-color;
}
@@ -31,30 +27,20 @@
}
.page-item {
- &:first-child {
- .page-link {
- margin-left: 0;
- @include border-left-radius($border-radius);
- }
- }
- &:last-child {
- .page-link {
- @include border-right-radius($border-radius);
- }
+ &:not(:first-child) .page-link {
+ margin-left: $pagination-margin-left;
}
&.active .page-link {
z-index: 3;
color: $pagination-active-color;
- background-color: $pagination-active-bg;
+ @include gradient-bg($pagination-active-bg);
border-color: $pagination-active-border-color;
}
&.disabled .page-link {
color: $pagination-disabled-color;
pointer-events: none;
- // Opinionated: remove the "hand" cursor set previously for .page-link
- cursor: auto;
background-color: $pagination-disabled-bg;
border-color: $pagination-disabled-border-color;
}
@@ -64,11 +50,12 @@
//
// Sizing
//
+@include pagination-size($pagination-padding-y, $pagination-padding-x, null, $pagination-border-radius);
.pagination-lg {
- @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $line-height-lg, $border-radius-lg);
+ @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $border-radius-lg);
}
.pagination-sm {
- @include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $line-height-sm, $border-radius-sm);
+ @include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $border-radius-sm);
}
diff --git a/assets/stylesheets/bootstrap/_popover.scss b/assets/stylesheets/bootstrap/_popover.scss
index 0ad76af..6ebb2c3 100644
--- a/assets/stylesheets/bootstrap/_popover.scss
+++ b/assets/stylesheets/bootstrap/_popover.scss
@@ -17,7 +17,7 @@
@include border-radius($popover-border-radius);
@include box-shadow($popover-box-shadow);
- .arrow {
+ .popover-arrow {
position: absolute;
display: block;
width: $popover-arrow-width;
@@ -38,7 +38,7 @@
.bs-popover-top {
margin-bottom: $popover-arrow-height;
- > .arrow {
+ > .popover-arrow {
bottom: subtract(-$popover-arrow-height, $popover-border-width);
&::before {
@@ -58,7 +58,7 @@
.bs-popover-right {
margin-left: $popover-arrow-height;
- > .arrow {
+ > .popover-arrow {
left: subtract(-$popover-arrow-height, $popover-border-width);
width: $popover-arrow-height;
height: $popover-arrow-width;
@@ -81,7 +81,7 @@
.bs-popover-bottom {
margin-top: $popover-arrow-height;
- > .arrow {
+ > .popover-arrow {
top: subtract(-$popover-arrow-height, $popover-border-width);
&::before {
@@ -113,7 +113,7 @@
.bs-popover-left {
margin-right: $popover-arrow-height;
- > .arrow {
+ > .popover-arrow {
right: subtract(-$popover-arrow-height, $popover-border-width);
width: $popover-arrow-height;
height: $popover-arrow-width;
diff --git a/assets/stylesheets/bootstrap/_print.scss b/assets/stylesheets/bootstrap/_print.scss
deleted file mode 100644
index 8f73024..0000000
--- a/assets/stylesheets/bootstrap/_print.scss
+++ /dev/null
@@ -1,141 +0,0 @@
-// stylelint-disable declaration-no-important, selector-no-qualifying-type
-
-// Source: https://github.com/h5bp/main.css/blob/master/src/_print.css
-
-// ==========================================================================
-// Print styles.
-// Inlined to avoid the additional HTTP request:
-// https://www.phpied.com/delay-loading-your-print-css/
-// ==========================================================================
-
-@if $enable-print-styles {
- @media print {
- *,
- *::before,
- *::after {
- // Bootstrap specific; comment out `color` and `background`
- //color: $black !important; // Black prints faster
- text-shadow: none !important;
- //background: transparent !important;
- box-shadow: none !important;
- }
-
- a {
- &:not(.btn) {
- text-decoration: underline;
- }
- }
-
- // Bootstrap specific; comment the following selector out
- //a[href]::after {
- // content: " (" attr(href) ")";
- //}
-
- abbr[title]::after {
- content: " (" attr(title) ")";
- }
-
- // Bootstrap specific; comment the following selector out
- //
- // Don't show links that are fragment identifiers,
- // or use the `javascript:` pseudo protocol
- //
-
- //a[href^="#"]::after,
- //a[href^="javascript:"]::after {
- // content: "";
- //}
-
- pre {
- white-space: pre-wrap !important;
- }
- pre,
- blockquote {
- border: $border-width solid $gray-500; // Bootstrap custom code; using `$border-width` instead of 1px
- page-break-inside: avoid;
- }
-
- //
- // Printing Tables:
- // https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
- //
-
- thead {
- display: table-header-group;
- }
-
- tr,
- img {
- page-break-inside: avoid;
- }
-
- p,
- h2,
- h3 {
- orphans: 3;
- widows: 3;
- }
-
- h2,
- h3 {
- page-break-after: avoid;
- }
-
- // Bootstrap specific changes start
-
- // Specify a size and min-width to make printing closer across browsers.
- // We don't set margin here because it breaks `size` in Chrome. We also
- // don't use `!important` on `size` as it breaks in Chrome.
- @page {
- size: $print-page-size;
- }
- body {
- min-width: $print-body-min-width !important;
- }
- .container {
- min-width: $print-body-min-width !important;
- }
-
- // Bootstrap components
- .navbar {
- display: none;
- }
- .badge {
- border: $border-width solid $black;
- }
-
- .table {
- border-collapse: collapse !important;
-
- td,
- th {
- background-color: $white !important;
- }
- }
-
- .table-bordered {
- th,
- td {
- border: 1px solid $gray-300 !important;
- }
- }
-
- .table-dark {
- color: inherit;
-
- th,
- td,
- thead th,
- tbody + tbody {
- border-color: $table-border-color;
- }
- }
-
- .table .thead-dark th {
- color: inherit;
- border-color: $table-border-color;
- }
-
- // Bootstrap specific changes end
- }
-}
diff --git a/assets/stylesheets/bootstrap/_progress.scss b/assets/stylesheets/bootstrap/_progress.scss
index 1a03704..a3fbecf 100644
--- a/assets/stylesheets/bootstrap/_progress.scss
+++ b/assets/stylesheets/bootstrap/_progress.scss
@@ -1,8 +1,7 @@
// Disable animation if transitions are disabled
@if $enable-transitions {
@keyframes progress-bar-stripes {
- from { background-position: $progress-height 0; }
- to { background-position: 0 0; }
+ 0% { background-position-x: $progress-height; }
}
}
@@ -10,7 +9,6 @@
display: flex;
height: $progress-height;
overflow: hidden; // force rounded corners by cropping it
- line-height: 0;
@include font-size($progress-font-size);
background-color: $progress-bg;
@include border-radius($progress-border-radius);
@@ -38,7 +36,7 @@
.progress-bar-animated {
animation: progress-bar-stripes $progress-bar-animation-timing;
- @if $enable-prefers-reduced-motion-media-query {
+ @if $enable-reduced-motion {
@media (prefers-reduced-motion: reduce) {
animation: none;
}
diff --git a/assets/stylesheets/bootstrap/_reboot.scss b/assets/stylesheets/bootstrap/_reboot.scss
index 4444ff0..b3763d0 100644
--- a/assets/stylesheets/bootstrap/_reboot.scss
+++ b/assets/stylesheets/bootstrap/_reboot.scss
@@ -1,5 +1,6 @@
// stylelint-disable at-rule-no-vendor-prefix, declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
+
// Reboot
//
// Normalization of HTML elements, manually forked from Normalize.css to remove
@@ -10,38 +11,31 @@
// Document
//
-// 1. Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
-// 2. Change the default font family in all browsers.
-// 3. Correct the line height in all browsers.
-// 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
-// 5. Change the default tap highlight to be completely transparent in iOS.
+// Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
*,
*::before,
*::after {
- box-sizing: border-box; // 1
+ box-sizing: border-box;
}
-html {
- font-family: sans-serif; // 2
- line-height: 1.15; // 3
- -webkit-text-size-adjust: 100%; // 4
- -webkit-tap-highlight-color: rgba($black, 0); // 5
-}
-// Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
-// TODO: remove in v5
-// stylelint-disable-next-line selector-list-comma-newline-after
-article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
- display: block;
+// Root
+//
+// Ability to the value of the root font sizes, affecting the value of `rem`.
+// null by default, thus nothing is generated.
+
+:root {
+ font-size: $font-size-root;
}
+
// Body
//
// 1. Remove the margin in all browsers.
// 2. As a best practice, apply a default `background-color`.
-// 3. Set an explicit initial text-align value so that we can later use
-// the `inherit` value on things like `<th>` elements.
+// 3. Prevent adjustments of font size after orientation changes in iOS.
+// 4. Change the default tap highlight to be completely transparent in iOS.
body {
margin: 0; // 1
@@ -50,19 +44,22 @@ body {
font-weight: $font-weight-base;
line-height: $line-height-base;
color: $body-color;
- text-align: left; // 3
+ text-align: $body-text-align;
background-color: $body-bg; // 2
+ -webkit-text-size-adjust: 100%; // 3
+ -webkit-tap-highlight-color: rgba($black, 0); // 4
}
+
// Future-proof rule: in browsers that support :focus-visible, suppress the focus outline
// on elements that programmatically receive focus but wouldn't normally show a visible
// focus outline. In general, this would mean that the outline is only applied if the
// interaction that led to the element receiving programmatic focus was a keyboard interaction,
// or the browser has somehow determined that the user is primarily a keyboard user and/or
// wants focus outlines to always be presented.
-//
// See https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible
// and https://developer.paciellogroup.com/blog/2018/03/focus-visible-and-backwards-compatibility/
+
[tabindex="-1"]:focus:not(:focus-visible) {
outline: 0 !important;
}
@@ -70,62 +67,113 @@ body {
// Content grouping
//
-// 1. Add the correct box sizing in Firefox.
-// 2. Show the overflow in Edge and IE.
+// 1. Reset Firefox's gray color
+// 2. Set correct height and prevent the `size` attribute to make the `hr` look like an input field
+// See https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_hr_size
hr {
- box-sizing: content-box; // 1
- height: 0; // 1
- overflow: visible; // 2
+ margin: $hr-margin-y 0;
+ color: $hr-color; // 1
+ background-color: currentColor;
+ border: 0;
+ opacity: $hr-opacity;
+}
+
+hr:not([size]) {
+ height: $hr-height; // 2
}
-//
// Typography
//
+// 1. Remove top margins from headings
+// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
+// margin for easier control within type scales as it avoids margin collapsing.
-// Remove top margins from headings
-//
-// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
-// margin for easier control within type scales as it avoids margin collapsing.
-// stylelint-disable-next-line selector-list-comma-newline-after
-h1, h2, h3, h4, h5, h6 {
- margin-top: 0;
+%heading {
+ margin-top: 0; // 1
margin-bottom: $headings-margin-bottom;
+ font-family: $headings-font-family;
+ font-style: $headings-font-style;
+ font-weight: $headings-font-weight;
+ line-height: $headings-line-height;
+ color: $headings-color;
+}
+
+h1 {
+ @extend %heading;
+ @include font-size($h1-font-size);
+}
+
+h2 {
+ @extend %heading;
+ @include font-size($h2-font-size);
+}
+
+h3 {
+ @extend %heading;
+ @include font-size($h3-font-size);
+}
+
+h4 {
+ @extend %heading;
+ @include font-size($h4-font-size);
+}
+
+h5 {
+ @extend %heading;
+ @include font-size($h5-font-size);
+}
+
+h6 {
+ @extend %heading;
+ @include font-size($h6-font-size);
}
+
// Reset margins on paragraphs
//
// Similarly, the top margin on `<p>`s get reset. However, we also reset the
// bottom margin to use `rem` units instead of `em`.
+
p {
margin-top: 0;
margin-bottom: $paragraph-margin-bottom;
}
+
// Abbreviations
//
// 1. Duplicate behavior to the data-* attribute for our tooltip plugin
-// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+// 2. Add the correct text decoration in Chrome, Edge, Opera, and Safari.
// 3. Add explicit cursor to indicate changed behavior.
-// 4. Remove the bottom border in Firefox 39-.
-// 5. Prevent the text-decoration to be skipped.
+// 4. Prevent the text-decoration to be skipped.
abbr[title],
abbr[data-original-title] { // 1
text-decoration: underline; // 2
text-decoration: underline dotted; // 2
cursor: help; // 3
- border-bottom: 0; // 4
- text-decoration-skip-ink: none; // 5
+ text-decoration-skip-ink: none; // 4
}
+
+// Address
+
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
+
+// Lists
+
+ol,
+ul {
+ padding-left: 2rem;
+}
+
ol,
ul,
dl {
@@ -144,33 +192,57 @@ dt {
font-weight: $dt-font-weight;
}
+// 1. Undo browser default
+
dd {
margin-bottom: .5rem;
- margin-left: 0; // Undo browser default
+ margin-left: 0; // 1
}
+
+// Blockquote
+
blockquote {
margin: 0 0 1rem;
}
+
+// Strong
+//
+// Add the correct font weight in Chrome, Edge, and Safari
+
b,
strong {
- font-weight: $font-weight-bolder; // Add the correct font weight in Chrome, Edge, and Safari
+ font-weight: $font-weight-bolder;
}
+
+// Small
+//
+// Add the correct font size in all browsers
+
small {
- @include font-size(80%); // Add the correct font size in all browsers
+ @include font-size($small-font-size);
+}
+
+
+// Mark
+
+mark {
+ padding: $mark-padding;
+ background-color: $mark-bg;
}
+
+// Sub and Sup
//
// Prevent `sub` and `sup` elements from affecting the line height in
// all browsers.
-//
sub,
sup {
position: relative;
- @include font-size(75%);
+ @include font-size($sub-sup-font-size);
line-height: 0;
vertical-align: baseline;
}
@@ -179,16 +251,13 @@ sub { bottom: -.25em; }
sup { top: -.5em; }
-//
// Links
-//
a {
color: $link-color;
text-decoration: $link-decoration;
- background-color: transparent; // Remove the gray background on active links in IE 10.
- @include hover() {
+ &:hover {
color: $link-hover-color;
text-decoration: $link-hover-decoration;
}
@@ -200,137 +269,176 @@ a {
// See https://github.com/twbs/bootstrap/issues/19402
a:not([href]):not([class]) {
- color: inherit;
- text-decoration: none;
-
- @include hover() {
+ &,
+ &:hover {
color: inherit;
text-decoration: none;
}
}
-//
// Code
-//
pre,
code,
kbd,
samp {
- font-family: $font-family-monospace;
+ font-family: $font-family-code;
@include font-size(1em); // Correct the odd `em` font sizing in all browsers.
}
+// 1. Remove browser default top margin
+// 2. Reset browser default of `1em` to use `rem`s
+// 3. Don't allow content to break outside
+// 4. Disable auto-hiding scrollbar in legacy Edge to avoid overlap,
+// making it impossible to interact with the content
+
pre {
- // Remove browser default top margin
- margin-top: 0;
- // Reset browser default of `1em` to use `rem`s
- margin-bottom: 1rem;
- // Don't allow content to break outside
- overflow: auto;
- // Disable auto-hiding scrollbar in IE & legacy Edge to avoid overlap,
- // making it impossible to interact with the content
- -ms-overflow-style: scrollbar;
+ display: block;
+ margin-top: 0; // 1
+ margin-bottom: 1rem; // 2
+ overflow: auto; // 3
+ @include font-size($code-font-size);
+ color: $pre-color;
+ -ms-overflow-style: scrollbar; // 4
+
+ // Account for some code outputs that place code tags in pre tags
+ code {
+ @include font-size(inherit);
+ color: inherit;
+ word-break: normal;
+ }
+}
+
+code {
+ @include font-size($code-font-size);
+ color: $code-color;
+ word-wrap: break-word;
+
+ // Streamline the style when inside anchors to avoid broken underline and more
+ a > & {
+ color: inherit;
+ }
+}
+
+kbd {
+ padding: $kbd-padding-y $kbd-padding-x;
+ @include font-size($kbd-font-size);
+ color: $kbd-color;
+ background-color: $kbd-bg;
+ @include border-radius($border-radius-sm);
+
+ kbd {
+ padding: 0;
+ @include font-size(1em);
+ font-weight: $nested-kbd-font-weight;
+ }
}
-//
// Figures
//
+// Apply a consistent margin strategy (matches our type styles).
figure {
- // Apply a consistent margin strategy (matches our type styles).
margin: 0 0 1rem;
}
-//
// Images and content
-//
-
-img {
- vertical-align: middle;
- border-style: none; // Remove the border on images inside links in IE 10-.
-}
+img,
svg {
- // Workaround for the SVG overflow bug in IE10/11 is still required.
- // See https://github.com/twbs/bootstrap/issues/26878
- overflow: hidden;
vertical-align: middle;
}
-//
// Tables
//
+// Prevent double borders
table {
- border-collapse: collapse; // Prevent double borders
+ caption-side: bottom;
+ border-collapse: collapse;
}
caption {
- padding-top: $table-cell-padding;
- padding-bottom: $table-cell-padding;
+ padding-top: $table-cell-padding-y;
+ padding-bottom: $table-cell-padding-y;
color: $table-caption-color;
text-align: left;
- caption-side: bottom;
}
+// 1. Matches default `<td>` alignment by inheriting `text-align`.
+// 2. Fix alignment for Safari
+
th {
- // Matches default `<td>` alignment by inheriting from the `<body>`, or the
- // closest parent with a set `text-align`.
- text-align: inherit;
+ text-align: inherit; // 1
+ text-align: -webkit-match-parent; // 2
+}
+
+thead,
+tbody,
+tfoot,
+tr,
+td,
+th {
+ border-color: inherit;
+ border-style: solid;
+ border-width: 0;
}
-//
// Forms
//
+// 1. Allow labels to use `margin` for spacing.
label {
- // Allow labels to use `margin` for spacing.
- display: inline-block;
- margin-bottom: $label-margin-bottom;
+ display: inline-block; // 1
}
// Remove the default `border-radius` that macOS Chrome adds.
-//
-// Details at https://github.com/twbs/bootstrap/issues/24093
+// See https://github.com/twbs/bootstrap/issues/24093
+
button {
// stylelint-disable-next-line property-blacklist
border-radius: 0;
}
-// Work around a Firefox/IE bug where the transparent `button` background
+// Work around a Firefox bug where the transparent `button` background
// results in a loss of the default `button` focus styles.
-//
-// Credit: https://github.com/suitcss/base/
+// Credit https://github.com/suitcss/base/
+
button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
}
+// 1. Remove the margin in Firefox and Safari
+
input,
button,
select,
optgroup,
textarea {
- margin: 0; // Remove the margin in Firefox and Safari
+ margin: 0; // 1
font-family: inherit;
@include font-size(inherit);
line-height: inherit;
}
+// Show the overflow in Edge
+
button,
input {
- overflow: visible; // Show the overflow in Edge
+ overflow: visible;
}
+// Remove the inheritance of text transform in Firefox
+
button,
select {
- text-transform: none; // Remove the inheritance of text transform in Firefox
+ text-transform: none;
}
// Set the cursor for non-`<button>` buttons
@@ -341,140 +449,168 @@ select {
}
// Remove the inheritance of word-wrap in Safari.
-//
-// Details at https://github.com/twbs/bootstrap/issues/24990
+// See https://github.com/twbs/bootstrap/issues/24990
+
select {
word-wrap: normal;
}
+// Remove the dropdown arrow in Chrome from inputs built with datalists.
+// See https://stackoverflow.com/a/54997118
+
+[list]::-webkit-calendar-picker-indicator {
+ display: none;
+}
// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
// controls in Android 4.
// 2. Correct the inability to style clickable types in iOS and Safari.
+// 3. Opinionated: add "hand" cursor to non-disabled button elements.
+
button,
[type="button"], // 1
[type="reset"],
[type="submit"] {
-webkit-appearance: button; // 2
-}
-// Opinionated: add "hand" cursor to non-disabled button elements.
-@if $enable-pointer-cursor-for-buttons {
- button,
- [type="button"],
- [type="reset"],
- [type="submit"] {
+ @if $enable-button-pointers {
&:not(:disabled) {
- cursor: pointer;
+ cursor: pointer; // 3
}
}
}
// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
-button::-moz-focus-inner,
-[type="button"]::-moz-focus-inner,
-[type="reset"]::-moz-focus-inner,
-[type="submit"]::-moz-focus-inner {
+
+::-moz-focus-inner {
padding: 0;
border-style: none;
}
-input[type="radio"],
-input[type="checkbox"] {
- box-sizing: border-box; // 1. Add the correct box sizing in IE 10-
- padding: 0; // 2. Remove the padding in IE 10-
-}
-
+// 1. Textareas should really only resize vertically so they don't break their (horizontal) containers.
textarea {
- overflow: auto; // Remove the default vertical scrollbar in IE.
- // Textareas should really only resize vertically so they don't break their (horizontal) containers.
- resize: vertical;
+ resize: vertical; // 1
}
+// 1. Browsers set a default `min-width: min-content;` on fieldsets,
+// unlike e.g. `<div>`s, which have `min-width: 0;` by default.
+// So we reset that to ensure fieldsets behave more like a standard block element.
+// See https://github.com/twbs/bootstrap/issues/12359
+// and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
+// 2. Reset the default outline behavior of fieldsets so they don't affect page layout.
+
fieldset {
- // Browsers set a default `min-width: min-content;` on fieldsets,
- // unlike e.g. `<div>`s, which have `min-width: 0;` by default.
- // So we reset that to ensure fieldsets behave more like a standard block element.
- // See https://github.com/twbs/bootstrap/issues/12359
- // and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
- min-width: 0;
- // Reset the default outline behavior of fieldsets so they don't affect page layout.
- padding: 0;
- margin: 0;
- border: 0;
+ min-width: 0; // 1
+ padding: 0; // 2
+ margin: 0; // 2
+ border: 0; // 2
}
-// 1. Correct the text wrapping in Edge and IE.
-// 2. Correct the color inheritance from `fieldset` elements in IE.
+// 1. By using `float: left`, the legend will behave like a block element.
+// This way the border of a fieldset wraps around the legend if present.
+// 2. Correct the text wrapping in Edge.
+// 3. Fix wrapping bug.
+// See https://github.com/twbs/bootstrap/issues/29712
+
legend {
- display: block;
+ float: left; // 1
width: 100%;
- max-width: 100%; // 1
padding: 0;
- margin-bottom: .5rem;
- @include font-size(1.5rem);
+ margin-bottom: $legend-margin-bottom;
+ @include font-size($legend-font-size);
+ font-weight: $legend-font-weight;
line-height: inherit;
- color: inherit; // 2
- white-space: normal; // 1
+ white-space: normal; // 2
+
+ + * {
+ clear: left; // 3
+ }
}
-progress {
- vertical-align: baseline; // Add the correct vertical alignment in Chrome, Firefox, and Opera.
+// Fix height of inputs with a type of datetime-local, date, month, week, or time
+// See https://github.com/twbs/bootstrap/issues/18842
+
+::-webkit-datetime-edit-fields-wrapper,
+::-webkit-datetime-edit-text,
+::-webkit-datetime-edit-minute,
+::-webkit-datetime-edit-hour-field,
+::-webkit-datetime-edit-day-field,
+::-webkit-datetime-edit-month-field,
+::-webkit-datetime-edit-year-field {
+ padding: 0;
}
-// Correct the cursor style of increment and decrement buttons in Chrome.
-[type="number"]::-webkit-inner-spin-button,
-[type="number"]::-webkit-outer-spin-button {
+::-webkit-inner-spin-button {
height: auto;
}
+// 1. Correct the outline style in Safari.
+// 2. This overrides the extra rounded corners on search inputs in iOS so that our
+// `.form-control` class can properly style them. Note that this cannot simply
+// be added to `.form-control` as it's not specific enough. For details, see
+// https://github.com/twbs/bootstrap/issues/11586.
+
[type="search"] {
- // This overrides the extra rounded corners on search inputs in iOS so that our
- // `.form-control` class can properly style them. Note that this cannot simply
- // be added to `.form-control` as it's not specific enough. For details, see
- // https://github.com/twbs/bootstrap/issues/11586.
- outline-offset: -2px; // 2. Correct the outline style in Safari.
- -webkit-appearance: none;
+ outline-offset: -2px; // 1
+ -webkit-appearance: textfield; // 2
}
-//
// Remove the inner padding in Chrome and Safari on macOS.
-//
-[type="search"]::-webkit-search-decoration {
+::-webkit-search-decoration {
-webkit-appearance: none;
}
-//
-// 1. Correct the inability to style clickable types in iOS and Safari.
-// 2. Change font properties to `inherit` in Safari.
-//
+// Remove padding around color pickers in webkit browsers
+
+::-webkit-color-swatch-wrapper {
+ padding: 0;
+}
+
+// 1. Change font properties to `inherit` in Safari.
+// 2. Correct the inability to style clickable types in iOS and Safari.
::-webkit-file-upload-button {
- font: inherit; // 2
- -webkit-appearance: button; // 1
+ font: inherit; // 1
+ -webkit-appearance: button; // 2
}
-//
// Correct element displays
-//
output {
display: inline-block;
}
+// Remove border from iframe
+
+iframe {
+ border: 0;
+}
+
+// Summary
+//
+// 1. Add the correct display in all browsers
+
summary {
- display: list-item; // Add the correct display in all browsers
+ display: list-item; // 1
cursor: pointer;
}
-template {
- display: none; // Add the correct display in IE
+
+// Progress
+//
+// Add the correct vertical alignment in Chrome, Firefox, and Opera.
+
+progress {
+ vertical-align: baseline;
}
-// Always hide an element with the `hidden` HTML attribute (from PureCSS).
-// Needed for proper display in IE 10-.
+
+// Hidden attribute
+//
+// Always hide an element with the `hidden` HTML attribute.
+
[hidden] {
display: none !important;
}
diff --git a/assets/stylesheets/bootstrap/_root.scss b/assets/stylesheets/bootstrap/_root.scss
index 8110030..44eff17 100644
--- a/assets/stylesheets/bootstrap/_root.scss
+++ b/assets/stylesheets/bootstrap/_root.scss
@@ -1,20 +1,16 @@
-// Do not forget to update getting-started/theming.md!
:root {
// Custom variable values only support SassScript inside `#{}`.
@each $color, $value in $colors {
- --#{$color}: #{$value};
+ --bs-#{$color}: #{$value};
}
@each $color, $value in $theme-colors {
- --#{$color}: #{$value};
- }
-
- @each $bp, $value in $grid-breakpoints {
- --breakpoint-#{$bp}: #{$value};
+ --bs-#{$color}: #{$value};
}
// Use `inspect` for lists so that quoted items keep the quotes.
// See https://github.com/sass/sass/issues/2383#issuecomment-336349172
- --font-family-sans-serif: #{inspect($font-family-sans-serif)};
- --font-family-monospace: #{inspect($font-family-monospace)};
+ --bs-font-sans-serif: #{inspect($font-family-sans-serif)};
+ --bs-font-monospace: #{inspect($font-family-monospace)};
+ --bs-gradient: #{$gradient};
}
diff --git a/assets/stylesheets/bootstrap/_spinners.scss b/assets/stylesheets/bootstrap/_spinners.scss
index 27c9241..e8e4c04 100644
--- a/assets/stylesheets/bootstrap/_spinners.scss
+++ b/assets/stylesheets/bootstrap/_spinners.scss
@@ -15,7 +15,7 @@
border-right-color: transparent;
// stylelint-disable-next-line property-blacklist
border-radius: 50%;
- animation: spinner-border .75s linear infinite;
+ animation: spinner-border $spinner-animation-speed linear infinite;
}
.spinner-border-sm {
@@ -47,7 +47,7 @@
// stylelint-disable-next-line property-blacklist
border-radius: 50%;
opacity: 0;
- animation: spinner-grow .75s linear infinite;
+ animation: spinner-grow $spinner-animation-speed linear infinite;
}
.spinner-grow-sm {
diff --git a/assets/stylesheets/bootstrap/_tables.scss b/assets/stylesheets/bootstrap/_tables.scss
index 5fd77a4..5ae45ff 100644
--- a/assets/stylesheets/bootstrap/_tables.scss
+++ b/assets/stylesheets/bootstrap/_tables.scss
@@ -3,37 +3,65 @@
//
.table {
+ --bs-table-bg: #{$table-bg};
+ --bs-table-accent-bg: transparent;
+ --bs-table-striped-color: #{$table-striped-color};
+ --bs-table-striped-bg: #{$table-striped-bg};
+ --bs-table-active-color: #{$table-active-color};
+ --bs-table-active-bg: #{$table-active-bg};
+ --bs-table-hover-color: #{$table-hover-color};
+ --bs-table-hover-bg: #{$table-hover-bg};
+
width: 100%;
margin-bottom: $spacer;
color: $table-color;
- background-color: $table-bg; // Reset for nesting within parents with `background-color`.
+ vertical-align: $table-cell-vertical-align;
+ border-color: $table-border-color;
+
+ // Target th & td
+ // We need the child combinator to prevent styles leaking to nested tables which doesn't have a `.table` class.
+ // We use the universal selectors here to simplify the selector (else we would need 6 different selectors).
+ // Another advantage is that this generates less code and makes the selector less specific making it easier to override.
+ // stylelint-disable-next-line selector-max-universal
+ > :not(caption) > * > * {
+ padding: $table-cell-padding-y $table-cell-padding-x;
+ background-color: var(--bs-table-bg);
+ background-image: linear-gradient(var(--bs-table-accent-bg), var(--bs-table-accent-bg));
+ border-bottom-width: $table-border-width;
+ }
- th,
- td {
- padding: $table-cell-padding;
- vertical-align: top;
- border-top: $table-border-width solid $table-border-color;
+ > tbody {
+ vertical-align: inherit;
}
- thead th {
+ > thead {
vertical-align: bottom;
- border-bottom: (2 * $table-border-width) solid $table-border-color;
}
- tbody + tbody {
- border-top: (2 * $table-border-width) solid $table-border-color;
+ // Highlight border color between thead, tbody and tfoot.
+ > :not(:last-child) > :last-child > * {
+ border-bottom-color: $table-group-seperator-color;
}
}
//
+// Change placement of captions with a class
+//
+
+.caption-top {
+ caption-side: top;
+}
+
+
+//
// Condensed table w/ half padding
//
.table-sm {
- th,
- td {
- padding: $table-cell-padding-sm;
+ // stylelint-disable-next-line selector-max-universal
+ > :not(caption) > * > * {
+ padding: $table-cell-padding-y-sm $table-cell-padding-x-sm;
}
}
@@ -41,29 +69,27 @@
// Border versions
//
// Add or remove borders all around the table and between all the columns.
+//
+// When borders are added on all sides of the cells, the corners can render odd when
+// these borders do not have the same color or if they are semi-transparent.
+// Therefor we add top and border bottoms to the `tr`s and left and right borders
+// to the `td`s or `th`s
.table-bordered {
- border: $table-border-width solid $table-border-color;
+ > :not(caption) > * {
+ border-width: $table-border-width 0;
- th,
- td {
- border: $table-border-width solid $table-border-color;
- }
-
- thead {
- th,
- td {
- border-bottom-width: 2 * $table-border-width;
+ // stylelint-disable-next-line selector-max-universal
+ > * {
+ border-width: 0 $table-border-width;
}
}
}
.table-borderless {
- th,
- td,
- thead th,
- tbody + tbody {
- border: 0;
+ // stylelint-disable-next-line selector-max-universal
+ > :not(caption) > * > * {
+ border-bottom-width: 0;
}
}
@@ -72,114 +98,54 @@
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
.table-striped {
- tbody tr:nth-of-type(#{$table-striped-order}) {
- background-color: $table-accent-bg;
+ > tbody > tr:nth-of-type(#{$table-striped-order}) {
+ --bs-table-accent-bg: var(--bs-table-striped-bg);
+ color: var(--bs-table-striped-color);
}
}
+// Active table
+//
+// The `.table-active` class can be added to highlight rows or cells
+
+.table-active {
+ --bs-table-accent-bg: var(--bs-table-active-bg);
+ color: var(--bs-table-active-color);
+}
// Hover effect
//
// Placed here since it has to come after the potential zebra striping
.table-hover {
- tbody tr {
- @include hover() {
- color: $table-hover-color;
- background-color: $table-hover-bg;
- }
+ > tbody > tr:hover {
+ --bs-table-accent-bg: var(--bs-table-hover-bg);
+ color: var(--bs-table-hover-color);
}
}
-// Table backgrounds
-//
-// Exact selectors below required to override `.table-striped` and prevent
-// inheritance to nested tables.
-
-@each $color, $value in $theme-colors {
- @include table-row-variant($color, theme-color-level($color, $table-bg-level), theme-color-level($color, $table-border-level));
-}
-
-@include table-row-variant(active, $table-active-bg);
-
-
-// Dark styles
+// Table variants
//
-// Same table markup, but inverted color scheme: dark background and light text.
-
-// stylelint-disable-next-line no-duplicate-selectors
-.table {
- .thead-dark {
- th {
- color: $table-dark-color;
- background-color: $table-dark-bg;
- border-color: $table-dark-border-color;
- }
- }
+// Table variants set the table cell backgrounds, border colors
+// and the colors of the striped, hovered & active tables
- .thead-light {
- th {
- color: $table-head-color;
- background-color: $table-head-bg;
- border-color: $table-border-color;
- }
- }
+@each $color, $value in $table-variants {
+ @include table-variant($color, $value);
}
-.table-dark {
- color: $table-dark-color;
- background-color: $table-dark-bg;
-
- th,
- td,
- thead th {
- border-color: $table-dark-border-color;
- }
-
- &.table-bordered {
- border: 0;
- }
-
- &.table-striped {
- tbody tr:nth-of-type(#{$table-striped-order}) {
- background-color: $table-dark-accent-bg;
- }
- }
-
- &.table-hover {
- tbody tr {
- @include hover() {
- color: $table-dark-hover-color;
- background-color: $table-dark-hover-bg;
- }
- }
- }
-}
-
-
// Responsive tables
//
// Generate series of `.table-responsive-*` classes for configuring the screen
// size of where your table will overflow.
-.table-responsive {
- @each $breakpoint in map-keys($grid-breakpoints) {
- $next: breakpoint-next($breakpoint, $grid-breakpoints);
- $infix: breakpoint-infix($next, $grid-breakpoints);
-
- &#{$infix} {
- @include media-breakpoint-down($breakpoint) {
- display: block;
- width: 100%;
- overflow-x: auto;
- -webkit-overflow-scrolling: touch;
-
- // Prevent double border on horizontal scroll due to use of `display: block;`
- > .table-bordered {
- border: 0;
- }
- }
+@each $breakpoint in map-keys($grid-breakpoints) {
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
+
+ @include media-breakpoint-down($breakpoint) {
+ .table-responsive#{$infix} {
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
}
}
}
diff --git a/assets/stylesheets/bootstrap/_toasts.scss b/assets/stylesheets/bootstrap/_toasts.scss
index f9ca8d9..6aa5352 100644
--- a/assets/stylesheets/bootstrap/_toasts.scss
+++ b/assets/stylesheets/bootstrap/_toasts.scss
@@ -1,14 +1,13 @@
.toast {
- // Prevents from shrinking in IE11, when in a flex container
- // See https://github.com/twbs/bootstrap/issues/28341
- flex-basis: $toast-max-width;
max-width: $toast-max-width;
+ overflow: hidden; // cheap rounded corners on nested items
@include font-size($toast-font-size);
color: $toast-color;
background-color: $toast-background-color;
background-clip: padding-box;
border: $toast-border-width solid $toast-border-color;
box-shadow: $toast-box-shadow;
+ backdrop-filter: blur(10px);
opacity: 0;
@include border-radius($toast-border-radius);
@@ -38,7 +37,6 @@
background-color: $toast-header-background-color;
background-clip: padding-box;
border-bottom: $toast-border-width solid $toast-header-border-color;
- @include border-top-radius(subtract($toast-border-radius, $toast-border-width));
}
.toast-body {
diff --git a/assets/stylesheets/bootstrap/_tooltip.scss b/assets/stylesheets/bootstrap/_tooltip.scss
index 6b3aa62..4d405e0 100644
--- a/assets/stylesheets/bootstrap/_tooltip.scss
+++ b/assets/stylesheets/bootstrap/_tooltip.scss
@@ -14,7 +14,7 @@
&.show { opacity: $tooltip-opacity; }
- .arrow {
+ .tooltip-arrow {
position: absolute;
display: block;
width: $tooltip-arrow-width;
@@ -32,7 +32,7 @@
.bs-tooltip-top {
padding: $tooltip-arrow-height 0;
- .arrow {
+ .tooltip-arrow {
bottom: 0;
&::before {
@@ -46,7 +46,7 @@
.bs-tooltip-right {
padding: 0 $tooltip-arrow-height;
- .arrow {
+ .tooltip-arrow {
left: 0;
width: $tooltip-arrow-height;
height: $tooltip-arrow-width;
@@ -62,7 +62,7 @@
.bs-tooltip-bottom {
padding: $tooltip-arrow-height 0;
- .arrow {
+ .tooltip-arrow {
top: 0;
&::before {
@@ -76,7 +76,7 @@
.bs-tooltip-left {
padding: 0 $tooltip-arrow-height;
- .arrow {
+ .tooltip-arrow {
right: 0;
width: $tooltip-arrow-height;
height: $tooltip-arrow-width;
diff --git a/assets/stylesheets/bootstrap/_transitions.scss b/assets/stylesheets/bootstrap/_transitions.scss
index 40be4d9..3d1db3e 100644
--- a/assets/stylesheets/bootstrap/_transitions.scss
+++ b/assets/stylesheets/bootstrap/_transitions.scss
@@ -13,7 +13,6 @@
}
.collapsing {
- position: relative;
height: 0;
overflow: hidden;
@include transition($transition-collapse);
diff --git a/assets/stylesheets/bootstrap/_type.scss b/assets/stylesheets/bootstrap/_type.scss
index 43dde7d..b2d524c 100644
--- a/assets/stylesheets/bootstrap/_type.scss
+++ b/assets/stylesheets/bootstrap/_type.scss
@@ -1,82 +1,56 @@
-// stylelint-disable declaration-no-important, selector-list-comma-newline-after
-
//
// Headings
//
-
-h1, h2, h3, h4, h5, h6,
-.h1, .h2, .h3, .h4, .h5, .h6 {
- margin-bottom: $headings-margin-bottom;
- font-family: $headings-font-family;
- font-weight: $headings-font-weight;
- line-height: $headings-line-height;
- color: $headings-color;
+.h1 {
+ @extend h1;
}
-h1, .h1 { @include font-size($h1-font-size); }
-h2, .h2 { @include font-size($h2-font-size); }
-h3, .h3 { @include font-size($h3-font-size); }
-h4, .h4 { @include font-size($h4-font-size); }
-h5, .h5 { @include font-size($h5-font-size); }
-h6, .h6 { @include font-size($h6-font-size); }
-
-.lead {
- @include font-size($lead-font-size);
- font-weight: $lead-font-weight;
+.h2 {
+ @extend h2;
}
-// Type display classes
-.display-1 {
- @include font-size($display1-size);
- font-weight: $display1-weight;
- line-height: $display-line-height;
+.h3 {
+ @extend h3;
}
-.display-2 {
- @include font-size($display2-size);
- font-weight: $display2-weight;
- line-height: $display-line-height;
+
+.h4 {
+ @extend h4;
}
-.display-3 {
- @include font-size($display3-size);
- font-weight: $display3-weight;
- line-height: $display-line-height;
+
+.h5 {
+ @extend h5;
}
-.display-4 {
- @include font-size($display4-size);
- font-weight: $display4-weight;
- line-height: $display-line-height;
+
+.h6 {
+ @extend h6;
}
-//
-// Horizontal rules
-//
-
-hr {
- margin-top: $hr-margin-y;
- margin-bottom: $hr-margin-y;
- border: 0;
- border-top: $hr-border-width solid $hr-border-color;
+.lead {
+ @include font-size($lead-font-size);
+ font-weight: $lead-font-weight;
}
+// Type display classes
+@each $display, $font-size in $display-font-sizes {
+ .display-#{$display} {
+ @include font-size($font-size);
+ font-weight: $display-font-weight;
+ line-height: $display-line-height;
+ }
+}
//
// Emphasis
//
-
-small,
.small {
- @include font-size($small-font-size);
- font-weight: $font-weight-normal;
+ @extend small;
}
-mark,
.mark {
- padding: $mark-padding;
- background-color: $mark-bg;
+ @extend mark;
}
-
//
// Lists
//
@@ -104,20 +78,25 @@ mark,
// Builds on `abbr`
.initialism {
- @include font-size(90%);
+ @include font-size($initialism-font-size);
text-transform: uppercase;
}
// Blockquotes
.blockquote {
- margin-bottom: $spacer;
+ margin-bottom: $blockquote-margin-y;
@include font-size($blockquote-font-size);
+
+ > :last-child {
+ margin-bottom: 0;
+ }
}
.blockquote-footer {
- display: block;
- @include font-size($blockquote-small-font-size);
- color: $blockquote-small-color;
+ margin-top: -$blockquote-margin-y;
+ margin-bottom: $blockquote-margin-y;
+ @include font-size($blockquote-footer-font-size);
+ color: $blockquote-footer-color;
&::before {
content: "\2014\00A0"; // em dash, nbsp
diff --git a/assets/stylesheets/bootstrap/_utilities.scss b/assets/stylesheets/bootstrap/_utilities.scss
index 10e31dd..79e52fd 100644
--- a/assets/stylesheets/bootstrap/_utilities.scss
+++ b/assets/stylesheets/bootstrap/_utilities.scss
@@ -1,18 +1,503 @@
-@import "utilities/align";
-@import "utilities/background";
-@import "utilities/borders";
-@import "utilities/clearfix";
-@import "utilities/display";
-@import "utilities/embed";
-@import "utilities/flex";
-@import "utilities/float";
-@import "utilities/interactions";
-@import "utilities/overflow";
-@import "utilities/position";
-@import "utilities/screenreaders";
-@import "utilities/shadows";
-@import "utilities/sizing";
-@import "utilities/spacing";
-@import "utilities/stretched-link";
-@import "utilities/text";
-@import "utilities/visibility";
+// Utilities
+
+$utilities: () !default;
+// stylelint-disable-next-line scss/dollar-variable-default
+$utilities: map-merge(
+ (
+ "align": (
+ property: vertical-align,
+ class: align,
+ values: baseline top middle bottom text-bottom text-top
+ ),
+ "float": (
+ responsive: true,
+ property: float,
+ values: left right none
+ ),
+ "overflow": (
+ property: overflow,
+ values: auto hidden,
+ ),
+ "display": (
+ responsive: true,
+ print: true,
+ property: display,
+ class: d,
+ values: none inline inline-block block table table-row table-cell flex inline-flex
+ ),
+ "shadow": (
+ property: box-shadow,
+ class: shadow,
+ values: (
+ null: $box-shadow,
+ sm: $box-shadow-sm,
+ lg: $box-shadow-lg,
+ none: none,
+ )
+ ),
+ "position": (
+ property: position,
+ values: static relative absolute fixed sticky
+ ),
+ "border": (
+ property: border,
+ values: (
+ null: $border-width solid $border-color,
+ 0: 0,
+ )
+ ),
+ "border-top": (
+ property: border-top,
+ values: (
+ null: $border-width solid $border-color,
+ 0: 0,
+ )
+ ),
+ "border-right": (
+ property: border-right,
+ values: (
+ null: $border-width solid $border-color,
+ 0: 0,
+ )
+ ),
+ "border-bottom": (
+ property: border-bottom,
+ values: (
+ null: $border-width solid $border-color,
+ 0: 0,
+ )
+ ),
+ "border-left": (
+ property: border-left,
+ values: (
+ null: $border-width solid $border-color,
+ 0: 0,
+ )
+ ),
+ "border-color": (
+ property: border-color,
+ class: border,
+ values: map-merge($theme-colors, ("white": $white))
+ ),
+ // Sizing utilities
+ "width": (
+ property: width,
+ class: w,
+ values: (
+ 25: 25%,
+ 50: 50%,
+ 75: 75%,
+ 100: 100%,
+ auto: auto
+ )
+ ),
+ "max-width": (
+ property: max-width,
+ class: mw,
+ values: (100: 100%)
+ ),
+ "viewport-width": (
+ property: width,
+ class: vw,
+ values: (100: 100vw)
+ ),
+ "min-viewport-width": (
+ property: min-width,
+ class: min-vw,
+ values: (100: 100vw)
+ ),
+ "height": (
+ property: height,
+ class: h,
+ values: (
+ 25: 25%,
+ 50: 50%,
+ 75: 75%,
+ 100: 100%,
+ auto: auto
+ )
+ ),
+ "max-height": (
+ property: max-height,
+ class: mh,
+ values: (100: 100%)
+ ),
+ "viewport-height": (
+ property: height,
+ class: vh,
+ values: (100: 100vh)
+ ),
+ "min-viewport-height": (
+ property: min-height,
+ class: min-vh,
+ values: (100: 100vh)
+ ),
+ // Flex utilities
+ "flex": (
+ responsive: true,
+ property: flex,
+ values: (fill: 1 1 auto)
+ ),
+ "flex-direction": (
+ responsive: true,
+ property: flex-direction,
+ class: flex,
+ values: row column row-reverse column-reverse
+ ),
+ "flex-grow": (
+ responsive: true,
+ property: flex-grow,
+ class: flex,
+ values: (
+ grow-0: 0,
+ grow-1: 1,
+ )
+ ),
+ "flex-shrink": (
+ responsive: true,
+ property: flex-shrink,
+ class: flex,
+ values: (
+ shrink-0: 0,
+ shrink-1: 1,
+ )
+ ),
+ "flex-wrap": (
+ responsive: true,
+ property: flex-wrap,
+ class: flex,
+ values: wrap nowrap wrap-reverse
+ ),
+ "justify-content": (
+ responsive: true,
+ property: justify-content,
+ values: (
+ start: flex-start,
+ end: flex-end,
+ center: center,
+ between: space-between,
+ around: space-around,
+ evenly: space-evenly,
+ )
+ ),
+ "align-items": (
+ responsive: true,
+ property: align-items,
+ values: (
+ start: flex-start,
+ end: flex-end,
+ center: center,
+ baseline: baseline,
+ stretch: stretch,
+ )
+ ),
+ "align-content": (
+ responsive: true,
+ property: align-content,
+ values: (
+ start: flex-start,
+ end: flex-end,
+ center: center,
+ between: space-between,
+ around: space-around,
+ stretch: stretch,
+ )
+ ),
+ "align-self": (
+ responsive: true,
+ property: align-self,
+ values: (
+ auto: auto,
+ start: flex-start,
+ end: flex-end,
+ center: center,
+ baseline: baseline,
+ stretch: stretch,
+ )
+ ),
+ "order": (
+ responsive: true,
+ property: order,
+ values: (
+ first: -1,
+ 0: 0,
+ 1: 1,
+ 2: 2,
+ 3: 3,
+ 4: 4,
+ 5: 5,
+ last: 6,
+ ),
+ ),
+ // Margin utilities
+ "margin": (
+ responsive: true,
+ property: margin,
+ class: m,
+ values: map-merge($spacers, (auto: auto))
+ ),
+ "margin-x": (
+ responsive: true,
+ property: margin-right margin-left,
+ class: mx,
+ values: map-merge($spacers, (auto: auto))
+ ),
+ "margin-y": (
+ responsive: true,
+ property: margin-top margin-bottom,
+ class: my,
+ values: map-merge($spacers, (auto: auto))
+ ),
+ "margin-top": (
+ responsive: true,
+ property: margin-top,
+ class: mt,
+ values: map-merge($spacers, (auto: auto))
+ ),
+ "margin-right": (
+ responsive: true,
+ property: margin-right,
+ class: mr,
+ values: map-merge($spacers, (auto: auto))
+ ),
+ "margin-bottom": (
+ responsive: true,
+ property: margin-bottom,
+ class: mb,
+ values: map-merge($spacers, (auto: auto))
+ ),
+ "margin-left": (
+ responsive: true,
+ property: margin-left,
+ class: ml,
+ values: map-merge($spacers, (auto: auto))
+ ),
+ // Negative margin utilities
+ "negative-margin": (
+ responsive: true,
+ property: margin,
+ class: m,
+ values: $negative-spacers
+ ),
+ "negative-margin-x": (
+ responsive: true,
+ property: margin-right margin-left,
+ class: mx,
+ values: $negative-spacers
+ ),
+ "negative-margin-y": (
+ responsive: true,
+ property: margin-top margin-bottom,
+ class: my,
+ values: $negative-spacers
+ ),
+ "negative-margin-top": (
+ responsive: true,
+ property: margin-top,
+ class: mt,
+ values: $negative-spacers
+ ),
+ "negative-margin-right": (
+ responsive: true,
+ property: margin-right,
+ class: mr,
+ values: $negative-spacers
+ ),
+ "negative-margin-bottom": (
+ responsive: true,
+ property: margin-bottom,
+ class: mb,
+ values: $negative-spacers
+ ),
+ "negative-margin-left": (
+ responsive: true,
+ property: margin-left,
+ class: ml,
+ values: $negative-spacers
+ ),
+ // Padding utilities
+ "padding": (
+ responsive: true,
+ property: padding,
+ class: p,
+ values: $spacers
+ ),
+ "padding-x": (
+ responsive: true,
+ property: padding-right padding-left,
+ class: px,
+ values: $spacers
+ ),
+ "padding-y": (
+ responsive: true,
+ property: padding-top padding-bottom,
+ class: py,
+ values: $spacers
+ ),
+ "padding-top": (
+ responsive: true,
+ property: padding-top,
+ class: pt,
+ values: $spacers
+ ),
+ "padding-right": (
+ responsive: true,
+ property: padding-right,
+ class: pr,
+ values: $spacers
+ ),
+ "padding-bottom": (
+ responsive: true,
+ property: padding-bottom,
+ class: pb,
+ values: $spacers
+ ),
+ "padding-left": (
+ responsive: true,
+ property: padding-left,
+ class: pl,
+ values: $spacers
+ ),
+ // Text
+ "font-weight": (
+ property: font-weight,
+ values: (
+ light: $font-weight-light,
+ lighter: $font-weight-lighter,
+ normal: $font-weight-normal,
+ bold: $font-weight-bold,
+ bolder: $font-weight-bolder
+ )
+ ),
+ "text-transform": (
+ property: text-transform,
+ class: text,
+ values: lowercase uppercase capitalize
+ ),
+ "text-align": (
+ responsive: true,
+ property: text-align,
+ class: text,
+ values: left right center
+ ),
+ "color": (
+ property: color,
+ class: text,
+ values: map-merge(
+ $theme-colors,
+ (
+ "white": $white,
+ "body": $body-color,
+ "muted": $text-muted,
+ "black-50": rgba($black, .5),
+ "white-50": rgba($white, .5),
+ "reset": inherit,
+ )
+ )
+ ),
+ "line-height": (
+ property: line-height,
+ class: lh,
+ values: (
+ 1: 1,
+ sm: $line-height-sm,
+ base: $line-height-base,
+ lg: $line-height-lg,
+ )
+ ),
+ "background-color": (
+ property: background-color,
+ class: bg,
+ values: map-merge(
+ $theme-colors,
+ (
+ "body": $body-bg,
+ "white": $white,
+ "transparent": transparent
+ )
+ )
+ ),
+ "gradient": (
+ property: background-image,
+ class: bg,
+ values: (gradient: var(--bs-gradient))
+ ),
+ "white-space": (
+ property: white-space,
+ class: text,
+ values: (
+ wrap: normal,
+ nowrap: nowrap,
+ )
+ ),
+ "text-decoration": (
+ property: text-decoration,
+ values: none underline line-through
+ ),
+ "font-style": (
+ property: font-style,
+ class: font,
+ values: italic normal
+ ),
+ "word-wrap": (
+ property: word-wrap word-break,
+ class: text,
+ values: (break: break-word)
+ ),
+ "font-family": (
+ property: font-family,
+ class: font,
+ values: (monospace: var(--bs-font-monospace))
+ ),
+ "user-select": (
+ property: user-select,
+ values: all auto none
+ ),
+ "pointer-events": (
+ property: pointer-events,
+ class: pe,
+ values: none auto,
+ ),
+ "rounded": (
+ property: border-radius,
+ class: rounded,
+ values: (
+ null: $border-radius,
+ sm: $border-radius-sm,
+ lg: $border-radius-lg,
+ circle: 50%,
+ pill: $rounded-pill,
+ 0: 0,
+ )
+ ),
+ "rounded-top": (
+ property: border-top-left-radius border-top-right-radius,
+ class: rounded-top,
+ values: (null: $border-radius)
+ ),
+ "rounded-right": (
+ property: border-top-right-radius border-bottom-right-radius,
+ class: rounded-right,
+ values: (null: $border-radius)
+ ),
+ "rounded-bottom": (
+ property: border-bottom-right-radius border-bottom-left-radius,
+ class: rounded-bottom,
+ values: (null: $border-radius)
+ ),
+ "rounded-left": (
+ property: border-bottom-left-radius border-top-left-radius,
+ class: rounded-left,
+ values: (null: $border-radius)
+ ),
+ "visibility": (
+ property: visibility,
+ class: null,
+ values: (
+ visible: visible,
+ invisible: hidden,
+ )
+ )
+ ),
+ $utilities
+);
diff --git a/assets/stylesheets/bootstrap/_variables.scss b/assets/stylesheets/bootstrap/_variables.scss
index 3ff0c65..2e0d0ce 100644
--- a/assets/stylesheets/bootstrap/_variables.scss
+++ b/assets/stylesheets/bootstrap/_variables.scss
@@ -17,26 +17,24 @@ $gray-800: #343a40 !default;
$gray-900: #212529 !default;
$black: #000 !default;
-$grays: () !default;
-$grays: map-merge(
- (
- "100": $gray-100,
- "200": $gray-200,
- "300": $gray-300,
- "400": $gray-400,
- "500": $gray-500,
- "600": $gray-600,
- "700": $gray-700,
- "800": $gray-800,
- "900": $gray-900
- ),
- $grays
-);
+// fusv-disable
+$grays: (
+ "100": $gray-100,
+ "200": $gray-200,
+ "300": $gray-300,
+ "400": $gray-400,
+ "500": $gray-500,
+ "600": $gray-600,
+ "700": $gray-700,
+ "800": $gray-800,
+ "900": $gray-900
+) !default;
+// fusv-enable
-$blue: #007bff !default;
+$blue: #0d6efd !default;
$indigo: #6610f2 !default;
$purple: #6f42c1 !default;
-$pink: #e83e8c !default;
+$pink: #d63384 !default;
$red: #dc3545 !default;
$orange: #fd7e14 !default;
$yellow: #ffc107 !default;
@@ -44,25 +42,23 @@ $green: #28a745 !default;
$teal: #20c997 !default;
$cyan: #17a2b8 !default;
-$colors: () !default;
-$colors: map-merge(
- (
- "blue": $blue,
- "indigo": $indigo,
- "purple": $purple,
- "pink": $pink,
- "red": $red,
- "orange": $orange,
- "yellow": $yellow,
- "green": $green,
- "teal": $teal,
- "cyan": $cyan,
- "white": $white,
- "gray": $gray-600,
- "gray-dark": $gray-800
- ),
- $colors
-);
+// scss-docs-start colors-map
+$colors: (
+ "blue": $blue,
+ "indigo": $indigo,
+ "purple": $purple,
+ "pink": $pink,
+ "red": $red,
+ "orange": $orange,
+ "yellow": $yellow,
+ "green": $green,
+ "teal": $teal,
+ "cyan": $cyan,
+ "white": $white,
+ "gray": $gray-600,
+ "gray-dark": $gray-800
+) !default;
+// scss-docs-end colors-map
$primary: $blue !default;
$secondary: $gray-600 !default;
@@ -73,59 +69,164 @@ $danger: $red !default;
$light: $gray-100 !default;
$dark: $gray-800 !default;
-$theme-colors: () !default;
-$theme-colors: map-merge(
- (
- "primary": $primary,
- "secondary": $secondary,
- "success": $success,
- "info": $info,
- "warning": $warning,
- "danger": $danger,
- "light": $light,
- "dark": $dark
- ),
- $theme-colors
-);
+// scss-docs-start theme-colors-map
+$theme-colors: (
+ "primary": $primary,
+ "secondary": $secondary,
+ "success": $success,
+ "info": $info,
+ "warning": $warning,
+ "danger": $danger,
+ "light": $light,
+ "dark": $dark
+) !default;
+// scss-docs-end theme-colors-map
// Set a specific jump point for requesting color jumps
-$theme-color-interval: 8% !default;
-
-// The yiq lightness value that determines when the lightness of color changes from "dark" to "light". Acceptable values are between 0 and 255.
-$yiq-contrasted-threshold: 150 !default;
-
-// Customize the light and dark text colors for use in our YIQ color contrast function.
-$yiq-text-dark: $gray-900 !default;
-$yiq-text-light: $white !default;
+$theme-color-interval: 8% !default;
+
+// The contrast ratio to reach against white, to determine if color changes from "light" to "dark". Acceptable values for WCAG 2.0 are 3, 4.5 and 7.
+// See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast
+$min-contrast-ratio: 3 !default;
+
+// Customize the light and dark text colors for use in our color contrast function.
+$color-contrast-dark: $gray-900 !default;
+$color-contrast-light: $white !default;
+
+// fusv-disable
+$blue-100: tint-color($blue, 8) !default;
+$blue-200: tint-color($blue, 6) !default;
+$blue-300: tint-color($blue, 4) !default;
+$blue-400: tint-color($blue, 2) !default;
+$blue-500: $blue !default;
+$blue-600: shade-color($blue, 2) !default;
+$blue-700: shade-color($blue, 4) !default;
+$blue-800: shade-color($blue, 6) !default;
+$blue-900: shade-color($blue, 8) !default;
+
+$indigo-100: tint-color($indigo, 8) !default;
+$indigo-200: tint-color($indigo, 6) !default;
+$indigo-300: tint-color($indigo, 4) !default;
+$indigo-400: tint-color($indigo, 2) !default;
+$indigo-500: $indigo !default;
+$indigo-600: shade-color($indigo, 2) !default;
+$indigo-700: shade-color($indigo, 4) !default;
+$indigo-800: shade-color($indigo, 6) !default;
+$indigo-900: shade-color($indigo, 8) !default;
+
+$purple-100: tint-color($purple, 8) !default;
+$purple-200: tint-color($purple, 6) !default;
+$purple-300: tint-color($purple, 4) !default;
+$purple-400: tint-color($purple, 2) !default;
+$purple-500: $purple !default;
+$purple-600: shade-color($purple, 2) !default;
+$purple-700: shade-color($purple, 4) !default;
+$purple-800: shade-color($purple, 6) !default;
+$purple-900: shade-color($purple, 8) !default;
+
+$pink-100: tint-color($pink, 8) !default;
+$pink-200: tint-color($pink, 6) !default;
+$pink-300: tint-color($pink, 4) !default;
+$pink-400: tint-color($pink, 2) !default;
+$pink-500: $pink !default;
+$pink-600: shade-color($pink, 2) !default;
+$pink-700: shade-color($pink, 4) !default;
+$pink-800: shade-color($pink, 6) !default;
+$pink-900: shade-color($pink, 8) !default;
+
+$red-100: tint-color($red, 8) !default;
+$red-200: tint-color($red, 6) !default;
+$red-300: tint-color($red, 4) !default;
+$red-400: tint-color($red, 2) !default;
+$red-500: $red !default;
+$red-600: shade-color($red, 2) !default;
+$red-700: shade-color($red, 4) !default;
+$red-800: shade-color($red, 6) !default;
+$red-900: shade-color($red, 8) !default;
+
+$orange-100: tint-color($orange, 8) !default;
+$orange-200: tint-color($orange, 6) !default;
+$orange-300: tint-color($orange, 4) !default;
+$orange-400: tint-color($orange, 2) !default;
+$orange-500: $orange !default;
+$orange-600: shade-color($orange, 2) !default;
+$orange-700: shade-color($orange, 4) !default;
+$orange-800: shade-color($orange, 6) !default;
+$orange-900: shade-color($orange, 8) !default;
+
+$yellow-100: tint-color($yellow, 8) !default;
+$yellow-200: tint-color($yellow, 6) !default;
+$yellow-300: tint-color($yellow, 4) !default;
+$yellow-400: tint-color($yellow, 2) !default;
+$yellow-500: $yellow !default;
+$yellow-600: shade-color($yellow, 2) !default;
+$yellow-700: shade-color($yellow, 4) !default;
+$yellow-800: shade-color($yellow, 6) !default;
+$yellow-900: shade-color($yellow, 8) !default;
+
+$green-100: tint-color($green, 8) !default;
+$green-200: tint-color($green, 6) !default;
+$green-300: tint-color($green, 4) !default;
+$green-400: tint-color($green, 2) !default;
+$green-500: $green !default;
+$green-600: shade-color($green, 2) !default;
+$green-700: shade-color($green, 4) !default;
+$green-800: shade-color($green, 6) !default;
+$green-900: shade-color($green, 8) !default;
+
+$teal-100: tint-color($teal, 8) !default;
+$teal-200: tint-color($teal, 6) !default;
+$teal-300: tint-color($teal, 4) !default;
+$teal-400: tint-color($teal, 2) !default;
+$teal-500: $teal !default;
+$teal-600: shade-color($teal, 2) !default;
+$teal-700: shade-color($teal, 4) !default;
+$teal-800: shade-color($teal, 6) !default;
+$teal-900: shade-color($teal, 8) !default;
+
+$cyan-100: tint-color($cyan, 8) !default;
+$cyan-200: tint-color($cyan, 6) !default;
+$cyan-300: tint-color($cyan, 4) !default;
+$cyan-400: tint-color($cyan, 2) !default;
+$cyan-500: $cyan !default;
+$cyan-600: shade-color($cyan, 2) !default;
+$cyan-700: shade-color($cyan, 4) !default;
+$cyan-800: shade-color($cyan, 6) !default;
+$cyan-900: shade-color($cyan, 8) !default;
+// fusv-enable
// Characters which are escaped by the escape-svg function
$escaped-characters: (
- ("<", "%3c"),
- (">", "%3e"),
- ("#", "%23"),
- ("(", "%28"),
- (")", "%29"),
+ ("<","%3c"),
+ (">","%3e"),
+ ("#","%23"),
+ ("(","%28"),
+ (")","%29"),
) !default;
-
// Options
//
// Quickly modify global styling by enabling or disabling optional features.
-$enable-caret: true !default;
-$enable-rounded: true !default;
-$enable-shadows: false !default;
-$enable-gradients: false !default;
-$enable-transitions: true !default;
-$enable-prefers-reduced-motion-media-query: true !default;
-$enable-hover-media-query: false !default; // Deprecated, no longer affects any compiled CSS
-$enable-grid-classes: true !default;
-$enable-pointer-cursor-for-buttons: true !default;
-$enable-print-styles: true !default;
-$enable-responsive-font-sizes: false !default;
-$enable-validation-icons: true !default;
-$enable-deprecation-messages: true !default;
-
+$enable-caret: true !default;
+$enable-rounded: true !default;
+$enable-shadows: false !default;
+$enable-gradients: false !default;
+$enable-transitions: true !default;
+$enable-reduced-motion: true !default;
+$enable-grid-classes: true !default;
+$enable-button-pointers: true !default;
+$enable-rfs: true !default;
+$enable-validation-icons: true !default;
+$enable-negative-margins: false !default;
+$enable-deprecation-messages: true !default;
+$enable-important-utilities: true !default;
+
+// Gradient
+//
+// The gradient which is added to components if `$enable-gradients` is `true`
+// This gradient is also added to elements with `.bg-gradient`
+$gradient: linear-gradient(180deg, rgba($white, .15), rgba($white, 0)) !default;
// Spacing
//
@@ -134,32 +235,16 @@ $enable-deprecation-messages: true !default;
// You can add more entries to the $spacers map, should you need more variation.
$spacer: 1rem !default;
-$spacers: () !default;
-$spacers: map-merge(
- (
- 0: 0,
- 1: ($spacer * .25),
- 2: ($spacer * .5),
- 3: $spacer,
- 4: ($spacer * 1.5),
- 5: ($spacer * 3)
- ),
- $spacers
-);
-
-// This variable affects the `.h-*` and `.w-*` classes.
-$sizes: () !default;
-$sizes: map-merge(
- (
- 25: 25%,
- 50: 50%,
- 75: 75%,
- 100: 100%,
- auto: auto
- ),
- $sizes
-);
+$spacers: (
+ 0: 0,
+ 1: $spacer / 4,
+ 2: $spacer / 2,
+ 3: $spacer,
+ 4: $spacer * 1.5,
+ 5: $spacer * 3,
+) !default;
+$negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;
// Body
//
@@ -167,19 +252,23 @@ $sizes: map-merge(
$body-bg: $white !default;
$body-color: $gray-900 !default;
+$body-text-align: null !default;
// Links
//
// Style anchor elements.
-$link-color: theme-color("primary") !default;
-$link-decoration: none !default;
+$link-color: $primary !default;
+$link-decoration: underline !default;
$link-hover-color: darken($link-color, 15%) !default;
-$link-hover-decoration: underline !default;
+$link-hover-decoration: null !default;
// Darken percentage for links with `.text-*` class (e.g. `.text-success`)
$emphasized-link-hover-darken-percentage: 15% !default;
+$stretched-link-pseudo-element: after !default;
+$stretched-link-z-index: 1 !default;
+
// Paragraphs
//
// Style p element.
@@ -192,13 +281,16 @@ $paragraph-margin-bottom: 1rem !default;
// Define the minimum dimensions at which your layout will change,
// adapting to different screen sizes, for use in media queries.
+// scss-docs-start grid-breakpoints
$grid-breakpoints: (
xs: 0,
sm: 576px,
md: 768px,
lg: 992px,
- xl: 1200px
+ xl: 1200px,
+ xxl: 1400px
) !default;
+// scss-docs-end grid-breakpoints
@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
@include _assert-starts-at-zero($grid-breakpoints, "$grid-breakpoints");
@@ -208,12 +300,15 @@ $grid-breakpoints: (
//
// Define the maximum width of `.container` for different screen sizes.
+// scss-docs-start container-max-widths
$container-max-widths: (
sm: 540px,
md: 720px,
lg: 960px,
- xl: 1140px
+ xl: 1140px,
+ xxl: 1320px
) !default;
+// scss-docs-end container-max-widths
@include _assert-ascending($container-max-widths, "$container-max-widths");
@@ -223,32 +318,36 @@ $container-max-widths: (
// Set the number of columns and specify the width of the gutters.
$grid-columns: 12 !default;
-$grid-gutter-width: 30px !default;
+$grid-gutter-width: 1.5rem !default;
$grid-row-columns: 6 !default;
+$gutters: $spacers !default;
+
+// Container padding
+
+$container-padding-x: 1rem !default;
+
// Components
//
// Define common padding and border radius sizes and more.
-$line-height-lg: 1.5 !default;
-$line-height-sm: 1.5 !default;
-
$border-width: 1px !default;
$border-color: $gray-300 !default;
$border-radius: .25rem !default;
-$border-radius-lg: .3rem !default;
$border-radius-sm: .2rem !default;
+$border-radius-lg: .3rem !default;
$rounded-pill: 50rem !default;
-$box-shadow-sm: 0 .125rem .25rem rgba($black, .075) !default;
$box-shadow: 0 .5rem 1rem rgba($black, .15) !default;
+$box-shadow-sm: 0 .125rem .25rem rgba($black, .075) !default;
$box-shadow-lg: 0 1rem 3rem rgba($black, .175) !default;
+$box-shadow-inset: inset 0 1px 2px rgba($black, .075) !default;
$component-active-color: $white !default;
-$component-active-bg: theme-color("primary") !default;
+$component-active-bg: $primary !default;
$caret-width: .3em !default;
$caret-vertical-align: $caret-width * .85 !default;
@@ -258,30 +357,44 @@ $transition-base: all .2s ease-in-out !default;
$transition-fade: opacity .15s linear !default;
$transition-collapse: height .35s ease !default;
-$embed-responsive-aspect-ratios: () !default;
-$embed-responsive-aspect-ratios: join(
- (
- (21 9),
- (16 9),
- (4 3),
- (1 1),
+// scss-docs-start embed-responsive-aspect-ratios
+$embed-responsive-aspect-ratios: (
+ "21by9": (
+ x: 21,
+ y: 9
+ ),
+ "16by9": (
+ x: 16,
+ y: 9
+ ),
+ "4by3": (
+ x: 4,
+ y: 3
),
- $embed-responsive-aspect-ratios
-);
+ "1by1": (
+ x: 1,
+ y: 1
+ )
+) !default;
+// scss-docs-end embed-responsive-aspect-ratios
// Typography
//
// Font, line-height, and color for body text, headings, and more.
// stylelint-disable value-keyword-case
-$font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;
+$font-family-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;
$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
-$font-family-base: $font-family-sans-serif !default;
// stylelint-enable value-keyword-case
+$font-family-base: var(--bs-font-sans-serif) !default;
+$font-family-code: var(--bs-font-monospace) !default;
+// $font-size-root effects the value of `rem`, which is used for as well font sizes, paddings and margins
+// $font-size-base effects the font size of the body text
+$font-size-root: null !default;
$font-size-base: 1rem !default; // Assumes the browser default, typically `16px`
-$font-size-lg: $font-size-base * 1.25 !default;
$font-size-sm: $font-size-base * .875 !default;
+$font-size-lg: $font-size-base * 1.25 !default;
$font-weight-lighter: lighter !default;
$font-weight-light: 300 !default;
@@ -290,7 +403,10 @@ $font-weight-bold: 700 !default;
$font-weight-bolder: bolder !default;
$font-weight-base: $font-weight-normal !default;
+
$line-height-base: 1.5 !default;
+$line-height-sm: 1.25 !default;
+$line-height-lg: 2 !default;
$h1-font-size: $font-size-base * 2.5 !default;
$h2-font-size: $font-size-base * 2 !default;
@@ -301,82 +417,111 @@ $h6-font-size: $font-size-base !default;
$headings-margin-bottom: $spacer / 2 !default;
$headings-font-family: null !default;
+$headings-font-style: null !default;
$headings-font-weight: 500 !default;
$headings-line-height: 1.2 !default;
$headings-color: null !default;
-$display1-size: 6rem !default;
-$display2-size: 5.5rem !default;
-$display3-size: 4.5rem !default;
-$display4-size: 3.5rem !default;
+// scss-docs-start display-headings
+$display-font-sizes: (
+ 1: 5rem,
+ 2: 4.5rem,
+ 3: 4rem,
+ 4: 3.5rem,
+ 5: 3rem,
+ 6: 2.5rem
+) !default;
-$display1-weight: 300 !default;
-$display2-weight: 300 !default;
-$display3-weight: 300 !default;
-$display4-weight: 300 !default;
-$display-line-height: $headings-line-height !default;
+$display-font-weight: 300 !default;
+$display-line-height: $headings-line-height !default;
+// scss-docs-end display-headings
$lead-font-size: $font-size-base * 1.25 !default;
$lead-font-weight: 300 !default;
-$small-font-size: 80% !default;
+$small-font-size: .875em !default;
+
+$sub-sup-font-size: .75em !default;
$text-muted: $gray-600 !default;
-$blockquote-small-color: $gray-600 !default;
-$blockquote-small-font-size: $small-font-size !default;
+$initialism-font-size: $small-font-size !default;
+
+$blockquote-margin-y: $spacer !default;
$blockquote-font-size: $font-size-base * 1.25 !default;
+$blockquote-footer-color: $gray-600 !default;
+$blockquote-footer-font-size: $small-font-size !default;
-$hr-border-color: rgba($black, .1) !default;
-$hr-border-width: $border-width !default;
+$hr-margin-y: $spacer !default;
+$hr-color: inherit !default;
+$hr-height: $border-width !default;
+$hr-opacity: .25 !default;
+
+$legend-margin-bottom: .5rem !default;
+$legend-font-size: 1.5rem !default;
+$legend-font-weight: null !default;
$mark-padding: .2em !default;
$dt-font-weight: $font-weight-bold !default;
-$kbd-box-shadow: inset 0 -.1rem 0 rgba($black, .25) !default;
$nested-kbd-font-weight: $font-weight-bold !default;
$list-inline-padding: .5rem !default;
$mark-bg: #fcf8e3 !default;
-$hr-margin-y: $spacer !default;
-
// Tables
//
// Customizes the `.table` component with basic values, each used across all table variations.
-$table-cell-padding: .75rem !default;
-$table-cell-padding-sm: .3rem !default;
+// scss-docs-start table-variables
+$table-cell-padding-y: .5rem !default;
+$table-cell-padding-x: .5rem !default;
+$table-cell-padding-y-sm: .25rem !default;
+$table-cell-padding-x-sm: .25rem !default;
+
+$table-cell-vertical-align: top !default;
$table-color: $body-color !default;
-$table-bg: null !default;
-$table-accent-bg: rgba($black, .05) !default;
+$table-bg: transparent !default;
+
+$table-striped-color: $table-color !default;
+$table-striped-bg-factor: .05 !default;
+$table-striped-bg: rgba($black, $table-striped-bg-factor) !default;
+
+$table-active-color: $table-color !default;
+$table-active-bg-factor: .1 !default;
+$table-active-bg: rgba($black, $table-active-bg-factor) !default;
+
$table-hover-color: $table-color !default;
-$table-hover-bg: rgba($black, .075) !default;
-$table-active-bg: $table-hover-bg !default;
+$table-hover-bg-factor: .075 !default;
+$table-hover-bg: rgba($black, $table-hover-bg-factor) !default;
+$table-border-factor: .1 !default;
$table-border-width: $border-width !default;
$table-border-color: $border-color !default;
-$table-head-bg: $gray-200 !default;
-$table-head-color: $gray-700 !default;
-
-$table-dark-color: $white !default;
-$table-dark-bg: $gray-800 !default;
-$table-dark-accent-bg: rgba($white, .05) !default;
-$table-dark-hover-color: $table-dark-color !default;
-$table-dark-hover-bg: rgba($white, .075) !default;
-$table-dark-border-color: lighten($table-dark-bg, 7.5%) !default;
-
$table-striped-order: odd !default;
+$table-group-seperator-color: currentColor !default;
+
$table-caption-color: $text-muted !default;
$table-bg-level: -9 !default;
-$table-border-level: -6 !default;
+
+$table-variants: (
+ "primary": color-level($primary, $table-bg-level),
+ "secondary": color-level($secondary, $table-bg-level),
+ "success": color-level($success, $table-bg-level),
+ "info": color-level($info, $table-bg-level),
+ "warning": color-level($warning, $table-bg-level),
+ "danger": color-level($danger, $table-bg-level),
+ "light": $light,
+ "dark": $dark,
+) !default;
+// scss-docs-end table-variables
// Buttons + Forms
@@ -389,19 +534,18 @@ $input-btn-font-family: null !default;
$input-btn-font-size: $font-size-base !default;
$input-btn-line-height: $line-height-base !default;
-$input-btn-focus-width: .2rem !default;
-$input-btn-focus-color: rgba($component-active-bg, .25) !default;
-$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color !default;
+$input-btn-focus-width: .2rem !default;
+$input-btn-focus-color-opacity: .25 !default;
+$input-btn-focus-color: rgba($component-active-bg, $input-btn-focus-color-opacity) !default;
+$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color !default;
$input-btn-padding-y-sm: .25rem !default;
$input-btn-padding-x-sm: .5rem !default;
$input-btn-font-size-sm: $font-size-sm !default;
-$input-btn-line-height-sm: $line-height-sm !default;
$input-btn-padding-y-lg: .5rem !default;
$input-btn-padding-x-lg: 1rem !default;
$input-btn-font-size-lg: $font-size-lg !default;
-$input-btn-line-height-lg: $line-height-lg !default;
$input-btn-border-width: $border-width !default;
@@ -420,12 +564,10 @@ $btn-white-space: null !default; // Set to `nowrap` to prevent text
$btn-padding-y-sm: $input-btn-padding-y-sm !default;
$btn-padding-x-sm: $input-btn-padding-x-sm !default;
$btn-font-size-sm: $input-btn-font-size-sm !default;
-$btn-line-height-sm: $input-btn-line-height-sm !default;
$btn-padding-y-lg: $input-btn-padding-y-lg !default;
$btn-padding-x-lg: $input-btn-padding-x-lg !default;
$btn-font-size-lg: $input-btn-font-size-lg !default;
-$btn-line-height-lg: $input-btn-line-height-lg !default;
$btn-border-width: $input-btn-border-width !default;
@@ -436,21 +578,33 @@ $btn-focus-box-shadow: $input-btn-focus-box-shadow !default;
$btn-disabled-opacity: .65 !default;
$btn-active-box-shadow: inset 0 3px 5px rgba($black, .125) !default;
+$btn-link-color: $link-color !default;
+$btn-link-hover-color: $link-hover-color !default;
$btn-link-disabled-color: $gray-600 !default;
$btn-block-spacing-y: .5rem !default;
// Allows for customizing button radius independently from global border radius
$btn-border-radius: $border-radius !default;
-$btn-border-radius-lg: $border-radius-lg !default;
$btn-border-radius-sm: $border-radius-sm !default;
+$btn-border-radius-lg: $border-radius-lg !default;
$btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
// Forms
-$label-margin-bottom: .5rem !default;
+$form-text-margin-top: .25rem !default;
+$form-text-font-size: $small-font-size !default;
+$form-text-font-style: null !default;
+$form-text-font-weight: null !default;
+$form-text-color: $text-muted !default;
+
+$form-label-margin-bottom: .5rem !default;
+$form-label-font-size: null !default;
+$form-label-font-style: null !default;
+$form-label-font-weight: null !default;
+$form-label-color: null !default;
$input-padding-y: $input-btn-padding-y !default;
$input-padding-x: $input-btn-padding-x !default;
@@ -462,24 +616,23 @@ $input-line-height: $input-btn-line-height !default;
$input-padding-y-sm: $input-btn-padding-y-sm !default;
$input-padding-x-sm: $input-btn-padding-x-sm !default;
$input-font-size-sm: $input-btn-font-size-sm !default;
-$input-line-height-sm: $input-btn-line-height-sm !default;
$input-padding-y-lg: $input-btn-padding-y-lg !default;
$input-padding-x-lg: $input-btn-padding-x-lg !default;
$input-font-size-lg: $input-btn-font-size-lg !default;
-$input-line-height-lg: $input-btn-line-height-lg !default;
$input-bg: $white !default;
$input-disabled-bg: $gray-200 !default;
+$input-disabled-border-color: null !default;
$input-color: $gray-700 !default;
$input-border-color: $gray-400 !default;
$input-border-width: $input-btn-border-width !default;
-$input-box-shadow: inset 0 1px 1px rgba($black, .075) !default;
+$input-box-shadow: $box-shadow-inset !default;
$input-border-radius: $border-radius !default;
-$input-border-radius-lg: $border-radius-lg !default;
$input-border-radius-sm: $border-radius-sm !default;
+$input-border-radius-lg: $border-radius-lg !default;
$input-focus-bg: $input-bg !default;
$input-focus-border-color: lighten($component-active-bg, 25%) !default;
@@ -497,190 +650,183 @@ $input-height-inner-half: add($input-line-height * .5em, $input-pa
$input-height-inner-quarter: add($input-line-height * .25em, $input-padding-y / 2) !default;
$input-height: add($input-line-height * 1em, add($input-padding-y * 2, $input-height-border, false)) !default;
-$input-height-sm: add($input-line-height-sm * 1em, add($input-padding-y-sm * 2, $input-height-border, false)) !default;
-$input-height-lg: add($input-line-height-lg * 1em, add($input-padding-y-lg * 2, $input-height-border, false)) !default;
+$input-height-sm: add($input-line-height * 1em, add($input-padding-y-sm * 2, $input-height-border, false)) !default;
+$input-height-lg: add($input-line-height * 1em, add($input-padding-y-lg * 2, $input-height-border, false)) !default;
$input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
-$form-text-margin-top: .25rem !default;
-$form-check-input-gutter: 1.25rem !default;
-$form-check-input-margin-y: .3rem !default;
-$form-check-input-margin-x: .25rem !default;
+$form-check-input-width: 1.25em !default;
+$form-check-min-height: $font-size-base * $line-height-base !default;
+$form-check-padding-left: $form-check-input-width + .5em !default;
+$form-check-margin-bottom: .125rem !default;
+$form-check-label-color: null !default;
+$form-check-label-cursor: null !default;
+$form-check-transition: background-color .15s ease-in-out, background-position .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
+
+$form-check-input-active-filter: brightness(90%) !default;
+
+$form-check-input-bg: $body-bg !default;
+$form-check-input-border: 1px solid rgba(0, 0, 0, .25) !default;
+$form-check-input-border-radius: .25em !default;
+$form-check-radio-border-radius: 50% !default;
+$form-check-input-focus-border: $input-focus-border-color !default;
+$form-check-input-focus-box-shadow: $input-btn-focus-box-shadow !default;
-$form-check-inline-margin-x: .75rem !default;
-$form-check-inline-input-margin-x: .3125rem !default;
+$form-check-input-checked-color: $component-active-color !default;
+$form-check-input-checked-bg-color: $component-active-bg !default;
+$form-check-input-checked-border-color: $form-check-input-checked-bg-color !default;
+$form-check-input-checked-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='#{$form-check-input-checked-color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/></svg>") !default;
+$form-check-radio-checked-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='2' fill='#{$form-check-input-checked-color}'/></svg>") !default;
-$form-grid-gutter-width: 10px !default;
-$form-group-margin-bottom: 1rem !default;
+$form-check-input-indeterminate-color: $component-active-color !default;
+$form-check-input-indeterminate-bg-color: $component-active-bg !default;
+$form-check-input-indeterminate-border-color: $form-check-input-indeterminate-bg-color !default;
+$form-check-input-indeterminate-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path fill='none' stroke='#{$form-check-input-indeterminate-color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/></svg>") !default;
+
+$form-switch-color: rgba(0, 0, 0, .25) !default;
+$form-switch-width: 2em !default;
+$form-switch-padding-left: $form-switch-width + .5em !default;
+$form-switch-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$form-switch-color}'/></svg>") !default;
+$form-switch-border-radius: $form-switch-width !default;
+
+$form-switch-focus-color: $input-focus-border-color !default;
+$form-switch-focus-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$form-switch-focus-color}'/></svg>") !default;
+
+$form-switch-checked-color: $component-active-color !default;
+$form-switch-checked-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$form-switch-checked-color}'/></svg>") !default;
+$form-switch-checked-bg-position: right center !default;
+
+$form-check-inline-margin-right: 1rem !default;
$input-group-addon-color: $input-color !default;
$input-group-addon-bg: $gray-200 !default;
$input-group-addon-border-color: $input-border-color !default;
-$custom-forms-transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
-
-$custom-control-gutter: .5rem !default;
-$custom-control-spacer-x: 1rem !default;
-$custom-control-cursor: null !default;
-
-$custom-control-indicator-size: 1rem !default;
-$custom-control-indicator-bg: $input-bg !default;
-
-$custom-control-indicator-bg-size: 50% 50% !default;
-$custom-control-indicator-box-shadow: $input-box-shadow !default;
-$custom-control-indicator-border-color: $gray-500 !default;
-$custom-control-indicator-border-width: $input-border-width !default;
-
-$custom-control-label-color: null !default;
-
-$custom-control-indicator-disabled-bg: $input-disabled-bg !default;
-$custom-control-label-disabled-color: $gray-600 !default;
-
-$custom-control-indicator-checked-color: $component-active-color !default;
-$custom-control-indicator-checked-bg: $component-active-bg !default;
-$custom-control-indicator-checked-disabled-bg: rgba(theme-color("primary"), .5) !default;
-$custom-control-indicator-checked-box-shadow: null !default;
-$custom-control-indicator-checked-border-color: $custom-control-indicator-checked-bg !default;
-
-$custom-control-indicator-focus-box-shadow: $input-focus-box-shadow !default;
-$custom-control-indicator-focus-border-color: $input-focus-border-color !default;
-
-$custom-control-indicator-active-color: $component-active-color !default;
-$custom-control-indicator-active-bg: lighten($component-active-bg, 35%) !default;
-$custom-control-indicator-active-box-shadow: null !default;
-$custom-control-indicator-active-border-color: $custom-control-indicator-active-bg !default;
-
-$custom-checkbox-indicator-border-radius: $border-radius !default;
-$custom-checkbox-indicator-icon-checked: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'><path fill='#{$custom-control-indicator-checked-color}' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/></svg>") !default;
-
-$custom-checkbox-indicator-indeterminate-bg: $component-active-bg !default;
-$custom-checkbox-indicator-indeterminate-color: $custom-control-indicator-checked-color !default;
-$custom-checkbox-indicator-icon-indeterminate: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'><path stroke='#{$custom-checkbox-indicator-indeterminate-color}' d='M0 2h4'/></svg>") !default;
-$custom-checkbox-indicator-indeterminate-box-shadow: null !default;
-$custom-checkbox-indicator-indeterminate-border-color: $custom-checkbox-indicator-indeterminate-bg !default;
-
-$custom-radio-indicator-border-radius: 50% !default;
-$custom-radio-indicator-icon-checked: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'><circle r='3' fill='#{$custom-control-indicator-checked-color}'/></svg>") !default;
-
-$custom-switch-width: $custom-control-indicator-size * 1.75 !default;
-$custom-switch-indicator-border-radius: $custom-control-indicator-size / 2 !default;
-$custom-switch-indicator-size: subtract($custom-control-indicator-size, $custom-control-indicator-border-width * 4) !default;
-
-$custom-select-padding-y: $input-padding-y !default;
-$custom-select-padding-x: $input-padding-x !default;
-$custom-select-font-family: $input-font-family !default;
-$custom-select-font-size: $input-font-size !default;
-$custom-select-height: $input-height !default;
-$custom-select-indicator-padding: 1rem !default; // Extra padding to account for the presence of the background-image based indicator
-$custom-select-font-weight: $input-font-weight !default;
-$custom-select-line-height: $input-line-height !default;
-$custom-select-color: $input-color !default;
-$custom-select-disabled-color: $gray-600 !default;
-$custom-select-bg: $input-bg !default;
-$custom-select-disabled-bg: $gray-200 !default;
-$custom-select-bg-size: 8px 10px !default; // In pixels because image dimensions
-$custom-select-indicator-color: $gray-800 !default;
-$custom-select-indicator: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'><path fill='#{$custom-select-indicator-color}' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>") !default;
-$custom-select-background: escape-svg($custom-select-indicator) no-repeat right $custom-select-padding-x center / $custom-select-bg-size !default; // Used so we can have multiple background elements (e.g., arrow and feedback icon)
-
-$custom-select-feedback-icon-padding-right: add(1em * .75, (2 * $custom-select-padding-y * .75) + $custom-select-padding-x + $custom-select-indicator-padding) !default;
-$custom-select-feedback-icon-position: center right ($custom-select-padding-x + $custom-select-indicator-padding) !default;
-$custom-select-feedback-icon-size: $input-height-inner-half $input-height-inner-half !default;
-
-$custom-select-border-width: $input-border-width !default;
-$custom-select-border-color: $input-border-color !default;
-$custom-select-border-radius: $border-radius !default;
-$custom-select-box-shadow: inset 0 1px 2px rgba($black, .075) !default;
-
-$custom-select-focus-border-color: $input-focus-border-color !default;
-$custom-select-focus-width: $input-focus-width !default;
-$custom-select-focus-box-shadow: 0 0 0 $custom-select-focus-width $input-btn-focus-color !default;
-
-$custom-select-padding-y-sm: $input-padding-y-sm !default;
-$custom-select-padding-x-sm: $input-padding-x-sm !default;
-$custom-select-font-size-sm: $input-font-size-sm !default;
-$custom-select-height-sm: $input-height-sm !default;
-
-$custom-select-padding-y-lg: $input-padding-y-lg !default;
-$custom-select-padding-x-lg: $input-padding-x-lg !default;
-$custom-select-font-size-lg: $input-font-size-lg !default;
-$custom-select-height-lg: $input-height-lg !default;
-
-$custom-range-track-width: 100% !default;
-$custom-range-track-height: .5rem !default;
-$custom-range-track-cursor: pointer !default;
-$custom-range-track-bg: $gray-300 !default;
-$custom-range-track-border-radius: 1rem !default;
-$custom-range-track-box-shadow: inset 0 .25rem .25rem rgba($black, .1) !default;
-
-$custom-range-thumb-width: 1rem !default;
-$custom-range-thumb-height: $custom-range-thumb-width !default;
-$custom-range-thumb-bg: $component-active-bg !default;
-$custom-range-thumb-border: 0 !default;
-$custom-range-thumb-border-radius: 1rem !default;
-$custom-range-thumb-box-shadow: 0 .1rem .25rem rgba($black, .1) !default;
-$custom-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-focus-box-shadow !default;
-$custom-range-thumb-focus-box-shadow-width: $input-focus-width !default; // For focus box shadow issue in IE/Edge
-$custom-range-thumb-active-bg: lighten($component-active-bg, 35%) !default;
-$custom-range-thumb-disabled-bg: $gray-500 !default;
-
-$custom-file-height: $input-height !default;
-$custom-file-height-inner: $input-height-inner !default;
-$custom-file-focus-border-color: $input-focus-border-color !default;
-$custom-file-focus-box-shadow: $input-focus-box-shadow !default;
-$custom-file-disabled-bg: $input-disabled-bg !default;
-
-$custom-file-padding-y: $input-padding-y !default;
-$custom-file-padding-x: $input-padding-x !default;
-$custom-file-line-height: $input-line-height !default;
-$custom-file-font-family: $input-font-family !default;
-$custom-file-font-weight: $input-font-weight !default;
-$custom-file-color: $input-color !default;
-$custom-file-bg: $input-bg !default;
-$custom-file-border-width: $input-border-width !default;
-$custom-file-border-color: $input-border-color !default;
-$custom-file-border-radius: $input-border-radius !default;
-$custom-file-box-shadow: $input-box-shadow !default;
-$custom-file-button-color: $custom-file-color !default;
-$custom-file-button-bg: $input-group-addon-bg !default;
-$custom-file-text: (
- en: "Browse"
-) !default;
+
+$form-select-padding-y: $input-padding-y !default;
+$form-select-padding-x: $input-padding-x !default;
+$form-select-font-family: $input-font-family !default;
+$form-select-font-size: $input-font-size !default;
+$form-select-height: $input-height !default;
+$form-select-indicator-padding: 1rem !default; // Extra padding to account for the presence of the background-image based indicator
+$form-select-font-weight: $input-font-weight !default;
+$form-select-line-height: $input-line-height !default;
+$form-select-color: $input-color !default;
+$form-select-disabled-color: $gray-600 !default;
+$form-select-bg: $input-bg !default;
+$form-select-disabled-bg: $gray-200 !default;
+$form-select-disabled-border-color: $input-disabled-border-color !default;
+$form-select-bg-position: right $form-select-padding-x center !default;
+$form-select-bg-size: 16px 12px !default; // In pixels because image dimensions
+$form-select-indicator-color: $gray-800 !default;
+$form-select-indicator: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='#{$form-select-indicator-color}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/></svg>") !default;
+
+$form-select-feedback-icon-padding-right: add(1em * .75, (2 * $form-select-padding-y * .75) + $form-select-padding-x + $form-select-indicator-padding) !default;
+$form-select-feedback-icon-position: center right ($form-select-padding-x + $form-select-indicator-padding) !default;
+$form-select-feedback-icon-size: $input-height-inner-half $input-height-inner-half !default;
+
+$form-select-border-width: $input-border-width !default;
+$form-select-border-color: $input-border-color !default;
+$form-select-border-radius: $border-radius !default;
+$form-select-box-shadow: $box-shadow-inset !default;
+
+$form-select-focus-border-color: $input-focus-border-color !default;
+$form-select-focus-width: $input-focus-width !default;
+$form-select-focus-box-shadow: 0 0 0 $form-select-focus-width $input-btn-focus-color !default;
+
+$form-select-padding-y-sm: $input-padding-y-sm !default;
+$form-select-padding-x-sm: $input-padding-x-sm !default;
+$form-select-font-size-sm: $input-font-size-sm !default;
+$form-select-height-sm: $input-height-sm !default;
+
+$form-select-padding-y-lg: $input-padding-y-lg !default;
+$form-select-padding-x-lg: $input-padding-x-lg !default;
+$form-select-font-size-lg: $input-font-size-lg !default;
+$form-select-height-lg: $input-height-lg !default;
+
+$form-range-track-width: 100% !default;
+$form-range-track-height: .5rem !default;
+$form-range-track-cursor: pointer !default;
+$form-range-track-bg: $gray-300 !default;
+$form-range-track-border-radius: 1rem !default;
+$form-range-track-box-shadow: $box-shadow-inset !default;
+
+$form-range-thumb-width: 1rem !default;
+$form-range-thumb-height: $form-range-thumb-width !default;
+$form-range-thumb-bg: $component-active-bg !default;
+$form-range-thumb-border: 0 !default;
+$form-range-thumb-border-radius: 1rem !default;
+$form-range-thumb-box-shadow: 0 .1rem .25rem rgba($black, .1) !default;
+$form-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-focus-box-shadow !default;
+$form-range-thumb-focus-box-shadow-width: $input-focus-width !default; // For focus box shadow issue in Edge
+$form-range-thumb-active-bg: lighten($component-active-bg, 35%) !default;
+$form-range-thumb-disabled-bg: $gray-500 !default;
+$form-range-thumb-transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
+
+$form-file-height: $input-height !default;
+$form-file-focus-border-color: $input-focus-border-color !default;
+$form-file-focus-box-shadow: $input-focus-box-shadow !default;
+$form-file-disabled-bg: $input-disabled-bg !default;
+$form-file-disabled-border-color: $input-disabled-border-color !default;
+
+$form-file-padding-y: $input-padding-y !default;
+$form-file-padding-x: $input-padding-x !default;
+$form-file-line-height: $input-line-height !default;
+$form-file-font-family: $input-font-family !default;
+$form-file-font-weight: $input-font-weight !default;
+$form-file-color: $input-color !default;
+$form-file-bg: $input-bg !default;
+$form-file-border-width: $input-border-width !default;
+$form-file-border-color: $input-border-color !default;
+$form-file-border-radius: $input-border-radius !default;
+$form-file-box-shadow: $input-box-shadow !default;
+$form-file-button-color: $form-file-color !default;
+$form-file-button-bg: $input-group-addon-bg !default;
+
+$form-file-padding-y-sm: $input-padding-y-sm !default;
+$form-file-padding-x-sm: $input-padding-x-sm !default;
+$form-file-font-size-sm: $input-font-size-sm !default;
+$form-file-height-sm: $input-height-sm !default;
+
+$form-file-padding-y-lg: $input-padding-y-lg !default;
+$form-file-padding-x-lg: $input-padding-x-lg !default;
+$form-file-font-size-lg: $input-font-size-lg !default;
+$form-file-height-lg: $input-height-lg !default;
// Form validation
$form-feedback-margin-top: $form-text-margin-top !default;
-$form-feedback-font-size: $small-font-size !default;
-$form-feedback-valid-color: theme-color("success") !default;
-$form-feedback-invalid-color: theme-color("danger") !default;
+$form-feedback-font-size: $form-text-font-size !default;
+$form-feedback-font-style: $form-text-font-style !default;
+$form-feedback-valid-color: $success !default;
+$form-feedback-invalid-color: $danger !default;
$form-feedback-icon-valid-color: $form-feedback-valid-color !default;
-$form-feedback-icon-valid: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'><path fill='#{$form-feedback-icon-valid-color}' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/></svg>") !default;
+$form-feedback-icon-valid: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path fill='#{$form-feedback-icon-valid-color}' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/></svg>") !default;
$form-feedback-icon-invalid-color: $form-feedback-invalid-color !default;
$form-feedback-icon-invalid: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='#{$form-feedback-icon-invalid-color}' viewBox='0 0 12 12'><circle cx='6' cy='6' r='4.5'/><path stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/><circle cx='6' cy='8.2' r='.6' fill='#{$form-feedback-icon-invalid-color}' stroke='none'/></svg>") !default;
-$form-validation-states: () !default;
-$form-validation-states: map-merge(
- (
- "valid": (
- "color": $form-feedback-valid-color,
- "icon": $form-feedback-icon-valid
- ),
- "invalid": (
- "color": $form-feedback-invalid-color,
- "icon": $form-feedback-icon-invalid
- ),
+// scss-docs-start form-validation-states
+$form-validation-states: (
+ "valid": (
+ "color": $form-feedback-valid-color,
+ "icon": $form-feedback-icon-valid
),
- $form-validation-states
-);
+ "invalid": (
+ "color": $form-feedback-invalid-color,
+ "icon": $form-feedback-icon-invalid
+ )
+) !default;
+// scss-docs-end form-validation-states
// Z-index master list
//
// Warning: Avoid customizing these values. They're used for a bird's eye view
// of components dependent on the z-axis and are designed to all work together.
+// scss-docs-start zindex-stack
$zindex-dropdown: 1000 !default;
$zindex-sticky: 1020 !default;
$zindex-fixed: 1030 !default;
@@ -688,12 +834,14 @@ $zindex-modal-backdrop: 1040 !default;
$zindex-modal: 1050 !default;
$zindex-popover: 1060 !default;
$zindex-tooltip: 1070 !default;
+// scss-docs-end zindex-stack
// Navs
$nav-link-padding-y: .5rem !default;
$nav-link-padding-x: 1rem !default;
+$nav-link-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out !default;
$nav-link-disabled-color: $gray-600 !default;
$nav-tabs-border-color: $gray-300 !default;
@@ -708,14 +856,11 @@ $nav-pills-border-radius: $border-radius !default;
$nav-pills-link-active-color: $component-active-color !default;
$nav-pills-link-active-bg: $component-active-bg !default;
-$nav-divider-color: $gray-200 !default;
-$nav-divider-margin-y: $spacer / 2 !default;
-
// Navbar
$navbar-padding-y: $spacer / 2 !default;
-$navbar-padding-x: $spacer !default;
+$navbar-padding-x: null !default;
$navbar-nav-link-padding-x: .5rem !default;
@@ -724,24 +869,27 @@ $navbar-brand-font-size: $font-size-lg !default;
$nav-link-height: $font-size-base * $line-height-base + $nav-link-padding-y * 2 !default;
$navbar-brand-height: $navbar-brand-font-size * $line-height-base !default;
$navbar-brand-padding-y: ($nav-link-height - $navbar-brand-height) / 2 !default;
+$navbar-brand-margin-right: 1rem !default;
$navbar-toggler-padding-y: .25rem !default;
$navbar-toggler-padding-x: .75rem !default;
$navbar-toggler-font-size: $font-size-lg !default;
$navbar-toggler-border-radius: $btn-border-radius !default;
+$navbar-toggler-focus-width: $btn-focus-width !default;
+$navbar-toggler-transition: box-shadow .15s ease-in-out !default;
-$navbar-dark-color: rgba($white, .5) !default;
+$navbar-dark-color: rgba($white, .55) !default;
$navbar-dark-hover-color: rgba($white, .75) !default;
$navbar-dark-active-color: $white !default;
$navbar-dark-disabled-color: rgba($white, .25) !default;
-$navbar-dark-toggler-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'><path stroke='#{$navbar-dark-color}' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/></svg>") !default;
+$navbar-dark-toggler-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><path stroke='#{$navbar-dark-color}' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/></svg>") !default;
$navbar-dark-toggler-border-color: rgba($white, .1) !default;
-$navbar-light-color: rgba($black, .5) !default;
+$navbar-light-color: rgba($black, .55) !default;
$navbar-light-hover-color: rgba($black, .7) !default;
$navbar-light-active-color: rgba($black, .9) !default;
$navbar-light-disabled-color: rgba($black, .3) !default;
-$navbar-light-toggler-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'><path stroke='#{$navbar-light-color}' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/></svg>") !default;
+$navbar-light-toggler-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><path stroke='#{$navbar-light-color}' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/></svg>") !default;
$navbar-light-toggler-border-color: rgba($black, .1) !default;
$navbar-light-brand-color: $navbar-light-active-color !default;
@@ -765,8 +913,8 @@ $dropdown-border-radius: $border-radius !default;
$dropdown-border-width: $border-width !default;
$dropdown-inner-border-radius: subtract($dropdown-border-radius, $dropdown-border-width) !default;
$dropdown-divider-bg: $gray-200 !default;
-$dropdown-divider-margin-y: $nav-divider-margin-y !default;
-$dropdown-box-shadow: 0 .5rem 1rem rgba($black, .175) !default;
+$dropdown-divider-margin-y: $spacer / 2 !default;
+$dropdown-box-shadow: $box-shadow !default;
$dropdown-link-color: $gray-900 !default;
$dropdown-link-hover-color: darken($gray-900, 5%) !default;
@@ -777,8 +925,8 @@ $dropdown-link-active-bg: $component-active-bg !default;
$dropdown-link-disabled-color: $gray-600 !default;
-$dropdown-item-padding-y: .25rem !default;
-$dropdown-item-padding-x: 1.5rem !default;
+$dropdown-item-padding-y: $spacer / 4 !default;
+$dropdown-item-padding-x: $spacer !default;
$dropdown-header-color: $gray-600 !default;
$dropdown-header-padding: $dropdown-padding-y $dropdown-item-padding-x !default;
@@ -786,17 +934,18 @@ $dropdown-header-padding: $dropdown-padding-y $dropdown-item-padding-x
// Pagination
-$pagination-padding-y: .5rem !default;
+$pagination-padding-y: .375rem !default;
$pagination-padding-x: .75rem !default;
$pagination-padding-y-sm: .25rem !default;
$pagination-padding-x-sm: .5rem !default;
$pagination-padding-y-lg: .75rem !default;
$pagination-padding-x-lg: 1.5rem !default;
-$pagination-line-height: 1.25 !default;
$pagination-color: $link-color !default;
$pagination-bg: $white !default;
$pagination-border-width: $border-width !default;
+$pagination-border-radius: $border-radius !default;
+$pagination-margin-left: -$pagination-border-width !default;
$pagination-border-color: $gray-300 !default;
$pagination-focus-box-shadow: $input-btn-focus-box-shadow !default;
@@ -815,35 +964,26 @@ $pagination-disabled-bg: $white !default;
$pagination-disabled-border-color: $gray-300 !default;
-// Jumbotron
-
-$jumbotron-padding: 2rem !default;
-$jumbotron-color: null !default;
-$jumbotron-bg: $gray-200 !default;
-
-
// Cards
-$card-spacer-y: .75rem !default;
-$card-spacer-x: 1.25rem !default;
+$card-spacer-y: $spacer !default;
+$card-spacer-x: $spacer !default;
+$card-title-spacer-y: $spacer / 2 !default;
$card-border-width: $border-width !default;
$card-border-radius: $border-radius !default;
$card-border-color: rgba($black, .125) !default;
$card-inner-border-radius: subtract($card-border-radius, $card-border-width) !default;
+$card-cap-padding-y: $card-spacer-y / 2 !default;
+$card-cap-padding-x: $card-spacer-x !default;
$card-cap-bg: rgba($black, .03) !default;
$card-cap-color: null !default;
$card-height: null !default;
$card-color: null !default;
$card-bg: $white !default;
-$card-img-overlay-padding: 1.25rem !default;
+$card-img-overlay-padding: $spacer !default;
$card-group-margin: $grid-gutter-width / 2 !default;
-$card-deck-margin: $card-group-margin !default;
-
-$card-columns-count: 3 !default;
-$card-columns-gap: 1.25rem !default;
-$card-columns-margin: $card-spacer-y !default;
// Tooltips
@@ -854,8 +994,8 @@ $tooltip-color: $white !default;
$tooltip-bg: $black !default;
$tooltip-border-radius: $border-radius !default;
$tooltip-opacity: .9 !default;
-$tooltip-padding-y: .25rem !default;
-$tooltip-padding-x: .5rem !default;
+$tooltip-padding-y: $spacer / 4 !default;
+$tooltip-padding-x: $spacer / 2 !default;
$tooltip-margin: 0 !default;
$tooltip-arrow-width: .8rem !default;
@@ -866,7 +1006,7 @@ $tooltip-arrow-color: $tooltip-bg !default;
$form-feedback-tooltip-padding-y: $tooltip-padding-y !default;
$form-feedback-tooltip-padding-x: $tooltip-padding-x !default;
$form-feedback-tooltip-font-size: $tooltip-font-size !default;
-$form-feedback-tooltip-line-height: $line-height-base !default;
+$form-feedback-tooltip-line-height: null !default;
$form-feedback-tooltip-opacity: $tooltip-opacity !default;
$form-feedback-tooltip-border-radius: $tooltip-border-radius !default;
@@ -880,16 +1020,16 @@ $popover-border-width: $border-width !default;
$popover-border-color: rgba($black, .2) !default;
$popover-border-radius: $border-radius-lg !default;
$popover-inner-border-radius: subtract($popover-border-radius, $popover-border-width) !default;
-$popover-box-shadow: 0 .25rem .5rem rgba($black, .2) !default;
+$popover-box-shadow: $box-shadow !default;
$popover-header-bg: darken($popover-bg, 3%) !default;
$popover-header-color: $headings-color !default;
$popover-header-padding-y: .5rem !default;
-$popover-header-padding-x: .75rem !default;
+$popover-header-padding-x: $spacer !default;
$popover-body-color: $body-color !default;
-$popover-body-padding-y: $popover-header-padding-y !default;
-$popover-body-padding-x: $popover-header-padding-x !default;
+$popover-body-padding-y: $spacer !default;
+$popover-body-padding-x: $spacer !default;
$popover-arrow-width: 1rem !default;
$popover-arrow-height: .5rem !default;
@@ -908,8 +1048,8 @@ $toast-color: null !default;
$toast-background-color: rgba($white, .85) !default;
$toast-border-width: 1px !default;
$toast-border-color: rgba(0, 0, 0, .1) !default;
-$toast-border-radius: .25rem !default;
-$toast-box-shadow: 0 .25rem .75rem rgba($black, .1) !default;
+$toast-border-radius: $border-radius !default;
+$toast-box-shadow: $box-shadow !default;
$toast-header-color: $gray-600 !default;
$toast-header-background-color: rgba($white, .85) !default;
@@ -918,25 +1058,18 @@ $toast-header-border-color: rgba(0, 0, 0, .05) !default;
// Badges
-$badge-font-size: 75% !default;
+$badge-font-size: .75em !default;
$badge-font-weight: $font-weight-bold !default;
+$badge-color: $white !default;
$badge-padding-y: .25em !default;
-$badge-padding-x: .4em !default;
+$badge-padding-x: .5em !default;
$badge-border-radius: $border-radius !default;
-$badge-transition: $btn-transition !default;
-$badge-focus-width: $input-btn-focus-width !default;
-
-$badge-pill-padding-x: .6em !default;
-// Use a higher than normal value to ensure completely rounded edges when
-// customizing padding or font-size on labels.
-$badge-pill-border-radius: 10rem !default;
-
// Modals
// Padding applied to the modal body
-$modal-inner-padding: 1rem !default;
+$modal-inner-padding: $spacer !default;
// Margin between elements in footer, must be lower than or equal to 2 * $modal-inner-padding
$modal-footer-margin-between: .5rem !default;
@@ -952,8 +1085,8 @@ $modal-content-border-color: rgba($black, .2) !default;
$modal-content-border-width: $border-width !default;
$modal-content-border-radius: $border-radius-lg !default;
$modal-content-inner-border-radius: subtract($modal-content-border-radius, $modal-content-border-width) !default;
-$modal-content-box-shadow-xs: 0 .25rem .5rem rgba($black, .5) !default;
-$modal-content-box-shadow-sm-up: 0 .5rem 1rem rgba($black, .5) !default;
+$modal-content-box-shadow-xs: $box-shadow-sm !default;
+$modal-content-box-shadow-sm-up: $box-shadow !default;
$modal-backdrop-bg: $black !default;
$modal-backdrop-opacity: .5 !default;
@@ -961,14 +1094,14 @@ $modal-header-border-color: $border-color !default;
$modal-footer-border-color: $modal-header-border-color !default;
$modal-header-border-width: $modal-content-border-width !default;
$modal-footer-border-width: $modal-header-border-width !default;
-$modal-header-padding-y: 1rem !default;
-$modal-header-padding-x: 1rem !default;
+$modal-header-padding-y: $modal-inner-padding !default;
+$modal-header-padding-x: $modal-inner-padding !default;
$modal-header-padding: $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility
-$modal-xl: 1140px !default;
-$modal-lg: 800px !default;
-$modal-md: 500px !default;
$modal-sm: 300px !default;
+$modal-md: 500px !default;
+$modal-lg: 800px !default;
+$modal-xl: 1140px !default;
$modal-fade-transform: translate(0, -50px) !default;
$modal-show-transform: none !default;
@@ -980,8 +1113,8 @@ $modal-scale-transform: scale(1.02) !default;
//
// Define alert colors, border radius, and padding.
-$alert-padding-y: .75rem !default;
-$alert-padding-x: 1.25rem !default;
+$alert-padding-y: $spacer !default;
+$alert-padding-x: $spacer !default;
$alert-margin-bottom: 1rem !default;
$alert-border-radius: $border-radius !default;
$alert-link-font-weight: $font-weight-bold !default;
@@ -998,9 +1131,9 @@ $progress-height: 1rem !default;
$progress-font-size: $font-size-base * .75 !default;
$progress-bg: $gray-200 !default;
$progress-border-radius: $border-radius !default;
-$progress-box-shadow: inset 0 .1rem .1rem rgba($black, .1) !default;
+$progress-box-shadow: $box-shadow-inset !default;
$progress-bar-color: $white !default;
-$progress-bar-bg: theme-color("primary") !default;
+$progress-bar-bg: $primary !default;
$progress-bar-animation-timing: 1s linear infinite !default;
$progress-bar-transition: width .6s ease !default;
@@ -1013,8 +1146,10 @@ $list-group-border-color: rgba($black, .125) !default;
$list-group-border-width: $border-width !default;
$list-group-border-radius: $border-radius !default;
-$list-group-item-padding-y: .75rem !default;
-$list-group-item-padding-x: 1.25rem !default;
+$list-group-item-padding-y: $spacer / 2 !default;
+$list-group-item-padding-x: $spacer !default;
+$list-group-item-bg-level: -9 !default;
+$list-group-item-color-level: 6 !default;
$list-group-hover-bg: $gray-100 !default;
$list-group-active-color: $component-active-color !default;
@@ -1038,33 +1173,28 @@ $thumbnail-bg: $body-bg !default;
$thumbnail-border-width: $border-width !default;
$thumbnail-border-color: $gray-300 !default;
$thumbnail-border-radius: $border-radius !default;
-$thumbnail-box-shadow: 0 1px 2px rgba($black, .075) !default;
+$thumbnail-box-shadow: $box-shadow-sm !default;
// Figures
-$figure-caption-font-size: 90% !default;
+$figure-caption-font-size: $small-font-size !default;
$figure-caption-color: $gray-600 !default;
// Breadcrumbs
$breadcrumb-font-size: null !default;
-
-$breadcrumb-padding-y: .75rem !default;
-$breadcrumb-padding-x: 1rem !default;
-$breadcrumb-item-padding: .5rem !default;
-
+$breadcrumb-padding-y: $spacer / 2 !default;
+$breadcrumb-padding-x: $spacer !default;
+$breadcrumb-item-padding-x: .5rem !default;
$breadcrumb-margin-bottom: 1rem !default;
-
$breadcrumb-bg: $gray-200 !default;
$breadcrumb-divider-color: $gray-600 !default;
$breadcrumb-active-color: $gray-600 !default;
$breadcrumb-divider: quote("/") !default;
-
$breadcrumb-border-radius: $border-radius !default;
-
// Carousel
$carousel-control-color: $white !default;
@@ -1077,16 +1207,20 @@ $carousel-indicator-width: 30px !default;
$carousel-indicator-height: 3px !default;
$carousel-indicator-hit-area-height: 10px !default;
$carousel-indicator-spacer: 3px !default;
+$carousel-indicator-opacity: .5 !default;
$carousel-indicator-active-bg: $white !default;
+$carousel-indicator-active-opacity: 1 !default;
$carousel-indicator-transition: opacity .6s ease !default;
$carousel-caption-width: 70% !default;
$carousel-caption-color: $white !default;
+$carousel-caption-padding-y: 1.25rem !default;
+$carousel-caption-spacer: 1.25rem !default;
$carousel-control-icon-width: 20px !default;
-$carousel-control-prev-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' width='8' height='8' viewBox='0 0 8 8'><path d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/></svg>") !default;
-$carousel-control-next-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' width='8' height='8' viewBox='0 0 8 8'><path d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/></svg>") !default;
+$carousel-control-prev-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'><path d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/></svg>") !default;
+$carousel-control-next-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'><path d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/></svg>") !default;
$carousel-transition-duration: .6s !default;
$carousel-transition: transform $carousel-transition-duration ease-in-out !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`)
@@ -1094,9 +1228,10 @@ $carousel-transition: transform $carousel-transition-duration eas
// Spinners
-$spinner-width: 2rem !default;
-$spinner-height: $spinner-width !default;
-$spinner-border-width: .25em !default;
+$spinner-width: 2rem !default;
+$spinner-height: $spinner-width !default;
+$spinner-border-width: .25em !default;
+$spinner-animation-speed: .75s !default;
$spinner-width-sm: 1rem !default;
$spinner-height-sm: $spinner-width-sm !default;
@@ -1113,7 +1248,7 @@ $close-text-shadow: 0 1px 0 $white !default;
// Code
-$code-font-size: 87.5% !default;
+$code-font-size: $small-font-size !default;
$code-color: $pink !default;
$kbd-padding-y: .2rem !default;
@@ -1122,19 +1257,4 @@ $kbd-font-size: $code-font-size !default;
$kbd-color: $white !default;
$kbd-bg: $gray-900 !default;
-$pre-color: $gray-900 !default;
-$pre-scrollable-max-height: 340px !default;
-
-
-// Utilities
-
-$displays: none, inline, inline-block, block, table, table-row, table-cell, flex, inline-flex !default;
-$overflows: auto, hidden !default;
-$positions: static, relative, absolute, fixed, sticky !default;
-$user-selects: all, auto, none !default;
-
-
-// Printing
-
-$print-page-size: a3 !default;
-$print-body-min-width: map-get($grid-breakpoints, "lg") !default;
+$pre-color: null !default;
diff --git a/assets/stylesheets/bootstrap/bootstrap-utilities.scss b/assets/stylesheets/bootstrap/bootstrap-utilities.scss
new file mode 100644
index 0000000..e4790cf
--- /dev/null
+++ b/assets/stylesheets/bootstrap/bootstrap-utilities.scss
@@ -0,0 +1,18 @@
+/*!
+ * Bootstrap Utilities v5.0.0-alpha1 (https://getbootstrap.com/)
+ * Copyright 2011-2020 The Bootstrap Authors
+ * Copyright 2011-2020 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ */
+
+// Configuration
+
+@import "functions";
+@import "variables";
+@import "mixins";
+@import "utilities";
+
+
+// Utilities
+
+@import "utilities/api";
diff --git a/assets/stylesheets/bootstrap/forms/_form-check.scss b/assets/stylesheets/bootstrap/forms/_form-check.scss
new file mode 100644
index 0000000..f163578
--- /dev/null
+++ b/assets/stylesheets/bootstrap/forms/_form-check.scss
@@ -0,0 +1,142 @@
+//
+// Check/radio
+//
+
+.form-check {
+ display: block;
+ min-height: $form-check-min-height;
+ padding-left: $form-check-padding-left;
+ margin-bottom: $form-check-margin-bottom;
+
+ .form-check-input {
+ float: left;
+ margin-left: $form-check-padding-left * -1;
+ }
+}
+
+.form-check-input {
+ width: $form-check-input-width;
+ height: $form-check-input-width;
+ margin-top: ($line-height-base - $form-check-input-width) / 2; // line-height minus check height
+ vertical-align: top;
+ background-color: $form-check-input-bg;
+ background-repeat: no-repeat;
+ background-position: center;
+ background-size: contain;
+ border: $form-check-input-border;
+ appearance: none;
+ color-adjust: exact; // Keep themed appearance for print
+ @include transition($form-check-transition);
+
+ &[type="checkbox"] {
+ @include border-radius($form-check-input-border-radius);
+ }
+
+ &[type="radio"] {
+ // stylelint-disable-next-line property-blacklist
+ border-radius: $form-check-radio-border-radius;
+ }
+
+ &:active {
+ filter: $form-check-input-active-filter;
+ }
+
+ &:focus {
+ border-color: $form-check-input-focus-border;
+ outline: 0;
+ box-shadow: $form-check-input-focus-box-shadow;
+ }
+
+ &:checked {
+ background-color: $form-check-input-checked-bg-color;
+ border-color: $form-check-input-checked-border-color;
+
+ &[type="checkbox"] {
+ @if $enable-gradients {
+ background-image: escape-svg($form-check-input-checked-bg-image), var(--bs-gradient);
+ } @else {
+ background-image: escape-svg($form-check-input-checked-bg-image);
+ }
+ }
+
+ &[type="radio"] {
+ @if $enable-gradients {
+ background-image: escape-svg($form-check-radio-checked-bg-image), var(--bs-gradient);
+ } @else {
+ background-image: escape-svg($form-check-radio-checked-bg-image);
+ }
+ }
+ }
+
+ &[type="checkbox"]:indeterminate {
+ background-color: $form-check-input-indeterminate-bg-color;
+ border-color: $form-check-input-indeterminate-border-color;
+
+ @if $enable-gradients {
+ background-image: escape-svg($form-check-input-indeterminate-bg-image), var(--bs-gradient);
+ } @else {
+ background-image: escape-svg($form-check-input-indeterminate-bg-image);
+ }
+ }
+
+ &:disabled {
+ pointer-events: none;
+ filter: none;
+ opacity: .5;
+ }
+
+ // Use disabled attribute in addition of :disabled pseudo-class
+ // See: https://github.com/twbs/bootstrap/issues/28247
+ &[disabled],
+ &:disabled {
+ ~ .form-check-label {
+ opacity: .5;
+ }
+ }
+}
+
+.form-check-label {
+ color: $form-check-label-color;
+ cursor: $form-check-label-cursor;
+}
+
+//
+// Switch
+//
+
+.form-switch {
+ padding-left: $form-switch-padding-left;
+
+ .form-check-input {
+ width: $form-switch-width;
+ margin-left: $form-switch-padding-left * -1;
+ background-image: escape-svg($form-switch-bg-image);
+ background-position: left center;
+ @include border-radius($form-switch-border-radius);
+
+ &:focus {
+ background-image: escape-svg($form-switch-focus-bg-image);
+ }
+
+ &:checked {
+ background-position: $form-switch-checked-bg-position;
+
+ @if $enable-gradients {
+ background-image: escape-svg($form-switch-checked-bg-image), var(--bs-gradient);
+ } @else {
+ background-image: escape-svg($form-switch-checked-bg-image);
+ }
+ }
+ }
+}
+
+.form-check-inline {
+ display: inline-block;
+ margin-right: $form-check-inline-margin-right;
+}
+
+.btn-check {
+ position: absolute;
+ clip: rect(0, 0, 0, 0);
+ pointer-events: none;
+}
diff --git a/assets/stylesheets/bootstrap/forms/_form-control.scss b/assets/stylesheets/bootstrap/forms/_form-control.scss
new file mode 100644
index 0000000..6686ecf
--- /dev/null
+++ b/assets/stylesheets/bootstrap/forms/_form-control.scss
@@ -0,0 +1,116 @@
+//
+// Textual form controls
+//
+
+.form-control {
+ display: block;
+ width: 100%;
+ min-height: $input-height;
+ padding: $input-padding-y $input-padding-x;
+ font-family: $input-font-family;
+ @include font-size($input-font-size);
+ font-weight: $input-font-weight;
+ line-height: $input-line-height;
+ color: $input-color;
+ background-color: $input-bg;
+ background-clip: padding-box;
+ border: $input-border-width solid $input-border-color;
+ appearance: none; // Fix appearance for date inputs in Safari
+
+ // Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
+ @include border-radius($input-border-radius, 0);
+
+ @include box-shadow($input-box-shadow);
+ @include transition($input-transition);
+
+ // Customize the `:focus` state to imitate native WebKit styles.
+ &:focus {
+ color: $input-focus-color;
+ background-color: $input-focus-bg;
+ border-color: $input-focus-border-color;
+ outline: 0;
+ @if $enable-shadows {
+ @include box-shadow($input-box-shadow, $input-focus-box-shadow);
+ } @else {
+ // Avoid using mixin so we can pass custom focus shadow properly
+ box-shadow: $input-focus-box-shadow;
+ }
+ }
+
+ // Placeholder
+ &::placeholder {
+ color: $input-placeholder-color;
+ // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
+ opacity: 1;
+ }
+
+ // Disabled and read-only inputs
+ //
+ // HTML5 says that controls under a fieldset > legend:first-child won't be
+ // disabled if the fieldset is disabled. Due to implementation difficulty, we
+ // don't honor that edge case; we style them as disabled anyway.
+ &:disabled,
+ &[readonly] {
+ background-color: $input-disabled-bg;
+ border-color: $input-disabled-border-color;
+ // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
+ opacity: 1;
+ }
+}
+
+// Readonly controls as plain text
+//
+// Apply class to a readonly input to make it appear like regular plain
+// text (without any border, background color, focus indicator)
+
+.form-control-plaintext {
+ display: block;
+ width: 100%;
+ padding: $input-padding-y 0;
+ margin-bottom: 0; // match inputs if this class comes on inputs with default margins
+ line-height: $input-line-height;
+ color: $input-plaintext-color;
+ background-color: transparent;
+ border: solid transparent;
+ border-width: $input-border-width 0;
+
+ &.form-control-sm,
+ &.form-control-lg {
+ padding-right: 0;
+ padding-left: 0;
+ }
+}
+
+// Form control sizing
+//
+// Build on `.form-control` with modifier classes to decrease or increase the
+// height and font-size of form controls.
+//
+// Repeated in `_input_group.scss` to avoid Sass extend issues.
+
+.form-control-sm {
+ min-height: $input-height-sm;
+ padding: $input-padding-y-sm $input-padding-x-sm;
+ @include font-size($input-font-size-sm);
+ @include border-radius($input-border-radius-sm);
+}
+
+.form-control-lg {
+ min-height: $input-height-lg;
+ padding: $input-padding-y-lg $input-padding-x-lg;
+ @include font-size($input-font-size-lg);
+ @include border-radius($input-border-radius-lg);
+}
+
+.form-control-color {
+ max-width: 3rem;
+ padding: $input-padding-y;
+}
+
+.form-control-color::-moz-color-swatch {
+ @include border-radius($input-border-radius);
+}
+
+.form-control-color::-webkit-color-swatch {
+ @include border-radius($input-border-radius);
+}
diff --git a/assets/stylesheets/bootstrap/forms/_form-file.scss b/assets/stylesheets/bootstrap/forms/_form-file.scss
new file mode 100644
index 0000000..5bc4afc
--- /dev/null
+++ b/assets/stylesheets/bootstrap/forms/_form-file.scss
@@ -0,0 +1,91 @@
+.form-file {
+ --bs-form-file-height: #{$form-file-height};
+ position: relative;
+}
+
+.form-file-input {
+ position: relative;
+ z-index: 2;
+ width: 100%;
+ height: var(--bs-form-file-height);
+ margin: 0;
+ opacity: 0;
+
+ &:focus-within ~ .form-file-label {
+ border-color: $form-file-focus-border-color;
+ box-shadow: $form-file-focus-box-shadow;
+ }
+
+ // Use disabled attribute in addition of :disabled pseudo-class
+ // See: https://github.com/twbs/bootstrap/issues/28247
+ &[disabled] ~ .form-file-label .form-file-text,
+ &:disabled ~ .form-file-label .form-file-text {
+ background-color: $form-file-disabled-bg;
+ border-color: $form-file-disabled-border-color;
+ }
+}
+
+.form-file-label {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ z-index: 1;
+ display: flex;
+ height: var(--bs-form-file-height);
+ border-color: $form-file-border-color;
+ @include border-radius($form-file-border-radius);
+ @include box-shadow($form-file-box-shadow);
+}
+
+.form-file-text {
+ display: block;
+ flex-grow: 1;
+ padding: $form-file-padding-y $form-file-padding-x;
+ overflow: hidden;
+ font-family: $form-file-font-family;
+ font-weight: $form-file-font-weight;
+ line-height: $form-file-line-height;
+ color: $form-file-color;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ background-color: $form-file-bg;
+ border-color: inherit;
+ border-style: solid;
+ border-width: $form-file-border-width;
+ @include border-left-radius(inherit);
+}
+
+.form-file-button {
+ display: block;
+ flex-shrink: 0;
+ padding: $form-file-padding-y $form-file-padding-x;
+ margin-left: -$form-file-border-width;
+ line-height: $form-file-line-height;
+ color: $form-file-button-color;
+ @include gradient-bg($form-file-button-bg);
+ border-color: inherit;
+ border-style: solid;
+ border-width: $form-file-border-width;
+ @include border-right-radius(inherit);
+}
+
+.form-file-sm {
+ --bs-form-file-height: #{$form-file-height-sm};
+ @include font-size($form-file-font-size-sm);
+
+ .form-file-text,
+ .form-file-button {
+ padding: $form-file-padding-y-sm $form-file-padding-x-sm;
+ }
+}
+
+.form-file-lg {
+ --bs-form-file-height: #{$form-file-height-lg};
+ @include font-size($form-file-font-size-lg);
+
+ .form-file-text,
+ .form-file-button {
+ padding: $form-file-padding-y-lg $form-file-padding-x-lg;
+ }
+}
diff --git a/assets/stylesheets/bootstrap/forms/_form-range.scss b/assets/stylesheets/bootstrap/forms/_form-range.scss
new file mode 100644
index 0000000..6cf9013
--- /dev/null
+++ b/assets/stylesheets/bootstrap/forms/_form-range.scss
@@ -0,0 +1,136 @@
+// Range
+//
+// Style range inputs the same across browsers. Vendor-specific rules for pseudo
+// elements cannot be mixed. As such, there are no shared styles for focus or
+// active states on prefixed selectors.
+
+.form-range {
+ width: 100%;
+ height: add($form-range-thumb-height, $form-range-thumb-focus-box-shadow-width * 2);
+ padding: 0; // Need to reset padding
+ background-color: transparent;
+ appearance: none;
+
+ &:focus {
+ outline: none;
+
+ // Pseudo-elements must be split across multiple rulesets to have an effect.
+ // No box-shadow() mixin for focus accessibility.
+ &::-webkit-slider-thumb { box-shadow: $form-range-thumb-focus-box-shadow; }
+ &::-moz-range-thumb { box-shadow: $form-range-thumb-focus-box-shadow; }
+ &::-ms-thumb { box-shadow: $form-range-thumb-focus-box-shadow; }
+ }
+
+ &::-moz-focus-outer {
+ border: 0;
+ }
+
+ &::-webkit-slider-thumb {
+ width: $form-range-thumb-width;
+ height: $form-range-thumb-height;
+ margin-top: ($form-range-track-height - $form-range-thumb-height) / 2; // Webkit specific
+ @include gradient-bg($form-range-thumb-bg);
+ border: $form-range-thumb-border;
+ @include border-radius($form-range-thumb-border-radius);
+ @include box-shadow($form-range-thumb-box-shadow);
+ @include transition($form-range-thumb-transition);
+ appearance: none;
+
+ &:active {
+ @include gradient-bg($form-range-thumb-active-bg);
+ }
+ }
+
+ &::-webkit-slider-runnable-track {
+ width: $form-range-track-width;
+ height: $form-range-track-height;
+ color: transparent; // Why?
+ cursor: $form-range-track-cursor;
+ background-color: $form-range-track-bg;
+ border-color: transparent;
+ @include border-radius($form-range-track-border-radius);
+ @include box-shadow($form-range-track-box-shadow);
+ }
+
+ &::-moz-range-thumb {
+ width: $form-range-thumb-width;
+ height: $form-range-thumb-height;
+ @include gradient-bg($form-range-thumb-bg);
+ border: $form-range-thumb-border;
+ @include border-radius($form-range-thumb-border-radius);
+ @include box-shadow($form-range-thumb-box-shadow);
+ @include transition($form-range-thumb-transition);
+ appearance: none;
+
+ &:active {
+ @include gradient-bg($form-range-thumb-active-bg);
+ }
+ }
+
+ &::-moz-range-track {
+ width: $form-range-track-width;
+ height: $form-range-track-height;
+ color: transparent;
+ cursor: $form-range-track-cursor;
+ background-color: $form-range-track-bg;
+ border-color: transparent; // Firefox specific?
+ @include border-radius($form-range-track-border-radius);
+ @include box-shadow($form-range-track-box-shadow);
+ }
+
+ &::-ms-thumb {
+ width: $form-range-thumb-width;
+ height: $form-range-thumb-height;
+ margin-top: 0; // Edge specific
+ margin-right: $form-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
+ margin-left: $form-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
+ @include gradient-bg($form-range-thumb-bg);
+ border: $form-range-thumb-border;
+ @include border-radius($form-range-thumb-border-radius);
+ @include box-shadow($form-range-thumb-box-shadow);
+ @include transition($form-range-thumb-transition);
+ appearance: none;
+
+ &:active {
+ @include gradient-bg($form-range-thumb-active-bg);
+ }
+ }
+
+ &::-ms-track {
+ width: $form-range-track-width;
+ height: $form-range-track-height;
+ color: transparent;
+ cursor: $form-range-track-cursor;
+ background-color: transparent;
+ border-color: transparent;
+ border-width: $form-range-thumb-height / 2;
+ @include box-shadow($form-range-track-box-shadow);
+ }
+
+ &::-ms-fill-lower {
+ background-color: $form-range-track-bg;
+ @include border-radius($form-range-track-border-radius);
+ }
+
+ &::-ms-fill-upper {
+ margin-right: 15px; // arbitrary?
+ background-color: $form-range-track-bg;
+ @include border-radius($form-range-track-border-radius);
+ }
+
+ &:disabled {
+ pointer-events: none;
+
+ &::-webkit-slider-thumb {
+ background-color: $form-range-thumb-disabled-bg;
+ }
+
+ &::-moz-range-thumb {
+ background-color: $form-range-thumb-disabled-bg;
+ }
+
+ &::-ms-thumb {
+ background-color: $form-range-thumb-disabled-bg;
+ }
+ }
+}
diff --git a/assets/stylesheets/bootstrap/forms/_form-select.scss b/assets/stylesheets/bootstrap/forms/_form-select.scss
new file mode 100644
index 0000000..e4cab08
--- /dev/null
+++ b/assets/stylesheets/bootstrap/forms/_form-select.scss
@@ -0,0 +1,82 @@
+// Select
+//
+// Replaces the browser default select with a custom one, mostly pulled from
+// https://primer.github.io/.
+
+.form-select {
+ display: block;
+ width: 100%;
+ height: $form-select-height;
+ padding: $form-select-padding-y ($form-select-padding-x + $form-select-indicator-padding) $form-select-padding-y $form-select-padding-x;
+ font-family: $form-select-font-family;
+ @include font-size($form-select-font-size);
+ font-weight: $form-select-font-weight;
+ line-height: $form-select-line-height;
+ color: $form-select-color;
+ vertical-align: middle;
+ background-color: $form-select-bg;
+ background-image: escape-svg($form-select-indicator);
+ background-repeat: no-repeat;
+ background-position: $form-select-bg-position;
+ background-size: $form-select-bg-size;
+ border: $form-select-border-width solid $form-select-border-color;
+ @include border-radius($form-select-border-radius, 0);
+ @include box-shadow($form-select-box-shadow);
+ appearance: none;
+
+ &:focus {
+ border-color: $form-select-focus-border-color;
+ outline: 0;
+ @if $enable-shadows {
+ @include box-shadow($form-select-box-shadow, $form-select-focus-box-shadow);
+ } @else {
+ // Avoid using mixin so we can pass custom focus shadow properly
+ box-shadow: $form-select-focus-box-shadow;
+ }
+
+ &::-ms-value {
+ // For visual consistency with other platforms/browsers,
+ // suppress the default white text on blue background highlight given to
+ // the selected option text when the (still closed) <select> receives focus
+ // in Edge.
+ // See https://github.com/twbs/bootstrap/issues/19398.
+ color: $input-color;
+ background-color: $input-bg;
+ }
+ }
+
+ &[multiple],
+ &[size]:not([size="1"]) {
+ height: auto;
+ padding-right: $form-select-padding-x;
+ background-image: none;
+ }
+
+ &:disabled {
+ color: $form-select-disabled-color;
+ background-color: $form-select-disabled-bg;
+ border-color: $form-select-disabled-border-color;
+ }
+
+ // Remove outline from select box in FF
+ &:-moz-focusring {
+ color: transparent;
+ text-shadow: 0 0 0 $form-select-color;
+ }
+}
+
+.form-select-sm {
+ height: $form-select-height-sm;
+ padding-top: $form-select-padding-y-sm;
+ padding-bottom: $form-select-padding-y-sm;
+ padding-left: $form-select-padding-x-sm;
+ @include font-size($form-select-font-size-sm);
+}
+
+.form-select-lg {
+ height: $form-select-height-lg;
+ padding-top: $form-select-padding-y-lg;
+ padding-bottom: $form-select-padding-y-lg;
+ padding-left: $form-select-padding-x-lg;
+ @include font-size($form-select-font-size-lg);
+}
diff --git a/assets/stylesheets/bootstrap/forms/_form-text.scss b/assets/stylesheets/bootstrap/forms/_form-text.scss
new file mode 100644
index 0000000..f080d1a
--- /dev/null
+++ b/assets/stylesheets/bootstrap/forms/_form-text.scss
@@ -0,0 +1,11 @@
+//
+// Form text
+//
+
+.form-text {
+ margin-top: $form-text-margin-top;
+ @include font-size($form-text-font-size);
+ font-style: $form-text-font-style;
+ font-weight: $form-text-font-weight;
+ color: $form-text-color;
+}
diff --git a/assets/stylesheets/bootstrap/forms/_input-group.scss b/assets/stylesheets/bootstrap/forms/_input-group.scss
new file mode 100644
index 0000000..c8e86ce
--- /dev/null
+++ b/assets/stylesheets/bootstrap/forms/_input-group.scss
@@ -0,0 +1,140 @@
+//
+// Base styles
+//
+
+.input-group {
+ position: relative;
+ display: flex;
+ flex-wrap: wrap; // For form validation feedback
+ align-items: stretch;
+ width: 100%;
+
+ > .form-control,
+ > .form-select,
+ > .form-file {
+ position: relative; // For focus state's z-index
+ flex: 1 1 auto;
+ width: 1%;
+ min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
+ }
+
+ // Bring the "active" form control to the top of surrounding elements
+ > .form-control:focus,
+ > .form-select:focus,
+ > .form-file .form-file-input:focus ~ .form-file-label {
+ z-index: 3;
+ }
+
+ // Bring the custom file input above the label
+ > .form-file {
+ > .form-file-input:focus {
+ z-index: 4;
+ }
+
+ &:not(:last-child) > .form-file-label {
+ @include border-right-radius(0);
+ }
+
+ &:not(:first-child) > .form-file-label {
+ @include border-left-radius(0);
+ }
+ }
+
+ // Ensure buttons are always above inputs for more visually pleasing borders.
+ // This isn't needed for `.input-group-text` since it shares the same border-color
+ // as our inputs.
+ .btn {
+ position: relative;
+ z-index: 2;
+
+ &:focus {
+ z-index: 3;
+ }
+ }
+}
+
+
+// Textual addons
+//
+// Serves as a catch-all element for any text or radio/checkbox input you wish
+// to prepend or append to an input.
+
+.input-group-text {
+ display: flex;
+ align-items: center;
+ padding: $input-padding-y $input-padding-x;
+ @include font-size($input-font-size); // Match inputs
+ font-weight: $font-weight-normal;
+ line-height: $input-line-height;
+ color: $input-group-addon-color;
+ text-align: center;
+ white-space: nowrap;
+ background-color: $input-group-addon-bg;
+ border: $input-border-width solid $input-group-addon-border-color;
+ @include border-radius($input-border-radius);
+}
+
+
+// Sizing
+//
+// Remix the default form control sizing classes into new ones for easier
+// manipulation.
+
+.input-group-lg > .form-control {
+ min-height: $input-height-lg;
+}
+
+.input-group-lg > .form-select {
+ height: $input-height-lg;
+}
+
+.input-group-lg > .form-control,
+.input-group-lg > .form-select,
+.input-group-lg > .input-group-text,
+.input-group-lg > .btn {
+ padding: $input-padding-y-lg $input-padding-x-lg;
+ @include font-size($input-font-size-lg);
+ @include border-radius($input-border-radius-lg);
+}
+
+.input-group-sm > .form-control {
+ min-height: $input-height-sm;
+}
+
+.input-group-sm > .form-select {
+ height: $input-height-sm;
+}
+
+.input-group-sm > .form-control,
+.input-group-sm > .form-select,
+.input-group-sm > .input-group-text,
+.input-group-sm > .btn {
+ padding: $input-padding-y-sm $input-padding-x-sm;
+ @include font-size($input-font-size-sm);
+ @include border-radius($input-border-radius-sm);
+}
+
+.input-group-lg > .form-select,
+.input-group-sm > .form-select {
+ padding-right: $form-select-padding-x + $form-select-indicator-padding;
+}
+
+
+// Rounded corners
+//
+// These rulesets must come after the sizing ones to properly override sm and lg
+// border-radius values when extending. They're more specific than we'd like
+// with the `.input-group >` part, but without it, we cannot override the sizing.
+
+// stylelint-disable-next-line no-duplicate-selectors
+.input-group {
+ > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu),
+ > .dropdown-toggle:nth-last-child(n + 3) {
+ @include border-right-radius(0);
+ }
+
+ > :not(:first-child):not(.dropdown-menu) {
+ margin-left: -$input-border-width;
+ @include border-left-radius(0);
+ }
+}
diff --git a/assets/stylesheets/bootstrap/forms/_labels.scss b/assets/stylesheets/bootstrap/forms/_labels.scss
new file mode 100644
index 0000000..39ecafc
--- /dev/null
+++ b/assets/stylesheets/bootstrap/forms/_labels.scss
@@ -0,0 +1,36 @@
+//
+// Labels
+//
+
+.form-label {
+ margin-bottom: $form-label-margin-bottom;
+ @include font-size($form-label-font-size);
+ font-style: $form-label-font-style;
+ font-weight: $form-label-font-weight;
+ color: $form-label-color;
+}
+
+// For use with horizontal and inline forms, when you need the label (or legend)
+// text to align with the form controls.
+.col-form-label {
+ padding-top: add($input-padding-y, $input-border-width);
+ padding-bottom: add($input-padding-y, $input-border-width);
+ margin-bottom: 0; // Override the `<legend>` default
+ @include font-size(inherit); // Override the `<legend>` default
+ font-style: $form-label-font-style;
+ font-weight: $form-label-font-weight;
+ line-height: $input-line-height;
+ color: $form-label-color;
+}
+
+.col-form-label-lg {
+ padding-top: add($input-padding-y-lg, $input-border-width);
+ padding-bottom: add($input-padding-y-lg, $input-border-width);
+ @include font-size($input-font-size-lg);
+}
+
+.col-form-label-sm {
+ padding-top: add($input-padding-y-sm, $input-border-width);
+ padding-bottom: add($input-padding-y-sm, $input-border-width);
+ @include font-size($input-font-size-sm);
+}
diff --git a/assets/stylesheets/bootstrap/forms/_validation.scss b/assets/stylesheets/bootstrap/forms/_validation.scss
new file mode 100644
index 0000000..acd68f2
--- /dev/null
+++ b/assets/stylesheets/bootstrap/forms/_validation.scss
@@ -0,0 +1,12 @@
+// Form validation
+//
+// Provide feedback to users when form field values are valid or invalid. Works
+// primarily for client-side validation via scoped `:invalid` and `:valid`
+// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
+// server-side validation.
+
+// scss-docs-start form-validation-states-loop
+@each $state, $data in $form-validation-states {
+ @include form-validation-state($state, map-get($data, color), map-get($data, icon));
+}
+// scss-docs-end form-validation-states-loop
diff --git a/assets/stylesheets/bootstrap/utilities/_clearfix.scss b/assets/stylesheets/bootstrap/helpers/_clearfix.scss
index e92522a..e92522a 100644
--- a/assets/stylesheets/bootstrap/utilities/_clearfix.scss
+++ b/assets/stylesheets/bootstrap/helpers/_clearfix.scss
diff --git a/assets/stylesheets/bootstrap/helpers/_colored-links.scss b/assets/stylesheets/bootstrap/helpers/_colored-links.scss
new file mode 100644
index 0000000..4eea8d3
--- /dev/null
+++ b/assets/stylesheets/bootstrap/helpers/_colored-links.scss
@@ -0,0 +1,12 @@
+@each $color, $value in $theme-colors {
+ .link-#{$color} {
+ color: $value;
+
+ @if $emphasized-link-hover-darken-percentage != 0 {
+ &:hover,
+ &:focus {
+ color: darken($value, $emphasized-link-hover-darken-percentage);
+ }
+ }
+ }
+}
diff --git a/assets/stylesheets/bootstrap/helpers/_embed.scss b/assets/stylesheets/bootstrap/helpers/_embed.scss
new file mode 100644
index 0000000..924fc0e
--- /dev/null
+++ b/assets/stylesheets/bootstrap/helpers/_embed.scss
@@ -0,0 +1,31 @@
+// Credit: Nicolas Gallagher and SUIT CSS.
+
+.embed-responsive {
+ position: relative;
+ width: 100%;
+
+ &::before {
+ display: block;
+ content: "";
+ }
+
+ .embed-responsive-item,
+ iframe,
+ embed,
+ object,
+ video {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ }
+}
+
+@each $key, $ratio in $embed-responsive-aspect-ratios {
+ .embed-responsive-#{$key} {
+ &::before {
+ padding-top: percentage(map-get($ratio, y) / map-get($ratio, x));
+ }
+ }
+}
diff --git a/assets/stylesheets/bootstrap/helpers/_position.scss b/assets/stylesheets/bootstrap/helpers/_position.scss
new file mode 100644
index 0000000..31851eb
--- /dev/null
+++ b/assets/stylesheets/bootstrap/helpers/_position.scss
@@ -0,0 +1,30 @@
+// Shorthand
+
+.fixed-top {
+ position: fixed;
+ top: 0;
+ right: 0;
+ left: 0;
+ z-index: $zindex-fixed;
+}
+
+.fixed-bottom {
+ position: fixed;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: $zindex-fixed;
+}
+
+// Responsive sticky top
+@each $breakpoint in map-keys($grid-breakpoints) {
+ @include media-breakpoint-up($breakpoint) {
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
+
+ .sticky#{$infix}-top {
+ position: sticky;
+ top: 0;
+ z-index: $zindex-sticky;
+ }
+ }
+}
diff --git a/assets/stylesheets/bootstrap/helpers/_screenreaders.scss b/assets/stylesheets/bootstrap/helpers/_screenreaders.scss
new file mode 100644
index 0000000..c8034d1
--- /dev/null
+++ b/assets/stylesheets/bootstrap/helpers/_screenreaders.scss
@@ -0,0 +1,8 @@
+//
+// Screenreaders
+//
+
+.sr-only,
+.sr-only-focusable:not(:focus) {
+ @include sr-only();
+}
diff --git a/assets/stylesheets/bootstrap/helpers/_stretched-link.scss b/assets/stylesheets/bootstrap/helpers/_stretched-link.scss
new file mode 100644
index 0000000..71a1c75
--- /dev/null
+++ b/assets/stylesheets/bootstrap/helpers/_stretched-link.scss
@@ -0,0 +1,15 @@
+//
+// Stretched link
+//
+
+.stretched-link {
+ &::#{$stretched-link-pseudo-element} {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: $stretched-link-z-index;
+ content: "";
+ }
+}
diff --git a/assets/stylesheets/bootstrap/helpers/_text-truncation.scss b/assets/stylesheets/bootstrap/helpers/_text-truncation.scss
new file mode 100644
index 0000000..6421dac
--- /dev/null
+++ b/assets/stylesheets/bootstrap/helpers/_text-truncation.scss
@@ -0,0 +1,7 @@
+//
+// Text truncation
+//
+
+.text-truncate {
+ @include text-truncate();
+}
diff --git a/assets/stylesheets/bootstrap/mixins/_alert.scss b/assets/stylesheets/bootstrap/mixins/_alert.scss
index db5a7eb..20da83a 100644
--- a/assets/stylesheets/bootstrap/mixins/_alert.scss
+++ b/assets/stylesheets/bootstrap/mixins/_alert.scss
@@ -3,10 +3,6 @@
@include gradient-bg($background);
border-color: $border;
- hr {
- border-top-color: darken($border, 5%);
- }
-
.alert-link {
color: darken($color, 10%);
}
diff --git a/assets/stylesheets/bootstrap/mixins/_background-variant.scss b/assets/stylesheets/bootstrap/mixins/_background-variant.scss
deleted file mode 100644
index 8058018..0000000
--- a/assets/stylesheets/bootstrap/mixins/_background-variant.scss
+++ /dev/null
@@ -1,23 +0,0 @@
-// stylelint-disable declaration-no-important
-
-// Contextual backgrounds
-
-@mixin bg-variant($parent, $color, $ignore-warning: false) {
- #{$parent} {
- background-color: $color !important;
- }
- a#{$parent},
- button#{$parent} {
- @include hover-focus() {
- background-color: darken($color, 10%) !important;
- }
- }
- @include deprecate("The `bg-variant` mixin", "v4.4.0", "v5", $ignore-warning);
-}
-
-@mixin bg-gradient-variant($parent, $color, $ignore-warning: false) {
- #{$parent} {
- background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
- }
- @include deprecate("The `bg-gradient-variant` mixin", "v4.5.0", "v5", $ignore-warning);
-}
diff --git a/assets/stylesheets/bootstrap/mixins/_badge.scss b/assets/stylesheets/bootstrap/mixins/_badge.scss
deleted file mode 100644
index f1c4991..0000000
--- a/assets/stylesheets/bootstrap/mixins/_badge.scss
+++ /dev/null
@@ -1,17 +0,0 @@
-@mixin badge-variant($bg) {
- color: color-yiq($bg);
- background-color: $bg;
-
- @at-root a#{&} {
- @include hover-focus() {
- color: color-yiq($bg);
- background-color: darken($bg, 10%);
- }
-
- &:focus,
- &.focus {
- outline: 0;
- box-shadow: 0 0 0 $badge-focus-width rgba($bg, .5);
- }
- }
-}
diff --git a/assets/stylesheets/bootstrap/mixins/_breakpoints.scss b/assets/stylesheets/bootstrap/mixins/_breakpoints.scss
index 23a5de9..66a0050 100644
--- a/assets/stylesheets/bootstrap/mixins/_breakpoints.scss
+++ b/assets/stylesheets/bootstrap/mixins/_breakpoints.scss
@@ -16,7 +16,10 @@
// md
@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
$n: index($breakpoint-names, $name);
- @return if($n != null and $n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
+ @if not $n {
+ @error "breakpoint `#{$name}` not found in `#{$breakpoints}`";
+ }
+ @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
}
// Minimum breakpoint width. Null for the smallest (first) breakpoint.
@@ -28,18 +31,18 @@
@return if($min != 0, $min, null);
}
-// Maximum breakpoint width. Null for the largest (last) breakpoint.
-// The maximum value is calculated as the minimum of the next one less 0.02px
-// to work around the limitations of `min-` and `max-` prefixes and viewports with fractional widths.
+// Maximum breakpoint width.
+// The maximum value is reduced by 0.02px to work around the limitations of
+// `min-` and `max-` prefixes and viewports with fractional widths.
// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max
// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.
// See https://bugs.webkit.org/show_bug.cgi?id=178261
//
-// >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
+// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
// 767.98px
@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
- $next: breakpoint-next($name, $breakpoints);
- @return if($next, breakpoint-min($next, $breakpoints) - .02, null);
+ $max: map-get($breakpoints, $name);
+ @return if($max and $max > 0, $max - .02, null);
}
// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
@@ -105,7 +108,7 @@
// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
$min: breakpoint-min($name, $breakpoints);
- $max: breakpoint-max($name, $breakpoints);
+ $max: breakpoint-max(breakpoint-next($name, $breakpoints));
@if $min != null and $max != null {
@media (min-width: $min) and (max-width: $max) {
diff --git a/assets/stylesheets/bootstrap/mixins/_buttons.scss b/assets/stylesheets/bootstrap/mixins/_buttons.scss
index d6235aa..09ef0cb 100644
--- a/assets/stylesheets/bootstrap/mixins/_buttons.scss
+++ b/assets/stylesheets/bootstrap/mixins/_buttons.scss
@@ -3,94 +3,104 @@
// Easily pump out default styles, as well as :hover, :focus, :active,
// and disabled options for all buttons
-@mixin button-variant($background, $border, $hover-background: darken($background, 7.5%), $hover-border: darken($border, 10%), $active-background: darken($background, 10%), $active-border: darken($border, 12.5%)) {
- color: color-yiq($background);
+@mixin button-variant(
+ $background,
+ $border,
+ $color: color-contrast($background),
+ $hover-background: darken($background, 7.5%),
+ $hover-border: darken($border, 10%),
+ $hover-color: color-contrast($hover-background),
+ $active-background: darken($background, 10%),
+ $active-border: darken($border, 12.5%),
+ $active-color: color-contrast($active-background)
+) {
+ color: $color;
@include gradient-bg($background);
border-color: $border;
@include box-shadow($btn-box-shadow);
- @include hover() {
- color: color-yiq($hover-background);
+ &:hover {
+ color: $hover-color;
@include gradient-bg($hover-background);
border-color: $hover-border;
}
- &:focus,
- &.focus {
- color: color-yiq($hover-background);
+ .btn-check:focus + &,
+ &:focus {
+ color: $hover-color;
@include gradient-bg($hover-background);
border-color: $hover-border;
@if $enable-shadows {
- @include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
+ @include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
} @else {
// Avoid using mixin so we can pass custom focus shadow properly
- box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
- }
- }
-
- // Disabled comes first so active can properly restyle
- &.disabled,
- &:disabled {
- color: color-yiq($background);
- background-color: $background;
- border-color: $border;
- // Remove CSS gradients if they're enabled
- @if $enable-gradients {
- background-image: none;
+ box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
}
}
- &:not(:disabled):not(.disabled):active,
- &:not(:disabled):not(.disabled).active,
+ .btn-check:checked + &,
+ .btn-check:active + &,
+ &:active,
+ &.active,
.show > &.dropdown-toggle {
- color: color-yiq($active-background);
+ color: $active-color;
background-color: $active-background;
- @if $enable-gradients {
- background-image: none; // Remove the gradient for the pressed/active state
- }
+ // Remove CSS gradients if they're enabled
+ background-image: if($enable-gradients, none, null);
border-color: $active-border;
&:focus {
- @if $enable-shadows and $btn-active-box-shadow != none {
- @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
+ @if $enable-shadows {
+ @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
} @else {
// Avoid using mixin so we can pass custom focus shadow properly
- box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
+ box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
}
}
}
+
+ &:disabled,
+ &.disabled {
+ color: $color;
+ background-color: $background;
+ // Remove CSS gradients if they're enabled
+ background-image: if($enable-gradients, none, null);
+ border-color: $border;
+ }
}
-@mixin button-outline-variant($color, $color-hover: color-yiq($color), $active-background: $color, $active-border: $color) {
+@mixin button-outline-variant(
+ $color,
+ $color-hover: color-contrast($color),
+ $active-background: $color,
+ $active-border: $color,
+ $active-color: color-contrast($active-background)
+) {
color: $color;
border-color: $color;
- @include hover() {
+ &:hover {
color: $color-hover;
background-color: $active-background;
border-color: $active-border;
}
- &:focus,
- &.focus {
+ .btn-check:focus + &,
+ &:focus {
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
}
- &.disabled,
- &:disabled {
- color: $color;
- background-color: transparent;
- }
-
- &:not(:disabled):not(.disabled):active,
- &:not(:disabled):not(.disabled).active,
- .show > &.dropdown-toggle {
- color: color-yiq($active-background);
+ .btn-check:checked + &,
+ .btn-check:active + &,
+ &:active,
+ &.active,
+ &.dropdown-toggle.show {
+ color: $active-color;
background-color: $active-background;
border-color: $active-border;
&:focus {
- @if $enable-shadows and $btn-active-box-shadow != none {
+ @if $enable-shadows {
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5));
} @else {
// Avoid using mixin so we can pass custom focus shadow properly
@@ -98,13 +108,18 @@
}
}
}
+
+ &:disabled,
+ &.disabled {
+ color: $color;
+ background-color: transparent;
+ }
}
// Button sizes
-@mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
+@mixin button-size($padding-y, $padding-x, $font-size, $border-radius) {
padding: $padding-y $padding-x;
@include font-size($font-size);
- line-height: $line-height;
// Manually declare to provide an override to the browser default
@include border-radius($border-radius, 0);
}
diff --git a/assets/stylesheets/bootstrap/mixins/_caret.scss b/assets/stylesheets/bootstrap/mixins/_caret.scss
index 2746649..07d7228 100644
--- a/assets/stylesheets/bootstrap/mixins/_caret.scss
+++ b/assets/stylesheets/bootstrap/mixins/_caret.scss
@@ -1,25 +1,25 @@
-@mixin caret-down() {
+@mixin caret-down {
border-top: $caret-width solid;
border-right: $caret-width solid transparent;
border-bottom: 0;
border-left: $caret-width solid transparent;
}
-@mixin caret-up() {
+@mixin caret-up {
border-top: 0;
border-right: $caret-width solid transparent;
border-bottom: $caret-width solid;
border-left: $caret-width solid transparent;
}
-@mixin caret-right() {
+@mixin caret-right {
border-top: $caret-width solid transparent;
border-right: 0;
border-bottom: $caret-width solid transparent;
border-left: $caret-width solid;
}
-@mixin caret-left() {
+@mixin caret-left {
border-top: $caret-width solid transparent;
border-right: $caret-width solid;
border-bottom: $caret-width solid transparent;
diff --git a/assets/stylesheets/bootstrap/mixins/_clearfix.scss b/assets/stylesheets/bootstrap/mixins/_clearfix.scss
index 11a977b..ffc62bb 100644
--- a/assets/stylesheets/bootstrap/mixins/_clearfix.scss
+++ b/assets/stylesheets/bootstrap/mixins/_clearfix.scss
@@ -1,3 +1,4 @@
+// scss-docs-start clearfix
@mixin clearfix() {
&::after {
display: block;
@@ -5,3 +6,4 @@
content: "";
}
}
+// scss-docs-end clearfix
diff --git a/assets/stylesheets/bootstrap/mixins/_container.scss b/assets/stylesheets/bootstrap/mixins/_container.scss
new file mode 100644
index 0000000..435d003
--- /dev/null
+++ b/assets/stylesheets/bootstrap/mixins/_container.scss
@@ -0,0 +1,9 @@
+// Container mixins
+
+@mixin make-container($padding-x: $container-padding-x) {
+ width: 100%;
+ padding-right: $padding-x;
+ padding-left: $padding-x;
+ margin-right: auto;
+ margin-left: auto;
+}
diff --git a/assets/stylesheets/bootstrap/mixins/_float.scss b/assets/stylesheets/bootstrap/mixins/_float.scss
deleted file mode 100644
index 6b376a2..0000000
--- a/assets/stylesheets/bootstrap/mixins/_float.scss
+++ /dev/null
@@ -1,14 +0,0 @@
-// stylelint-disable declaration-no-important
-
-@mixin float-left() {
- float: left !important;
- @include deprecate("The `float-left` mixin", "v4.3.0", "v5");
-}
-@mixin float-right() {
- float: right !important;
- @include deprecate("The `float-right` mixin", "v4.3.0", "v5");
-}
-@mixin float-none() {
- float: none !important;
- @include deprecate("The `float-none` mixin", "v4.3.0", "v5");
-}
diff --git a/assets/stylesheets/bootstrap/mixins/_forms.scss b/assets/stylesheets/bootstrap/mixins/_forms.scss
index 39b52f3..99ca559 100644
--- a/assets/stylesheets/bootstrap/mixins/_forms.scss
+++ b/assets/stylesheets/bootstrap/mixins/_forms.scss
@@ -1,31 +1,3 @@
-// Form control focus state
-//
-// Generate a customized focus state and for any input with the specified color,
-// which defaults to the `$input-focus-border-color` variable.
-//
-// We highly encourage you to not customize the default value, but instead use
-// this to tweak colors on an as-needed basis. This aesthetic change is based on
-// WebKit's default styles, but applicable to a wider range of browsers. Its
-// usability and accessibility should be taken into account with any change.
-//
-// Example usage: change the default blue border and shadow to white for better
-// contrast against a dark gray background.
-@mixin form-control-focus($ignore-warning: false) {
- &:focus {
- color: $input-focus-color;
- background-color: $input-focus-bg;
- border-color: $input-focus-border-color;
- outline: 0;
- @if $enable-shadows {
- @include box-shadow($input-box-shadow, $input-focus-box-shadow);
- } @else {
- // Avoid using mixin so we can pass custom focus shadow properly
- box-shadow: $input-focus-box-shadow;
- }
- }
- @include deprecate("The `form-control-focus()` mixin", "v4.4.0", "v5", $ignore-warning);
-}
-
// This mixin uses an `if()` technique to be compatible with Dart Sass
// See https://github.com/sass/sass/issues/1873#issuecomment-152293725 for more details
@mixin form-validation-state-selector($state) {
@@ -47,13 +19,13 @@
width: 100%;
margin-top: $form-feedback-margin-top;
@include font-size($form-feedback-font-size);
+ font-style: $form-feedback-font-style;
color: $color;
}
.#{$state}-tooltip {
position: absolute;
top: 100%;
- left: 0;
z-index: 5;
display: none;
max-width: 100%; // Contain to parent when possible
@@ -61,7 +33,7 @@
margin-top: .1rem;
@include font-size($form-feedback-tooltip-font-size);
line-height: $form-feedback-tooltip-line-height;
- color: color-yiq($color);
+ color: color-contrast($color);
background-color: rgba($color, $form-feedback-tooltip-opacity);
@include border-radius($form-feedback-tooltip-border-radius);
}
@@ -87,7 +59,7 @@
&:focus {
border-color: $color;
- box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
+ box-shadow: 0 0 0 $input-focus-width rgba($color, $input-btn-focus-color-opacity);
}
}
}
@@ -102,13 +74,15 @@
}
}
- .custom-select {
+ .form-select {
@include form-validation-state-selector($state) {
border-color: $color;
@if $enable-validation-icons {
- padding-right: $custom-select-feedback-icon-padding-right;
- background: $custom-select-background, escape-svg($icon) $custom-select-bg no-repeat $custom-select-feedback-icon-position / $custom-select-feedback-icon-size;
+ padding-right: $form-select-feedback-icon-padding-right;
+ background-image: escape-svg($form-select-indicator), escape-svg($icon);
+ background-position: $form-select-bg-position, $form-select-feedback-icon-position;
+ background-size: $form-select-bg-size, $form-select-feedback-icon-size;
}
&:focus {
@@ -120,55 +94,36 @@
.form-check-input {
@include form-validation-state-selector($state) {
- ~ .form-check-label {
- color: $color;
- }
-
- ~ .#{$state}-feedback,
- ~ .#{$state}-tooltip {
- display: block;
- }
- }
- }
-
- .custom-control-input {
- @include form-validation-state-selector($state) {
- ~ .custom-control-label {
- color: $color;
-
- &::before {
- border-color: $color;
- }
- }
+ border-color: $color;
&:checked {
- ~ .custom-control-label::before {
- border-color: lighten($color, 10%);
- @include gradient-bg(lighten($color, 10%));
- }
+ background-color: $color;
}
&:focus {
- ~ .custom-control-label::before {
- box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
- }
+ box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
+ }
- &:not(:checked) ~ .custom-control-label::before {
- border-color: $color;
- }
+ ~ .form-check-label {
+ color: $color;
}
}
}
+ .form-check-inline .form-check-input {
+ ~ .#{$state}-feedback {
+ margin-left: .5em;
+ }
+ }
// custom file
- .custom-file-input {
+ .form-file-input {
@include form-validation-state-selector($state) {
- ~ .custom-file-label {
+ ~ .form-file-label {
border-color: $color;
}
&:focus {
- ~ .custom-file-label {
+ ~ .form-file-label {
border-color: $color;
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
}
diff --git a/assets/stylesheets/bootstrap/mixins/_gradients.scss b/assets/stylesheets/bootstrap/mixins/_gradients.scss
index 88c4d64..8b87c0f 100644
--- a/assets/stylesheets/bootstrap/mixins/_gradients.scss
+++ b/assets/stylesheets/bootstrap/mixins/_gradients.scss
@@ -1,10 +1,10 @@
// Gradients
-@mixin gradient-bg($color) {
+@mixin gradient-bg($color: null) {
+ background-color: $color;
+
@if $enable-gradients {
- background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x;
- } @else {
- background-color: $color;
+ background-image: var(--bs-gradient);
}
}
@@ -13,33 +13,31 @@
// Creates two color stops, start and end, by specifying a color and position for each color stop.
@mixin gradient-x($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
- background-repeat: repeat-x;
}
// Vertical gradient, from top to bottom
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
-@mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
+@mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: null, $end-percent: null) {
background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
- background-repeat: repeat-x;
}
@mixin gradient-directional($start-color: $gray-700, $end-color: $gray-800, $deg: 45deg) {
background-image: linear-gradient($deg, $start-color, $end-color);
- background-repeat: repeat-x;
}
+
@mixin gradient-x-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
- background-repeat: no-repeat;
}
+
@mixin gradient-y-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
- background-repeat: no-repeat;
}
+
@mixin gradient-radial($inner-color: $gray-700, $outer-color: $gray-800) {
background-image: radial-gradient(circle, $inner-color, $outer-color);
- background-repeat: no-repeat;
}
+
@mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) {
background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
}
diff --git a/assets/stylesheets/bootstrap/mixins/_grid-framework.scss b/assets/stylesheets/bootstrap/mixins/_grid-framework.scss
deleted file mode 100644
index 6fc8e85..0000000
--- a/assets/stylesheets/bootstrap/mixins/_grid-framework.scss
+++ /dev/null
@@ -1,80 +0,0 @@
-// Framework grid generation
-//
-// Used only by Bootstrap to generate the correct number of grid classes given
-// any value of `$grid-columns`.
-
-@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
- // Common properties for all breakpoints
- %grid-column {
- position: relative;
- width: 100%;
- padding-right: $gutter / 2;
- padding-left: $gutter / 2;
- }
-
- @each $breakpoint in map-keys($breakpoints) {
- $infix: breakpoint-infix($breakpoint, $breakpoints);
-
- @if $columns > 0 {
- // Allow columns to stretch full width below their breakpoints
- @for $i from 1 through $columns {
- .col#{$infix}-#{$i} {
- @extend %grid-column;
- }
- }
- }
-
- .col#{$infix},
- .col#{$infix}-auto {
- @extend %grid-column;
- }
-
- @include media-breakpoint-up($breakpoint, $breakpoints) {
- // Provide basic `.col-{bp}` classes for equal-width flexbox columns
- .col#{$infix} {
- flex-basis: 0;
- flex-grow: 1;
- max-width: 100%;
- }
-
- @if $grid-row-columns > 0 {
- @for $i from 1 through $grid-row-columns {
- .row-cols#{$infix}-#{$i} {
- @include row-cols($i);
- }
- }
- }
-
- .col#{$infix}-auto {
- @include make-col-auto();
- }
-
- @if $columns > 0 {
- @for $i from 1 through $columns {
- .col#{$infix}-#{$i} {
- @include make-col($i, $columns);
- }
- }
- }
-
- .order#{$infix}-first { order: -1; }
-
- .order#{$infix}-last { order: $columns + 1; }
-
- @for $i from 0 through $columns {
- .order#{$infix}-#{$i} { order: $i; }
- }
-
- @if $columns > 0 {
- // `$columns - 1` because offsetting by the width of an entire row isn't possible
- @for $i from 0 through ($columns - 1) {
- @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
- .offset#{$infix}-#{$i} {
- @include make-col-offset($i, $columns);
- }
- }
- }
- }
- }
- }
-}
diff --git a/assets/stylesheets/bootstrap/mixins/_grid.scss b/assets/stylesheets/bootstrap/mixins/_grid.scss
index b72d150..0ef9d1f 100644
--- a/assets/stylesheets/bootstrap/mixins/_grid.scss
+++ b/assets/stylesheets/bootstrap/mixins/_grid.scss
@@ -2,53 +2,39 @@
//
// Generate semantic grid columns with these mixins.
-@mixin make-container($gutter: $grid-gutter-width) {
- width: 100%;
- padding-right: $gutter / 2;
- padding-left: $gutter / 2;
- margin-right: auto;
- margin-left: auto;
-}
-
@mixin make-row($gutter: $grid-gutter-width) {
+ --bs-gutter-x: #{$gutter};
+ --bs-gutter-y: 0;
display: flex;
+ flex: 1 0 100%;
flex-wrap: wrap;
- margin-right: -$gutter / 2;
- margin-left: -$gutter / 2;
-}
-
-// For each breakpoint, define the maximum width of the container in a media query
-@mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) {
- @each $breakpoint, $container-max-width in $max-widths {
- @include media-breakpoint-up($breakpoint, $breakpoints) {
- max-width: $container-max-width;
- }
- }
- @include deprecate("The `make-container-max-widths` mixin", "v4.5.2", "v5");
+ margin-top: calc(var(--bs-gutter-y) * -1); // stylelint-disable-line function-blacklist
+ margin-right: calc(var(--bs-gutter-x) / -2); // stylelint-disable-line function-blacklist
+ margin-left: calc(var(--bs-gutter-x) / -2); // stylelint-disable-line function-blacklist
}
@mixin make-col-ready($gutter: $grid-gutter-width) {
- position: relative;
+ // Add box sizing if only the grid is loaded
+ box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);
// Prevent columns from becoming too narrow when at smaller grid tiers by
- // always setting `width: 100%;`. This works because we use `flex` values
+ // always setting `width: 100%;`. This works because we set the width
// later on to override this initial width.
+ flex-shrink: 0;
width: 100%;
- padding-right: $gutter / 2;
- padding-left: $gutter / 2;
+ max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid
+ padding-right: calc(var(--bs-gutter-x) / 2); // stylelint-disable-line function-blacklist
+ padding-left: calc(var(--bs-gutter-x) / 2); // stylelint-disable-line function-blacklist
+ margin-top: var(--bs-gutter-y);
}
@mixin make-col($size, $columns: $grid-columns) {
- flex: 0 0 percentage($size / $columns);
- // Add a `max-width` to ensure content within each column does not blow out
- // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
- // do not appear to require this.
- max-width: percentage($size / $columns);
+ flex: 0 0 auto;
+ width: percentage($size / $columns);
}
@mixin make-col-auto() {
flex: 0 0 auto;
width: auto;
- max-width: 100%; // Reset earlier grid tiers
}
@mixin make-col-offset($size, $columns: $grid-columns) {
@@ -63,7 +49,73 @@
// style grid.
@mixin row-cols($count) {
& > * {
- flex: 0 0 100% / $count;
- max-width: 100% / $count;
+ flex: 0 0 auto;
+ width: 100% / $count;
+ }
+}
+
+// Framework grid generation
+//
+// Used only by Bootstrap to generate the correct number of grid classes given
+// any value of `$grid-columns`.
+
+@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
+ @each $breakpoint in map-keys($breakpoints) {
+ $infix: breakpoint-infix($breakpoint, $breakpoints);
+
+ @include media-breakpoint-up($breakpoint, $breakpoints) {
+ // Provide basic `.col-{bp}` classes for equal-width flexbox columns
+ .col#{$infix} {
+ flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
+ }
+
+ .row-cols#{$infix}-auto > * {
+ @include make-col-auto();
+ }
+
+ @if $grid-row-columns > 0 {
+ @for $i from 1 through $grid-row-columns {
+ .row-cols#{$infix}-#{$i} {
+ @include row-cols($i);
+ }
+ }
+ }
+
+ .col#{$infix}-auto {
+ @include make-col-auto();
+ }
+
+ @if $columns > 0 {
+ @for $i from 1 through $columns {
+ .col#{$infix}-#{$i} {
+ @include make-col($i, $columns);
+ }
+ }
+
+ // `$columns - 1` because offsetting by the width of an entire row isn't possible
+ @for $i from 0 through ($columns - 1) {
+ @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
+ .offset#{$infix}-#{$i} {
+ @include make-col-offset($i, $columns);
+ }
+ }
+ }
+ }
+
+ // Gutters
+ //
+ // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.
+ @each $key, $value in $gutters {
+ .g#{$infix}-#{$key},
+ .gx#{$infix}-#{$key} {
+ --bs-gutter-x: #{$value};
+ }
+
+ .g#{$infix}-#{$key},
+ .gy#{$infix}-#{$key} {
+ --bs-gutter-y: #{$value};
+ }
+ }
+ }
}
}
diff --git a/assets/stylesheets/bootstrap/mixins/_hover.scss b/assets/stylesheets/bootstrap/mixins/_hover.scss
deleted file mode 100644
index 409f824..0000000
--- a/assets/stylesheets/bootstrap/mixins/_hover.scss
+++ /dev/null
@@ -1,37 +0,0 @@
-// Hover mixin and `$enable-hover-media-query` are deprecated.
-//
-// Originally added during our alphas and maintained during betas, this mixin was
-// designed to prevent `:hover` stickiness on iOS-an issue where hover styles
-// would persist after initial touch.
-//
-// For backward compatibility, we've kept these mixins and updated them to
-// always return their regular pseudo-classes instead of a shimmed media query.
-//
-// Issue: https://github.com/twbs/bootstrap/issues/25195
-
-@mixin hover() {
- &:hover { @content; }
-}
-
-@mixin hover-focus() {
- &:hover,
- &:focus {
- @content;
- }
-}
-
-@mixin plain-hover-focus() {
- &,
- &:hover,
- &:focus {
- @content;
- }
-}
-
-@mixin hover-focus-active() {
- &:hover,
- &:focus,
- &:active {
- @content;
- }
-}
diff --git a/assets/stylesheets/bootstrap/mixins/_image.scss b/assets/stylesheets/bootstrap/mixins/_image.scss
index c971e03..e1df779 100644
--- a/assets/stylesheets/bootstrap/mixins/_image.scss
+++ b/assets/stylesheets/bootstrap/mixins/_image.scss
@@ -7,30 +7,10 @@
//
// Keep images from scaling beyond the width of their parents.
-@mixin img-fluid() {
+@mixin img-fluid {
// Part 1: Set a maximum relative to the parent
max-width: 100%;
// Part 2: Override the height to auto, otherwise images will be stretched
// when setting a width and height attribute on the img element.
height: auto;
}
-
-
-// Retina image
-//
-// Short retina mixin for setting background-image and -size.
-
-@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
- background-image: url($file-1x);
-
- // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio,
- // but doesn't convert dppx=>dpi.
- // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard.
- // Compatibility info: https://caniuse.com/#feat=css-media-resolution
- @media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
- only screen and (min-resolution: 2dppx) { // Standardized
- background-image: url($file-2x);
- background-size: $width-1x $height-1x;
- }
- @include deprecate("`img-retina()`", "v4.3.0", "v5");
-}
diff --git a/assets/stylesheets/bootstrap/mixins/_list-group.scss b/assets/stylesheets/bootstrap/mixins/_list-group.scss
index 0da3531..965fc4b 100644
--- a/assets/stylesheets/bootstrap/mixins/_list-group.scss
+++ b/assets/stylesheets/bootstrap/mixins/_list-group.scss
@@ -6,7 +6,8 @@
background-color: $background;
&.list-group-item-action {
- @include hover-focus() {
+ &:hover,
+ &:focus {
color: $color;
background-color: darken($background, 5%);
}
diff --git a/assets/stylesheets/bootstrap/mixins/_lists.scss b/assets/stylesheets/bootstrap/mixins/_lists.scss
index 251cb07..2518562 100644
--- a/assets/stylesheets/bootstrap/mixins/_lists.scss
+++ b/assets/stylesheets/bootstrap/mixins/_lists.scss
@@ -1,7 +1,7 @@
// Lists
// Unstyled keeps list items block level, just removes default browser padding and list-style
-@mixin list-unstyled() {
+@mixin list-unstyled {
padding-left: 0;
list-style: none;
}
diff --git a/assets/stylesheets/bootstrap/mixins/_nav-divider.scss b/assets/stylesheets/bootstrap/mixins/_nav-divider.scss
deleted file mode 100644
index 3e0ccea..0000000
--- a/assets/stylesheets/bootstrap/mixins/_nav-divider.scss
+++ /dev/null
@@ -1,11 +0,0 @@
-// Horizontal dividers
-//
-// Dividers (basically an hr) within dropdowns and nav lists
-
-@mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y, $ignore-warning: false) {
- height: 0;
- margin: $margin-y 0;
- overflow: hidden;
- border-top: 1px solid $color;
- @include deprecate("The `nav-divider()` mixin", "v4.4.0", "v5", $ignore-warning);
-}
diff --git a/assets/stylesheets/bootstrap/mixins/_pagination.scss b/assets/stylesheets/bootstrap/mixins/_pagination.scss
index af8e16d..52ad1e1 100644
--- a/assets/stylesheets/bootstrap/mixins/_pagination.scss
+++ b/assets/stylesheets/bootstrap/mixins/_pagination.scss
@@ -1,21 +1,28 @@
// Pagination
-@mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
+@mixin pagination-size($padding-y, $padding-x, $font-size, $border-radius) {
.page-link {
padding: $padding-y $padding-x;
@include font-size($font-size);
- line-height: $line-height;
}
.page-item {
- &:first-child {
- .page-link {
- @include border-left-radius($border-radius);
+ @if $pagination-margin-left == (-$pagination-border-width) {
+ &:first-child {
+ .page-link {
+ @include border-left-radius($border-radius);
+ }
}
- }
- &:last-child {
+
+ &:last-child {
+ .page-link {
+ @include border-right-radius($border-radius);
+ }
+ }
+ } @else {
+ //Add border-radius to all pageLinks in case they have left margin
.page-link {
- @include border-right-radius($border-radius);
+ @include border-radius($border-radius);
}
}
}
diff --git a/assets/stylesheets/bootstrap/mixins/_reset-text.scss b/assets/stylesheets/bootstrap/mixins/_reset-text.scss
index 15b4407..354f564 100644
--- a/assets/stylesheets/bootstrap/mixins/_reset-text.scss
+++ b/assets/stylesheets/bootstrap/mixins/_reset-text.scss
@@ -1,6 +1,6 @@
-@mixin reset-text() {
+@mixin reset-text {
font-family: $font-family-base;
- // We deliberately do NOT reset font-size or word-wrap.
+ // We deliberately do NOT reset font-size or overflow-wrap / word-wrap.
font-style: normal;
font-weight: $font-weight-normal;
line-height: $line-height-base;
diff --git a/assets/stylesheets/bootstrap/mixins/_screen-reader.scss b/assets/stylesheets/bootstrap/mixins/_screen-reader.scss
index 2123039..b25fe73 100644
--- a/assets/stylesheets/bootstrap/mixins/_screen-reader.scss
+++ b/assets/stylesheets/bootstrap/mixins/_screen-reader.scss
@@ -1,34 +1,28 @@
+// stylelint-disable declaration-no-important
+
// Only display content to screen readers
//
// See: https://a11yproject.com/posts/how-to-hide-content/
// See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/
-@mixin sr-only() {
- position: absolute;
- width: 1px;
- height: 1px;
- padding: 0;
- margin: -1px; // Fix for https://github.com/twbs/bootstrap/issues/25686
- overflow: hidden;
- clip: rect(0, 0, 0, 0);
- white-space: nowrap;
- border: 0;
+@mixin sr-only {
+ position: absolute !important;
+ width: 1px !important;
+ height: 1px !important;
+ padding: 0 !important;
+ margin: -1px !important; // Fix for https://github.com/twbs/bootstrap/issues/25686
+ overflow: hidden !important;
+ clip: rect(0, 0, 0, 0) !important;
+ white-space: nowrap !important;
+ border: 0 !important;
}
-// Use in conjunction with .sr-only to only display content when it's focused.
+// Use to only display content when it's focused.
//
// Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
-//
-// Credit: HTML5 Boilerplate
-@mixin sr-only-focusable() {
- &:active,
- &:focus {
- position: static;
- width: auto;
- height: auto;
- overflow: visible;
- clip: auto;
- white-space: normal;
+@mixin sr-only-focusable {
+ &:not(:focus) {
+ @include sr-only();
}
}
diff --git a/assets/stylesheets/bootstrap/mixins/_size.scss b/assets/stylesheets/bootstrap/mixins/_size.scss
deleted file mode 100644
index 69e056d..0000000
--- a/assets/stylesheets/bootstrap/mixins/_size.scss
+++ /dev/null
@@ -1,7 +0,0 @@
-// Sizing shortcuts
-
-@mixin size($width, $height: $width) {
- width: $width;
- height: $height;
- @include deprecate("`size()`", "v4.3.0", "v5");
-}
diff --git a/assets/stylesheets/bootstrap/mixins/_table-row.scss b/assets/stylesheets/bootstrap/mixins/_table-row.scss
deleted file mode 100644
index 1ccde6b..0000000
--- a/assets/stylesheets/bootstrap/mixins/_table-row.scss
+++ /dev/null
@@ -1,39 +0,0 @@
-// Tables
-
-@mixin table-row-variant($state, $background, $border: null) {
- // Exact selectors below required to override `.table-striped` and prevent
- // inheritance to nested tables.
- .table-#{$state} {
- &,
- > th,
- > td {
- background-color: $background;
- }
-
- @if $border != null {
- th,
- td,
- thead th,
- tbody + tbody {
- border-color: $border;
- }
- }
- }
-
- // Hover states for `.table-hover`
- // Note: this is not available for cells or rows within `thead` or `tfoot`.
- .table-hover {
- $hover-background: darken($background, 5%);
-
- .table-#{$state} {
- @include hover() {
- background-color: $hover-background;
-
- > td,
- > th {
- background-color: $hover-background;
- }
- }
- }
- }
-}
diff --git a/assets/stylesheets/bootstrap/mixins/_table-variants.scss b/assets/stylesheets/bootstrap/mixins/_table-variants.scss
new file mode 100644
index 0000000..89f482c
--- /dev/null
+++ b/assets/stylesheets/bootstrap/mixins/_table-variants.scss
@@ -0,0 +1,21 @@
+// scss-docs-start table-variant
+@mixin table-variant($state, $background) {
+ .table-#{$state} {
+ $color: color-contrast(opaque($body-bg, $background));
+ $hover-bg: mix($color, $background, percentage($table-hover-bg-factor));
+ $striped-bg: mix($color, $background, percentage($table-striped-bg-factor));
+ $active-bg: mix($color, $background, percentage($table-active-bg-factor));
+
+ --bs-table-bg: #{$background};
+ --bs-table-striped-bg: #{$striped-bg};
+ --bs-table-striped-color: #{color-contrast($striped-bg)};
+ --bs-table-active-bg: #{$active-bg};
+ --bs-table-active-color: #{color-contrast($active-bg)};
+ --bs-table-hover-bg: #{$hover-bg};
+ --bs-table-hover-color: #{color-contrast($hover-bg)};
+
+ color: $color;
+ border-color: mix($color, $background, percentage($table-border-factor));
+ }
+}
+// scss-docs-end table-variant
diff --git a/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss b/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss
deleted file mode 100644
index 5eb8a55..0000000
--- a/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss
+++ /dev/null
@@ -1,17 +0,0 @@
-// stylelint-disable declaration-no-important
-
-// Typography
-
-@mixin text-emphasis-variant($parent, $color, $ignore-warning: false) {
- #{$parent} {
- color: $color !important;
- }
- @if $emphasized-link-hover-darken-percentage != 0 {
- a#{$parent} {
- @include hover-focus() {
- color: darken($color, $emphasized-link-hover-darken-percentage) !important;
- }
- }
- }
- @include deprecate("`text-emphasis-variant()`", "v4.4.0", "v5", $ignore-warning);
-}
diff --git a/assets/stylesheets/bootstrap/mixins/_text-hide.scss b/assets/stylesheets/bootstrap/mixins/_text-hide.scss
deleted file mode 100644
index 3a92301..0000000
--- a/assets/stylesheets/bootstrap/mixins/_text-hide.scss
+++ /dev/null
@@ -1,11 +0,0 @@
-// CSS image replacement
-@mixin text-hide($ignore-warning: false) {
- // stylelint-disable-next-line font-family-no-missing-generic-family-keyword
- font: 0/0 a;
- color: transparent;
- text-shadow: none;
- background-color: transparent;
- border: 0;
-
- @include deprecate("`text-hide()`", "v4.1.0", "v5", $ignore-warning);
-}
diff --git a/assets/stylesheets/bootstrap/mixins/_transition.scss b/assets/stylesheets/bootstrap/mixins/_transition.scss
index 54553de..bf4c00a 100644
--- a/assets/stylesheets/bootstrap/mixins/_transition.scss
+++ b/assets/stylesheets/bootstrap/mixins/_transition.scss
@@ -17,7 +17,7 @@
transition: $transition;
}
- @if $enable-prefers-reduced-motion-media-query and nth($transition, 1) != null and nth($transition, 1) != none {
+ @if $enable-reduced-motion and nth($transition, 1) != null and nth($transition, 1) != none {
@media (prefers-reduced-motion: reduce) {
transition: none;
}
diff --git a/assets/stylesheets/bootstrap/mixins/_utilities.scss b/assets/stylesheets/bootstrap/mixins/_utilities.scss
new file mode 100644
index 0000000..cd9f930
--- /dev/null
+++ b/assets/stylesheets/bootstrap/mixins/_utilities.scss
@@ -0,0 +1,49 @@
+// Utility generator
+// Used to generate utilities & print utilities
+@mixin generate-utility($utility, $infix, $is-rfs-media-query: false) {
+ $values: map-get($utility, values);
+
+ // If the values are a list or string, convert it into a map
+ @if type-of($values) == "string" or type-of(nth($values, 1)) != "list" {
+ $values: zip($values, $values);
+ }
+
+ @each $key, $value in $values {
+ $properties: map-get($utility, property);
+
+ // Multiple properties are possible, for example with vertical or horizontal margins or paddings
+ @if type-of($properties) == "string" {
+ $properties: append((), $properties);
+ }
+
+ // Use custom class if present
+ $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));
+ $property-class: if($property-class == null, "", $property-class);
+
+ $infix: if($property-class == "" and str-slice($infix, 1, 1) == "-", str-slice($infix, 2), $infix);
+
+ // Don't prefix if value key is null (eg. with shadow class)
+ $property-class-modifier: if($key, if($property-class == "" and $infix == "", "", "-") + $key, "");
+
+ @if map-get($utility, rfs) {
+ // Inside the media query
+ @if $is-rfs-media-query {
+ $val: rfs-value($value);
+
+ // Do not render anything if fluid and non fluid values are the same
+ $value: if($val == rfs-fluid-value($value), null, $val);
+ }
+ @else {
+ $value: rfs-fluid-value($value);
+ }
+ }
+
+ @if $value != null {
+ .#{$property-class + $infix + $property-class-modifier} {
+ @each $property in $properties {
+ #{$property}: $value if($enable-important-utilities, !important, null);
+ }
+ }
+ }
+ }
+}
diff --git a/assets/stylesheets/bootstrap/mixins/_visibility.scss b/assets/stylesheets/bootstrap/mixins/_visibility.scss
deleted file mode 100644
index f174673..0000000
--- a/assets/stylesheets/bootstrap/mixins/_visibility.scss
+++ /dev/null
@@ -1,8 +0,0 @@
-// stylelint-disable declaration-no-important
-
-// Visibility
-
-@mixin invisible($visibility) {
- visibility: $visibility !important;
- @include deprecate("`invisible()`", "v4.3.0", "v5");
-}
diff --git a/assets/stylesheets/bootstrap/utilities/_align.scss b/assets/stylesheets/bootstrap/utilities/_align.scss
deleted file mode 100644
index 8b7df9f..0000000
--- a/assets/stylesheets/bootstrap/utilities/_align.scss
+++ /dev/null
@@ -1,8 +0,0 @@
-// stylelint-disable declaration-no-important
-
-.align-baseline { vertical-align: baseline !important; } // Browser default
-.align-top { vertical-align: top !important; }
-.align-middle { vertical-align: middle !important; }
-.align-bottom { vertical-align: bottom !important; }
-.align-text-bottom { vertical-align: text-bottom !important; }
-.align-text-top { vertical-align: text-top !important; }
diff --git a/assets/stylesheets/bootstrap/utilities/_api.scss b/assets/stylesheets/bootstrap/utilities/_api.scss
new file mode 100644
index 0000000..f1545b9
--- /dev/null
+++ b/assets/stylesheets/bootstrap/utilities/_api.scss
@@ -0,0 +1,47 @@
+// Loop over each breakpoint
+@each $breakpoint in map-keys($grid-breakpoints) {
+
+ // Generate media query if needed
+ @include media-breakpoint-up($breakpoint) {
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
+
+ // Loop over each utility property
+ @each $key, $utility in $utilities {
+ // The utility can be disabled with `false`, thus check if the utility is a map first
+ // Only proceed if responsive media queries are enabled or if it's the base media query
+ @if type-of($utility) == "map" and (map-get($utility, responsive) or $infix == "") {
+ @include generate-utility($utility, $infix);
+ }
+ }
+ }
+}
+
+// RFS rescaling
+@media (min-width: $rfs-mq-value) {
+ @each $breakpoint in map-keys($grid-breakpoints) {
+ $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
+
+ @if (map-get($grid-breakpoints, $breakpoint) < $rfs-breakpoint) {
+ // Loop over each utility property
+ @each $key, $utility in $utilities {
+ // The utility can be disabled with `false`, thus check if the utility is a map first
+ // Only proceed if responsive media queries are enabled or if it's the base media query
+ @if type-of($utility) == "map" and map-get($utility, rfs) {
+ @include generate-utility($utility, $infix, true);
+ }
+ }
+ }
+ }
+}
+
+
+// Print utilities
+@media print {
+ @each $key, $utility in $utilities {
+ // The utility can be disabled with `false`, thus check if the utility is a map first
+ // Then check if the utility needs print styles
+ @if type-of($utility) == "map" and map-get($utility, print) == true {
+ @include generate-utility($utility, "-print");
+ }
+ }
+}
diff --git a/assets/stylesheets/bootstrap/utilities/_background.scss b/assets/stylesheets/bootstrap/utilities/_background.scss
deleted file mode 100644
index 3accbc4..0000000
--- a/assets/stylesheets/bootstrap/utilities/_background.scss
+++ /dev/null
@@ -1,19 +0,0 @@
-// stylelint-disable declaration-no-important
-
-@each $color, $value in $theme-colors {
- @include bg-variant(".bg-#{$color}", $value, true);
-}
-
-@if $enable-gradients {
- @each $color, $value in $theme-colors {
- @include bg-gradient-variant(".bg-gradient-#{$color}", $value, true);
- }
-}
-
-.bg-white {
- background-color: $white !important;
-}
-
-.bg-transparent {
- background-color: transparent !important;
-}
diff --git a/assets/stylesheets/bootstrap/utilities/_borders.scss b/assets/stylesheets/bootstrap/utilities/_borders.scss
deleted file mode 100644
index 302f6bf..0000000
--- a/assets/stylesheets/bootstrap/utilities/_borders.scss
+++ /dev/null
@@ -1,75 +0,0 @@
-// stylelint-disable property-blacklist, declaration-no-important
-
-//
-// Border
-//
-
-.border { border: $border-width solid $border-color !important; }
-.border-top { border-top: $border-width solid $border-color !important; }
-.border-right { border-right: $border-width solid $border-color !important; }
-.border-bottom { border-bottom: $border-width solid $border-color !important; }
-.border-left { border-left: $border-width solid $border-color !important; }
-
-.border-0 { border: 0 !important; }
-.border-top-0 { border-top: 0 !important; }
-.border-right-0 { border-right: 0 !important; }
-.border-bottom-0 { border-bottom: 0 !important; }
-.border-left-0 { border-left: 0 !important; }
-
-@each $color, $value in $theme-colors {
- .border-#{$color} {
- border-color: $value !important;
- }
-}
-
-.border-white {
- border-color: $white !important;
-}
-
-//
-// Border-radius
-//
-
-.rounded-sm {
- border-radius: $border-radius-sm !important;
-}
-
-.rounded {
- border-radius: $border-radius !important;
-}
-
-.rounded-top {
- border-top-left-radius: $border-radius !important;
- border-top-right-radius: $border-radius !important;
-}
-
-.rounded-right {
- border-top-right-radius: $border-radius !important;
- border-bottom-right-radius: $border-radius !important;
-}
-
-.rounded-bottom {
- border-bottom-right-radius: $border-radius !important;
- border-bottom-left-radius: $border-radius !important;
-}
-
-.rounded-left {
- border-top-left-radius: $border-radius !important;
- border-bottom-left-radius: $border-radius !important;
-}
-
-.rounded-lg {
- border-radius: $border-radius-lg !important;
-}
-
-.rounded-circle {
- border-radius: 50% !important;
-}
-
-.rounded-pill {
- border-radius: $rounded-pill !important;
-}
-
-.rounded-0 {
- border-radius: 0 !important;
-}
diff --git a/assets/stylesheets/bootstrap/utilities/_display.scss b/assets/stylesheets/bootstrap/utilities/_display.scss
deleted file mode 100644
index 1303679..0000000
--- a/assets/stylesheets/bootstrap/utilities/_display.scss
+++ /dev/null
@@ -1,26 +0,0 @@
-// stylelint-disable declaration-no-important
-
-//
-// Utilities for common `display` values
-//
-
-@each $breakpoint in map-keys($grid-breakpoints) {
- @include media-breakpoint-up($breakpoint) {
- $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
-
- @each $value in $displays {
- .d#{$infix}-#{$value} { display: $value !important; }
- }
- }
-}
-
-
-//
-// Utilities for toggling `display` in print
-//
-
-@media print {
- @each $value in $displays {
- .d-print-#{$value} { display: $value !important; }
- }
-}
diff --git a/assets/stylesheets/bootstrap/utilities/_embed.scss b/assets/stylesheets/bootstrap/utilities/_embed.scss
deleted file mode 100644
index 4497ac0..0000000
--- a/assets/stylesheets/bootstrap/utilities/_embed.scss
+++ /dev/null
@@ -1,39 +0,0 @@
-// Credit: Nicolas Gallagher and SUIT CSS.
-
-.embed-responsive {
- position: relative;
- display: block;
- width: 100%;
- padding: 0;
- overflow: hidden;
-
- &::before {
- display: block;
- content: "";
- }
-
- .embed-responsive-item,
- iframe,
- embed,
- object,
- video {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- width: 100%;
- height: 100%;
- border: 0;
- }
-}
-
-@each $embed-responsive-aspect-ratio in $embed-responsive-aspect-ratios {
- $embed-responsive-aspect-ratio-x: nth($embed-responsive-aspect-ratio, 1);
- $embed-responsive-aspect-ratio-y: nth($embed-responsive-aspect-ratio, 2);
-
- .embed-responsive-#{$embed-responsive-aspect-ratio-x}by#{$embed-responsive-aspect-ratio-y} {
- &::before {
- padding-top: percentage($embed-responsive-aspect-ratio-y / $embed-responsive-aspect-ratio-x);
- }
- }
-}
diff --git a/assets/stylesheets/bootstrap/utilities/_flex.scss b/assets/stylesheets/bootstrap/utilities/_flex.scss
deleted file mode 100644
index 3d4266e..0000000
--- a/assets/stylesheets/bootstrap/utilities/_flex.scss
+++ /dev/null
@@ -1,51 +0,0 @@
-// stylelint-disable declaration-no-important
-
-// Flex variation
-//
-// Custom styles for additional flex alignment options.
-
-@each $breakpoint in map-keys($grid-breakpoints) {
- @include media-breakpoint-up($breakpoint) {
- $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
-
- .flex#{$infix}-row { flex-direction: row !important; }
- .flex#{$infix}-column { flex-direction: column !important; }
- .flex#{$infix}-row-reverse { flex-direction: row-reverse !important; }
- .flex#{$infix}-column-reverse { flex-direction: column-reverse !important; }
-
- .flex#{$infix}-wrap { flex-wrap: wrap !important; }
- .flex#{$infix}-nowrap { flex-wrap: nowrap !important; }
- .flex#{$infix}-wrap-reverse { flex-wrap: wrap-reverse !important; }
- .flex#{$infix}-fill { flex: 1 1 auto !important; }
- .flex#{$infix}-grow-0 { flex-grow: 0 !important; }
- .flex#{$infix}-grow-1 { flex-grow: 1 !important; }
- .flex#{$infix}-shrink-0 { flex-shrink: 0 !important; }
- .flex#{$infix}-shrink-1 { flex-shrink: 1 !important; }
-
- .justify-content#{$infix}-start { justify-content: flex-start !important; }
- .justify-content#{$infix}-end { justify-content: flex-end !important; }
- .justify-content#{$infix}-center { justify-content: center !important; }
- .justify-content#{$infix}-between { justify-content: space-between !important; }
- .justify-content#{$infix}-around { justify-content: space-around !important; }
-
- .align-items#{$infix}-start { align-items: flex-start !important; }
- .align-items#{$infix}-end { align-items: flex-end !important; }
- .align-items#{$infix}-center { align-items: center !important; }
- .align-items#{$infix}-baseline { align-items: baseline !important; }
- .align-items#{$infix}-stretch { align-items: stretch !important; }
-
- .align-content#{$infix}-start { align-content: flex-start !important; }
- .align-content#{$infix}-end { align-content: flex-end !important; }
- .align-content#{$infix}-center { align-content: center !important; }
- .align-content#{$infix}-between { align-content: space-between !important; }
- .align-content#{$infix}-around { align-content: space-around !important; }
- .align-content#{$infix}-stretch { align-content: stretch !important; }
-
- .align-self#{$infix}-auto { align-self: auto !important; }
- .align-self#{$infix}-start { align-self: flex-start !important; }
- .align-self#{$infix}-end { align-self: flex-end !important; }
- .align-self#{$infix}-center { align-self: center !important; }
- .align-self#{$infix}-baseline { align-self: baseline !important; }
- .align-self#{$infix}-stretch { align-self: stretch !important; }
- }
-}
diff --git a/assets/stylesheets/bootstrap/utilities/_float.scss b/assets/stylesheets/bootstrap/utilities/_float.scss
deleted file mode 100644
index 5425084..0000000
--- a/assets/stylesheets/bootstrap/utilities/_float.scss
+++ /dev/null
@@ -1,11 +0,0 @@
-// stylelint-disable declaration-no-important
-
-@each $breakpoint in map-keys($grid-breakpoints) {
- @include media-breakpoint-up($breakpoint) {
- $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
-
- .float#{$infix}-left { float: left !important; }
- .float#{$infix}-right { float: right !important; }
- .float#{$infix}-none { float: none !important; }
- }
-}
diff --git a/assets/stylesheets/bootstrap/utilities/_interactions.scss b/assets/stylesheets/bootstrap/utilities/_interactions.scss
deleted file mode 100644
index cc75fc2..0000000
--- a/assets/stylesheets/bootstrap/utilities/_interactions.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-// stylelint-disable declaration-no-important
-
-@each $value in $user-selects {
- .user-select-#{$value} { user-select: $value !important; }
-}
diff --git a/assets/stylesheets/bootstrap/utilities/_overflow.scss b/assets/stylesheets/bootstrap/utilities/_overflow.scss
deleted file mode 100644
index 8326c30..0000000
--- a/assets/stylesheets/bootstrap/utilities/_overflow.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-// stylelint-disable declaration-no-important
-
-@each $value in $overflows {
- .overflow-#{$value} { overflow: $value !important; }
-}
diff --git a/assets/stylesheets/bootstrap/utilities/_position.scss b/assets/stylesheets/bootstrap/utilities/_position.scss
deleted file mode 100644
index cdf6c11..0000000
--- a/assets/stylesheets/bootstrap/utilities/_position.scss
+++ /dev/null
@@ -1,32 +0,0 @@
-// stylelint-disable declaration-no-important
-
-// Common values
-@each $position in $positions {
- .position-#{$position} { position: $position !important; }
-}
-
-// Shorthand
-
-.fixed-top {
- position: fixed;
- top: 0;
- right: 0;
- left: 0;
- z-index: $zindex-fixed;
-}
-
-.fixed-bottom {
- position: fixed;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: $zindex-fixed;
-}
-
-.sticky-top {
- @supports (position: sticky) {
- position: sticky;
- top: 0;
- z-index: $zindex-sticky;
- }
-}
diff --git a/assets/stylesheets/bootstrap/utilities/_screenreaders.scss b/assets/stylesheets/bootstrap/utilities/_screenreaders.scss
deleted file mode 100644
index 9f26fde..0000000
--- a/assets/stylesheets/bootstrap/utilities/_screenreaders.scss
+++ /dev/null
@@ -1,11 +0,0 @@
-//
-// Screenreaders
-//
-
-.sr-only {
- @include sr-only();
-}
-
-.sr-only-focusable {
- @include sr-only-focusable();
-}
diff --git a/assets/stylesheets/bootstrap/utilities/_shadows.scss b/assets/stylesheets/bootstrap/utilities/_shadows.scss
deleted file mode 100644
index f5d03fc..0000000
--- a/assets/stylesheets/bootstrap/utilities/_shadows.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-// stylelint-disable declaration-no-important
-
-.shadow-sm { box-shadow: $box-shadow-sm !important; }
-.shadow { box-shadow: $box-shadow !important; }
-.shadow-lg { box-shadow: $box-shadow-lg !important; }
-.shadow-none { box-shadow: none !important; }
diff --git a/assets/stylesheets/bootstrap/utilities/_sizing.scss b/assets/stylesheets/bootstrap/utilities/_sizing.scss
deleted file mode 100644
index f376488..0000000
--- a/assets/stylesheets/bootstrap/utilities/_sizing.scss
+++ /dev/null
@@ -1,20 +0,0 @@
-// stylelint-disable declaration-no-important
-
-// Width and height
-
-@each $prop, $abbrev in (width: w, height: h) {
- @each $size, $length in $sizes {
- .#{$abbrev}-#{$size} { #{$prop}: $length !important; }
- }
-}
-
-.mw-100 { max-width: 100% !important; }
-.mh-100 { max-height: 100% !important; }
-
-// Viewport additional helpers
-
-.min-vw-100 { min-width: 100vw !important; }
-.min-vh-100 { min-height: 100vh !important; }
-
-.vw-100 { width: 100vw !important; }
-.vh-100 { height: 100vh !important; }
diff --git a/assets/stylesheets/bootstrap/utilities/_spacing.scss b/assets/stylesheets/bootstrap/utilities/_spacing.scss
deleted file mode 100644
index 3511367..0000000
--- a/assets/stylesheets/bootstrap/utilities/_spacing.scss
+++ /dev/null
@@ -1,73 +0,0 @@
-// stylelint-disable declaration-no-important
-
-// Margin and Padding
-
-@each $breakpoint in map-keys($grid-breakpoints) {
- @include media-breakpoint-up($breakpoint) {
- $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
-
- @each $prop, $abbrev in (margin: m, padding: p) {
- @each $size, $length in $spacers {
- .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; }
- .#{$abbrev}t#{$infix}-#{$size},
- .#{$abbrev}y#{$infix}-#{$size} {
- #{$prop}-top: $length !important;
- }
- .#{$abbrev}r#{$infix}-#{$size},
- .#{$abbrev}x#{$infix}-#{$size} {
- #{$prop}-right: $length !important;
- }
- .#{$abbrev}b#{$infix}-#{$size},
- .#{$abbrev}y#{$infix}-#{$size} {
- #{$prop}-bottom: $length !important;
- }
- .#{$abbrev}l#{$infix}-#{$size},
- .#{$abbrev}x#{$infix}-#{$size} {
- #{$prop}-left: $length !important;
- }
- }
- }
-
- // Negative margins (e.g., where `.mb-n1` is negative version of `.mb-1`)
- @each $size, $length in $spacers {
- @if $size != 0 {
- .m#{$infix}-n#{$size} { margin: -$length !important; }
- .mt#{$infix}-n#{$size},
- .my#{$infix}-n#{$size} {
- margin-top: -$length !important;
- }
- .mr#{$infix}-n#{$size},
- .mx#{$infix}-n#{$size} {
- margin-right: -$length !important;
- }
- .mb#{$infix}-n#{$size},
- .my#{$infix}-n#{$size} {
- margin-bottom: -$length !important;
- }
- .ml#{$infix}-n#{$size},
- .mx#{$infix}-n#{$size} {
- margin-left: -$length !important;
- }
- }
- }
-
- // Some special margin utils
- .m#{$infix}-auto { margin: auto !important; }
- .mt#{$infix}-auto,
- .my#{$infix}-auto {
- margin-top: auto !important;
- }
- .mr#{$infix}-auto,
- .mx#{$infix}-auto {
- margin-right: auto !important;
- }
- .mb#{$infix}-auto,
- .my#{$infix}-auto {
- margin-bottom: auto !important;
- }
- .ml#{$infix}-auto,
- .mx#{$infix}-auto {
- margin-left: auto !important;
- }
- }
-}
diff --git a/assets/stylesheets/bootstrap/utilities/_stretched-link.scss b/assets/stylesheets/bootstrap/utilities/_stretched-link.scss
deleted file mode 100644
index fb5066b..0000000
--- a/assets/stylesheets/bootstrap/utilities/_stretched-link.scss
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// Stretched link
-//
-
-.stretched-link {
- &::after {
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 1;
- // Just in case `pointer-events: none` is set on a parent
- pointer-events: auto;
- content: "";
- // IE10 bugfix, see https://stackoverflow.com/questions/16947967/ie10-hover-pseudo-class-doesnt-work-without-background-color
- background-color: rgba(0, 0, 0, 0);
- }
-}
diff --git a/assets/stylesheets/bootstrap/utilities/_text.scss b/assets/stylesheets/bootstrap/utilities/_text.scss
deleted file mode 100644
index 5d0f1c8..0000000
--- a/assets/stylesheets/bootstrap/utilities/_text.scss
+++ /dev/null
@@ -1,72 +0,0 @@
-// stylelint-disable declaration-no-important
-
-//
-// Text
-//
-
-.text-monospace { font-family: $font-family-monospace !important; }
-
-// Alignment
-
-.text-justify { text-align: justify !important; }
-.text-wrap { white-space: normal !important; }
-.text-nowrap { white-space: nowrap !important; }
-.text-truncate { @include text-truncate(); }
-
-// Responsive alignment
-
-@each $breakpoint in map-keys($grid-breakpoints) {
- @include media-breakpoint-up($breakpoint) {
- $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
-
- .text#{$infix}-left { text-align: left !important; }
- .text#{$infix}-right { text-align: right !important; }
- .text#{$infix}-center { text-align: center !important; }
- }
-}
-
-// Transformation
-
-.text-lowercase { text-transform: lowercase !important; }
-.text-uppercase { text-transform: uppercase !important; }
-.text-capitalize { text-transform: capitalize !important; }
-
-// Weight and italics
-
-.font-weight-light { font-weight: $font-weight-light !important; }
-.font-weight-lighter { font-weight: $font-weight-lighter !important; }
-.font-weight-normal { font-weight: $font-weight-normal !important; }
-.font-weight-bold { font-weight: $font-weight-bold !important; }
-.font-weight-bolder { font-weight: $font-weight-bolder !important; }
-.font-italic { font-style: italic !important; }
-
-// Contextual colors
-
-.text-white { color: $white !important; }
-
-@each $color, $value in $theme-colors {
- @include text-emphasis-variant(".text-#{$color}", $value, true);
-}
-
-.text-body { color: $body-color !important; }
-.text-muted { color: $text-muted !important; }
-
-.text-black-50 { color: rgba($black, .5) !important; }
-.text-white-50 { color: rgba($white, .5) !important; }
-
-// Misc
-
-.text-hide {
- @include text-hide($ignore-warning: true);
-}
-
-.text-decoration-none { text-decoration: none !important; }
-
-.text-break {
- word-break: break-word !important; // IE & < Edge 18
- overflow-wrap: break-word !important;
-}
-
-// Reset
-
-.text-reset { color: inherit !important; }
diff --git a/assets/stylesheets/bootstrap/utilities/_visibility.scss b/assets/stylesheets/bootstrap/utilities/_visibility.scss
deleted file mode 100644
index 7756c3b..0000000
--- a/assets/stylesheets/bootstrap/utilities/_visibility.scss
+++ /dev/null
@@ -1,13 +0,0 @@
-// stylelint-disable declaration-no-important
-
-//
-// Visibility utilities
-//
-
-.visible {
- visibility: visible !important;
-}
-
-.invisible {
- visibility: hidden !important;
-}
diff --git a/assets/stylesheets/bootstrap/vendor/_rfs.scss b/assets/stylesheets/bootstrap/vendor/_rfs.scss
index 497e07e..798753e 100644
--- a/assets/stylesheets/bootstrap/vendor/_rfs.scss
+++ b/assets/stylesheets/bootstrap/vendor/_rfs.scss
@@ -2,30 +2,41 @@
// SCSS RFS mixin
//
-// Automated font-resizing
+// Automated responsive values for font sizes, paddings, margins and much more
//
-// See https://github.com/twbs/rfs
+// Licensed under MIT (https://github.com/twbs/rfs/blob/master/LICENSE)
// Configuration
-// Base font size
-$rfs-base-font-size: 1.25rem !default;
-$rfs-font-size-unit: rem !default;
+// Base value
+$rfs-base-value: 1.25rem !default;
+$rfs-unit: rem !default;
-// Breakpoint at where font-size starts decreasing if screen width is smaller
+@if $rfs-unit != rem and $rfs-unit != px {
+ @error "`#{$rfs-unit}` is not a valid unit for $rfs-unit. Use `px` or `rem`.";
+}
+
+// Breakpoint at where values start decreasing if screen width is smaller
$rfs-breakpoint: 1200px !default;
$rfs-breakpoint-unit: px !default;
-// Resize font-size based on screen height and width
+@if $rfs-breakpoint-unit != px and $rfs-breakpoint-unit != em and $rfs-breakpoint-unit != rem {
+ @error "`#{$rfs-breakpoint-unit}` is not a valid unit for $rfs-breakpoint-unit. Use `px`, `em` or `rem`.";
+}
+
+// Resize values based on screen height and width
$rfs-two-dimensional: false !default;
// Factor of decrease
$rfs-factor: 10 !default;
-@if type-of($rfs-factor) != "number" or $rfs-factor <= 1 {
+@if type-of($rfs-factor) != number or $rfs-factor <= 1 {
@error "`#{$rfs-factor}` is not a valid $rfs-factor, it must be greater than 1.";
}
+// Mode. Possibilities: "min-media-query", "max-media-query"
+$rfs-mode: min-media-query !default;
+
// Generate enable or disable classes. Possibilities: false, "enable" or "disable"
$rfs-class: false !default;
@@ -35,170 +46,267 @@ $rfs-rem-value: 16 !default;
// Safari iframe resize bug: https://github.com/twbs/rfs/issues/14
$rfs-safari-iframe-resize-bug-fix: false !default;
-// Disable RFS by setting $enable-responsive-font-sizes to false
-$enable-responsive-font-sizes: true !default;
+// Disable RFS by setting $enable-rfs to false
+$enable-rfs: true !default;
-// Cache $rfs-base-font-size unit
-$rfs-base-font-size-unit: unit($rfs-base-font-size);
+// Cache $rfs-base-value unit
+$rfs-base-value-unit: unit($rfs-base-value);
-// Remove px-unit from $rfs-base-font-size for calculations
-@if $rfs-base-font-size-unit == "px" {
- $rfs-base-font-size: $rfs-base-font-size / ($rfs-base-font-size * 0 + 1);
+// Remove px-unit from $rfs-base-value for calculations
+@if $rfs-base-value-unit == px {
+ $rfs-base-value: $rfs-base-value / ($rfs-base-value * 0 + 1);
}
-@else if $rfs-base-font-size-unit == "rem" {
- $rfs-base-font-size: $rfs-base-font-size / ($rfs-base-font-size * 0 + 1 / $rfs-rem-value);
+@else if $rfs-base-value-unit == rem {
+ $rfs-base-value: $rfs-base-value / ($rfs-base-value * 0 + 1 / $rfs-rem-value);
}
// Cache $rfs-breakpoint unit to prevent multiple calls
$rfs-breakpoint-unit-cache: unit($rfs-breakpoint);
// Remove unit from $rfs-breakpoint for calculations
-@if $rfs-breakpoint-unit-cache == "px" {
+@if $rfs-breakpoint-unit-cache == px {
$rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1);
}
-@else if $rfs-breakpoint-unit-cache == "rem" or $rfs-breakpoint-unit-cache == "em" {
+@else if $rfs-breakpoint-unit-cache == rem or $rfs-breakpoint-unit-cache == "em" {
$rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1 / $rfs-rem-value);
}
-// Responsive font-size mixin
-@mixin rfs($fs, $important: false) {
- // Cache $fs unit
- $fs-unit: if(type-of($fs) == "number", unit($fs), false);
-
- // Add !important suffix if needed
- $rfs-suffix: if($important, " !important", "");
-
- // If $fs isn't a number (like inherit) or $fs has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
- @if not $fs-unit or $fs-unit != "" and $fs-unit != "px" and $fs-unit != "rem" or $fs == 0 {
- font-size: #{$fs}#{$rfs-suffix};
+// Calculate the media query value
+$rfs-mq-value: if($rfs-breakpoint-unit == px, #{$rfs-breakpoint}px, #{$rfs-breakpoint / $rfs-rem-value}#{$rfs-breakpoint-unit});
+$rfs-mq-property-width: if($rfs-mode == max-media-query, max-width, min-width);
+$rfs-mq-property-height: if($rfs-mode == max-media-query, max-height, min-height);
+
+// Internal mixin used to determine which media query needs to be used
+@mixin _rfs-media-query {
+ @if $rfs-two-dimensional {
+ @if $rfs-mode == max-media-query {
+ @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}), (#{$rfs-mq-property-height}: #{$rfs-mq-value}) {
+ @content;
+ }
+ }
+ @else {
+ @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) and (#{$rfs-mq-property-height}: #{$rfs-mq-value}) {
+ @content;
+ }
+ }
}
@else {
- // Variables for storing static and fluid rescaling
- $rfs-static: null;
- $rfs-fluid: null;
+ @media (#{$rfs-mq-property-width}: #{$rfs-mq-value}) {
+ @content;
+ }
+ }
+}
- // Remove px-unit from $fs for calculations
- @if $fs-unit == "px" {
- $fs: $fs / ($fs * 0 + 1);
+// Internal mixin that adds disable classes to the selector if needed.
+@mixin _rfs-rule {
+ @if $rfs-class == disable and $rfs-mode == max-media-query {
+ // Adding an extra class increases specificity, which prevents the media query to override the property
+ &,
+ .disable-rfs &,
+ &.disable-rfs {
+ @content;
+ }
+ }
+ @else if $rfs-class == enable and $rfs-mode == min-media-query {
+ .enable-rfs &,
+ &.enable-rfs {
+ @content;
}
- @else if $fs-unit == "rem" {
- $fs: $fs / ($fs * 0 + 1 / $rfs-rem-value);
+ }
+ @else {
+ @content;
+ }
+}
+
+// Internal mixin that adds enable classes to the selector if needed.
+@mixin _rfs-media-query-rule {
+
+ @if $rfs-class == enable {
+ @if $rfs-mode == min-media-query {
+ @content;
}
- // Set default font-size
- @if $rfs-font-size-unit == rem {
- $rfs-static: #{$fs / $rfs-rem-value}rem#{$rfs-suffix};
+ @include _rfs-media-query {
+ .enable-rfs &,
+ &.enable-rfs {
+ @content;
+ }
}
- @else if $rfs-font-size-unit == px {
- $rfs-static: #{$fs}px#{$rfs-suffix};
+ }
+ @else {
+ @if $rfs-class == disable and $rfs-mode == min-media-query {
+ .disable-rfs &,
+ &.disable-rfs {
+ @content;
+ }
}
- @else {
- @error "`#{$rfs-font-size-unit}` is not a valid unit for $rfs-font-size-unit. Use `px` or `rem`.";
+ @include _rfs-media-query {
+ @content;
}
+ }
+}
- // Only add media query if font-size is bigger as the minimum font-size
- // If $rfs-factor == 1, no rescaling will take place
- @if $fs > $rfs-base-font-size and $enable-responsive-font-sizes {
- $min-width: null;
- $variable-unit: null;
+// Helper function to get the formatted non-responsive value
+@function rfs-value($values) {
+ // Convert to list
+ $values: if(type-of($values) != list, ($values,), $values);
- // Calculate minimum font-size for given font-size
- $fs-min: $rfs-base-font-size + ($fs - $rfs-base-font-size) / $rfs-factor;
+ $val: '';
- // Calculate difference between given font-size and minimum font-size for given font-size
- $fs-diff: $fs - $fs-min;
+ // Loop over each value and calculate value
+ @each $value in $values {
+ @if $value == 0 {
+ $val: $val + ' 0';
+ }
+ @else {
+ // Cache $value unit
+ $unit: if(type-of($value) == "number", unit($value), false);
- // Base font-size formatting
- // No need to check if the unit is valid, because we did that before
- $min-width: if($rfs-font-size-unit == rem, #{$fs-min / $rfs-rem-value}rem, #{$fs-min}px);
+ @if $unit == px {
+ // Convert to rem if needed
+ $val: $val + ' ' + if($rfs-unit == rem, #{$value / ($value * 0 + $rfs-rem-value)}rem, $value);
+ }
+ @else if $unit == rem {
+ // Convert to px if needed
+ $val: $val + ' ' + if($rfs-unit == px, #{$value / ($value * 0 + 1) * $rfs-rem-value}px, $value);
+ }
+ @else {
+ // If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
+ $val: $val + ' ' + $value;
+ }
+ }
+ }
- // If two-dimensional, use smallest of screen width and height
- $variable-unit: if($rfs-two-dimensional, vmin, vw);
+ // Remove first space
+ @return unquote(str-slice($val, 2));
+}
- // Calculate the variable width between 0 and $rfs-breakpoint
- $variable-width: #{$fs-diff * 100 / $rfs-breakpoint}#{$variable-unit};
+// Helper function to get the responsive value calculated by RFS
+@function rfs-fluid-value($values) {
+ // Convert to list
+ $values: if(type-of($values) != list, ($values,), $values);
- // Set the calculated font-size.
- $rfs-fluid: calc(#{$min-width} + #{$variable-width}) #{$rfs-suffix};
- }
+ $val: '';
- // Rendering
- @if $rfs-fluid == null {
- // Only render static font-size if no fluid font-size is available
- font-size: $rfs-static;
+ // Loop over each value and calculate value
+ @each $value in $values {
+ @if $value == 0 {
+ $val: $val + ' 0';
}
+
@else {
- $mq-value: null;
+ // Cache $value unit
+ $unit: if(type-of($value) == "number", unit($value), false);
- // RFS breakpoint formatting
- @if $rfs-breakpoint-unit == em or $rfs-breakpoint-unit == rem {
- $mq-value: #{$rfs-breakpoint / $rfs-rem-value}#{$rfs-breakpoint-unit};
- }
- @else if $rfs-breakpoint-unit == px {
- $mq-value: #{$rfs-breakpoint}px;
+ // If $value isn't a number (like inherit) or $value has a unit (not px or rem, like 1.5em) or $ is 0, just print the value
+ @if not $unit or $unit != px and $unit != rem {
+ $val: $val + ' ' + $value;
}
+
@else {
- @error "`#{$rfs-breakpoint-unit}` is not a valid unit for $rfs-breakpoint-unit. Use `px`, `em` or `rem`.";
- }
+ // Remove unit from $value for calculations
+ $value: $value / ($value * 0 + if($unit == px, 1, 1 / $rfs-rem-value));
- @if $rfs-class == "disable" {
- // Adding an extra class increases specificity,
- // which prevents the media query to override the font size
- &,
- .disable-responsive-font-size &,
- &.disable-responsive-font-size {
- font-size: $rfs-static;
+ // Only add the media query if the value is greater than the minimum value
+ @if abs($value) <= $rfs-base-value or not $enable-rfs {
+ $val: $val + ' ' + if($rfs-unit == rem, #{$value / $rfs-rem-value}rem, #{$value}px);
}
- }
- @else {
- font-size: $rfs-static;
- }
+ @else {
+ // Calculate the minimum value
+ $value-min: $rfs-base-value + (abs($value) - $rfs-base-value) / $rfs-factor;
+
+ // Calculate difference between $value and the minimum value
+ $value-diff: abs($value) - $value-min;
- @if $rfs-two-dimensional {
- @media (max-width: #{$mq-value}), (max-height: #{$mq-value}) {
- @if $rfs-class == "enable" {
- .enable-responsive-font-size &,
- &.enable-responsive-font-size {
- font-size: $rfs-fluid;
- }
- }
- @else {
- font-size: $rfs-fluid;
- }
-
- @if $rfs-safari-iframe-resize-bug-fix {
- // stylelint-disable-next-line length-zero-no-unit
- min-width: 0vw;
- }
+ // Base value formatting
+ $min-width: if($rfs-unit == rem, #{$value-min / $rfs-rem-value}rem, #{$value-min}px);
+
+ // Use negative value if needed
+ $min-width: if($value < 0, -$min-width, $min-width);
+
+ // Use `vmin` if two-dimensional is enabled
+ $variable-unit: if($rfs-two-dimensional, vmin, vw);
+
+ // Calculate the variable width between 0 and $rfs-breakpoint
+ $variable-width: #{$value-diff * 100 / $rfs-breakpoint}#{$variable-unit};
+
+ // Return the calculated value
+ $val: $val + ' calc(' + $min-width + if($value < 0, ' - ', ' + ') + $variable-width + ')';
}
}
- @else {
- @media (max-width: #{$mq-value}) {
- @if $rfs-class == "enable" {
- .enable-responsive-font-size &,
- &.enable-responsive-font-size {
- font-size: $rfs-fluid;
- }
- }
- @else {
- font-size: $rfs-fluid;
- }
-
- @if $rfs-safari-iframe-resize-bug-fix {
- // stylelint-disable-next-line length-zero-no-unit
- min-width: 0vw;
- }
- }
+ }
+ }
+
+ // Remove first space
+ @return unquote(str-slice($val, 2));
+}
+
+// RFS mixin
+@mixin rfs($values, $property: font-size) {
+ @if $values != null {
+ $val: rfs-value($values);
+ $fluidVal: rfs-fluid-value($values);
+
+ // Do not print the media query if responsive & non-responsive values are the same
+ @if $val == $fluidVal {
+ #{$property}: $val;
+ }
+ @else {
+ @include _rfs-rule {
+ #{$property}: if($rfs-mode == max-media-query, $val, $fluidVal);
+
+ // Include safari iframe resize fix if needed
+ min-width: if($rfs-safari-iframe-resize-bug-fix, (0 * 1vw), null);
+ }
+
+ @include _rfs-media-query-rule {
+ #{$property}: if($rfs-mode == max-media-query, $fluidVal, $val);
}
}
}
}
-// The font-size & responsive-font-size mixin uses RFS to rescale font sizes
-@mixin font-size($fs, $important: false) {
- @include rfs($fs, $important);
+// Shorthand helper mixins
+@mixin font-size($value) {
+ @include rfs($value);
+}
+
+@mixin padding($value) {
+ @include rfs($value, padding);
+}
+
+@mixin padding-top($value) {
+ @include rfs($value, padding-top);
+}
+
+@mixin padding-right($value) {
+ @include rfs($value, padding-right);
+}
+
+@mixin padding-bottom($value) {
+ @include rfs($value, padding-bottom);
+}
+
+@mixin padding-left($value) {
+ @include rfs($value, padding-left);
+}
+
+@mixin margin($value) {
+ @include rfs($value, margin);
+}
+
+@mixin margin-top($value) {
+ @include rfs($value, margin-top);
+}
+
+@mixin margin-right($value) {
+ @include rfs($value, margin-right);
+}
+
+@mixin margin-bottom($value) {
+ @include rfs($value, margin-bottom);
}
-@mixin responsive-font-size($fs, $important: false) {
- @include rfs($fs, $important);
+@mixin margin-left($value) {
+ @include rfs($value, margin-left);
}
diff --git a/lib/bootstrap/version.rb b/lib/bootstrap/version.rb
index 419eed8..c0f3cee 100644
--- a/lib/bootstrap/version.rb
+++ b/lib/bootstrap/version.rb
@@ -2,5 +2,5 @@
module Bootstrap
VERSION = '4.5.2'
- BOOTSTRAP_SHA = '5f2480a90ab911babc53039835fe78c6fc12646d'
+ BOOTSTRAP_SHA = 'a1708ec2a38d331c4c9eacac08ce9c9839649476'
end