2 * Bootstrap v4.6.0 (https://getbootstrap.com/)
3 * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
6 (function (global
, factory
) {
7 typeof exports
=== 'object' && typeof module
!== 'undefined' ? factory(exports
, require('jquery')) :
8 typeof define
=== 'function' && define
.amd
? define(['exports', 'jquery'], factory
) :
9 (global
= typeof globalThis
!== 'undefined' ? globalThis
: global
|| self
, factory(global
.bootstrap
= {}, global
.jQuery
));
10 }(this, (function (exports
, $) { 'use strict';
12 function _interopDefaultLegacy (e
) { return e
&& typeof e
=== 'object' && 'default' in e
? e
: { 'default': e
}; }
14 var $__default
= /*#__PURE__*/_interopDefaultLegacy($);
16 function _defineProperties(target
, props
) {
17 for (var i
= 0; i
< props
.length
; i
++) {
18 var descriptor
= props
[i
];
19 descriptor
.enumerable
= descriptor
.enumerable
|| false;
20 descriptor
.configurable
= true;
21 if ("value" in descriptor
) descriptor
.writable
= true;
22 Object
.defineProperty(target
, descriptor
.key
, descriptor
);
26 function _createClass(Constructor
, protoProps
, staticProps
) {
27 if (protoProps
) _defineProperties(Constructor
.prototype, protoProps
);
28 if (staticProps
) _defineProperties(Constructor
, staticProps
);
33 _extends
= Object
.assign
|| function (target
) {
34 for (var i
= 1; i
< arguments
.length
; i
++) {
35 var source
= arguments
[i
];
37 for (var key
in source
) {
38 if (Object
.prototype.hasOwnProperty
.call(source
, key
)) {
39 target
[key
] = source
[key
];
47 return _extends
.apply(this, arguments
);
50 function _inheritsLoose(subClass
, superClass
) {
51 subClass
.prototype = Object
.create(superClass
.prototype);
52 subClass
.prototype.constructor = subClass
;
53 subClass
.__proto__
= superClass
;
57 * --------------------------------------------------------------------------
58 * Bootstrap (v4.6.0): util.js
59 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
60 * --------------------------------------------------------------------------
63 * ------------------------------------------------------------------------
64 * Private TransitionEnd Helpers
65 * ------------------------------------------------------------------------
68 var TRANSITION_END
= 'transitionend';
69 var MAX_UID
= 1000000;
70 var MILLISECONDS_MULTIPLIER
= 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
72 function toType(obj
) {
73 if (obj
=== null || typeof obj
=== 'undefined') {
77 return {}.toString
.call(obj
).match(/\s([a-z]+)/i)[1].toLowerCase();
80 function getSpecialTransitionEndEvent() {
82 bindType
: TRANSITION_END
,
83 delegateType
: TRANSITION_END
,
84 handle
: function handle(event
) {
85 if ($__default
['default'](event
.target
).is(this)) {
86 return event
.handleObj
.handler
.apply(this, arguments
); // eslint-disable-line prefer-rest-params
94 function transitionEndEmulator(duration
) {
98 $__default
['default'](this).one(Util
.TRANSITION_END
, function () {
101 setTimeout(function () {
103 Util
.triggerTransitionEnd(_this
);
109 function setTransitionEndSupport() {
110 $__default
['default'].fn
.emulateTransitionEnd
= transitionEndEmulator
;
111 $__default
['default'].event
.special
[Util
.TRANSITION_END
] = getSpecialTransitionEndEvent();
114 * --------------------------------------------------------------------------
116 * --------------------------------------------------------------------------
121 TRANSITION_END
: 'bsTransitionEnd',
122 getUID
: function getUID(prefix
) {
124 prefix
+= ~~(Math
.random() * MAX_UID
); // "~~" acts like a faster Math.floor() here
125 } while (document
.getElementById(prefix
));
129 getSelectorFromElement
: function getSelectorFromElement(element
) {
130 var selector
= element
.getAttribute('data-target');
132 if (!selector
|| selector
=== '#') {
133 var hrefAttr
= element
.getAttribute('href');
134 selector
= hrefAttr
&& hrefAttr
!== '#' ? hrefAttr
.trim() : '';
138 return document
.querySelector(selector
) ? selector
: null;
143 getTransitionDurationFromElement
: function getTransitionDurationFromElement(element
) {
146 } // Get transition-duration of the element
149 var transitionDuration
= $__default
['default'](element
).css('transition-duration');
150 var transitionDelay
= $__default
['default'](element
).css('transition-delay');
151 var floatTransitionDuration
= parseFloat(transitionDuration
);
152 var floatTransitionDelay
= parseFloat(transitionDelay
); // Return 0 if element or transition duration is not found
154 if (!floatTransitionDuration
&& !floatTransitionDelay
) {
156 } // If multiple durations are defined, take the first
159 transitionDuration
= transitionDuration
.split(',')[0];
160 transitionDelay
= transitionDelay
.split(',')[0];
161 return (parseFloat(transitionDuration
) + parseFloat(transitionDelay
)) * MILLISECONDS_MULTIPLIER
;
163 reflow
: function reflow(element
) {
164 return element
.offsetHeight
;
166 triggerTransitionEnd
: function triggerTransitionEnd(element
) {
167 $__default
['default'](element
).trigger(TRANSITION_END
);
169 supportsTransitionEnd
: function supportsTransitionEnd() {
170 return Boolean(TRANSITION_END
);
172 isElement
: function isElement(obj
) {
173 return (obj
[0] || obj
).nodeType
;
175 typeCheckConfig
: function typeCheckConfig(componentName
, config
, configTypes
) {
176 for (var property
in configTypes
) {
177 if (Object
.prototype.hasOwnProperty
.call(configTypes
, property
)) {
178 var expectedTypes
= configTypes
[property
];
179 var value
= config
[property
];
180 var valueType
= value
&& Util
.isElement(value
) ? 'element' : toType(value
);
182 if (!new RegExp(expectedTypes
).test(valueType
)) {
183 throw new Error(componentName
.toUpperCase() + ": " + ("Option \"" + property
+ "\" provided type \"" + valueType
+ "\" ") + ("but expected type \"" + expectedTypes
+ "\"."));
188 findShadowRoot
: function findShadowRoot(element
) {
189 if (!document
.documentElement
.attachShadow
) {
191 } // Can find the shadow root otherwise it'll return the document
194 if (typeof element
.getRootNode
=== 'function') {
195 var root
= element
.getRootNode();
196 return root
instanceof ShadowRoot
? root
: null;
199 if (element
instanceof ShadowRoot
) {
201 } // when we don't find a shadow root
204 if (!element
.parentNode
) {
208 return Util
.findShadowRoot(element
.parentNode
);
210 jQueryDetection
: function jQueryDetection() {
211 if (typeof $__default
['default'] === 'undefined') {
212 throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
215 var version
= $__default
['default'].fn
.jquery
.split(' ')[0].split('.');
222 if (version
[0] < ltMajor
&& version
[1] < minMinor
|| version
[0] === minMajor
&& version
[1] === minMinor
&& version
[2] < minPatch
|| version
[0] >= maxMajor
) {
223 throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
227 Util
.jQueryDetection();
228 setTransitionEndSupport();
231 * ------------------------------------------------------------------------
233 * ------------------------------------------------------------------------
237 var VERSION
= '4.6.0';
238 var DATA_KEY
= 'bs.alert';
239 var EVENT_KEY
= "." + DATA_KEY
;
240 var DATA_API_KEY
= '.data-api';
241 var JQUERY_NO_CONFLICT
= $__default
['default'].fn
[NAME
];
242 var SELECTOR_DISMISS
= '[data-dismiss="alert"]';
243 var EVENT_CLOSE
= "close" + EVENT_KEY
;
244 var EVENT_CLOSED
= "closed" + EVENT_KEY
;
245 var EVENT_CLICK_DATA_API
= "click" + EVENT_KEY
+ DATA_API_KEY
;
246 var CLASS_NAME_ALERT
= 'alert';
247 var CLASS_NAME_FADE
= 'fade';
248 var CLASS_NAME_SHOW
= 'show';
250 * ------------------------------------------------------------------------
252 * ------------------------------------------------------------------------
255 var Alert
= /*#__PURE__*/function () {
256 function Alert(element
) {
257 this._element
= element
;
261 var _proto
= Alert
.prototype;
264 _proto
.close
= function close(element
) {
265 var rootElement
= this._element
;
268 rootElement
= this._getRootElement(element
);
271 var customEvent
= this._triggerCloseEvent(rootElement
);
273 if (customEvent
.isDefaultPrevented()) {
277 this._removeElement(rootElement
);
280 _proto
.dispose
= function dispose() {
281 $__default
['default'].removeData(this._element
, DATA_KEY
);
282 this._element
= null;
286 _proto
._getRootElement
= function _getRootElement(element
) {
287 var selector
= Util
.getSelectorFromElement(element
);
291 parent
= document
.querySelector(selector
);
295 parent
= $__default
['default'](element
).closest("." + CLASS_NAME_ALERT
)[0];
301 _proto
._triggerCloseEvent
= function _triggerCloseEvent(element
) {
302 var closeEvent
= $__default
['default'].Event(EVENT_CLOSE
);
303 $__default
['default'](element
).trigger(closeEvent
);
307 _proto
._removeElement
= function _removeElement(element
) {
310 $__default
['default'](element
).removeClass(CLASS_NAME_SHOW
);
312 if (!$__default
['default'](element
).hasClass(CLASS_NAME_FADE
)) {
313 this._destroyElement(element
);
318 var transitionDuration
= Util
.getTransitionDurationFromElement(element
);
319 $__default
['default'](element
).one(Util
.TRANSITION_END
, function (event
) {
320 return _this
._destroyElement(element
, event
);
321 }).emulateTransitionEnd(transitionDuration
);
324 _proto
._destroyElement
= function _destroyElement(element
) {
325 $__default
['default'](element
).detach().trigger(EVENT_CLOSED
).remove();
329 Alert
._jQueryInterface
= function _jQueryInterface(config
) {
330 return this.each(function () {
331 var $element
= $__default
['default'](this);
332 var data
= $element
.data(DATA_KEY
);
335 data
= new Alert(this);
336 $element
.data(DATA_KEY
, data
);
339 if (config
=== 'close') {
345 Alert
._handleDismiss
= function _handleDismiss(alertInstance
) {
346 return function (event
) {
348 event
.preventDefault();
351 alertInstance
.close(this);
355 _createClass(Alert
, null, [{
357 get: function get() {
365 * ------------------------------------------------------------------------
366 * Data Api implementation
367 * ------------------------------------------------------------------------
371 $__default
['default'](document
).on(EVENT_CLICK_DATA_API
, SELECTOR_DISMISS
, Alert
._handleDismiss(new Alert()));
373 * ------------------------------------------------------------------------
375 * ------------------------------------------------------------------------
378 $__default
['default'].fn
[NAME
] = Alert
._jQueryInterface
;
379 $__default
['default'].fn
[NAME
].Constructor
= Alert
;
381 $__default
['default'].fn
[NAME
].noConflict = function () {
382 $__default
['default'].fn
[NAME
] = JQUERY_NO_CONFLICT
;
383 return Alert
._jQueryInterface
;
387 * ------------------------------------------------------------------------
389 * ------------------------------------------------------------------------
392 var NAME
$1 = 'button';
393 var VERSION
$1 = '4.6.0';
394 var DATA_KEY
$1 = 'bs.button';
395 var EVENT_KEY
$1 = "." + DATA_KEY
$1;
396 var DATA_API_KEY
$1 = '.data-api';
397 var JQUERY_NO_CONFLICT
$1 = $__default
['default'].fn
[NAME
$1];
398 var CLASS_NAME_ACTIVE
= 'active';
399 var CLASS_NAME_BUTTON
= 'btn';
400 var CLASS_NAME_FOCUS
= 'focus';
401 var SELECTOR_DATA_TOGGLE_CARROT
= '[data-toggle^="button"]';
402 var SELECTOR_DATA_TOGGLES
= '[data-toggle="buttons"]';
403 var SELECTOR_DATA_TOGGLE
= '[data-toggle="button"]';
404 var SELECTOR_DATA_TOGGLES_BUTTONS
= '[data-toggle="buttons"] .btn';
405 var SELECTOR_INPUT
= 'input:not([type="hidden"])';
406 var SELECTOR_ACTIVE
= '.active';
407 var SELECTOR_BUTTON
= '.btn';
408 var EVENT_CLICK_DATA_API
$1 = "click" + EVENT_KEY
$1 + DATA_API_KEY
$1;
409 var EVENT_FOCUS_BLUR_DATA_API
= "focus" + EVENT_KEY
$1 + DATA_API_KEY
$1 + " " + ("blur" + EVENT_KEY
$1 + DATA_API_KEY
$1);
410 var EVENT_LOAD_DATA_API
= "load" + EVENT_KEY
$1 + DATA_API_KEY
$1;
412 * ------------------------------------------------------------------------
414 * ------------------------------------------------------------------------
417 var Button
= /*#__PURE__*/function () {
418 function Button(element
) {
419 this._element
= element
;
420 this.shouldAvoidTriggerChange
= false;
424 var _proto
= Button
.prototype;
427 _proto
.toggle
= function toggle() {
428 var triggerChangeEvent
= true;
429 var addAriaPressed
= true;
430 var rootElement
= $__default
['default'](this._element
).closest(SELECTOR_DATA_TOGGLES
)[0];
433 var input
= this._element
.querySelector(SELECTOR_INPUT
);
436 if (input
.type
=== 'radio') {
437 if (input
.checked
&& this._element
.classList
.contains(CLASS_NAME_ACTIVE
)) {
438 triggerChangeEvent
= false;
440 var activeElement
= rootElement
.querySelector(SELECTOR_ACTIVE
);
443 $__default
['default'](activeElement
).removeClass(CLASS_NAME_ACTIVE
);
448 if (triggerChangeEvent
) {
449 // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input
450 if (input
.type
=== 'checkbox' || input
.type
=== 'radio') {
451 input
.checked
= !this._element
.classList
.contains(CLASS_NAME_ACTIVE
);
454 if (!this.shouldAvoidTriggerChange
) {
455 $__default
['default'](input
).trigger('change');
460 addAriaPressed
= false;
464 if (!(this._element
.hasAttribute('disabled') || this._element
.classList
.contains('disabled'))) {
465 if (addAriaPressed
) {
466 this._element
.setAttribute('aria-pressed', !this._element
.classList
.contains(CLASS_NAME_ACTIVE
));
469 if (triggerChangeEvent
) {
470 $__default
['default'](this._element
).toggleClass(CLASS_NAME_ACTIVE
);
475 _proto
.dispose
= function dispose() {
476 $__default
['default'].removeData(this._element
, DATA_KEY
$1);
477 this._element
= null;
481 Button
._jQueryInterface
= function _jQueryInterface(config
, avoidTriggerChange
) {
482 return this.each(function () {
483 var $element
= $__default
['default'](this);
484 var data
= $element
.data(DATA_KEY
$1);
487 data
= new Button(this);
488 $element
.data(DATA_KEY
$1, data
);
491 data
.shouldAvoidTriggerChange
= avoidTriggerChange
;
493 if (config
=== 'toggle') {
499 _createClass(Button
, null, [{
501 get: function get() {
509 * ------------------------------------------------------------------------
510 * Data Api implementation
511 * ------------------------------------------------------------------------
515 $__default
['default'](document
).on(EVENT_CLICK_DATA_API
$1, SELECTOR_DATA_TOGGLE_CARROT
, function (event
) {
516 var button
= event
.target
;
517 var initialButton
= button
;
519 if (!$__default
['default'](button
).hasClass(CLASS_NAME_BUTTON
)) {
520 button
= $__default
['default'](button
).closest(SELECTOR_BUTTON
)[0];
523 if (!button
|| button
.hasAttribute('disabled') || button
.classList
.contains('disabled')) {
524 event
.preventDefault(); // work around Firefox bug #1540995
526 var inputBtn
= button
.querySelector(SELECTOR_INPUT
);
528 if (inputBtn
&& (inputBtn
.hasAttribute('disabled') || inputBtn
.classList
.contains('disabled'))) {
529 event
.preventDefault(); // work around Firefox bug #1540995
534 if (initialButton
.tagName
=== 'INPUT' || button
.tagName
!== 'LABEL') {
535 Button
._jQueryInterface
.call($__default
['default'](button
), 'toggle', initialButton
.tagName
=== 'INPUT');
538 }).on(EVENT_FOCUS_BLUR_DATA_API
, SELECTOR_DATA_TOGGLE_CARROT
, function (event
) {
539 var button
= $__default
['default'](event
.target
).closest(SELECTOR_BUTTON
)[0];
540 $__default
['default'](button
).toggleClass(CLASS_NAME_FOCUS
, /^focus(in)?$/.test(event
.type
));
542 $__default
['default'](window
).on(EVENT_LOAD_DATA_API
, function () {
543 // ensure correct active class is set to match the controls' actual values/states
544 // find all checkboxes/readio buttons inside data-toggle groups
545 var buttons
= [].slice
.call(document
.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS
));
547 for (var i
= 0, len
= buttons
.length
; i
< len
; i
++) {
548 var button
= buttons
[i
];
549 var input
= button
.querySelector(SELECTOR_INPUT
);
551 if (input
.checked
|| input
.hasAttribute('checked')) {
552 button
.classList
.add(CLASS_NAME_ACTIVE
);
554 button
.classList
.remove(CLASS_NAME_ACTIVE
);
556 } // find all button toggles
559 buttons
= [].slice
.call(document
.querySelectorAll(SELECTOR_DATA_TOGGLE
));
561 for (var _i
= 0, _len
= buttons
.length
; _i
< _len
; _i
++) {
562 var _button
= buttons
[_i
];
564 if (_button
.getAttribute('aria-pressed') === 'true') {
565 _button
.classList
.add(CLASS_NAME_ACTIVE
);
567 _button
.classList
.remove(CLASS_NAME_ACTIVE
);
572 * ------------------------------------------------------------------------
574 * ------------------------------------------------------------------------
577 $__default
['default'].fn
[NAME
$1] = Button
._jQueryInterface
;
578 $__default
['default'].fn
[NAME
$1].Constructor
= Button
;
580 $__default
['default'].fn
[NAME
$1].noConflict = function () {
581 $__default
['default'].fn
[NAME
$1] = JQUERY_NO_CONFLICT
$1;
582 return Button
._jQueryInterface
;
586 * ------------------------------------------------------------------------
588 * ------------------------------------------------------------------------
591 var NAME
$2 = 'carousel';
592 var VERSION
$2 = '4.6.0';
593 var DATA_KEY
$2 = 'bs.carousel';
594 var EVENT_KEY
$2 = "." + DATA_KEY
$2;
595 var DATA_API_KEY
$2 = '.data-api';
596 var JQUERY_NO_CONFLICT
$2 = $__default
['default'].fn
[NAME
$2];
597 var ARROW_LEFT_KEYCODE
= 37; // KeyboardEvent.which value for left arrow key
599 var ARROW_RIGHT_KEYCODE
= 39; // KeyboardEvent.which value for right arrow key
601 var TOUCHEVENT_COMPAT_WAIT
= 500; // Time for mouse compat events to fire after touch
603 var SWIPE_THRESHOLD
= 40;
613 interval
: '(number|boolean)',
615 slide
: '(boolean|string)',
616 pause
: '(string|boolean)',
620 var DIRECTION_NEXT
= 'next';
621 var DIRECTION_PREV
= 'prev';
622 var DIRECTION_LEFT
= 'left';
623 var DIRECTION_RIGHT
= 'right';
624 var EVENT_SLIDE
= "slide" + EVENT_KEY
$2;
625 var EVENT_SLID
= "slid" + EVENT_KEY
$2;
626 var EVENT_KEYDOWN
= "keydown" + EVENT_KEY
$2;
627 var EVENT_MOUSEENTER
= "mouseenter" + EVENT_KEY
$2;
628 var EVENT_MOUSELEAVE
= "mouseleave" + EVENT_KEY
$2;
629 var EVENT_TOUCHSTART
= "touchstart" + EVENT_KEY
$2;
630 var EVENT_TOUCHMOVE
= "touchmove" + EVENT_KEY
$2;
631 var EVENT_TOUCHEND
= "touchend" + EVENT_KEY
$2;
632 var EVENT_POINTERDOWN
= "pointerdown" + EVENT_KEY
$2;
633 var EVENT_POINTERUP
= "pointerup" + EVENT_KEY
$2;
634 var EVENT_DRAG_START
= "dragstart" + EVENT_KEY
$2;
635 var EVENT_LOAD_DATA_API
$1 = "load" + EVENT_KEY
$2 + DATA_API_KEY
$2;
636 var EVENT_CLICK_DATA_API
$2 = "click" + EVENT_KEY
$2 + DATA_API_KEY
$2;
637 var CLASS_NAME_CAROUSEL
= 'carousel';
638 var CLASS_NAME_ACTIVE
$1 = 'active';
639 var CLASS_NAME_SLIDE
= 'slide';
640 var CLASS_NAME_RIGHT
= 'carousel-item-right';
641 var CLASS_NAME_LEFT
= 'carousel-item-left';
642 var CLASS_NAME_NEXT
= 'carousel-item-next';
643 var CLASS_NAME_PREV
= 'carousel-item-prev';
644 var CLASS_NAME_POINTER_EVENT
= 'pointer-event';
645 var SELECTOR_ACTIVE
$1 = '.active';
646 var SELECTOR_ACTIVE_ITEM
= '.active.carousel-item';
647 var SELECTOR_ITEM
= '.carousel-item';
648 var SELECTOR_ITEM_IMG
= '.carousel-item img';
649 var SELECTOR_NEXT_PREV
= '.carousel-item-next, .carousel-item-prev';
650 var SELECTOR_INDICATORS
= '.carousel-indicators';
651 var SELECTOR_DATA_SLIDE
= '[data-slide], [data-slide-to]';
652 var SELECTOR_DATA_RIDE
= '[data-ride="carousel"]';
658 * ------------------------------------------------------------------------
660 * ------------------------------------------------------------------------
663 var Carousel
= /*#__PURE__*/function () {
664 function Carousel(element
, config
) {
666 this._interval
= null;
667 this._activeElement
= null;
668 this._isPaused
= false;
669 this._isSliding
= false;
670 this.touchTimeout
= null;
671 this.touchStartX
= 0;
672 this.touchDeltaX
= 0;
673 this._config
= this._getConfig(config
);
674 this._element
= element
;
675 this._indicatorsElement
= this._element
.querySelector(SELECTOR_INDICATORS
);
676 this._touchSupported
= 'ontouchstart' in document
.documentElement
|| navigator
.maxTouchPoints
> 0;
677 this._pointerEvent
= Boolean(window
.PointerEvent
|| window
.MSPointerEvent
);
679 this._addEventListeners();
683 var _proto
= Carousel
.prototype;
686 _proto
.next
= function next() {
687 if (!this._isSliding
) {
688 this._slide(DIRECTION_NEXT
);
692 _proto
.nextWhenVisible
= function nextWhenVisible() {
693 var $element
= $__default
['default'](this._element
); // Don't call next when the page isn't visible
694 // or the carousel or its parent isn't visible
696 if (!document
.hidden
&& $element
.is(':visible') && $element
.css('visibility') !== 'hidden') {
701 _proto
.prev
= function prev() {
702 if (!this._isSliding
) {
703 this._slide(DIRECTION_PREV
);
707 _proto
.pause
= function pause(event
) {
709 this._isPaused
= true;
712 if (this._element
.querySelector(SELECTOR_NEXT_PREV
)) {
713 Util
.triggerTransitionEnd(this._element
);
717 clearInterval(this._interval
);
718 this._interval
= null;
721 _proto
.cycle
= function cycle(event
) {
723 this._isPaused
= false;
726 if (this._interval
) {
727 clearInterval(this._interval
);
728 this._interval
= null;
731 if (this._config
.interval
&& !this._isPaused
) {
732 this._updateInterval();
734 this._interval
= setInterval((document
.visibilityState
? this.nextWhenVisible
: this.next
).bind(this), this._config
.interval
);
738 _proto
.to
= function to(index
) {
741 this._activeElement
= this._element
.querySelector(SELECTOR_ACTIVE_ITEM
);
743 var activeIndex
= this._getItemIndex(this._activeElement
);
745 if (index
> this._items
.length
- 1 || index
< 0) {
749 if (this._isSliding
) {
750 $__default
['default'](this._element
).one(EVENT_SLID
, function () {
751 return _this
.to(index
);
756 if (activeIndex
=== index
) {
762 var direction
= index
> activeIndex
? DIRECTION_NEXT
: DIRECTION_PREV
;
764 this._slide(direction
, this._items
[index
]);
767 _proto
.dispose
= function dispose() {
768 $__default
['default'](this._element
).off(EVENT_KEY
$2);
769 $__default
['default'].removeData(this._element
, DATA_KEY
$2);
772 this._element
= null;
773 this._interval
= null;
774 this._isPaused
= null;
775 this._isSliding
= null;
776 this._activeElement
= null;
777 this._indicatorsElement
= null;
781 _proto
._getConfig
= function _getConfig(config
) {
782 config
= _extends({}, Default
, config
);
783 Util
.typeCheckConfig(NAME
$2, config
, DefaultType
);
787 _proto
._handleSwipe
= function _handleSwipe() {
788 var absDeltax
= Math
.abs(this.touchDeltaX
);
790 if (absDeltax
<= SWIPE_THRESHOLD
) {
794 var direction
= absDeltax
/ this.touchDeltaX
;
795 this.touchDeltaX
= 0; // swipe left
807 _proto
._addEventListeners
= function _addEventListeners() {
810 if (this._config
.keyboard
) {
811 $__default
['default'](this._element
).on(EVENT_KEYDOWN
, function (event
) {
812 return _this2
._keydown(event
);
816 if (this._config
.pause
=== 'hover') {
817 $__default
['default'](this._element
).on(EVENT_MOUSEENTER
, function (event
) {
818 return _this2
.pause(event
);
819 }).on(EVENT_MOUSELEAVE
, function (event
) {
820 return _this2
.cycle(event
);
824 if (this._config
.touch
) {
825 this._addTouchEventListeners();
829 _proto
._addTouchEventListeners
= function _addTouchEventListeners() {
832 if (!this._touchSupported
) {
836 var start
= function start(event
) {
837 if (_this3
._pointerEvent
&& PointerType
[event
.originalEvent
.pointerType
.toUpperCase()]) {
838 _this3
.touchStartX
= event
.originalEvent
.clientX
;
839 } else if (!_this3
._pointerEvent
) {
840 _this3
.touchStartX
= event
.originalEvent
.touches
[0].clientX
;
844 var move = function move(event
) {
845 // ensure swiping with one touch and not pinching
846 if (event
.originalEvent
.touches
&& event
.originalEvent
.touches
.length
> 1) {
847 _this3
.touchDeltaX
= 0;
849 _this3
.touchDeltaX
= event
.originalEvent
.touches
[0].clientX
- _this3
.touchStartX
;
853 var end
= function end(event
) {
854 if (_this3
._pointerEvent
&& PointerType
[event
.originalEvent
.pointerType
.toUpperCase()]) {
855 _this3
.touchDeltaX
= event
.originalEvent
.clientX
- _this3
.touchStartX
;
858 _this3
._handleSwipe();
860 if (_this3
._config
.pause
=== 'hover') {
861 // If it's a touch-enabled device, mouseenter/leave are fired as
862 // part of the mouse compatibility events on first tap - the carousel
863 // would stop cycling until user tapped out of it;
864 // here, we listen for touchend, explicitly pause the carousel
865 // (as if it's the second time we tap on it, mouseenter compat event
866 // is NOT fired) and after a timeout (to allow for mouse compatibility
867 // events to fire) we explicitly restart cycling
870 if (_this3
.touchTimeout
) {
871 clearTimeout(_this3
.touchTimeout
);
874 _this3
.touchTimeout
= setTimeout(function (event
) {
875 return _this3
.cycle(event
);
876 }, TOUCHEVENT_COMPAT_WAIT
+ _this3
._config
.interval
);
880 $__default
['default'](this._element
.querySelectorAll(SELECTOR_ITEM_IMG
)).on(EVENT_DRAG_START
, function (e
) {
881 return e
.preventDefault();
884 if (this._pointerEvent
) {
885 $__default
['default'](this._element
).on(EVENT_POINTERDOWN
, function (event
) {
888 $__default
['default'](this._element
).on(EVENT_POINTERUP
, function (event
) {
892 this._element
.classList
.add(CLASS_NAME_POINTER_EVENT
);
894 $__default
['default'](this._element
).on(EVENT_TOUCHSTART
, function (event
) {
897 $__default
['default'](this._element
).on(EVENT_TOUCHMOVE
, function (event
) {
900 $__default
['default'](this._element
).on(EVENT_TOUCHEND
, function (event
) {
906 _proto
._keydown
= function _keydown(event
) {
907 if (/input|textarea/i.test(event
.target
.tagName
)) {
911 switch (event
.which
) {
912 case ARROW_LEFT_KEYCODE
:
913 event
.preventDefault();
917 case ARROW_RIGHT_KEYCODE
:
918 event
.preventDefault();
924 _proto
._getItemIndex
= function _getItemIndex(element
) {
925 this._items
= element
&& element
.parentNode
? [].slice
.call(element
.parentNode
.querySelectorAll(SELECTOR_ITEM
)) : [];
926 return this._items
.indexOf(element
);
929 _proto
._getItemByDirection
= function _getItemByDirection(direction
, activeElement
) {
930 var isNextDirection
= direction
=== DIRECTION_NEXT
;
931 var isPrevDirection
= direction
=== DIRECTION_PREV
;
933 var activeIndex
= this._getItemIndex(activeElement
);
935 var lastItemIndex
= this._items
.length
- 1;
936 var isGoingToWrap
= isPrevDirection
&& activeIndex
=== 0 || isNextDirection
&& activeIndex
=== lastItemIndex
;
938 if (isGoingToWrap
&& !this._config
.wrap
) {
939 return activeElement
;
942 var delta
= direction
=== DIRECTION_PREV
? -1 : 1;
943 var itemIndex
= (activeIndex
+ delta
) % this._items
.length
;
944 return itemIndex
=== -1 ? this._items
[this._items
.length
- 1] : this._items
[itemIndex
];
947 _proto
._triggerSlideEvent
= function _triggerSlideEvent(relatedTarget
, eventDirectionName
) {
948 var targetIndex
= this._getItemIndex(relatedTarget
);
950 var fromIndex
= this._getItemIndex(this._element
.querySelector(SELECTOR_ACTIVE_ITEM
));
952 var slideEvent
= $__default
['default'].Event(EVENT_SLIDE
, {
953 relatedTarget
: relatedTarget
,
954 direction
: eventDirectionName
,
958 $__default
['default'](this._element
).trigger(slideEvent
);
962 _proto
._setActiveIndicatorElement
= function _setActiveIndicatorElement(element
) {
963 if (this._indicatorsElement
) {
964 var indicators
= [].slice
.call(this._indicatorsElement
.querySelectorAll(SELECTOR_ACTIVE
$1));
965 $__default
['default'](indicators
).removeClass(CLASS_NAME_ACTIVE
$1);
967 var nextIndicator
= this._indicatorsElement
.children
[this._getItemIndex(element
)];
970 $__default
['default'](nextIndicator
).addClass(CLASS_NAME_ACTIVE
$1);
975 _proto
._updateInterval
= function _updateInterval() {
976 var element
= this._activeElement
|| this._element
.querySelector(SELECTOR_ACTIVE_ITEM
);
982 var elementInterval
= parseInt(element
.getAttribute('data-interval'), 10);
984 if (elementInterval
) {
985 this._config
.defaultInterval
= this._config
.defaultInterval
|| this._config
.interval
;
986 this._config
.interval
= elementInterval
;
988 this._config
.interval
= this._config
.defaultInterval
|| this._config
.interval
;
992 _proto
._slide
= function _slide(direction
, element
) {
995 var activeElement
= this._element
.querySelector(SELECTOR_ACTIVE_ITEM
);
997 var activeElementIndex
= this._getItemIndex(activeElement
);
999 var nextElement
= element
|| activeElement
&& this._getItemByDirection(direction
, activeElement
);
1001 var nextElementIndex
= this._getItemIndex(nextElement
);
1003 var isCycling
= Boolean(this._interval
);
1004 var directionalClassName
;
1006 var eventDirectionName
;
1008 if (direction
=== DIRECTION_NEXT
) {
1009 directionalClassName
= CLASS_NAME_LEFT
;
1010 orderClassName
= CLASS_NAME_NEXT
;
1011 eventDirectionName
= DIRECTION_LEFT
;
1013 directionalClassName
= CLASS_NAME_RIGHT
;
1014 orderClassName
= CLASS_NAME_PREV
;
1015 eventDirectionName
= DIRECTION_RIGHT
;
1018 if (nextElement
&& $__default
['default'](nextElement
).hasClass(CLASS_NAME_ACTIVE
$1)) {
1019 this._isSliding
= false;
1023 var slideEvent
= this._triggerSlideEvent(nextElement
, eventDirectionName
);
1025 if (slideEvent
.isDefaultPrevented()) {
1029 if (!activeElement
|| !nextElement
) {
1030 // Some weirdness is happening, so we bail
1034 this._isSliding
= true;
1040 this._setActiveIndicatorElement(nextElement
);
1042 this._activeElement
= nextElement
;
1043 var slidEvent
= $__default
['default'].Event(EVENT_SLID
, {
1044 relatedTarget
: nextElement
,
1045 direction
: eventDirectionName
,
1046 from: activeElementIndex
,
1047 to
: nextElementIndex
1050 if ($__default
['default'](this._element
).hasClass(CLASS_NAME_SLIDE
)) {
1051 $__default
['default'](nextElement
).addClass(orderClassName
);
1052 Util
.reflow(nextElement
);
1053 $__default
['default'](activeElement
).addClass(directionalClassName
);
1054 $__default
['default'](nextElement
).addClass(directionalClassName
);
1055 var transitionDuration
= Util
.getTransitionDurationFromElement(activeElement
);
1056 $__default
['default'](activeElement
).one(Util
.TRANSITION_END
, function () {
1057 $__default
['default'](nextElement
).removeClass(directionalClassName
+ " " + orderClassName
).addClass(CLASS_NAME_ACTIVE
$1);
1058 $__default
['default'](activeElement
).removeClass(CLASS_NAME_ACTIVE
$1 + " " + orderClassName
+ " " + directionalClassName
);
1059 _this4
._isSliding
= false;
1060 setTimeout(function () {
1061 return $__default
['default'](_this4
._element
).trigger(slidEvent
);
1063 }).emulateTransitionEnd(transitionDuration
);
1065 $__default
['default'](activeElement
).removeClass(CLASS_NAME_ACTIVE
$1);
1066 $__default
['default'](nextElement
).addClass(CLASS_NAME_ACTIVE
$1);
1067 this._isSliding
= false;
1068 $__default
['default'](this._element
).trigger(slidEvent
);
1077 Carousel
._jQueryInterface
= function _jQueryInterface(config
) {
1078 return this.each(function () {
1079 var data
= $__default
['default'](this).data(DATA_KEY
$2);
1081 var _config
= _extends({}, Default
, $__default
['default'](this).data());
1083 if (typeof config
=== 'object') {
1084 _config
= _extends({}, _config
, config
);
1087 var action
= typeof config
=== 'string' ? config
: _config
.slide
;
1090 data
= new Carousel(this, _config
);
1091 $__default
['default'](this).data(DATA_KEY
$2, data
);
1094 if (typeof config
=== 'number') {
1096 } else if (typeof action
=== 'string') {
1097 if (typeof data
[action
] === 'undefined') {
1098 throw new TypeError("No method named \"" + action
+ "\"");
1102 } else if (_config
.interval
&& _config
.ride
) {
1109 Carousel
._dataApiClickHandler
= function _dataApiClickHandler(event
) {
1110 var selector
= Util
.getSelectorFromElement(this);
1116 var target
= $__default
['default'](selector
)[0];
1118 if (!target
|| !$__default
['default'](target
).hasClass(CLASS_NAME_CAROUSEL
)) {
1122 var config
= _extends({}, $__default
['default'](target
).data(), $__default
['default'](this).data());
1124 var slideIndex
= this.getAttribute('data-slide-to');
1127 config
.interval
= false;
1130 Carousel
._jQueryInterface
.call($__default
['default'](target
), config
);
1133 $__default
['default'](target
).data(DATA_KEY
$2).to(slideIndex
);
1136 event
.preventDefault();
1139 _createClass(Carousel
, null, [{
1141 get: function get() {
1146 get: function get() {
1154 * ------------------------------------------------------------------------
1155 * Data Api implementation
1156 * ------------------------------------------------------------------------
1160 $__default
['default'](document
).on(EVENT_CLICK_DATA_API
$2, SELECTOR_DATA_SLIDE
, Carousel
._dataApiClickHandler
);
1161 $__default
['default'](window
).on(EVENT_LOAD_DATA_API
$1, function () {
1162 var carousels
= [].slice
.call(document
.querySelectorAll(SELECTOR_DATA_RIDE
));
1164 for (var i
= 0, len
= carousels
.length
; i
< len
; i
++) {
1165 var $carousel
= $__default
['default'](carousels
[i
]);
1167 Carousel
._jQueryInterface
.call($carousel
, $carousel
.data());
1171 * ------------------------------------------------------------------------
1173 * ------------------------------------------------------------------------
1176 $__default
['default'].fn
[NAME
$2] = Carousel
._jQueryInterface
;
1177 $__default
['default'].fn
[NAME
$2].Constructor
= Carousel
;
1179 $__default
['default'].fn
[NAME
$2].noConflict = function () {
1180 $__default
['default'].fn
[NAME
$2] = JQUERY_NO_CONFLICT
$2;
1181 return Carousel
._jQueryInterface
;
1185 * ------------------------------------------------------------------------
1187 * ------------------------------------------------------------------------
1190 var NAME
$3 = 'collapse';
1191 var VERSION
$3 = '4.6.0';
1192 var DATA_KEY
$3 = 'bs.collapse';
1193 var EVENT_KEY
$3 = "." + DATA_KEY
$3;
1194 var DATA_API_KEY
$3 = '.data-api';
1195 var JQUERY_NO_CONFLICT
$3 = $__default
['default'].fn
[NAME
$3];
1200 var DefaultType
$1 = {
1202 parent
: '(string|element)'
1204 var EVENT_SHOW
= "show" + EVENT_KEY
$3;
1205 var EVENT_SHOWN
= "shown" + EVENT_KEY
$3;
1206 var EVENT_HIDE
= "hide" + EVENT_KEY
$3;
1207 var EVENT_HIDDEN
= "hidden" + EVENT_KEY
$3;
1208 var EVENT_CLICK_DATA_API
$3 = "click" + EVENT_KEY
$3 + DATA_API_KEY
$3;
1209 var CLASS_NAME_SHOW
$1 = 'show';
1210 var CLASS_NAME_COLLAPSE
= 'collapse';
1211 var CLASS_NAME_COLLAPSING
= 'collapsing';
1212 var CLASS_NAME_COLLAPSED
= 'collapsed';
1213 var DIMENSION_WIDTH
= 'width';
1214 var DIMENSION_HEIGHT
= 'height';
1215 var SELECTOR_ACTIVES
= '.show, .collapsing';
1216 var SELECTOR_DATA_TOGGLE
$1 = '[data-toggle="collapse"]';
1218 * ------------------------------------------------------------------------
1220 * ------------------------------------------------------------------------
1223 var Collapse
= /*#__PURE__*/function () {
1224 function Collapse(element
, config
) {
1225 this._isTransitioning
= false;
1226 this._element
= element
;
1227 this._config
= this._getConfig(config
);
1228 this._triggerArray
= [].slice
.call(document
.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element
.id
+ "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element
.id
+ "\"]")));
1229 var toggleList
= [].slice
.call(document
.querySelectorAll(SELECTOR_DATA_TOGGLE
$1));
1231 for (var i
= 0, len
= toggleList
.length
; i
< len
; i
++) {
1232 var elem
= toggleList
[i
];
1233 var selector
= Util
.getSelectorFromElement(elem
);
1234 var filterElement
= [].slice
.call(document
.querySelectorAll(selector
)).filter(function (foundElem
) {
1235 return foundElem
=== element
;
1238 if (selector
!== null && filterElement
.length
> 0) {
1239 this._selector
= selector
;
1241 this._triggerArray
.push(elem
);
1245 this._parent
= this._config
.parent
? this._getParent() : null;
1247 if (!this._config
.parent
) {
1248 this._addAriaAndCollapsedClass(this._element
, this._triggerArray
);
1251 if (this._config
.toggle
) {
1257 var _proto
= Collapse
.prototype;
1260 _proto
.toggle
= function toggle() {
1261 if ($__default
['default'](this._element
).hasClass(CLASS_NAME_SHOW
$1)) {
1268 _proto
.show
= function show() {
1271 if (this._isTransitioning
|| $__default
['default'](this._element
).hasClass(CLASS_NAME_SHOW
$1)) {
1279 actives
= [].slice
.call(this._parent
.querySelectorAll(SELECTOR_ACTIVES
)).filter(function (elem
) {
1280 if (typeof _this
._config
.parent
=== 'string') {
1281 return elem
.getAttribute('data-parent') === _this
._config
.parent
;
1284 return elem
.classList
.contains(CLASS_NAME_COLLAPSE
);
1287 if (actives
.length
=== 0) {
1293 activesData
= $__default
['default'](actives
).not(this._selector
).data(DATA_KEY
$3);
1295 if (activesData
&& activesData
._isTransitioning
) {
1300 var startEvent
= $__default
['default'].Event(EVENT_SHOW
);
1301 $__default
['default'](this._element
).trigger(startEvent
);
1303 if (startEvent
.isDefaultPrevented()) {
1308 Collapse
._jQueryInterface
.call($__default
['default'](actives
).not(this._selector
), 'hide');
1311 $__default
['default'](actives
).data(DATA_KEY
$3, null);
1315 var dimension
= this._getDimension();
1317 $__default
['default'](this._element
).removeClass(CLASS_NAME_COLLAPSE
).addClass(CLASS_NAME_COLLAPSING
);
1318 this._element
.style
[dimension
] = 0;
1320 if (this._triggerArray
.length
) {
1321 $__default
['default'](this._triggerArray
).removeClass(CLASS_NAME_COLLAPSED
).attr('aria-expanded', true);
1324 this.setTransitioning(true);
1326 var complete
= function complete() {
1327 $__default
['default'](_this
._element
).removeClass(CLASS_NAME_COLLAPSING
).addClass(CLASS_NAME_COLLAPSE
+ " " + CLASS_NAME_SHOW
$1);
1328 _this
._element
.style
[dimension
] = '';
1330 _this
.setTransitioning(false);
1332 $__default
['default'](_this
._element
).trigger(EVENT_SHOWN
);
1335 var capitalizedDimension
= dimension
[0].toUpperCase() + dimension
.slice(1);
1336 var scrollSize
= "scroll" + capitalizedDimension
;
1337 var transitionDuration
= Util
.getTransitionDurationFromElement(this._element
);
1338 $__default
['default'](this._element
).one(Util
.TRANSITION_END
, complete
).emulateTransitionEnd(transitionDuration
);
1339 this._element
.style
[dimension
] = this._element
[scrollSize
] + "px";
1342 _proto
.hide
= function hide() {
1345 if (this._isTransitioning
|| !$__default
['default'](this._element
).hasClass(CLASS_NAME_SHOW
$1)) {
1349 var startEvent
= $__default
['default'].Event(EVENT_HIDE
);
1350 $__default
['default'](this._element
).trigger(startEvent
);
1352 if (startEvent
.isDefaultPrevented()) {
1356 var dimension
= this._getDimension();
1358 this._element
.style
[dimension
] = this._element
.getBoundingClientRect()[dimension
] + "px";
1359 Util
.reflow(this._element
);
1360 $__default
['default'](this._element
).addClass(CLASS_NAME_COLLAPSING
).removeClass(CLASS_NAME_COLLAPSE
+ " " + CLASS_NAME_SHOW
$1);
1361 var triggerArrayLength
= this._triggerArray
.length
;
1363 if (triggerArrayLength
> 0) {
1364 for (var i
= 0; i
< triggerArrayLength
; i
++) {
1365 var trigger
= this._triggerArray
[i
];
1366 var selector
= Util
.getSelectorFromElement(trigger
);
1368 if (selector
!== null) {
1369 var $elem
= $__default
['default']([].slice
.call(document
.querySelectorAll(selector
)));
1371 if (!$elem
.hasClass(CLASS_NAME_SHOW
$1)) {
1372 $__default
['default'](trigger
).addClass(CLASS_NAME_COLLAPSED
).attr('aria-expanded', false);
1378 this.setTransitioning(true);
1380 var complete
= function complete() {
1381 _this2
.setTransitioning(false);
1383 $__default
['default'](_this2
._element
).removeClass(CLASS_NAME_COLLAPSING
).addClass(CLASS_NAME_COLLAPSE
).trigger(EVENT_HIDDEN
);
1386 this._element
.style
[dimension
] = '';
1387 var transitionDuration
= Util
.getTransitionDurationFromElement(this._element
);
1388 $__default
['default'](this._element
).one(Util
.TRANSITION_END
, complete
).emulateTransitionEnd(transitionDuration
);
1391 _proto
.setTransitioning
= function setTransitioning(isTransitioning
) {
1392 this._isTransitioning
= isTransitioning
;
1395 _proto
.dispose
= function dispose() {
1396 $__default
['default'].removeData(this._element
, DATA_KEY
$3);
1397 this._config
= null;
1398 this._parent
= null;
1399 this._element
= null;
1400 this._triggerArray
= null;
1401 this._isTransitioning
= null;
1405 _proto
._getConfig
= function _getConfig(config
) {
1406 config
= _extends({}, Default
$1, config
);
1407 config
.toggle
= Boolean(config
.toggle
); // Coerce string values
1409 Util
.typeCheckConfig(NAME
$3, config
, DefaultType
$1);
1413 _proto
._getDimension
= function _getDimension() {
1414 var hasWidth
= $__default
['default'](this._element
).hasClass(DIMENSION_WIDTH
);
1415 return hasWidth
? DIMENSION_WIDTH
: DIMENSION_HEIGHT
;
1418 _proto
._getParent
= function _getParent() {
1423 if (Util
.isElement(this._config
.parent
)) {
1424 parent
= this._config
.parent
; // It's a jQuery object
1426 if (typeof this._config
.parent
.jquery
!== 'undefined') {
1427 parent
= this._config
.parent
[0];
1430 parent
= document
.querySelector(this._config
.parent
);
1433 var selector
= "[data-toggle=\"collapse\"][data-parent=\"" + this._config
.parent
+ "\"]";
1434 var children
= [].slice
.call(parent
.querySelectorAll(selector
));
1435 $__default
['default'](children
).each(function (i
, element
) {
1436 _this3
._addAriaAndCollapsedClass(Collapse
._getTargetFromElement(element
), [element
]);
1441 _proto
._addAriaAndCollapsedClass
= function _addAriaAndCollapsedClass(element
, triggerArray
) {
1442 var isOpen
= $__default
['default'](element
).hasClass(CLASS_NAME_SHOW
$1);
1444 if (triggerArray
.length
) {
1445 $__default
['default'](triggerArray
).toggleClass(CLASS_NAME_COLLAPSED
, !isOpen
).attr('aria-expanded', isOpen
);
1450 Collapse
._getTargetFromElement
= function _getTargetFromElement(element
) {
1451 var selector
= Util
.getSelectorFromElement(element
);
1452 return selector
? document
.querySelector(selector
) : null;
1455 Collapse
._jQueryInterface
= function _jQueryInterface(config
) {
1456 return this.each(function () {
1457 var $element
= $__default
['default'](this);
1458 var data
= $element
.data(DATA_KEY
$3);
1460 var _config
= _extends({}, Default
$1, $element
.data(), typeof config
=== 'object' && config
? config
: {});
1462 if (!data
&& _config
.toggle
&& typeof config
=== 'string' && /show|hide/.test(config
)) {
1463 _config
.toggle
= false;
1467 data
= new Collapse(this, _config
);
1468 $element
.data(DATA_KEY
$3, data
);
1471 if (typeof config
=== 'string') {
1472 if (typeof data
[config
] === 'undefined') {
1473 throw new TypeError("No method named \"" + config
+ "\"");
1481 _createClass(Collapse
, null, [{
1483 get: function get() {
1488 get: function get() {
1496 * ------------------------------------------------------------------------
1497 * Data Api implementation
1498 * ------------------------------------------------------------------------
1502 $__default
['default'](document
).on(EVENT_CLICK_DATA_API
$3, SELECTOR_DATA_TOGGLE
$1, function (event
) {
1503 // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
1504 if (event
.currentTarget
.tagName
=== 'A') {
1505 event
.preventDefault();
1508 var $trigger
= $__default
['default'](this);
1509 var selector
= Util
.getSelectorFromElement(this);
1510 var selectors
= [].slice
.call(document
.querySelectorAll(selector
));
1511 $__default
['default'](selectors
).each(function () {
1512 var $target
= $__default
['default'](this);
1513 var data
= $target
.data(DATA_KEY
$3);
1514 var config
= data
? 'toggle' : $trigger
.data();
1516 Collapse
._jQueryInterface
.call($target
, config
);
1520 * ------------------------------------------------------------------------
1522 * ------------------------------------------------------------------------
1525 $__default
['default'].fn
[NAME
$3] = Collapse
._jQueryInterface
;
1526 $__default
['default'].fn
[NAME
$3].Constructor
= Collapse
;
1528 $__default
['default'].fn
[NAME
$3].noConflict = function () {
1529 $__default
['default'].fn
[NAME
$3] = JQUERY_NO_CONFLICT
$3;
1530 return Collapse
._jQueryInterface
;
1534 * @fileOverview Kickass library to create and place poppers near their reference elements.
1537 * Copyright (c) 2016 Federico Zivolo and contributors
1539 * Permission is hereby granted, free of charge, to any person obtaining a copy
1540 * of this software and associated documentation files (the "Software"), to deal
1541 * in the Software without restriction, including without limitation the rights
1542 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1543 * copies of the Software, and to permit persons to whom the Software is
1544 * furnished to do so, subject to the following conditions:
1546 * The above copyright notice and this permission notice shall be included in all
1547 * copies or substantial portions of the Software.
1549 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1550 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1551 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1552 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1553 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1554 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1557 var isBrowser
= typeof window
!== 'undefined' && typeof document
!== 'undefined' && typeof navigator
!== 'undefined';
1559 var timeoutDuration = function () {
1560 var longerTimeoutBrowsers
= ['Edge', 'Trident', 'Firefox'];
1561 for (var i
= 0; i
< longerTimeoutBrowsers
.length
; i
+= 1) {
1562 if (isBrowser
&& navigator
.userAgent
.indexOf(longerTimeoutBrowsers
[i
]) >= 0) {
1569 function microtaskDebounce(fn
) {
1571 return function () {
1576 window
.Promise
.resolve().then(function () {
1583 function taskDebounce(fn
) {
1584 var scheduled
= false;
1585 return function () {
1588 setTimeout(function () {
1591 }, timeoutDuration
);
1596 var supportsMicroTasks
= isBrowser
&& window
.Promise
;
1599 * Create a debounced version of a method, that's asynchronously deferred
1600 * but called in the minimum time possible.
1603 * @memberof Popper.Utils
1604 * @argument {Function} fn
1605 * @returns {Function}
1607 var debounce
= supportsMicroTasks
? microtaskDebounce
: taskDebounce
;
1610 * Check if the given variable is a function
1612 * @memberof Popper.Utils
1613 * @argument {Any} functionToCheck - variable to check
1614 * @returns {Boolean} answer to: is a function?
1616 function isFunction(functionToCheck
) {
1618 return functionToCheck
&& getType
.toString
.call(functionToCheck
) === '[object Function]';
1622 * Get CSS computed property of the given element
1624 * @memberof Popper.Utils
1625 * @argument {Eement} element
1626 * @argument {String} property
1628 function getStyleComputedProperty(element
, property
) {
1629 if (element
.nodeType
!== 1) {
1632 // NOTE: 1 DOM access here
1633 var window
= element
.ownerDocument
.defaultView
;
1634 var css
= window
.getComputedStyle(element
, null);
1635 return property
? css
[property
] : css
;
1639 * Returns the parentNode or the host of the element
1641 * @memberof Popper.Utils
1642 * @argument {Element} element
1643 * @returns {Element} parent
1645 function getParentNode(element
) {
1646 if (element
.nodeName
=== 'HTML') {
1649 return element
.parentNode
|| element
.host
;
1653 * Returns the scrolling parent of the given element
1655 * @memberof Popper.Utils
1656 * @argument {Element} element
1657 * @returns {Element} scroll parent
1659 function getScrollParent(element
) {
1660 // Return body, `getScroll` will take care to get the correct `scrollTop` from it
1662 return document
.body
;
1665 switch (element
.nodeName
) {
1668 return element
.ownerDocument
.body
;
1670 return element
.body
;
1673 // Firefox want us to check `-x` and `-y` variations as well
1675 var _getStyleComputedProp
= getStyleComputedProperty(element
),
1676 overflow
= _getStyleComputedProp
.overflow
,
1677 overflowX
= _getStyleComputedProp
.overflowX
,
1678 overflowY
= _getStyleComputedProp
.overflowY
;
1680 if (/(auto|scroll|overlay)/.test(overflow
+ overflowY
+ overflowX
)) {
1684 return getScrollParent(getParentNode(element
));
1688 * Returns the reference node of the reference object, or the reference object itself.
1690 * @memberof Popper.Utils
1691 * @param {Element|Object} reference - the reference element (the popper will be relative to this)
1692 * @returns {Element} parent
1694 function getReferenceNode(reference
) {
1695 return reference
&& reference
.referenceNode
? reference
.referenceNode
: reference
;
1698 var isIE11
= isBrowser
&& !!(window
.MSInputMethodContext
&& document
.documentMode
);
1699 var isIE10
= isBrowser
&& /MSIE 10/.test(navigator
.userAgent
);
1702 * Determines if the browser is Internet Explorer
1704 * @memberof Popper.Utils
1705 * @param {Number} version to check
1706 * @returns {Boolean} isIE
1708 function isIE(version
) {
1709 if (version
=== 11) {
1712 if (version
=== 10) {
1715 return isIE11
|| isIE10
;
1719 * Returns the offset parent of the given element
1721 * @memberof Popper.Utils
1722 * @argument {Element} element
1723 * @returns {Element} offset parent
1725 function getOffsetParent(element
) {
1727 return document
.documentElement
;
1730 var noOffsetParent
= isIE(10) ? document
.body
: null;
1732 // NOTE: 1 DOM access here
1733 var offsetParent
= element
.offsetParent
|| null;
1734 // Skip hidden elements which don't have an offsetParent
1735 while (offsetParent
=== noOffsetParent
&& element
.nextElementSibling
) {
1736 offsetParent
= (element
= element
.nextElementSibling
).offsetParent
;
1739 var nodeName
= offsetParent
&& offsetParent
.nodeName
;
1741 if (!nodeName
|| nodeName
=== 'BODY' || nodeName
=== 'HTML') {
1742 return element
? element
.ownerDocument
.documentElement
: document
.documentElement
;
1745 // .offsetParent will return the closest TH, TD or TABLE in case
1746 // no offsetParent is present, I hate this job...
1747 if (['TH', 'TD', 'TABLE'].indexOf(offsetParent
.nodeName
) !== -1 && getStyleComputedProperty(offsetParent
, 'position') === 'static') {
1748 return getOffsetParent(offsetParent
);
1751 return offsetParent
;
1754 function isOffsetContainer(element
) {
1755 var nodeName
= element
.nodeName
;
1757 if (nodeName
=== 'BODY') {
1760 return nodeName
=== 'HTML' || getOffsetParent(element
.firstElementChild
) === element
;
1764 * Finds the root node (document, shadowDOM root) of the given element
1766 * @memberof Popper.Utils
1767 * @argument {Element} node
1768 * @returns {Element} root node
1770 function getRoot(node
) {
1771 if (node
.parentNode
!== null) {
1772 return getRoot(node
.parentNode
);
1779 * Finds the offset parent common to the two provided nodes
1781 * @memberof Popper.Utils
1782 * @argument {Element} element1
1783 * @argument {Element} element2
1784 * @returns {Element} common offset parent
1786 function findCommonOffsetParent(element1
, element2
) {
1787 // This check is needed to avoid errors in case one of the elements isn't defined for any reason
1788 if (!element1
|| !element1
.nodeType
|| !element2
|| !element2
.nodeType
) {
1789 return document
.documentElement
;
1792 // Here we make sure to give as "start" the element that comes first in the DOM
1793 var order
= element1
.compareDocumentPosition(element2
) & Node
.DOCUMENT_POSITION_FOLLOWING
;
1794 var start
= order
? element1
: element2
;
1795 var end
= order
? element2
: element1
;
1797 // Get common ancestor container
1798 var range
= document
.createRange();
1799 range
.setStart(start
, 0);
1800 range
.setEnd(end
, 0);
1801 var commonAncestorContainer
= range
.commonAncestorContainer
;
1803 // Both nodes are inside #document
1805 if (element1
!== commonAncestorContainer
&& element2
!== commonAncestorContainer
|| start
.contains(end
)) {
1806 if (isOffsetContainer(commonAncestorContainer
)) {
1807 return commonAncestorContainer
;
1810 return getOffsetParent(commonAncestorContainer
);
1813 // one of the nodes is inside shadowDOM, find which one
1814 var element1root
= getRoot(element1
);
1815 if (element1root
.host
) {
1816 return findCommonOffsetParent(element1root
.host
, element2
);
1818 return findCommonOffsetParent(element1
, getRoot(element2
).host
);
1823 * Gets the scroll value of the given element in the given side (top and left)
1825 * @memberof Popper.Utils
1826 * @argument {Element} element
1827 * @argument {String} side `top` or `left`
1828 * @returns {number} amount of scrolled pixels
1830 function getScroll(element
) {
1831 var side
= arguments
.length
> 1 && arguments
[1] !== undefined ? arguments
[1] : 'top';
1833 var upperSide
= side
=== 'top' ? 'scrollTop' : 'scrollLeft';
1834 var nodeName
= element
.nodeName
;
1836 if (nodeName
=== 'BODY' || nodeName
=== 'HTML') {
1837 var html
= element
.ownerDocument
.documentElement
;
1838 var scrollingElement
= element
.ownerDocument
.scrollingElement
|| html
;
1839 return scrollingElement
[upperSide
];
1842 return element
[upperSide
];
1846 * Sum or subtract the element scroll values (left and top) from a given rect object
1848 * @memberof Popper.Utils
1849 * @param {Object} rect - Rect object you want to change
1850 * @param {HTMLElement} element - The element from the function reads the scroll values
1851 * @param {Boolean} subtract - set to true if you want to subtract the scroll values
1852 * @return {Object} rect - The modifier rect object
1854 function includeScroll(rect
, element
) {
1855 var subtract
= arguments
.length
> 2 && arguments
[2] !== undefined ? arguments
[2] : false;
1857 var scrollTop
= getScroll(element
, 'top');
1858 var scrollLeft
= getScroll(element
, 'left');
1859 var modifier
= subtract
? -1 : 1;
1860 rect
.top
+= scrollTop
* modifier
;
1861 rect
.bottom
+= scrollTop
* modifier
;
1862 rect
.left
+= scrollLeft
* modifier
;
1863 rect
.right
+= scrollLeft
* modifier
;
1868 * Helper to detect borders of a given element
1870 * @memberof Popper.Utils
1871 * @param {CSSStyleDeclaration} styles
1872 * Result of `getStyleComputedProperty` on the given element
1873 * @param {String} axis - `x` or `y`
1874 * @return {number} borders - The borders size of the given axis
1877 function getBordersSize(styles
, axis
) {
1878 var sideA
= axis
=== 'x' ? 'Left' : 'Top';
1879 var sideB
= sideA
=== 'Left' ? 'Right' : 'Bottom';
1881 return parseFloat(styles
['border' + sideA
+ 'Width']) + parseFloat(styles
['border' + sideB
+ 'Width']);
1884 function getSize(axis
, body
, html
, computedStyle
) {
1885 return Math
.max(body
['offset' + axis
], body
['scroll' + axis
], html
['client' + axis
], html
['offset' + axis
], html
['scroll' + axis
], isIE(10) ? parseInt(html
['offset' + axis
]) + parseInt(computedStyle
['margin' + (axis
=== 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle
['margin' + (axis
=== 'Height' ? 'Bottom' : 'Right')]) : 0);
1888 function getWindowSizes(document
) {
1889 var body
= document
.body
;
1890 var html
= document
.documentElement
;
1891 var computedStyle
= isIE(10) && getComputedStyle(html
);
1894 height
: getSize('Height', body
, html
, computedStyle
),
1895 width
: getSize('Width', body
, html
, computedStyle
)
1899 var classCallCheck = function (instance
, Constructor
) {
1900 if (!(instance
instanceof Constructor
)) {
1901 throw new TypeError("Cannot call a class as a function");
1905 var createClass = function () {
1906 function defineProperties(target
, props
) {
1907 for (var i
= 0; i
< props
.length
; i
++) {
1908 var descriptor
= props
[i
];
1909 descriptor
.enumerable
= descriptor
.enumerable
|| false;
1910 descriptor
.configurable
= true;
1911 if ("value" in descriptor
) descriptor
.writable
= true;
1912 Object
.defineProperty(target
, descriptor
.key
, descriptor
);
1916 return function (Constructor
, protoProps
, staticProps
) {
1917 if (protoProps
) defineProperties(Constructor
.prototype, protoProps
);
1918 if (staticProps
) defineProperties(Constructor
, staticProps
);
1927 var defineProperty = function (obj
, key
, value
) {
1929 Object
.defineProperty(obj
, key
, {
1942 var _extends
$1 = Object
.assign
|| function (target
) {
1943 for (var i
= 1; i
< arguments
.length
; i
++) {
1944 var source
= arguments
[i
];
1946 for (var key
in source
) {
1947 if (Object
.prototype.hasOwnProperty
.call(source
, key
)) {
1948 target
[key
] = source
[key
];
1957 * Given element offsets, generate an output similar to getBoundingClientRect
1959 * @memberof Popper.Utils
1960 * @argument {Object} offsets
1961 * @returns {Object} ClientRect like output
1963 function getClientRect(offsets
) {
1964 return _extends
$1({}, offsets
, {
1965 right
: offsets
.left
+ offsets
.width
,
1966 bottom
: offsets
.top
+ offsets
.height
1971 * Get bounding client rect of given element
1973 * @memberof Popper.Utils
1974 * @param {HTMLElement} element
1975 * @return {Object} client rect
1977 function getBoundingClientRect(element
) {
1980 // IE10 10 FIX: Please, don't ask, the element isn't
1981 // considered in DOM in some circumstances...
1982 // This isn't reproducible in IE10 compatibility mode of IE11
1985 rect
= element
.getBoundingClientRect();
1986 var scrollTop
= getScroll(element
, 'top');
1987 var scrollLeft
= getScroll(element
, 'left');
1988 rect
.top
+= scrollTop
;
1989 rect
.left
+= scrollLeft
;
1990 rect
.bottom
+= scrollTop
;
1991 rect
.right
+= scrollLeft
;
1993 rect
= element
.getBoundingClientRect();
2000 width
: rect
.right
- rect
.left
,
2001 height
: rect
.bottom
- rect
.top
2004 // subtract scrollbar size from sizes
2005 var sizes
= element
.nodeName
=== 'HTML' ? getWindowSizes(element
.ownerDocument
) : {};
2006 var width
= sizes
.width
|| element
.clientWidth
|| result
.width
;
2007 var height
= sizes
.height
|| element
.clientHeight
|| result
.height
;
2009 var horizScrollbar
= element
.offsetWidth
- width
;
2010 var vertScrollbar
= element
.offsetHeight
- height
;
2012 // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
2013 // we make this check conditional for performance reasons
2014 if (horizScrollbar
|| vertScrollbar
) {
2015 var styles
= getStyleComputedProperty(element
);
2016 horizScrollbar
-= getBordersSize(styles
, 'x');
2017 vertScrollbar
-= getBordersSize(styles
, 'y');
2019 result
.width
-= horizScrollbar
;
2020 result
.height
-= vertScrollbar
;
2023 return getClientRect(result
);
2026 function getOffsetRectRelativeToArbitraryNode(children
, parent
) {
2027 var fixedPosition
= arguments
.length
> 2 && arguments
[2] !== undefined ? arguments
[2] : false;
2029 var isIE10
= isIE(10);
2030 var isHTML
= parent
.nodeName
=== 'HTML';
2031 var childrenRect
= getBoundingClientRect(children
);
2032 var parentRect
= getBoundingClientRect(parent
);
2033 var scrollParent
= getScrollParent(children
);
2035 var styles
= getStyleComputedProperty(parent
);
2036 var borderTopWidth
= parseFloat(styles
.borderTopWidth
);
2037 var borderLeftWidth
= parseFloat(styles
.borderLeftWidth
);
2039 // In cases where the parent is fixed, we must ignore negative scroll in offset calc
2040 if (fixedPosition
&& isHTML
) {
2041 parentRect
.top
= Math
.max(parentRect
.top
, 0);
2042 parentRect
.left
= Math
.max(parentRect
.left
, 0);
2044 var offsets
= getClientRect({
2045 top
: childrenRect
.top
- parentRect
.top
- borderTopWidth
,
2046 left
: childrenRect
.left
- parentRect
.left
- borderLeftWidth
,
2047 width
: childrenRect
.width
,
2048 height
: childrenRect
.height
2050 offsets
.marginTop
= 0;
2051 offsets
.marginLeft
= 0;
2053 // Subtract margins of documentElement in case it's being used as parent
2054 // we do this only on HTML because it's the only element that behaves
2055 // differently when margins are applied to it. The margins are included in
2056 // the box of the documentElement, in the other cases not.
2057 if (!isIE10
&& isHTML
) {
2058 var marginTop
= parseFloat(styles
.marginTop
);
2059 var marginLeft
= parseFloat(styles
.marginLeft
);
2061 offsets
.top
-= borderTopWidth
- marginTop
;
2062 offsets
.bottom
-= borderTopWidth
- marginTop
;
2063 offsets
.left
-= borderLeftWidth
- marginLeft
;
2064 offsets
.right
-= borderLeftWidth
- marginLeft
;
2066 // Attach marginTop and marginLeft because in some circumstances we may need them
2067 offsets
.marginTop
= marginTop
;
2068 offsets
.marginLeft
= marginLeft
;
2071 if (isIE10
&& !fixedPosition
? parent
.contains(scrollParent
) : parent
=== scrollParent
&& scrollParent
.nodeName
!== 'BODY') {
2072 offsets
= includeScroll(offsets
, parent
);
2078 function getViewportOffsetRectRelativeToArtbitraryNode(element
) {
2079 var excludeScroll
= arguments
.length
> 1 && arguments
[1] !== undefined ? arguments
[1] : false;
2081 var html
= element
.ownerDocument
.documentElement
;
2082 var relativeOffset
= getOffsetRectRelativeToArbitraryNode(element
, html
);
2083 var width
= Math
.max(html
.clientWidth
, window
.innerWidth
|| 0);
2084 var height
= Math
.max(html
.clientHeight
, window
.innerHeight
|| 0);
2086 var scrollTop
= !excludeScroll
? getScroll(html
) : 0;
2087 var scrollLeft
= !excludeScroll
? getScroll(html
, 'left') : 0;
2090 top
: scrollTop
- relativeOffset
.top
+ relativeOffset
.marginTop
,
2091 left
: scrollLeft
- relativeOffset
.left
+ relativeOffset
.marginLeft
,
2096 return getClientRect(offset
);
2100 * Check if the given element is fixed or is inside a fixed parent
2102 * @memberof Popper.Utils
2103 * @argument {Element} element
2104 * @argument {Element} customContainer
2105 * @returns {Boolean} answer to "isFixed?"
2107 function isFixed(element
) {
2108 var nodeName
= element
.nodeName
;
2109 if (nodeName
=== 'BODY' || nodeName
=== 'HTML') {
2112 if (getStyleComputedProperty(element
, 'position') === 'fixed') {
2115 var parentNode
= getParentNode(element
);
2119 return isFixed(parentNode
);
2123 * Finds the first parent of an element that has a transformed property defined
2125 * @memberof Popper.Utils
2126 * @argument {Element} element
2127 * @returns {Element} first transformed parent or documentElement
2130 function getFixedPositionOffsetParent(element
) {
2131 // This check is needed to avoid errors in case one of the elements isn't defined for any reason
2132 if (!element
|| !element
.parentElement
|| isIE()) {
2133 return document
.documentElement
;
2135 var el
= element
.parentElement
;
2136 while (el
&& getStyleComputedProperty(el
, 'transform') === 'none') {
2137 el
= el
.parentElement
;
2139 return el
|| document
.documentElement
;
2143 * Computed the boundaries limits and return them
2145 * @memberof Popper.Utils
2146 * @param {HTMLElement} popper
2147 * @param {HTMLElement} reference
2148 * @param {number} padding
2149 * @param {HTMLElement} boundariesElement - Element used to define the boundaries
2150 * @param {Boolean} fixedPosition - Is in fixed position mode
2151 * @returns {Object} Coordinates of the boundaries
2153 function getBoundaries(popper
, reference
, padding
, boundariesElement
) {
2154 var fixedPosition
= arguments
.length
> 4 && arguments
[4] !== undefined ? arguments
[4] : false;
2156 // NOTE: 1 DOM access here
2158 var boundaries
= { top
: 0, left
: 0 };
2159 var offsetParent
= fixedPosition
? getFixedPositionOffsetParent(popper
) : findCommonOffsetParent(popper
, getReferenceNode(reference
));
2161 // Handle viewport case
2162 if (boundariesElement
=== 'viewport') {
2163 boundaries
= getViewportOffsetRectRelativeToArtbitraryNode(offsetParent
, fixedPosition
);
2165 // Handle other cases based on DOM element used as boundaries
2166 var boundariesNode
= void 0;
2167 if (boundariesElement
=== 'scrollParent') {
2168 boundariesNode
= getScrollParent(getParentNode(reference
));
2169 if (boundariesNode
.nodeName
=== 'BODY') {
2170 boundariesNode
= popper
.ownerDocument
.documentElement
;
2172 } else if (boundariesElement
=== 'window') {
2173 boundariesNode
= popper
.ownerDocument
.documentElement
;
2175 boundariesNode
= boundariesElement
;
2178 var offsets
= getOffsetRectRelativeToArbitraryNode(boundariesNode
, offsetParent
, fixedPosition
);
2180 // In case of HTML, we need a different computation
2181 if (boundariesNode
.nodeName
=== 'HTML' && !isFixed(offsetParent
)) {
2182 var _getWindowSizes
= getWindowSizes(popper
.ownerDocument
),
2183 height
= _getWindowSizes
.height
,
2184 width
= _getWindowSizes
.width
;
2186 boundaries
.top
+= offsets
.top
- offsets
.marginTop
;
2187 boundaries
.bottom
= height
+ offsets
.top
;
2188 boundaries
.left
+= offsets
.left
- offsets
.marginLeft
;
2189 boundaries
.right
= width
+ offsets
.left
;
2191 // for all the other DOM elements, this one is good
2192 boundaries
= offsets
;
2197 padding
= padding
|| 0;
2198 var isPaddingNumber
= typeof padding
=== 'number';
2199 boundaries
.left
+= isPaddingNumber
? padding
: padding
.left
|| 0;
2200 boundaries
.top
+= isPaddingNumber
? padding
: padding
.top
|| 0;
2201 boundaries
.right
-= isPaddingNumber
? padding
: padding
.right
|| 0;
2202 boundaries
.bottom
-= isPaddingNumber
? padding
: padding
.bottom
|| 0;
2207 function getArea(_ref
) {
2208 var width
= _ref
.width
,
2209 height
= _ref
.height
;
2211 return width
* height
;
2215 * Utility used to transform the `auto` placement to the placement with more
2218 * @memberof Popper.Utils
2219 * @argument {Object} data - The data object generated by update method
2220 * @argument {Object} options - Modifiers configuration and options
2221 * @returns {Object} The data object, properly modified
2223 function computeAutoPlacement(placement
, refRect
, popper
, reference
, boundariesElement
) {
2224 var padding
= arguments
.length
> 5 && arguments
[5] !== undefined ? arguments
[5] : 0;
2226 if (placement
.indexOf('auto') === -1) {
2230 var boundaries
= getBoundaries(popper
, reference
, padding
, boundariesElement
);
2234 width
: boundaries
.width
,
2235 height
: refRect
.top
- boundaries
.top
2238 width
: boundaries
.right
- refRect
.right
,
2239 height
: boundaries
.height
2242 width
: boundaries
.width
,
2243 height
: boundaries
.bottom
- refRect
.bottom
2246 width
: refRect
.left
- boundaries
.left
,
2247 height
: boundaries
.height
2251 var sortedAreas
= Object
.keys(rects
).map(function (key
) {
2255 area
: getArea(rects
[key
])
2257 }).sort(function (a
, b
) {
2258 return b
.area
- a
.area
;
2261 var filteredAreas
= sortedAreas
.filter(function (_ref2
) {
2262 var width
= _ref2
.width
,
2263 height
= _ref2
.height
;
2264 return width
>= popper
.clientWidth
&& height
>= popper
.clientHeight
;
2267 var computedPlacement
= filteredAreas
.length
> 0 ? filteredAreas
[0].key
: sortedAreas
[0].key
;
2269 var variation
= placement
.split('-')[1];
2271 return computedPlacement
+ (variation
? '-' + variation
: '');
2275 * Get offsets to the reference element
2277 * @memberof Popper.Utils
2278 * @param {Object} state
2279 * @param {Element} popper - the popper element
2280 * @param {Element} reference - the reference element (the popper will be relative to this)
2281 * @param {Element} fixedPosition - is in fixed position mode
2282 * @returns {Object} An object containing the offsets which will be applied to the popper
2284 function getReferenceOffsets(state
, popper
, reference
) {
2285 var fixedPosition
= arguments
.length
> 3 && arguments
[3] !== undefined ? arguments
[3] : null;
2287 var commonOffsetParent
= fixedPosition
? getFixedPositionOffsetParent(popper
) : findCommonOffsetParent(popper
, getReferenceNode(reference
));
2288 return getOffsetRectRelativeToArbitraryNode(reference
, commonOffsetParent
, fixedPosition
);
2292 * Get the outer sizes of the given element (offset size + margins)
2294 * @memberof Popper.Utils
2295 * @argument {Element} element
2296 * @returns {Object} object containing width and height properties
2298 function getOuterSizes(element
) {
2299 var window
= element
.ownerDocument
.defaultView
;
2300 var styles
= window
.getComputedStyle(element
);
2301 var x
= parseFloat(styles
.marginTop
|| 0) + parseFloat(styles
.marginBottom
|| 0);
2302 var y
= parseFloat(styles
.marginLeft
|| 0) + parseFloat(styles
.marginRight
|| 0);
2304 width
: element
.offsetWidth
+ y
,
2305 height
: element
.offsetHeight
+ x
2311 * Get the opposite placement of the given one
2313 * @memberof Popper.Utils
2314 * @argument {String} placement
2315 * @returns {String} flipped placement
2317 function getOppositePlacement(placement
) {
2318 var hash
= { left
: 'right', right
: 'left', bottom
: 'top', top
: 'bottom' };
2319 return placement
.replace(/left|right|bottom|top/g, function (matched
) {
2320 return hash
[matched
];
2325 * Get offsets to the popper
2327 * @memberof Popper.Utils
2328 * @param {Object} position - CSS position the Popper will get applied
2329 * @param {HTMLElement} popper - the popper element
2330 * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
2331 * @param {String} placement - one of the valid placement options
2332 * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
2334 function getPopperOffsets(popper
, referenceOffsets
, placement
) {
2335 placement
= placement
.split('-')[0];
2337 // Get popper node sizes
2338 var popperRect
= getOuterSizes(popper
);
2340 // Add position, width and height to our offsets object
2341 var popperOffsets
= {
2342 width
: popperRect
.width
,
2343 height
: popperRect
.height
2346 // depending by the popper placement we have to compute its offsets slightly differently
2347 var isHoriz
= ['right', 'left'].indexOf(placement
) !== -1;
2348 var mainSide
= isHoriz
? 'top' : 'left';
2349 var secondarySide
= isHoriz
? 'left' : 'top';
2350 var measurement
= isHoriz
? 'height' : 'width';
2351 var secondaryMeasurement
= !isHoriz
? 'height' : 'width';
2353 popperOffsets
[mainSide
] = referenceOffsets
[mainSide
] + referenceOffsets
[measurement
] / 2 - popperRect
[measurement
] / 2;
2354 if (placement
=== secondarySide
) {
2355 popperOffsets
[secondarySide
] = referenceOffsets
[secondarySide
] - popperRect
[secondaryMeasurement
];
2357 popperOffsets
[secondarySide
] = referenceOffsets
[getOppositePlacement(secondarySide
)];
2360 return popperOffsets
;
2364 * Mimics the `find` method of Array
2366 * @memberof Popper.Utils
2367 * @argument {Array} arr
2370 * @returns index or -1
2372 function find(arr
, check
) {
2373 // use native find if supported
2374 if (Array
.prototype.find
) {
2375 return arr
.find(check
);
2378 // use `filter` to obtain the same behavior of `find`
2379 return arr
.filter(check
)[0];
2383 * Return the index of the matching object
2385 * @memberof Popper.Utils
2386 * @argument {Array} arr
2389 * @returns index or -1
2391 function findIndex(arr
, prop
, value
) {
2392 // use native findIndex if supported
2393 if (Array
.prototype.findIndex
) {
2394 return arr
.findIndex(function (cur
) {
2395 return cur
[prop
] === value
;
2399 // use `find` + `indexOf` if `findIndex` isn't supported
2400 var match
= find(arr
, function (obj
) {
2401 return obj
[prop
] === value
;
2403 return arr
.indexOf(match
);
2407 * Loop trough the list of modifiers and run them in order,
2408 * each of them will then edit the data object.
2410 * @memberof Popper.Utils
2411 * @param {dataObject} data
2412 * @param {Array} modifiers
2413 * @param {String} ends - Optional modifier name used as stopper
2414 * @returns {dataObject}
2416 function runModifiers(modifiers
, data
, ends
) {
2417 var modifiersToRun
= ends
=== undefined ? modifiers
: modifiers
.slice(0, findIndex(modifiers
, 'name', ends
));
2419 modifiersToRun
.forEach(function (modifier
) {
2420 if (modifier
['function']) {
2421 // eslint-disable-line dot-notation
2422 console
.warn('`modifier.function` is deprecated, use `modifier.fn`!');
2424 var fn
= modifier
['function'] || modifier
.fn
; // eslint-disable-line dot-notation
2425 if (modifier
.enabled
&& isFunction(fn
)) {
2426 // Add properties to offsets to make them a complete clientRect object
2427 // we do this before each modifier to make sure the previous one doesn't
2428 // mess with these values
2429 data
.offsets
.popper
= getClientRect(data
.offsets
.popper
);
2430 data
.offsets
.reference
= getClientRect(data
.offsets
.reference
);
2432 data
= fn(data
, modifier
);
2440 * Updates the position of the popper, computing the new offsets and applying
2441 * the new style.<br />
2442 * Prefer `scheduleUpdate` over `update` because of performance reasons.
2447 // if popper is destroyed, don't perform any further update
2448 if (this.state
.isDestroyed
) {
2461 // compute reference element offsets
2462 data
.offsets
.reference
= getReferenceOffsets(this.state
, this.popper
, this.reference
, this.options
.positionFixed
);
2464 // compute auto placement, store placement inside the data object,
2465 // modifiers will be able to edit `placement` if needed
2466 // and refer to originalPlacement to know the original value
2467 data
.placement
= computeAutoPlacement(this.options
.placement
, data
.offsets
.reference
, this.popper
, this.reference
, this.options
.modifiers
.flip
.boundariesElement
, this.options
.modifiers
.flip
.padding
);
2469 // store the computed placement inside `originalPlacement`
2470 data
.originalPlacement
= data
.placement
;
2472 data
.positionFixed
= this.options
.positionFixed
;
2474 // compute the popper offsets
2475 data
.offsets
.popper
= getPopperOffsets(this.popper
, data
.offsets
.reference
, data
.placement
);
2477 data
.offsets
.popper
.position
= this.options
.positionFixed
? 'fixed' : 'absolute';
2479 // run the modifiers
2480 data
= runModifiers(this.modifiers
, data
);
2482 // the first `update` will call `onCreate` callback
2483 // the other ones will call `onUpdate` callback
2484 if (!this.state
.isCreated
) {
2485 this.state
.isCreated
= true;
2486 this.options
.onCreate(data
);
2488 this.options
.onUpdate(data
);
2493 * Helper used to know if the given modifier is enabled.
2495 * @memberof Popper.Utils
2496 * @returns {Boolean}
2498 function isModifierEnabled(modifiers
, modifierName
) {
2499 return modifiers
.some(function (_ref
) {
2500 var name
= _ref
.name
,
2501 enabled
= _ref
.enabled
;
2502 return enabled
&& name
=== modifierName
;
2507 * Get the prefixed supported property name
2509 * @memberof Popper.Utils
2510 * @argument {String} property (camelCase)
2511 * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
2513 function getSupportedPropertyName(property
) {
2514 var prefixes
= [false, 'ms', 'Webkit', 'Moz', 'O'];
2515 var upperProp
= property
.charAt(0).toUpperCase() + property
.slice(1);
2517 for (var i
= 0; i
< prefixes
.length
; i
++) {
2518 var prefix
= prefixes
[i
];
2519 var toCheck
= prefix
? '' + prefix
+ upperProp
: property
;
2520 if (typeof document
.body
.style
[toCheck
] !== 'undefined') {
2528 * Destroys the popper.
2532 function destroy() {
2533 this.state
.isDestroyed
= true;
2535 // touch DOM only if `applyStyle` modifier is enabled
2536 if (isModifierEnabled(this.modifiers
, 'applyStyle')) {
2537 this.popper
.removeAttribute('x-placement');
2538 this.popper
.style
.position
= '';
2539 this.popper
.style
.top
= '';
2540 this.popper
.style
.left
= '';
2541 this.popper
.style
.right
= '';
2542 this.popper
.style
.bottom
= '';
2543 this.popper
.style
.willChange
= '';
2544 this.popper
.style
[getSupportedPropertyName('transform')] = '';
2547 this.disableEventListeners();
2549 // remove the popper if user explicitly asked for the deletion on destroy
2550 // do not use `remove` because IE11 doesn't support it
2551 if (this.options
.removeOnDestroy
) {
2552 this.popper
.parentNode
.removeChild(this.popper
);
2558 * Get the window associated with the element
2559 * @argument {Element} element
2562 function getWindow(element
) {
2563 var ownerDocument
= element
.ownerDocument
;
2564 return ownerDocument
? ownerDocument
.defaultView
: window
;
2567 function attachToScrollParents(scrollParent
, event
, callback
, scrollParents
) {
2568 var isBody
= scrollParent
.nodeName
=== 'BODY';
2569 var target
= isBody
? scrollParent
.ownerDocument
.defaultView
: scrollParent
;
2570 target
.addEventListener(event
, callback
, { passive
: true });
2573 attachToScrollParents(getScrollParent(target
.parentNode
), event
, callback
, scrollParents
);
2575 scrollParents
.push(target
);
2579 * Setup needed event listeners used to update the popper position
2581 * @memberof Popper.Utils
2584 function setupEventListeners(reference
, options
, state
, updateBound
) {
2585 // Resize event listener on window
2586 state
.updateBound
= updateBound
;
2587 getWindow(reference
).addEventListener('resize', state
.updateBound
, { passive
: true });
2589 // Scroll event listener on scroll parents
2590 var scrollElement
= getScrollParent(reference
);
2591 attachToScrollParents(scrollElement
, 'scroll', state
.updateBound
, state
.scrollParents
);
2592 state
.scrollElement
= scrollElement
;
2593 state
.eventsEnabled
= true;
2599 * It will add resize/scroll events and start recalculating
2600 * position of the popper element when they are triggered.
2604 function enableEventListeners() {
2605 if (!this.state
.eventsEnabled
) {
2606 this.state
= setupEventListeners(this.reference
, this.options
, this.state
, this.scheduleUpdate
);
2611 * Remove event listeners used to update the popper position
2613 * @memberof Popper.Utils
2616 function removeEventListeners(reference
, state
) {
2617 // Remove resize event listener on window
2618 getWindow(reference
).removeEventListener('resize', state
.updateBound
);
2620 // Remove scroll event listener on scroll parents
2621 state
.scrollParents
.forEach(function (target
) {
2622 target
.removeEventListener('scroll', state
.updateBound
);
2626 state
.updateBound
= null;
2627 state
.scrollParents
= [];
2628 state
.scrollElement
= null;
2629 state
.eventsEnabled
= false;
2634 * It will remove resize/scroll events and won't recalculate popper position
2635 * when they are triggered. It also won't trigger `onUpdate` callback anymore,
2636 * unless you call `update` method manually.
2640 function disableEventListeners() {
2641 if (this.state
.eventsEnabled
) {
2642 cancelAnimationFrame(this.scheduleUpdate
);
2643 this.state
= removeEventListeners(this.reference
, this.state
);
2648 * Tells if a given input is a number
2650 * @memberof Popper.Utils
2651 * @param {*} input to check
2654 function isNumeric(n
) {
2655 return n
!== '' && !isNaN(parseFloat(n
)) && isFinite(n
);
2659 * Set the style to the given popper
2661 * @memberof Popper.Utils
2662 * @argument {Element} element - Element to apply the style to
2663 * @argument {Object} styles
2664 * Object with a list of properties and values which will be applied to the element
2666 function setStyles(element
, styles
) {
2667 Object
.keys(styles
).forEach(function (prop
) {
2669 // add unit if the value is numeric and is one of the following
2670 if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop
) !== -1 && isNumeric(styles
[prop
])) {
2673 element
.style
[prop
] = styles
[prop
] + unit
;
2678 * Set the attributes to the given popper
2680 * @memberof Popper.Utils
2681 * @argument {Element} element - Element to apply the attributes to
2682 * @argument {Object} styles
2683 * Object with a list of properties and values which will be applied to the element
2685 function setAttributes(element
, attributes
) {
2686 Object
.keys(attributes
).forEach(function (prop
) {
2687 var value
= attributes
[prop
];
2688 if (value
!== false) {
2689 element
.setAttribute(prop
, attributes
[prop
]);
2691 element
.removeAttribute(prop
);
2698 * @memberof Modifiers
2699 * @argument {Object} data - The data object generated by `update` method
2700 * @argument {Object} data.styles - List of style properties - values to apply to popper element
2701 * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element
2702 * @argument {Object} options - Modifiers configuration and options
2703 * @returns {Object} The same data object
2705 function applyStyle(data
) {
2706 // any property present in `data.styles` will be applied to the popper,
2707 // in this way we can make the 3rd party modifiers add custom styles to it
2708 // Be aware, modifiers could override the properties defined in the previous
2709 // lines of this modifier!
2710 setStyles(data
.instance
.popper
, data
.styles
);
2712 // any property present in `data.attributes` will be applied to the popper,
2713 // they will be set as HTML attributes of the element
2714 setAttributes(data
.instance
.popper
, data
.attributes
);
2716 // if arrowElement is defined and arrowStyles has some properties
2717 if (data
.arrowElement
&& Object
.keys(data
.arrowStyles
).length
) {
2718 setStyles(data
.arrowElement
, data
.arrowStyles
);
2725 * Set the x-placement attribute before everything else because it could be used
2726 * to add margins to the popper margins needs to be calculated to get the
2727 * correct popper offsets.
2729 * @memberof Popper.modifiers
2730 * @param {HTMLElement} reference - The reference element used to position the popper
2731 * @param {HTMLElement} popper - The HTML element used as popper
2732 * @param {Object} options - Popper.js options
2734 function applyStyleOnLoad(reference
, popper
, options
, modifierOptions
, state
) {
2735 // compute reference element offsets
2736 var referenceOffsets
= getReferenceOffsets(state
, popper
, reference
, options
.positionFixed
);
2738 // compute auto placement, store placement inside the data object,
2739 // modifiers will be able to edit `placement` if needed
2740 // and refer to originalPlacement to know the original value
2741 var placement
= computeAutoPlacement(options
.placement
, referenceOffsets
, popper
, reference
, options
.modifiers
.flip
.boundariesElement
, options
.modifiers
.flip
.padding
);
2743 popper
.setAttribute('x-placement', placement
);
2745 // Apply `position` to popper before anything else because
2746 // without the position applied we can't guarantee correct computations
2747 setStyles(popper
, { position
: options
.positionFixed
? 'fixed' : 'absolute' });
2754 * @memberof Popper.Utils
2755 * @argument {Object} data - The data object generated by `update` method
2756 * @argument {Boolean} shouldRound - If the offsets should be rounded at all
2757 * @returns {Object} The popper's position offsets rounded
2759 * The tale of pixel-perfect positioning. It's still not 100% perfect, but as
2760 * good as it can be within reason.
2761 * Discussion here: https://github.com/FezVrasta/popper.js/pull/715
2763 * Low DPI screens cause a popper to be blurry if not using full pixels (Safari
2764 * as well on High DPI screens).
2766 * Firefox prefers no rounding for positioning and does not have blurriness on
2769 * Only horizontal placement and left/right values need to be considered.
2771 function getRoundedOffsets(data
, shouldRound
) {
2772 var _data
$offsets
= data
.offsets
,
2773 popper
= _data
$offsets
.popper
,
2774 reference
= _data
$offsets
.reference
;
2775 var round
= Math
.round
,
2778 var noRound
= function noRound(v
) {
2782 var referenceWidth
= round(reference
.width
);
2783 var popperWidth
= round(popper
.width
);
2785 var isVertical
= ['left', 'right'].indexOf(data
.placement
) !== -1;
2786 var isVariation
= data
.placement
.indexOf('-') !== -1;
2787 var sameWidthParity
= referenceWidth
% 2 === popperWidth
% 2;
2788 var bothOddWidth
= referenceWidth
% 2 === 1 && popperWidth
% 2 === 1;
2790 var horizontalToInteger
= !shouldRound
? noRound
: isVertical
|| isVariation
|| sameWidthParity
? round
: floor
;
2791 var verticalToInteger
= !shouldRound
? noRound
: round
;
2794 left
: horizontalToInteger(bothOddWidth
&& !isVariation
&& shouldRound
? popper
.left
- 1 : popper
.left
),
2795 top
: verticalToInteger(popper
.top
),
2796 bottom
: verticalToInteger(popper
.bottom
),
2797 right
: horizontalToInteger(popper
.right
)
2801 var isFirefox
= isBrowser
&& /Firefox/i.test(navigator
.userAgent
);
2805 * @memberof Modifiers
2806 * @argument {Object} data - The data object generated by `update` method
2807 * @argument {Object} options - Modifiers configuration and options
2808 * @returns {Object} The data object, properly modified
2810 function computeStyle(data
, options
) {
2813 var popper
= data
.offsets
.popper
;
2815 // Remove this legacy support in Popper.js v2
2817 var legacyGpuAccelerationOption
= find(data
.instance
.modifiers
, function (modifier
) {
2818 return modifier
.name
=== 'applyStyle';
2820 if (legacyGpuAccelerationOption
!== undefined) {
2821 console
.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
2823 var gpuAcceleration
= legacyGpuAccelerationOption
!== undefined ? legacyGpuAccelerationOption
: options
.gpuAcceleration
;
2825 var offsetParent
= getOffsetParent(data
.instance
.popper
);
2826 var offsetParentRect
= getBoundingClientRect(offsetParent
);
2830 position
: popper
.position
2833 var offsets
= getRoundedOffsets(data
, window
.devicePixelRatio
< 2 || !isFirefox
);
2835 var sideA
= x
=== 'bottom' ? 'top' : 'bottom';
2836 var sideB
= y
=== 'right' ? 'left' : 'right';
2838 // if gpuAcceleration is set to `true` and transform is supported,
2839 // we use `translate3d` to apply the position to the popper we
2840 // automatically use the supported prefixed version if needed
2841 var prefixedProperty
= getSupportedPropertyName('transform');
2843 // now, let's make a step back and look at this code closely (wtf?)
2844 // If the content of the popper grows once it's been positioned, it
2845 // may happen that the popper gets misplaced because of the new content
2846 // overflowing its reference element
2847 // To avoid this problem, we provide two options (x and y), which allow
2848 // the consumer to define the offset origin.
2849 // If we position a popper on top of a reference element, we can set
2850 // `x` to `top` to make the popper grow towards its top instead of
2854 if (sideA
=== 'bottom') {
2855 // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)
2856 // and not the bottom of the html element
2857 if (offsetParent
.nodeName
=== 'HTML') {
2858 top
= -offsetParent
.clientHeight
+ offsets
.bottom
;
2860 top
= -offsetParentRect
.height
+ offsets
.bottom
;
2865 if (sideB
=== 'right') {
2866 if (offsetParent
.nodeName
=== 'HTML') {
2867 left
= -offsetParent
.clientWidth
+ offsets
.right
;
2869 left
= -offsetParentRect
.width
+ offsets
.right
;
2872 left
= offsets
.left
;
2874 if (gpuAcceleration
&& prefixedProperty
) {
2875 styles
[prefixedProperty
] = 'translate3d(' + left
+ 'px, ' + top
+ 'px, 0)';
2878 styles
.willChange
= 'transform';
2880 // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
2881 var invertTop
= sideA
=== 'bottom' ? -1 : 1;
2882 var invertLeft
= sideB
=== 'right' ? -1 : 1;
2883 styles
[sideA
] = top
* invertTop
;
2884 styles
[sideB
] = left
* invertLeft
;
2885 styles
.willChange
= sideA
+ ', ' + sideB
;
2890 'x-placement': data
.placement
2893 // Update `data` attributes, styles and arrowStyles
2894 data
.attributes
= _extends
$1({}, attributes
, data
.attributes
);
2895 data
.styles
= _extends
$1({}, styles
, data
.styles
);
2896 data
.arrowStyles
= _extends
$1({}, data
.offsets
.arrow
, data
.arrowStyles
);
2902 * Helper used to know if the given modifier depends from another one.<br />
2903 * It checks if the needed modifier is listed and enabled.
2905 * @memberof Popper.Utils
2906 * @param {Array} modifiers - list of modifiers
2907 * @param {String} requestingName - name of requesting modifier
2908 * @param {String} requestedName - name of requested modifier
2909 * @returns {Boolean}
2911 function isModifierRequired(modifiers
, requestingName
, requestedName
) {
2912 var requesting
= find(modifiers
, function (_ref
) {
2913 var name
= _ref
.name
;
2914 return name
=== requestingName
;
2917 var isRequired
= !!requesting
&& modifiers
.some(function (modifier
) {
2918 return modifier
.name
=== requestedName
&& modifier
.enabled
&& modifier
.order
< requesting
.order
;
2922 var _requesting
= '`' + requestingName
+ '`';
2923 var requested
= '`' + requestedName
+ '`';
2924 console
.warn(requested
+ ' modifier is required by ' + _requesting
+ ' modifier in order to work, be sure to include it before ' + _requesting
+ '!');
2931 * @memberof Modifiers
2932 * @argument {Object} data - The data object generated by update method
2933 * @argument {Object} options - Modifiers configuration and options
2934 * @returns {Object} The data object, properly modified
2936 function arrow(data
, options
) {
2937 var _data
$offsets
$arrow
;
2939 // arrow depends on keepTogether in order to work
2940 if (!isModifierRequired(data
.instance
.modifiers
, 'arrow', 'keepTogether')) {
2944 var arrowElement
= options
.element
;
2946 // if arrowElement is a string, suppose it's a CSS selector
2947 if (typeof arrowElement
=== 'string') {
2948 arrowElement
= data
.instance
.popper
.querySelector(arrowElement
);
2950 // if arrowElement is not found, don't run the modifier
2951 if (!arrowElement
) {
2955 // if the arrowElement isn't a query selector we must check that the
2956 // provided DOM node is child of its popper node
2957 if (!data
.instance
.popper
.contains(arrowElement
)) {
2958 console
.warn('WARNING: `arrow.element` must be child of its popper element!');
2963 var placement
= data
.placement
.split('-')[0];
2964 var _data
$offsets
= data
.offsets
,
2965 popper
= _data
$offsets
.popper
,
2966 reference
= _data
$offsets
.reference
;
2968 var isVertical
= ['left', 'right'].indexOf(placement
) !== -1;
2970 var len
= isVertical
? 'height' : 'width';
2971 var sideCapitalized
= isVertical
? 'Top' : 'Left';
2972 var side
= sideCapitalized
.toLowerCase();
2973 var altSide
= isVertical
? 'left' : 'top';
2974 var opSide
= isVertical
? 'bottom' : 'right';
2975 var arrowElementSize
= getOuterSizes(arrowElement
)[len
];
2978 // extends keepTogether behavior making sure the popper and its
2979 // reference have enough pixels in conjunction
2983 if (reference
[opSide
] - arrowElementSize
< popper
[side
]) {
2984 data
.offsets
.popper
[side
] -= popper
[side
] - (reference
[opSide
] - arrowElementSize
);
2986 // bottom/right side
2987 if (reference
[side
] + arrowElementSize
> popper
[opSide
]) {
2988 data
.offsets
.popper
[side
] += reference
[side
] + arrowElementSize
- popper
[opSide
];
2990 data
.offsets
.popper
= getClientRect(data
.offsets
.popper
);
2992 // compute center of the popper
2993 var center
= reference
[side
] + reference
[len
] / 2 - arrowElementSize
/ 2;
2995 // Compute the sideValue using the updated popper offsets
2996 // take popper margin in account because we don't have this info available
2997 var css
= getStyleComputedProperty(data
.instance
.popper
);
2998 var popperMarginSide
= parseFloat(css
['margin' + sideCapitalized
]);
2999 var popperBorderSide
= parseFloat(css
['border' + sideCapitalized
+ 'Width']);
3000 var sideValue
= center
- data
.offsets
.popper
[side
] - popperMarginSide
- popperBorderSide
;
3002 // prevent arrowElement from being placed not contiguously to its popper
3003 sideValue
= Math
.max(Math
.min(popper
[len
] - arrowElementSize
, sideValue
), 0);
3005 data
.arrowElement
= arrowElement
;
3006 data
.offsets
.arrow
= (_data
$offsets
$arrow
= {}, defineProperty(_data
$offsets
$arrow
, side
, Math
.round(sideValue
)), defineProperty(_data
$offsets
$arrow
, altSide
, ''), _data
$offsets
$arrow
);
3012 * Get the opposite placement variation of the given one
3014 * @memberof Popper.Utils
3015 * @argument {String} placement variation
3016 * @returns {String} flipped placement variation
3018 function getOppositeVariation(variation
) {
3019 if (variation
=== 'end') {
3021 } else if (variation
=== 'start') {
3028 * List of accepted placements to use as values of the `placement` option.<br />
3029 * Valid placements are:
3036 * Each placement can have a variation from this list:
3040 * Variations are interpreted easily if you think of them as the left to right
3041 * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`
3043 * Vertically (`left` and `right`), `start` is top and `end` is bottom.
3045 * Some valid examples are:
3046 * - `top-end` (on top of reference, right aligned)
3047 * - `right-start` (on right of reference, top aligned)
3048 * - `bottom` (on bottom, centered)
3049 * - `auto-end` (on the side with more space available, alignment depends by placement)
3055 * @method placements
3058 var placements
= ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
3060 // Get rid of `auto` `auto-start` and `auto-end`
3061 var validPlacements
= placements
.slice(3);
3064 * Given an initial placement, returns all the subsequent placements
3065 * clockwise (or counter-clockwise).
3068 * @memberof Popper.Utils
3069 * @argument {String} placement - A valid placement (it accepts variations)
3070 * @argument {Boolean} counter - Set to true to walk the placements counterclockwise
3071 * @returns {Array} placements including their variations
3073 function clockwise(placement
) {
3074 var counter
= arguments
.length
> 1 && arguments
[1] !== undefined ? arguments
[1] : false;
3076 var index
= validPlacements
.indexOf(placement
);
3077 var arr
= validPlacements
.slice(index
+ 1).concat(validPlacements
.slice(0, index
));
3078 return counter
? arr
.reverse() : arr
;
3083 CLOCKWISE
: 'clockwise',
3084 COUNTERCLOCKWISE
: 'counterclockwise'
3089 * @memberof Modifiers
3090 * @argument {Object} data - The data object generated by update method
3091 * @argument {Object} options - Modifiers configuration and options
3092 * @returns {Object} The data object, properly modified
3094 function flip(data
, options
) {
3095 // if `inner` modifier is enabled, we can't use the `flip` modifier
3096 if (isModifierEnabled(data
.instance
.modifiers
, 'inner')) {
3100 if (data
.flipped
&& data
.placement
=== data
.originalPlacement
) {
3101 // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
3105 var boundaries
= getBoundaries(data
.instance
.popper
, data
.instance
.reference
, options
.padding
, options
.boundariesElement
, data
.positionFixed
);
3107 var placement
= data
.placement
.split('-')[0];
3108 var placementOpposite
= getOppositePlacement(placement
);
3109 var variation
= data
.placement
.split('-')[1] || '';
3113 switch (options
.behavior
) {
3114 case BEHAVIORS
.FLIP
:
3115 flipOrder
= [placement
, placementOpposite
];
3117 case BEHAVIORS
.CLOCKWISE
:
3118 flipOrder
= clockwise(placement
);
3120 case BEHAVIORS
.COUNTERCLOCKWISE
:
3121 flipOrder
= clockwise(placement
, true);
3124 flipOrder
= options
.behavior
;
3127 flipOrder
.forEach(function (step
, index
) {
3128 if (placement
!== step
|| flipOrder
.length
=== index
+ 1) {
3132 placement
= data
.placement
.split('-')[0];
3133 placementOpposite
= getOppositePlacement(placement
);
3135 var popperOffsets
= data
.offsets
.popper
;
3136 var refOffsets
= data
.offsets
.reference
;
3138 // using floor because the reference offsets may contain decimals we are not going to consider here
3139 var floor
= Math
.floor
;
3140 var overlapsRef
= placement
=== 'left' && floor(popperOffsets
.right
) > floor(refOffsets
.left
) || placement
=== 'right' && floor(popperOffsets
.left
) < floor(refOffsets
.right
) || placement
=== 'top' && floor(popperOffsets
.bottom
) > floor(refOffsets
.top
) || placement
=== 'bottom' && floor(popperOffsets
.top
) < floor(refOffsets
.bottom
);
3142 var overflowsLeft
= floor(popperOffsets
.left
) < floor(boundaries
.left
);
3143 var overflowsRight
= floor(popperOffsets
.right
) > floor(boundaries
.right
);
3144 var overflowsTop
= floor(popperOffsets
.top
) < floor(boundaries
.top
);
3145 var overflowsBottom
= floor(popperOffsets
.bottom
) > floor(boundaries
.bottom
);
3147 var overflowsBoundaries
= placement
=== 'left' && overflowsLeft
|| placement
=== 'right' && overflowsRight
|| placement
=== 'top' && overflowsTop
|| placement
=== 'bottom' && overflowsBottom
;
3149 // flip the variation if required
3150 var isVertical
= ['top', 'bottom'].indexOf(placement
) !== -1;
3152 // flips variation if reference element overflows boundaries
3153 var flippedVariationByRef
= !!options
.flipVariations
&& (isVertical
&& variation
=== 'start' && overflowsLeft
|| isVertical
&& variation
=== 'end' && overflowsRight
|| !isVertical
&& variation
=== 'start' && overflowsTop
|| !isVertical
&& variation
=== 'end' && overflowsBottom
);
3155 // flips variation if popper content overflows boundaries
3156 var flippedVariationByContent
= !!options
.flipVariationsByContent
&& (isVertical
&& variation
=== 'start' && overflowsRight
|| isVertical
&& variation
=== 'end' && overflowsLeft
|| !isVertical
&& variation
=== 'start' && overflowsBottom
|| !isVertical
&& variation
=== 'end' && overflowsTop
);
3158 var flippedVariation
= flippedVariationByRef
|| flippedVariationByContent
;
3160 if (overlapsRef
|| overflowsBoundaries
|| flippedVariation
) {
3161 // this boolean to detect any flip loop
3162 data
.flipped
= true;
3164 if (overlapsRef
|| overflowsBoundaries
) {
3165 placement
= flipOrder
[index
+ 1];
3168 if (flippedVariation
) {
3169 variation
= getOppositeVariation(variation
);
3172 data
.placement
= placement
+ (variation
? '-' + variation
: '');
3174 // this object contains `position`, we want to preserve it along with
3175 // any additional property we may add in the future
3176 data
.offsets
.popper
= _extends
$1({}, data
.offsets
.popper
, getPopperOffsets(data
.instance
.popper
, data
.offsets
.reference
, data
.placement
));
3178 data
= runModifiers(data
.instance
.modifiers
, data
, 'flip');
3186 * @memberof Modifiers
3187 * @argument {Object} data - The data object generated by update method
3188 * @argument {Object} options - Modifiers configuration and options
3189 * @returns {Object} The data object, properly modified
3191 function keepTogether(data
) {
3192 var _data
$offsets
= data
.offsets
,
3193 popper
= _data
$offsets
.popper
,
3194 reference
= _data
$offsets
.reference
;
3196 var placement
= data
.placement
.split('-')[0];
3197 var floor
= Math
.floor
;
3198 var isVertical
= ['top', 'bottom'].indexOf(placement
) !== -1;
3199 var side
= isVertical
? 'right' : 'bottom';
3200 var opSide
= isVertical
? 'left' : 'top';
3201 var measurement
= isVertical
? 'width' : 'height';
3203 if (popper
[side
] < floor(reference
[opSide
])) {
3204 data
.offsets
.popper
[opSide
] = floor(reference
[opSide
]) - popper
[measurement
];
3206 if (popper
[opSide
] > floor(reference
[side
])) {
3207 data
.offsets
.popper
[opSide
] = floor(reference
[side
]);
3214 * Converts a string containing value + unit into a px value number
3216 * @memberof {modifiers~offset}
3218 * @argument {String} str - Value + unit string
3219 * @argument {String} measurement - `height` or `width`
3220 * @argument {Object} popperOffsets
3221 * @argument {Object} referenceOffsets
3222 * @returns {Number|String}
3223 * Value in pixels, or original string if no values were extracted
3225 function toValue(str
, measurement
, popperOffsets
, referenceOffsets
) {
3226 // separate value from unit
3227 var split
= str
.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
3228 var value
= +split
[1];
3229 var unit
= split
[2];
3231 // If it's not a number it's an operator, I guess
3236 if (unit
.indexOf('%') === 0) {
3237 var element
= void 0;
3240 element
= popperOffsets
;
3245 element
= referenceOffsets
;
3248 var rect
= getClientRect(element
);
3249 return rect
[measurement
] / 100 * value
;
3250 } else if (unit
=== 'vh' || unit
=== 'vw') {
3251 // if is a vh or vw, we calculate the size based on the viewport
3253 if (unit
=== 'vh') {
3254 size
= Math
.max(document
.documentElement
.clientHeight
, window
.innerHeight
|| 0);
3256 size
= Math
.max(document
.documentElement
.clientWidth
, window
.innerWidth
|| 0);
3258 return size
/ 100 * value
;
3260 // if is an explicit pixel unit, we get rid of the unit and keep the value
3261 // if is an implicit unit, it's px, and we return just the value
3267 * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.
3269 * @memberof {modifiers~offset}
3271 * @argument {String} offset
3272 * @argument {Object} popperOffsets
3273 * @argument {Object} referenceOffsets
3274 * @argument {String} basePlacement
3275 * @returns {Array} a two cells array with x and y offsets in numbers
3277 function parseOffset(offset
, popperOffsets
, referenceOffsets
, basePlacement
) {
3278 var offsets
= [0, 0];
3280 // Use height if placement is left or right and index is 0 otherwise use width
3281 // in this way the first offset will use an axis and the second one
3282 // will use the other one
3283 var useHeight
= ['right', 'left'].indexOf(basePlacement
) !== -1;
3285 // Split the offset string to obtain a list of values and operands
3286 // The regex addresses values with the plus or minus sign in front (+10, -20, etc)
3287 var fragments
= offset
.split(/(\+|\-)/).map(function (frag
) {
3291 // Detect if the offset string contains a pair of values or a single one
3292 // they could be separated by comma or space
3293 var divider
= fragments
.indexOf(find(fragments
, function (frag
) {
3294 return frag
.search(/,|\s/) !== -1;
3297 if (fragments
[divider
] && fragments
[divider
].indexOf(',') === -1) {
3298 console
.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
3301 // If divider is found, we divide the list of values and operands to divide
3302 // them by ofset X and Y.
3303 var splitRegex
= /\s*,\s*|\s+/;
3304 var ops
= divider
!== -1 ? [fragments
.slice(0, divider
).concat([fragments
[divider
].split(splitRegex
)[0]]), [fragments
[divider
].split(splitRegex
)[1]].concat(fragments
.slice(divider
+ 1))] : [fragments
];
3306 // Convert the values with units to absolute pixels to allow our computations
3307 ops
= ops
.map(function (op
, index
) {
3308 // Most of the units rely on the orientation of the popper
3309 var measurement
= (index
=== 1 ? !useHeight
: useHeight
) ? 'height' : 'width';
3310 var mergeWithPrevious
= false;
3312 // This aggregates any `+` or `-` sign that aren't considered operators
3313 // e.g.: 10 + +5 => [10, +, +5]
3314 .reduce(function (a
, b
) {
3315 if (a
[a
.length
- 1] === '' && ['+', '-'].indexOf(b
) !== -1) {
3316 a
[a
.length
- 1] = b
;
3317 mergeWithPrevious
= true;
3319 } else if (mergeWithPrevious
) {
3320 a
[a
.length
- 1] += b
;
3321 mergeWithPrevious
= false;
3327 // Here we convert the string values into number values (in px)
3328 .map(function (str
) {
3329 return toValue(str
, measurement
, popperOffsets
, referenceOffsets
);
3333 // Loop trough the offsets arrays and execute the operations
3334 ops
.forEach(function (op
, index
) {
3335 op
.forEach(function (frag
, index2
) {
3336 if (isNumeric(frag
)) {
3337 offsets
[index
] += frag
* (op
[index2
- 1] === '-' ? -1 : 1);
3346 * @memberof Modifiers
3347 * @argument {Object} data - The data object generated by update method
3348 * @argument {Object} options - Modifiers configuration and options
3349 * @argument {Number|String} options.offset=0
3350 * The offset value as described in the modifier description
3351 * @returns {Object} The data object, properly modified
3353 function offset(data
, _ref
) {
3354 var offset
= _ref
.offset
;
3355 var placement
= data
.placement
,
3356 _data
$offsets
= data
.offsets
,
3357 popper
= _data
$offsets
.popper
,
3358 reference
= _data
$offsets
.reference
;
3360 var basePlacement
= placement
.split('-')[0];
3362 var offsets
= void 0;
3363 if (isNumeric(+offset
)) {
3364 offsets
= [+offset
, 0];
3366 offsets
= parseOffset(offset
, popper
, reference
, basePlacement
);
3369 if (basePlacement
=== 'left') {
3370 popper
.top
+= offsets
[0];
3371 popper
.left
-= offsets
[1];
3372 } else if (basePlacement
=== 'right') {
3373 popper
.top
+= offsets
[0];
3374 popper
.left
+= offsets
[1];
3375 } else if (basePlacement
=== 'top') {
3376 popper
.left
+= offsets
[0];
3377 popper
.top
-= offsets
[1];
3378 } else if (basePlacement
=== 'bottom') {
3379 popper
.left
+= offsets
[0];
3380 popper
.top
+= offsets
[1];
3383 data
.popper
= popper
;
3389 * @memberof Modifiers
3390 * @argument {Object} data - The data object generated by `update` method
3391 * @argument {Object} options - Modifiers configuration and options
3392 * @returns {Object} The data object, properly modified
3394 function preventOverflow(data
, options
) {
3395 var boundariesElement
= options
.boundariesElement
|| getOffsetParent(data
.instance
.popper
);
3397 // If offsetParent is the reference element, we really want to
3398 // go one step up and use the next offsetParent as reference to
3399 // avoid to make this modifier completely useless and look like broken
3400 if (data
.instance
.reference
=== boundariesElement
) {
3401 boundariesElement
= getOffsetParent(boundariesElement
);
3404 // NOTE: DOM access here
3405 // resets the popper's position so that the document size can be calculated excluding
3406 // the size of the popper element itself
3407 var transformProp
= getSupportedPropertyName('transform');
3408 var popperStyles
= data
.instance
.popper
.style
; // assignment to help minification
3409 var top
= popperStyles
.top
,
3410 left
= popperStyles
.left
,
3411 transform
= popperStyles
[transformProp
];
3413 popperStyles
.top
= '';
3414 popperStyles
.left
= '';
3415 popperStyles
[transformProp
] = '';
3417 var boundaries
= getBoundaries(data
.instance
.popper
, data
.instance
.reference
, options
.padding
, boundariesElement
, data
.positionFixed
);
3419 // NOTE: DOM access here
3420 // restores the original style properties after the offsets have been computed
3421 popperStyles
.top
= top
;
3422 popperStyles
.left
= left
;
3423 popperStyles
[transformProp
] = transform
;
3425 options
.boundaries
= boundaries
;
3427 var order
= options
.priority
;
3428 var popper
= data
.offsets
.popper
;
3431 primary
: function primary(placement
) {
3432 var value
= popper
[placement
];
3433 if (popper
[placement
] < boundaries
[placement
] && !options
.escapeWithReference
) {
3434 value
= Math
.max(popper
[placement
], boundaries
[placement
]);
3436 return defineProperty({}, placement
, value
);
3438 secondary
: function secondary(placement
) {
3439 var mainSide
= placement
=== 'right' ? 'left' : 'top';
3440 var value
= popper
[mainSide
];
3441 if (popper
[placement
] > boundaries
[placement
] && !options
.escapeWithReference
) {
3442 value
= Math
.min(popper
[mainSide
], boundaries
[placement
] - (placement
=== 'right' ? popper
.width
: popper
.height
));
3444 return defineProperty({}, mainSide
, value
);
3448 order
.forEach(function (placement
) {
3449 var side
= ['left', 'top'].indexOf(placement
) !== -1 ? 'primary' : 'secondary';
3450 popper
= _extends
$1({}, popper
, check
[side
](placement
));
3453 data
.offsets
.popper
= popper
;
3460 * @memberof Modifiers
3461 * @argument {Object} data - The data object generated by `update` method
3462 * @argument {Object} options - Modifiers configuration and options
3463 * @returns {Object} The data object, properly modified
3465 function shift(data
) {
3466 var placement
= data
.placement
;
3467 var basePlacement
= placement
.split('-')[0];
3468 var shiftvariation
= placement
.split('-')[1];
3470 // if shift shiftvariation is specified, run the modifier
3471 if (shiftvariation
) {
3472 var _data
$offsets
= data
.offsets
,
3473 reference
= _data
$offsets
.reference
,
3474 popper
= _data
$offsets
.popper
;
3476 var isVertical
= ['bottom', 'top'].indexOf(basePlacement
) !== -1;
3477 var side
= isVertical
? 'left' : 'top';
3478 var measurement
= isVertical
? 'width' : 'height';
3480 var shiftOffsets
= {
3481 start
: defineProperty({}, side
, reference
[side
]),
3482 end
: defineProperty({}, side
, reference
[side
] + reference
[measurement
] - popper
[measurement
])
3485 data
.offsets
.popper
= _extends
$1({}, popper
, shiftOffsets
[shiftvariation
]);
3493 * @memberof Modifiers
3494 * @argument {Object} data - The data object generated by update method
3495 * @argument {Object} options - Modifiers configuration and options
3496 * @returns {Object} The data object, properly modified
3498 function hide(data
) {
3499 if (!isModifierRequired(data
.instance
.modifiers
, 'hide', 'preventOverflow')) {
3503 var refRect
= data
.offsets
.reference
;
3504 var bound
= find(data
.instance
.modifiers
, function (modifier
) {
3505 return modifier
.name
=== 'preventOverflow';
3508 if (refRect
.bottom
< bound
.top
|| refRect
.left
> bound
.right
|| refRect
.top
> bound
.bottom
|| refRect
.right
< bound
.left
) {
3509 // Avoid unnecessary DOM access if visibility hasn't changed
3510 if (data
.hide
=== true) {
3515 data
.attributes
['x-out-of-boundaries'] = '';
3517 // Avoid unnecessary DOM access if visibility hasn't changed
3518 if (data
.hide
=== false) {
3523 data
.attributes
['x-out-of-boundaries'] = false;
3531 * @memberof Modifiers
3532 * @argument {Object} data - The data object generated by `update` method
3533 * @argument {Object} options - Modifiers configuration and options
3534 * @returns {Object} The data object, properly modified
3536 function inner(data
) {
3537 var placement
= data
.placement
;
3538 var basePlacement
= placement
.split('-')[0];
3539 var _data
$offsets
= data
.offsets
,
3540 popper
= _data
$offsets
.popper
,
3541 reference
= _data
$offsets
.reference
;
3543 var isHoriz
= ['left', 'right'].indexOf(basePlacement
) !== -1;
3545 var subtractLength
= ['top', 'left'].indexOf(basePlacement
) === -1;
3547 popper
[isHoriz
? 'left' : 'top'] = reference
[basePlacement
] - (subtractLength
? popper
[isHoriz
? 'width' : 'height'] : 0);
3549 data
.placement
= getOppositePlacement(placement
);
3550 data
.offsets
.popper
= getClientRect(popper
);
3556 * Modifier function, each modifier can have a function of this type assigned
3557 * to its `fn` property.<br />
3558 * These functions will be called on each update, this means that you must
3559 * make sure they are performant enough to avoid performance bottlenecks.
3561 * @function ModifierFn
3562 * @argument {dataObject} data - The data object generated by `update` method
3563 * @argument {Object} options - Modifiers configuration and options
3564 * @returns {dataObject} The data object, properly modified
3568 * Modifiers are plugins used to alter the behavior of your poppers.<br />
3569 * Popper.js uses a set of 9 modifiers to provide all the basic functionalities
3570 * needed by the library.
3572 * Usually you don't want to override the `order`, `fn` and `onLoad` props.
3573 * All the other properties are configurations that could be tweaked.
3574 * @namespace modifiers
3578 * Modifier used to shift the popper on the start or end of its reference
3580 * It will read the variation of the `placement` property.<br />
3581 * It can be one either `-end` or `-start`.
3582 * @memberof modifiers
3586 /** @prop {number} order=100 - Index used to define the order of execution */
3588 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3590 /** @prop {ModifierFn} */
3595 * The `offset` modifier can shift your popper on both its axis.
3597 * It accepts the following units:
3598 * - `px` or unit-less, interpreted as pixels
3599 * - `%` or `%r`, percentage relative to the length of the reference element
3600 * - `%p`, percentage relative to the length of the popper element
3601 * - `vw`, CSS viewport width unit
3602 * - `vh`, CSS viewport height unit
3604 * For length is intended the main axis relative to the placement of the popper.<br />
3605 * This means that if the placement is `top` or `bottom`, the length will be the
3606 * `width`. In case of `left` or `right`, it will be the `height`.
3608 * You can provide a single value (as `Number` or `String`), or a pair of values
3609 * as `String` divided by a comma or one (or more) white spaces.<br />
3610 * The latter is a deprecated method because it leads to confusion and will be
3611 * removed in v2.<br />
3612 * Additionally, it accepts additions and subtractions between different units.
3613 * Note that multiplications and divisions aren't supported.
3615 * Valid examples are:
3623 * '-10px + 5vh, 5px - 6%'
3625 * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap
3626 * > with their reference element, unfortunately, you will have to disable the `flip` modifier.
3627 * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).
3629 * @memberof modifiers
3633 /** @prop {number} order=200 - Index used to define the order of execution */
3635 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3637 /** @prop {ModifierFn} */
3639 /** @prop {Number|String} offset=0
3640 * The offset value as described in the modifier description
3646 * Modifier used to prevent the popper from being positioned outside the boundary.
3648 * A scenario exists where the reference itself is not within the boundaries.<br />
3649 * We can say it has "escaped the boundaries" — or just "escaped".<br />
3650 * In this case we need to decide whether the popper should either:
3652 * - detach from the reference and remain "trapped" in the boundaries, or
3653 * - if it should ignore the boundary and "escape with its reference"
3655 * When `escapeWithReference` is set to`true` and reference is completely
3656 * outside its boundaries, the popper will overflow (or completely leave)
3657 * the boundaries in order to remain attached to the edge of the reference.
3659 * @memberof modifiers
3663 /** @prop {number} order=300 - Index used to define the order of execution */
3665 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3667 /** @prop {ModifierFn} */
3668 fn
: preventOverflow
,
3670 * @prop {Array} [priority=['left','right','top','bottom']]
3671 * Popper will try to prevent overflow following these priorities by default,
3672 * then, it could overflow on the left and on top of the `boundariesElement`
3674 priority
: ['left', 'right', 'top', 'bottom'],
3676 * @prop {number} padding=5
3677 * Amount of pixel used to define a minimum distance between the boundaries
3678 * and the popper. This makes sure the popper always has a little padding
3679 * between the edges of its container
3683 * @prop {String|HTMLElement} boundariesElement='scrollParent'
3684 * Boundaries used by the modifier. Can be `scrollParent`, `window`,
3685 * `viewport` or any DOM element.
3687 boundariesElement
: 'scrollParent'
3691 * Modifier used to make sure the reference and its popper stay near each other
3692 * without leaving any gap between the two. Especially useful when the arrow is
3693 * enabled and you want to ensure that it points to its reference element.
3694 * It cares only about the first axis. You can still have poppers with margin
3695 * between the popper and its reference element.
3696 * @memberof modifiers
3700 /** @prop {number} order=400 - Index used to define the order of execution */
3702 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3704 /** @prop {ModifierFn} */
3709 * This modifier is used to move the `arrowElement` of the popper to make
3710 * sure it is positioned between the reference element and its popper element.
3711 * It will read the outer size of the `arrowElement` node to detect how many
3712 * pixels of conjunction are needed.
3714 * It has no effect if no `arrowElement` is provided.
3715 * @memberof modifiers
3719 /** @prop {number} order=500 - Index used to define the order of execution */
3721 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3723 /** @prop {ModifierFn} */
3725 /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */
3726 element
: '[x-arrow]'
3730 * Modifier used to flip the popper's placement when it starts to overlap its
3731 * reference element.
3733 * Requires the `preventOverflow` modifier before it in order to work.
3735 * **NOTE:** this modifier will interrupt the current update cycle and will
3736 * restart it if it detects the need to flip the placement.
3737 * @memberof modifiers
3741 /** @prop {number} order=600 - Index used to define the order of execution */
3743 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3745 /** @prop {ModifierFn} */
3748 * @prop {String|Array} behavior='flip'
3749 * The behavior used to change the popper's placement. It can be one of
3750 * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid
3751 * placements (with optional variations)
3755 * @prop {number} padding=5
3756 * The popper will flip if it hits the edges of the `boundariesElement`
3760 * @prop {String|HTMLElement} boundariesElement='viewport'
3761 * The element which will define the boundaries of the popper position.
3762 * The popper will never be placed outside of the defined boundaries
3763 * (except if `keepTogether` is enabled)
3765 boundariesElement
: 'viewport',
3767 * @prop {Boolean} flipVariations=false
3768 * The popper will switch placement variation between `-start` and `-end` when
3769 * the reference element overlaps its boundaries.
3771 * The original placement should have a set variation.
3773 flipVariations
: false,
3775 * @prop {Boolean} flipVariationsByContent=false
3776 * The popper will switch placement variation between `-start` and `-end` when
3777 * the popper element overlaps its reference boundaries.
3779 * The original placement should have a set variation.
3781 flipVariationsByContent
: false
3785 * Modifier used to make the popper flow toward the inner of the reference element.
3786 * By default, when this modifier is disabled, the popper will be placed outside
3787 * the reference element.
3788 * @memberof modifiers
3792 /** @prop {number} order=700 - Index used to define the order of execution */
3794 /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */
3796 /** @prop {ModifierFn} */
3801 * Modifier used to hide the popper when its reference element is outside of the
3802 * popper boundaries. It will set a `x-out-of-boundaries` attribute which can
3803 * be used to hide with a CSS selector the popper when its reference is
3804 * out of boundaries.
3806 * Requires the `preventOverflow` modifier before it in order to work.
3807 * @memberof modifiers
3811 /** @prop {number} order=800 - Index used to define the order of execution */
3813 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3815 /** @prop {ModifierFn} */
3820 * Computes the style that will be applied to the popper element to gets
3821 * properly positioned.
3823 * Note that this modifier will not touch the DOM, it just prepares the styles
3824 * so that `applyStyle` modifier can apply it. This separation is useful
3825 * in case you need to replace `applyStyle` with a custom implementation.
3827 * This modifier has `850` as `order` value to maintain backward compatibility
3828 * with previous versions of Popper.js. Expect the modifiers ordering method
3829 * to change in future major versions of the library.
3831 * @memberof modifiers
3835 /** @prop {number} order=850 - Index used to define the order of execution */
3837 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3839 /** @prop {ModifierFn} */
3842 * @prop {Boolean} gpuAcceleration=true
3843 * If true, it uses the CSS 3D transformation to position the popper.
3844 * Otherwise, it will use the `top` and `left` properties
3846 gpuAcceleration
: true,
3848 * @prop {string} [x='bottom']
3849 * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.
3850 * Change this if your popper should grow in a direction different from `bottom`
3854 * @prop {string} [x='left']
3855 * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.
3856 * Change this if your popper should grow in a direction different from `right`
3862 * Applies the computed styles to the popper element.
3864 * All the DOM manipulations are limited to this modifier. This is useful in case
3865 * you want to integrate Popper.js inside a framework or view library and you
3866 * want to delegate all the DOM manipulations to it.
3868 * Note that if you disable this modifier, you must make sure the popper element
3869 * has its position set to `absolute` before Popper.js can do its work!
3871 * Just disable this modifier and define your own to achieve the desired effect.
3873 * @memberof modifiers
3877 /** @prop {number} order=900 - Index used to define the order of execution */
3879 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
3881 /** @prop {ModifierFn} */
3883 /** @prop {Function} */
3884 onLoad
: applyStyleOnLoad
,
3886 * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier
3887 * @prop {Boolean} gpuAcceleration=true
3888 * If true, it uses the CSS 3D transformation to position the popper.
3889 * Otherwise, it will use the `top` and `left` properties
3891 gpuAcceleration
: undefined
3896 * The `dataObject` is an object containing all the information used by Popper.js.
3897 * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.
3899 * @property {Object} data.instance The Popper.js instance
3900 * @property {String} data.placement Placement applied to popper
3901 * @property {String} data.originalPlacement Placement originally defined on init
3902 * @property {Boolean} data.flipped True if popper has been flipped by flip modifier
3903 * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper
3904 * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier
3905 * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)
3906 * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)
3907 * @property {Object} data.boundaries Offsets of the popper boundaries
3908 * @property {Object} data.offsets The measurements of popper, reference and arrow elements
3909 * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values
3910 * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values
3911 * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0
3915 * Default options provided to Popper.js constructor.<br />
3916 * These can be overridden using the `options` argument of Popper.js.<br />
3917 * To override an option, simply pass an object with the same
3918 * structure of the `options` object, as the 3rd argument. For example:
3920 * new Popper(ref, pop, {
3922 * preventOverflow: { enabled: false }
3932 * Popper's placement.
3933 * @prop {Popper.placements} placement='bottom'
3935 placement
: 'bottom',
3938 * Set this to true if you want popper to position it self in 'fixed' mode
3939 * @prop {Boolean} positionFixed=false
3941 positionFixed
: false,
3944 * Whether events (resize, scroll) are initially enabled.
3945 * @prop {Boolean} eventsEnabled=true
3947 eventsEnabled
: true,
3950 * Set to true if you want to automatically remove the popper when
3951 * you call the `destroy` method.
3952 * @prop {Boolean} removeOnDestroy=false
3954 removeOnDestroy
: false,
3957 * Callback called when the popper is created.<br />
3958 * By default, it is set to no-op.<br />
3959 * Access Popper.js instance with `data.instance`.
3962 onCreate
: function onCreate() {},
3965 * Callback called when the popper is updated. This callback is not called
3966 * on the initialization/creation of the popper, but only on subsequent
3968 * By default, it is set to no-op.<br />
3969 * Access Popper.js instance with `data.instance`.
3972 onUpdate
: function onUpdate() {},
3975 * List of modifiers used to modify the offsets before they are applied to the popper.
3976 * They provide most of the functionalities of Popper.js.
3979 modifiers
: modifiers
3983 * @callback onCreate
3984 * @param {dataObject} data
3988 * @callback onUpdate
3989 * @param {dataObject} data
3994 var Popper = function () {
3996 * Creates a new Popper.js instance.
3998 * @param {Element|referenceObject} reference - The reference element used to position the popper
3999 * @param {Element} popper - The HTML / XML element used as the popper
4000 * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
4001 * @return {Object} instance - The generated Popper.js instance
4003 function Popper(reference
, popper
) {
4006 var options
= arguments
.length
> 2 && arguments
[2] !== undefined ? arguments
[2] : {};
4007 classCallCheck(this, Popper
);
4009 this.scheduleUpdate = function () {
4010 return requestAnimationFrame(_this
.update
);
4013 // make update() debounced, so that it only runs at most once-per-tick
4014 this.update
= debounce(this.update
.bind(this));
4016 // with {} we create a new object with the options inside it
4017 this.options
= _extends
$1({}, Popper
.Defaults
, options
);
4026 // get reference and popper elements (allow jQuery wrappers)
4027 this.reference
= reference
&& reference
.jquery
? reference
[0] : reference
;
4028 this.popper
= popper
&& popper
.jquery
? popper
[0] : popper
;
4030 // Deep merge modifiers options
4031 this.options
.modifiers
= {};
4032 Object
.keys(_extends
$1({}, Popper
.Defaults
.modifiers
, options
.modifiers
)).forEach(function (name
) {
4033 _this
.options
.modifiers
[name
] = _extends
$1({}, Popper
.Defaults
.modifiers
[name
] || {}, options
.modifiers
? options
.modifiers
[name
] : {});
4036 // Refactoring modifiers' list (Object => Array)
4037 this.modifiers
= Object
.keys(this.options
.modifiers
).map(function (name
) {
4040 }, _this
.options
.modifiers
[name
]);
4042 // sort the modifiers by order
4043 .sort(function (a
, b
) {
4044 return a
.order
- b
.order
;
4047 // modifiers have the ability to execute arbitrary code when Popper.js get inited
4048 // such code is executed in the same order of its modifier
4049 // they could add new properties to their options configuration
4050 // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
4051 this.modifiers
.forEach(function (modifierOptions
) {
4052 if (modifierOptions
.enabled
&& isFunction(modifierOptions
.onLoad
)) {
4053 modifierOptions
.onLoad(_this
.reference
, _this
.popper
, _this
.options
, modifierOptions
, _this
.state
);
4057 // fire the first update to position the popper in the right place
4060 var eventsEnabled
= this.options
.eventsEnabled
;
4061 if (eventsEnabled
) {
4062 // setup event listeners, they will take care of update the position in specific situations
4063 this.enableEventListeners();
4066 this.state
.eventsEnabled
= eventsEnabled
;
4069 // We can't use class properties because they don't get listed in the
4070 // class prototype and break stuff like Sinon stubs
4073 createClass(Popper
, [{
4075 value
: function update
$$1() {
4076 return update
.call(this);
4080 value
: function destroy
$$1() {
4081 return destroy
.call(this);
4084 key
: 'enableEventListeners',
4085 value
: function enableEventListeners
$$1() {
4086 return enableEventListeners
.call(this);
4089 key
: 'disableEventListeners',
4090 value
: function disableEventListeners
$$1() {
4091 return disableEventListeners
.call(this);
4095 * Schedules an update. It will run on the next UI update available.
4096 * @method scheduleUpdate
4102 * Collection of utilities useful when writing custom modifiers.
4103 * Starting from version 1.7, this method is available only if you
4104 * include `popper-utils.js` before `popper.js`.
4106 * **DEPRECATION**: This way to access PopperUtils is deprecated
4107 * and will be removed in v2! Use the PopperUtils module directly instead.
4108 * Due to the high instability of the methods contained in Utils, we can't
4109 * guarantee them to follow semver. Use them at your own risk!
4113 * @deprecated since version 1.8
4123 * The `referenceObject` is an object that provides an interface compatible with Popper.js
4124 * and lets you use it as replacement of a real DOM node.<br />
4125 * You can use this method to position a popper relatively to a set of coordinates
4126 * in case you don't have a DOM node to use as reference.
4129 * new Popper(referenceObject, popperNode);
4132 * NB: This feature isn't supported in Internet Explorer 10.
4133 * @name referenceObject
4134 * @property {Function} data.getBoundingClientRect
4135 * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
4136 * @property {number} data.clientWidth
4137 * An ES6 getter that will return the width of the virtual reference element.
4138 * @property {number} data.clientHeight
4139 * An ES6 getter that will return the height of the virtual reference element.
4143 Popper
.Utils
= (typeof window
!== 'undefined' ? window
: global
).PopperUtils
;
4144 Popper
.placements
= placements
;
4145 Popper
.Defaults
= Defaults
;
4148 * ------------------------------------------------------------------------
4150 * ------------------------------------------------------------------------
4153 var NAME
$4 = 'dropdown';
4154 var VERSION
$4 = '4.6.0';
4155 var DATA_KEY
$4 = 'bs.dropdown';
4156 var EVENT_KEY
$4 = "." + DATA_KEY
$4;
4157 var DATA_API_KEY
$4 = '.data-api';
4158 var JQUERY_NO_CONFLICT
$4 = $__default
['default'].fn
[NAME
$4];
4159 var ESCAPE_KEYCODE
= 27; // KeyboardEvent.which value for Escape (Esc) key
4161 var SPACE_KEYCODE
= 32; // KeyboardEvent.which value for space key
4163 var TAB_KEYCODE
= 9; // KeyboardEvent.which value for tab key
4165 var ARROW_UP_KEYCODE
= 38; // KeyboardEvent.which value for up arrow key
4167 var ARROW_DOWN_KEYCODE
= 40; // KeyboardEvent.which value for down arrow key
4169 var RIGHT_MOUSE_BUTTON_WHICH
= 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
4171 var REGEXP_KEYDOWN
= new RegExp(ARROW_UP_KEYCODE
+ "|" + ARROW_DOWN_KEYCODE
+ "|" + ESCAPE_KEYCODE
);
4172 var EVENT_HIDE
$1 = "hide" + EVENT_KEY
$4;
4173 var EVENT_HIDDEN
$1 = "hidden" + EVENT_KEY
$4;
4174 var EVENT_SHOW
$1 = "show" + EVENT_KEY
$4;
4175 var EVENT_SHOWN
$1 = "shown" + EVENT_KEY
$4;
4176 var EVENT_CLICK
= "click" + EVENT_KEY
$4;
4177 var EVENT_CLICK_DATA_API
$4 = "click" + EVENT_KEY
$4 + DATA_API_KEY
$4;
4178 var EVENT_KEYDOWN_DATA_API
= "keydown" + EVENT_KEY
$4 + DATA_API_KEY
$4;
4179 var EVENT_KEYUP_DATA_API
= "keyup" + EVENT_KEY
$4 + DATA_API_KEY
$4;
4180 var CLASS_NAME_DISABLED
= 'disabled';
4181 var CLASS_NAME_SHOW
$2 = 'show';
4182 var CLASS_NAME_DROPUP
= 'dropup';
4183 var CLASS_NAME_DROPRIGHT
= 'dropright';
4184 var CLASS_NAME_DROPLEFT
= 'dropleft';
4185 var CLASS_NAME_MENURIGHT
= 'dropdown-menu-right';
4186 var CLASS_NAME_POSITION_STATIC
= 'position-static';
4187 var SELECTOR_DATA_TOGGLE
$2 = '[data-toggle="dropdown"]';
4188 var SELECTOR_FORM_CHILD
= '.dropdown form';
4189 var SELECTOR_MENU
= '.dropdown-menu';
4190 var SELECTOR_NAVBAR_NAV
= '.navbar-nav';
4191 var SELECTOR_VISIBLE_ITEMS
= '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
4192 var PLACEMENT_TOP
= 'top-start';
4193 var PLACEMENT_TOPEND
= 'top-end';
4194 var PLACEMENT_BOTTOM
= 'bottom-start';
4195 var PLACEMENT_BOTTOMEND
= 'bottom-end';
4196 var PLACEMENT_RIGHT
= 'right-start';
4197 var PLACEMENT_LEFT
= 'left-start';
4201 boundary
: 'scrollParent',
4202 reference
: 'toggle',
4206 var DefaultType
$2 = {
4207 offset
: '(number|string|function)',
4209 boundary
: '(string|element)',
4210 reference
: '(string|element)',
4212 popperConfig
: '(null|object)'
4215 * ------------------------------------------------------------------------
4217 * ------------------------------------------------------------------------
4220 var Dropdown
= /*#__PURE__*/function () {
4221 function Dropdown(element
, config
) {
4222 this._element
= element
;
4223 this._popper
= null;
4224 this._config
= this._getConfig(config
);
4225 this._menu
= this._getMenuElement();
4226 this._inNavbar
= this._detectNavbar();
4228 this._addEventListeners();
4232 var _proto
= Dropdown
.prototype;
4235 _proto
.toggle
= function toggle() {
4236 if (this._element
.disabled
|| $__default
['default'](this._element
).hasClass(CLASS_NAME_DISABLED
)) {
4240 var isActive
= $__default
['default'](this._menu
).hasClass(CLASS_NAME_SHOW
$2);
4242 Dropdown
._clearMenus();
4251 _proto
.show
= function show(usePopper
) {
4252 if (usePopper
=== void 0) {
4256 if (this._element
.disabled
|| $__default
['default'](this._element
).hasClass(CLASS_NAME_DISABLED
) || $__default
['default'](this._menu
).hasClass(CLASS_NAME_SHOW
$2)) {
4260 var relatedTarget
= {
4261 relatedTarget
: this._element
4263 var showEvent
= $__default
['default'].Event(EVENT_SHOW
$1, relatedTarget
);
4265 var parent
= Dropdown
._getParentFromElement(this._element
);
4267 $__default
['default'](parent
).trigger(showEvent
);
4269 if (showEvent
.isDefaultPrevented()) {
4271 } // Totally disable Popper for Dropdowns in Navbar
4274 if (!this._inNavbar
&& usePopper
) {
4276 * Check for Popper dependency
4277 * Popper - https://popper.js.org
4279 if (typeof Popper
=== 'undefined') {
4280 throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
4283 var referenceElement
= this._element
;
4285 if (this._config
.reference
=== 'parent') {
4286 referenceElement
= parent
;
4287 } else if (Util
.isElement(this._config
.reference
)) {
4288 referenceElement
= this._config
.reference
; // Check if it's jQuery element
4290 if (typeof this._config
.reference
.jquery
!== 'undefined') {
4291 referenceElement
= this._config
.reference
[0];
4293 } // If boundary is not `scrollParent`, then set position to `static`
4294 // to allow the menu to "escape" the scroll parent's boundaries
4295 // https://github.com/twbs/bootstrap/issues/24251
4298 if (this._config
.boundary
!== 'scrollParent') {
4299 $__default
['default'](parent
).addClass(CLASS_NAME_POSITION_STATIC
);
4302 this._popper
= new Popper(referenceElement
, this._menu
, this._getPopperConfig());
4303 } // If this is a touch-enabled device we add extra
4304 // empty mouseover listeners to the body's immediate children;
4305 // only needed because of broken event delegation on iOS
4306 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
4309 if ('ontouchstart' in document
.documentElement
&& $__default
['default'](parent
).closest(SELECTOR_NAVBAR_NAV
).length
=== 0) {
4310 $__default
['default'](document
.body
).children().on('mouseover', null, $__default
['default'].noop
);
4313 this._element
.focus();
4315 this._element
.setAttribute('aria-expanded', true);
4317 $__default
['default'](this._menu
).toggleClass(CLASS_NAME_SHOW
$2);
4318 $__default
['default'](parent
).toggleClass(CLASS_NAME_SHOW
$2).trigger($__default
['default'].Event(EVENT_SHOWN
$1, relatedTarget
));
4321 _proto
.hide
= function hide() {
4322 if (this._element
.disabled
|| $__default
['default'](this._element
).hasClass(CLASS_NAME_DISABLED
) || !$__default
['default'](this._menu
).hasClass(CLASS_NAME_SHOW
$2)) {
4326 var relatedTarget
= {
4327 relatedTarget
: this._element
4329 var hideEvent
= $__default
['default'].Event(EVENT_HIDE
$1, relatedTarget
);
4331 var parent
= Dropdown
._getParentFromElement(this._element
);
4333 $__default
['default'](parent
).trigger(hideEvent
);
4335 if (hideEvent
.isDefaultPrevented()) {
4340 this._popper
.destroy();
4343 $__default
['default'](this._menu
).toggleClass(CLASS_NAME_SHOW
$2);
4344 $__default
['default'](parent
).toggleClass(CLASS_NAME_SHOW
$2).trigger($__default
['default'].Event(EVENT_HIDDEN
$1, relatedTarget
));
4347 _proto
.dispose
= function dispose() {
4348 $__default
['default'].removeData(this._element
, DATA_KEY
$4);
4349 $__default
['default'](this._element
).off(EVENT_KEY
$4);
4350 this._element
= null;
4353 if (this._popper
!== null) {
4354 this._popper
.destroy();
4356 this._popper
= null;
4360 _proto
.update
= function update() {
4361 this._inNavbar
= this._detectNavbar();
4363 if (this._popper
!== null) {
4364 this._popper
.scheduleUpdate();
4369 _proto
._addEventListeners
= function _addEventListeners() {
4372 $__default
['default'](this._element
).on(EVENT_CLICK
, function (event
) {
4373 event
.preventDefault();
4374 event
.stopPropagation();
4380 _proto
._getConfig
= function _getConfig(config
) {
4381 config
= _extends({}, this.constructor.Default
, $__default
['default'](this._element
).data(), config
);
4382 Util
.typeCheckConfig(NAME
$4, config
, this.constructor.DefaultType
);
4386 _proto
._getMenuElement
= function _getMenuElement() {
4388 var parent
= Dropdown
._getParentFromElement(this._element
);
4391 this._menu
= parent
.querySelector(SELECTOR_MENU
);
4398 _proto
._getPlacement
= function _getPlacement() {
4399 var $parentDropdown
= $__default
['default'](this._element
.parentNode
);
4400 var placement
= PLACEMENT_BOTTOM
; // Handle dropup
4402 if ($parentDropdown
.hasClass(CLASS_NAME_DROPUP
)) {
4403 placement
= $__default
['default'](this._menu
).hasClass(CLASS_NAME_MENURIGHT
) ? PLACEMENT_TOPEND
: PLACEMENT_TOP
;
4404 } else if ($parentDropdown
.hasClass(CLASS_NAME_DROPRIGHT
)) {
4405 placement
= PLACEMENT_RIGHT
;
4406 } else if ($parentDropdown
.hasClass(CLASS_NAME_DROPLEFT
)) {
4407 placement
= PLACEMENT_LEFT
;
4408 } else if ($__default
['default'](this._menu
).hasClass(CLASS_NAME_MENURIGHT
)) {
4409 placement
= PLACEMENT_BOTTOMEND
;
4415 _proto
._detectNavbar
= function _detectNavbar() {
4416 return $__default
['default'](this._element
).closest('.navbar').length
> 0;
4419 _proto
._getOffset
= function _getOffset() {
4424 if (typeof this._config
.offset
=== 'function') {
4425 offset
.fn = function (data
) {
4426 data
.offsets
= _extends({}, data
.offsets
, _this2
._config
.offset(data
.offsets
, _this2
._element
) || {});
4430 offset
.offset
= this._config
.offset
;
4436 _proto
._getPopperConfig
= function _getPopperConfig() {
4437 var popperConfig
= {
4438 placement
: this._getPlacement(),
4440 offset
: this._getOffset(),
4442 enabled
: this._config
.flip
4445 boundariesElement
: this._config
.boundary
4448 }; // Disable Popper if we have a static display
4450 if (this._config
.display
=== 'static') {
4451 popperConfig
.modifiers
.applyStyle
= {
4456 return _extends({}, popperConfig
, this._config
.popperConfig
);
4460 Dropdown
._jQueryInterface
= function _jQueryInterface(config
) {
4461 return this.each(function () {
4462 var data
= $__default
['default'](this).data(DATA_KEY
$4);
4464 var _config
= typeof config
=== 'object' ? config
: null;
4467 data
= new Dropdown(this, _config
);
4468 $__default
['default'](this).data(DATA_KEY
$4, data
);
4471 if (typeof config
=== 'string') {
4472 if (typeof data
[config
] === 'undefined') {
4473 throw new TypeError("No method named \"" + config
+ "\"");
4481 Dropdown
._clearMenus
= function _clearMenus(event
) {
4482 if (event
&& (event
.which
=== RIGHT_MOUSE_BUTTON_WHICH
|| event
.type
=== 'keyup' && event
.which
!== TAB_KEYCODE
)) {
4486 var toggles
= [].slice
.call(document
.querySelectorAll(SELECTOR_DATA_TOGGLE
$2));
4488 for (var i
= 0, len
= toggles
.length
; i
< len
; i
++) {
4489 var parent
= Dropdown
._getParentFromElement(toggles
[i
]);
4491 var context
= $__default
['default'](toggles
[i
]).data(DATA_KEY
$4);
4492 var relatedTarget
= {
4493 relatedTarget
: toggles
[i
]
4496 if (event
&& event
.type
=== 'click') {
4497 relatedTarget
.clickEvent
= event
;
4504 var dropdownMenu
= context
._menu
;
4506 if (!$__default
['default'](parent
).hasClass(CLASS_NAME_SHOW
$2)) {
4510 if (event
&& (event
.type
=== 'click' && /input|textarea/i.test(event
.target
.tagName
) || event
.type
=== 'keyup' && event
.which
=== TAB_KEYCODE
) && $__default
['default'].contains(parent
, event
.target
)) {
4514 var hideEvent
= $__default
['default'].Event(EVENT_HIDE
$1, relatedTarget
);
4515 $__default
['default'](parent
).trigger(hideEvent
);
4517 if (hideEvent
.isDefaultPrevented()) {
4519 } // If this is a touch-enabled device we remove the extra
4520 // empty mouseover listeners we added for iOS support
4523 if ('ontouchstart' in document
.documentElement
) {
4524 $__default
['default'](document
.body
).children().off('mouseover', null, $__default
['default'].noop
);
4527 toggles
[i
].setAttribute('aria-expanded', 'false');
4529 if (context
._popper
) {
4530 context
._popper
.destroy();
4533 $__default
['default'](dropdownMenu
).removeClass(CLASS_NAME_SHOW
$2);
4534 $__default
['default'](parent
).removeClass(CLASS_NAME_SHOW
$2).trigger($__default
['default'].Event(EVENT_HIDDEN
$1, relatedTarget
));
4538 Dropdown
._getParentFromElement
= function _getParentFromElement(element
) {
4540 var selector
= Util
.getSelectorFromElement(element
);
4543 parent
= document
.querySelector(selector
);
4546 return parent
|| element
.parentNode
;
4547 } // eslint-disable-next-line complexity
4550 Dropdown
._dataApiKeydownHandler
= function _dataApiKeydownHandler(event
) {
4551 // If not input/textarea:
4552 // - And not a key in REGEXP_KEYDOWN => not a dropdown command
4553 // If input/textarea:
4554 // - If space key => not a dropdown command
4555 // - If key is other than escape
4556 // - If key is not up or down => not a dropdown command
4557 // - If trigger inside the menu => not a dropdown command
4558 if (/input|textarea/i.test(event
.target
.tagName
) ? event
.which
=== SPACE_KEYCODE
|| event
.which
!== ESCAPE_KEYCODE
&& (event
.which
!== ARROW_DOWN_KEYCODE
&& event
.which
!== ARROW_UP_KEYCODE
|| $__default
['default'](event
.target
).closest(SELECTOR_MENU
).length
) : !REGEXP_KEYDOWN
.test(event
.which
)) {
4562 if (this.disabled
|| $__default
['default'](this).hasClass(CLASS_NAME_DISABLED
)) {
4566 var parent
= Dropdown
._getParentFromElement(this);
4568 var isActive
= $__default
['default'](parent
).hasClass(CLASS_NAME_SHOW
$2);
4570 if (!isActive
&& event
.which
=== ESCAPE_KEYCODE
) {
4574 event
.preventDefault();
4575 event
.stopPropagation();
4577 if (!isActive
|| event
.which
=== ESCAPE_KEYCODE
|| event
.which
=== SPACE_KEYCODE
) {
4578 if (event
.which
=== ESCAPE_KEYCODE
) {
4579 $__default
['default'](parent
.querySelector(SELECTOR_DATA_TOGGLE
$2)).trigger('focus');
4582 $__default
['default'](this).trigger('click');
4586 var items
= [].slice
.call(parent
.querySelectorAll(SELECTOR_VISIBLE_ITEMS
)).filter(function (item
) {
4587 return $__default
['default'](item
).is(':visible');
4590 if (items
.length
=== 0) {
4594 var index
= items
.indexOf(event
.target
);
4596 if (event
.which
=== ARROW_UP_KEYCODE
&& index
> 0) {
4601 if (event
.which
=== ARROW_DOWN_KEYCODE
&& index
< items
.length
- 1) {
4610 items
[index
].focus();
4613 _createClass(Dropdown
, null, [{
4615 get: function get() {
4620 get: function get() {
4625 get: function get() {
4626 return DefaultType
$2;
4633 * ------------------------------------------------------------------------
4634 * Data Api implementation
4635 * ------------------------------------------------------------------------
4639 $__default
['default'](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
) {
4640 event
.preventDefault();
4641 event
.stopPropagation();
4643 Dropdown
._jQueryInterface
.call($__default
['default'](this), 'toggle');
4644 }).on(EVENT_CLICK_DATA_API
$4, SELECTOR_FORM_CHILD
, function (e
) {
4645 e
.stopPropagation();
4648 * ------------------------------------------------------------------------
4650 * ------------------------------------------------------------------------
4653 $__default
['default'].fn
[NAME
$4] = Dropdown
._jQueryInterface
;
4654 $__default
['default'].fn
[NAME
$4].Constructor
= Dropdown
;
4656 $__default
['default'].fn
[NAME
$4].noConflict = function () {
4657 $__default
['default'].fn
[NAME
$4] = JQUERY_NO_CONFLICT
$4;
4658 return Dropdown
._jQueryInterface
;
4662 * ------------------------------------------------------------------------
4664 * ------------------------------------------------------------------------
4667 var NAME
$5 = 'modal';
4668 var VERSION
$5 = '4.6.0';
4669 var DATA_KEY
$5 = 'bs.modal';
4670 var EVENT_KEY
$5 = "." + DATA_KEY
$5;
4671 var DATA_API_KEY
$5 = '.data-api';
4672 var JQUERY_NO_CONFLICT
$5 = $__default
['default'].fn
[NAME
$5];
4673 var ESCAPE_KEYCODE
$1 = 27; // KeyboardEvent.which value for Escape (Esc) key
4681 var DefaultType
$3 = {
4682 backdrop
: '(boolean|string)',
4683 keyboard
: 'boolean',
4687 var EVENT_HIDE
$2 = "hide" + EVENT_KEY
$5;
4688 var EVENT_HIDE_PREVENTED
= "hidePrevented" + EVENT_KEY
$5;
4689 var EVENT_HIDDEN
$2 = "hidden" + EVENT_KEY
$5;
4690 var EVENT_SHOW
$2 = "show" + EVENT_KEY
$5;
4691 var EVENT_SHOWN
$2 = "shown" + EVENT_KEY
$5;
4692 var EVENT_FOCUSIN
= "focusin" + EVENT_KEY
$5;
4693 var EVENT_RESIZE
= "resize" + EVENT_KEY
$5;
4694 var EVENT_CLICK_DISMISS
= "click.dismiss" + EVENT_KEY
$5;
4695 var EVENT_KEYDOWN_DISMISS
= "keydown.dismiss" + EVENT_KEY
$5;
4696 var EVENT_MOUSEUP_DISMISS
= "mouseup.dismiss" + EVENT_KEY
$5;
4697 var EVENT_MOUSEDOWN_DISMISS
= "mousedown.dismiss" + EVENT_KEY
$5;
4698 var EVENT_CLICK_DATA_API
$5 = "click" + EVENT_KEY
$5 + DATA_API_KEY
$5;
4699 var CLASS_NAME_SCROLLABLE
= 'modal-dialog-scrollable';
4700 var CLASS_NAME_SCROLLBAR_MEASURER
= 'modal-scrollbar-measure';
4701 var CLASS_NAME_BACKDROP
= 'modal-backdrop';
4702 var CLASS_NAME_OPEN
= 'modal-open';
4703 var CLASS_NAME_FADE
$1 = 'fade';
4704 var CLASS_NAME_SHOW
$3 = 'show';
4705 var CLASS_NAME_STATIC
= 'modal-static';
4706 var SELECTOR_DIALOG
= '.modal-dialog';
4707 var SELECTOR_MODAL_BODY
= '.modal-body';
4708 var SELECTOR_DATA_TOGGLE
$3 = '[data-toggle="modal"]';
4709 var SELECTOR_DATA_DISMISS
= '[data-dismiss="modal"]';
4710 var SELECTOR_FIXED_CONTENT
= '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
4711 var SELECTOR_STICKY_CONTENT
= '.sticky-top';
4713 * ------------------------------------------------------------------------
4715 * ------------------------------------------------------------------------
4718 var Modal
= /*#__PURE__*/function () {
4719 function Modal(element
, config
) {
4720 this._config
= this._getConfig(config
);
4721 this._element
= element
;
4722 this._dialog
= element
.querySelector(SELECTOR_DIALOG
);
4723 this._backdrop
= null;
4724 this._isShown
= false;
4725 this._isBodyOverflowing
= false;
4726 this._ignoreBackdropClick
= false;
4727 this._isTransitioning
= false;
4728 this._scrollbarWidth
= 0;
4732 var _proto
= Modal
.prototype;
4735 _proto
.toggle
= function toggle(relatedTarget
) {
4736 return this._isShown
? this.hide() : this.show(relatedTarget
);
4739 _proto
.show
= function show(relatedTarget
) {
4742 if (this._isShown
|| this._isTransitioning
) {
4746 if ($__default
['default'](this._element
).hasClass(CLASS_NAME_FADE
$1)) {
4747 this._isTransitioning
= true;
4750 var showEvent
= $__default
['default'].Event(EVENT_SHOW
$2, {
4751 relatedTarget
: relatedTarget
4753 $__default
['default'](this._element
).trigger(showEvent
);
4755 if (this._isShown
|| showEvent
.isDefaultPrevented()) {
4759 this._isShown
= true;
4761 this._checkScrollbar();
4763 this._setScrollbar();
4765 this._adjustDialog();
4767 this._setEscapeEvent();
4769 this._setResizeEvent();
4771 $__default
['default'](this._element
).on(EVENT_CLICK_DISMISS
, SELECTOR_DATA_DISMISS
, function (event
) {
4772 return _this
.hide(event
);
4774 $__default
['default'](this._dialog
).on(EVENT_MOUSEDOWN_DISMISS
, function () {
4775 $__default
['default'](_this
._element
).one(EVENT_MOUSEUP_DISMISS
, function (event
) {
4776 if ($__default
['default'](event
.target
).is(_this
._element
)) {
4777 _this
._ignoreBackdropClick
= true;
4782 this._showBackdrop(function () {
4783 return _this
._showElement(relatedTarget
);
4787 _proto
.hide
= function hide(event
) {
4791 event
.preventDefault();
4794 if (!this._isShown
|| this._isTransitioning
) {
4798 var hideEvent
= $__default
['default'].Event(EVENT_HIDE
$2);
4799 $__default
['default'](this._element
).trigger(hideEvent
);
4801 if (!this._isShown
|| hideEvent
.isDefaultPrevented()) {
4805 this._isShown
= false;
4806 var transition
= $__default
['default'](this._element
).hasClass(CLASS_NAME_FADE
$1);
4809 this._isTransitioning
= true;
4812 this._setEscapeEvent();
4814 this._setResizeEvent();
4816 $__default
['default'](document
).off(EVENT_FOCUSIN
);
4817 $__default
['default'](this._element
).removeClass(CLASS_NAME_SHOW
$3);
4818 $__default
['default'](this._element
).off(EVENT_CLICK_DISMISS
);
4819 $__default
['default'](this._dialog
).off(EVENT_MOUSEDOWN_DISMISS
);
4822 var transitionDuration
= Util
.getTransitionDurationFromElement(this._element
);
4823 $__default
['default'](this._element
).one(Util
.TRANSITION_END
, function (event
) {
4824 return _this2
._hideModal(event
);
4825 }).emulateTransitionEnd(transitionDuration
);
4831 _proto
.dispose
= function dispose() {
4832 [window
, this._element
, this._dialog
].forEach(function (htmlElement
) {
4833 return $__default
['default'](htmlElement
).off(EVENT_KEY
$5);
4836 * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
4837 * Do not move `document` in `htmlElements` array
4838 * It will remove `EVENT_CLICK_DATA_API` event that should remain
4841 $__default
['default'](document
).off(EVENT_FOCUSIN
);
4842 $__default
['default'].removeData(this._element
, DATA_KEY
$5);
4843 this._config
= null;
4844 this._element
= null;
4845 this._dialog
= null;
4846 this._backdrop
= null;
4847 this._isShown
= null;
4848 this._isBodyOverflowing
= null;
4849 this._ignoreBackdropClick
= null;
4850 this._isTransitioning
= null;
4851 this._scrollbarWidth
= null;
4854 _proto
.handleUpdate
= function handleUpdate() {
4855 this._adjustDialog();
4859 _proto
._getConfig
= function _getConfig(config
) {
4860 config
= _extends({}, Default
$3, config
);
4861 Util
.typeCheckConfig(NAME
$5, config
, DefaultType
$3);
4865 _proto
._triggerBackdropTransition
= function _triggerBackdropTransition() {
4868 var hideEventPrevented
= $__default
['default'].Event(EVENT_HIDE_PREVENTED
);
4869 $__default
['default'](this._element
).trigger(hideEventPrevented
);
4871 if (hideEventPrevented
.isDefaultPrevented()) {
4875 var isModalOverflowing
= this._element
.scrollHeight
> document
.documentElement
.clientHeight
;
4877 if (!isModalOverflowing
) {
4878 this._element
.style
.overflowY
= 'hidden';
4881 this._element
.classList
.add(CLASS_NAME_STATIC
);
4883 var modalTransitionDuration
= Util
.getTransitionDurationFromElement(this._dialog
);
4884 $__default
['default'](this._element
).off(Util
.TRANSITION_END
);
4885 $__default
['default'](this._element
).one(Util
.TRANSITION_END
, function () {
4886 _this3
._element
.classList
.remove(CLASS_NAME_STATIC
);
4888 if (!isModalOverflowing
) {
4889 $__default
['default'](_this3
._element
).one(Util
.TRANSITION_END
, function () {
4890 _this3
._element
.style
.overflowY
= '';
4891 }).emulateTransitionEnd(_this3
._element
, modalTransitionDuration
);
4893 }).emulateTransitionEnd(modalTransitionDuration
);
4895 this._element
.focus();
4898 _proto
._showElement
= function _showElement(relatedTarget
) {
4901 var transition
= $__default
['default'](this._element
).hasClass(CLASS_NAME_FADE
$1);
4902 var modalBody
= this._dialog
? this._dialog
.querySelector(SELECTOR_MODAL_BODY
) : null;
4904 if (!this._element
.parentNode
|| this._element
.parentNode
.nodeType
!== Node
.ELEMENT_NODE
) {
4905 // Don't move modal's DOM position
4906 document
.body
.appendChild(this._element
);
4909 this._element
.style
.display
= 'block';
4911 this._element
.removeAttribute('aria-hidden');
4913 this._element
.setAttribute('aria-modal', true);
4915 this._element
.setAttribute('role', 'dialog');
4917 if ($__default
['default'](this._dialog
).hasClass(CLASS_NAME_SCROLLABLE
) && modalBody
) {
4918 modalBody
.scrollTop
= 0;
4920 this._element
.scrollTop
= 0;
4924 Util
.reflow(this._element
);
4927 $__default
['default'](this._element
).addClass(CLASS_NAME_SHOW
$3);
4929 if (this._config
.focus
) {
4930 this._enforceFocus();
4933 var shownEvent
= $__default
['default'].Event(EVENT_SHOWN
$2, {
4934 relatedTarget
: relatedTarget
4937 var transitionComplete
= function transitionComplete() {
4938 if (_this4
._config
.focus
) {
4939 _this4
._element
.focus();
4942 _this4
._isTransitioning
= false;
4943 $__default
['default'](_this4
._element
).trigger(shownEvent
);
4947 var transitionDuration
= Util
.getTransitionDurationFromElement(this._dialog
);
4948 $__default
['default'](this._dialog
).one(Util
.TRANSITION_END
, transitionComplete
).emulateTransitionEnd(transitionDuration
);
4950 transitionComplete();
4954 _proto
._enforceFocus
= function _enforceFocus() {
4957 $__default
['default'](document
).off(EVENT_FOCUSIN
) // Guard against infinite focus loop
4958 .on(EVENT_FOCUSIN
, function (event
) {
4959 if (document
!== event
.target
&& _this5
._element
!== event
.target
&& $__default
['default'](_this5
._element
).has(event
.target
).length
=== 0) {
4960 _this5
._element
.focus();
4965 _proto
._setEscapeEvent
= function _setEscapeEvent() {
4968 if (this._isShown
) {
4969 $__default
['default'](this._element
).on(EVENT_KEYDOWN_DISMISS
, function (event
) {
4970 if (_this6
._config
.keyboard
&& event
.which
=== ESCAPE_KEYCODE
$1) {
4971 event
.preventDefault();
4974 } else if (!_this6
._config
.keyboard
&& event
.which
=== ESCAPE_KEYCODE
$1) {
4975 _this6
._triggerBackdropTransition();
4978 } else if (!this._isShown
) {
4979 $__default
['default'](this._element
).off(EVENT_KEYDOWN_DISMISS
);
4983 _proto
._setResizeEvent
= function _setResizeEvent() {
4986 if (this._isShown
) {
4987 $__default
['default'](window
).on(EVENT_RESIZE
, function (event
) {
4988 return _this7
.handleUpdate(event
);
4991 $__default
['default'](window
).off(EVENT_RESIZE
);
4995 _proto
._hideModal
= function _hideModal() {
4998 this._element
.style
.display
= 'none';
5000 this._element
.setAttribute('aria-hidden', true);
5002 this._element
.removeAttribute('aria-modal');
5004 this._element
.removeAttribute('role');
5006 this._isTransitioning
= false;
5008 this._showBackdrop(function () {
5009 $__default
['default'](document
.body
).removeClass(CLASS_NAME_OPEN
);
5011 _this8
._resetAdjustments();
5013 _this8
._resetScrollbar();
5015 $__default
['default'](_this8
._element
).trigger(EVENT_HIDDEN
$2);
5019 _proto
._removeBackdrop
= function _removeBackdrop() {
5020 if (this._backdrop
) {
5021 $__default
['default'](this._backdrop
).remove();
5022 this._backdrop
= null;
5026 _proto
._showBackdrop
= function _showBackdrop(callback
) {
5029 var animate
= $__default
['default'](this._element
).hasClass(CLASS_NAME_FADE
$1) ? CLASS_NAME_FADE
$1 : '';
5031 if (this._isShown
&& this._config
.backdrop
) {
5032 this._backdrop
= document
.createElement('div');
5033 this._backdrop
.className
= CLASS_NAME_BACKDROP
;
5036 this._backdrop
.classList
.add(animate
);
5039 $__default
['default'](this._backdrop
).appendTo(document
.body
);
5040 $__default
['default'](this._element
).on(EVENT_CLICK_DISMISS
, function (event
) {
5041 if (_this9
._ignoreBackdropClick
) {
5042 _this9
._ignoreBackdropClick
= false;
5046 if (event
.target
!== event
.currentTarget
) {
5050 if (_this9
._config
.backdrop
=== 'static') {
5051 _this9
._triggerBackdropTransition();
5058 Util
.reflow(this._backdrop
);
5061 $__default
['default'](this._backdrop
).addClass(CLASS_NAME_SHOW
$3);
5072 var backdropTransitionDuration
= Util
.getTransitionDurationFromElement(this._backdrop
);
5073 $__default
['default'](this._backdrop
).one(Util
.TRANSITION_END
, callback
).emulateTransitionEnd(backdropTransitionDuration
);
5074 } else if (!this._isShown
&& this._backdrop
) {
5075 $__default
['default'](this._backdrop
).removeClass(CLASS_NAME_SHOW
$3);
5077 var callbackRemove
= function callbackRemove() {
5078 _this9
._removeBackdrop();
5085 if ($__default
['default'](this._element
).hasClass(CLASS_NAME_FADE
$1)) {
5086 var _backdropTransitionDuration
= Util
.getTransitionDurationFromElement(this._backdrop
);
5088 $__default
['default'](this._backdrop
).one(Util
.TRANSITION_END
, callbackRemove
).emulateTransitionEnd(_backdropTransitionDuration
);
5092 } else if (callback
) {
5095 } // ----------------------------------------------------------------------
5096 // the following methods are used to handle overflowing modals
5097 // todo (fat): these should probably be refactored out of modal.js
5098 // ----------------------------------------------------------------------
5101 _proto
._adjustDialog
= function _adjustDialog() {
5102 var isModalOverflowing
= this._element
.scrollHeight
> document
.documentElement
.clientHeight
;
5104 if (!this._isBodyOverflowing
&& isModalOverflowing
) {
5105 this._element
.style
.paddingLeft
= this._scrollbarWidth
+ "px";
5108 if (this._isBodyOverflowing
&& !isModalOverflowing
) {
5109 this._element
.style
.paddingRight
= this._scrollbarWidth
+ "px";
5113 _proto
._resetAdjustments
= function _resetAdjustments() {
5114 this._element
.style
.paddingLeft
= '';
5115 this._element
.style
.paddingRight
= '';
5118 _proto
._checkScrollbar
= function _checkScrollbar() {
5119 var rect
= document
.body
.getBoundingClientRect();
5120 this._isBodyOverflowing
= Math
.round(rect
.left
+ rect
.right
) < window
.innerWidth
;
5121 this._scrollbarWidth
= this._getScrollbarWidth();
5124 _proto
._setScrollbar
= function _setScrollbar() {
5127 if (this._isBodyOverflowing
) {
5128 // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
5129 // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
5130 var fixedContent
= [].slice
.call(document
.querySelectorAll(SELECTOR_FIXED_CONTENT
));
5131 var stickyContent
= [].slice
.call(document
.querySelectorAll(SELECTOR_STICKY_CONTENT
)); // Adjust fixed content padding
5133 $__default
['default'](fixedContent
).each(function (index
, element
) {
5134 var actualPadding
= element
.style
.paddingRight
;
5135 var calculatedPadding
= $__default
['default'](element
).css('padding-right');
5136 $__default
['default'](element
).data('padding-right', actualPadding
).css('padding-right', parseFloat(calculatedPadding
) + _this10
._scrollbarWidth
+ "px");
5137 }); // Adjust sticky content margin
5139 $__default
['default'](stickyContent
).each(function (index
, element
) {
5140 var actualMargin
= element
.style
.marginRight
;
5141 var calculatedMargin
= $__default
['default'](element
).css('margin-right');
5142 $__default
['default'](element
).data('margin-right', actualMargin
).css('margin-right', parseFloat(calculatedMargin
) - _this10
._scrollbarWidth
+ "px");
5143 }); // Adjust body padding
5145 var actualPadding
= document
.body
.style
.paddingRight
;
5146 var calculatedPadding
= $__default
['default'](document
.body
).css('padding-right');
5147 $__default
['default'](document
.body
).data('padding-right', actualPadding
).css('padding-right', parseFloat(calculatedPadding
) + this._scrollbarWidth
+ "px");
5150 $__default
['default'](document
.body
).addClass(CLASS_NAME_OPEN
);
5153 _proto
._resetScrollbar
= function _resetScrollbar() {
5154 // Restore fixed content padding
5155 var fixedContent
= [].slice
.call(document
.querySelectorAll(SELECTOR_FIXED_CONTENT
));
5156 $__default
['default'](fixedContent
).each(function (index
, element
) {
5157 var padding
= $__default
['default'](element
).data('padding-right');
5158 $__default
['default'](element
).removeData('padding-right');
5159 element
.style
.paddingRight
= padding
? padding
: '';
5160 }); // Restore sticky content
5162 var elements
= [].slice
.call(document
.querySelectorAll("" + SELECTOR_STICKY_CONTENT
));
5163 $__default
['default'](elements
).each(function (index
, element
) {
5164 var margin
= $__default
['default'](element
).data('margin-right');
5166 if (typeof margin
!== 'undefined') {
5167 $__default
['default'](element
).css('margin-right', margin
).removeData('margin-right');
5169 }); // Restore body padding
5171 var padding
= $__default
['default'](document
.body
).data('padding-right');
5172 $__default
['default'](document
.body
).removeData('padding-right');
5173 document
.body
.style
.paddingRight
= padding
? padding
: '';
5176 _proto
._getScrollbarWidth
= function _getScrollbarWidth() {
5178 var scrollDiv
= document
.createElement('div');
5179 scrollDiv
.className
= CLASS_NAME_SCROLLBAR_MEASURER
;
5180 document
.body
.appendChild(scrollDiv
);
5181 var scrollbarWidth
= scrollDiv
.getBoundingClientRect().width
- scrollDiv
.clientWidth
;
5182 document
.body
.removeChild(scrollDiv
);
5183 return scrollbarWidth
;
5187 Modal
._jQueryInterface
= function _jQueryInterface(config
, relatedTarget
) {
5188 return this.each(function () {
5189 var data
= $__default
['default'](this).data(DATA_KEY
$5);
5191 var _config
= _extends({}, Default
$3, $__default
['default'](this).data(), typeof config
=== 'object' && config
? config
: {});
5194 data
= new Modal(this, _config
);
5195 $__default
['default'](this).data(DATA_KEY
$5, data
);
5198 if (typeof config
=== 'string') {
5199 if (typeof data
[config
] === 'undefined') {
5200 throw new TypeError("No method named \"" + config
+ "\"");
5203 data
[config
](relatedTarget
);
5204 } else if (_config
.show
) {
5205 data
.show(relatedTarget
);
5210 _createClass(Modal
, null, [{
5212 get: function get() {
5217 get: function get() {
5225 * ------------------------------------------------------------------------
5226 * Data Api implementation
5227 * ------------------------------------------------------------------------
5231 $__default
['default'](document
).on(EVENT_CLICK_DATA_API
$5, SELECTOR_DATA_TOGGLE
$3, function (event
) {
5235 var selector
= Util
.getSelectorFromElement(this);
5238 target
= document
.querySelector(selector
);
5241 var config
= $__default
['default'](target
).data(DATA_KEY
$5) ? 'toggle' : _extends({}, $__default
['default'](target
).data(), $__default
['default'](this).data());
5243 if (this.tagName
=== 'A' || this.tagName
=== 'AREA') {
5244 event
.preventDefault();
5247 var $target
= $__default
['default'](target
).one(EVENT_SHOW
$2, function (showEvent
) {
5248 if (showEvent
.isDefaultPrevented()) {
5249 // Only register focus restorer if modal will actually get shown
5253 $target
.one(EVENT_HIDDEN
$2, function () {
5254 if ($__default
['default'](_this11
).is(':visible')) {
5260 Modal
._jQueryInterface
.call($__default
['default'](target
), config
, this);
5263 * ------------------------------------------------------------------------
5265 * ------------------------------------------------------------------------
5268 $__default
['default'].fn
[NAME
$5] = Modal
._jQueryInterface
;
5269 $__default
['default'].fn
[NAME
$5].Constructor
= Modal
;
5271 $__default
['default'].fn
[NAME
$5].noConflict = function () {
5272 $__default
['default'].fn
[NAME
$5] = JQUERY_NO_CONFLICT
$5;
5273 return Modal
._jQueryInterface
;
5277 * --------------------------------------------------------------------------
5278 * Bootstrap (v4.6.0): tools/sanitizer.js
5279 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5280 * --------------------------------------------------------------------------
5282 var uriAttrs
= ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
5283 var ARIA_ATTRIBUTE_PATTERN
= /^aria-[\w-]*$/i;
5284 var DefaultWhitelist
= {
5285 // Global attributes allowed on any supplied element below.
5286 '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN
],
5287 a
: ['target', 'href', 'title', 'rel'],
5303 img
: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
5318 * A pattern that recognizes a commonly useful subset of URLs that are safe.
5320 * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
5323 var SAFE_URL_PATTERN
= /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi;
5325 * A pattern that matches safe data URLs. Only matches image, video and audio types.
5327 * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
5330 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
;
5332 function allowedAttribute(attr
, allowedAttributeList
) {
5333 var attrName
= attr
.nodeName
.toLowerCase();
5335 if (allowedAttributeList
.indexOf(attrName
) !== -1) {
5336 if (uriAttrs
.indexOf(attrName
) !== -1) {
5337 return Boolean(attr
.nodeValue
.match(SAFE_URL_PATTERN
) || attr
.nodeValue
.match(DATA_URL_PATTERN
));
5343 var regExp
= allowedAttributeList
.filter(function (attrRegex
) {
5344 return attrRegex
instanceof RegExp
;
5345 }); // Check if a regular expression validates the attribute.
5347 for (var i
= 0, len
= regExp
.length
; i
< len
; i
++) {
5348 if (attrName
.match(regExp
[i
])) {
5356 function sanitizeHtml(unsafeHtml
, whiteList
, sanitizeFn
) {
5357 if (unsafeHtml
.length
=== 0) {
5361 if (sanitizeFn
&& typeof sanitizeFn
=== 'function') {
5362 return sanitizeFn(unsafeHtml
);
5365 var domParser
= new window
.DOMParser();
5366 var createdDocument
= domParser
.parseFromString(unsafeHtml
, 'text/html');
5367 var whitelistKeys
= Object
.keys(whiteList
);
5368 var elements
= [].slice
.call(createdDocument
.body
.querySelectorAll('*'));
5370 var _loop
= function _loop(i
, len
) {
5371 var el
= elements
[i
];
5372 var elName
= el
.nodeName
.toLowerCase();
5374 if (whitelistKeys
.indexOf(el
.nodeName
.toLowerCase()) === -1) {
5375 el
.parentNode
.removeChild(el
);
5379 var attributeList
= [].slice
.call(el
.attributes
);
5380 var whitelistedAttributes
= [].concat(whiteList
['*'] || [], whiteList
[elName
] || []);
5381 attributeList
.forEach(function (attr
) {
5382 if (!allowedAttribute(attr
, whitelistedAttributes
)) {
5383 el
.removeAttribute(attr
.nodeName
);
5388 for (var i
= 0, len
= elements
.length
; i
< len
; i
++) {
5389 var _ret
= _loop(i
);
5391 if (_ret
=== "continue") continue;
5394 return createdDocument
.body
.innerHTML
;
5398 * ------------------------------------------------------------------------
5400 * ------------------------------------------------------------------------
5403 var NAME
$6 = 'tooltip';
5404 var VERSION
$6 = '4.6.0';
5405 var DATA_KEY
$6 = 'bs.tooltip';
5406 var EVENT_KEY
$6 = "." + DATA_KEY
$6;
5407 var JQUERY_NO_CONFLICT
$6 = $__default
['default'].fn
[NAME
$6];
5408 var CLASS_PREFIX
= 'bs-tooltip';
5409 var BSCLS_PREFIX_REGEX
= new RegExp("(^|\\s)" + CLASS_PREFIX
+ "\\S+", 'g');
5410 var DISALLOWED_ATTRIBUTES
= ['sanitize', 'whiteList', 'sanitizeFn'];
5411 var DefaultType
$4 = {
5412 animation
: 'boolean',
5414 title
: '(string|element|function)',
5416 delay
: '(number|object)',
5418 selector
: '(string|boolean)',
5419 placement
: '(string|function)',
5420 offset
: '(number|string|function)',
5421 container
: '(string|element|boolean)',
5422 fallbackPlacement
: '(string|array)',
5423 boundary
: '(string|element)',
5424 customClass
: '(string|function)',
5425 sanitize
: 'boolean',
5426 sanitizeFn
: '(null|function)',
5427 whiteList
: 'object',
5428 popperConfig
: '(null|object)'
5430 var AttachmentMap
= {
5439 template
: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
5440 trigger
: 'hover focus',
5448 fallbackPlacement
: 'flip',
5449 boundary
: 'scrollParent',
5453 whiteList
: DefaultWhitelist
,
5456 var HOVER_STATE_SHOW
= 'show';
5457 var HOVER_STATE_OUT
= 'out';
5459 HIDE
: "hide" + EVENT_KEY
$6,
5460 HIDDEN
: "hidden" + EVENT_KEY
$6,
5461 SHOW
: "show" + EVENT_KEY
$6,
5462 SHOWN
: "shown" + EVENT_KEY
$6,
5463 INSERTED
: "inserted" + EVENT_KEY
$6,
5464 CLICK
: "click" + EVENT_KEY
$6,
5465 FOCUSIN
: "focusin" + EVENT_KEY
$6,
5466 FOCUSOUT
: "focusout" + EVENT_KEY
$6,
5467 MOUSEENTER
: "mouseenter" + EVENT_KEY
$6,
5468 MOUSELEAVE
: "mouseleave" + EVENT_KEY
$6
5470 var CLASS_NAME_FADE
$2 = 'fade';
5471 var CLASS_NAME_SHOW
$4 = 'show';
5472 var SELECTOR_TOOLTIP_INNER
= '.tooltip-inner';
5473 var SELECTOR_ARROW
= '.arrow';
5474 var TRIGGER_HOVER
= 'hover';
5475 var TRIGGER_FOCUS
= 'focus';
5476 var TRIGGER_CLICK
= 'click';
5477 var TRIGGER_MANUAL
= 'manual';
5479 * ------------------------------------------------------------------------
5481 * ------------------------------------------------------------------------
5484 var Tooltip
= /*#__PURE__*/function () {
5485 function Tooltip(element
, config
) {
5486 if (typeof Popper
=== 'undefined') {
5487 throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
5491 this._isEnabled
= true;
5493 this._hoverState
= '';
5494 this._activeTrigger
= {};
5495 this._popper
= null; // Protected
5497 this.element
= element
;
5498 this.config
= this._getConfig(config
);
5501 this._setListeners();
5505 var _proto
= Tooltip
.prototype;
5508 _proto
.enable
= function enable() {
5509 this._isEnabled
= true;
5512 _proto
.disable
= function disable() {
5513 this._isEnabled
= false;
5516 _proto
.toggleEnabled
= function toggleEnabled() {
5517 this._isEnabled
= !this._isEnabled
;
5520 _proto
.toggle
= function toggle(event
) {
5521 if (!this._isEnabled
) {
5526 var dataKey
= this.constructor.DATA_KEY
;
5527 var context
= $__default
['default'](event
.currentTarget
).data(dataKey
);
5530 context
= new this.constructor(event
.currentTarget
, this._getDelegateConfig());
5531 $__default
['default'](event
.currentTarget
).data(dataKey
, context
);
5534 context
._activeTrigger
.click
= !context
._activeTrigger
.click
;
5536 if (context
._isWithActiveTrigger()) {
5537 context
._enter(null, context
);
5539 context
._leave(null, context
);
5542 if ($__default
['default'](this.getTipElement()).hasClass(CLASS_NAME_SHOW
$4)) {
5543 this._leave(null, this);
5548 this._enter(null, this);
5552 _proto
.dispose
= function dispose() {
5553 clearTimeout(this._timeout
);
5554 $__default
['default'].removeData(this.element
, this.constructor.DATA_KEY
);
5555 $__default
['default'](this.element
).off(this.constructor.EVENT_KEY
);
5556 $__default
['default'](this.element
).closest('.modal').off('hide.bs.modal', this._hideModalHandler
);
5559 $__default
['default'](this.tip
).remove();
5562 this._isEnabled
= null;
5563 this._timeout
= null;
5564 this._hoverState
= null;
5565 this._activeTrigger
= null;
5568 this._popper
.destroy();
5571 this._popper
= null;
5572 this.element
= null;
5577 _proto
.show
= function show() {
5580 if ($__default
['default'](this.element
).css('display') === 'none') {
5581 throw new Error('Please use show on visible elements');
5584 var showEvent
= $__default
['default'].Event(this.constructor.Event
.SHOW
);
5586 if (this.isWithContent() && this._isEnabled
) {
5587 $__default
['default'](this.element
).trigger(showEvent
);
5588 var shadowRoot
= Util
.findShadowRoot(this.element
);
5589 var isInTheDom
= $__default
['default'].contains(shadowRoot
!== null ? shadowRoot
: this.element
.ownerDocument
.documentElement
, this.element
);
5591 if (showEvent
.isDefaultPrevented() || !isInTheDom
) {
5595 var tip
= this.getTipElement();
5596 var tipId
= Util
.getUID(this.constructor.NAME
);
5597 tip
.setAttribute('id', tipId
);
5598 this.element
.setAttribute('aria-describedby', tipId
);
5601 if (this.config
.animation
) {
5602 $__default
['default'](tip
).addClass(CLASS_NAME_FADE
$2);
5605 var placement
= typeof this.config
.placement
=== 'function' ? this.config
.placement
.call(this, tip
, this.element
) : this.config
.placement
;
5607 var attachment
= this._getAttachment(placement
);
5609 this.addAttachmentClass(attachment
);
5611 var container
= this._getContainer();
5613 $__default
['default'](tip
).data(this.constructor.DATA_KEY
, this);
5615 if (!$__default
['default'].contains(this.element
.ownerDocument
.documentElement
, this.tip
)) {
5616 $__default
['default'](tip
).appendTo(container
);
5619 $__default
['default'](this.element
).trigger(this.constructor.Event
.INSERTED
);
5620 this._popper
= new Popper(this.element
, tip
, this._getPopperConfig(attachment
));
5621 $__default
['default'](tip
).addClass(CLASS_NAME_SHOW
$4);
5622 $__default
['default'](tip
).addClass(this.config
.customClass
); // If this is a touch-enabled device we add extra
5623 // empty mouseover listeners to the body's immediate children;
5624 // only needed because of broken event delegation on iOS
5625 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
5627 if ('ontouchstart' in document
.documentElement
) {
5628 $__default
['default'](document
.body
).children().on('mouseover', null, $__default
['default'].noop
);
5631 var complete
= function complete() {
5632 if (_this
.config
.animation
) {
5633 _this
._fixTransition();
5636 var prevHoverState
= _this
._hoverState
;
5637 _this
._hoverState
= null;
5638 $__default
['default'](_this
.element
).trigger(_this
.constructor.Event
.SHOWN
);
5640 if (prevHoverState
=== HOVER_STATE_OUT
) {
5641 _this
._leave(null, _this
);
5645 if ($__default
['default'](this.tip
).hasClass(CLASS_NAME_FADE
$2)) {
5646 var transitionDuration
= Util
.getTransitionDurationFromElement(this.tip
);
5647 $__default
['default'](this.tip
).one(Util
.TRANSITION_END
, complete
).emulateTransitionEnd(transitionDuration
);
5654 _proto
.hide
= function hide(callback
) {
5657 var tip
= this.getTipElement();
5658 var hideEvent
= $__default
['default'].Event(this.constructor.Event
.HIDE
);
5660 var complete
= function complete() {
5661 if (_this2
._hoverState
!== HOVER_STATE_SHOW
&& tip
.parentNode
) {
5662 tip
.parentNode
.removeChild(tip
);
5665 _this2
._cleanTipClass();
5667 _this2
.element
.removeAttribute('aria-describedby');
5669 $__default
['default'](_this2
.element
).trigger(_this2
.constructor.Event
.HIDDEN
);
5671 if (_this2
._popper
!== null) {
5672 _this2
._popper
.destroy();
5680 $__default
['default'](this.element
).trigger(hideEvent
);
5682 if (hideEvent
.isDefaultPrevented()) {
5686 $__default
['default'](tip
).removeClass(CLASS_NAME_SHOW
$4); // If this is a touch-enabled device we remove the extra
5687 // empty mouseover listeners we added for iOS support
5689 if ('ontouchstart' in document
.documentElement
) {
5690 $__default
['default'](document
.body
).children().off('mouseover', null, $__default
['default'].noop
);
5693 this._activeTrigger
[TRIGGER_CLICK
] = false;
5694 this._activeTrigger
[TRIGGER_FOCUS
] = false;
5695 this._activeTrigger
[TRIGGER_HOVER
] = false;
5697 if ($__default
['default'](this.tip
).hasClass(CLASS_NAME_FADE
$2)) {
5698 var transitionDuration
= Util
.getTransitionDurationFromElement(tip
);
5699 $__default
['default'](tip
).one(Util
.TRANSITION_END
, complete
).emulateTransitionEnd(transitionDuration
);
5704 this._hoverState
= '';
5707 _proto
.update
= function update() {
5708 if (this._popper
!== null) {
5709 this._popper
.scheduleUpdate();
5714 _proto
.isWithContent
= function isWithContent() {
5715 return Boolean(this.getTitle());
5718 _proto
.addAttachmentClass
= function addAttachmentClass(attachment
) {
5719 $__default
['default'](this.getTipElement()).addClass(CLASS_PREFIX
+ "-" + attachment
);
5722 _proto
.getTipElement
= function getTipElement() {
5723 this.tip
= this.tip
|| $__default
['default'](this.config
.template
)[0];
5727 _proto
.setContent
= function setContent() {
5728 var tip
= this.getTipElement();
5729 this.setElementContent($__default
['default'](tip
.querySelectorAll(SELECTOR_TOOLTIP_INNER
)), this.getTitle());
5730 $__default
['default'](tip
).removeClass(CLASS_NAME_FADE
$2 + " " + CLASS_NAME_SHOW
$4);
5733 _proto
.setElementContent
= function setElementContent($element
, content
) {
5734 if (typeof content
=== 'object' && (content
.nodeType
|| content
.jquery
)) {
5735 // Content is a DOM node or a jQuery
5736 if (this.config
.html
) {
5737 if (!$__default
['default'](content
).parent().is($element
)) {
5738 $element
.empty().append(content
);
5741 $element
.text($__default
['default'](content
).text());
5747 if (this.config
.html
) {
5748 if (this.config
.sanitize
) {
5749 content
= sanitizeHtml(content
, this.config
.whiteList
, this.config
.sanitizeFn
);
5752 $element
.html(content
);
5754 $element
.text(content
);
5758 _proto
.getTitle
= function getTitle() {
5759 var title
= this.element
.getAttribute('data-original-title');
5762 title
= typeof this.config
.title
=== 'function' ? this.config
.title
.call(this.element
) : this.config
.title
;
5769 _proto
._getPopperConfig
= function _getPopperConfig(attachment
) {
5772 var defaultBsConfig
= {
5773 placement
: attachment
,
5775 offset
: this._getOffset(),
5777 behavior
: this.config
.fallbackPlacement
5780 element
: SELECTOR_ARROW
5783 boundariesElement
: this.config
.boundary
5786 onCreate
: function onCreate(data
) {
5787 if (data
.originalPlacement
!== data
.placement
) {
5788 _this3
._handlePopperPlacementChange(data
);
5791 onUpdate
: function onUpdate(data
) {
5792 return _this3
._handlePopperPlacementChange(data
);
5795 return _extends({}, defaultBsConfig
, this.config
.popperConfig
);
5798 _proto
._getOffset
= function _getOffset() {
5803 if (typeof this.config
.offset
=== 'function') {
5804 offset
.fn = function (data
) {
5805 data
.offsets
= _extends({}, data
.offsets
, _this4
.config
.offset(data
.offsets
, _this4
.element
) || {});
5809 offset
.offset
= this.config
.offset
;
5815 _proto
._getContainer
= function _getContainer() {
5816 if (this.config
.container
=== false) {
5817 return document
.body
;
5820 if (Util
.isElement(this.config
.container
)) {
5821 return $__default
['default'](this.config
.container
);
5824 return $__default
['default'](document
).find(this.config
.container
);
5827 _proto
._getAttachment
= function _getAttachment(placement
) {
5828 return AttachmentMap
[placement
.toUpperCase()];
5831 _proto
._setListeners
= function _setListeners() {
5834 var triggers
= this.config
.trigger
.split(' ');
5835 triggers
.forEach(function (trigger
) {
5836 if (trigger
=== 'click') {
5837 $__default
['default'](_this5
.element
).on(_this5
.constructor.Event
.CLICK
, _this5
.config
.selector
, function (event
) {
5838 return _this5
.toggle(event
);
5840 } else if (trigger
!== TRIGGER_MANUAL
) {
5841 var eventIn
= trigger
=== TRIGGER_HOVER
? _this5
.constructor.Event
.MOUSEENTER
: _this5
.constructor.Event
.FOCUSIN
;
5842 var eventOut
= trigger
=== TRIGGER_HOVER
? _this5
.constructor.Event
.MOUSELEAVE
: _this5
.constructor.Event
.FOCUSOUT
;
5843 $__default
['default'](_this5
.element
).on(eventIn
, _this5
.config
.selector
, function (event
) {
5844 return _this5
._enter(event
);
5845 }).on(eventOut
, _this5
.config
.selector
, function (event
) {
5846 return _this5
._leave(event
);
5851 this._hideModalHandler = function () {
5852 if (_this5
.element
) {
5857 $__default
['default'](this.element
).closest('.modal').on('hide.bs.modal', this._hideModalHandler
);
5859 if (this.config
.selector
) {
5860 this.config
= _extends({}, this.config
, {
5869 _proto
._fixTitle
= function _fixTitle() {
5870 var titleType
= typeof this.element
.getAttribute('data-original-title');
5872 if (this.element
.getAttribute('title') || titleType
!== 'string') {
5873 this.element
.setAttribute('data-original-title', this.element
.getAttribute('title') || '');
5874 this.element
.setAttribute('title', '');
5878 _proto
._enter
= function _enter(event
, context
) {
5879 var dataKey
= this.constructor.DATA_KEY
;
5880 context
= context
|| $__default
['default'](event
.currentTarget
).data(dataKey
);
5883 context
= new this.constructor(event
.currentTarget
, this._getDelegateConfig());
5884 $__default
['default'](event
.currentTarget
).data(dataKey
, context
);
5888 context
._activeTrigger
[event
.type
=== 'focusin' ? TRIGGER_FOCUS
: TRIGGER_HOVER
] = true;
5891 if ($__default
['default'](context
.getTipElement()).hasClass(CLASS_NAME_SHOW
$4) || context
._hoverState
=== HOVER_STATE_SHOW
) {
5892 context
._hoverState
= HOVER_STATE_SHOW
;
5896 clearTimeout(context
._timeout
);
5897 context
._hoverState
= HOVER_STATE_SHOW
;
5899 if (!context
.config
.delay
|| !context
.config
.delay
.show
) {
5904 context
._timeout
= setTimeout(function () {
5905 if (context
._hoverState
=== HOVER_STATE_SHOW
) {
5908 }, context
.config
.delay
.show
);
5911 _proto
._leave
= function _leave(event
, context
) {
5912 var dataKey
= this.constructor.DATA_KEY
;
5913 context
= context
|| $__default
['default'](event
.currentTarget
).data(dataKey
);
5916 context
= new this.constructor(event
.currentTarget
, this._getDelegateConfig());
5917 $__default
['default'](event
.currentTarget
).data(dataKey
, context
);
5921 context
._activeTrigger
[event
.type
=== 'focusout' ? TRIGGER_FOCUS
: TRIGGER_HOVER
] = false;
5924 if (context
._isWithActiveTrigger()) {
5928 clearTimeout(context
._timeout
);
5929 context
._hoverState
= HOVER_STATE_OUT
;
5931 if (!context
.config
.delay
|| !context
.config
.delay
.hide
) {
5936 context
._timeout
= setTimeout(function () {
5937 if (context
._hoverState
=== HOVER_STATE_OUT
) {
5940 }, context
.config
.delay
.hide
);
5943 _proto
._isWithActiveTrigger
= function _isWithActiveTrigger() {
5944 for (var trigger
in this._activeTrigger
) {
5945 if (this._activeTrigger
[trigger
]) {
5953 _proto
._getConfig
= function _getConfig(config
) {
5954 var dataAttributes
= $__default
['default'](this.element
).data();
5955 Object
.keys(dataAttributes
).forEach(function (dataAttr
) {
5956 if (DISALLOWED_ATTRIBUTES
.indexOf(dataAttr
) !== -1) {
5957 delete dataAttributes
[dataAttr
];
5960 config
= _extends({}, this.constructor.Default
, dataAttributes
, typeof config
=== 'object' && config
? config
: {});
5962 if (typeof config
.delay
=== 'number') {
5969 if (typeof config
.title
=== 'number') {
5970 config
.title
= config
.title
.toString();
5973 if (typeof config
.content
=== 'number') {
5974 config
.content
= config
.content
.toString();
5977 Util
.typeCheckConfig(NAME
$6, config
, this.constructor.DefaultType
);
5979 if (config
.sanitize
) {
5980 config
.template
= sanitizeHtml(config
.template
, config
.whiteList
, config
.sanitizeFn
);
5986 _proto
._getDelegateConfig
= function _getDelegateConfig() {
5990 for (var key
in this.config
) {
5991 if (this.constructor.Default
[key
] !== this.config
[key
]) {
5992 config
[key
] = this.config
[key
];
6000 _proto
._cleanTipClass
= function _cleanTipClass() {
6001 var $tip
= $__default
['default'](this.getTipElement());
6002 var tabClass
= $tip
.attr('class').match(BSCLS_PREFIX_REGEX
);
6004 if (tabClass
!== null && tabClass
.length
) {
6005 $tip
.removeClass(tabClass
.join(''));
6009 _proto
._handlePopperPlacementChange
= function _handlePopperPlacementChange(popperData
) {
6010 this.tip
= popperData
.instance
.popper
;
6012 this._cleanTipClass();
6014 this.addAttachmentClass(this._getAttachment(popperData
.placement
));
6017 _proto
._fixTransition
= function _fixTransition() {
6018 var tip
= this.getTipElement();
6019 var initConfigAnimation
= this.config
.animation
;
6021 if (tip
.getAttribute('x-placement') !== null) {
6025 $__default
['default'](tip
).removeClass(CLASS_NAME_FADE
$2);
6026 this.config
.animation
= false;
6029 this.config
.animation
= initConfigAnimation
;
6033 Tooltip
._jQueryInterface
= function _jQueryInterface(config
) {
6034 return this.each(function () {
6035 var $element
= $__default
['default'](this);
6036 var data
= $element
.data(DATA_KEY
$6);
6038 var _config
= typeof config
=== 'object' && config
;
6040 if (!data
&& /dispose|hide/.test(config
)) {
6045 data
= new Tooltip(this, _config
);
6046 $element
.data(DATA_KEY
$6, data
);
6049 if (typeof config
=== 'string') {
6050 if (typeof data
[config
] === 'undefined') {
6051 throw new TypeError("No method named \"" + config
+ "\"");
6059 _createClass(Tooltip
, null, [{
6061 get: function get() {
6066 get: function get() {
6071 get: function get() {
6076 get: function get() {
6081 get: function get() {
6086 get: function get() {
6091 get: function get() {
6092 return DefaultType
$4;
6099 * ------------------------------------------------------------------------
6101 * ------------------------------------------------------------------------
6105 $__default
['default'].fn
[NAME
$6] = Tooltip
._jQueryInterface
;
6106 $__default
['default'].fn
[NAME
$6].Constructor
= Tooltip
;
6108 $__default
['default'].fn
[NAME
$6].noConflict = function () {
6109 $__default
['default'].fn
[NAME
$6] = JQUERY_NO_CONFLICT
$6;
6110 return Tooltip
._jQueryInterface
;
6114 * ------------------------------------------------------------------------
6116 * ------------------------------------------------------------------------
6119 var NAME
$7 = 'popover';
6120 var VERSION
$7 = '4.6.0';
6121 var DATA_KEY
$7 = 'bs.popover';
6122 var EVENT_KEY
$7 = "." + DATA_KEY
$7;
6123 var JQUERY_NO_CONFLICT
$7 = $__default
['default'].fn
[NAME
$7];
6124 var CLASS_PREFIX
$1 = 'bs-popover';
6125 var BSCLS_PREFIX_REGEX
$1 = new RegExp("(^|\\s)" + CLASS_PREFIX
$1 + "\\S+", 'g');
6127 var Default
$5 = _extends({}, Tooltip
.Default
, {
6131 template
: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
6134 var DefaultType
$5 = _extends({}, Tooltip
.DefaultType
, {
6135 content
: '(string|element|function)'
6138 var CLASS_NAME_FADE
$3 = 'fade';
6139 var CLASS_NAME_SHOW
$5 = 'show';
6140 var SELECTOR_TITLE
= '.popover-header';
6141 var SELECTOR_CONTENT
= '.popover-body';
6143 HIDE
: "hide" + EVENT_KEY
$7,
6144 HIDDEN
: "hidden" + EVENT_KEY
$7,
6145 SHOW
: "show" + EVENT_KEY
$7,
6146 SHOWN
: "shown" + EVENT_KEY
$7,
6147 INSERTED
: "inserted" + EVENT_KEY
$7,
6148 CLICK
: "click" + EVENT_KEY
$7,
6149 FOCUSIN
: "focusin" + EVENT_KEY
$7,
6150 FOCUSOUT
: "focusout" + EVENT_KEY
$7,
6151 MOUSEENTER
: "mouseenter" + EVENT_KEY
$7,
6152 MOUSELEAVE
: "mouseleave" + EVENT_KEY
$7
6155 * ------------------------------------------------------------------------
6157 * ------------------------------------------------------------------------
6160 var Popover
= /*#__PURE__*/function (_Tooltip
) {
6161 _inheritsLoose(Popover
, _Tooltip
);
6163 function Popover() {
6164 return _Tooltip
.apply(this, arguments
) || this;
6167 var _proto
= Popover
.prototype;
6170 _proto
.isWithContent
= function isWithContent() {
6171 return this.getTitle() || this._getContent();
6174 _proto
.addAttachmentClass
= function addAttachmentClass(attachment
) {
6175 $__default
['default'](this.getTipElement()).addClass(CLASS_PREFIX
$1 + "-" + attachment
);
6178 _proto
.getTipElement
= function getTipElement() {
6179 this.tip
= this.tip
|| $__default
['default'](this.config
.template
)[0];
6183 _proto
.setContent
= function setContent() {
6184 var $tip
= $__default
['default'](this.getTipElement()); // We use append for html objects to maintain js events
6186 this.setElementContent($tip
.find(SELECTOR_TITLE
), this.getTitle());
6188 var content
= this._getContent();
6190 if (typeof content
=== 'function') {
6191 content
= content
.call(this.element
);
6194 this.setElementContent($tip
.find(SELECTOR_CONTENT
), content
);
6195 $tip
.removeClass(CLASS_NAME_FADE
$3 + " " + CLASS_NAME_SHOW
$5);
6199 _proto
._getContent
= function _getContent() {
6200 return this.element
.getAttribute('data-content') || this.config
.content
;
6203 _proto
._cleanTipClass
= function _cleanTipClass() {
6204 var $tip
= $__default
['default'](this.getTipElement());
6205 var tabClass
= $tip
.attr('class').match(BSCLS_PREFIX_REGEX
$1);
6207 if (tabClass
!== null && tabClass
.length
> 0) {
6208 $tip
.removeClass(tabClass
.join(''));
6213 Popover
._jQueryInterface
= function _jQueryInterface(config
) {
6214 return this.each(function () {
6215 var data
= $__default
['default'](this).data(DATA_KEY
$7);
6217 var _config
= typeof config
=== 'object' ? config
: null;
6219 if (!data
&& /dispose|hide/.test(config
)) {
6224 data
= new Popover(this, _config
);
6225 $__default
['default'](this).data(DATA_KEY
$7, data
);
6228 if (typeof config
=== 'string') {
6229 if (typeof data
[config
] === 'undefined') {
6230 throw new TypeError("No method named \"" + config
+ "\"");
6238 _createClass(Popover
, null, [{
6241 get: function get() {
6246 get: function get() {
6251 get: function get() {
6256 get: function get() {
6261 get: function get() {
6266 get: function get() {
6271 get: function get() {
6272 return DefaultType
$5;
6279 * ------------------------------------------------------------------------
6281 * ------------------------------------------------------------------------
6285 $__default
['default'].fn
[NAME
$7] = Popover
._jQueryInterface
;
6286 $__default
['default'].fn
[NAME
$7].Constructor
= Popover
;
6288 $__default
['default'].fn
[NAME
$7].noConflict = function () {
6289 $__default
['default'].fn
[NAME
$7] = JQUERY_NO_CONFLICT
$7;
6290 return Popover
._jQueryInterface
;
6294 * ------------------------------------------------------------------------
6296 * ------------------------------------------------------------------------
6299 var NAME
$8 = 'scrollspy';
6300 var VERSION
$8 = '4.6.0';
6301 var DATA_KEY
$8 = 'bs.scrollspy';
6302 var EVENT_KEY
$8 = "." + DATA_KEY
$8;
6303 var DATA_API_KEY
$6 = '.data-api';
6304 var JQUERY_NO_CONFLICT
$8 = $__default
['default'].fn
[NAME
$8];
6310 var DefaultType
$6 = {
6313 target
: '(string|element)'
6315 var EVENT_ACTIVATE
= "activate" + EVENT_KEY
$8;
6316 var EVENT_SCROLL
= "scroll" + EVENT_KEY
$8;
6317 var EVENT_LOAD_DATA_API
$2 = "load" + EVENT_KEY
$8 + DATA_API_KEY
$6;
6318 var CLASS_NAME_DROPDOWN_ITEM
= 'dropdown-item';
6319 var CLASS_NAME_ACTIVE
$2 = 'active';
6320 var SELECTOR_DATA_SPY
= '[data-spy="scroll"]';
6321 var SELECTOR_NAV_LIST_GROUP
= '.nav, .list-group';
6322 var SELECTOR_NAV_LINKS
= '.nav-link';
6323 var SELECTOR_NAV_ITEMS
= '.nav-item';
6324 var SELECTOR_LIST_ITEMS
= '.list-group-item';
6325 var SELECTOR_DROPDOWN
= '.dropdown';
6326 var SELECTOR_DROPDOWN_ITEMS
= '.dropdown-item';
6327 var SELECTOR_DROPDOWN_TOGGLE
= '.dropdown-toggle';
6328 var METHOD_OFFSET
= 'offset';
6329 var METHOD_POSITION
= 'position';
6331 * ------------------------------------------------------------------------
6333 * ------------------------------------------------------------------------
6336 var ScrollSpy
= /*#__PURE__*/function () {
6337 function ScrollSpy(element
, config
) {
6340 this._element
= element
;
6341 this._scrollElement
= element
.tagName
=== 'BODY' ? window
: element
;
6342 this._config
= this._getConfig(config
);
6343 this._selector
= this._config
.target
+ " " + SELECTOR_NAV_LINKS
+ "," + (this._config
.target
+ " " + SELECTOR_LIST_ITEMS
+ ",") + (this._config
.target
+ " " + SELECTOR_DROPDOWN_ITEMS
);
6346 this._activeTarget
= null;
6347 this._scrollHeight
= 0;
6348 $__default
['default'](this._scrollElement
).on(EVENT_SCROLL
, function (event
) {
6349 return _this
._process(event
);
6357 var _proto
= ScrollSpy
.prototype;
6360 _proto
.refresh
= function refresh() {
6363 var autoMethod
= this._scrollElement
=== this._scrollElement
.window
? METHOD_OFFSET
: METHOD_POSITION
;
6364 var offsetMethod
= this._config
.method
=== 'auto' ? autoMethod
: this._config
.method
;
6365 var offsetBase
= offsetMethod
=== METHOD_POSITION
? this._getScrollTop() : 0;
6368 this._scrollHeight
= this._getScrollHeight();
6369 var targets
= [].slice
.call(document
.querySelectorAll(this._selector
));
6370 targets
.map(function (element
) {
6372 var targetSelector
= Util
.getSelectorFromElement(element
);
6374 if (targetSelector
) {
6375 target
= document
.querySelector(targetSelector
);
6379 var targetBCR
= target
.getBoundingClientRect();
6381 if (targetBCR
.width
|| targetBCR
.height
) {
6382 // TODO (fat): remove sketch reliance on jQuery position/offset
6383 return [$__default
['default'](target
)[offsetMethod
]().top
+ offsetBase
, targetSelector
];
6388 }).filter(function (item
) {
6390 }).sort(function (a
, b
) {
6392 }).forEach(function (item
) {
6393 _this2
._offsets
.push(item
[0]);
6395 _this2
._targets
.push(item
[1]);
6399 _proto
.dispose
= function dispose() {
6400 $__default
['default'].removeData(this._element
, DATA_KEY
$8);
6401 $__default
['default'](this._scrollElement
).off(EVENT_KEY
$8);
6402 this._element
= null;
6403 this._scrollElement
= null;
6404 this._config
= null;
6405 this._selector
= null;
6406 this._offsets
= null;
6407 this._targets
= null;
6408 this._activeTarget
= null;
6409 this._scrollHeight
= null;
6413 _proto
._getConfig
= function _getConfig(config
) {
6414 config
= _extends({}, Default
$6, typeof config
=== 'object' && config
? config
: {});
6416 if (typeof config
.target
!== 'string' && Util
.isElement(config
.target
)) {
6417 var id
= $__default
['default'](config
.target
).attr('id');
6420 id
= Util
.getUID(NAME
$8);
6421 $__default
['default'](config
.target
).attr('id', id
);
6424 config
.target
= "#" + id
;
6427 Util
.typeCheckConfig(NAME
$8, config
, DefaultType
$6);
6431 _proto
._getScrollTop
= function _getScrollTop() {
6432 return this._scrollElement
=== window
? this._scrollElement
.pageYOffset
: this._scrollElement
.scrollTop
;
6435 _proto
._getScrollHeight
= function _getScrollHeight() {
6436 return this._scrollElement
.scrollHeight
|| Math
.max(document
.body
.scrollHeight
, document
.documentElement
.scrollHeight
);
6439 _proto
._getOffsetHeight
= function _getOffsetHeight() {
6440 return this._scrollElement
=== window
? window
.innerHeight
: this._scrollElement
.getBoundingClientRect().height
;
6443 _proto
._process
= function _process() {
6444 var scrollTop
= this._getScrollTop() + this._config
.offset
;
6446 var scrollHeight
= this._getScrollHeight();
6448 var maxScroll
= this._config
.offset
+ scrollHeight
- this._getOffsetHeight();
6450 if (this._scrollHeight
!== scrollHeight
) {
6454 if (scrollTop
>= maxScroll
) {
6455 var target
= this._targets
[this._targets
.length
- 1];
6457 if (this._activeTarget
!== target
) {
6458 this._activate(target
);
6464 if (this._activeTarget
&& scrollTop
< this._offsets
[0] && this._offsets
[0] > 0) {
6465 this._activeTarget
= null;
6472 for (var i
= this._offsets
.length
; i
--;) {
6473 var isActiveTarget
= this._activeTarget
!== this._targets
[i
] && scrollTop
>= this._offsets
[i
] && (typeof this._offsets
[i
+ 1] === 'undefined' || scrollTop
< this._offsets
[i
+ 1]);
6475 if (isActiveTarget
) {
6476 this._activate(this._targets
[i
]);
6481 _proto
._activate
= function _activate(target
) {
6482 this._activeTarget
= target
;
6486 var queries
= this._selector
.split(',').map(function (selector
) {
6487 return selector
+ "[data-target=\"" + target
+ "\"]," + selector
+ "[href=\"" + target
+ "\"]";
6490 var $link
= $__default
['default']([].slice
.call(document
.querySelectorAll(queries
.join(','))));
6492 if ($link
.hasClass(CLASS_NAME_DROPDOWN_ITEM
)) {
6493 $link
.closest(SELECTOR_DROPDOWN
).find(SELECTOR_DROPDOWN_TOGGLE
).addClass(CLASS_NAME_ACTIVE
$2);
6494 $link
.addClass(CLASS_NAME_ACTIVE
$2);
6496 // Set triggered link as active
6497 $link
.addClass(CLASS_NAME_ACTIVE
$2); // Set triggered links parents as active
6498 // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
6500 $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
6502 $link
.parents(SELECTOR_NAV_LIST_GROUP
).prev(SELECTOR_NAV_ITEMS
).children(SELECTOR_NAV_LINKS
).addClass(CLASS_NAME_ACTIVE
$2);
6505 $__default
['default'](this._scrollElement
).trigger(EVENT_ACTIVATE
, {
6506 relatedTarget
: target
6510 _proto
._clear
= function _clear() {
6511 [].slice
.call(document
.querySelectorAll(this._selector
)).filter(function (node
) {
6512 return node
.classList
.contains(CLASS_NAME_ACTIVE
$2);
6513 }).forEach(function (node
) {
6514 return node
.classList
.remove(CLASS_NAME_ACTIVE
$2);
6519 ScrollSpy
._jQueryInterface
= function _jQueryInterface(config
) {
6520 return this.each(function () {
6521 var data
= $__default
['default'](this).data(DATA_KEY
$8);
6523 var _config
= typeof config
=== 'object' && config
;
6526 data
= new ScrollSpy(this, _config
);
6527 $__default
['default'](this).data(DATA_KEY
$8, data
);
6530 if (typeof config
=== 'string') {
6531 if (typeof data
[config
] === 'undefined') {
6532 throw new TypeError("No method named \"" + config
+ "\"");
6540 _createClass(ScrollSpy
, null, [{
6542 get: function get() {
6547 get: function get() {
6555 * ------------------------------------------------------------------------
6556 * Data Api implementation
6557 * ------------------------------------------------------------------------
6561 $__default
['default'](window
).on(EVENT_LOAD_DATA_API
$2, function () {
6562 var scrollSpys
= [].slice
.call(document
.querySelectorAll(SELECTOR_DATA_SPY
));
6563 var scrollSpysLength
= scrollSpys
.length
;
6565 for (var i
= scrollSpysLength
; i
--;) {
6566 var $spy
= $__default
['default'](scrollSpys
[i
]);
6568 ScrollSpy
._jQueryInterface
.call($spy
, $spy
.data());
6572 * ------------------------------------------------------------------------
6574 * ------------------------------------------------------------------------
6577 $__default
['default'].fn
[NAME
$8] = ScrollSpy
._jQueryInterface
;
6578 $__default
['default'].fn
[NAME
$8].Constructor
= ScrollSpy
;
6580 $__default
['default'].fn
[NAME
$8].noConflict = function () {
6581 $__default
['default'].fn
[NAME
$8] = JQUERY_NO_CONFLICT
$8;
6582 return ScrollSpy
._jQueryInterface
;
6586 * ------------------------------------------------------------------------
6588 * ------------------------------------------------------------------------
6592 var VERSION
$9 = '4.6.0';
6593 var DATA_KEY
$9 = 'bs.tab';
6594 var EVENT_KEY
$9 = "." + DATA_KEY
$9;
6595 var DATA_API_KEY
$7 = '.data-api';
6596 var JQUERY_NO_CONFLICT
$9 = $__default
['default'].fn
[NAME
$9];
6597 var EVENT_HIDE
$3 = "hide" + EVENT_KEY
$9;
6598 var EVENT_HIDDEN
$3 = "hidden" + EVENT_KEY
$9;
6599 var EVENT_SHOW
$3 = "show" + EVENT_KEY
$9;
6600 var EVENT_SHOWN
$3 = "shown" + EVENT_KEY
$9;
6601 var EVENT_CLICK_DATA_API
$6 = "click" + EVENT_KEY
$9 + DATA_API_KEY
$7;
6602 var CLASS_NAME_DROPDOWN_MENU
= 'dropdown-menu';
6603 var CLASS_NAME_ACTIVE
$3 = 'active';
6604 var CLASS_NAME_DISABLED
$1 = 'disabled';
6605 var CLASS_NAME_FADE
$4 = 'fade';
6606 var CLASS_NAME_SHOW
$6 = 'show';
6607 var SELECTOR_DROPDOWN
$1 = '.dropdown';
6608 var SELECTOR_NAV_LIST_GROUP
$1 = '.nav, .list-group';
6609 var SELECTOR_ACTIVE
$2 = '.active';
6610 var SELECTOR_ACTIVE_UL
= '> li > .active';
6611 var SELECTOR_DATA_TOGGLE
$4 = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]';
6612 var SELECTOR_DROPDOWN_TOGGLE
$1 = '.dropdown-toggle';
6613 var SELECTOR_DROPDOWN_ACTIVE_CHILD
= '> .dropdown-menu .active';
6615 * ------------------------------------------------------------------------
6617 * ------------------------------------------------------------------------
6620 var Tab
= /*#__PURE__*/function () {
6621 function Tab(element
) {
6622 this._element
= element
;
6626 var _proto
= Tab
.prototype;
6629 _proto
.show
= function show() {
6632 if (this._element
.parentNode
&& this._element
.parentNode
.nodeType
=== Node
.ELEMENT_NODE
&& $__default
['default'](this._element
).hasClass(CLASS_NAME_ACTIVE
$3) || $__default
['default'](this._element
).hasClass(CLASS_NAME_DISABLED
$1)) {
6638 var listElement
= $__default
['default'](this._element
).closest(SELECTOR_NAV_LIST_GROUP
$1)[0];
6639 var selector
= Util
.getSelectorFromElement(this._element
);
6642 var itemSelector
= listElement
.nodeName
=== 'UL' || listElement
.nodeName
=== 'OL' ? SELECTOR_ACTIVE_UL
: SELECTOR_ACTIVE
$2;
6643 previous
= $__default
['default'].makeArray($__default
['default'](listElement
).find(itemSelector
));
6644 previous
= previous
[previous
.length
- 1];
6647 var hideEvent
= $__default
['default'].Event(EVENT_HIDE
$3, {
6648 relatedTarget
: this._element
6650 var showEvent
= $__default
['default'].Event(EVENT_SHOW
$3, {
6651 relatedTarget
: previous
6655 $__default
['default'](previous
).trigger(hideEvent
);
6658 $__default
['default'](this._element
).trigger(showEvent
);
6660 if (showEvent
.isDefaultPrevented() || hideEvent
.isDefaultPrevented()) {
6665 target
= document
.querySelector(selector
);
6668 this._activate(this._element
, listElement
);
6670 var complete
= function complete() {
6671 var hiddenEvent
= $__default
['default'].Event(EVENT_HIDDEN
$3, {
6672 relatedTarget
: _this
._element
6674 var shownEvent
= $__default
['default'].Event(EVENT_SHOWN
$3, {
6675 relatedTarget
: previous
6677 $__default
['default'](previous
).trigger(hiddenEvent
);
6678 $__default
['default'](_this
._element
).trigger(shownEvent
);
6682 this._activate(target
, target
.parentNode
, complete
);
6688 _proto
.dispose
= function dispose() {
6689 $__default
['default'].removeData(this._element
, DATA_KEY
$9);
6690 this._element
= null;
6694 _proto
._activate
= function _activate(element
, container
, callback
) {
6697 var activeElements
= container
&& (container
.nodeName
=== 'UL' || container
.nodeName
=== 'OL') ? $__default
['default'](container
).find(SELECTOR_ACTIVE_UL
) : $__default
['default'](container
).children(SELECTOR_ACTIVE
$2);
6698 var active
= activeElements
[0];
6699 var isTransitioning
= callback
&& active
&& $__default
['default'](active
).hasClass(CLASS_NAME_FADE
$4);
6701 var complete
= function complete() {
6702 return _this2
._transitionComplete(element
, active
, callback
);
6705 if (active
&& isTransitioning
) {
6706 var transitionDuration
= Util
.getTransitionDurationFromElement(active
);
6707 $__default
['default'](active
).removeClass(CLASS_NAME_SHOW
$6).one(Util
.TRANSITION_END
, complete
).emulateTransitionEnd(transitionDuration
);
6713 _proto
._transitionComplete
= function _transitionComplete(element
, active
, callback
) {
6715 $__default
['default'](active
).removeClass(CLASS_NAME_ACTIVE
$3);
6716 var dropdownChild
= $__default
['default'](active
.parentNode
).find(SELECTOR_DROPDOWN_ACTIVE_CHILD
)[0];
6718 if (dropdownChild
) {
6719 $__default
['default'](dropdownChild
).removeClass(CLASS_NAME_ACTIVE
$3);
6722 if (active
.getAttribute('role') === 'tab') {
6723 active
.setAttribute('aria-selected', false);
6727 $__default
['default'](element
).addClass(CLASS_NAME_ACTIVE
$3);
6729 if (element
.getAttribute('role') === 'tab') {
6730 element
.setAttribute('aria-selected', true);
6733 Util
.reflow(element
);
6735 if (element
.classList
.contains(CLASS_NAME_FADE
$4)) {
6736 element
.classList
.add(CLASS_NAME_SHOW
$6);
6739 if (element
.parentNode
&& $__default
['default'](element
.parentNode
).hasClass(CLASS_NAME_DROPDOWN_MENU
)) {
6740 var dropdownElement
= $__default
['default'](element
).closest(SELECTOR_DROPDOWN
$1)[0];
6742 if (dropdownElement
) {
6743 var dropdownToggleList
= [].slice
.call(dropdownElement
.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE
$1));
6744 $__default
['default'](dropdownToggleList
).addClass(CLASS_NAME_ACTIVE
$3);
6747 element
.setAttribute('aria-expanded', true);
6756 Tab
._jQueryInterface
= function _jQueryInterface(config
) {
6757 return this.each(function () {
6758 var $this = $__default
['default'](this);
6759 var data
= $this.data(DATA_KEY
$9);
6762 data
= new Tab(this);
6763 $this.data(DATA_KEY
$9, data
);
6766 if (typeof config
=== 'string') {
6767 if (typeof data
[config
] === 'undefined') {
6768 throw new TypeError("No method named \"" + config
+ "\"");
6776 _createClass(Tab
, null, [{
6778 get: function get() {
6786 * ------------------------------------------------------------------------
6787 * Data Api implementation
6788 * ------------------------------------------------------------------------
6792 $__default
['default'](document
).on(EVENT_CLICK_DATA_API
$6, SELECTOR_DATA_TOGGLE
$4, function (event
) {
6793 event
.preventDefault();
6795 Tab
._jQueryInterface
.call($__default
['default'](this), 'show');
6798 * ------------------------------------------------------------------------
6800 * ------------------------------------------------------------------------
6803 $__default
['default'].fn
[NAME
$9] = Tab
._jQueryInterface
;
6804 $__default
['default'].fn
[NAME
$9].Constructor
= Tab
;
6806 $__default
['default'].fn
[NAME
$9].noConflict = function () {
6807 $__default
['default'].fn
[NAME
$9] = JQUERY_NO_CONFLICT
$9;
6808 return Tab
._jQueryInterface
;
6812 * ------------------------------------------------------------------------
6814 * ------------------------------------------------------------------------
6817 var NAME
$a
= 'toast';
6818 var VERSION
$a
= '4.6.0';
6819 var DATA_KEY
$a
= 'bs.toast';
6820 var EVENT_KEY
$a
= "." + DATA_KEY
$a
;
6821 var JQUERY_NO_CONFLICT
$a
= $__default
['default'].fn
[NAME
$a
];
6822 var EVENT_CLICK_DISMISS
$1 = "click.dismiss" + EVENT_KEY
$a
;
6823 var EVENT_HIDE
$4 = "hide" + EVENT_KEY
$a
;
6824 var EVENT_HIDDEN
$4 = "hidden" + EVENT_KEY
$a
;
6825 var EVENT_SHOW
$4 = "show" + EVENT_KEY
$a
;
6826 var EVENT_SHOWN
$4 = "shown" + EVENT_KEY
$a
;
6827 var CLASS_NAME_FADE
$5 = 'fade';
6828 var CLASS_NAME_HIDE
= 'hide';
6829 var CLASS_NAME_SHOW
$7 = 'show';
6830 var CLASS_NAME_SHOWING
= 'showing';
6831 var DefaultType
$7 = {
6832 animation
: 'boolean',
6833 autohide
: 'boolean',
6841 var SELECTOR_DATA_DISMISS
$1 = '[data-dismiss="toast"]';
6843 * ------------------------------------------------------------------------
6845 * ------------------------------------------------------------------------
6848 var Toast
= /*#__PURE__*/function () {
6849 function Toast(element
, config
) {
6850 this._element
= element
;
6851 this._config
= this._getConfig(config
);
6852 this._timeout
= null;
6854 this._setListeners();
6858 var _proto
= Toast
.prototype;
6861 _proto
.show
= function show() {
6864 var showEvent
= $__default
['default'].Event(EVENT_SHOW
$4);
6865 $__default
['default'](this._element
).trigger(showEvent
);
6867 if (showEvent
.isDefaultPrevented()) {
6871 this._clearTimeout();
6873 if (this._config
.animation
) {
6874 this._element
.classList
.add(CLASS_NAME_FADE
$5);
6877 var complete
= function complete() {
6878 _this
._element
.classList
.remove(CLASS_NAME_SHOWING
);
6880 _this
._element
.classList
.add(CLASS_NAME_SHOW
$7);
6882 $__default
['default'](_this
._element
).trigger(EVENT_SHOWN
$4);
6884 if (_this
._config
.autohide
) {
6885 _this
._timeout
= setTimeout(function () {
6887 }, _this
._config
.delay
);
6891 this._element
.classList
.remove(CLASS_NAME_HIDE
);
6893 Util
.reflow(this._element
);
6895 this._element
.classList
.add(CLASS_NAME_SHOWING
);
6897 if (this._config
.animation
) {
6898 var transitionDuration
= Util
.getTransitionDurationFromElement(this._element
);
6899 $__default
['default'](this._element
).one(Util
.TRANSITION_END
, complete
).emulateTransitionEnd(transitionDuration
);
6905 _proto
.hide
= function hide() {
6906 if (!this._element
.classList
.contains(CLASS_NAME_SHOW
$7)) {
6910 var hideEvent
= $__default
['default'].Event(EVENT_HIDE
$4);
6911 $__default
['default'](this._element
).trigger(hideEvent
);
6913 if (hideEvent
.isDefaultPrevented()) {
6920 _proto
.dispose
= function dispose() {
6921 this._clearTimeout();
6923 if (this._element
.classList
.contains(CLASS_NAME_SHOW
$7)) {
6924 this._element
.classList
.remove(CLASS_NAME_SHOW
$7);
6927 $__default
['default'](this._element
).off(EVENT_CLICK_DISMISS
$1);
6928 $__default
['default'].removeData(this._element
, DATA_KEY
$a
);
6929 this._element
= null;
6930 this._config
= null;
6934 _proto
._getConfig
= function _getConfig(config
) {
6935 config
= _extends({}, Default
$7, $__default
['default'](this._element
).data(), typeof config
=== 'object' && config
? config
: {});
6936 Util
.typeCheckConfig(NAME
$a
, config
, this.constructor.DefaultType
);
6940 _proto
._setListeners
= function _setListeners() {
6943 $__default
['default'](this._element
).on(EVENT_CLICK_DISMISS
$1, SELECTOR_DATA_DISMISS
$1, function () {
6944 return _this2
.hide();
6948 _proto
._close
= function _close() {
6951 var complete
= function complete() {
6952 _this3
._element
.classList
.add(CLASS_NAME_HIDE
);
6954 $__default
['default'](_this3
._element
).trigger(EVENT_HIDDEN
$4);
6957 this._element
.classList
.remove(CLASS_NAME_SHOW
$7);
6959 if (this._config
.animation
) {
6960 var transitionDuration
= Util
.getTransitionDurationFromElement(this._element
);
6961 $__default
['default'](this._element
).one(Util
.TRANSITION_END
, complete
).emulateTransitionEnd(transitionDuration
);
6967 _proto
._clearTimeout
= function _clearTimeout() {
6968 clearTimeout(this._timeout
);
6969 this._timeout
= null;
6973 Toast
._jQueryInterface
= function _jQueryInterface(config
) {
6974 return this.each(function () {
6975 var $element
= $__default
['default'](this);
6976 var data
= $element
.data(DATA_KEY
$a
);
6978 var _config
= typeof config
=== 'object' && config
;
6981 data
= new Toast(this, _config
);
6982 $element
.data(DATA_KEY
$a
, data
);
6985 if (typeof config
=== 'string') {
6986 if (typeof data
[config
] === 'undefined') {
6987 throw new TypeError("No method named \"" + config
+ "\"");
6995 _createClass(Toast
, null, [{
6997 get: function get() {
7002 get: function get() {
7003 return DefaultType
$7;
7007 get: function get() {
7015 * ------------------------------------------------------------------------
7017 * ------------------------------------------------------------------------
7021 $__default
['default'].fn
[NAME
$a
] = Toast
._jQueryInterface
;
7022 $__default
['default'].fn
[NAME
$a
].Constructor
= Toast
;
7024 $__default
['default'].fn
[NAME
$a
].noConflict = function () {
7025 $__default
['default'].fn
[NAME
$a
] = JQUERY_NO_CONFLICT
$a
;
7026 return Toast
._jQueryInterface
;
7029 exports
.Alert
= Alert
;
7030 exports
.Button
= Button
;
7031 exports
.Carousel
= Carousel
;
7032 exports
.Collapse
= Collapse
;
7033 exports
.Dropdown
= Dropdown
;
7034 exports
.Modal
= Modal
;
7035 exports
.Popover
= Popover
;
7036 exports
.Scrollspy
= ScrollSpy
;
7038 exports
.Toast
= Toast
;
7039 exports
.Tooltip
= Tooltip
;
7040 exports
.Util
= Util
;
7042 Object
.defineProperty(exports
, '__esModule', { value
: true });
7045 //# sourceMappingURL=bootstrap.bundle.js.map