aboutsummaryrefslogtreecommitdiff
path: root/dist/js/bootstrap.js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/js/bootstrap.js')
-rw-r--r--dist/js/bootstrap.js5646
1 files changed, 3852 insertions, 1794 deletions
diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js
index 8a2e99a5..da59f0e0 100644
--- a/dist/js/bootstrap.js
+++ b/dist/js/bootstrap.js
@@ -1,2377 +1,4435 @@
1/*! 1/*!
2 * Bootstrap v3.3.7 (http://getbootstrap.com) 2 * Bootstrap v4.3.1 (https://getbootstrap.com/)
3 * Copyright 2011-2016 Twitter, Inc. 3 * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4 * Licensed under the MIT license 4 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 */ 5 */
6 6(function (global, factory) {
7if (typeof jQuery === 'undefined') { 7 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) :
8 throw new Error('Bootstrap\'s JavaScript requires jQuery') 8 typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) :
9} 9 (global = global || self, factory(global.bootstrap = {}, global.jQuery, global.Popper));
10 10}(this, function (exports, $, Popper) { 'use strict';
11+function ($) { 11
12 'use strict'; 12 $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
13 var version = $.fn.jquery.split(' ')[0].split('.') 13 Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
14 if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) { 14
15 throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4') 15 function _defineProperties(target, props) {
16 for (var i = 0; i < props.length; i++) {
17 var descriptor = props[i];
18 descriptor.enumerable = descriptor.enumerable || false;
19 descriptor.configurable = true;
20 if ("value" in descriptor) descriptor.writable = true;
21 Object.defineProperty(target, descriptor.key, descriptor);
22 }
16 } 23 }
17}(jQuery);
18
19/* ========================================================================
20 * Bootstrap: transition.js v3.3.7
21 * http://getbootstrap.com/javascript/#transitions
22 * ========================================================================
23 * Copyright 2011-2016 Twitter, Inc.
24 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
25 * ======================================================================== */
26
27 24
28+function ($) { 25 function _createClass(Constructor, protoProps, staticProps) {
29 'use strict'; 26 if (protoProps) _defineProperties(Constructor.prototype, protoProps);
27 if (staticProps) _defineProperties(Constructor, staticProps);
28 return Constructor;
29 }
30 30
31 // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 31 function _defineProperty(obj, key, value) {
32 // ============================================================ 32 if (key in obj) {
33 Object.defineProperty(obj, key, {
34 value: value,
35 enumerable: true,
36 configurable: true,
37 writable: true
38 });
39 } else {
40 obj[key] = value;
41 }
33 42
34 function transitionEnd() { 43 return obj;
35 var el = document.createElement('bootstrap') 44 }
36 45
37 var transEndEventNames = { 46 function _objectSpread(target) {
38 WebkitTransition : 'webkitTransitionEnd', 47 for (var i = 1; i < arguments.length; i++) {
39 MozTransition : 'transitionend', 48 var source = arguments[i] != null ? arguments[i] : {};
40 OTransition : 'oTransitionEnd otransitionend', 49 var ownKeys = Object.keys(source);
41 transition : 'transitionend'
42 }
43 50
44 for (var name in transEndEventNames) { 51 if (typeof Object.getOwnPropertySymbols === 'function') {
45 if (el.style[name] !== undefined) { 52 ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
46 return { end: transEndEventNames[name] } 53 return Object.getOwnPropertyDescriptor(source, sym).enumerable;
54 }));
47 } 55 }
56
57 ownKeys.forEach(function (key) {
58 _defineProperty(target, key, source[key]);
59 });
48 } 60 }
49 61
50 return false // explicit for ie8 ( ._.) 62 return target;
51 } 63 }
52 64
53 // http://blog.alexmaccaw.com/css-transitions 65 function _inheritsLoose(subClass, superClass) {
54 $.fn.emulateTransitionEnd = function (duration) { 66 subClass.prototype = Object.create(superClass.prototype);
55 var called = false 67 subClass.prototype.constructor = subClass;
56 var $el = this 68 subClass.__proto__ = superClass;
57 $(this).one('bsTransitionEnd', function () { called = true })
58 var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
59 setTimeout(callback, duration)
60 return this
61 } 69 }
62 70
63 $(function () { 71 /**
64 $.support.transition = transitionEnd() 72 * --------------------------------------------------------------------------
73 * Bootstrap (v4.3.1): util.js
74 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
75 * --------------------------------------------------------------------------
76 */
77 /**
78 * ------------------------------------------------------------------------
79 * Private TransitionEnd Helpers
80 * ------------------------------------------------------------------------
81 */
82
83 var TRANSITION_END = 'transitionend';
84 var MAX_UID = 1000000;
85 var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
86
87 function toType(obj) {
88 return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
89 }
65 90
66 if (!$.support.transition) return 91 function getSpecialTransitionEndEvent() {
92 return {
93 bindType: TRANSITION_END,
94 delegateType: TRANSITION_END,
95 handle: function handle(event) {
96 if ($(event.target).is(this)) {
97 return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
98 }
67 99
68 $.event.special.bsTransitionEnd = { 100 return undefined; // eslint-disable-line no-undefined
69 bindType: $.support.transition.end,
70 delegateType: $.support.transition.end,
71 handle: function (e) {
72 if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
73 } 101 }
74 } 102 };
75 }) 103 }
76 104
77}(jQuery); 105 function transitionEndEmulator(duration) {
106 var _this = this;
78 107
79/* ======================================================================== 108 var called = false;
80 * Bootstrap: alert.js v3.3.7 109 $(this).one(Util.TRANSITION_END, function () {
81 * http://getbootstrap.com/javascript/#alerts 110 called = true;
82 * ======================================================================== 111 });
83 * Copyright 2011-2016 Twitter, Inc. 112 setTimeout(function () {
84 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 113 if (!called) {
85 * ======================================================================== */ 114 Util.triggerTransitionEnd(_this);
115 }
116 }, duration);
117 return this;
118 }
86 119
120 function setTransitionEndSupport() {
121 $.fn.emulateTransitionEnd = transitionEndEmulator;
122 $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
123 }
124 /**
125 * --------------------------------------------------------------------------
126 * Public Util Api
127 * --------------------------------------------------------------------------
128 */
129
130
131 var Util = {
132 TRANSITION_END: 'bsTransitionEnd',
133 getUID: function getUID(prefix) {
134 do {
135 // eslint-disable-next-line no-bitwise
136 prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
137 } while (document.getElementById(prefix));
138
139 return prefix;
140 },
141 getSelectorFromElement: function getSelectorFromElement(element) {
142 var selector = element.getAttribute('data-target');
143
144 if (!selector || selector === '#') {
145 var hrefAttr = element.getAttribute('href');
146 selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
147 }
87 148
88+function ($) { 149 try {
89 'use strict'; 150 return document.querySelector(selector) ? selector : null;
151 } catch (err) {
152 return null;
153 }
154 },
155 getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
156 if (!element) {
157 return 0;
158 } // Get transition-duration of the element
159
160
161 var transitionDuration = $(element).css('transition-duration');
162 var transitionDelay = $(element).css('transition-delay');
163 var floatTransitionDuration = parseFloat(transitionDuration);
164 var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
165
166 if (!floatTransitionDuration && !floatTransitionDelay) {
167 return 0;
168 } // If multiple durations are defined, take the first
169
170
171 transitionDuration = transitionDuration.split(',')[0];
172 transitionDelay = transitionDelay.split(',')[0];
173 return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
174 },
175 reflow: function reflow(element) {
176 return element.offsetHeight;
177 },
178 triggerTransitionEnd: function triggerTransitionEnd(element) {
179 $(element).trigger(TRANSITION_END);
180 },
181 // TODO: Remove in v5
182 supportsTransitionEnd: function supportsTransitionEnd() {
183 return Boolean(TRANSITION_END);
184 },
185 isElement: function isElement(obj) {
186 return (obj[0] || obj).nodeType;
187 },
188 typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
189 for (var property in configTypes) {
190 if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
191 var expectedTypes = configTypes[property];
192 var value = config[property];
193 var valueType = value && Util.isElement(value) ? 'element' : toType(value);
194
195 if (!new RegExp(expectedTypes).test(valueType)) {
196 throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
197 }
198 }
199 }
200 },
201 findShadowRoot: function findShadowRoot(element) {
202 if (!document.documentElement.attachShadow) {
203 return null;
204 } // Can find the shadow root otherwise it'll return the document
90 205
91 // ALERT CLASS DEFINITION
92 // ======================
93 206
94 var dismiss = '[data-dismiss="alert"]' 207 if (typeof element.getRootNode === 'function') {
95 var Alert = function (el) { 208 var root = element.getRootNode();
96 $(el).on('click', dismiss, this.close) 209 return root instanceof ShadowRoot ? root : null;
97 } 210 }
98 211
99 Alert.VERSION = '3.3.7' 212 if (element instanceof ShadowRoot) {
213 return element;
214 } // when we don't find a shadow root
100 215
101 Alert.TRANSITION_DURATION = 150
102 216
103 Alert.prototype.close = function (e) { 217 if (!element.parentNode) {
104 var $this = $(this) 218 return null;
105 var selector = $this.attr('data-target') 219 }
106 220
107 if (!selector) { 221 return Util.findShadowRoot(element.parentNode);
108 selector = $this.attr('href')
109 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
110 } 222 }
223 };
224 setTransitionEndSupport();
225
226 /**
227 * ------------------------------------------------------------------------
228 * Constants
229 * ------------------------------------------------------------------------
230 */
231
232 var NAME = 'alert';
233 var VERSION = '4.3.1';
234 var DATA_KEY = 'bs.alert';
235 var EVENT_KEY = "." + DATA_KEY;
236 var DATA_API_KEY = '.data-api';
237 var JQUERY_NO_CONFLICT = $.fn[NAME];
238 var Selector = {
239 DISMISS: '[data-dismiss="alert"]'
240 };
241 var Event = {
242 CLOSE: "close" + EVENT_KEY,
243 CLOSED: "closed" + EVENT_KEY,
244 CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
245 };
246 var ClassName = {
247 ALERT: 'alert',
248 FADE: 'fade',
249 SHOW: 'show'
250 /**
251 * ------------------------------------------------------------------------
252 * Class Definition
253 * ------------------------------------------------------------------------
254 */
255
256 };
257
258 var Alert =
259 /*#__PURE__*/
260 function () {
261 function Alert(element) {
262 this._element = element;
263 } // Getters
264
265
266 var _proto = Alert.prototype;
267
268 // Public
269 _proto.close = function close(element) {
270 var rootElement = this._element;
271
272 if (element) {
273 rootElement = this._getRootElement(element);
274 }
111 275
112 var $parent = $(selector === '#' ? [] : selector) 276 var customEvent = this._triggerCloseEvent(rootElement);
113 277
114 if (e) e.preventDefault() 278 if (customEvent.isDefaultPrevented()) {
279 return;
280 }
115 281
116 if (!$parent.length) { 282 this._removeElement(rootElement);
117 $parent = $this.closest('.alert') 283 };
118 }
119 284
120 $parent.trigger(e = $.Event('close.bs.alert')) 285 _proto.dispose = function dispose() {
286 $.removeData(this._element, DATA_KEY);
287 this._element = null;
288 } // Private
289 ;
121 290
122 if (e.isDefaultPrevented()) return 291 _proto._getRootElement = function _getRootElement(element) {
292 var selector = Util.getSelectorFromElement(element);
293 var parent = false;
123 294
124 $parent.removeClass('in') 295 if (selector) {
296 parent = document.querySelector(selector);
297 }
125 298
126 function removeElement() { 299 if (!parent) {
127 // detach from parent, fire event then clean up data 300 parent = $(element).closest("." + ClassName.ALERT)[0];
128 $parent.detach().trigger('closed.bs.alert').remove() 301 }
129 }
130 302
131 $.support.transition && $parent.hasClass('fade') ? 303 return parent;
132 $parent 304 };
133 .one('bsTransitionEnd', removeElement)
134 .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
135 removeElement()
136 }
137 305
306 _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
307 var closeEvent = $.Event(Event.CLOSE);
308 $(element).trigger(closeEvent);
309 return closeEvent;
310 };
138 311
139 // ALERT PLUGIN DEFINITION 312 _proto._removeElement = function _removeElement(element) {
140 // ======================= 313 var _this = this;
141 314
142 function Plugin(option) { 315 $(element).removeClass(ClassName.SHOW);
143 return this.each(function () {
144 var $this = $(this)
145 var data = $this.data('bs.alert')
146 316
147 if (!data) $this.data('bs.alert', (data = new Alert(this))) 317 if (!$(element).hasClass(ClassName.FADE)) {
148 if (typeof option == 'string') data[option].call($this) 318 this._destroyElement(element);
149 })
150 }
151 319
152 var old = $.fn.alert 320 return;
321 }
153 322
154 $.fn.alert = Plugin 323 var transitionDuration = Util.getTransitionDurationFromElement(element);
155 $.fn.alert.Constructor = Alert 324 $(element).one(Util.TRANSITION_END, function (event) {
325 return _this._destroyElement(element, event);
326 }).emulateTransitionEnd(transitionDuration);
327 };
328
329 _proto._destroyElement = function _destroyElement(element) {
330 $(element).detach().trigger(Event.CLOSED).remove();
331 } // Static
332 ;
333
334 Alert._jQueryInterface = function _jQueryInterface(config) {
335 return this.each(function () {
336 var $element = $(this);
337 var data = $element.data(DATA_KEY);
338
339 if (!data) {
340 data = new Alert(this);
341 $element.data(DATA_KEY, data);
342 }
156 343
344 if (config === 'close') {
345 data[config](this);
346 }
347 });
348 };
157 349
158 // ALERT NO CONFLICT 350 Alert._handleDismiss = function _handleDismiss(alertInstance) {
159 // ================= 351 return function (event) {
352 if (event) {
353 event.preventDefault();
354 }
160 355
161 $.fn.alert.noConflict = function () { 356 alertInstance.close(this);
162 $.fn.alert = old 357 };
163 return this 358 };
164 }
165 359
360 _createClass(Alert, null, [{
361 key: "VERSION",
362 get: function get() {
363 return VERSION;
364 }
365 }]);
366
367 return Alert;
368 }();
369 /**
370 * ------------------------------------------------------------------------
371 * Data Api implementation
372 * ------------------------------------------------------------------------
373 */
374
375
376 $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
377 /**
378 * ------------------------------------------------------------------------
379 * jQuery
380 * ------------------------------------------------------------------------
381 */
382
383 $.fn[NAME] = Alert._jQueryInterface;
384 $.fn[NAME].Constructor = Alert;
385
386 $.fn[NAME].noConflict = function () {
387 $.fn[NAME] = JQUERY_NO_CONFLICT;
388 return Alert._jQueryInterface;
389 };
390
391 /**
392 * ------------------------------------------------------------------------
393 * Constants
394 * ------------------------------------------------------------------------
395 */
396
397 var NAME$1 = 'button';
398 var VERSION$1 = '4.3.1';
399 var DATA_KEY$1 = 'bs.button';
400 var EVENT_KEY$1 = "." + DATA_KEY$1;
401 var DATA_API_KEY$1 = '.data-api';
402 var JQUERY_NO_CONFLICT$1 = $.fn[NAME$1];
403 var ClassName$1 = {
404 ACTIVE: 'active',
405 BUTTON: 'btn',
406 FOCUS: 'focus'
407 };
408 var Selector$1 = {
409 DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
410 DATA_TOGGLE: '[data-toggle="buttons"]',
411 INPUT: 'input:not([type="hidden"])',
412 ACTIVE: '.active',
413 BUTTON: '.btn'
414 };
415 var Event$1 = {
416 CLICK_DATA_API: "click" + EVENT_KEY$1 + DATA_API_KEY$1,
417 FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY$1 + DATA_API_KEY$1 + " " + ("blur" + EVENT_KEY$1 + DATA_API_KEY$1)
418 /**
419 * ------------------------------------------------------------------------
420 * Class Definition
421 * ------------------------------------------------------------------------
422 */
423
424 };
425
426 var Button =
427 /*#__PURE__*/
428 function () {
429 function Button(element) {
430 this._element = element;
431 } // Getters
432
433
434 var _proto = Button.prototype;
435
436 // Public
437 _proto.toggle = function toggle() {
438 var triggerChangeEvent = true;
439 var addAriaPressed = true;
440 var rootElement = $(this._element).closest(Selector$1.DATA_TOGGLE)[0];
441
442 if (rootElement) {
443 var input = this._element.querySelector(Selector$1.INPUT);
444
445 if (input) {
446 if (input.type === 'radio') {
447 if (input.checked && this._element.classList.contains(ClassName$1.ACTIVE)) {
448 triggerChangeEvent = false;
449 } else {
450 var activeElement = rootElement.querySelector(Selector$1.ACTIVE);
451
452 if (activeElement) {
453 $(activeElement).removeClass(ClassName$1.ACTIVE);
454 }
455 }
456 }
457
458 if (triggerChangeEvent) {
459 if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
460 return;
461 }
462
463 input.checked = !this._element.classList.contains(ClassName$1.ACTIVE);
464 $(input).trigger('change');
465 }
466
467 input.focus();
468 addAriaPressed = false;
469 }
470 }
166 471
167 // ALERT DATA-API 472 if (addAriaPressed) {
168 // ============== 473 this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName$1.ACTIVE));
474 }
169 475
170 $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) 476 if (triggerChangeEvent) {
477 $(this._element).toggleClass(ClassName$1.ACTIVE);
478 }
479 };
171 480
172}(jQuery); 481 _proto.dispose = function dispose() {
482 $.removeData(this._element, DATA_KEY$1);
483 this._element = null;
484 } // Static
485 ;
173 486
174/* ======================================================================== 487 Button._jQueryInterface = function _jQueryInterface(config) {
175 * Bootstrap: button.js v3.3.7 488 return this.each(function () {
176 * http://getbootstrap.com/javascript/#buttons 489 var data = $(this).data(DATA_KEY$1);
177 * ========================================================================
178 * Copyright 2011-2016 Twitter, Inc.
179 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
180 * ======================================================================== */
181 490
491 if (!data) {
492 data = new Button(this);
493 $(this).data(DATA_KEY$1, data);
494 }
182 495
183+function ($) { 496 if (config === 'toggle') {
184 'use strict'; 497 data[config]();
498 }
499 });
500 };
185 501
186 // BUTTON PUBLIC CLASS DEFINITION 502 _createClass(Button, null, [{
187 // ============================== 503 key: "VERSION",
504 get: function get() {
505 return VERSION$1;
506 }
507 }]);
188 508
189 var Button = function (element, options) { 509 return Button;
190 this.$element = $(element) 510 }();
191 this.options = $.extend({}, Button.DEFAULTS, options) 511 /**
192 this.isLoading = false 512 * ------------------------------------------------------------------------
193 } 513 * Data Api implementation
514 * ------------------------------------------------------------------------
515 */
194 516
195 Button.VERSION = '3.3.7'
196 517
197 Button.DEFAULTS = { 518 $(document).on(Event$1.CLICK_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
198 loadingText: 'loading...' 519 event.preventDefault();
199 } 520 var button = event.target;
200 521
201 Button.prototype.setState = function (state) { 522 if (!$(button).hasClass(ClassName$1.BUTTON)) {
202 var d = 'disabled' 523 button = $(button).closest(Selector$1.BUTTON);
203 var $el = this.$element 524 }
204 var val = $el.is('input') ? 'val' : 'html'
205 var data = $el.data()
206 525
207 state += 'Text' 526 Button._jQueryInterface.call($(button), 'toggle');
527 }).on(Event$1.FOCUS_BLUR_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
528 var button = $(event.target).closest(Selector$1.BUTTON)[0];
529 $(button).toggleClass(ClassName$1.FOCUS, /^focus(in)?$/.test(event.type));
530 });
531 /**
532 * ------------------------------------------------------------------------
533 * jQuery
534 * ------------------------------------------------------------------------
535 */
536
537 $.fn[NAME$1] = Button._jQueryInterface;
538 $.fn[NAME$1].Constructor = Button;
539
540 $.fn[NAME$1].noConflict = function () {
541 $.fn[NAME$1] = JQUERY_NO_CONFLICT$1;
542 return Button._jQueryInterface;
543 };
544
545 /**
546 * ------------------------------------------------------------------------
547 * Constants
548 * ------------------------------------------------------------------------
549 */
550
551 var NAME$2 = 'carousel';
552 var VERSION$2 = '4.3.1';
553 var DATA_KEY$2 = 'bs.carousel';
554 var EVENT_KEY$2 = "." + DATA_KEY$2;
555 var DATA_API_KEY$2 = '.data-api';
556 var JQUERY_NO_CONFLICT$2 = $.fn[NAME$2];
557 var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
558
559 var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
560
561 var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
562
563 var SWIPE_THRESHOLD = 40;
564 var Default = {
565 interval: 5000,
566 keyboard: true,
567 slide: false,
568 pause: 'hover',
569 wrap: true,
570 touch: true
571 };
572 var DefaultType = {
573 interval: '(number|boolean)',
574 keyboard: 'boolean',
575 slide: '(boolean|string)',
576 pause: '(string|boolean)',
577 wrap: 'boolean',
578 touch: 'boolean'
579 };
580 var Direction = {
581 NEXT: 'next',
582 PREV: 'prev',
583 LEFT: 'left',
584 RIGHT: 'right'
585 };
586 var Event$2 = {
587 SLIDE: "slide" + EVENT_KEY$2,
588 SLID: "slid" + EVENT_KEY$2,
589 KEYDOWN: "keydown" + EVENT_KEY$2,
590 MOUSEENTER: "mouseenter" + EVENT_KEY$2,
591 MOUSELEAVE: "mouseleave" + EVENT_KEY$2,
592 TOUCHSTART: "touchstart" + EVENT_KEY$2,
593 TOUCHMOVE: "touchmove" + EVENT_KEY$2,
594 TOUCHEND: "touchend" + EVENT_KEY$2,
595 POINTERDOWN: "pointerdown" + EVENT_KEY$2,
596 POINTERUP: "pointerup" + EVENT_KEY$2,
597 DRAG_START: "dragstart" + EVENT_KEY$2,
598 LOAD_DATA_API: "load" + EVENT_KEY$2 + DATA_API_KEY$2,
599 CLICK_DATA_API: "click" + EVENT_KEY$2 + DATA_API_KEY$2
600 };
601 var ClassName$2 = {
602 CAROUSEL: 'carousel',
603 ACTIVE: 'active',
604 SLIDE: 'slide',
605 RIGHT: 'carousel-item-right',
606 LEFT: 'carousel-item-left',
607 NEXT: 'carousel-item-next',
608 PREV: 'carousel-item-prev',
609 ITEM: 'carousel-item',
610 POINTER_EVENT: 'pointer-event'
611 };
612 var Selector$2 = {
613 ACTIVE: '.active',
614 ACTIVE_ITEM: '.active.carousel-item',
615 ITEM: '.carousel-item',
616 ITEM_IMG: '.carousel-item img',
617 NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
618 INDICATORS: '.carousel-indicators',
619 DATA_SLIDE: '[data-slide], [data-slide-to]',
620 DATA_RIDE: '[data-ride="carousel"]'
621 };
622 var PointerType = {
623 TOUCH: 'touch',
624 PEN: 'pen'
625 /**
626 * ------------------------------------------------------------------------
627 * Class Definition
628 * ------------------------------------------------------------------------
629 */
630
631 };
632
633 var Carousel =
634 /*#__PURE__*/
635 function () {
636 function Carousel(element, config) {
637 this._items = null;
638 this._interval = null;
639 this._activeElement = null;
640 this._isPaused = false;
641 this._isSliding = false;
642 this.touchTimeout = null;
643 this.touchStartX = 0;
644 this.touchDeltaX = 0;
645 this._config = this._getConfig(config);
646 this._element = element;
647 this._indicatorsElement = this._element.querySelector(Selector$2.INDICATORS);
648 this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
649 this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
650
651 this._addEventListeners();
652 } // Getters
653
654
655 var _proto = Carousel.prototype;
656
657 // Public
658 _proto.next = function next() {
659 if (!this._isSliding) {
660 this._slide(Direction.NEXT);
661 }
662 };
208 663
209 if (data.resetText == null) $el.data('resetText', $el[val]()) 664 _proto.nextWhenVisible = function nextWhenVisible() {
665 // Don't call next when the page isn't visible
666 // or the carousel or its parent isn't visible
667 if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') {
668 this.next();
669 }
670 };
210 671
211 // push to event loop to allow forms to submit 672 _proto.prev = function prev() {
212 setTimeout($.proxy(function () { 673 if (!this._isSliding) {
213 $el[val](data[state] == null ? this.options[state] : data[state]) 674 this._slide(Direction.PREV);
675 }
676 };
214 677
215 if (state == 'loadingText') { 678 _proto.pause = function pause(event) {
216 this.isLoading = true 679 if (!event) {
217 $el.addClass(d).attr(d, d).prop(d, true) 680 this._isPaused = true;
218 } else if (this.isLoading) {
219 this.isLoading = false
220 $el.removeClass(d).removeAttr(d).prop(d, false)
221 } 681 }
222 }, this), 0)
223 }
224 682
225 Button.prototype.toggle = function () { 683 if (this._element.querySelector(Selector$2.NEXT_PREV)) {
226 var changed = true 684 Util.triggerTransitionEnd(this._element);
227 var $parent = this.$element.closest('[data-toggle="buttons"]') 685 this.cycle(true);
228 686 }
229 if ($parent.length) {
230 var $input = this.$element.find('input')
231 if ($input.prop('type') == 'radio') {
232 if ($input.prop('checked')) changed = false
233 $parent.find('.active').removeClass('active')
234 this.$element.addClass('active')
235 } else if ($input.prop('type') == 'checkbox') {
236 if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
237 this.$element.toggleClass('active')
238 }
239 $input.prop('checked', this.$element.hasClass('active'))
240 if (changed) $input.trigger('change')
241 } else {
242 this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
243 this.$element.toggleClass('active')
244 }
245 }
246 687
688 clearInterval(this._interval);
689 this._interval = null;
690 };
247 691
248 // BUTTON PLUGIN DEFINITION 692 _proto.cycle = function cycle(event) {
249 // ======================== 693 if (!event) {
694 this._isPaused = false;
695 }
250 696
251 function Plugin(option) { 697 if (this._interval) {
252 return this.each(function () { 698 clearInterval(this._interval);
253 var $this = $(this) 699 this._interval = null;
254 var data = $this.data('bs.button') 700 }
255 var options = typeof option == 'object' && option
256 701
257 if (!data) $this.data('bs.button', (data = new Button(this, options))) 702 if (this._config.interval && !this._isPaused) {
703 this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
704 }
705 };
258 706
259 if (option == 'toggle') data.toggle() 707 _proto.to = function to(index) {
260 else if (option) data.setState(option) 708 var _this = this;
261 })
262 }
263 709
264 var old = $.fn.button 710 this._activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM);
265 711
266 $.fn.button = Plugin 712 var activeIndex = this._getItemIndex(this._activeElement);
267 $.fn.button.Constructor = Button
268 713
714 if (index > this._items.length - 1 || index < 0) {
715 return;
716 }
269 717
270 // BUTTON NO CONFLICT 718 if (this._isSliding) {
271 // ================== 719 $(this._element).one(Event$2.SLID, function () {
720 return _this.to(index);
721 });
722 return;
723 }
272 724
273 $.fn.button.noConflict = function () { 725 if (activeIndex === index) {
274 $.fn.button = old 726 this.pause();
275 return this 727 this.cycle();
276 } 728 return;
729 }
277 730
731 var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
732
733 this._slide(direction, this._items[index]);
734 };
735
736 _proto.dispose = function dispose() {
737 $(this._element).off(EVENT_KEY$2);
738 $.removeData(this._element, DATA_KEY$2);
739 this._items = null;
740 this._config = null;
741 this._element = null;
742 this._interval = null;
743 this._isPaused = null;
744 this._isSliding = null;
745 this._activeElement = null;
746 this._indicatorsElement = null;
747 } // Private
748 ;
749
750 _proto._getConfig = function _getConfig(config) {
751 config = _objectSpread({}, Default, config);
752 Util.typeCheckConfig(NAME$2, config, DefaultType);
753 return config;
754 };
755
756 _proto._handleSwipe = function _handleSwipe() {
757 var absDeltax = Math.abs(this.touchDeltaX);
758
759 if (absDeltax <= SWIPE_THRESHOLD) {
760 return;
761 }
278 762
279 // BUTTON DATA-API 763 var direction = absDeltax / this.touchDeltaX; // swipe left
280 // ===============
281
282 $(document)
283 .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
284 var $btn = $(e.target).closest('.btn')
285 Plugin.call($btn, 'toggle')
286 if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
287 // Prevent double click on radios, and the double selections (so cancellation) on checkboxes
288 e.preventDefault()
289 // The target component still receive the focus
290 if ($btn.is('input,button')) $btn.trigger('focus')
291 else $btn.find('input:visible,button:visible').first().trigger('focus')
292 }
293 })
294 .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
295 $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
296 })
297
298}(jQuery);
299
300/* ========================================================================
301 * Bootstrap: carousel.js v3.3.7
302 * http://getbootstrap.com/javascript/#carousel
303 * ========================================================================
304 * Copyright 2011-2016 Twitter, Inc.
305 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
306 * ======================================================================== */
307
308
309+function ($) {
310 'use strict';
311
312 // CAROUSEL CLASS DEFINITION
313 // =========================
314
315 var Carousel = function (element, options) {
316 this.$element = $(element)
317 this.$indicators = this.$element.find('.carousel-indicators')
318 this.options = options
319 this.paused = null
320 this.sliding = null
321 this.interval = null
322 this.$active = null
323 this.$items = null
324
325 this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
326
327 this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
328 .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
329 .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
330 }
331 764
332 Carousel.VERSION = '3.3.7' 765 if (direction > 0) {
766 this.prev();
767 } // swipe right
333 768
334 Carousel.TRANSITION_DURATION = 600
335 769
336 Carousel.DEFAULTS = { 770 if (direction < 0) {
337 interval: 5000, 771 this.next();
338 pause: 'hover', 772 }
339 wrap: true, 773 };
340 keyboard: true
341 }
342 774
343 Carousel.prototype.keydown = function (e) { 775 _proto._addEventListeners = function _addEventListeners() {
344 if (/input|textarea/i.test(e.target.tagName)) return 776 var _this2 = this;
345 switch (e.which) {
346 case 37: this.prev(); break
347 case 39: this.next(); break
348 default: return
349 }
350 777
351 e.preventDefault() 778 if (this._config.keyboard) {
352 } 779 $(this._element).on(Event$2.KEYDOWN, function (event) {
780 return _this2._keydown(event);
781 });
782 }
353 783
354 Carousel.prototype.cycle = function (e) { 784 if (this._config.pause === 'hover') {
355 e || (this.paused = false) 785 $(this._element).on(Event$2.MOUSEENTER, function (event) {
786 return _this2.pause(event);
787 }).on(Event$2.MOUSELEAVE, function (event) {
788 return _this2.cycle(event);
789 });
790 }
356 791
357 this.interval && clearInterval(this.interval) 792 if (this._config.touch) {
793 this._addTouchEventListeners();
794 }
795 };
358 796
359 this.options.interval 797 _proto._addTouchEventListeners = function _addTouchEventListeners() {
360 && !this.paused 798 var _this3 = this;
361 && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
362 799
363 return this 800 if (!this._touchSupported) {
364 } 801 return;
802 }
365 803
366 Carousel.prototype.getItemIndex = function (item) { 804 var start = function start(event) {
367 this.$items = item.parent().children('.item') 805 if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
368 return this.$items.index(item || this.$active) 806 _this3.touchStartX = event.originalEvent.clientX;
369 } 807 } else if (!_this3._pointerEvent) {
808 _this3.touchStartX = event.originalEvent.touches[0].clientX;
809 }
810 };
811
812 var move = function move(event) {
813 // ensure swiping with one touch and not pinching
814 if (event.originalEvent.touches && event.originalEvent.touches.length > 1) {
815 _this3.touchDeltaX = 0;
816 } else {
817 _this3.touchDeltaX = event.originalEvent.touches[0].clientX - _this3.touchStartX;
818 }
819 };
370 820
371 Carousel.prototype.getItemForDirection = function (direction, active) { 821 var end = function end(event) {
372 var activeIndex = this.getItemIndex(active) 822 if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) {
373 var willWrap = (direction == 'prev' && activeIndex === 0) 823 _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX;
374 || (direction == 'next' && activeIndex == (this.$items.length - 1)) 824 }
375 if (willWrap && !this.options.wrap) return active
376 var delta = direction == 'prev' ? -1 : 1
377 var itemIndex = (activeIndex + delta) % this.$items.length
378 return this.$items.eq(itemIndex)
379 }
380 825
381 Carousel.prototype.to = function (pos) { 826 _this3._handleSwipe();
382 var that = this 827
383 var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) 828 if (_this3._config.pause === 'hover') {
829 // If it's a touch-enabled device, mouseenter/leave are fired as
830 // part of the mouse compatibility events on first tap - the carousel
831 // would stop cycling until user tapped out of it;
832 // here, we listen for touchend, explicitly pause the carousel
833 // (as if it's the second time we tap on it, mouseenter compat event
834 // is NOT fired) and after a timeout (to allow for mouse compatibility
835 // events to fire) we explicitly restart cycling
836 _this3.pause();
837
838 if (_this3.touchTimeout) {
839 clearTimeout(_this3.touchTimeout);
840 }
841
842 _this3.touchTimeout = setTimeout(function (event) {
843 return _this3.cycle(event);
844 }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval);
845 }
846 };
384 847
385 if (pos > (this.$items.length - 1) || pos < 0) return 848 $(this._element.querySelectorAll(Selector$2.ITEM_IMG)).on(Event$2.DRAG_START, function (e) {
849 return e.preventDefault();
850 });
386 851
387 if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" 852 if (this._pointerEvent) {
388 if (activeIndex == pos) return this.pause().cycle() 853 $(this._element).on(Event$2.POINTERDOWN, function (event) {
854 return start(event);
855 });
856 $(this._element).on(Event$2.POINTERUP, function (event) {
857 return end(event);
858 });
389 859
390 return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) 860 this._element.classList.add(ClassName$2.POINTER_EVENT);
391 } 861 } else {
862 $(this._element).on(Event$2.TOUCHSTART, function (event) {
863 return start(event);
864 });
865 $(this._element).on(Event$2.TOUCHMOVE, function (event) {
866 return move(event);
867 });
868 $(this._element).on(Event$2.TOUCHEND, function (event) {
869 return end(event);
870 });
871 }
872 };
392 873
393 Carousel.prototype.pause = function (e) { 874 _proto._keydown = function _keydown(event) {
394 e || (this.paused = true) 875 if (/input|textarea/i.test(event.target.tagName)) {
876 return;
877 }
395 878
396 if (this.$element.find('.next, .prev').length && $.support.transition) { 879 switch (event.which) {
397 this.$element.trigger($.support.transition.end) 880 case ARROW_LEFT_KEYCODE:
398 this.cycle(true) 881 event.preventDefault();
399 } 882 this.prev();
883 break;
400 884
401 this.interval = clearInterval(this.interval) 885 case ARROW_RIGHT_KEYCODE:
886 event.preventDefault();
887 this.next();
888 break;
402 889
403 return this 890 default:
404 } 891 }
892 };
405 893
406 Carousel.prototype.next = function () { 894 _proto._getItemIndex = function _getItemIndex(element) {
407 if (this.sliding) return 895 this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector$2.ITEM)) : [];
408 return this.slide('next') 896 return this._items.indexOf(element);
409 } 897 };
410 898
411 Carousel.prototype.prev = function () { 899 _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
412 if (this.sliding) return 900 var isNextDirection = direction === Direction.NEXT;
413 return this.slide('prev') 901 var isPrevDirection = direction === Direction.PREV;
414 }
415 902
416 Carousel.prototype.slide = function (type, next) { 903 var activeIndex = this._getItemIndex(activeElement);
417 var $active = this.$element.find('.item.active')
418 var $next = next || this.getItemForDirection(type, $active)
419 var isCycling = this.interval
420 var direction = type == 'next' ? 'left' : 'right'
421 var that = this
422 904
423 if ($next.hasClass('active')) return (this.sliding = false) 905 var lastItemIndex = this._items.length - 1;
906 var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
424 907
425 var relatedTarget = $next[0] 908 if (isGoingToWrap && !this._config.wrap) {
426 var slideEvent = $.Event('slide.bs.carousel', { 909 return activeElement;
427 relatedTarget: relatedTarget, 910 }
428 direction: direction
429 })
430 this.$element.trigger(slideEvent)
431 if (slideEvent.isDefaultPrevented()) return
432 911
433 this.sliding = true 912 var delta = direction === Direction.PREV ? -1 : 1;
913 var itemIndex = (activeIndex + delta) % this._items.length;
914 return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
915 };
434 916
435 isCycling && this.pause() 917 _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
918 var targetIndex = this._getItemIndex(relatedTarget);
436 919
437 if (this.$indicators.length) { 920 var fromIndex = this._getItemIndex(this._element.querySelector(Selector$2.ACTIVE_ITEM));
438 this.$indicators.find('.active').removeClass('active')
439 var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
440 $nextIndicator && $nextIndicator.addClass('active')
441 }
442 921
443 var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" 922 var slideEvent = $.Event(Event$2.SLIDE, {
444 if ($.support.transition && this.$element.hasClass('slide')) { 923 relatedTarget: relatedTarget,
445 $next.addClass(type) 924 direction: eventDirectionName,
446 $next[0].offsetWidth // force reflow 925 from: fromIndex,
447 $active.addClass(direction) 926 to: targetIndex
448 $next.addClass(direction) 927 });
449 $active 928 $(this._element).trigger(slideEvent);
450 .one('bsTransitionEnd', function () { 929 return slideEvent;
451 $next.removeClass([type, direction].join(' ')).addClass('active') 930 };
452 $active.removeClass(['active', direction].join(' '))
453 that.sliding = false
454 setTimeout(function () {
455 that.$element.trigger(slidEvent)
456 }, 0)
457 })
458 .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
459 } else {
460 $active.removeClass('active')
461 $next.addClass('active')
462 this.sliding = false
463 this.$element.trigger(slidEvent)
464 }
465 931
466 isCycling && this.cycle() 932 _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
933 if (this._indicatorsElement) {
934 var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector$2.ACTIVE));
935 $(indicators).removeClass(ClassName$2.ACTIVE);
467 936
468 return this 937 var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
469 }
470 938
939 if (nextIndicator) {
940 $(nextIndicator).addClass(ClassName$2.ACTIVE);
941 }
942 }
943 };
471 944
472 // CAROUSEL PLUGIN DEFINITION 945 _proto._slide = function _slide(direction, element) {
473 // ========================== 946 var _this4 = this;
474 947
475 function Plugin(option) { 948 var activeElement = this._element.querySelector(Selector$2.ACTIVE_ITEM);
476 return this.each(function () {
477 var $this = $(this)
478 var data = $this.data('bs.carousel')
479 var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
480 var action = typeof option == 'string' ? option : options.slide
481 949
482 if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) 950 var activeElementIndex = this._getItemIndex(activeElement);
483 if (typeof option == 'number') data.to(option)
484 else if (action) data[action]()
485 else if (options.interval) data.pause().cycle()
486 })
487 }
488 951
489 var old = $.fn.carousel 952 var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
490 953
491 $.fn.carousel = Plugin 954 var nextElementIndex = this._getItemIndex(nextElement);
492 $.fn.carousel.Constructor = Carousel
493 955
956 var isCycling = Boolean(this._interval);
957 var directionalClassName;
958 var orderClassName;
959 var eventDirectionName;
494 960
495 // CAROUSEL NO CONFLICT 961 if (direction === Direction.NEXT) {
496 // ==================== 962 directionalClassName = ClassName$2.LEFT;
963 orderClassName = ClassName$2.NEXT;
964 eventDirectionName = Direction.LEFT;
965 } else {
966 directionalClassName = ClassName$2.RIGHT;
967 orderClassName = ClassName$2.PREV;
968 eventDirectionName = Direction.RIGHT;
969 }
497 970
498 $.fn.carousel.noConflict = function () { 971 if (nextElement && $(nextElement).hasClass(ClassName$2.ACTIVE)) {
499 $.fn.carousel = old 972 this._isSliding = false;
500 return this 973 return;
501 } 974 }
502 975
976 var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
503 977
504 // CAROUSEL DATA-API 978 if (slideEvent.isDefaultPrevented()) {
505 // ================= 979 return;
980 }
506 981
507 var clickHandler = function (e) { 982 if (!activeElement || !nextElement) {
508 var href 983 // Some weirdness is happening, so we bail
509 var $this = $(this) 984 return;
510 var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 985 }
511 if (!$target.hasClass('carousel')) return
512 var options = $.extend({}, $target.data(), $this.data())
513 var slideIndex = $this.attr('data-slide-to')
514 if (slideIndex) options.interval = false
515 986
516 Plugin.call($target, options) 987 this._isSliding = true;
517 988
518 if (slideIndex) { 989 if (isCycling) {
519 $target.data('bs.carousel').to(slideIndex) 990 this.pause();
520 } 991 }
521 992
522 e.preventDefault() 993 this._setActiveIndicatorElement(nextElement);
523 } 994
995 var slidEvent = $.Event(Event$2.SLID, {
996 relatedTarget: nextElement,
997 direction: eventDirectionName,
998 from: activeElementIndex,
999 to: nextElementIndex
1000 });
1001
1002 if ($(this._element).hasClass(ClassName$2.SLIDE)) {
1003 $(nextElement).addClass(orderClassName);
1004 Util.reflow(nextElement);
1005 $(activeElement).addClass(directionalClassName);
1006 $(nextElement).addClass(directionalClassName);
1007 var nextElementInterval = parseInt(nextElement.getAttribute('data-interval'), 10);
1008
1009 if (nextElementInterval) {
1010 this._config.defaultInterval = this._config.defaultInterval || this._config.interval;
1011 this._config.interval = nextElementInterval;
1012 } else {
1013 this._config.interval = this._config.defaultInterval || this._config.interval;
1014 }
524 1015
525 $(document) 1016 var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
526 .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) 1017 $(activeElement).one(Util.TRANSITION_END, function () {
527 .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) 1018 $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName$2.ACTIVE);
1019 $(activeElement).removeClass(ClassName$2.ACTIVE + " " + orderClassName + " " + directionalClassName);
1020 _this4._isSliding = false;
1021 setTimeout(function () {
1022 return $(_this4._element).trigger(slidEvent);
1023 }, 0);
1024 }).emulateTransitionEnd(transitionDuration);
1025 } else {
1026 $(activeElement).removeClass(ClassName$2.ACTIVE);
1027 $(nextElement).addClass(ClassName$2.ACTIVE);
1028 this._isSliding = false;
1029 $(this._element).trigger(slidEvent);
1030 }
528 1031
529 $(window).on('load', function () { 1032 if (isCycling) {
530 $('[data-ride="carousel"]').each(function () { 1033 this.cycle();
531 var $carousel = $(this) 1034 }
532 Plugin.call($carousel, $carousel.data()) 1035 } // Static
533 }) 1036 ;
534 })
535 1037
536}(jQuery); 1038 Carousel._jQueryInterface = function _jQueryInterface(config) {
1039 return this.each(function () {
1040 var data = $(this).data(DATA_KEY$2);
537 1041
538/* ======================================================================== 1042 var _config = _objectSpread({}, Default, $(this).data());
539 * Bootstrap: collapse.js v3.3.7
540 * http://getbootstrap.com/javascript/#collapse
541 * ========================================================================
542 * Copyright 2011-2016 Twitter, Inc.
543 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
544 * ======================================================================== */
545 1043
546/* jshint latedef: false */ 1044 if (typeof config === 'object') {
1045 _config = _objectSpread({}, _config, config);
1046 }
547 1047
548+function ($) { 1048 var action = typeof config === 'string' ? config : _config.slide;
549 'use strict';
550 1049
551 // COLLAPSE PUBLIC CLASS DEFINITION 1050 if (!data) {
552 // ================================ 1051 data = new Carousel(this, _config);
1052 $(this).data(DATA_KEY$2, data);
1053 }
553 1054
554 var Collapse = function (element, options) { 1055 if (typeof config === 'number') {
555 this.$element = $(element) 1056 data.to(config);
556 this.options = $.extend({}, Collapse.DEFAULTS, options) 1057 } else if (typeof action === 'string') {
557 this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + 1058 if (typeof data[action] === 'undefined') {
558 '[data-toggle="collapse"][data-target="#' + element.id + '"]') 1059 throw new TypeError("No method named \"" + action + "\"");
559 this.transitioning = null 1060 }
1061
1062 data[action]();
1063 } else if (_config.interval && _config.ride) {
1064 data.pause();
1065 data.cycle();
1066 }
1067 });
1068 };
560 1069
561 if (this.options.parent) { 1070 Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
562 this.$parent = this.getParent() 1071 var selector = Util.getSelectorFromElement(this);
563 } else {
564 this.addAriaAndCollapsedClass(this.$element, this.$trigger)
565 }
566 1072
567 if (this.options.toggle) this.toggle() 1073 if (!selector) {
568 } 1074 return;
1075 }
569 1076
570 Collapse.VERSION = '3.3.7' 1077 var target = $(selector)[0];
571 1078
572 Collapse.TRANSITION_DURATION = 350 1079 if (!target || !$(target).hasClass(ClassName$2.CAROUSEL)) {
1080 return;
1081 }
573 1082
574 Collapse.DEFAULTS = { 1083 var config = _objectSpread({}, $(target).data(), $(this).data());
575 toggle: true
576 }
577 1084
578 Collapse.prototype.dimension = function () { 1085 var slideIndex = this.getAttribute('data-slide-to');
579 var hasWidth = this.$element.hasClass('width')
580 return hasWidth ? 'width' : 'height'
581 }
582 1086
583 Collapse.prototype.show = function () { 1087 if (slideIndex) {
584 if (this.transitioning || this.$element.hasClass('in')) return 1088 config.interval = false;
1089 }
585 1090
586 var activesData 1091 Carousel._jQueryInterface.call($(target), config);
587 var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
588 1092
589 if (actives && actives.length) { 1093 if (slideIndex) {
590 activesData = actives.data('bs.collapse') 1094 $(target).data(DATA_KEY$2).to(slideIndex);
591 if (activesData && activesData.transitioning) return 1095 }
592 }
593 1096
594 var startEvent = $.Event('show.bs.collapse') 1097 event.preventDefault();
595 this.$element.trigger(startEvent) 1098 };
596 if (startEvent.isDefaultPrevented()) return
597 1099
598 if (actives && actives.length) { 1100 _createClass(Carousel, null, [{
599 Plugin.call(actives, 'hide') 1101 key: "VERSION",
600 activesData || actives.data('bs.collapse', null) 1102 get: function get() {
601 } 1103 return VERSION$2;
1104 }
1105 }, {
1106 key: "Default",
1107 get: function get() {
1108 return Default;
1109 }
1110 }]);
602 1111
603 var dimension = this.dimension() 1112 return Carousel;
1113 }();
1114 /**
1115 * ------------------------------------------------------------------------
1116 * Data Api implementation
1117 * ------------------------------------------------------------------------
1118 */
604 1119
605 this.$element
606 .removeClass('collapse')
607 .addClass('collapsing')[dimension](0)
608 .attr('aria-expanded', true)
609 1120
610 this.$trigger 1121 $(document).on(Event$2.CLICK_DATA_API, Selector$2.DATA_SLIDE, Carousel._dataApiClickHandler);
611 .removeClass('collapsed') 1122 $(window).on(Event$2.LOAD_DATA_API, function () {
612 .attr('aria-expanded', true) 1123 var carousels = [].slice.call(document.querySelectorAll(Selector$2.DATA_RIDE));
613 1124
614 this.transitioning = 1 1125 for (var i = 0, len = carousels.length; i < len; i++) {
1126 var $carousel = $(carousels[i]);
615 1127
616 var complete = function () { 1128 Carousel._jQueryInterface.call($carousel, $carousel.data());
617 this.$element
618 .removeClass('collapsing')
619 .addClass('collapse in')[dimension]('')
620 this.transitioning = 0
621 this.$element
622 .trigger('shown.bs.collapse')
623 } 1129 }
1130 });
1131 /**
1132 * ------------------------------------------------------------------------
1133 * jQuery
1134 * ------------------------------------------------------------------------
1135 */
1136
1137 $.fn[NAME$2] = Carousel._jQueryInterface;
1138 $.fn[NAME$2].Constructor = Carousel;
1139
1140 $.fn[NAME$2].noConflict = function () {
1141 $.fn[NAME$2] = JQUERY_NO_CONFLICT$2;
1142 return Carousel._jQueryInterface;
1143 };
1144
1145 /**
1146 * ------------------------------------------------------------------------
1147 * Constants
1148 * ------------------------------------------------------------------------
1149 */
1150
1151 var NAME$3 = 'collapse';
1152 var VERSION$3 = '4.3.1';
1153 var DATA_KEY$3 = 'bs.collapse';
1154 var EVENT_KEY$3 = "." + DATA_KEY$3;
1155 var DATA_API_KEY$3 = '.data-api';
1156 var JQUERY_NO_CONFLICT$3 = $.fn[NAME$3];
1157 var Default$1 = {
1158 toggle: true,
1159 parent: ''
1160 };
1161 var DefaultType$1 = {
1162 toggle: 'boolean',
1163 parent: '(string|element)'
1164 };
1165 var Event$3 = {
1166 SHOW: "show" + EVENT_KEY$3,
1167 SHOWN: "shown" + EVENT_KEY$3,
1168 HIDE: "hide" + EVENT_KEY$3,
1169 HIDDEN: "hidden" + EVENT_KEY$3,
1170 CLICK_DATA_API: "click" + EVENT_KEY$3 + DATA_API_KEY$3
1171 };
1172 var ClassName$3 = {
1173 SHOW: 'show',
1174 COLLAPSE: 'collapse',
1175 COLLAPSING: 'collapsing',
1176 COLLAPSED: 'collapsed'
1177 };
1178 var Dimension = {
1179 WIDTH: 'width',
1180 HEIGHT: 'height'
1181 };
1182 var Selector$3 = {
1183 ACTIVES: '.show, .collapsing',
1184 DATA_TOGGLE: '[data-toggle="collapse"]'
1185 /**
1186 * ------------------------------------------------------------------------
1187 * Class Definition
1188 * ------------------------------------------------------------------------
1189 */
1190
1191 };
1192
1193 var Collapse =
1194 /*#__PURE__*/
1195 function () {
1196 function Collapse(element, config) {
1197 this._isTransitioning = false;
1198 this._element = element;
1199 this._config = this._getConfig(config);
1200 this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
1201 var toggleList = [].slice.call(document.querySelectorAll(Selector$3.DATA_TOGGLE));
1202
1203 for (var i = 0, len = toggleList.length; i < len; i++) {
1204 var elem = toggleList[i];
1205 var selector = Util.getSelectorFromElement(elem);
1206 var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
1207 return foundElem === element;
1208 });
1209
1210 if (selector !== null && filterElement.length > 0) {
1211 this._selector = selector;
1212
1213 this._triggerArray.push(elem);
1214 }
1215 }
624 1216
625 if (!$.support.transition) return complete.call(this) 1217 this._parent = this._config.parent ? this._getParent() : null;
626 1218
627 var scrollSize = $.camelCase(['scroll', dimension].join('-')) 1219 if (!this._config.parent) {
1220 this._addAriaAndCollapsedClass(this._element, this._triggerArray);
1221 }
628 1222
629 this.$element 1223 if (this._config.toggle) {
630 .one('bsTransitionEnd', $.proxy(complete, this)) 1224 this.toggle();
631 .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) 1225 }
632 } 1226 } // Getters
633 1227
634 Collapse.prototype.hide = function () {
635 if (this.transitioning || !this.$element.hasClass('in')) return
636 1228
637 var startEvent = $.Event('hide.bs.collapse') 1229 var _proto = Collapse.prototype;
638 this.$element.trigger(startEvent)
639 if (startEvent.isDefaultPrevented()) return
640 1230
641 var dimension = this.dimension() 1231 // Public
1232 _proto.toggle = function toggle() {
1233 if ($(this._element).hasClass(ClassName$3.SHOW)) {
1234 this.hide();
1235 } else {
1236 this.show();
1237 }
1238 };
642 1239
643 this.$element[dimension](this.$element[dimension]())[0].offsetHeight 1240 _proto.show = function show() {
1241 var _this = this;
644 1242
645 this.$element 1243 if (this._isTransitioning || $(this._element).hasClass(ClassName$3.SHOW)) {
646 .addClass('collapsing') 1244 return;
647 .removeClass('collapse in') 1245 }
648 .attr('aria-expanded', false)
649 1246
650 this.$trigger 1247 var actives;
651 .addClass('collapsed') 1248 var activesData;
652 .attr('aria-expanded', false)
653 1249
654 this.transitioning = 1 1250 if (this._parent) {
1251 actives = [].slice.call(this._parent.querySelectorAll(Selector$3.ACTIVES)).filter(function (elem) {
1252 if (typeof _this._config.parent === 'string') {
1253 return elem.getAttribute('data-parent') === _this._config.parent;
1254 }
655 1255
656 var complete = function () { 1256 return elem.classList.contains(ClassName$3.COLLAPSE);
657 this.transitioning = 0 1257 });
658 this.$element
659 .removeClass('collapsing')
660 .addClass('collapse')
661 .trigger('hidden.bs.collapse')
662 }
663 1258
664 if (!$.support.transition) return complete.call(this) 1259 if (actives.length === 0) {
1260 actives = null;
1261 }
1262 }
665 1263
666 this.$element 1264 if (actives) {
667 [dimension](0) 1265 activesData = $(actives).not(this._selector).data(DATA_KEY$3);
668 .one('bsTransitionEnd', $.proxy(complete, this))
669 .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
670 }
671 1266
672 Collapse.prototype.toggle = function () { 1267 if (activesData && activesData._isTransitioning) {
673 this[this.$element.hasClass('in') ? 'hide' : 'show']() 1268 return;
674 } 1269 }
1270 }
675 1271
676 Collapse.prototype.getParent = function () { 1272 var startEvent = $.Event(Event$3.SHOW);
677 return $(this.options.parent) 1273 $(this._element).trigger(startEvent);
678 .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
679 .each($.proxy(function (i, element) {
680 var $element = $(element)
681 this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
682 }, this))
683 .end()
684 }
685 1274
686 Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { 1275 if (startEvent.isDefaultPrevented()) {
687 var isOpen = $element.hasClass('in') 1276 return;
1277 }
688 1278
689 $element.attr('aria-expanded', isOpen) 1279 if (actives) {
690 $trigger 1280 Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide');
691 .toggleClass('collapsed', !isOpen)
692 .attr('aria-expanded', isOpen)
693 }
694 1281
695 function getTargetFromTrigger($trigger) { 1282 if (!activesData) {
696 var href 1283 $(actives).data(DATA_KEY$3, null);
697 var target = $trigger.attr('data-target') 1284 }
698 || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 1285 }
699 1286
700 return $(target) 1287 var dimension = this._getDimension();
701 }
702 1288
1289 $(this._element).removeClass(ClassName$3.COLLAPSE).addClass(ClassName$3.COLLAPSING);
1290 this._element.style[dimension] = 0;
703 1291
704 // COLLAPSE PLUGIN DEFINITION 1292 if (this._triggerArray.length) {
705 // ========================== 1293 $(this._triggerArray).removeClass(ClassName$3.COLLAPSED).attr('aria-expanded', true);
1294 }
706 1295
707 function Plugin(option) { 1296 this.setTransitioning(true);
708 return this.each(function () {
709 var $this = $(this)
710 var data = $this.data('bs.collapse')
711 var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
712 1297
713 if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false 1298 var complete = function complete() {
714 if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) 1299 $(_this._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).addClass(ClassName$3.SHOW);
715 if (typeof option == 'string') data[option]() 1300 _this._element.style[dimension] = '';
716 })
717 }
718 1301
719 var old = $.fn.collapse 1302 _this.setTransitioning(false);
720 1303
721 $.fn.collapse = Plugin 1304 $(_this._element).trigger(Event$3.SHOWN);
722 $.fn.collapse.Constructor = Collapse 1305 };
723 1306
1307 var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
1308 var scrollSize = "scroll" + capitalizedDimension;
1309 var transitionDuration = Util.getTransitionDurationFromElement(this._element);
1310 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
1311 this._element.style[dimension] = this._element[scrollSize] + "px";
1312 };
724 1313
725 // COLLAPSE NO CONFLICT 1314 _proto.hide = function hide() {
726 // ==================== 1315 var _this2 = this;
727 1316
728 $.fn.collapse.noConflict = function () { 1317 if (this._isTransitioning || !$(this._element).hasClass(ClassName$3.SHOW)) {
729 $.fn.collapse = old 1318 return;
730 return this 1319 }
731 }
732 1320
1321 var startEvent = $.Event(Event$3.HIDE);
1322 $(this._element).trigger(startEvent);
733 1323
734 // COLLAPSE DATA-API 1324 if (startEvent.isDefaultPrevented()) {
735 // ================= 1325 return;
1326 }
736 1327
737 $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { 1328 var dimension = this._getDimension();
738 var $this = $(this)
739 1329
740 if (!$this.attr('data-target')) e.preventDefault() 1330 this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
1331 Util.reflow(this._element);
1332 $(this._element).addClass(ClassName$3.COLLAPSING).removeClass(ClassName$3.COLLAPSE).removeClass(ClassName$3.SHOW);
1333 var triggerArrayLength = this._triggerArray.length;
741 1334
742 var $target = getTargetFromTrigger($this) 1335 if (triggerArrayLength > 0) {
743 var data = $target.data('bs.collapse') 1336 for (var i = 0; i < triggerArrayLength; i++) {
744 var option = data ? 'toggle' : $this.data() 1337 var trigger = this._triggerArray[i];
1338 var selector = Util.getSelectorFromElement(trigger);
745 1339
746 Plugin.call($target, option) 1340 if (selector !== null) {
747 }) 1341 var $elem = $([].slice.call(document.querySelectorAll(selector)));
748 1342
749}(jQuery); 1343 if (!$elem.hasClass(ClassName$3.SHOW)) {
1344 $(trigger).addClass(ClassName$3.COLLAPSED).attr('aria-expanded', false);
1345 }
1346 }
1347 }
1348 }
750 1349
751/* ======================================================================== 1350 this.setTransitioning(true);
752 * Bootstrap: dropdown.js v3.3.7
753 * http://getbootstrap.com/javascript/#dropdowns
754 * ========================================================================
755 * Copyright 2011-2016 Twitter, Inc.
756 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
757 * ======================================================================== */
758 1351
1352 var complete = function complete() {
1353 _this2.setTransitioning(false);
759 1354
760+function ($) { 1355 $(_this2._element).removeClass(ClassName$3.COLLAPSING).addClass(ClassName$3.COLLAPSE).trigger(Event$3.HIDDEN);
761 'use strict'; 1356 };
762 1357
763 // DROPDOWN CLASS DEFINITION 1358 this._element.style[dimension] = '';
764 // ========================= 1359 var transitionDuration = Util.getTransitionDurationFromElement(this._element);
1360 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
1361 };
765 1362
766 var backdrop = '.dropdown-backdrop' 1363 _proto.setTransitioning = function setTransitioning(isTransitioning) {
767 var toggle = '[data-toggle="dropdown"]' 1364 this._isTransitioning = isTransitioning;
768 var Dropdown = function (element) { 1365 };
769 $(element).on('click.bs.dropdown', this.toggle)
770 }
771 1366
772 Dropdown.VERSION = '3.3.7' 1367 _proto.dispose = function dispose() {
1368 $.removeData(this._element, DATA_KEY$3);
1369 this._config = null;
1370 this._parent = null;
1371 this._element = null;
1372 this._triggerArray = null;
1373 this._isTransitioning = null;
1374 } // Private
1375 ;
773 1376
774 function getParent($this) { 1377 _proto._getConfig = function _getConfig(config) {
775 var selector = $this.attr('data-target') 1378 config = _objectSpread({}, Default$1, config);
1379 config.toggle = Boolean(config.toggle); // Coerce string values
776 1380
777 if (!selector) { 1381 Util.typeCheckConfig(NAME$3, config, DefaultType$1);
778 selector = $this.attr('href') 1382 return config;
779 selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 1383 };
780 }
781 1384
782 var $parent = selector && $(selector) 1385 _proto._getDimension = function _getDimension() {
1386 var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
1387 return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
1388 };
783 1389
784 return $parent && $parent.length ? $parent : $this.parent() 1390 _proto._getParent = function _getParent() {
785 } 1391 var _this3 = this;
786 1392
787 function clearMenus(e) { 1393 var parent;
788 if (e && e.which === 3) return
789 $(backdrop).remove()
790 $(toggle).each(function () {
791 var $this = $(this)
792 var $parent = getParent($this)
793 var relatedTarget = { relatedTarget: this }
794 1394
795 if (!$parent.hasClass('open')) return 1395 if (Util.isElement(this._config.parent)) {
1396 parent = this._config.parent; // It's a jQuery object
796 1397
797 if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return 1398 if (typeof this._config.parent.jquery !== 'undefined') {
1399 parent = this._config.parent[0];
1400 }
1401 } else {
1402 parent = document.querySelector(this._config.parent);
1403 }
798 1404
799 $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) 1405 var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]";
1406 var children = [].slice.call(parent.querySelectorAll(selector));
1407 $(children).each(function (i, element) {
1408 _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
1409 });
1410 return parent;
1411 };
800 1412
801 if (e.isDefaultPrevented()) return 1413 _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
1414 var isOpen = $(element).hasClass(ClassName$3.SHOW);
802 1415
803 $this.attr('aria-expanded', 'false') 1416 if (triggerArray.length) {
804 $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget)) 1417 $(triggerArray).toggleClass(ClassName$3.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
805 }) 1418 }
806 } 1419 } // Static
1420 ;
807 1421
808 Dropdown.prototype.toggle = function (e) { 1422 Collapse._getTargetFromElement = function _getTargetFromElement(element) {
809 var $this = $(this) 1423 var selector = Util.getSelectorFromElement(element);
1424 return selector ? document.querySelector(selector) : null;
1425 };
810 1426
811 if ($this.is('.disabled, :disabled')) return 1427 Collapse._jQueryInterface = function _jQueryInterface(config) {
1428 return this.each(function () {
1429 var $this = $(this);
1430 var data = $this.data(DATA_KEY$3);
812 1431
813 var $parent = getParent($this) 1432 var _config = _objectSpread({}, Default$1, $this.data(), typeof config === 'object' && config ? config : {});
814 var isActive = $parent.hasClass('open')
815 1433
816 clearMenus() 1434 if (!data && _config.toggle && /show|hide/.test(config)) {
1435 _config.toggle = false;
1436 }
817 1437
818 if (!isActive) { 1438 if (!data) {
819 if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { 1439 data = new Collapse(this, _config);
820 // if mobile we use a backdrop because click events don't delegate 1440 $this.data(DATA_KEY$3, data);
821 $(document.createElement('div')) 1441 }
822 .addClass('dropdown-backdrop') 1442
823 .insertAfter($(this)) 1443 if (typeof config === 'string') {
824 .on('click', clearMenus) 1444 if (typeof data[config] === 'undefined') {
825 } 1445 throw new TypeError("No method named \"" + config + "\"");
1446 }
1447
1448 data[config]();
1449 }
1450 });
1451 };
826 1452
827 var relatedTarget = { relatedTarget: this } 1453 _createClass(Collapse, null, [{
828 $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) 1454 key: "VERSION",
1455 get: function get() {
1456 return VERSION$3;
1457 }
1458 }, {
1459 key: "Default",
1460 get: function get() {
1461 return Default$1;
1462 }
1463 }]);
829 1464
830 if (e.isDefaultPrevented()) return 1465 return Collapse;
1466 }();
1467 /**
1468 * ------------------------------------------------------------------------
1469 * Data Api implementation
1470 * ------------------------------------------------------------------------
1471 */
831 1472
832 $this
833 .trigger('focus')
834 .attr('aria-expanded', 'true')
835 1473
836 $parent 1474 $(document).on(Event$3.CLICK_DATA_API, Selector$3.DATA_TOGGLE, function (event) {
837 .toggleClass('open') 1475 // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
838 .trigger($.Event('shown.bs.dropdown', relatedTarget)) 1476 if (event.currentTarget.tagName === 'A') {
1477 event.preventDefault();
839 } 1478 }
840 1479
841 return false 1480 var $trigger = $(this);
842 } 1481 var selector = Util.getSelectorFromElement(this);
1482 var selectors = [].slice.call(document.querySelectorAll(selector));
1483 $(selectors).each(function () {
1484 var $target = $(this);
1485 var data = $target.data(DATA_KEY$3);
1486 var config = data ? 'toggle' : $trigger.data();
1487
1488 Collapse._jQueryInterface.call($target, config);
1489 });
1490 });
1491 /**
1492 * ------------------------------------------------------------------------
1493 * jQuery
1494 * ------------------------------------------------------------------------
1495 */
1496
1497 $.fn[NAME$3] = Collapse._jQueryInterface;
1498 $.fn[NAME$3].Constructor = Collapse;
1499
1500 $.fn[NAME$3].noConflict = function () {
1501 $.fn[NAME$3] = JQUERY_NO_CONFLICT$3;
1502 return Collapse._jQueryInterface;
1503 };
1504
1505 /**
1506 * ------------------------------------------------------------------------
1507 * Constants
1508 * ------------------------------------------------------------------------
1509 */
1510
1511 var NAME$4 = 'dropdown';
1512 var VERSION$4 = '4.3.1';
1513 var DATA_KEY$4 = 'bs.dropdown';
1514 var EVENT_KEY$4 = "." + DATA_KEY$4;
1515 var DATA_API_KEY$4 = '.data-api';
1516 var JQUERY_NO_CONFLICT$4 = $.fn[NAME$4];
1517 var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
1518
1519 var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key
1520
1521 var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key
1522
1523 var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
1524
1525 var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
1526
1527 var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
1528
1529 var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
1530 var Event$4 = {
1531 HIDE: "hide" + EVENT_KEY$4,
1532 HIDDEN: "hidden" + EVENT_KEY$4,
1533 SHOW: "show" + EVENT_KEY$4,
1534 SHOWN: "shown" + EVENT_KEY$4,
1535 CLICK: "click" + EVENT_KEY$4,
1536 CLICK_DATA_API: "click" + EVENT_KEY$4 + DATA_API_KEY$4,
1537 KEYDOWN_DATA_API: "keydown" + EVENT_KEY$4 + DATA_API_KEY$4,
1538 KEYUP_DATA_API: "keyup" + EVENT_KEY$4 + DATA_API_KEY$4
1539 };
1540 var ClassName$4 = {
1541 DISABLED: 'disabled',
1542 SHOW: 'show',
1543 DROPUP: 'dropup',
1544 DROPRIGHT: 'dropright',
1545 DROPLEFT: 'dropleft',
1546 MENURIGHT: 'dropdown-menu-right',
1547 MENULEFT: 'dropdown-menu-left',
1548 POSITION_STATIC: 'position-static'
1549 };
1550 var Selector$4 = {
1551 DATA_TOGGLE: '[data-toggle="dropdown"]',
1552 FORM_CHILD: '.dropdown form',
1553 MENU: '.dropdown-menu',
1554 NAVBAR_NAV: '.navbar-nav',
1555 VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'
1556 };
1557 var AttachmentMap = {
1558 TOP: 'top-start',
1559 TOPEND: 'top-end',
1560 BOTTOM: 'bottom-start',
1561 BOTTOMEND: 'bottom-end',
1562 RIGHT: 'right-start',
1563 RIGHTEND: 'right-end',
1564 LEFT: 'left-start',
1565 LEFTEND: 'left-end'
1566 };
1567 var Default$2 = {
1568 offset: 0,
1569 flip: true,
1570 boundary: 'scrollParent',
1571 reference: 'toggle',
1572 display: 'dynamic'
1573 };
1574 var DefaultType$2 = {
1575 offset: '(number|string|function)',
1576 flip: 'boolean',
1577 boundary: '(string|element)',
1578 reference: '(string|element)',
1579 display: 'string'
1580 /**
1581 * ------------------------------------------------------------------------
1582 * Class Definition
1583 * ------------------------------------------------------------------------
1584 */
1585
1586 };
1587
1588 var Dropdown =
1589 /*#__PURE__*/
1590 function () {
1591 function Dropdown(element, config) {
1592 this._element = element;
1593 this._popper = null;
1594 this._config = this._getConfig(config);
1595 this._menu = this._getMenuElement();
1596 this._inNavbar = this._detectNavbar();
1597
1598 this._addEventListeners();
1599 } // Getters
1600
1601
1602 var _proto = Dropdown.prototype;
1603
1604 // Public
1605 _proto.toggle = function toggle() {
1606 if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED)) {
1607 return;
1608 }
843 1609
844 Dropdown.prototype.keydown = function (e) { 1610 var parent = Dropdown._getParentFromElement(this._element);
845 if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
846 1611
847 var $this = $(this) 1612 var isActive = $(this._menu).hasClass(ClassName$4.SHOW);
848 1613
849 e.preventDefault() 1614 Dropdown._clearMenus();
850 e.stopPropagation()
851 1615
852 if ($this.is('.disabled, :disabled')) return 1616 if (isActive) {
1617 return;
1618 }
853 1619
854 var $parent = getParent($this) 1620 var relatedTarget = {
855 var isActive = $parent.hasClass('open') 1621 relatedTarget: this._element
1622 };
1623 var showEvent = $.Event(Event$4.SHOW, relatedTarget);
1624 $(parent).trigger(showEvent);
856 1625
857 if (!isActive && e.which != 27 || isActive && e.which == 27) { 1626 if (showEvent.isDefaultPrevented()) {
858 if (e.which == 27) $parent.find(toggle).trigger('focus') 1627 return;
859 return $this.trigger('click') 1628 } // Disable totally Popper.js for Dropdown in Navbar
860 }
861 1629
862 var desc = ' li:not(.disabled):visible a'
863 var $items = $parent.find('.dropdown-menu' + desc)
864 1630
865 if (!$items.length) return 1631 if (!this._inNavbar) {
1632 /**
1633 * Check for Popper dependency
1634 * Popper - https://popper.js.org
1635 */
1636 if (typeof Popper === 'undefined') {
1637 throw new TypeError('Bootstrap\'s dropdowns require Popper.js (https://popper.js.org/)');
1638 }
866 1639
867 var index = $items.index(e.target) 1640 var referenceElement = this._element;
868 1641
869 if (e.which == 38 && index > 0) index-- // up 1642 if (this._config.reference === 'parent') {
870 if (e.which == 40 && index < $items.length - 1) index++ // down 1643 referenceElement = parent;
871 if (!~index) index = 0 1644 } else if (Util.isElement(this._config.reference)) {
1645 referenceElement = this._config.reference; // Check if it's jQuery element
872 1646
873 $items.eq(index).trigger('focus') 1647 if (typeof this._config.reference.jquery !== 'undefined') {
874 } 1648 referenceElement = this._config.reference[0];
1649 }
1650 } // If boundary is not `scrollParent`, then set position to `static`
1651 // to allow the menu to "escape" the scroll parent's boundaries
1652 // https://github.com/twbs/bootstrap/issues/24251
875 1653
876 1654
877 // DROPDOWN PLUGIN DEFINITION 1655 if (this._config.boundary !== 'scrollParent') {
878 // ========================== 1656 $(parent).addClass(ClassName$4.POSITION_STATIC);
1657 }
879 1658
880 function Plugin(option) { 1659 this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
881 return this.each(function () { 1660 } // If this is a touch-enabled device we add extra
882 var $this = $(this) 1661 // empty mouseover listeners to the body's immediate children;
883 var data = $this.data('bs.dropdown') 1662 // only needed because of broken event delegation on iOS
1663 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
884 1664
885 if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
886 if (typeof option == 'string') data[option].call($this)
887 })
888 }
889 1665
890 var old = $.fn.dropdown 1666 if ('ontouchstart' in document.documentElement && $(parent).closest(Selector$4.NAVBAR_NAV).length === 0) {
1667 $(document.body).children().on('mouseover', null, $.noop);
1668 }
891 1669
892 $.fn.dropdown = Plugin 1670 this._element.focus();
893 $.fn.dropdown.Constructor = Dropdown
894 1671
1672 this._element.setAttribute('aria-expanded', true);
895 1673
896 // DROPDOWN NO CONFLICT 1674 $(this._menu).toggleClass(ClassName$4.SHOW);
897 // ==================== 1675 $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget));
1676 };
898 1677
899 $.fn.dropdown.noConflict = function () { 1678 _proto.show = function show() {
900 $.fn.dropdown = old 1679 if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || $(this._menu).hasClass(ClassName$4.SHOW)) {
901 return this 1680 return;
902 } 1681 }
903 1682
1683 var relatedTarget = {
1684 relatedTarget: this._element
1685 };
1686 var showEvent = $.Event(Event$4.SHOW, relatedTarget);
904 1687
905 // APPLY TO STANDARD DROPDOWN ELEMENTS 1688 var parent = Dropdown._getParentFromElement(this._element);
906 // ===================================
907
908 $(document)
909 .on('click.bs.dropdown.data-api', clearMenus)
910 .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
911 .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
912 .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
913 .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
914
915}(jQuery);
916
917/* ========================================================================
918 * Bootstrap: modal.js v3.3.7
919 * http://getbootstrap.com/javascript/#modals
920 * ========================================================================
921 * Copyright 2011-2016 Twitter, Inc.
922 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
923 * ======================================================================== */
924
925
926+function ($) {
927 'use strict';
928
929 // MODAL CLASS DEFINITION
930 // ======================
931
932 var Modal = function (element, options) {
933 this.options = options
934 this.$body = $(document.body)
935 this.$element = $(element)
936 this.$dialog = this.$element.find('.modal-dialog')
937 this.$backdrop = null
938 this.isShown = null
939 this.originalBodyPad = null
940 this.scrollbarWidth = 0
941 this.ignoreBackdropClick = false
942
943 if (this.options.remote) {
944 this.$element
945 .find('.modal-content')
946 .load(this.options.remote, $.proxy(function () {
947 this.$element.trigger('loaded.bs.modal')
948 }, this))
949 }
950 }
951 1689
952 Modal.VERSION = '3.3.7' 1690 $(parent).trigger(showEvent);
953 1691
954 Modal.TRANSITION_DURATION = 300 1692 if (showEvent.isDefaultPrevented()) {
955 Modal.BACKDROP_TRANSITION_DURATION = 150 1693 return;
1694 }
956 1695
957 Modal.DEFAULTS = { 1696 $(this._menu).toggleClass(ClassName$4.SHOW);
958 backdrop: true, 1697 $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.SHOWN, relatedTarget));
959 keyboard: true, 1698 };
960 show: true
961 }
962 1699
963 Modal.prototype.toggle = function (_relatedTarget) { 1700 _proto.hide = function hide() {
964 return this.isShown ? this.hide() : this.show(_relatedTarget) 1701 if (this._element.disabled || $(this._element).hasClass(ClassName$4.DISABLED) || !$(this._menu).hasClass(ClassName$4.SHOW)) {
965 } 1702 return;
1703 }
966 1704
967 Modal.prototype.show = function (_relatedTarget) { 1705 var relatedTarget = {
968 var that = this 1706 relatedTarget: this._element
969 var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) 1707 };
1708 var hideEvent = $.Event(Event$4.HIDE, relatedTarget);
970 1709
971 this.$element.trigger(e) 1710 var parent = Dropdown._getParentFromElement(this._element);
972 1711
973 if (this.isShown || e.isDefaultPrevented()) return 1712 $(parent).trigger(hideEvent);
974 1713
975 this.isShown = true 1714 if (hideEvent.isDefaultPrevented()) {
1715 return;
1716 }
976 1717
977 this.checkScrollbar() 1718 $(this._menu).toggleClass(ClassName$4.SHOW);
978 this.setScrollbar() 1719 $(parent).toggleClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget));
979 this.$body.addClass('modal-open') 1720 };
980 1721
981 this.escape() 1722 _proto.dispose = function dispose() {
982 this.resize() 1723 $.removeData(this._element, DATA_KEY$4);
1724 $(this._element).off(EVENT_KEY$4);
1725 this._element = null;
1726 this._menu = null;
983 1727
984 this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) 1728 if (this._popper !== null) {
1729 this._popper.destroy();
985 1730
986 this.$dialog.on('mousedown.dismiss.bs.modal', function () { 1731 this._popper = null;
987 that.$element.one('mouseup.dismiss.bs.modal', function (e) { 1732 }
988 if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true 1733 };
989 })
990 })
991 1734
992 this.backdrop(function () { 1735 _proto.update = function update() {
993 var transition = $.support.transition && that.$element.hasClass('fade') 1736 this._inNavbar = this._detectNavbar();
994 1737
995 if (!that.$element.parent().length) { 1738 if (this._popper !== null) {
996 that.$element.appendTo(that.$body) // don't move modals dom position 1739 this._popper.scheduleUpdate();
997 } 1740 }
1741 } // Private
1742 ;
998 1743
999 that.$element 1744 _proto._addEventListeners = function _addEventListeners() {
1000 .show() 1745 var _this = this;
1001 .scrollTop(0)
1002 1746
1003 that.adjustDialog() 1747 $(this._element).on(Event$4.CLICK, function (event) {
1748 event.preventDefault();
1749 event.stopPropagation();
1004 1750
1005 if (transition) { 1751 _this.toggle();
1006 that.$element[0].offsetWidth // force reflow 1752 });
1753 };
1754
1755 _proto._getConfig = function _getConfig(config) {
1756 config = _objectSpread({}, this.constructor.Default, $(this._element).data(), config);
1757 Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType);
1758 return config;
1759 };
1760
1761 _proto._getMenuElement = function _getMenuElement() {
1762 if (!this._menu) {
1763 var parent = Dropdown._getParentFromElement(this._element);
1764
1765 if (parent) {
1766 this._menu = parent.querySelector(Selector$4.MENU);
1767 }
1007 } 1768 }
1008 1769
1009 that.$element.addClass('in') 1770 return this._menu;
1771 };
1010 1772
1011 that.enforceFocus() 1773 _proto._getPlacement = function _getPlacement() {
1774 var $parentDropdown = $(this._element.parentNode);
1775 var placement = AttachmentMap.BOTTOM; // Handle dropup
1012 1776
1013 var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) 1777 if ($parentDropdown.hasClass(ClassName$4.DROPUP)) {
1778 placement = AttachmentMap.TOP;
1014 1779
1015 transition ? 1780 if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) {
1016 that.$dialog // wait for modal to slide in 1781 placement = AttachmentMap.TOPEND;
1017 .one('bsTransitionEnd', function () { 1782 }
1018 that.$element.trigger('focus').trigger(e) 1783 } else if ($parentDropdown.hasClass(ClassName$4.DROPRIGHT)) {
1019 }) 1784 placement = AttachmentMap.RIGHT;
1020 .emulateTransitionEnd(Modal.TRANSITION_DURATION) : 1785 } else if ($parentDropdown.hasClass(ClassName$4.DROPLEFT)) {
1021 that.$element.trigger('focus').trigger(e) 1786 placement = AttachmentMap.LEFT;
1022 }) 1787 } else if ($(this._menu).hasClass(ClassName$4.MENURIGHT)) {
1023 } 1788 placement = AttachmentMap.BOTTOMEND;
1789 }
1790
1791 return placement;
1792 };
1024 1793
1025 Modal.prototype.hide = function (e) { 1794 _proto._detectNavbar = function _detectNavbar() {
1026 if (e) e.preventDefault() 1795 return $(this._element).closest('.navbar').length > 0;
1796 };
1027 1797
1028 e = $.Event('hide.bs.modal') 1798 _proto._getOffset = function _getOffset() {
1799 var _this2 = this;
1029 1800
1030 this.$element.trigger(e) 1801 var offset = {};
1031 1802
1032 if (!this.isShown || e.isDefaultPrevented()) return 1803 if (typeof this._config.offset === 'function') {
1804 offset.fn = function (data) {
1805 data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
1806 return data;
1807 };
1808 } else {
1809 offset.offset = this._config.offset;
1810 }
1033 1811
1034 this.isShown = false 1812 return offset;
1813 };
1814
1815 _proto._getPopperConfig = function _getPopperConfig() {
1816 var popperConfig = {
1817 placement: this._getPlacement(),
1818 modifiers: {
1819 offset: this._getOffset(),
1820 flip: {
1821 enabled: this._config.flip
1822 },
1823 preventOverflow: {
1824 boundariesElement: this._config.boundary
1825 }
1826 } // Disable Popper.js if we have a static display
1827
1828 };
1829
1830 if (this._config.display === 'static') {
1831 popperConfig.modifiers.applyStyle = {
1832 enabled: false
1833 };
1834 }
1035 1835
1036 this.escape() 1836 return popperConfig;
1037 this.resize() 1837 } // Static
1838 ;
1038 1839
1039 $(document).off('focusin.bs.modal') 1840 Dropdown._jQueryInterface = function _jQueryInterface(config) {
1841 return this.each(function () {
1842 var data = $(this).data(DATA_KEY$4);
1040 1843
1041 this.$element 1844 var _config = typeof config === 'object' ? config : null;
1042 .removeClass('in')
1043 .off('click.dismiss.bs.modal')
1044 .off('mouseup.dismiss.bs.modal')
1045 1845
1046 this.$dialog.off('mousedown.dismiss.bs.modal') 1846 if (!data) {
1847 data = new Dropdown(this, _config);
1848 $(this).data(DATA_KEY$4, data);
1849 }
1047 1850
1048 $.support.transition && this.$element.hasClass('fade') ? 1851 if (typeof config === 'string') {
1049 this.$element 1852 if (typeof data[config] === 'undefined') {
1050 .one('bsTransitionEnd', $.proxy(this.hideModal, this)) 1853 throw new TypeError("No method named \"" + config + "\"");
1051 .emulateTransitionEnd(Modal.TRANSITION_DURATION) : 1854 }
1052 this.hideModal()
1053 }
1054 1855
1055 Modal.prototype.enforceFocus = function () { 1856 data[config]();
1056 $(document)
1057 .off('focusin.bs.modal') // guard against infinite focus loop
1058 .on('focusin.bs.modal', $.proxy(function (e) {
1059 if (document !== e.target &&
1060 this.$element[0] !== e.target &&
1061 !this.$element.has(e.target).length) {
1062 this.$element.trigger('focus')
1063 } 1857 }
1064 }, this)) 1858 });
1065 } 1859 };
1066 1860
1067 Modal.prototype.escape = function () { 1861 Dropdown._clearMenus = function _clearMenus(event) {
1068 if (this.isShown && this.options.keyboard) { 1862 if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) {
1069 this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) { 1863 return;
1070 e.which == 27 && this.hide() 1864 }
1071 }, this))
1072 } else if (!this.isShown) {
1073 this.$element.off('keydown.dismiss.bs.modal')
1074 }
1075 }
1076 1865
1077 Modal.prototype.resize = function () { 1866 var toggles = [].slice.call(document.querySelectorAll(Selector$4.DATA_TOGGLE));
1078 if (this.isShown) {
1079 $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
1080 } else {
1081 $(window).off('resize.bs.modal')
1082 }
1083 }
1084 1867
1085 Modal.prototype.hideModal = function () { 1868 for (var i = 0, len = toggles.length; i < len; i++) {
1086 var that = this 1869 var parent = Dropdown._getParentFromElement(toggles[i]);
1087 this.$element.hide()
1088 this.backdrop(function () {
1089 that.$body.removeClass('modal-open')
1090 that.resetAdjustments()
1091 that.resetScrollbar()
1092 that.$element.trigger('hidden.bs.modal')
1093 })
1094 }
1095 1870
1096 Modal.prototype.removeBackdrop = function () { 1871 var context = $(toggles[i]).data(DATA_KEY$4);
1097 this.$backdrop && this.$backdrop.remove() 1872 var relatedTarget = {
1098 this.$backdrop = null 1873 relatedTarget: toggles[i]
1099 } 1874 };
1100 1875
1101 Modal.prototype.backdrop = function (callback) { 1876 if (event && event.type === 'click') {
1102 var that = this 1877 relatedTarget.clickEvent = event;
1103 var animate = this.$element.hasClass('fade') ? 'fade' : '' 1878 }
1104 1879
1105 if (this.isShown && this.options.backdrop) { 1880 if (!context) {
1106 var doAnimate = $.support.transition && animate 1881 continue;
1882 }
1107 1883
1108 this.$backdrop = $(document.createElement('div')) 1884 var dropdownMenu = context._menu;
1109 .addClass('modal-backdrop ' + animate)
1110 .appendTo(this.$body)
1111 1885
1112 this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { 1886 if (!$(parent).hasClass(ClassName$4.SHOW)) {
1113 if (this.ignoreBackdropClick) { 1887 continue;
1114 this.ignoreBackdropClick = false
1115 return
1116 } 1888 }
1117 if (e.target !== e.currentTarget) return
1118 this.options.backdrop == 'static'
1119 ? this.$element[0].focus()
1120 : this.hide()
1121 }, this))
1122 1889
1123 if (doAnimate) this.$backdrop[0].offsetWidth // force reflow 1890 if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) {
1891 continue;
1892 }
1124 1893
1125 this.$backdrop.addClass('in') 1894 var hideEvent = $.Event(Event$4.HIDE, relatedTarget);
1895 $(parent).trigger(hideEvent);
1126 1896
1127 if (!callback) return 1897 if (hideEvent.isDefaultPrevented()) {
1898 continue;
1899 } // If this is a touch-enabled device we remove the extra
1900 // empty mouseover listeners we added for iOS support
1128 1901
1129 doAnimate ?
1130 this.$backdrop
1131 .one('bsTransitionEnd', callback)
1132 .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1133 callback()
1134 1902
1135 } else if (!this.isShown && this.$backdrop) { 1903 if ('ontouchstart' in document.documentElement) {
1136 this.$backdrop.removeClass('in') 1904 $(document.body).children().off('mouseover', null, $.noop);
1905 }
1137 1906
1138 var callbackRemove = function () { 1907 toggles[i].setAttribute('aria-expanded', 'false');
1139 that.removeBackdrop() 1908 $(dropdownMenu).removeClass(ClassName$4.SHOW);
1140 callback && callback() 1909 $(parent).removeClass(ClassName$4.SHOW).trigger($.Event(Event$4.HIDDEN, relatedTarget));
1141 } 1910 }
1142 $.support.transition && this.$element.hasClass('fade') ? 1911 };
1143 this.$backdrop
1144 .one('bsTransitionEnd', callbackRemove)
1145 .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1146 callbackRemove()
1147 1912
1148 } else if (callback) { 1913 Dropdown._getParentFromElement = function _getParentFromElement(element) {
1149 callback() 1914 var parent;
1150 } 1915 var selector = Util.getSelectorFromElement(element);
1151 }
1152 1916
1153 // these following methods are used to handle overflowing modals 1917 if (selector) {
1918 parent = document.querySelector(selector);
1919 }
1154 1920
1155 Modal.prototype.handleUpdate = function () { 1921 return parent || element.parentNode;
1156 this.adjustDialog() 1922 } // eslint-disable-next-line complexity
1157 } 1923 ;
1924
1925 Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
1926 // If not input/textarea:
1927 // - And not a key in REGEXP_KEYDOWN => not a dropdown command
1928 // If input/textarea:
1929 // - If space key => not a dropdown command
1930 // - If key is other than escape
1931 // - If key is not up or down => not a dropdown command
1932 // - If trigger inside the menu => not a dropdown command
1933 if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $(event.target).closest(Selector$4.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) {
1934 return;
1935 }
1158 1936
1159 Modal.prototype.adjustDialog = function () { 1937 event.preventDefault();
1160 var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight 1938 event.stopPropagation();
1161 1939
1162 this.$element.css({ 1940 if (this.disabled || $(this).hasClass(ClassName$4.DISABLED)) {
1163 paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', 1941 return;
1164 paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' 1942 }
1165 })
1166 }
1167 1943
1168 Modal.prototype.resetAdjustments = function () { 1944 var parent = Dropdown._getParentFromElement(this);
1169 this.$element.css({
1170 paddingLeft: '',
1171 paddingRight: ''
1172 })
1173 }
1174 1945
1175 Modal.prototype.checkScrollbar = function () { 1946 var isActive = $(parent).hasClass(ClassName$4.SHOW);
1176 var fullWindowWidth = window.innerWidth
1177 if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
1178 var documentElementRect = document.documentElement.getBoundingClientRect()
1179 fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
1180 }
1181 this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
1182 this.scrollbarWidth = this.measureScrollbar()
1183 }
1184 1947
1185 Modal.prototype.setScrollbar = function () { 1948 if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
1186 var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) 1949 if (event.which === ESCAPE_KEYCODE) {
1187 this.originalBodyPad = document.body.style.paddingRight || '' 1950 var toggle = parent.querySelector(Selector$4.DATA_TOGGLE);
1188 if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) 1951 $(toggle).trigger('focus');
1189 } 1952 }
1190 1953
1191 Modal.prototype.resetScrollbar = function () { 1954 $(this).trigger('click');
1192 this.$body.css('padding-right', this.originalBodyPad) 1955 return;
1193 } 1956 }
1194 1957
1195 Modal.prototype.measureScrollbar = function () { // thx walsh 1958 var items = [].slice.call(parent.querySelectorAll(Selector$4.VISIBLE_ITEMS));
1196 var scrollDiv = document.createElement('div')
1197 scrollDiv.className = 'modal-scrollbar-measure'
1198 this.$body.append(scrollDiv)
1199 var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
1200 this.$body[0].removeChild(scrollDiv)
1201 return scrollbarWidth
1202 }
1203 1959
1960 if (items.length === 0) {
1961 return;
1962 }
1204 1963
1205 // MODAL PLUGIN DEFINITION 1964 var index = items.indexOf(event.target);
1206 // =======================
1207 1965
1208 function Plugin(option, _relatedTarget) { 1966 if (event.which === ARROW_UP_KEYCODE && index > 0) {
1209 return this.each(function () { 1967 // Up
1210 var $this = $(this) 1968 index--;
1211 var data = $this.data('bs.modal') 1969 }
1212 var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
1213 1970
1214 if (!data) $this.data('bs.modal', (data = new Modal(this, options))) 1971 if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
1215 if (typeof option == 'string') data[option](_relatedTarget) 1972 // Down
1216 else if (options.show) data.show(_relatedTarget) 1973 index++;
1217 }) 1974 }
1218 }
1219 1975
1220 var old = $.fn.modal 1976 if (index < 0) {
1977 index = 0;
1978 }
1221 1979
1222 $.fn.modal = Plugin 1980 items[index].focus();
1223 $.fn.modal.Constructor = Modal 1981 };
1224 1982
1983 _createClass(Dropdown, null, [{
1984 key: "VERSION",
1985 get: function get() {
1986 return VERSION$4;
1987 }
1988 }, {
1989 key: "Default",
1990 get: function get() {
1991 return Default$2;
1992 }
1993 }, {
1994 key: "DefaultType",
1995 get: function get() {
1996 return DefaultType$2;
1997 }
1998 }]);
1999
2000 return Dropdown;
2001 }();
2002 /**
2003 * ------------------------------------------------------------------------
2004 * Data Api implementation
2005 * ------------------------------------------------------------------------
2006 */
2007
2008
2009 $(document).on(Event$4.KEYDOWN_DATA_API, Selector$4.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event$4.KEYDOWN_DATA_API, Selector$4.MENU, Dropdown._dataApiKeydownHandler).on(Event$4.CLICK_DATA_API + " " + Event$4.KEYUP_DATA_API, Dropdown._clearMenus).on(Event$4.CLICK_DATA_API, Selector$4.DATA_TOGGLE, function (event) {
2010 event.preventDefault();
2011 event.stopPropagation();
2012
2013 Dropdown._jQueryInterface.call($(this), 'toggle');
2014 }).on(Event$4.CLICK_DATA_API, Selector$4.FORM_CHILD, function (e) {
2015 e.stopPropagation();
2016 });
2017 /**
2018 * ------------------------------------------------------------------------
2019 * jQuery
2020 * ------------------------------------------------------------------------
2021 */
2022
2023 $.fn[NAME$4] = Dropdown._jQueryInterface;
2024 $.fn[NAME$4].Constructor = Dropdown;
2025
2026 $.fn[NAME$4].noConflict = function () {
2027 $.fn[NAME$4] = JQUERY_NO_CONFLICT$4;
2028 return Dropdown._jQueryInterface;
2029 };
2030
2031 /**
2032 * ------------------------------------------------------------------------
2033 * Constants
2034 * ------------------------------------------------------------------------
2035 */
2036
2037 var NAME$5 = 'modal';
2038 var VERSION$5 = '4.3.1';
2039 var DATA_KEY$5 = 'bs.modal';
2040 var EVENT_KEY$5 = "." + DATA_KEY$5;
2041 var DATA_API_KEY$5 = '.data-api';
2042 var JQUERY_NO_CONFLICT$5 = $.fn[NAME$5];
2043 var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key
2044
2045 var Default$3 = {
2046 backdrop: true,
2047 keyboard: true,
2048 focus: true,
2049 show: true
2050 };
2051 var DefaultType$3 = {
2052 backdrop: '(boolean|string)',
2053 keyboard: 'boolean',
2054 focus: 'boolean',
2055 show: 'boolean'
2056 };
2057 var Event$5 = {
2058 HIDE: "hide" + EVENT_KEY$5,
2059 HIDDEN: "hidden" + EVENT_KEY$5,
2060 SHOW: "show" + EVENT_KEY$5,
2061 SHOWN: "shown" + EVENT_KEY$5,
2062 FOCUSIN: "focusin" + EVENT_KEY$5,
2063 RESIZE: "resize" + EVENT_KEY$5,
2064 CLICK_DISMISS: "click.dismiss" + EVENT_KEY$5,
2065 KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY$5,
2066 MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY$5,
2067 MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY$5,
2068 CLICK_DATA_API: "click" + EVENT_KEY$5 + DATA_API_KEY$5
2069 };
2070 var ClassName$5 = {
2071 SCROLLABLE: 'modal-dialog-scrollable',
2072 SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
2073 BACKDROP: 'modal-backdrop',
2074 OPEN: 'modal-open',
2075 FADE: 'fade',
2076 SHOW: 'show'
2077 };
2078 var Selector$5 = {
2079 DIALOG: '.modal-dialog',
2080 MODAL_BODY: '.modal-body',
2081 DATA_TOGGLE: '[data-toggle="modal"]',
2082 DATA_DISMISS: '[data-dismiss="modal"]',
2083 FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
2084 STICKY_CONTENT: '.sticky-top'
2085 /**
2086 * ------------------------------------------------------------------------
2087 * Class Definition
2088 * ------------------------------------------------------------------------
2089 */
2090
2091 };
2092
2093 var Modal =
2094 /*#__PURE__*/
2095 function () {
2096 function Modal(element, config) {
2097 this._config = this._getConfig(config);
2098 this._element = element;
2099 this._dialog = element.querySelector(Selector$5.DIALOG);
2100 this._backdrop = null;
2101 this._isShown = false;
2102 this._isBodyOverflowing = false;
2103 this._ignoreBackdropClick = false;
2104 this._isTransitioning = false;
2105 this._scrollbarWidth = 0;
2106 } // Getters
2107
2108
2109 var _proto = Modal.prototype;
2110
2111 // Public
2112 _proto.toggle = function toggle(relatedTarget) {
2113 return this._isShown ? this.hide() : this.show(relatedTarget);
2114 };
2115
2116 _proto.show = function show(relatedTarget) {
2117 var _this = this;
2118
2119 if (this._isShown || this._isTransitioning) {
2120 return;
2121 }
1225 2122
1226 // MODAL NO CONFLICT 2123 if ($(this._element).hasClass(ClassName$5.FADE)) {
1227 // ================= 2124 this._isTransitioning = true;
2125 }
1228 2126
1229 $.fn.modal.noConflict = function () { 2127 var showEvent = $.Event(Event$5.SHOW, {
1230 $.fn.modal = old 2128 relatedTarget: relatedTarget
1231 return this 2129 });
1232 } 2130 $(this._element).trigger(showEvent);
1233 2131
2132 if (this._isShown || showEvent.isDefaultPrevented()) {
2133 return;
2134 }
1234 2135
1235 // MODAL DATA-API 2136 this._isShown = true;
1236 // ==============
1237 2137
1238 $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { 2138 this._checkScrollbar();
1239 var $this = $(this)
1240 var href = $this.attr('href')
1241 var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
1242 var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
1243 2139
1244 if ($this.is('a')) e.preventDefault() 2140 this._setScrollbar();
1245 2141
1246 $target.one('show.bs.modal', function (showEvent) { 2142 this._adjustDialog();
1247 if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
1248 $target.one('hidden.bs.modal', function () {
1249 $this.is(':visible') && $this.trigger('focus')
1250 })
1251 })
1252 Plugin.call($target, option, this)
1253 })
1254 2143
1255}(jQuery); 2144 this._setEscapeEvent();
1256 2145
1257/* ======================================================================== 2146 this._setResizeEvent();
1258 * Bootstrap: tooltip.js v3.3.7
1259 * http://getbootstrap.com/javascript/#tooltip
1260 * Inspired by the original jQuery.tipsy by Jason Frame
1261 * ========================================================================
1262 * Copyright 2011-2016 Twitter, Inc.
1263 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1264 * ======================================================================== */
1265 2147
2148 $(this._element).on(Event$5.CLICK_DISMISS, Selector$5.DATA_DISMISS, function (event) {
2149 return _this.hide(event);
2150 });
2151 $(this._dialog).on(Event$5.MOUSEDOWN_DISMISS, function () {
2152 $(_this._element).one(Event$5.MOUSEUP_DISMISS, function (event) {
2153 if ($(event.target).is(_this._element)) {
2154 _this._ignoreBackdropClick = true;
2155 }
2156 });
2157 });
1266 2158
1267+function ($) { 2159 this._showBackdrop(function () {
1268 'use strict'; 2160 return _this._showElement(relatedTarget);
2161 });
2162 };
1269 2163
1270 // TOOLTIP PUBLIC CLASS DEFINITION 2164 _proto.hide = function hide(event) {
1271 // =============================== 2165 var _this2 = this;
1272 2166
1273 var Tooltip = function (element, options) { 2167 if (event) {
1274 this.type = null 2168 event.preventDefault();
1275 this.options = null 2169 }
1276 this.enabled = null
1277 this.timeout = null
1278 this.hoverState = null
1279 this.$element = null
1280 this.inState = null
1281 2170
1282 this.init('tooltip', element, options) 2171 if (!this._isShown || this._isTransitioning) {
1283 } 2172 return;
2173 }
1284 2174
1285 Tooltip.VERSION = '3.3.7' 2175 var hideEvent = $.Event(Event$5.HIDE);
2176 $(this._element).trigger(hideEvent);
1286 2177
1287 Tooltip.TRANSITION_DURATION = 150 2178 if (!this._isShown || hideEvent.isDefaultPrevented()) {
2179 return;
2180 }
1288 2181
1289 Tooltip.DEFAULTS = { 2182 this._isShown = false;
1290 animation: true, 2183 var transition = $(this._element).hasClass(ClassName$5.FADE);
1291 placement: 'top',
1292 selector: false,
1293 template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
1294 trigger: 'hover focus',
1295 title: '',
1296 delay: 0,
1297 html: false,
1298 container: false,
1299 viewport: {
1300 selector: 'body',
1301 padding: 0
1302 }
1303 }
1304 2184
1305 Tooltip.prototype.init = function (type, element, options) { 2185 if (transition) {
1306 this.enabled = true 2186 this._isTransitioning = true;
1307 this.type = type 2187 }
1308 this.$element = $(element)
1309 this.options = this.getOptions(options)
1310 this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
1311 this.inState = { click: false, hover: false, focus: false }
1312 2188
1313 if (this.$element[0] instanceof document.constructor && !this.options.selector) { 2189 this._setEscapeEvent();
1314 throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!') 2190
1315 } 2191 this._setResizeEvent();
1316 2192
1317 var triggers = this.options.trigger.split(' ') 2193 $(document).off(Event$5.FOCUSIN);
2194 $(this._element).removeClass(ClassName$5.SHOW);
2195 $(this._element).off(Event$5.CLICK_DISMISS);
2196 $(this._dialog).off(Event$5.MOUSEDOWN_DISMISS);
1318 2197
1319 for (var i = triggers.length; i--;) { 2198 if (transition) {
1320 var trigger = triggers[i] 2199 var transitionDuration = Util.getTransitionDurationFromElement(this._element);
2200 $(this._element).one(Util.TRANSITION_END, function (event) {
2201 return _this2._hideModal(event);
2202 }).emulateTransitionEnd(transitionDuration);
2203 } else {
2204 this._hideModal();
2205 }
2206 };
2207
2208 _proto.dispose = function dispose() {
2209 [window, this._element, this._dialog].forEach(function (htmlElement) {
2210 return $(htmlElement).off(EVENT_KEY$5);
2211 });
2212 /**
2213 * `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API`
2214 * Do not move `document` in `htmlElements` array
2215 * It will remove `Event.CLICK_DATA_API` event that should remain
2216 */
2217
2218 $(document).off(Event$5.FOCUSIN);
2219 $.removeData(this._element, DATA_KEY$5);
2220 this._config = null;
2221 this._element = null;
2222 this._dialog = null;
2223 this._backdrop = null;
2224 this._isShown = null;
2225 this._isBodyOverflowing = null;
2226 this._ignoreBackdropClick = null;
2227 this._isTransitioning = null;
2228 this._scrollbarWidth = null;
2229 };
2230
2231 _proto.handleUpdate = function handleUpdate() {
2232 this._adjustDialog();
2233 } // Private
2234 ;
2235
2236 _proto._getConfig = function _getConfig(config) {
2237 config = _objectSpread({}, Default$3, config);
2238 Util.typeCheckConfig(NAME$5, config, DefaultType$3);
2239 return config;
2240 };
2241
2242 _proto._showElement = function _showElement(relatedTarget) {
2243 var _this3 = this;
2244
2245 var transition = $(this._element).hasClass(ClassName$5.FADE);
2246
2247 if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
2248 // Don't move modal's DOM position
2249 document.body.appendChild(this._element);
2250 }
2251
2252 this._element.style.display = 'block';
1321 2253
1322 if (trigger == 'click') { 2254 this._element.removeAttribute('aria-hidden');
1323 this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
1324 } else if (trigger != 'manual') {
1325 var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
1326 var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
1327 2255
1328 this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) 2256 this._element.setAttribute('aria-modal', true);
1329 this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) 2257
2258 if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE)) {
2259 this._dialog.querySelector(Selector$5.MODAL_BODY).scrollTop = 0;
2260 } else {
2261 this._element.scrollTop = 0;
1330 } 2262 }
1331 }
1332 2263
1333 this.options.selector ? 2264 if (transition) {
1334 (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : 2265 Util.reflow(this._element);
1335 this.fixTitle() 2266 }
1336 }
1337 2267
1338 Tooltip.prototype.getDefaults = function () { 2268 $(this._element).addClass(ClassName$5.SHOW);
1339 return Tooltip.DEFAULTS 2269
1340 } 2270 if (this._config.focus) {
2271 this._enforceFocus();
2272 }
1341 2273
1342 Tooltip.prototype.getOptions = function (options) { 2274 var shownEvent = $.Event(Event$5.SHOWN, {
1343 options = $.extend({}, this.getDefaults(), this.$element.data(), options) 2275 relatedTarget: relatedTarget
2276 });
1344 2277
1345 if (options.delay && typeof options.delay == 'number') { 2278 var transitionComplete = function transitionComplete() {
1346 options.delay = { 2279 if (_this3._config.focus) {
1347 show: options.delay, 2280 _this3._element.focus();
1348 hide: options.delay 2281 }
2282
2283 _this3._isTransitioning = false;
2284 $(_this3._element).trigger(shownEvent);
2285 };
2286
2287 if (transition) {
2288 var transitionDuration = Util.getTransitionDurationFromElement(this._dialog);
2289 $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration);
2290 } else {
2291 transitionComplete();
1349 } 2292 }
1350 } 2293 };
1351 2294
1352 return options 2295 _proto._enforceFocus = function _enforceFocus() {
1353 } 2296 var _this4 = this;
1354 2297
1355 Tooltip.prototype.getDelegateOptions = function () { 2298 $(document).off(Event$5.FOCUSIN) // Guard against infinite focus loop
1356 var options = {} 2299 .on(Event$5.FOCUSIN, function (event) {
1357 var defaults = this.getDefaults() 2300 if (document !== event.target && _this4._element !== event.target && $(_this4._element).has(event.target).length === 0) {
2301 _this4._element.focus();
2302 }
2303 });
2304 };
2305
2306 _proto._setEscapeEvent = function _setEscapeEvent() {
2307 var _this5 = this;
2308
2309 if (this._isShown && this._config.keyboard) {
2310 $(this._element).on(Event$5.KEYDOWN_DISMISS, function (event) {
2311 if (event.which === ESCAPE_KEYCODE$1) {
2312 event.preventDefault();
2313
2314 _this5.hide();
2315 }
2316 });
2317 } else if (!this._isShown) {
2318 $(this._element).off(Event$5.KEYDOWN_DISMISS);
2319 }
2320 };
1358 2321
1359 this._options && $.each(this._options, function (key, value) { 2322 _proto._setResizeEvent = function _setResizeEvent() {
1360 if (defaults[key] != value) options[key] = value 2323 var _this6 = this;
1361 })
1362 2324
1363 return options 2325 if (this._isShown) {
1364 } 2326 $(window).on(Event$5.RESIZE, function (event) {
2327 return _this6.handleUpdate(event);
2328 });
2329 } else {
2330 $(window).off(Event$5.RESIZE);
2331 }
2332 };
1365 2333
1366 Tooltip.prototype.enter = function (obj) { 2334 _proto._hideModal = function _hideModal() {
1367 var self = obj instanceof this.constructor ? 2335 var _this7 = this;
1368 obj : $(obj.currentTarget).data('bs.' + this.type)
1369 2336
1370 if (!self) { 2337 this._element.style.display = 'none';
1371 self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1372 $(obj.currentTarget).data('bs.' + this.type, self)
1373 }
1374 2338
1375 if (obj instanceof $.Event) { 2339 this._element.setAttribute('aria-hidden', true);
1376 self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
1377 }
1378 2340
1379 if (self.tip().hasClass('in') || self.hoverState == 'in') { 2341 this._element.removeAttribute('aria-modal');
1380 self.hoverState = 'in'
1381 return
1382 }
1383 2342
1384 clearTimeout(self.timeout) 2343 this._isTransitioning = false;
1385 2344
1386 self.hoverState = 'in' 2345 this._showBackdrop(function () {
2346 $(document.body).removeClass(ClassName$5.OPEN);
1387 2347
1388 if (!self.options.delay || !self.options.delay.show) return self.show() 2348 _this7._resetAdjustments();
1389 2349
1390 self.timeout = setTimeout(function () { 2350 _this7._resetScrollbar();
1391 if (self.hoverState == 'in') self.show()
1392 }, self.options.delay.show)
1393 }
1394 2351
1395 Tooltip.prototype.isInStateTrue = function () { 2352 $(_this7._element).trigger(Event$5.HIDDEN);
1396 for (var key in this.inState) { 2353 });
1397 if (this.inState[key]) return true 2354 };
1398 }
1399 2355
1400 return false 2356 _proto._removeBackdrop = function _removeBackdrop() {
1401 } 2357 if (this._backdrop) {
2358 $(this._backdrop).remove();
2359 this._backdrop = null;
2360 }
2361 };
1402 2362
1403 Tooltip.prototype.leave = function (obj) { 2363 _proto._showBackdrop = function _showBackdrop(callback) {
1404 var self = obj instanceof this.constructor ? 2364 var _this8 = this;
1405 obj : $(obj.currentTarget).data('bs.' + this.type)
1406 2365
1407 if (!self) { 2366 var animate = $(this._element).hasClass(ClassName$5.FADE) ? ClassName$5.FADE : '';
1408 self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1409 $(obj.currentTarget).data('bs.' + this.type, self)
1410 }
1411 2367
1412 if (obj instanceof $.Event) { 2368 if (this._isShown && this._config.backdrop) {
1413 self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false 2369 this._backdrop = document.createElement('div');
1414 } 2370 this._backdrop.className = ClassName$5.BACKDROP;
1415 2371
1416 if (self.isInStateTrue()) return 2372 if (animate) {
2373 this._backdrop.classList.add(animate);
2374 }
1417 2375
1418 clearTimeout(self.timeout) 2376 $(this._backdrop).appendTo(document.body);
2377 $(this._element).on(Event$5.CLICK_DISMISS, function (event) {
2378 if (_this8._ignoreBackdropClick) {
2379 _this8._ignoreBackdropClick = false;
2380 return;
2381 }
2382
2383 if (event.target !== event.currentTarget) {
2384 return;
2385 }
2386
2387 if (_this8._config.backdrop === 'static') {
2388 _this8._element.focus();
2389 } else {
2390 _this8.hide();
2391 }
2392 });
2393
2394 if (animate) {
2395 Util.reflow(this._backdrop);
2396 }
1419 2397
1420 self.hoverState = 'out' 2398 $(this._backdrop).addClass(ClassName$5.SHOW);
1421 2399
1422 if (!self.options.delay || !self.options.delay.hide) return self.hide() 2400 if (!callback) {
2401 return;
2402 }
1423 2403
1424 self.timeout = setTimeout(function () { 2404 if (!animate) {
1425 if (self.hoverState == 'out') self.hide() 2405 callback();
1426 }, self.options.delay.hide) 2406 return;
1427 } 2407 }
1428 2408
1429 Tooltip.prototype.show = function () { 2409 var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
1430 var e = $.Event('show.bs.' + this.type) 2410 $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration);
2411 } else if (!this._isShown && this._backdrop) {
2412 $(this._backdrop).removeClass(ClassName$5.SHOW);
1431 2413
1432 if (this.hasContent() && this.enabled) { 2414 var callbackRemove = function callbackRemove() {
1433 this.$element.trigger(e) 2415 _this8._removeBackdrop();
1434 2416
1435 var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) 2417 if (callback) {
1436 if (e.isDefaultPrevented() || !inDom) return 2418 callback();
1437 var that = this 2419 }
2420 };
1438 2421
1439 var $tip = this.tip() 2422 if ($(this._element).hasClass(ClassName$5.FADE)) {
2423 var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop);
1440 2424
1441 var tipId = this.getUID(this.type) 2425 $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration);
2426 } else {
2427 callbackRemove();
2428 }
2429 } else if (callback) {
2430 callback();
2431 }
2432 } // ----------------------------------------------------------------------
2433 // the following methods are used to handle overflowing modals
2434 // todo (fat): these should probably be refactored out of modal.js
2435 // ----------------------------------------------------------------------
2436 ;
1442 2437
1443 this.setContent() 2438 _proto._adjustDialog = function _adjustDialog() {
1444 $tip.attr('id', tipId) 2439 var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
1445 this.$element.attr('aria-describedby', tipId)
1446 2440
1447 if (this.options.animation) $tip.addClass('fade') 2441 if (!this._isBodyOverflowing && isModalOverflowing) {
2442 this._element.style.paddingLeft = this._scrollbarWidth + "px";
2443 }
1448 2444
1449 var placement = typeof this.options.placement == 'function' ? 2445 if (this._isBodyOverflowing && !isModalOverflowing) {
1450 this.options.placement.call(this, $tip[0], this.$element[0]) : 2446 this._element.style.paddingRight = this._scrollbarWidth + "px";
1451 this.options.placement 2447 }
2448 };
2449
2450 _proto._resetAdjustments = function _resetAdjustments() {
2451 this._element.style.paddingLeft = '';
2452 this._element.style.paddingRight = '';
2453 };
2454
2455 _proto._checkScrollbar = function _checkScrollbar() {
2456 var rect = document.body.getBoundingClientRect();
2457 this._isBodyOverflowing = rect.left + rect.right < window.innerWidth;
2458 this._scrollbarWidth = this._getScrollbarWidth();
2459 };
2460
2461 _proto._setScrollbar = function _setScrollbar() {
2462 var _this9 = this;
2463
2464 if (this._isBodyOverflowing) {
2465 // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
2466 // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
2467 var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT));
2468 var stickyContent = [].slice.call(document.querySelectorAll(Selector$5.STICKY_CONTENT)); // Adjust fixed content padding
2469
2470 $(fixedContent).each(function (index, element) {
2471 var actualPadding = element.style.paddingRight;
2472 var calculatedPadding = $(element).css('padding-right');
2473 $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px");
2474 }); // Adjust sticky content margin
2475
2476 $(stickyContent).each(function (index, element) {
2477 var actualMargin = element.style.marginRight;
2478 var calculatedMargin = $(element).css('margin-right');
2479 $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px");
2480 }); // Adjust body padding
2481
2482 var actualPadding = document.body.style.paddingRight;
2483 var calculatedPadding = $(document.body).css('padding-right');
2484 $(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px");
2485 }
1452 2486
1453 var autoToken = /\s?auto?\s?/i 2487 $(document.body).addClass(ClassName$5.OPEN);
1454 var autoPlace = autoToken.test(placement) 2488 };
1455 if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
1456 2489
1457 $tip 2490 _proto._resetScrollbar = function _resetScrollbar() {
1458 .detach() 2491 // Restore fixed content padding
1459 .css({ top: 0, left: 0, display: 'block' }) 2492 var fixedContent = [].slice.call(document.querySelectorAll(Selector$5.FIXED_CONTENT));
1460 .addClass(placement) 2493 $(fixedContent).each(function (index, element) {
1461 .data('bs.' + this.type, this) 2494 var padding = $(element).data('padding-right');
2495 $(element).removeData('padding-right');
2496 element.style.paddingRight = padding ? padding : '';
2497 }); // Restore sticky content
1462 2498
1463 this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) 2499 var elements = [].slice.call(document.querySelectorAll("" + Selector$5.STICKY_CONTENT));
1464 this.$element.trigger('inserted.bs.' + this.type) 2500 $(elements).each(function (index, element) {
2501 var margin = $(element).data('margin-right');
1465 2502
1466 var pos = this.getPosition() 2503 if (typeof margin !== 'undefined') {
1467 var actualWidth = $tip[0].offsetWidth 2504 $(element).css('margin-right', margin).removeData('margin-right');
1468 var actualHeight = $tip[0].offsetHeight 2505 }
2506 }); // Restore body padding
2507
2508 var padding = $(document.body).data('padding-right');
2509 $(document.body).removeData('padding-right');
2510 document.body.style.paddingRight = padding ? padding : '';
2511 };
2512
2513 _proto._getScrollbarWidth = function _getScrollbarWidth() {
2514 // thx d.walsh
2515 var scrollDiv = document.createElement('div');
2516 scrollDiv.className = ClassName$5.SCROLLBAR_MEASURER;
2517 document.body.appendChild(scrollDiv);
2518 var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
2519 document.body.removeChild(scrollDiv);
2520 return scrollbarWidth;
2521 } // Static
2522 ;
2523
2524 Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
2525 return this.each(function () {
2526 var data = $(this).data(DATA_KEY$5);
2527
2528 var _config = _objectSpread({}, Default$3, $(this).data(), typeof config === 'object' && config ? config : {});
2529
2530 if (!data) {
2531 data = new Modal(this, _config);
2532 $(this).data(DATA_KEY$5, data);
2533 }
1469 2534
1470 if (autoPlace) { 2535 if (typeof config === 'string') {
1471 var orgPlacement = placement 2536 if (typeof data[config] === 'undefined') {
1472 var viewportDim = this.getPosition(this.$viewport) 2537 throw new TypeError("No method named \"" + config + "\"");
2538 }
1473 2539
1474 placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' : 2540 data[config](relatedTarget);
1475 placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' : 2541 } else if (_config.show) {
1476 placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' : 2542 data.show(relatedTarget);
1477 placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' : 2543 }
1478 placement 2544 });
2545 };
1479 2546
1480 $tip 2547 _createClass(Modal, null, [{
1481 .removeClass(orgPlacement) 2548 key: "VERSION",
1482 .addClass(placement) 2549 get: function get() {
2550 return VERSION$5;
2551 }
2552 }, {
2553 key: "Default",
2554 get: function get() {
2555 return Default$3;
1483 } 2556 }
2557 }]);
2558
2559 return Modal;
2560 }();
2561 /**
2562 * ------------------------------------------------------------------------
2563 * Data Api implementation
2564 * ------------------------------------------------------------------------
2565 */
2566
2567
2568 $(document).on(Event$5.CLICK_DATA_API, Selector$5.DATA_TOGGLE, function (event) {
2569 var _this10 = this;
2570
2571 var target;
2572 var selector = Util.getSelectorFromElement(this);
2573
2574 if (selector) {
2575 target = document.querySelector(selector);
2576 }
1484 2577
1485 var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) 2578 var config = $(target).data(DATA_KEY$5) ? 'toggle' : _objectSpread({}, $(target).data(), $(this).data());
1486 2579
1487 this.applyPlacement(calculatedOffset, placement) 2580 if (this.tagName === 'A' || this.tagName === 'AREA') {
2581 event.preventDefault();
2582 }
1488 2583
1489 var complete = function () { 2584 var $target = $(target).one(Event$5.SHOW, function (showEvent) {
1490 var prevHoverState = that.hoverState 2585 if (showEvent.isDefaultPrevented()) {
1491 that.$element.trigger('shown.bs.' + that.type) 2586 // Only register focus restorer if modal will actually get shown
1492 that.hoverState = null 2587 return;
2588 }
1493 2589
1494 if (prevHoverState == 'out') that.leave(that) 2590 $target.one(Event$5.HIDDEN, function () {
2591 if ($(_this10).is(':visible')) {
2592 _this10.focus();
2593 }
2594 });
2595 });
2596
2597 Modal._jQueryInterface.call($(target), config, this);
2598 });
2599 /**
2600 * ------------------------------------------------------------------------
2601 * jQuery
2602 * ------------------------------------------------------------------------
2603 */
2604
2605 $.fn[NAME$5] = Modal._jQueryInterface;
2606 $.fn[NAME$5].Constructor = Modal;
2607
2608 $.fn[NAME$5].noConflict = function () {
2609 $.fn[NAME$5] = JQUERY_NO_CONFLICT$5;
2610 return Modal._jQueryInterface;
2611 };
2612
2613 /**
2614 * --------------------------------------------------------------------------
2615 * Bootstrap (v4.3.1): tools/sanitizer.js
2616 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2617 * --------------------------------------------------------------------------
2618 */
2619 var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
2620 var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
2621 var DefaultWhitelist = {
2622 // Global attributes allowed on any supplied element below.
2623 '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
2624 a: ['target', 'href', 'title', 'rel'],
2625 area: [],
2626 b: [],
2627 br: [],
2628 col: [],
2629 code: [],
2630 div: [],
2631 em: [],
2632 hr: [],
2633 h1: [],
2634 h2: [],
2635 h3: [],
2636 h4: [],
2637 h5: [],
2638 h6: [],
2639 i: [],
2640 img: ['src', 'alt', 'title', 'width', 'height'],
2641 li: [],
2642 ol: [],
2643 p: [],
2644 pre: [],
2645 s: [],
2646 small: [],
2647 span: [],
2648 sub: [],
2649 sup: [],
2650 strong: [],
2651 u: [],
2652 ul: []
2653 /**
2654 * A pattern that recognizes a commonly useful subset of URLs that are safe.
2655 *
2656 * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
2657 */
2658
2659 };
2660 var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
2661 /**
2662 * A pattern that matches safe data URLs. Only matches image, video and audio types.
2663 *
2664 * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
2665 */
2666
2667 var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
2668
2669 function allowedAttribute(attr, allowedAttributeList) {
2670 var attrName = attr.nodeName.toLowerCase();
2671
2672 if (allowedAttributeList.indexOf(attrName) !== -1) {
2673 if (uriAttrs.indexOf(attrName) !== -1) {
2674 return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
1495 } 2675 }
1496 2676
1497 $.support.transition && this.$tip.hasClass('fade') ? 2677 return true;
1498 $tip 2678 }
1499 .one('bsTransitionEnd', complete) 2679
1500 .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : 2680 var regExp = allowedAttributeList.filter(function (attrRegex) {
1501 complete() 2681 return attrRegex instanceof RegExp;
2682 }); // Check if a regular expression validates the attribute.
2683
2684 for (var i = 0, l = regExp.length; i < l; i++) {
2685 if (attrName.match(regExp[i])) {
2686 return true;
2687 }
1502 } 2688 }
2689
2690 return false;
1503 } 2691 }
1504 2692
1505 Tooltip.prototype.applyPlacement = function (offset, placement) { 2693 function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
1506 var $tip = this.tip() 2694 if (unsafeHtml.length === 0) {
1507 var width = $tip[0].offsetWidth 2695 return unsafeHtml;
1508 var height = $tip[0].offsetHeight 2696 }
1509 2697
1510 // manually read margins because getBoundingClientRect includes difference 2698 if (sanitizeFn && typeof sanitizeFn === 'function') {
1511 var marginTop = parseInt($tip.css('margin-top'), 10) 2699 return sanitizeFn(unsafeHtml);
1512 var marginLeft = parseInt($tip.css('margin-left'), 10) 2700 }
1513 2701
1514 // we must check for NaN for ie 8/9 2702 var domParser = new window.DOMParser();
1515 if (isNaN(marginTop)) marginTop = 0 2703 var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
1516 if (isNaN(marginLeft)) marginLeft = 0 2704 var whitelistKeys = Object.keys(whiteList);
2705 var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
1517 2706
1518 offset.top += marginTop 2707 var _loop = function _loop(i, len) {
1519 offset.left += marginLeft 2708 var el = elements[i];
2709 var elName = el.nodeName.toLowerCase();
1520 2710
1521 // $.fn.offset doesn't round pixel values 2711 if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
1522 // so we use setOffset directly with our own function B-0 2712 el.parentNode.removeChild(el);
1523 $.offset.setOffset($tip[0], $.extend({ 2713 return "continue";
1524 using: function (props) {
1525 $tip.css({
1526 top: Math.round(props.top),
1527 left: Math.round(props.left)
1528 })
1529 } 2714 }
1530 }, offset), 0)
1531 2715
1532 $tip.addClass('in') 2716 var attributeList = [].slice.call(el.attributes);
2717 var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
2718 attributeList.forEach(function (attr) {
2719 if (!allowedAttribute(attr, whitelistedAttributes)) {
2720 el.removeAttribute(attr.nodeName);
2721 }
2722 });
2723 };
1533 2724
1534 // check to see if placing tip in new offset caused the tip to resize itself 2725 for (var i = 0, len = elements.length; i < len; i++) {
1535 var actualWidth = $tip[0].offsetWidth 2726 var _ret = _loop(i, len);
1536 var actualHeight = $tip[0].offsetHeight
1537 2727
1538 if (placement == 'top' && actualHeight != height) { 2728 if (_ret === "continue") continue;
1539 offset.top = offset.top + height - actualHeight
1540 } 2729 }
1541 2730
1542 var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight) 2731 return createdDocument.body.innerHTML;
2732 }
1543 2733
1544 if (delta.left) offset.left += delta.left 2734 /**
1545 else offset.top += delta.top 2735 * ------------------------------------------------------------------------
2736 * Constants
2737 * ------------------------------------------------------------------------
2738 */
2739
2740 var NAME$6 = 'tooltip';
2741 var VERSION$6 = '4.3.1';
2742 var DATA_KEY$6 = 'bs.tooltip';
2743 var EVENT_KEY$6 = "." + DATA_KEY$6;
2744 var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6];
2745 var CLASS_PREFIX = 'bs-tooltip';
2746 var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
2747 var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
2748 var DefaultType$4 = {
2749 animation: 'boolean',
2750 template: 'string',
2751 title: '(string|element|function)',
2752 trigger: 'string',
2753 delay: '(number|object)',
2754 html: 'boolean',
2755 selector: '(string|boolean)',
2756 placement: '(string|function)',
2757 offset: '(number|string|function)',
2758 container: '(string|element|boolean)',
2759 fallbackPlacement: '(string|array)',
2760 boundary: '(string|element)',
2761 sanitize: 'boolean',
2762 sanitizeFn: '(null|function)',
2763 whiteList: 'object'
2764 };
2765 var AttachmentMap$1 = {
2766 AUTO: 'auto',
2767 TOP: 'top',
2768 RIGHT: 'right',
2769 BOTTOM: 'bottom',
2770 LEFT: 'left'
2771 };
2772 var Default$4 = {
2773 animation: true,
2774 template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
2775 trigger: 'hover focus',
2776 title: '',
2777 delay: 0,
2778 html: false,
2779 selector: false,
2780 placement: 'top',
2781 offset: 0,
2782 container: false,
2783 fallbackPlacement: 'flip',
2784 boundary: 'scrollParent',
2785 sanitize: true,
2786 sanitizeFn: null,
2787 whiteList: DefaultWhitelist
2788 };
2789 var HoverState = {
2790 SHOW: 'show',
2791 OUT: 'out'
2792 };
2793 var Event$6 = {
2794 HIDE: "hide" + EVENT_KEY$6,
2795 HIDDEN: "hidden" + EVENT_KEY$6,
2796 SHOW: "show" + EVENT_KEY$6,
2797 SHOWN: "shown" + EVENT_KEY$6,
2798 INSERTED: "inserted" + EVENT_KEY$6,
2799 CLICK: "click" + EVENT_KEY$6,
2800 FOCUSIN: "focusin" + EVENT_KEY$6,
2801 FOCUSOUT: "focusout" + EVENT_KEY$6,
2802 MOUSEENTER: "mouseenter" + EVENT_KEY$6,
2803 MOUSELEAVE: "mouseleave" + EVENT_KEY$6
2804 };
2805 var ClassName$6 = {
2806 FADE: 'fade',
2807 SHOW: 'show'
2808 };
2809 var Selector$6 = {
2810 TOOLTIP: '.tooltip',
2811 TOOLTIP_INNER: '.tooltip-inner',
2812 ARROW: '.arrow'
2813 };
2814 var Trigger = {
2815 HOVER: 'hover',
2816 FOCUS: 'focus',
2817 CLICK: 'click',
2818 MANUAL: 'manual'
2819 /**
2820 * ------------------------------------------------------------------------
2821 * Class Definition
2822 * ------------------------------------------------------------------------
2823 */
2824
2825 };
2826
2827 var Tooltip =
2828 /*#__PURE__*/
2829 function () {
2830 function Tooltip(element, config) {
2831 /**
2832 * Check for Popper dependency
2833 * Popper - https://popper.js.org
2834 */
2835 if (typeof Popper === 'undefined') {
2836 throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
2837 } // private
2838
2839
2840 this._isEnabled = true;
2841 this._timeout = 0;
2842 this._hoverState = '';
2843 this._activeTrigger = {};
2844 this._popper = null; // Protected
2845
2846 this.element = element;
2847 this.config = this._getConfig(config);
2848 this.tip = null;
2849
2850 this._setListeners();
2851 } // Getters
2852
2853
2854 var _proto = Tooltip.prototype;
2855
2856 // Public
2857 _proto.enable = function enable() {
2858 this._isEnabled = true;
2859 };
2860
2861 _proto.disable = function disable() {
2862 this._isEnabled = false;
2863 };
2864
2865 _proto.toggleEnabled = function toggleEnabled() {
2866 this._isEnabled = !this._isEnabled;
2867 };
2868
2869 _proto.toggle = function toggle(event) {
2870 if (!this._isEnabled) {
2871 return;
2872 }
1546 2873
1547 var isVertical = /top|bottom/.test(placement) 2874 if (event) {
1548 var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight 2875 var dataKey = this.constructor.DATA_KEY;
1549 var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight' 2876 var context = $(event.currentTarget).data(dataKey);
1550 2877
1551 $tip.offset(offset) 2878 if (!context) {
1552 this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical) 2879 context = new this.constructor(event.currentTarget, this._getDelegateConfig());
1553 } 2880 $(event.currentTarget).data(dataKey, context);
2881 }
1554 2882
1555 Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) { 2883 context._activeTrigger.click = !context._activeTrigger.click;
1556 this.arrow()
1557 .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
1558 .css(isVertical ? 'top' : 'left', '')
1559 }
1560 2884
1561 Tooltip.prototype.setContent = function () { 2885 if (context._isWithActiveTrigger()) {
1562 var $tip = this.tip() 2886 context._enter(null, context);
1563 var title = this.getTitle() 2887 } else {
2888 context._leave(null, context);
2889 }
2890 } else {
2891 if ($(this.getTipElement()).hasClass(ClassName$6.SHOW)) {
2892 this._leave(null, this);
1564 2893
1565 $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) 2894 return;
1566 $tip.removeClass('fade in top bottom left right') 2895 }
1567 } 2896
2897 this._enter(null, this);
2898 }
2899 };
1568 2900
1569 Tooltip.prototype.hide = function (callback) { 2901 _proto.dispose = function dispose() {
1570 var that = this 2902 clearTimeout(this._timeout);
1571 var $tip = $(this.$tip) 2903 $.removeData(this.element, this.constructor.DATA_KEY);
1572 var e = $.Event('hide.bs.' + this.type) 2904 $(this.element).off(this.constructor.EVENT_KEY);
2905 $(this.element).closest('.modal').off('hide.bs.modal');
1573 2906
1574 function complete() { 2907 if (this.tip) {
1575 if (that.hoverState != 'in') $tip.detach() 2908 $(this.tip).remove();
1576 if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
1577 that.$element
1578 .removeAttr('aria-describedby')
1579 .trigger('hidden.bs.' + that.type)
1580 } 2909 }
1581 callback && callback()
1582 }
1583 2910
1584 this.$element.trigger(e) 2911 this._isEnabled = null;
2912 this._timeout = null;
2913 this._hoverState = null;
2914 this._activeTrigger = null;
1585 2915
1586 if (e.isDefaultPrevented()) return 2916 if (this._popper !== null) {
2917 this._popper.destroy();
2918 }
1587 2919
1588 $tip.removeClass('in') 2920 this._popper = null;
2921 this.element = null;
2922 this.config = null;
2923 this.tip = null;
2924 };
1589 2925
1590 $.support.transition && $tip.hasClass('fade') ? 2926 _proto.show = function show() {
1591 $tip 2927 var _this = this;
1592 .one('bsTransitionEnd', complete)
1593 .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
1594 complete()
1595 2928
1596 this.hoverState = null 2929 if ($(this.element).css('display') === 'none') {
2930 throw new Error('Please use show on visible elements');
2931 }
1597 2932
1598 return this 2933 var showEvent = $.Event(this.constructor.Event.SHOW);
1599 }
1600 2934
1601 Tooltip.prototype.fixTitle = function () { 2935 if (this.isWithContent() && this._isEnabled) {
1602 var $e = this.$element 2936 $(this.element).trigger(showEvent);
1603 if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') { 2937 var shadowRoot = Util.findShadowRoot(this.element);
1604 $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') 2938 var isInTheDom = $.contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element);
1605 }
1606 }
1607 2939
1608 Tooltip.prototype.hasContent = function () { 2940 if (showEvent.isDefaultPrevented() || !isInTheDom) {
1609 return this.getTitle() 2941 return;
1610 } 2942 }
1611 2943
1612 Tooltip.prototype.getPosition = function ($element) { 2944 var tip = this.getTipElement();
1613 $element = $element || this.$element 2945 var tipId = Util.getUID(this.constructor.NAME);
2946 tip.setAttribute('id', tipId);
2947 this.element.setAttribute('aria-describedby', tipId);
2948 this.setContent();
1614 2949
1615 var el = $element[0] 2950 if (this.config.animation) {
1616 var isBody = el.tagName == 'BODY' 2951 $(tip).addClass(ClassName$6.FADE);
2952 }
1617 2953
1618 var elRect = el.getBoundingClientRect() 2954 var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
1619 if (elRect.width == null) {
1620 // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
1621 elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
1622 }
1623 var isSvg = window.SVGElement && el instanceof window.SVGElement
1624 // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
1625 // See https://github.com/twbs/bootstrap/issues/20280
1626 var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
1627 var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
1628 var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
1629
1630 return $.extend({}, elRect, scroll, outerDims, elOffset)
1631 }
1632 2955
1633 Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { 2956 var attachment = this._getAttachment(placement);
1634 return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1635 placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1636 placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
1637 /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
1638 2957
1639 } 2958 this.addAttachmentClass(attachment);
1640 2959
1641 Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) { 2960 var container = this._getContainer();
1642 var delta = { top: 0, left: 0 }
1643 if (!this.$viewport) return delta
1644 2961
1645 var viewportPadding = this.options.viewport && this.options.viewport.padding || 0 2962 $(tip).data(this.constructor.DATA_KEY, this);
1646 var viewportDimensions = this.getPosition(this.$viewport)
1647 2963
1648 if (/right|left/.test(placement)) { 2964 if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) {
1649 var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll 2965 $(tip).appendTo(container);
1650 var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight 2966 }
1651 if (topEdgeOffset < viewportDimensions.top) { // top overflow 2967
1652 delta.top = viewportDimensions.top - topEdgeOffset 2968 $(this.element).trigger(this.constructor.Event.INSERTED);
1653 } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow 2969 this._popper = new Popper(this.element, tip, {
1654 delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset 2970 placement: attachment,
1655 } 2971 modifiers: {
1656 } else { 2972 offset: this._getOffset(),
1657 var leftEdgeOffset = pos.left - viewportPadding 2973 flip: {
1658 var rightEdgeOffset = pos.left + viewportPadding + actualWidth 2974 behavior: this.config.fallbackPlacement
1659 if (leftEdgeOffset < viewportDimensions.left) { // left overflow 2975 },
1660 delta.left = viewportDimensions.left - leftEdgeOffset 2976 arrow: {
1661 } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow 2977 element: Selector$6.ARROW
1662 delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset 2978 },
2979 preventOverflow: {
2980 boundariesElement: this.config.boundary
2981 }
2982 },
2983 onCreate: function onCreate(data) {
2984 if (data.originalPlacement !== data.placement) {
2985 _this._handlePopperPlacementChange(data);
2986 }
2987 },
2988 onUpdate: function onUpdate(data) {
2989 return _this._handlePopperPlacementChange(data);
2990 }
2991 });
2992 $(tip).addClass(ClassName$6.SHOW); // If this is a touch-enabled device we add extra
2993 // empty mouseover listeners to the body's immediate children;
2994 // only needed because of broken event delegation on iOS
2995 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
2996
2997 if ('ontouchstart' in document.documentElement) {
2998 $(document.body).children().on('mouseover', null, $.noop);
2999 }
3000
3001 var complete = function complete() {
3002 if (_this.config.animation) {
3003 _this._fixTransition();
3004 }
3005
3006 var prevHoverState = _this._hoverState;
3007 _this._hoverState = null;
3008 $(_this.element).trigger(_this.constructor.Event.SHOWN);
3009
3010 if (prevHoverState === HoverState.OUT) {
3011 _this._leave(null, _this);
3012 }
3013 };
3014
3015 if ($(this.tip).hasClass(ClassName$6.FADE)) {
3016 var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
3017 $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
3018 } else {
3019 complete();
3020 }
1663 } 3021 }
1664 } 3022 };
1665 3023
1666 return delta 3024 _proto.hide = function hide(callback) {
1667 } 3025 var _this2 = this;
1668 3026
1669 Tooltip.prototype.getTitle = function () { 3027 var tip = this.getTipElement();
1670 var title 3028 var hideEvent = $.Event(this.constructor.Event.HIDE);
1671 var $e = this.$element
1672 var o = this.options
1673 3029
1674 title = $e.attr('data-original-title') 3030 var complete = function complete() {
1675 || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) 3031 if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
3032 tip.parentNode.removeChild(tip);
3033 }
1676 3034
1677 return title 3035 _this2._cleanTipClass();
1678 }
1679 3036
1680 Tooltip.prototype.getUID = function (prefix) { 3037 _this2.element.removeAttribute('aria-describedby');
1681 do prefix += ~~(Math.random() * 1000000) 3038
1682 while (document.getElementById(prefix)) 3039 $(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
1683 return prefix
1684 }
1685 3040
1686 Tooltip.prototype.tip = function () { 3041 if (_this2._popper !== null) {
1687 if (!this.$tip) { 3042 _this2._popper.destroy();
1688 this.$tip = $(this.options.template) 3043 }
1689 if (this.$tip.length != 1) { 3044
1690 throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!') 3045 if (callback) {
3046 callback();
3047 }
3048 };
3049
3050 $(this.element).trigger(hideEvent);
3051
3052 if (hideEvent.isDefaultPrevented()) {
3053 return;
1691 } 3054 }
1692 }
1693 return this.$tip
1694 }
1695 3055
1696 Tooltip.prototype.arrow = function () { 3056 $(tip).removeClass(ClassName$6.SHOW); // If this is a touch-enabled device we remove the extra
1697 return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')) 3057 // empty mouseover listeners we added for iOS support
1698 }
1699 3058
1700 Tooltip.prototype.enable = function () { 3059 if ('ontouchstart' in document.documentElement) {
1701 this.enabled = true 3060 $(document.body).children().off('mouseover', null, $.noop);
1702 } 3061 }
1703 3062
1704 Tooltip.prototype.disable = function () { 3063 this._activeTrigger[Trigger.CLICK] = false;
1705 this.enabled = false 3064 this._activeTrigger[Trigger.FOCUS] = false;
1706 } 3065 this._activeTrigger[Trigger.HOVER] = false;
1707 3066
1708 Tooltip.prototype.toggleEnabled = function () { 3067 if ($(this.tip).hasClass(ClassName$6.FADE)) {
1709 this.enabled = !this.enabled 3068 var transitionDuration = Util.getTransitionDurationFromElement(tip);
1710 } 3069 $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
3070 } else {
3071 complete();
3072 }
1711 3073
1712 Tooltip.prototype.toggle = function (e) { 3074 this._hoverState = '';
1713 var self = this 3075 };
1714 if (e) { 3076
1715 self = $(e.currentTarget).data('bs.' + this.type) 3077 _proto.update = function update() {
1716 if (!self) { 3078 if (this._popper !== null) {
1717 self = new this.constructor(e.currentTarget, this.getDelegateOptions()) 3079 this._popper.scheduleUpdate();
1718 $(e.currentTarget).data('bs.' + this.type, self)
1719 } 3080 }
1720 } 3081 } // Protected
3082 ;
3083
3084 _proto.isWithContent = function isWithContent() {
3085 return Boolean(this.getTitle());
3086 };
3087
3088 _proto.addAttachmentClass = function addAttachmentClass(attachment) {
3089 $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment);
3090 };
3091
3092 _proto.getTipElement = function getTipElement() {
3093 this.tip = this.tip || $(this.config.template)[0];
3094 return this.tip;
3095 };
3096
3097 _proto.setContent = function setContent() {
3098 var tip = this.getTipElement();
3099 this.setElementContent($(tip.querySelectorAll(Selector$6.TOOLTIP_INNER)), this.getTitle());
3100 $(tip).removeClass(ClassName$6.FADE + " " + ClassName$6.SHOW);
3101 };
3102
3103 _proto.setElementContent = function setElementContent($element, content) {
3104 if (typeof content === 'object' && (content.nodeType || content.jquery)) {
3105 // Content is a DOM node or a jQuery
3106 if (this.config.html) {
3107 if (!$(content).parent().is($element)) {
3108 $element.empty().append(content);
3109 }
3110 } else {
3111 $element.text($(content).text());
3112 }
1721 3113
1722 if (e) { 3114 return;
1723 self.inState.click = !self.inState.click 3115 }
1724 if (self.isInStateTrue()) self.enter(self)
1725 else self.leave(self)
1726 } else {
1727 self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
1728 }
1729 }
1730 3116
1731 Tooltip.prototype.destroy = function () { 3117 if (this.config.html) {
1732 var that = this 3118 if (this.config.sanitize) {
1733 clearTimeout(this.timeout) 3119 content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
1734 this.hide(function () { 3120 }
1735 that.$element.off('.' + that.type).removeData('bs.' + that.type)
1736 if (that.$tip) {
1737 that.$tip.detach()
1738 }
1739 that.$tip = null
1740 that.$arrow = null
1741 that.$viewport = null
1742 that.$element = null
1743 })
1744 }
1745 3121
3122 $element.html(content);
3123 } else {
3124 $element.text(content);
3125 }
3126 };
1746 3127
1747 // TOOLTIP PLUGIN DEFINITION 3128 _proto.getTitle = function getTitle() {
1748 // ========================= 3129 var title = this.element.getAttribute('data-original-title');
1749 3130
1750 function Plugin(option) { 3131 if (!title) {
1751 return this.each(function () { 3132 title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
1752 var $this = $(this) 3133 }
1753 var data = $this.data('bs.tooltip')
1754 var options = typeof option == 'object' && option
1755 3134
1756 if (!data && /destroy|hide/.test(option)) return 3135 return title;
1757 if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) 3136 } // Private
1758 if (typeof option == 'string') data[option]() 3137 ;
1759 })
1760 }
1761 3138
1762 var old = $.fn.tooltip 3139 _proto._getOffset = function _getOffset() {
3140 var _this3 = this;
1763 3141
1764 $.fn.tooltip = Plugin 3142 var offset = {};
1765 $.fn.tooltip.Constructor = Tooltip
1766 3143
3144 if (typeof this.config.offset === 'function') {
3145 offset.fn = function (data) {
3146 data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {});
3147 return data;
3148 };
3149 } else {
3150 offset.offset = this.config.offset;
3151 }
1767 3152
1768 // TOOLTIP NO CONFLICT 3153 return offset;
1769 // =================== 3154 };
1770 3155
1771 $.fn.tooltip.noConflict = function () { 3156 _proto._getContainer = function _getContainer() {
1772 $.fn.tooltip = old 3157 if (this.config.container === false) {
1773 return this 3158 return document.body;
1774 } 3159 }
1775 3160
1776}(jQuery); 3161 if (Util.isElement(this.config.container)) {
3162 return $(this.config.container);
3163 }
1777 3164
1778/* ======================================================================== 3165 return $(document).find(this.config.container);
1779 * Bootstrap: popover.js v3.3.7 3166 };
1780 * http://getbootstrap.com/javascript/#popovers 3167
1781 * ======================================================================== 3168 _proto._getAttachment = function _getAttachment(placement) {
1782 * Copyright 2011-2016 Twitter, Inc. 3169 return AttachmentMap$1[placement.toUpperCase()];
1783 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 3170 };
1784 * ======================================================================== */ 3171
3172 _proto._setListeners = function _setListeners() {
3173 var _this4 = this;
3174
3175 var triggers = this.config.trigger.split(' ');
3176 triggers.forEach(function (trigger) {
3177 if (trigger === 'click') {
3178 $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) {
3179 return _this4.toggle(event);
3180 });
3181 } else if (trigger !== Trigger.MANUAL) {
3182 var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN;
3183 var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT;
3184 $(_this4.element).on(eventIn, _this4.config.selector, function (event) {
3185 return _this4._enter(event);
3186 }).on(eventOut, _this4.config.selector, function (event) {
3187 return _this4._leave(event);
3188 });
3189 }
3190 });
3191 $(this.element).closest('.modal').on('hide.bs.modal', function () {
3192 if (_this4.element) {
3193 _this4.hide();
3194 }
3195 });
1785 3196
3197 if (this.config.selector) {
3198 this.config = _objectSpread({}, this.config, {
3199 trigger: 'manual',
3200 selector: ''
3201 });
3202 } else {
3203 this._fixTitle();
3204 }
3205 };
1786 3206
1787+function ($) { 3207 _proto._fixTitle = function _fixTitle() {
1788 'use strict'; 3208 var titleType = typeof this.element.getAttribute('data-original-title');
1789 3209
1790 // POPOVER PUBLIC CLASS DEFINITION 3210 if (this.element.getAttribute('title') || titleType !== 'string') {
1791 // =============================== 3211 this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
3212 this.element.setAttribute('title', '');
3213 }
3214 };
1792 3215
1793 var Popover = function (element, options) { 3216 _proto._enter = function _enter(event, context) {
1794 this.init('popover', element, options) 3217 var dataKey = this.constructor.DATA_KEY;
1795 } 3218 context = context || $(event.currentTarget).data(dataKey);
1796 3219
1797 if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') 3220 if (!context) {
3221 context = new this.constructor(event.currentTarget, this._getDelegateConfig());
3222 $(event.currentTarget).data(dataKey, context);
3223 }
1798 3224
1799 Popover.VERSION = '3.3.7' 3225 if (event) {
3226 context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
3227 }
1800 3228
1801 Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { 3229 if ($(context.getTipElement()).hasClass(ClassName$6.SHOW) || context._hoverState === HoverState.SHOW) {
1802 placement: 'right', 3230 context._hoverState = HoverState.SHOW;
1803 trigger: 'click', 3231 return;
1804 content: '', 3232 }
1805 template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
1806 })
1807 3233
3234 clearTimeout(context._timeout);
3235 context._hoverState = HoverState.SHOW;
1808 3236
1809 // NOTE: POPOVER EXTENDS tooltip.js 3237 if (!context.config.delay || !context.config.delay.show) {
1810 // ================================ 3238 context.show();
3239 return;
3240 }
1811 3241
1812 Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) 3242 context._timeout = setTimeout(function () {
3243 if (context._hoverState === HoverState.SHOW) {
3244 context.show();
3245 }
3246 }, context.config.delay.show);
3247 };
1813 3248
1814 Popover.prototype.constructor = Popover 3249 _proto._leave = function _leave(event, context) {
3250 var dataKey = this.constructor.DATA_KEY;
3251 context = context || $(event.currentTarget).data(dataKey);
1815 3252
1816 Popover.prototype.getDefaults = function () { 3253 if (!context) {
1817 return Popover.DEFAULTS 3254 context = new this.constructor(event.currentTarget, this._getDelegateConfig());
1818 } 3255 $(event.currentTarget).data(dataKey, context);
3256 }
1819 3257
1820 Popover.prototype.setContent = function () { 3258 if (event) {
1821 var $tip = this.tip() 3259 context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
1822 var title = this.getTitle() 3260 }
1823 var content = this.getContent()
1824 3261
1825 $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) 3262 if (context._isWithActiveTrigger()) {
1826 $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events 3263 return;
1827 this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' 3264 }
1828 ](content)
1829 3265
1830 $tip.removeClass('fade top bottom left right in') 3266 clearTimeout(context._timeout);
3267 context._hoverState = HoverState.OUT;
1831 3268
1832 // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do 3269 if (!context.config.delay || !context.config.delay.hide) {
1833 // this manually by checking the contents. 3270 context.hide();
1834 if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() 3271 return;
1835 } 3272 }
1836 3273
1837 Popover.prototype.hasContent = function () { 3274 context._timeout = setTimeout(function () {
1838 return this.getTitle() || this.getContent() 3275 if (context._hoverState === HoverState.OUT) {
1839 } 3276 context.hide();
3277 }
3278 }, context.config.delay.hide);
3279 };
1840 3280
1841 Popover.prototype.getContent = function () { 3281 _proto._isWithActiveTrigger = function _isWithActiveTrigger() {
1842 var $e = this.$element 3282 for (var trigger in this._activeTrigger) {
1843 var o = this.options 3283 if (this._activeTrigger[trigger]) {
3284 return true;
3285 }
3286 }
1844 3287
1845 return $e.attr('data-content') 3288 return false;
1846 || (typeof o.content == 'function' ? 3289 };
1847 o.content.call($e[0]) :
1848 o.content)
1849 }
1850 3290
1851 Popover.prototype.arrow = function () { 3291 _proto._getConfig = function _getConfig(config) {
1852 return (this.$arrow = this.$arrow || this.tip().find('.arrow')) 3292 var dataAttributes = $(this.element).data();
1853 } 3293 Object.keys(dataAttributes).forEach(function (dataAttr) {
3294 if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
3295 delete dataAttributes[dataAttr];
3296 }
3297 });
3298 config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
3299
3300 if (typeof config.delay === 'number') {
3301 config.delay = {
3302 show: config.delay,
3303 hide: config.delay
3304 };
3305 }
1854 3306
3307 if (typeof config.title === 'number') {
3308 config.title = config.title.toString();
3309 }
1855 3310
1856 // POPOVER PLUGIN DEFINITION 3311 if (typeof config.content === 'number') {
1857 // ========================= 3312 config.content = config.content.toString();
3313 }
1858 3314
1859 function Plugin(option) { 3315 Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType);
1860 return this.each(function () {
1861 var $this = $(this)
1862 var data = $this.data('bs.popover')
1863 var options = typeof option == 'object' && option
1864 3316
1865 if (!data && /destroy|hide/.test(option)) return 3317 if (config.sanitize) {
1866 if (!data) $this.data('bs.popover', (data = new Popover(this, options))) 3318 config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
1867 if (typeof option == 'string') data[option]() 3319 }
1868 })
1869 }
1870 3320
1871 var old = $.fn.popover 3321 return config;
3322 };
1872 3323
1873 $.fn.popover = Plugin 3324 _proto._getDelegateConfig = function _getDelegateConfig() {
1874 $.fn.popover.Constructor = Popover 3325 var config = {};
1875 3326
3327 if (this.config) {
3328 for (var key in this.config) {
3329 if (this.constructor.Default[key] !== this.config[key]) {
3330 config[key] = this.config[key];
3331 }
3332 }
3333 }
1876 3334
1877 // POPOVER NO CONFLICT 3335 return config;
1878 // =================== 3336 };
1879 3337
1880 $.fn.popover.noConflict = function () { 3338 _proto._cleanTipClass = function _cleanTipClass() {
1881 $.fn.popover = old 3339 var $tip = $(this.getTipElement());
1882 return this 3340 var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
1883 }
1884 3341
1885}(jQuery); 3342 if (tabClass !== null && tabClass.length) {
3343 $tip.removeClass(tabClass.join(''));
3344 }
3345 };
1886 3346
1887/* ======================================================================== 3347 _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
1888 * Bootstrap: scrollspy.js v3.3.7 3348 var popperInstance = popperData.instance;
1889 * http://getbootstrap.com/javascript/#scrollspy 3349 this.tip = popperInstance.popper;
1890 * ========================================================================
1891 * Copyright 2011-2016 Twitter, Inc.
1892 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1893 * ======================================================================== */
1894 3350
3351 this._cleanTipClass();
1895 3352
1896+function ($) { 3353 this.addAttachmentClass(this._getAttachment(popperData.placement));
1897 'use strict'; 3354 };
1898 3355
1899 // SCROLLSPY CLASS DEFINITION 3356 _proto._fixTransition = function _fixTransition() {
1900 // ========================== 3357 var tip = this.getTipElement();
3358 var initConfigAnimation = this.config.animation;
1901 3359
1902 function ScrollSpy(element, options) { 3360 if (tip.getAttribute('x-placement') !== null) {
1903 this.$body = $(document.body) 3361 return;
1904 this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) 3362 }
1905 this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
1906 this.selector = (this.options.target || '') + ' .nav li > a'
1907 this.offsets = []
1908 this.targets = []
1909 this.activeTarget = null
1910 this.scrollHeight = 0
1911 3363
1912 this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) 3364 $(tip).removeClass(ClassName$6.FADE);
1913 this.refresh() 3365 this.config.animation = false;
1914 this.process() 3366 this.hide();
1915 } 3367 this.show();
3368 this.config.animation = initConfigAnimation;
3369 } // Static
3370 ;
1916 3371
1917 ScrollSpy.VERSION = '3.3.7' 3372 Tooltip._jQueryInterface = function _jQueryInterface(config) {
3373 return this.each(function () {
3374 var data = $(this).data(DATA_KEY$6);
1918 3375
1919 ScrollSpy.DEFAULTS = { 3376 var _config = typeof config === 'object' && config;
1920 offset: 10
1921 }
1922 3377
1923 ScrollSpy.prototype.getScrollHeight = function () { 3378 if (!data && /dispose|hide/.test(config)) {
1924 return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) 3379 return;
1925 } 3380 }
1926 3381
1927 ScrollSpy.prototype.refresh = function () { 3382 if (!data) {
1928 var that = this 3383 data = new Tooltip(this, _config);
1929 var offsetMethod = 'offset' 3384 $(this).data(DATA_KEY$6, data);
1930 var offsetBase = 0 3385 }
3386
3387 if (typeof config === 'string') {
3388 if (typeof data[config] === 'undefined') {
3389 throw new TypeError("No method named \"" + config + "\"");
3390 }
1931 3391
1932 this.offsets = [] 3392 data[config]();
1933 this.targets = [] 3393 }
1934 this.scrollHeight = this.getScrollHeight() 3394 });
3395 };
1935 3396
1936 if (!$.isWindow(this.$scrollElement[0])) { 3397 _createClass(Tooltip, null, [{
1937 offsetMethod = 'position' 3398 key: "VERSION",
1938 offsetBase = this.$scrollElement.scrollTop() 3399 get: function get() {
3400 return VERSION$6;
3401 }
3402 }, {
3403 key: "Default",
3404 get: function get() {
3405 return Default$4;
3406 }
3407 }, {
3408 key: "NAME",
3409 get: function get() {
3410 return NAME$6;
3411 }
3412 }, {
3413 key: "DATA_KEY",
3414 get: function get() {
3415 return DATA_KEY$6;
3416 }
3417 }, {
3418 key: "Event",
3419 get: function get() {
3420 return Event$6;
3421 }
3422 }, {
3423 key: "EVENT_KEY",
3424 get: function get() {
3425 return EVENT_KEY$6;
3426 }
3427 }, {
3428 key: "DefaultType",
3429 get: function get() {
3430 return DefaultType$4;
3431 }
3432 }]);
3433
3434 return Tooltip;
3435 }();
3436 /**
3437 * ------------------------------------------------------------------------
3438 * jQuery
3439 * ------------------------------------------------------------------------
3440 */
3441
3442
3443 $.fn[NAME$6] = Tooltip._jQueryInterface;
3444 $.fn[NAME$6].Constructor = Tooltip;
3445
3446 $.fn[NAME$6].noConflict = function () {
3447 $.fn[NAME$6] = JQUERY_NO_CONFLICT$6;
3448 return Tooltip._jQueryInterface;
3449 };
3450
3451 /**
3452 * ------------------------------------------------------------------------
3453 * Constants
3454 * ------------------------------------------------------------------------
3455 */
3456
3457 var NAME$7 = 'popover';
3458 var VERSION$7 = '4.3.1';
3459 var DATA_KEY$7 = 'bs.popover';
3460 var EVENT_KEY$7 = "." + DATA_KEY$7;
3461 var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7];
3462 var CLASS_PREFIX$1 = 'bs-popover';
3463 var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g');
3464
3465 var Default$5 = _objectSpread({}, Tooltip.Default, {
3466 placement: 'right',
3467 trigger: 'click',
3468 content: '',
3469 template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
3470 });
3471
3472 var DefaultType$5 = _objectSpread({}, Tooltip.DefaultType, {
3473 content: '(string|element|function)'
3474 });
3475
3476 var ClassName$7 = {
3477 FADE: 'fade',
3478 SHOW: 'show'
3479 };
3480 var Selector$7 = {
3481 TITLE: '.popover-header',
3482 CONTENT: '.popover-body'
3483 };
3484 var Event$7 = {
3485 HIDE: "hide" + EVENT_KEY$7,
3486 HIDDEN: "hidden" + EVENT_KEY$7,
3487 SHOW: "show" + EVENT_KEY$7,
3488 SHOWN: "shown" + EVENT_KEY$7,
3489 INSERTED: "inserted" + EVENT_KEY$7,
3490 CLICK: "click" + EVENT_KEY$7,
3491 FOCUSIN: "focusin" + EVENT_KEY$7,
3492 FOCUSOUT: "focusout" + EVENT_KEY$7,
3493 MOUSEENTER: "mouseenter" + EVENT_KEY$7,
3494 MOUSELEAVE: "mouseleave" + EVENT_KEY$7
3495 /**
3496 * ------------------------------------------------------------------------
3497 * Class Definition
3498 * ------------------------------------------------------------------------
3499 */
3500
3501 };
3502
3503 var Popover =
3504 /*#__PURE__*/
3505 function (_Tooltip) {
3506 _inheritsLoose(Popover, _Tooltip);
3507
3508 function Popover() {
3509 return _Tooltip.apply(this, arguments) || this;
1939 } 3510 }
1940 3511
1941 this.$body 3512 var _proto = Popover.prototype;
1942 .find(this.selector)
1943 .map(function () {
1944 var $el = $(this)
1945 var href = $el.data('target') || $el.attr('href')
1946 var $href = /^#./.test(href) && $(href)
1947
1948 return ($href
1949 && $href.length
1950 && $href.is(':visible')
1951 && [[$href[offsetMethod]().top + offsetBase, href]]) || null
1952 })
1953 .sort(function (a, b) { return a[0] - b[0] })
1954 .each(function () {
1955 that.offsets.push(this[0])
1956 that.targets.push(this[1])
1957 })
1958 }
1959 3513
1960 ScrollSpy.prototype.process = function () { 3514 // Overrides
1961 var scrollTop = this.$scrollElement.scrollTop() + this.options.offset 3515 _proto.isWithContent = function isWithContent() {
1962 var scrollHeight = this.getScrollHeight() 3516 return this.getTitle() || this._getContent();
1963 var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() 3517 };
1964 var offsets = this.offsets
1965 var targets = this.targets
1966 var activeTarget = this.activeTarget
1967 var i
1968
1969 if (this.scrollHeight != scrollHeight) {
1970 this.refresh()
1971 }
1972 3518
1973 if (scrollTop >= maxScroll) { 3519 _proto.addAttachmentClass = function addAttachmentClass(attachment) {
1974 return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) 3520 $(this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment);
1975 } 3521 };
1976 3522
1977 if (activeTarget && scrollTop < offsets[0]) { 3523 _proto.getTipElement = function getTipElement() {
1978 this.activeTarget = null 3524 this.tip = this.tip || $(this.config.template)[0];
1979 return this.clear() 3525 return this.tip;
1980 } 3526 };
1981 3527
1982 for (i = offsets.length; i--;) { 3528 _proto.setContent = function setContent() {
1983 activeTarget != targets[i] 3529 var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events
1984 && scrollTop >= offsets[i]
1985 && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
1986 && this.activate(targets[i])
1987 }
1988 }
1989 3530
1990 ScrollSpy.prototype.activate = function (target) { 3531 this.setElementContent($tip.find(Selector$7.TITLE), this.getTitle());
1991 this.activeTarget = target
1992 3532
1993 this.clear() 3533 var content = this._getContent();
1994 3534
1995 var selector = this.selector + 3535 if (typeof content === 'function') {
1996 '[data-target="' + target + '"],' + 3536 content = content.call(this.element);
1997 this.selector + '[href="' + target + '"]' 3537 }
1998 3538
1999 var active = $(selector) 3539 this.setElementContent($tip.find(Selector$7.CONTENT), content);
2000 .parents('li') 3540 $tip.removeClass(ClassName$7.FADE + " " + ClassName$7.SHOW);
2001 .addClass('active') 3541 } // Private
3542 ;
2002 3543
2003 if (active.parent('.dropdown-menu').length) { 3544 _proto._getContent = function _getContent() {
2004 active = active 3545 return this.element.getAttribute('data-content') || this.config.content;
2005 .closest('li.dropdown') 3546 };
2006 .addClass('active')
2007 }
2008 3547
2009 active.trigger('activate.bs.scrollspy') 3548 _proto._cleanTipClass = function _cleanTipClass() {
2010 } 3549 var $tip = $(this.getTipElement());
3550 var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1);
2011 3551
2012 ScrollSpy.prototype.clear = function () { 3552 if (tabClass !== null && tabClass.length > 0) {
2013 $(this.selector) 3553 $tip.removeClass(tabClass.join(''));
2014 .parentsUntil(this.options.target, '.active') 3554 }
2015 .removeClass('active') 3555 } // Static
2016 } 3556 ;
2017 3557
3558 Popover._jQueryInterface = function _jQueryInterface(config) {
3559 return this.each(function () {
3560 var data = $(this).data(DATA_KEY$7);
2018 3561
2019 // SCROLLSPY PLUGIN DEFINITION 3562 var _config = typeof config === 'object' ? config : null;
2020 // ===========================
2021 3563
2022 function Plugin(option) { 3564 if (!data && /dispose|hide/.test(config)) {
2023 return this.each(function () { 3565 return;
2024 var $this = $(this) 3566 }
2025 var data = $this.data('bs.scrollspy')
2026 var options = typeof option == 'object' && option
2027 3567
2028 if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) 3568 if (!data) {
2029 if (typeof option == 'string') data[option]() 3569 data = new Popover(this, _config);
2030 }) 3570 $(this).data(DATA_KEY$7, data);
2031 } 3571 }
2032 3572
2033 var old = $.fn.scrollspy 3573 if (typeof config === 'string') {
3574 if (typeof data[config] === 'undefined') {
3575 throw new TypeError("No method named \"" + config + "\"");
3576 }
2034 3577
2035 $.fn.scrollspy = Plugin 3578 data[config]();
2036 $.fn.scrollspy.Constructor = ScrollSpy 3579 }
3580 });
3581 };
3582
3583 _createClass(Popover, null, [{
3584 key: "VERSION",
3585 // Getters
3586 get: function get() {
3587 return VERSION$7;
3588 }
3589 }, {
3590 key: "Default",
3591 get: function get() {
3592 return Default$5;
3593 }
3594 }, {
3595 key: "NAME",
3596 get: function get() {
3597 return NAME$7;
3598 }
3599 }, {
3600 key: "DATA_KEY",
3601 get: function get() {
3602 return DATA_KEY$7;
3603 }
3604 }, {
3605 key: "Event",
3606 get: function get() {
3607 return Event$7;
3608 }
3609 }, {
3610 key: "EVENT_KEY",
3611 get: function get() {
3612 return EVENT_KEY$7;
3613 }
3614 }, {
3615 key: "DefaultType",
3616 get: function get() {
3617 return DefaultType$5;
3618 }
3619 }]);
3620
3621 return Popover;
3622 }(Tooltip);
3623 /**
3624 * ------------------------------------------------------------------------
3625 * jQuery
3626 * ------------------------------------------------------------------------
3627 */
3628
3629
3630 $.fn[NAME$7] = Popover._jQueryInterface;
3631 $.fn[NAME$7].Constructor = Popover;
3632
3633 $.fn[NAME$7].noConflict = function () {
3634 $.fn[NAME$7] = JQUERY_NO_CONFLICT$7;
3635 return Popover._jQueryInterface;
3636 };
3637
3638 /**
3639 * ------------------------------------------------------------------------
3640 * Constants
3641 * ------------------------------------------------------------------------
3642 */
3643
3644 var NAME$8 = 'scrollspy';
3645 var VERSION$8 = '4.3.1';
3646 var DATA_KEY$8 = 'bs.scrollspy';
3647 var EVENT_KEY$8 = "." + DATA_KEY$8;
3648 var DATA_API_KEY$6 = '.data-api';
3649 var JQUERY_NO_CONFLICT$8 = $.fn[NAME$8];
3650 var Default$6 = {
3651 offset: 10,
3652 method: 'auto',
3653 target: ''
3654 };
3655 var DefaultType$6 = {
3656 offset: 'number',
3657 method: 'string',
3658 target: '(string|element)'
3659 };
3660 var Event$8 = {
3661 ACTIVATE: "activate" + EVENT_KEY$8,
3662 SCROLL: "scroll" + EVENT_KEY$8,
3663 LOAD_DATA_API: "load" + EVENT_KEY$8 + DATA_API_KEY$6
3664 };
3665 var ClassName$8 = {
3666 DROPDOWN_ITEM: 'dropdown-item',
3667 DROPDOWN_MENU: 'dropdown-menu',
3668 ACTIVE: 'active'
3669 };
3670 var Selector$8 = {
3671 DATA_SPY: '[data-spy="scroll"]',
3672 ACTIVE: '.active',
3673 NAV_LIST_GROUP: '.nav, .list-group',
3674 NAV_LINKS: '.nav-link',
3675 NAV_ITEMS: '.nav-item',
3676 LIST_ITEMS: '.list-group-item',
3677 DROPDOWN: '.dropdown',
3678 DROPDOWN_ITEMS: '.dropdown-item',
3679 DROPDOWN_TOGGLE: '.dropdown-toggle'
3680 };
3681 var OffsetMethod = {
3682 OFFSET: 'offset',
3683 POSITION: 'position'
3684 /**
3685 * ------------------------------------------------------------------------
3686 * Class Definition
3687 * ------------------------------------------------------------------------
3688 */
3689
3690 };
3691
3692 var ScrollSpy =
3693 /*#__PURE__*/
3694 function () {
3695 function ScrollSpy(element, config) {
3696 var _this = this;
3697
3698 this._element = element;
3699 this._scrollElement = element.tagName === 'BODY' ? window : element;
3700 this._config = this._getConfig(config);
3701 this._selector = this._config.target + " " + Selector$8.NAV_LINKS + "," + (this._config.target + " " + Selector$8.LIST_ITEMS + ",") + (this._config.target + " " + Selector$8.DROPDOWN_ITEMS);
3702 this._offsets = [];
3703 this._targets = [];
3704 this._activeTarget = null;
3705 this._scrollHeight = 0;
3706 $(this._scrollElement).on(Event$8.SCROLL, function (event) {
3707 return _this._process(event);
3708 });
3709 this.refresh();
3710
3711 this._process();
3712 } // Getters
3713
3714
3715 var _proto = ScrollSpy.prototype;
3716
3717 // Public
3718 _proto.refresh = function refresh() {
3719 var _this2 = this;
3720
3721 var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION;
3722 var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
3723 var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
3724 this._offsets = [];
3725 this._targets = [];
3726 this._scrollHeight = this._getScrollHeight();
3727 var targets = [].slice.call(document.querySelectorAll(this._selector));
3728 targets.map(function (element) {
3729 var target;
3730 var targetSelector = Util.getSelectorFromElement(element);
3731
3732 if (targetSelector) {
3733 target = document.querySelector(targetSelector);
3734 }
2037 3735
3736 if (target) {
3737 var targetBCR = target.getBoundingClientRect();
2038 3738
2039 // SCROLLSPY NO CONFLICT 3739 if (targetBCR.width || targetBCR.height) {
2040 // ===================== 3740 // TODO (fat): remove sketch reliance on jQuery position/offset
3741 return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
3742 }
3743 }
2041 3744
2042 $.fn.scrollspy.noConflict = function () { 3745 return null;
2043 $.fn.scrollspy = old 3746 }).filter(function (item) {
2044 return this 3747 return item;
2045 } 3748 }).sort(function (a, b) {
3749 return a[0] - b[0];
3750 }).forEach(function (item) {
3751 _this2._offsets.push(item[0]);
3752
3753 _this2._targets.push(item[1]);
3754 });
3755 };
3756
3757 _proto.dispose = function dispose() {
3758 $.removeData(this._element, DATA_KEY$8);
3759 $(this._scrollElement).off(EVENT_KEY$8);
3760 this._element = null;
3761 this._scrollElement = null;
3762 this._config = null;
3763 this._selector = null;
3764 this._offsets = null;
3765 this._targets = null;
3766 this._activeTarget = null;
3767 this._scrollHeight = null;
3768 } // Private
3769 ;
3770
3771 _proto._getConfig = function _getConfig(config) {
3772 config = _objectSpread({}, Default$6, typeof config === 'object' && config ? config : {});
3773
3774 if (typeof config.target !== 'string') {
3775 var id = $(config.target).attr('id');
3776
3777 if (!id) {
3778 id = Util.getUID(NAME$8);
3779 $(config.target).attr('id', id);
3780 }
2046 3781
3782 config.target = "#" + id;
3783 }
2047 3784
2048 // SCROLLSPY DATA-API 3785 Util.typeCheckConfig(NAME$8, config, DefaultType$6);
2049 // ================== 3786 return config;
3787 };
2050 3788
2051 $(window).on('load.bs.scrollspy.data-api', function () { 3789 _proto._getScrollTop = function _getScrollTop() {
2052 $('[data-spy="scroll"]').each(function () { 3790 return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
2053 var $spy = $(this) 3791 };
2054 Plugin.call($spy, $spy.data())
2055 })
2056 })
2057 3792
2058}(jQuery); 3793 _proto._getScrollHeight = function _getScrollHeight() {
3794 return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
3795 };
2059 3796
2060/* ======================================================================== 3797 _proto._getOffsetHeight = function _getOffsetHeight() {
2061 * Bootstrap: tab.js v3.3.7 3798 return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
2062 * http://getbootstrap.com/javascript/#tabs 3799 };
2063 * ========================================================================
2064 * Copyright 2011-2016 Twitter, Inc.
2065 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2066 * ======================================================================== */
2067 3800
3801 _proto._process = function _process() {
3802 var scrollTop = this._getScrollTop() + this._config.offset;
2068 3803
2069+function ($) { 3804 var scrollHeight = this._getScrollHeight();
2070 'use strict';
2071 3805
2072 // TAB CLASS DEFINITION 3806 var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
2073 // ====================
2074 3807
2075 var Tab = function (element) { 3808 if (this._scrollHeight !== scrollHeight) {
2076 // jscs:disable requireDollarBeforejQueryAssignment 3809 this.refresh();
2077 this.element = $(element) 3810 }
2078 // jscs:enable requireDollarBeforejQueryAssignment
2079 }
2080 3811
2081 Tab.VERSION = '3.3.7' 3812 if (scrollTop >= maxScroll) {
3813 var target = this._targets[this._targets.length - 1];
2082 3814
2083 Tab.TRANSITION_DURATION = 150 3815 if (this._activeTarget !== target) {
3816 this._activate(target);
3817 }
2084 3818
2085 Tab.prototype.show = function () { 3819 return;
2086 var $this = this.element 3820 }
2087 var $ul = $this.closest('ul:not(.dropdown-menu)')
2088 var selector = $this.data('target')
2089 3821
2090 if (!selector) { 3822 if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
2091 selector = $this.attr('href') 3823 this._activeTarget = null;
2092 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
2093 }
2094 3824
2095 if ($this.parent('li').hasClass('active')) return 3825 this._clear();
2096
2097 var $previous = $ul.find('.active:last a')
2098 var hideEvent = $.Event('hide.bs.tab', {
2099 relatedTarget: $this[0]
2100 })
2101 var showEvent = $.Event('show.bs.tab', {
2102 relatedTarget: $previous[0]
2103 })
2104
2105 $previous.trigger(hideEvent)
2106 $this.trigger(showEvent)
2107
2108 if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
2109
2110 var $target = $(selector)
2111
2112 this.activate($this.closest('li'), $ul)
2113 this.activate($target, $target.parent(), function () {
2114 $previous.trigger({
2115 type: 'hidden.bs.tab',
2116 relatedTarget: $this[0]
2117 })
2118 $this.trigger({
2119 type: 'shown.bs.tab',
2120 relatedTarget: $previous[0]
2121 })
2122 })
2123 }
2124 3826
2125 Tab.prototype.activate = function (element, container, callback) { 3827 return;
2126 var $active = container.find('> .active') 3828 }
2127 var transition = callback
2128 && $.support.transition
2129 && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
2130
2131 function next() {
2132 $active
2133 .removeClass('active')
2134 .find('> .dropdown-menu > .active')
2135 .removeClass('active')
2136 .end()
2137 .find('[data-toggle="tab"]')
2138 .attr('aria-expanded', false)
2139
2140 element
2141 .addClass('active')
2142 .find('[data-toggle="tab"]')
2143 .attr('aria-expanded', true)
2144 3829
2145 if (transition) { 3830 var offsetLength = this._offsets.length;
2146 element[0].offsetWidth // reflow for transition 3831
2147 element.addClass('in') 3832 for (var i = offsetLength; i--;) {
3833 var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
3834
3835 if (isActiveTarget) {
3836 this._activate(this._targets[i]);
3837 }
3838 }
3839 };
3840
3841 _proto._activate = function _activate(target) {
3842 this._activeTarget = target;
3843
3844 this._clear();
3845
3846 var queries = this._selector.split(',').map(function (selector) {
3847 return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]";
3848 });
3849
3850 var $link = $([].slice.call(document.querySelectorAll(queries.join(','))));
3851
3852 if ($link.hasClass(ClassName$8.DROPDOWN_ITEM)) {
3853 $link.closest(Selector$8.DROPDOWN).find(Selector$8.DROPDOWN_TOGGLE).addClass(ClassName$8.ACTIVE);
3854 $link.addClass(ClassName$8.ACTIVE);
2148 } else { 3855 } else {
2149 element.removeClass('fade') 3856 // Set triggered link as active
3857 $link.addClass(ClassName$8.ACTIVE); // Set triggered links parents as active
3858 // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
3859
3860 $link.parents(Selector$8.NAV_LIST_GROUP).prev(Selector$8.NAV_LINKS + ", " + Selector$8.LIST_ITEMS).addClass(ClassName$8.ACTIVE); // Handle special case when .nav-link is inside .nav-item
3861
3862 $link.parents(Selector$8.NAV_LIST_GROUP).prev(Selector$8.NAV_ITEMS).children(Selector$8.NAV_LINKS).addClass(ClassName$8.ACTIVE);
2150 } 3863 }
2151 3864
2152 if (element.parent('.dropdown-menu').length) { 3865 $(this._scrollElement).trigger(Event$8.ACTIVATE, {
2153 element 3866 relatedTarget: target
2154 .closest('li.dropdown') 3867 });
2155 .addClass('active') 3868 };
2156 .end() 3869
2157 .find('[data-toggle="tab"]') 3870 _proto._clear = function _clear() {
2158 .attr('aria-expanded', true) 3871 [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
3872 return node.classList.contains(ClassName$8.ACTIVE);
3873 }).forEach(function (node) {
3874 return node.classList.remove(ClassName$8.ACTIVE);
3875 });
3876 } // Static
3877 ;
3878
3879 ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
3880 return this.each(function () {
3881 var data = $(this).data(DATA_KEY$8);
3882
3883 var _config = typeof config === 'object' && config;
3884
3885 if (!data) {
3886 data = new ScrollSpy(this, _config);
3887 $(this).data(DATA_KEY$8, data);
3888 }
3889
3890 if (typeof config === 'string') {
3891 if (typeof data[config] === 'undefined') {
3892 throw new TypeError("No method named \"" + config + "\"");
3893 }
3894
3895 data[config]();
3896 }
3897 });
3898 };
3899
3900 _createClass(ScrollSpy, null, [{
3901 key: "VERSION",
3902 get: function get() {
3903 return VERSION$8;
3904 }
3905 }, {
3906 key: "Default",
3907 get: function get() {
3908 return Default$6;
2159 } 3909 }
3910 }]);
2160 3911
2161 callback && callback() 3912 return ScrollSpy;
3913 }();
3914 /**
3915 * ------------------------------------------------------------------------
3916 * Data Api implementation
3917 * ------------------------------------------------------------------------
3918 */
3919
3920
3921 $(window).on(Event$8.LOAD_DATA_API, function () {
3922 var scrollSpys = [].slice.call(document.querySelectorAll(Selector$8.DATA_SPY));
3923 var scrollSpysLength = scrollSpys.length;
3924
3925 for (var i = scrollSpysLength; i--;) {
3926 var $spy = $(scrollSpys[i]);
3927
3928 ScrollSpy._jQueryInterface.call($spy, $spy.data());
2162 } 3929 }
3930 });
3931 /**
3932 * ------------------------------------------------------------------------
3933 * jQuery
3934 * ------------------------------------------------------------------------
3935 */
3936
3937 $.fn[NAME$8] = ScrollSpy._jQueryInterface;
3938 $.fn[NAME$8].Constructor = ScrollSpy;
3939
3940 $.fn[NAME$8].noConflict = function () {
3941 $.fn[NAME$8] = JQUERY_NO_CONFLICT$8;
3942 return ScrollSpy._jQueryInterface;
3943 };
3944
3945 /**
3946 * ------------------------------------------------------------------------
3947 * Constants
3948 * ------------------------------------------------------------------------
3949 */
3950
3951 var NAME$9 = 'tab';
3952 var VERSION$9 = '4.3.1';
3953 var DATA_KEY$9 = 'bs.tab';
3954 var EVENT_KEY$9 = "." + DATA_KEY$9;
3955 var DATA_API_KEY$7 = '.data-api';
3956 var JQUERY_NO_CONFLICT$9 = $.fn[NAME$9];
3957 var Event$9 = {
3958 HIDE: "hide" + EVENT_KEY$9,
3959 HIDDEN: "hidden" + EVENT_KEY$9,
3960 SHOW: "show" + EVENT_KEY$9,
3961 SHOWN: "shown" + EVENT_KEY$9,
3962 CLICK_DATA_API: "click" + EVENT_KEY$9 + DATA_API_KEY$7
3963 };
3964 var ClassName$9 = {
3965 DROPDOWN_MENU: 'dropdown-menu',
3966 ACTIVE: 'active',
3967 DISABLED: 'disabled',
3968 FADE: 'fade',
3969 SHOW: 'show'
3970 };
3971 var Selector$9 = {
3972 DROPDOWN: '.dropdown',
3973 NAV_LIST_GROUP: '.nav, .list-group',
3974 ACTIVE: '.active',
3975 ACTIVE_UL: '> li > .active',
3976 DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
3977 DROPDOWN_TOGGLE: '.dropdown-toggle',
3978 DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
3979 /**
3980 * ------------------------------------------------------------------------
3981 * Class Definition
3982 * ------------------------------------------------------------------------
3983 */
3984
3985 };
3986
3987 var Tab =
3988 /*#__PURE__*/
3989 function () {
3990 function Tab(element) {
3991 this._element = element;
3992 } // Getters
3993
3994
3995 var _proto = Tab.prototype;
3996
3997 // Public
3998 _proto.show = function show() {
3999 var _this = this;
4000
4001 if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName$9.ACTIVE) || $(this._element).hasClass(ClassName$9.DISABLED)) {
4002 return;
4003 }
2163 4004
2164 $active.length && transition ? 4005 var target;
2165 $active 4006 var previous;
2166 .one('bsTransitionEnd', next) 4007 var listElement = $(this._element).closest(Selector$9.NAV_LIST_GROUP)[0];
2167 .emulateTransitionEnd(Tab.TRANSITION_DURATION) : 4008 var selector = Util.getSelectorFromElement(this._element);
2168 next()
2169 4009
2170 $active.removeClass('in') 4010 if (listElement) {
2171 } 4011 var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector$9.ACTIVE_UL : Selector$9.ACTIVE;
4012 previous = $.makeArray($(listElement).find(itemSelector));
4013 previous = previous[previous.length - 1];
4014 }
2172 4015
4016 var hideEvent = $.Event(Event$9.HIDE, {
4017 relatedTarget: this._element
4018 });
4019 var showEvent = $.Event(Event$9.SHOW, {
4020 relatedTarget: previous
4021 });
2173 4022
2174 // TAB PLUGIN DEFINITION 4023 if (previous) {
2175 // ===================== 4024 $(previous).trigger(hideEvent);
4025 }
2176 4026
2177 function Plugin(option) { 4027 $(this._element).trigger(showEvent);
2178 return this.each(function () {
2179 var $this = $(this)
2180 var data = $this.data('bs.tab')
2181 4028
2182 if (!data) $this.data('bs.tab', (data = new Tab(this))) 4029 if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
2183 if (typeof option == 'string') data[option]() 4030 return;
2184 }) 4031 }
2185 }
2186 4032
2187 var old = $.fn.tab 4033 if (selector) {
4034 target = document.querySelector(selector);
4035 }
2188 4036
2189 $.fn.tab = Plugin 4037 this._activate(this._element, listElement);
2190 $.fn.tab.Constructor = Tab 4038
4039 var complete = function complete() {
4040 var hiddenEvent = $.Event(Event$9.HIDDEN, {
4041 relatedTarget: _this._element
4042 });
4043 var shownEvent = $.Event(Event$9.SHOWN, {
4044 relatedTarget: previous
4045 });
4046 $(previous).trigger(hiddenEvent);
4047 $(_this._element).trigger(shownEvent);
4048 };
4049
4050 if (target) {
4051 this._activate(target, target.parentNode, complete);
4052 } else {
4053 complete();
4054 }
4055 };
2191 4056
4057 _proto.dispose = function dispose() {
4058 $.removeData(this._element, DATA_KEY$9);
4059 this._element = null;
4060 } // Private
4061 ;
2192 4062
2193 // TAB NO CONFLICT 4063 _proto._activate = function _activate(element, container, callback) {
2194 // =============== 4064 var _this2 = this;
2195 4065
2196 $.fn.tab.noConflict = function () { 4066 var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $(container).find(Selector$9.ACTIVE_UL) : $(container).children(Selector$9.ACTIVE);
2197 $.fn.tab = old 4067 var active = activeElements[0];
2198 return this 4068 var isTransitioning = callback && active && $(active).hasClass(ClassName$9.FADE);
2199 }
2200 4069
4070 var complete = function complete() {
4071 return _this2._transitionComplete(element, active, callback);
4072 };
2201 4073
2202 // TAB DATA-API 4074 if (active && isTransitioning) {
2203 // ============ 4075 var transitionDuration = Util.getTransitionDurationFromElement(active);
4076 $(active).removeClass(ClassName$9.SHOW).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
4077 } else {
4078 complete();
4079 }
4080 };
2204 4081
2205 var clickHandler = function (e) { 4082 _proto._transitionComplete = function _transitionComplete(element, active, callback) {
2206 e.preventDefault() 4083 if (active) {
2207 Plugin.call($(this), 'show') 4084 $(active).removeClass(ClassName$9.ACTIVE);
2208 } 4085 var dropdownChild = $(active.parentNode).find(Selector$9.DROPDOWN_ACTIVE_CHILD)[0];
2209 4086
2210 $(document) 4087 if (dropdownChild) {
2211 .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler) 4088 $(dropdownChild).removeClass(ClassName$9.ACTIVE);
2212 .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler) 4089 }
2213 4090
2214}(jQuery); 4091 if (active.getAttribute('role') === 'tab') {
4092 active.setAttribute('aria-selected', false);
4093 }
4094 }
2215 4095
2216/* ======================================================================== 4096 $(element).addClass(ClassName$9.ACTIVE);
2217 * Bootstrap: affix.js v3.3.7
2218 * http://getbootstrap.com/javascript/#affix
2219 * ========================================================================
2220 * Copyright 2011-2016 Twitter, Inc.
2221 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2222 * ======================================================================== */
2223 4097
4098 if (element.getAttribute('role') === 'tab') {
4099 element.setAttribute('aria-selected', true);
4100 }
2224 4101
2225+function ($) { 4102 Util.reflow(element);
2226 'use strict';
2227 4103
2228 // AFFIX CLASS DEFINITION 4104 if (element.classList.contains(ClassName$9.FADE)) {
2229 // ====================== 4105 element.classList.add(ClassName$9.SHOW);
4106 }
2230 4107
2231 var Affix = function (element, options) { 4108 if (element.parentNode && $(element.parentNode).hasClass(ClassName$9.DROPDOWN_MENU)) {
2232 this.options = $.extend({}, Affix.DEFAULTS, options) 4109 var dropdownElement = $(element).closest(Selector$9.DROPDOWN)[0];
2233 4110
2234 this.$target = $(this.options.target) 4111 if (dropdownElement) {
2235 .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) 4112 var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector$9.DROPDOWN_TOGGLE));
2236 .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) 4113 $(dropdownToggleList).addClass(ClassName$9.ACTIVE);
4114 }
2237 4115
2238 this.$element = $(element) 4116 element.setAttribute('aria-expanded', true);
2239 this.affixed = null 4117 }
2240 this.unpin = null
2241 this.pinnedOffset = null
2242 4118
2243 this.checkPosition() 4119 if (callback) {
2244 } 4120 callback();
4121 }
4122 } // Static
4123 ;
2245 4124
2246 Affix.VERSION = '3.3.7' 4125 Tab._jQueryInterface = function _jQueryInterface(config) {
4126 return this.each(function () {
4127 var $this = $(this);
4128 var data = $this.data(DATA_KEY$9);
2247 4129
2248 Affix.RESET = 'affix affix-top affix-bottom' 4130 if (!data) {
4131 data = new Tab(this);
4132 $this.data(DATA_KEY$9, data);
4133 }
2249 4134
2250 Affix.DEFAULTS = { 4135 if (typeof config === 'string') {
2251 offset: 0, 4136 if (typeof data[config] === 'undefined') {
2252 target: window 4137 throw new TypeError("No method named \"" + config + "\"");
2253 } 4138 }
2254 4139
2255 Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { 4140 data[config]();
2256 var scrollTop = this.$target.scrollTop() 4141 }
2257 var position = this.$element.offset() 4142 });
2258 var targetHeight = this.$target.height() 4143 };
2259 4144
2260 if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false 4145 _createClass(Tab, null, [{
4146 key: "VERSION",
4147 get: function get() {
4148 return VERSION$9;
4149 }
4150 }]);
4151
4152 return Tab;
4153 }();
4154 /**
4155 * ------------------------------------------------------------------------
4156 * Data Api implementation
4157 * ------------------------------------------------------------------------
4158 */
4159
4160
4161 $(document).on(Event$9.CLICK_DATA_API, Selector$9.DATA_TOGGLE, function (event) {
4162 event.preventDefault();
4163
4164 Tab._jQueryInterface.call($(this), 'show');
4165 });
4166 /**
4167 * ------------------------------------------------------------------------
4168 * jQuery
4169 * ------------------------------------------------------------------------
4170 */
4171
4172 $.fn[NAME$9] = Tab._jQueryInterface;
4173 $.fn[NAME$9].Constructor = Tab;
4174
4175 $.fn[NAME$9].noConflict = function () {
4176 $.fn[NAME$9] = JQUERY_NO_CONFLICT$9;
4177 return Tab._jQueryInterface;
4178 };
4179
4180 /**
4181 * ------------------------------------------------------------------------
4182 * Constants
4183 * ------------------------------------------------------------------------
4184 */
4185
4186 var NAME$a = 'toast';
4187 var VERSION$a = '4.3.1';
4188 var DATA_KEY$a = 'bs.toast';
4189 var EVENT_KEY$a = "." + DATA_KEY$a;
4190 var JQUERY_NO_CONFLICT$a = $.fn[NAME$a];
4191 var Event$a = {
4192 CLICK_DISMISS: "click.dismiss" + EVENT_KEY$a,
4193 HIDE: "hide" + EVENT_KEY$a,
4194 HIDDEN: "hidden" + EVENT_KEY$a,
4195 SHOW: "show" + EVENT_KEY$a,
4196 SHOWN: "shown" + EVENT_KEY$a
4197 };
4198 var ClassName$a = {
4199 FADE: 'fade',
4200 HIDE: 'hide',
4201 SHOW: 'show',
4202 SHOWING: 'showing'
4203 };
4204 var DefaultType$7 = {
4205 animation: 'boolean',
4206 autohide: 'boolean',
4207 delay: 'number'
4208 };
4209 var Default$7 = {
4210 animation: true,
4211 autohide: true,
4212 delay: 500
4213 };
4214 var Selector$a = {
4215 DATA_DISMISS: '[data-dismiss="toast"]'
4216 /**
4217 * ------------------------------------------------------------------------
4218 * Class Definition
4219 * ------------------------------------------------------------------------
4220 */
2261 4221
2262 if (this.affixed == 'bottom') { 4222 };
2263 if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
2264 return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
2265 }
2266 4223
2267 var initializing = this.affixed == null 4224 var Toast =
2268 var colliderTop = initializing ? scrollTop : position.top 4225 /*#__PURE__*/
2269 var colliderHeight = initializing ? targetHeight : height 4226 function () {
4227 function Toast(element, config) {
4228 this._element = element;
4229 this._config = this._getConfig(config);
4230 this._timeout = null;
2270 4231
2271 if (offsetTop != null && scrollTop <= offsetTop) return 'top' 4232 this._setListeners();
2272 if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' 4233 } // Getters
2273 4234
2274 return false
2275 }
2276 4235
2277 Affix.prototype.getPinnedOffset = function () { 4236 var _proto = Toast.prototype;
2278 if (this.pinnedOffset) return this.pinnedOffset
2279 this.$element.removeClass(Affix.RESET).addClass('affix')
2280 var scrollTop = this.$target.scrollTop()
2281 var position = this.$element.offset()
2282 return (this.pinnedOffset = position.top - scrollTop)
2283 }
2284 4237
2285 Affix.prototype.checkPositionWithEventLoop = function () { 4238 // Public
2286 setTimeout($.proxy(this.checkPosition, this), 1) 4239 _proto.show = function show() {
2287 } 4240 var _this = this;
2288 4241
2289 Affix.prototype.checkPosition = function () { 4242 $(this._element).trigger(Event$a.SHOW);
2290 if (!this.$element.is(':visible')) return
2291 4243
2292 var height = this.$element.height() 4244 if (this._config.animation) {
2293 var offset = this.options.offset 4245 this._element.classList.add(ClassName$a.FADE);
2294 var offsetTop = offset.top 4246 }
2295 var offsetBottom = offset.bottom
2296 var scrollHeight = Math.max($(document).height(), $(document.body).height())
2297 4247
2298 if (typeof offset != 'object') offsetBottom = offsetTop = offset 4248 var complete = function complete() {
2299 if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) 4249 _this._element.classList.remove(ClassName$a.SHOWING);
2300 if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
2301 4250
2302 var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) 4251 _this._element.classList.add(ClassName$a.SHOW);
2303 4252
2304 if (this.affixed != affix) { 4253 $(_this._element).trigger(Event$a.SHOWN);
2305 if (this.unpin != null) this.$element.css('top', '')
2306 4254
2307 var affixType = 'affix' + (affix ? '-' + affix : '') 4255 if (_this._config.autohide) {
2308 var e = $.Event(affixType + '.bs.affix') 4256 _this.hide();
4257 }
4258 };
2309 4259
2310 this.$element.trigger(e) 4260 this._element.classList.remove(ClassName$a.HIDE);
2311 4261
2312 if (e.isDefaultPrevented()) return 4262 this._element.classList.add(ClassName$a.SHOWING);
2313 4263
2314 this.affixed = affix 4264 if (this._config.animation) {
2315 this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null 4265 var transitionDuration = Util.getTransitionDurationFromElement(this._element);
4266 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
4267 } else {
4268 complete();
4269 }
4270 };
2316 4271
2317 this.$element 4272 _proto.hide = function hide(withoutTimeout) {
2318 .removeClass(Affix.RESET) 4273 var _this2 = this;
2319 .addClass(affixType)
2320 .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
2321 }
2322 4274
2323 if (affix == 'bottom') { 4275 if (!this._element.classList.contains(ClassName$a.SHOW)) {
2324 this.$element.offset({ 4276 return;
2325 top: scrollHeight - height - offsetBottom 4277 }
2326 }) 4278
2327 } 4279 $(this._element).trigger(Event$a.HIDE);
2328 }
2329 4280
4281 if (withoutTimeout) {
4282 this._close();
4283 } else {
4284 this._timeout = setTimeout(function () {
4285 _this2._close();
4286 }, this._config.delay);
4287 }
4288 };
2330 4289
2331 // AFFIX PLUGIN DEFINITION 4290 _proto.dispose = function dispose() {
2332 // ======================= 4291 clearTimeout(this._timeout);
4292 this._timeout = null;
2333 4293
2334 function Plugin(option) { 4294 if (this._element.classList.contains(ClassName$a.SHOW)) {
2335 return this.each(function () { 4295 this._element.classList.remove(ClassName$a.SHOW);
2336 var $this = $(this) 4296 }
2337 var data = $this.data('bs.affix')
2338 var options = typeof option == 'object' && option
2339 4297
2340 if (!data) $this.data('bs.affix', (data = new Affix(this, options))) 4298 $(this._element).off(Event$a.CLICK_DISMISS);
2341 if (typeof option == 'string') data[option]() 4299 $.removeData(this._element, DATA_KEY$a);
2342 }) 4300 this._element = null;
2343 } 4301 this._config = null;
4302 } // Private
4303 ;
2344 4304
2345 var old = $.fn.affix 4305 _proto._getConfig = function _getConfig(config) {
4306 config = _objectSpread({}, Default$7, $(this._element).data(), typeof config === 'object' && config ? config : {});
4307 Util.typeCheckConfig(NAME$a, config, this.constructor.DefaultType);
4308 return config;
4309 };
2346 4310
2347 $.fn.affix = Plugin 4311 _proto._setListeners = function _setListeners() {
2348 $.fn.affix.Constructor = Affix 4312 var _this3 = this;
2349 4313
4314 $(this._element).on(Event$a.CLICK_DISMISS, Selector$a.DATA_DISMISS, function () {
4315 return _this3.hide(true);
4316 });
4317 };
2350 4318
2351 // AFFIX NO CONFLICT 4319 _proto._close = function _close() {
2352 // ================= 4320 var _this4 = this;
2353 4321
2354 $.fn.affix.noConflict = function () { 4322 var complete = function complete() {
2355 $.fn.affix = old 4323 _this4._element.classList.add(ClassName$a.HIDE);
2356 return this 4324
2357 } 4325 $(_this4._element).trigger(Event$a.HIDDEN);
4326 };
4327
4328 this._element.classList.remove(ClassName$a.SHOW);
4329
4330 if (this._config.animation) {
4331 var transitionDuration = Util.getTransitionDurationFromElement(this._element);
4332 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
4333 } else {
4334 complete();
4335 }
4336 } // Static
4337 ;
2358 4338
4339 Toast._jQueryInterface = function _jQueryInterface(config) {
4340 return this.each(function () {
4341 var $element = $(this);
4342 var data = $element.data(DATA_KEY$a);
2359 4343
2360 // AFFIX DATA-API 4344 var _config = typeof config === 'object' && config;
2361 // ==============
2362 4345
2363 $(window).on('load', function () { 4346 if (!data) {
2364 $('[data-spy="affix"]').each(function () { 4347 data = new Toast(this, _config);
2365 var $spy = $(this) 4348 $element.data(DATA_KEY$a, data);
2366 var data = $spy.data() 4349 }
2367 4350
2368 data.offset = data.offset || {} 4351 if (typeof config === 'string') {
4352 if (typeof data[config] === 'undefined') {
4353 throw new TypeError("No method named \"" + config + "\"");
4354 }
2369 4355
2370 if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom 4356 data[config](this);
2371 if (data.offsetTop != null) data.offset.top = data.offsetTop 4357 }
4358 });
4359 };
2372 4360
2373 Plugin.call($spy, data) 4361 _createClass(Toast, null, [{
2374 }) 4362 key: "VERSION",
2375 }) 4363 get: function get() {
4364 return VERSION$a;
4365 }
4366 }, {
4367 key: "DefaultType",
4368 get: function get() {
4369 return DefaultType$7;
4370 }
4371 }, {
4372 key: "Default",
4373 get: function get() {
4374 return Default$7;
4375 }
4376 }]);
4377
4378 return Toast;
4379 }();
4380 /**
4381 * ------------------------------------------------------------------------
4382 * jQuery
4383 * ------------------------------------------------------------------------
4384 */
4385
4386
4387 $.fn[NAME$a] = Toast._jQueryInterface;
4388 $.fn[NAME$a].Constructor = Toast;
4389
4390 $.fn[NAME$a].noConflict = function () {
4391 $.fn[NAME$a] = JQUERY_NO_CONFLICT$a;
4392 return Toast._jQueryInterface;
4393 };
4394
4395 /**
4396 * --------------------------------------------------------------------------
4397 * Bootstrap (v4.3.1): index.js
4398 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
4399 * --------------------------------------------------------------------------
4400 */
4401
4402 (function () {
4403 if (typeof $ === 'undefined') {
4404 throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
4405 }
2376 4406
2377}(jQuery); 4407 var version = $.fn.jquery.split(' ')[0].split('.');
4408 var minMajor = 1;
4409 var ltMajor = 2;
4410 var minMinor = 9;
4411 var minPatch = 1;
4412 var maxMajor = 4;
4413
4414 if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
4415 throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
4416 }
4417 })();
4418
4419 exports.Util = Util;
4420 exports.Alert = Alert;
4421 exports.Button = Button;
4422 exports.Carousel = Carousel;
4423 exports.Collapse = Collapse;
4424 exports.Dropdown = Dropdown;
4425 exports.Modal = Modal;
4426 exports.Popover = Popover;
4427 exports.Scrollspy = ScrollSpy;
4428 exports.Tab = Tab;
4429 exports.Toast = Toast;
4430 exports.Tooltip = Tooltip;
4431
4432 Object.defineProperty(exports, '__esModule', { value: true });
4433
4434}));
4435//# sourceMappingURL=bootstrap.js.map