diff options
author | fat <fat@folders.local> | 2015-05-13 02:52:54 +0300 |
---|---|---|
committer | fat <fat@folders.local> | 2015-05-13 02:52:54 +0300 |
commit | ab1578465aee4a776412b48f16bfefca79381919 (patch) | |
tree | 0766caa82a67cd6328273aa5f2a826c579d44d32 | |
parent | a58febf71a5eac2161ce2db08c7d723755ed1163 (diff) |
grunt test-js, grunt dist-js now working
-rw-r--r-- | Gruntfile.js | 74 | ||||
-rw-r--r-- | dist/js/bootstrap.js | 4623 | ||||
-rw-r--r-- | dist/js/bootstrap.min.js | 4 | ||||
-rw-r--r-- | dist/js/npm.js | 22 | ||||
-rw-r--r-- | js/dist/carousel.js | 6 | ||||
-rw-r--r-- | js/dist/carousel.js.map | 2 | ||||
-rw-r--r-- | js/dist/modal.js | 8 | ||||
-rw-r--r-- | js/dist/modal.js.map | 2 | ||||
-rw-r--r-- | js/dist/popover.js | 2 | ||||
-rw-r--r-- | js/dist/popover.js.map | 2 | ||||
-rw-r--r-- | js/dist/scrollspy.js | 2 | ||||
-rw-r--r-- | js/dist/scrollspy.js.map | 2 | ||||
-rw-r--r-- | js/dist/tab.js | 2 | ||||
-rw-r--r-- | js/dist/tab.js.map | 2 | ||||
-rw-r--r-- | js/dist/tooltip.js | 7 | ||||
-rw-r--r-- | js/dist/tooltip.js.map | 2 | ||||
-rw-r--r-- | js/src/carousel.js | 8 | ||||
-rw-r--r-- | js/src/modal.js | 8 | ||||
-rw-r--r-- | js/src/scrollspy.js | 2 | ||||
-rw-r--r-- | js/src/tab.js | 10 | ||||
-rw-r--r-- | js/src/tooltip.js | 6 | ||||
-rw-r--r-- | js/tests/unit/tooltip.js | 2 | ||||
-rw-r--r-- | package.json | 2 |
23 files changed, 2863 insertions, 1937 deletions
diff --git a/Gruntfile.js b/Gruntfile.js index facc3672d9..e97545e184 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -56,12 +56,25 @@ module.exports = function (grunt) { docs: 'docs/dist' }, + // JS build configuration + + lineremover: { + es6Import: { + files: { + '<%= concat.bootstrap.dest %>': '<%= concat.bootstrap.dest %>' + }, + options: { + exclusionPattern: /^(import|export)/g + } + } + }, + babel: { - options: { - sourceMap: true, - modules: 'ignore' - }, - dist: { + src: { + options: { + sourceMap: true, + modules: 'ignore' + }, files: { 'js/dist/util.js' : 'js/src/util.js', 'js/dist/alert.js' : 'js/src/alert.js', @@ -75,6 +88,14 @@ module.exports = function (grunt) { 'js/dist/tooltip.js' : 'js/src/tooltip.js', 'js/dist/popover.js' : 'js/src/popover.js' } + }, + dist: { + options: { + modules: 'ignore' + }, + files: { + '<%= concat.bootstrap.dest %>' : '<%= concat.bootstrap.dest %>' + } } }, @@ -86,9 +107,6 @@ module.exports = function (grunt) { src: ['Gruntfile.js', 'grunt/*.js'] }, core: { - src: 'js/*.js' - }, - es6: { src: 'js/src/*.js' }, test: { @@ -102,24 +120,35 @@ module.exports = function (grunt) { } }, + stamp: { + options: { + banner: '<%= banner %>\n<%= jqueryCheck %>\n<%= jqueryVersionCheck %>\n+function ($) {\n', + footer: '\n}(jQuery);' + }, + bootstrap: { + files: { + src: '<%= concat.bootstrap.dest %>' + } + } + }, + concat: { options: { - banner: '<%= banner %>\n<%= jqueryCheck %>\n<%= jqueryVersionCheck %>', stripBanners: false }, bootstrap: { src: [ - 'js/transition.js', - 'js/alert.js', - 'js/button.js', - 'js/carousel.js', - 'js/collapse.js', - 'js/dropdown.js', - 'js/modal.js', - 'js/tooltip.js', - 'js/popover.js', - 'js/scrollspy.js', - 'js/tab.js' + 'js/src/util.js', + 'js/src/alert.js', + 'js/src/button.js', + 'js/src/carousel.js', + 'js/src/collapse.js', + 'js/src/dropdown.js', + 'js/src/modal.js', + 'js/src/scrollspy.js', + 'js/src/tab.js', + 'js/src/tooltip.js', + 'js/src/popover.js' ], dest: 'dist/js/<%= pkg.name %>.js' } @@ -154,6 +183,9 @@ module.exports = function (grunt) { files: 'js/tests/index.html' }, + + // CSS build configuration + scsslint: { scss: ['scss/*.scss', '!scss/_normalize.scss'], options: { @@ -401,7 +433,7 @@ module.exports = function (grunt) { grunt.registerTask('test-js', ['jscs:core', 'jscs:test', 'jscs:grunt', 'qunit']); // JS distribution task. - grunt.registerTask('dist-js', ['concat', 'uglify:core', 'commonjs']); + grunt.registerTask('dist-js', ['concat', 'lineremover', 'babel:dist', 'stamp', 'uglify:core', 'commonjs']); grunt.registerTask('test-scss', ['scsslint:scss']); diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js index a6827d652c..271a18d257 100644 --- a/dist/js/bootstrap.js +++ b/dist/js/bootstrap.js @@ -15,2348 +15,3233 @@ if (typeof jQuery === 'undefined') { } }(jQuery); -/* ======================================================================== - * Bootstrap: transition.js v3.3.4 - * http://getbootstrap.com/javascript/#transitions - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - +function ($) { - 'use strict'; - // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) - // ============================================================ +'use strict'; - function transitionEnd() { - var el = document.createElement('bootstrap') +var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - var transEndEventNames = { - WebkitTransition : 'webkitTransitionEnd', - MozTransition : 'transitionend', - OTransition : 'oTransitionEnd otransitionend', - transition : 'transitionend' - } +function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; } - for (var name in transEndEventNames) { - if (el.style[name] !== undefined) { - return { end: transEndEventNames[name] } - } - } +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } - return false // explicit for ie8 ( ._.) - } +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): util.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ - // http://blog.alexmaccaw.com/css-transitions - $.fn.emulateTransitionEnd = function (duration) { - var called = false - var $el = this - $(this).one('bsTransitionEnd', function () { called = true }) - var callback = function () { if (!called) $($el).trigger($.support.transition.end) } - setTimeout(callback, duration) - return this +var Util = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Private TransitionEnd Helpers + * ------------------------------------------------------------------------ + */ + + var transition = false; + + var TransitionEndEvent = { + WebkitTransition: 'webkitTransitionEnd', + MozTransition: 'transitionend', + OTransition: 'oTransitionEnd otransitionend', + transition: 'transitionend' + }; + + function getSpecialTransitionEndEvent() { + return { + bindType: transition.end, + delegateType: transition.end, + handle: function handle(event) { + if ($(event.target).is(this)) { + return event.handleObj.handler.apply(this, arguments); + } + } + }; } - $(function () { - $.support.transition = transitionEnd() + function transitionEndTest() { + if (window.QUnit) { + return false; + } - if (!$.support.transition) return + var el = document.createElement('bootstrap'); - $.event.special.bsTransitionEnd = { - bindType: $.support.transition.end, - delegateType: $.support.transition.end, - handle: function (e) { - if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) + for (var name in TransitionEndEvent) { + if (el.style[name] !== undefined) { + return { end: TransitionEndEvent[name] }; } } - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: alert.js v3.3.4 - * http://getbootstrap.com/javascript/#alerts - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - -+function ($) { - 'use strict'; - - // ALERT CLASS DEFINITION - // ====================== - - var dismiss = '[data-dismiss="alert"]' - var Alert = function (el) { - $(el).on('click', dismiss, this.close) + return false; } - Alert.VERSION = '3.3.4' - - Alert.TRANSITION_DURATION = 150 + function transitionEndEmulator(duration) { + var _this = this; - Alert.prototype.close = function (e) { - var $this = $(this) - var selector = $this.attr('data-target') + var called = false; - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = $(selector) - - if (e) e.preventDefault() + $(this).one(Util.TRANSITION_END, function () { + called = true; + }); - if (!$parent.length) { - $parent = $this.closest('.alert') - } + setTimeout(function () { + if (!called) { + Util.triggerTransitionEnd(_this); + } + }, duration); - $parent.trigger(e = $.Event('close.bs.alert')) + return this; + } - if (e.isDefaultPrevented()) return + function setTransitionEndSupport() { + transition = transitionEndTest(); - $parent.removeClass('in') + $.fn.emulateTransitionEnd = transitionEndEmulator; - function removeElement() { - // detach from parent, fire event then clean up data - $parent.detach().trigger('closed.bs.alert').remove() + if (Util.supportsTransitionEnd()) { + $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); } - - $.support.transition && $parent.hasClass('fade') ? - $parent - .one('bsTransitionEnd', removeElement) - .emulateTransitionEnd(Alert.TRANSITION_DURATION) : - removeElement() } + /** + * -------------------------------------------------------------------------- + * Public Util Api + * -------------------------------------------------------------------------- + */ - // ALERT PLUGIN DEFINITION - // ======================= + var Util = { - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.alert') + TRANSITION_END: 'bsTransitionEnd', - if (!data) $this.data('bs.alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } + getUID: function getUID(prefix) { + do prefix += ~ ~(Math.random() * 1000000); while (document.getElementById(prefix)); + return prefix; + }, - var old = $.fn.alert + getSelectorFromElement: function getSelectorFromElement(element) { + var selector = element.getAttribute('data-target'); - $.fn.alert = Plugin - $.fn.alert.Constructor = Alert + if (!selector) { + selector = element.getAttribute('href') || ''; + selector = /^#[a-z]/i.test(selector) ? selector : null; + } + return selector; + }, - // ALERT NO CONFLICT - // ================= + reflow: function reflow(element) { + new Function('bs', 'return bs')(element.offsetHeight); + }, - $.fn.alert.noConflict = function () { - $.fn.alert = old - return this - } + triggerTransitionEnd: function triggerTransitionEnd(element) { + $(element).trigger(transition.end); + }, + supportsTransitionEnd: function supportsTransitionEnd() { + return !!transition; + } - // ALERT DATA-API - // ============== + }; - $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) + setTransitionEndSupport(); -}(jQuery); + return Util; +})(jQuery); -/* ======================================================================== - * Bootstrap: button.js v3.3.4 - * http://getbootstrap.com/javascript/#buttons - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): alert.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // BUTTON PUBLIC CLASS DEFINITION - // ============================== - - var Button = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Button.DEFAULTS, options) - this.isLoading = false - } + * -------------------------------------------------------------------------- + */ - Button.VERSION = '3.3.4' +var Alert = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'alert'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.alert'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; + + var Selector = { + DISMISS: '[data-dismiss="alert"]' + }; + + var Event = { + CLOSE: 'close.bs.alert', + CLOSED: 'closed.bs.alert', + CLICK: 'click.bs.alert.data-api' + }; + + var ClassName = { + ALERT: 'alert', + FADE: 'fade', + IN: 'in' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Alert = (function () { + function Alert(element) { + _classCallCheck(this, Alert); + + this._element = element; + } - Button.DEFAULTS = { - loadingText: 'loading...' - } + _createClass(Alert, [{ + key: 'close', - Button.prototype.setState = function (state) { - var d = 'disabled' - var $el = this.$element - var val = $el.is('input') ? 'val' : 'html' - var data = $el.data() + // public - state += 'Text' + value: function close(element) { + element = element || this._element; - if (data.resetText == null) $el.data('resetText', $el[val]()) + var rootElement = this._getRootElement(element); + var customEvent = this._triggerCloseEvent(rootElement); - // push to event loop to allow forms to submit - setTimeout($.proxy(function () { - $el[val](data[state] == null ? this.options[state] : data[state]) + if (customEvent.isDefaultPrevented()) { + return; + } - if (state == 'loadingText') { - this.isLoading = true - $el.addClass(d).attr(d, d) - } else if (this.isLoading) { - this.isLoading = false - $el.removeClass(d).removeAttr(d) + this._removeElement(rootElement); } - }, this), 0) - } + }, { + key: '_getRootElement', - Button.prototype.toggle = function () { - var changed = true - var $parent = this.$element.closest('[data-toggle="buttons"]') - - if ($parent.length) { - var $input = this.$element.find('input') - if ($input.prop('type') == 'radio') { - if ($input.prop('checked')) changed = false - $parent.find('.active').removeClass('active') - this.$element.addClass('active') - } else if ($input.prop('type') == 'checkbox') { - if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false - this.$element.toggleClass('active') - } - $input.prop('checked', this.$element.hasClass('active')) - if (changed) $input.trigger('change') - } else { - this.$element.attr('aria-pressed', !this.$element.hasClass('active')) - this.$element.toggleClass('active') - } - } - - - // BUTTON PLUGIN DEFINITION - // ======================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.button') - var options = typeof option == 'object' && option + // private - if (!data) $this.data('bs.button', (data = new Button(this, options))) + value: function _getRootElement(element) { + var parent = false; + var selector = Util.getSelectorFromElement(element); - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } - - var old = $.fn.button + if (selector) { + parent = $(selector)[0]; + } - $.fn.button = Plugin - $.fn.button.Constructor = Button + if (!parent) { + parent = $(element).closest('.' + ClassName.ALERT)[0]; + } + return parent; + } + }, { + key: '_triggerCloseEvent', + value: function _triggerCloseEvent(element) { + var closeEvent = $.Event(Event.CLOSE); + $(element).trigger(closeEvent); + return closeEvent; + } + }, { + key: '_removeElement', + value: function _removeElement(element) { + $(element).removeClass(ClassName.IN); + + if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) { + this._destroyElement(element); + return; + } - // BUTTON NO CONFLICT - // ================== + $(element).one(Util.TRANSITION_END, this._destroyElement.bind(this, element)).emulateTransitionEnd(TRANSITION_DURATION); + } + }, { + key: '_destroyElement', + value: function _destroyElement(element) { + $(element).detach().trigger(Event.CLOSED).remove(); + } + }], [{ + key: 'VERSION', - $.fn.button.noConflict = function () { - $.fn.button = old - return this - } + // getters + get: function () { + return VERSION; + } + }, { + key: '_jQueryInterface', - // BUTTON DATA-API - // =============== + // static - $(document) - .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - Plugin.call($btn, 'toggle') - if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault() - }) - .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { - $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) - }) + value: function _jQueryInterface(config) { + return this.each(function () { + var $element = $(this); + var data = $element.data(DATA_KEY); -}(jQuery); + if (!data) { + data = new Alert(this); + $element.data(DATA_KEY, data); + } -/* ======================================================================== - * Bootstrap: carousel.js v3.3.4 - * http://getbootstrap.com/javascript/#carousel - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. + if (config === 'close') { + data[config](this); + } + }); + } + }, { + key: '_handleDismiss', + value: function _handleDismiss(alertInstance) { + return function (event) { + if (event) { + event.preventDefault(); + } + + alertInstance.close(this); + }; + } + }]); + + return Alert; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK, Selector.DISMISS, Alert._handleDismiss(new Alert())); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Alert._jQueryInterface; + $.fn[NAME].Constructor = Alert; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Alert._jQueryInterface; + }; + + return Alert; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): button.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // CAROUSEL CLASS DEFINITION - // ========================= - - var Carousel = function (element, options) { - this.$element = $(element) - this.$indicators = this.$element.find('.carousel-indicators') - this.options = options - this.paused = null - this.sliding = null - this.interval = null - this.$active = null - this.$items = null - - this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) - - this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element - .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) - .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) - } - - Carousel.VERSION = '3.3.4' - - Carousel.TRANSITION_DURATION = 600 - - Carousel.DEFAULTS = { - interval: 5000, - pause: 'hover', - wrap: true, - keyboard: true - } + * -------------------------------------------------------------------------- + */ - Carousel.prototype.keydown = function (e) { - if (/input|textarea/i.test(e.target.tagName)) return - switch (e.which) { - case 37: this.prev(); break - case 39: this.next(); break - default: return +var Button = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'button'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.button'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; + + var ClassName = { + ACTIVE: 'active', + BUTTON: 'btn', + FOCUS: 'focus' + }; + + var Selector = { + DATA_TOGGLE_CARROT: '[data-toggle^="button"]', + DATA_TOGGLE: '[data-toggle="buttons"]', + INPUT: 'input', + ACTIVE: '.active', + BUTTON: '.btn' + }; + + var Event = { + CLICK: 'click.bs.button.data-api', + FOCUS_BLUR: 'focus.bs.button.data-api blur.bs.button.data-api' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Button = (function () { + function Button(element) { + _classCallCheck(this, Button); + + this._element = element; } - e.preventDefault() - } + _createClass(Button, [{ + key: 'toggle', + + // public + + value: function toggle() { + var triggerChangeEvent = true; + var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0]; + + if (rootElement) { + var input = $(this._element).find(Selector.INPUT)[0]; + + if (input) { + if (input.type === 'radio') { + if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) { + triggerChangeEvent = false; + } else { + var activeElement = $(rootElement).find(Selector.ACTIVE)[0]; + + if (activeElement) { + $(activeElement).removeClass(ClassName.ACTIVE); + } + } + } + + if (triggerChangeEvent) { + input.checked = !$(this._element).hasClass(ClassName.ACTIVE); + $(this._element).trigger('change'); + } + } + } else { + this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE)); + } - Carousel.prototype.cycle = function (e) { - e || (this.paused = false) + if (triggerChangeEvent) { + $(this._element).toggleClass(ClassName.ACTIVE); + } + } + }], [{ + key: 'VERSION', - this.interval && clearInterval(this.interval) + // getters - this.options.interval - && !this.paused - && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + get: function () { + return VERSION; + } + }, { + key: '_jQueryInterface', - return this - } + // static - Carousel.prototype.getItemIndex = function (item) { - this.$items = item.parent().children('.item') - return this.$items.index(item || this.$active) - } + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); - Carousel.prototype.getItemForDirection = function (direction, active) { - var activeIndex = this.getItemIndex(active) - var willWrap = (direction == 'prev' && activeIndex === 0) - || (direction == 'next' && activeIndex == (this.$items.length - 1)) - if (willWrap && !this.options.wrap) return active - var delta = direction == 'prev' ? -1 : 1 - var itemIndex = (activeIndex + delta) % this.$items.length - return this.$items.eq(itemIndex) - } + if (!data) { + data = new Button(this); + $(this).data(DATA_KEY, data); + } - Carousel.prototype.to = function (pos) { - var that = this - var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) + if (config === 'toggle') { + data[config](); + } + }); + } + }]); - if (pos > (this.$items.length - 1) || pos < 0) return + return Button; + })(); - if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" - if (activeIndex == pos) return this.pause().cycle() + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ - return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) - } + $(document).on(Event.CLICK, Selector.DATA_TOGGLE_CARROT, function (event) { + event.preventDefault(); - Carousel.prototype.pause = function (e) { - e || (this.paused = true) + var button = event.target; - if (this.$element.find('.next, .prev').length && $.support.transition) { - this.$element.trigger($.support.transition.end) - this.cycle(true) + if (!$(button).hasClass(ClassName.BUTTON)) { + button = $(button).closest(Selector.BUTTON); } - this.interval = clearInterval(this.interval) - - return this - } - - Carousel.prototype.next = function () { - if (this.sliding) return - return this.slide('next') - } - - Carousel.prototype.prev = function () { - if (this.sliding) return - return this.slide('prev') - } - - Carousel.prototype.slide = function (type, next) { - var $active = this.$element.find('.item.active') - var $next = next || this.getItemForDirection(type, $active) - var isCycling = this.interval - var direction = type == 'next' ? 'left' : 'right' - var that = this - - if ($next.hasClass('active')) return (this.sliding = false) + Button._jQueryInterface.call($(button), 'toggle'); + }).on(Event.FOCUS_BLUR, Selector.DATA_TOGGLE_CARROT, function (event) { + var button = $(event.target).closest(Selector.BUTTON)[0]; + $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Button._jQueryInterface; + $.fn[NAME].Constructor = Button; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Button._jQueryInterface; + }; + + return Button; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): carousel.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ - var relatedTarget = $next[0] - var slideEvent = $.Event('slide.bs.carousel', { - relatedTarget: relatedTarget, - direction: direction - }) - this.$element.trigger(slideEvent) - if (slideEvent.isDefaultPrevented()) return +var Carousel = (function ($) { - this.sliding = true + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ - isCycling && this.pause() + var NAME = 'carousel'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.carousel'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 600; - if (this.$indicators.length) { - this.$indicators.find('.active').removeClass('active') - var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) - $nextIndicator && $nextIndicator.addClass('active') + var Default = { + interval: 5000, + keyboard: true, + slide: false, + pause: 'hover', + wrap: true + }; + + var Direction = { + NEXT: 'next', + PREVIOUS: 'prev' + }; + + var Event = { + SLIDE: 'slide.bs.carousel', + SLID: 'slid.bs.carousel', + CLICK: 'click.bs.carousel.data-api', + LOAD: 'load' + }; + + var ClassName = { + CAROUSEL: 'carousel', + ACTIVE: 'active', + SLIDE: 'slide', + RIGHT: 'right', + LEFT: 'left', + ITEM: 'carousel-item' + }; + + var Selector = { + ACTIVE: '.active', + ACTIVE_ITEM: '.active.carousel-item', + ITEM: '.carousel-item', + NEXT_PREV: '.next, .prev', + INDICATORS: '.carousel-indicators', + DATA_SLIDE: '[data-slide], [data-slide-to]', + DATA_RIDE: '[data-ride="carousel"]' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Carousel = (function () { + function Carousel(element, config) { + _classCallCheck(this, Carousel); + + this._items = null; + this._interval = null; + this._activeElement = null; + + this._isPaused = false; + this._isSliding = false; + + this._config = config; + this._element = $(element)[0]; + this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0]; + + this._addEventListeners(); } - var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" - if ($.support.transition && this.$element.hasClass('slide')) { - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - $active - .one('bsTransitionEnd', function () { - $next.removeClass([type, direction].join(' ')).addClass('active') - $active.removeClass(['active', direction].join(' ')) - that.sliding = false - setTimeout(function () { - that.$element.trigger(slidEvent) - }, 0) - }) - .emulateTransitionEnd(Carousel.TRANSITION_DURATION) - } else { - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger(slidEvent) - } + _createClass(Carousel, [{ + key: 'next', - isCycling && this.cycle() + // public - return this - } - - - // CAROUSEL PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.carousel') - var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) - var action = typeof option == 'string' ? option : options.slide - - if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (action) data[action]() - else if (options.interval) data.pause().cycle() - }) - } + value: function next() { + if (!this._isSliding) { + this._slide(Direction.NEXT); + } + } + }, { + key: 'prev', + value: function prev() { + if (!this._isSliding) { + this._slide(Direction.PREVIOUS); + } + } + }, { + key: 'pause', + value: function pause(event) { + if (!event) { + this._isPaused = true; + } - var old = $.fn.carousel + if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) { + Util.triggerTransitionEnd(this._element); + this.cycle(true); + } - $.fn.carousel = Plugin - $.fn.carousel.Constructor = Carousel + clearInterval(this._interval); + this._interval = null; + } + }, { + key: 'cycle', + value: function cycle(event) { + if (!event) { + this._isPaused = false; + } + if (this._interval) { + clearInterval(this._interval); + this._interval = null; + } - // CAROUSEL NO CONFLICT - // ==================== + if (this._config.interval && !this._isPaused) { + this._interval = setInterval(this.next.bind(this), this._config.interval); + } + } + }, { + key: 'to', + value: function to(index) { + var _this2 = this; - $.fn.carousel.noConflict = function () { - $.fn.carousel = old - return this - } + this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; + var activeIndex = this._getItemIndex(this._activeElement); - // CAROUSEL DATA-API - // ================= + if (index > this._items.length - 1 || index < 0) { + return; + } - var clickHandler = function (e) { - var href - var $this = $(this) - var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 - if (!$target.hasClass('carousel')) return - var options = $.extend({}, $target.data(), $this.data()) - var slideIndex = $this.attr('data-slide-to') - if (slideIndex) options.interval = false + if (this._isSliding) { + $(this._element).one(Event.SLID, function () { + return _this2.to(index); + }); + return; + } - Plugin.call($target, options) + if (activeIndex == index) { + this.pause(); + this.cycle(); + return; + } - if (slideIndex) { - $target.data('bs.carousel').to(slideIndex) - } + var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS; - e.preventDefault() - } + this._slide(direction, this._items[index]); + } + }, { + key: '_addEventListeners', - $(document) - .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) - .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) + // private - $(window).on('load', function () { - $('[data-ride="carousel"]').each(function () { - var $carousel = $(this) - Plugin.call($carousel, $carousel.data()) - }) - }) + value: function _addEventListeners() { + if (this._config.keyboard) { + $(this._element).on('keydown.bs.carousel', this._keydown.bind(this)); + } -}(jQuery); + if (this._config.pause == 'hover' && !('ontouchstart' in document.documentElement)) { + $(this._element).on('mouseenter.bs.carousel', this.pause.bind(this)).on('mouseleave.bs.carousel', this.cycle.bind(this)); + } + } + }, { + key: '_keydown', + value: function _keydown(event) { + event.preventDefault(); + + if (/input|textarea/i.test(event.target.tagName)) return; + + switch (event.which) { + case 37: + this.prev();break; + case 39: + this.next();break; + default: + return; + } + } + }, { + key: '_getItemIndex', + value: function _getItemIndex(element) { + this._items = $.makeArray($(element).parent().find(Selector.ITEM)); + return this._items.indexOf(element); + } + }, { + key: '_getItemByDirection', + value: function _getItemByDirection(direction, activeElement) { + var isNextDirection = direction === Direction.NEXT; + var isPrevDirection = direction === Direction.PREVIOUS; + var activeIndex = this._getItemIndex(activeElement); + var lastItemIndex = this._items.length - 1; + var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex == lastItemIndex; + + if (isGoingToWrap && !this._config.wrap) { + return activeElement; + } -/* ======================================================================== - * Bootstrap: collapse.js v3.3.4 - * http://getbootstrap.com/javascript/#collapse - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ + var delta = direction == Direction.PREVIOUS ? -1 : 1; + var itemIndex = (activeIndex + delta) % this._items.length; + return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; + } + }, { + key: '_triggerSlideEvent', + value: function _triggerSlideEvent(relatedTarget, directionalClassname) { + var slideEvent = $.Event(Event.SLIDE, { + relatedTarget: relatedTarget, + direction: directionalClassname + }); -+function ($) { - 'use strict'; - - // COLLAPSE PUBLIC CLASS DEFINITION - // ================================ - - var Collapse = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Collapse.DEFAULTS, options) - this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + - '[data-toggle="collapse"][data-target="#' + element.id + '"]') - this.transitioning = null - - if (this.options.parent) { - this.$parent = this.getParent() - } else { - this.addAriaAndCollapsedClass(this.$element, this.$trigger) - } + $(this._element).trigger(slideEvent); - if (this.options.toggle) this.toggle() - } + return slideEvent; + } + }, { + key: '_setActiveIndicatorElement', + value: function _setActiveIndicatorElement(element) { + if (this._indicatorsElement) { + $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE); - Collapse.VERSION = '3.3.4' + var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; - Collapse.TRANSITION_DURATION = 350 + if (nextIndicator) { + $(nextIndicator).addClass(ClassName.ACTIVE); + } + } + } + }, { + key: '_slide', + value: function _slide(direction, element) { + var _this3 = this; - Collapse.DEFAULTS = { - toggle: true - } + var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; + var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); - Collapse.prototype.dimension = function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } + var isCycling = !!this._interval; - Collapse.prototype.show = function () { - if (this.transitioning || this.$element.hasClass('in')) return + var directionalClassName = direction == Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT; - var activesData - var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') + if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) { + this._isSliding = false; + return; + } - if (actives && actives.length) { - activesData = actives.data('bs.collapse') - if (activesData && activesData.transitioning) return - } + var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName); + if (slideEvent.isDefaultPrevented()) { + return; + } - var startEvent = $.Event('show.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return + if (!activeElement || !nextElement) { + // some weirdness is happening, so we bail + return; + } - if (actives && actives.length) { - Plugin.call(actives, 'hide') - activesData || actives.data('bs.collapse', null) - } + this._isSliding = true; - var dimension = this.dimension() + if (isCycling) { + this.pause(); + } - this.$element - .removeClass('collapse') - .addClass('collapsing')[dimension](0) - .attr('aria-expanded', true) + this._setActiveIndicatorElement(nextElement); - this.$trigger - .removeClass('collapsed') - .attr('aria-expanded', true) + var slidEvent = $.Event(Event.SLID, { + relatedTarget: nextElement, + direction: directionalClassName + }); - this.transitioning = 1 + if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) { - var complete = function () { - this.$element - .removeClass('collapsing') - .addClass('collapse in')[dimension]('') - this.transitioning = 0 - this.$element - .trigger('shown.bs.collapse') - } + $(nextElement).addClass(direction); - if (!$.support.transition) return complete.call(this) + Util.reflow(nextElement); - var scrollSize = $.camelCase(['scroll', dimension].join('-')) + $(activeElement).addClass(directionalClassName); + $(nextElement).addClass(directionalClassName); - this.$element - .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) - } + $(activeElement).one(Util.TRANSITION_END, function () { + $(nextElement).removeClass(directionalClassName).removeClass(direction); - Collapse.prototype.hide = function () { - if (this.transitioning || !this.$element.hasClass('in')) return + $(nextElement).addClass(ClassName.ACTIVE); - var startEvent = $.Event('hide.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return + $(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName); - var dimension = this.dimension() + _this3._isSliding = false; - this.$element[dimension](this.$element[dimension]())[0].offsetHeight + setTimeout(function () { + return $(_this3._element).trigger(slidEvent); + }, 0); + }).emulateTransitionEnd(TRANSITION_DURATION); + } else { + $(activeElement).removeClass(ClassName.ACTIVE); + $(nextElement).addClass(ClassName.ACTIVE); - this.$element - .addClass('collapsing') - .removeClass('collapse in') - .attr('aria-expanded', false) + this._isSliding = false; + $(this._element).trigger(slidEvent); + } - this.$trigger - .addClass('collapsed') - .attr('aria-expanded', false) + if (isCycling) { + this.cycle(); + } + } + }], [{ + key: 'VERSION', - this.transitioning = 1 + // getters - var complete = function () { - this.transitioning = 0 - this.$element - .removeClass('collapsing') - .addClass('collapse') - .trigger('hidden.bs.collapse') - } + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = $.extend({}, Default, $(this).data()); + + if (typeof config === 'object') { + $.extend(_config, config); + } + + var action = typeof config === 'string' ? config : _config.slide; + + if (!data) { + data = new Carousel(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config == 'number') { + data.to(config); + } else if (action) { + data[action](); + } else if (_config.interval) { + data.pause(); + data.cycle(); + } + }); + } + }, { + key: '_dataApiClickHandler', + value: function _dataApiClickHandler(event) { + var selector = Util.getSelectorFromElement(this); - if (!$.support.transition) return complete.call(this) + if (!selector) { + return; + } - this.$element - [dimension](0) - .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(Collapse.TRANSITION_DURATION) - } + var target = $(selector)[0]; - Collapse.prototype.toggle = function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } + if (!target || !$(target).hasClass(ClassName.CAROUSEL)) { + return; + } - Collapse.prototype.getParent = function () { - return $(this.options.parent) - .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') - .each($.proxy(function (i, element) { - var $element = $(element) - this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) - }, this)) - .end() - } + var config = $.extend({}, $(target).data(), $(this).data()); - Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { - var isOpen = $element.hasClass('in') + var slideIndex = this.getAttribute('data-slide-to'); + if (slideIndex) { + config.interval = false; + } - $element.attr('aria-expanded', isOpen) - $trigger - .toggleClass('collapsed', !isOpen) - .attr('aria-expanded', isOpen) - } + Carousel._jQueryInterface.call($(target), config); - function getTargetFromTrigger($trigger) { - var href - var target = $trigger.attr('data-target') - || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 + if (slideIndex) { + $(target).data(DATA_KEY).to(slideIndex); + } - return $(target) - } + event.preventDefault(); + } + }]); + + return Carousel; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK, Selector.DATA_SLIDE, Carousel._dataApiClickHandler); + + $(window).on(Event.LOAD, function () { + $(Selector.DATA_RIDE).each(function () { + var $carousel = $(this); + Carousel._jQueryInterface.call($carousel, $carousel.data()); + }); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Carousel._jQueryInterface; + $.fn[NAME].Constructor = Carousel; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Carousel._jQueryInterface; + }; + + return Carousel; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): collapse.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ +var Collapse = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'collapse'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.collapse'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 600; + + var Default = { + toggle: true, + parent: null + }; + + var Event = { + SHOW: 'show.bs.collapse', + SHOWN: 'shown.bs.collapse', + HIDE: 'hide.bs.collapse', + HIDDEN: 'hidden.bs.collapse', + CLICK: 'click.bs.collapse.data-api' + }; + + var ClassName = { + IN: 'in', + COLLAPSE: 'collapse', + COLLAPSING: 'collapsing', + COLLAPSED: 'collapsed' + }; + + var Dimension = { + WIDTH: 'width', + HEIGHT: 'height' + }; + + var Selector = { + ACTIVES: '.panel > .in, .panel > .collapsing', + DATA_TOGGLE: '[data-toggle="collapse"]' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Collapse = (function () { + function Collapse(element, config) { + _classCallCheck(this, Collapse); + + this._isTransitioning = false; + this._element = element; + this._config = $.extend({}, Default, config); + this._triggerArray = $.makeArray($('[data-toggle="collapse"][href="#' + element.id + '"],' + ('[data-toggle="collapse"][data-target="#' + element.id + '"]'))); + + this._parent = this._config.parent ? this._getParent() : null; + + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._element, this._triggerArray); + } - // COLLAPSE PLUGIN DEFINITION - // ========================== + if (this._config.toggle) { + this.toggle(); + } + } - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.collapse') - var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) + _createClass(Collapse, [{ + key: 'toggle', - if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false - if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) - if (typeof option == 'string') data[option]() - }) - } + // public - var old = $.fn.collapse + value: function toggle() { + if ($(this._element).hasClass(ClassName.IN)) { + this.hide(); + } else { + this.show(); + } + } + }, { + key: 'show', + value: function show() { + var _this4 = this; - $.fn.collapse = Plugin - $.fn.collapse.Constructor = Collapse + if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) { + return; + } + var activesData = undefined; + var actives = undefined; - // COLLAPSE NO CONFLICT - // ==================== + if (this._parent) { + actives = $.makeArray($(Selector.ACTIVES)); + if (!actives.length) { + actives = null; + } + } - $.fn.collapse.noConflict = function () { - $.fn.collapse = old - return this - } + if (actives) { + activesData = $(actives).data(DATA_KEY); + if (activesData && activesData._isTransitioning) { + return; + } + } + var startEvent = $.Event(Event.SHOW); + $(this._element).trigger(startEvent); + if (startEvent.isDefaultPrevented()) { + return; + } - // COLLAPSE DATA-API - // ================= + if (actives) { + Collapse._jQueryInterface.call($(actives), 'hide'); + if (!activesData) { + $(actives).data(DATA_KEY, null); + } + } - $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { - var $this = $(this) + var dimension = this._getDimension(); - if (!$this.attr('data-target')) e.preventDefault() + $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); - var $target = getTargetFromTrigger($this) - var data = $target.data('bs.collapse') - var option = data ? 'toggle' : $this.data() + this._element.style[dimension] = 0; + this._element.setAttribute('aria-expanded', true); - Plugin.call($target, option) - }) + if (this._triggerArray.length) { + $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); + } -}(jQuery); + this.setTransitioning(true); -/* ======================================================================== - * Bootstrap: dropdown.js v3.3.4 - * http://getbootstrap.com/javascript/#dropdowns - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ + var complete = function complete() { + $(_this4._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN); + _this4._element.style[dimension] = ''; -+function ($) { - 'use strict'; + _this4.setTransitioning(false); - // DROPDOWN CLASS DEFINITION - // ========================= + $(_this4._element).trigger(Event.SHOWN); + }; - var backdrop = '.dropdown-backdrop' - var toggle = '[data-toggle="dropdown"]' - var Dropdown = function (element) { - $(element).on('click.bs.dropdown', this.toggle) - } + if (!Util.supportsTransitionEnd()) { + complete(); + return; + } - Dropdown.VERSION = '3.3.4' + var scrollSize = 'scroll' + (dimension[0].toUpperCase() + dimension.slice(1)); - function getParent($this) { - var selector = $this.attr('data-target') + $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); - if (!selector) { - selector = $this.attr('href') - selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } + this._element.style[dimension] = this._element[scrollSize] + 'px'; + } + }, { + key: 'hide', + value: function hide() { + var _this5 = this; - var $parent = selector && $(selector) + if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) { + return; + } - return $parent && $parent.length ? $parent : $this.parent() - } + var startEvent = $.Event(Event.HIDE); + $(this._element).trigger(startEvent); + if (startEvent.isDefaultPrevented()) { + return; + } - function clearMenus(e) { - if (e && e.which === 3) return - $(backdrop).remove() - $(toggle).each(function () { - var $this = $(this) - var $parent = getParent($this) - var relatedTarget = { relatedTarget: this } + var dimension = this._getDimension(); + var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight'; - if (!$parent.hasClass('open')) return + this._element.style[dimension] = this._element[offsetDimension] + 'px'; - if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return + Util.reflow(this._element); - $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) + $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN); - if (e.isDefaultPrevented()) return + this._element.setAttribute('aria-expanded', false); - $this.attr('aria-expanded', 'false') - $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget) - }) - } + if (this._triggerArray.length) { + $(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); + } - Dropdown.prototype.toggle = function (e) { - var $this = $(this) + this.setTransitioning(true); - if ($this.is('.disabled, :disabled')) return + var complete = function complete() { + _this5.setTransitioning(false); + $(_this5._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); + }; - var $parent = getParent($this) - var isActive = $parent.hasClass('open') + this._element.style[dimension] = 0; - clearMenus() + if (!Util.supportsTransitionEnd()) { + return complete(); + } - if (!isActive) { - if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { - // if mobile we use a backdrop because click events don't delegate - $(document.createElement('div')) - .addClass('dropdown-backdrop') - .insertAfter($(this)) - .on('click', clearMenus) + $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); } + }, { + key: 'setTransitioning', + value: function setTransitioning(isTransitioning) { + this._isTransitioning = isTransitioning; + } + }, { + key: '_getDimension', - var relatedTarget = { relatedTarget: this } - $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) - - if (e.isDefaultPrevented()) return - - $this - .trigger('focus') - .attr('aria-expanded', 'true') - - $parent - .toggleClass('open') - .trigger('shown.bs.dropdown', relatedTarget) - } - - return false - } - - Dropdown.prototype.keydown = function (e) { - if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return - - var $this = $(this) - - e.preventDefault() - e.stopPropagation() - - if ($this.is('.disabled, :disabled')) return - - var $parent = getParent($this) - var isActive = $parent.hasClass('open') - - if (!isActive && e.which != 27 || isActive && e.which == 27) { - if (e.which == 27) $parent.find(toggle).trigger('focus') - return $this.trigger('click') - } - - var desc = ' li:not(.disabled):visible a' - var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc) + // private - if (!$items.length) return + value: function _getDimension() { + var hasWidth = $(this._element).hasClass(Dimension.WIDTH); + return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; + } + }, { + key: '_getParent', + value: function _getParent() { + var _this6 = this; - var index = $items.index(e.target) + var parent = $(this._config.parent)[0]; + var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]'; - if (e.which == 38 && index > 0) index-- // up - if (e.which == 40 && index < $items.length - 1) index++ // down - if (!~index) index = 0 + $(parent).find(selector).each(function (i, element) { + _this6._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); + }); - $items.eq(index).trigger('focus') - } + return parent; + } + }, { + key: '_addAriaAndCollapsedClass', + value: function _addAriaAndCollapsedClass(element, triggerArray) { + if (element) { + var isOpen = $(element).hasClass(ClassName.IN); + element.setAttribute('aria-expanded', isOpen); + + if (triggerArray.length) { + $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); + } + } + } + }], [{ + key: 'VERSION', + // getters - // DROPDOWN PLUGIN DEFINITION - // ========================== + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_getTargetFromElement', - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.dropdown') + // static - if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) - if (typeof option == 'string') data[option].call($this) - }) - } + value: function _getTargetFromElement(element) { + var selector = Util.getSelectorFromElement(element); + return selector ? $(selector)[0] : null; + } + }, { + key: '_jQueryInterface', + value: function _jQueryInterface(config) { + return this.each(function () { + var $this = $(this); + var data = $this.data(DATA_KEY); + var _config = $.extend({}, Default, $this.data(), typeof config === 'object' && config); + + if (!data && _config.toggle && /show|hide/.test(config)) { + _config.toggle = false; + } + + if (!data) { + data = new Collapse(this, _config); + $this.data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); - var old = $.fn.dropdown + return Collapse; + })(); - $.fn.dropdown = Plugin - $.fn.dropdown.Constructor = Dropdown + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + $(document).on(Event.CLICK, Selector.DATA_TOGGLE, function (event) { + event.preventDefault(); - // DROPDOWN NO CONFLICT - // ==================== + var target = Collapse._getTargetFromElement(this); - $.fn.dropdown.noConflict = function () { - $.fn.dropdown = old - return this - } + var data = $(target).data(DATA_KEY); + var config = data ? 'toggle' : $(this).data(); + Collapse._jQueryInterface.call($(target), config); + }); - // APPLY TO STANDARD DROPDOWN ELEMENTS - // =================================== + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ - $(document) - .on('click.bs.dropdown.data-api', clearMenus) - .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) - .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) - .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) - .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) + $.fn[NAME] = Collapse._jQueryInterface; + $.fn[NAME].Constructor = Collapse; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Collapse._jQueryInterface; + }; -}(jQuery); + return Collapse; +})(jQuery); -/* ======================================================================== - * Bootstrap: modal.js v3.3.4 - * http://getbootstrap.com/javascript/#modals - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): dropdown.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - + * -------------------------------------------------------------------------- + */ -+function ($) { - 'use strict'; - - // MODAL CLASS DEFINITION - // ====================== - - var Modal = function (element, options) { - this.options = options - this.$body = $(document.body) - this.$element = $(element) - this.$dialog = this.$element.find('.modal-dialog') - this.$backdrop = null - this.isShown = null - this.originalBodyPad = null - this.scrollbarWidth = 0 - this.ignoreBackdropClick = false - - if (this.options.remote) { - this.$element - .find('.modal-content') - .load(this.options.remote, $.proxy(function () { - this.$element.trigger('loaded.bs.modal') - }, this)) +var Dropdown = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'dropdown'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.dropdown'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + + var Event = { + HIDE: 'hide.bs.dropdown', + HIDDEN: 'hidden.bs.dropdown', + SHOW: 'show.bs.dropdown', + SHOWN: 'shown.bs.dropdown', + CLICK: 'click.bs.dropdown', + KEYDOWN: 'keydown.bs.dropdown.data-api', + CLICK_DATA: 'click.bs.dropdown.data-api' + }; + + var ClassName = { + BACKDROP: 'dropdown-backdrop', + DISABLED: 'disabled', + OPEN: 'open' + }; + + var Selector = { + BACKDROP: '.dropdown-backdrop', + DATA_TOGGLE: '[data-toggle="dropdown"]', + FORM_CHILD: '.dropdown form', + ROLE_MENU: '[role="menu"]', + ROLE_LISTBOX: '[role="listbox"]', + NAVBAR_NAV: '.navbar-nav', + VISIBLE_ITEMS: '[role="menu"] li:not(.disabled) a, ' + '[role="listbox"] li:not(.disabled) a' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Dropdown = (function () { + function Dropdown(element) { + _classCallCheck(this, Dropdown); + + $(element).on(Event.CLICK, this.toggle); } - } - Modal.VERSION = '3.3.4' + _createClass(Dropdown, [{ + key: 'toggle', - Modal.TRANSITION_DURATION = 300 - Modal.BACKDROP_TRANSITION_DURATION = 150 + // public - Modal.DEFAULTS = { - backdrop: true, - keyboard: true, - show: true - } + value: function toggle() { + if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { + return; + } - Modal.prototype.toggle = function (_relatedTarget) { - return this.isShown ? this.hide() : this.show(_relatedTarget) - } + var parent = Dropdown._getParentFromElement(this); + var isActive = $(parent).hasClass(ClassName.OPEN); - Modal.prototype.show = function (_relatedTarget) { - var that = this - var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) + Dropdown._clearMenus(); - this.$element.trigger(e) + if (isActive) { + return false; + } - if (this.isShown || e.isDefaultPrevented()) return + if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) { - this.isShown = true + // if mobile we use a backdrop because click events don't delegate + var dropdown = document.createElement('div'); + dropdown.className = ClassName.BACKDROP; + $(dropdown).insertBefore(this); + $(dropdown).on('click', Dropdown._clearMenus); + } - this.checkScrollbar() - this.setScrollbar() - this.$body.addClass('modal-open') + var relatedTarget = { relatedTarget: this }; + var showEvent = $.Event(Event.SHOW, relatedTarget); - this.escape() - this.resize() + $(parent).trigger(showEvent); - this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) + if (showEvent.isDefaultPrevented()) { + return; + } - this.$dialog.on('mousedown.dismiss.bs.modal', function () { - that.$element.one('mouseup.dismiss.bs.modal', function (e) { - if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true - }) - }) + this.focus(); + this.setAttribute('aria-expanded', 'true'); - this.backdrop(function () { - var transition = $.support.transition && that.$element.hasClass('fade') + $(parent).toggleClass(ClassName.OPEN); + $(parent).trigger(Event.SHOWN, relatedTarget); - if (!that.$element.parent().length) { - that.$element.appendTo(that.$body) // don't move modals dom position + return false; } + }], [{ + key: 'VERSION', - that.$element - .show() - .scrollTop(0) - - that.adjustDialog() + // getters - if (transition) { - that.$element[0].offsetWidth // force reflow + get: function () { + return VERSION; } + }, { + key: '_jQueryInterface', - that.$element.addClass('in') + // static - that.enforceFocus() + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); - var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) + if (!data) { + $(this).data(DATA_KEY, data = new Dropdown(this)); + } - transition ? - that.$dialog // wait for modal to slide in - .one('bsTransitionEnd', function () { - that.$element.trigger('focus').trigger(e) - }) - .emulateTransitionEnd(Modal.TRANSITION_DURATION) : - that.$element.trigger('focus').trigger(e) - }) - } + if (typeof config === 'string') { + data[config].call(this); + } + }); + } + }, { + key: '_clearMenus', + value: function _clearMenus(event) { + if (event && event.which === 3) { + return; + } - Modal.prototype.hide = function (e) { - if (e) e.preventDefault() + var backdrop = $(Selector.BACKDROP)[0]; + if (backdrop) { + backdrop.parentNode.removeChild(backdrop); + } - e = $.Event('hide.bs.modal') + var toggles = $.makeArray($(Selector.DATA_TOGGLE)); - this.$element.trigger(e) + for (var i = 0; i < toggles.length; i++) { + var _parent = Dropdown._getParentFromElement(toggles[i]); + var relatedTarget = { relatedTarget: toggles[i] }; - if (!this.isShown || e.isDefaultPrevented()) return + if (!$(_parent).hasClass(ClassName.OPEN)) { + continue; + } - this.isShown = false + if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(_parent, event.target)) { + continue; + } - this.escape() - this.resize() + var hideEvent = $.Event(Event.HIDE, relatedTarget); + $(_parent).trigger(hideEvent); + if (hideEvent.isDefaultPrevented()) { + continue; + } - $(document).off('focusin.bs.modal') + toggles[i].setAttribute('aria-expanded', 'false'); - this.$element - .removeClass('in') - .off('click.dismiss.bs.modal') - .off('mouseup.dismiss.bs.modal') + $(_parent).removeClass(ClassName.OPEN).trigger(Event.HIDDEN, relatedTarget); + } + } + }, { + key: '_getParentFromElement', + value: function _getParentFromElement(element) { + var parent = undefined; + var selector = Util.getSelectorFromElement(element); + + if (selector) { + parent = $(selector)[0]; + } - this.$dialog.off('mousedown.dismiss.bs.modal') + return parent || element.parentNode; + } + }, { + key: '_dataApiKeydownHandler', + value: function _dataApiKeydownHandler(event) { + if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) { + return; + } - $.support.transition && this.$element.hasClass('fade') ? - this.$element - .one('bsTransitionEnd', $.proxy(this.hideModal, this)) - .emulateTransitionEnd(Modal.TRANSITION_DURATION) : - this.hideModal() - } + event.preventDefault(); + event.stopPropagation(); - Modal.prototype.enforceFocus = function () { - $(document) - .off('focusin.bs.modal') // guard against infinite focus loop - .on('focusin.bs.modal', $.proxy(function (e) { - if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { - this.$element.trigger('focus') + if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { + return; } - }, this)) - } - Modal.prototype.escape = function () { - if (this.isShown && this.options.keyboard) { - this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) { - e.which == 27 && this.hide() - }, this)) - } else if (!this.isShown) { - this.$element.off('keydown.dismiss.bs.modal') - } - } + var parent = Dropdown._getParentFromElement(this); + var isActive = $(parent).hasClass(ClassName.OPEN); - Modal.prototype.resize = function () { - if (this.isShown) { - $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this)) - } else { - $(window).off('resize.bs.modal') - } - } + if (!isActive && event.which !== 27 || isActive && event.which === 27) { - Modal.prototype.hideModal = function () { - var that = this - this.$element.hide() - this.backdrop(function () { - that.$body.removeClass('modal-open') - that.resetAdjustments() - that.resetScrollbar() - that.$element.trigger('hidden.bs.modal') - }) - } + if (event.which === 27) { + var toggle = $(parent).find(Selector.DATA_TOGGLE)[0]; + $(toggle).trigger('focus'); + } - Modal.prototype.removeBackdrop = function () { - this.$backdrop && this.$backdrop.remove() - this.$backdrop = null - } - - Modal.prototype.backdrop = function (callback) { - var that = this - var animate = this.$element.hasClass('fade') ? 'fade' : '' + $(this).trigger('click'); + return; + } - if (this.isShown && this.options.backdrop) { - var doAnimate = $.support.transition && animate + var items = $.makeArray($(Selector.VISIBLE_ITEMS)); - this.$backdrop = $(document.createElement('div')) - .addClass('modal-backdrop ' + animate) - .appendTo(this.$body) + items = items.filter(function (item) { + return item.offsetWidth || item.offsetHeight; + }); - this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { - if (this.ignoreBackdropClick) { - this.ignoreBackdropClick = false - return + if (!items.length) { + return; } - if (e.target !== e.currentTarget) return - this.options.backdrop == 'static' - ? this.$element[0].focus() - : this.hide() - }, this)) - if (doAnimate) this.$backdrop[0].offsetWidth // force reflow + var index = items.indexOf(event.target); - this.$backdrop.addClass('in') + if (event.which === 38 && index > 0) index--; // up + if (event.which === 40 && index < items.length - 1) index++; // down + if (! ~index) index = 0; - if (!callback) return + items[index].focus(); + } + }]); + + return Dropdown; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.KEYDOWN, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA, Dropdown._clearMenus).on(Event.CLICK_DATA, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA, Selector.FORM_CHILD, function (e) { + e.stopPropagation(); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Dropdown._jQueryInterface; + $.fn[NAME].Constructor = Dropdown; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Dropdown._jQueryInterface; + }; + + return Dropdown; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): modal.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ - doAnimate ? - this.$backdrop - .one('bsTransitionEnd', callback) - .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : - callback() +var Modal = (function ($) { - } else if (!this.isShown && this.$backdrop) { - this.$backdrop.removeClass('in') + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ - var callbackRemove = function () { - that.removeBackdrop() - callback && callback() - } - $.support.transition && this.$element.hasClass('fade') ? - this.$backdrop - .one('bsTransitionEnd', callbackRemove) - .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : - callbackRemove() + var NAME = 'modal'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.modal'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 300; + var BACKDROP_TRANSITION_DURATION = 150; - } else if (callback) { - callback() + var Default = { + backdrop: true, + keyboard: true, + show: true + }; + + var Event = { + HIDE: 'hide.bs.modal', + HIDDEN: 'hidden.bs.modal', + SHOW: 'show.bs.modal', + SHOWN: 'shown.bs.modal', + DISMISS: 'click.dismiss.bs.modal', + KEYDOWN: 'keydown.dismiss.bs.modal', + FOCUSIN: 'focusin.bs.modal', + RESIZE: 'resize.bs.modal', + CLICK: 'click.bs.modal.data-api', + MOUSEDOWN: 'mousedown.dismiss.bs.modal', + MOUSEUP: 'mouseup.dismiss.bs.modal' + }; + + var ClassName = { + BACKDROP: 'modal-backdrop', + OPEN: 'modal-open', + FADE: 'fade', + IN: 'in' + }; + + var Selector = { + DIALOG: '.modal-dialog', + DATA_TOGGLE: '[data-toggle="modal"]', + DATA_DISMISS: '[data-dismiss="modal"]', + SCROLLBAR_MEASURER: 'modal-scrollbar-measure' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Modal = (function () { + function Modal(element, config) { + _classCallCheck(this, Modal); + + this._config = config; + this._element = element; + this._dialog = $(element).find(Selector.DIALOG)[0]; + this._backdrop = null; + this._isShown = false; + this._isBodyOverflowing = false; + this._ignoreBackdropClick = false; + this._originalBodyPadding = 0; + this._scrollbarWidth = 0; } - } - // these following methods are used to handle overflowing modals + _createClass(Modal, [{ + key: 'toggle', - Modal.prototype.handleUpdate = function () { - this.adjustDialog() - } + // public - Modal.prototype.adjustDialog = function () { - var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight + value: function toggle(relatedTarget) { + return this._isShown ? this.hide() : this.show(relatedTarget); + } + }, { + key: 'show', + value: function show(relatedTarget) { + var _this7 = this; - this.$element.css({ - paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', - paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' - }) - } + var showEvent = $.Event(Event.SHOW, { + relatedTarget: relatedTarget + }); - Modal.prototype.resetAdjustments = function () { - this.$element.css({ - paddingLeft: '', - paddingRight: '' - }) - } + $(this._element).trigger(showEvent); - Modal.prototype.checkScrollbar = function () { - var fullWindowWidth = window.innerWidth - if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8 - var documentElementRect = document.documentElement.getBoundingClientRect() - fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left) - } - this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth - this.scrollbarWidth = this.measureScrollbar() - } + if (this._isShown || showEvent.isDefaultPrevented()) { + return; + } - Modal.prototype.setScrollbar = function () { - var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) - this.originalBodyPad = document.body.style.paddingRight || '' - if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) - } + this._isShown = true; - Modal.prototype.resetScrollbar = function () { - this.$body.css('padding-right', this.originalBodyPad) - } - - Modal.prototype.measureScrollbar = function () { // thx walsh - var scrollDiv = document.createElement('div') - scrollDiv.className = 'modal-scrollbar-measure' - this.$body.append(scrollDiv) - var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth - this.$body[0].removeChild(scrollDiv) - return scrollbarWidth - } + this._checkScrollbar(); + this._setScrollbar(); + $(document.body).addClass(ClassName.OPEN); - // MODAL PLUGIN DEFINITION - // ======================= + this._setEscapeEvent(); + this._setResizeEvent(); - function Plugin(option, _relatedTarget) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.modal') - var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) + $(this._element).on(Event.DISMISS, Selector.DATA_DISMISS, this.hide.bind(this)); - if (!data) $this.data('bs.modal', (data = new Modal(this, options))) - if (typeof option == 'string') data[option](_relatedTarget) - else if (options.show) data.show(_relatedTarget) - }) - } + $(this._dialog).on(Event.MOUSEDOWN, function () { + $(_this7._element).one(Event.MOUSEUP, function (event) { + if ($(event.target).is(_this7._element)) { + that._ignoreBackdropClick = true; + } + }); + }); - var old = $.fn.modal + this._showBackdrop(this._showElement.bind(this, relatedTarget)); + } + }, { + key: 'hide', + value: function hide(event) { + if (event) { + event.preventDefault(); + } - $.fn.modal = Plugin - $.fn.modal.Constructor = Modal + var hideEvent = $.Event(Event.HIDE); + $(this._element).trigger(hideEvent); - // MODAL NO CONFLICT - // ================= + if (!this._isShown || hideEvent.isDefaultPrevented()) { + return; + } - $.fn.modal.noConflict = function () { - $.fn.modal = old - return this - } + this._isShown = false; + this._setEscapeEvent(); + this._setResizeEvent(); - // MODAL DATA-API - // ============== + $(document).off(Event.FOCUSIN); - $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { - var $this = $(this) - var href = $this.attr('href') - var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7 - var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) + $(this._element).removeClass(ClassName.IN); - if ($this.is('a')) e.preventDefault() + $(this._element).off(Event.DISMISS); + $(this._dialog).off(Event.MOUSEDOWN); - $target.one('show.bs.modal', function (showEvent) { - if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown - $target.one('hidden.bs.modal', function () { - $this.is(':visible') && $this.trigger('focus') - }) - }) - Plugin.call($target, option, this) - }) + if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { -}(jQuery); + $(this._element).one(Util.TRANSITION_END, this._hideModal.bind(this)).emulateTransitionEnd(TRANSITION_DURATION); + } else { + this._hideModal(); + } + } + }, { + key: '_showElement', -/* ======================================================================== - * Bootstrap: tooltip.js v3.3.4 - * http://getbootstrap.com/javascript/#tooltip - * Inspired by the original jQuery.tipsy by Jason Frame - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ + // private + value: function _showElement(relatedTarget) { + var _this8 = this; -+function ($) { - 'use strict'; + var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE); - // TOOLTIP PUBLIC CLASS DEFINITION - // =============================== + if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { + // don't move modals dom position + document.body.appendChild(this._element); + } - var Tooltip = function (element, options) { - this.type = null - this.options = null - this.enabled = null - this.timeout = null - this.hoverState = null - this.$element = null - this.inState = null + this._element.style.display = 'block'; + this._element.scrollTop = 0; - this.init('tooltip', element, options) - } + if (transition) { + Util.reflow(this._element); + } - Tooltip.VERSION = '3.3.4' + $(this._element).addClass(ClassName.IN); - Tooltip.TRANSITION_DURATION = 150 + this._enforceFocus(); - Tooltip.DEFAULTS = { - animation: true, - placement: 'top', - selector: false, - template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', - trigger: 'hover focus', - title: '', - delay: 0, - html: false, - container: false, - viewport: { - selector: 'body', - padding: 0 - } - } + var shownEvent = $.Event(Event.SHOWN, { + relatedTarget: relatedTarget + }); - Tooltip.prototype.init = function (type, element, options) { - this.enabled = true - this.type = type - this.$element = $(element) - this.options = this.getOptions(options) - this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport)) - this.inState = { click: false, hover: false, focus: false } + var transitionComplete = function transitionComplete() { + _this8._element.focus(); + $(_this8._element).trigger(shownEvent); + }; - if (this.$element[0] instanceof document.constructor && !this.options.selector) { - throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!') - } + if (transition) { + $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION); + } else { + transitionComplete(); + } + } + }, { + key: '_enforceFocus', + value: function _enforceFocus() { + var _this9 = this; + + $(document).off(Event.FOCUSIN) // guard against infinite focus loop + .on(Event.FOCUSIN, function (event) { + if (_this9._element !== event.target && !$(_this9._element).has(event.target).length) { + _this9._element.focus(); + } + }); + } + }, { + key: '_setEscapeEvent', + value: function _setEscapeEvent() { + var _this10 = this; + + if (this._isShown && this._config.keyboard) { + $(this._element).on(Event.KEYDOWN, function (event) { + if (event.which === 27) { + _this10.hide(); + } + }); + } else if (!this._isShown) { + $(this._element).off(Event.KEYDOWN); + } + } + }, { + key: '_setResizeEvent', + value: function _setResizeEvent() { + if (this._isShown) { + $(window).on(Event.RESIZE, this._handleUpdate.bind(this)); + } else { + $(window).off(Event.RESIZE); + } + } + }, { + key: '_hideModal', + value: function _hideModal() { + var _this11 = this; + + this._element.style.display = 'none'; + this._showBackdrop(function () { + $(document.body).removeClass(ClassName.OPEN); + _this11._resetAdjustments(); + _this11._resetScrollbar(); + $(_this11._element).trigger(Event.HIDDEN); + }); + } + }, { + key: '_removeBackdrop', + value: function _removeBackdrop() { + if (this._backdrop) { + $(this._backdrop).remove(); + this._backdrop = null; + } + } + }, { + key: '_showBackdrop', + value: function _showBackdrop(callback) { + var _this12 = this; + + var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; + + if (this._isShown && this._config.backdrop) { + var doAnimate = Util.supportsTransitionEnd() && animate; + + this._backdrop = document.createElement('div'); + this._backdrop.className = ClassName.BACKDROP; + + if (animate) { + $(this._backdrop).addClass(animate); + } + + $(this._backdrop).appendTo(this.$body); + + $(this._element).on(Event.DISMISS, function (event) { + if (_this12._ignoreBackdropClick) { + _this12._ignoreBackdropClick = false; + return; + } + if (event.target !== event.currentTarget) { + return; + } + if (_this12._config.backdrop === 'static') { + _this12._element.focus(); + } else { + _this12.hide(); + } + }); + + if (doAnimate) { + Util.reflow(this._backdrop); + } + + $(this._backdrop).addClass(ClassName.IN); + + if (!callback) { + return; + } + + if (!doAnimate) { + callback(); + return; + } + + $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); + } else if (!this._isShown && this._backdrop) { + $(this._backdrop).removeClass(ClassName.IN); + + var callbackRemove = function callbackRemove() { + _this12._removeBackdrop(); + if (callback) { + callback(); + } + }; + + if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { + $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); + } else { + callbackRemove(); + } + } else if (callback) { + callback(); + } + } + }, { + key: '_handleUpdate', - var triggers = this.options.trigger.split(' ') + // ---------------------------------------------------------------------- + // the following methods are used to handle overflowing modals + // todo (fat): these should probably be refactored out of modal.js + // ---------------------------------------------------------------------- - for (var i = triggers.length; i--;) { - var trigger = triggers[i] + value: function _handleUpdate() { + this._adjustDialog(); + } + }, { + key: '_adjustDialog', + value: function _adjustDialog() { + var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; - if (trigger == 'click') { - this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) - } else if (trigger != 'manual') { - var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin' - var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout' + if (!this._isBodyOverflowing && isModalOverflowing) { + this._element.style.paddingLeft = this._scrollbarWidth + 'px'; + } - this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) - this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) + if (this._isBodyOverflowing && !isModalOverflowing) { + this._element.style.paddingRight = this._scrollbarWidth + 'px'; + } } - } + }, { + key: '_resetAdjustments', + value: function _resetAdjustments() { + this._element.style.paddingLeft = ''; + this._element.style.paddingRight = ''; + } + }, { + key: '_checkScrollbar', + value: function _checkScrollbar() { + var fullWindowWidth = window.innerWidth; + if (!fullWindowWidth) { + // workaround for missing window.innerWidth in IE8 + var documentElementRect = document.documentElement.getBoundingClientRect(); + fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left); + } + this._isBodyOverflowing = document.body.clientWidth < fullWindowWidth; + this._scrollbarWidth = this._getScrollbarWidth(); + } + }, { + key: '_setScrollbar', + value: function _setScrollbar() { + var bodyPadding = parseInt($(document.body).css('padding-right') || 0, 10); - this.options.selector ? - (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : - this.fixTitle() - } + this._originalBodyPadding = document.body.style.paddingRight || ''; - Tooltip.prototype.getDefaults = function () { - return Tooltip.DEFAULTS - } + if (this._isBodyOverflowing) { + document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px'; + } + } + }, { + key: '_resetScrollbar', + value: function _resetScrollbar() { + document.body.style.paddingRight = this._originalBodyPadding; + } + }, { + key: '_getScrollbarWidth', + value: function _getScrollbarWidth() { + // thx d.walsh + var scrollDiv = document.createElement('div'); + scrollDiv.className = Selector.SCROLLBAR_MEASURER; + document.body.appendChild(scrollDiv); + var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + } + }], [{ + key: 'VERSION', - Tooltip.prototype.getOptions = function (options) { - options = $.extend({}, this.getDefaults(), this.$element.data(), options) + // getters - if (options.delay && typeof options.delay == 'number') { - options.delay = { - show: options.delay, - hide: options.delay + get: function () { + return VERSION; } - } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_jQueryInterface', + + // static + + value: function _jQueryInterface(config, relatedTarget) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = $.extend({}, Modal.Default, $(this).data(), typeof config === 'object' && config); + + if (!data) { + data = new Modal(this, _config); + $(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + data[config](relatedTarget); + } else if (_config.show) { + data.show(relatedTarget); + } + }); + } + }]); - return options - } + return Modal; + })(); - Tooltip.prototype.getDelegateOptions = function () { - var options = {} - var defaults = this.getDefaults() + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ - this._options && $.each(this._options, function (key, value) { - if (defaults[key] != value) options[key] = value - }) + $(document).on(Event.CLICK, Selector.DATA_TOGGLE, function (event) { + var _this13 = this; - return options - } + var target = undefined; + var selector = Util.getSelectorFromElement(this); - Tooltip.prototype.enter = function (obj) { - var self = obj instanceof this.constructor ? - obj : $(obj.currentTarget).data('bs.' + this.type) - - if (!self) { - self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) - $(obj.currentTarget).data('bs.' + this.type, self) + if (selector) { + target = $(selector)[0]; } - if (obj instanceof $.Event) { - self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true - } + var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data()); - if (self.tip().hasClass('in') || self.hoverState == 'in') { - self.hoverState = 'in' - return + if (this.tagName === 'A') { + event.preventDefault(); } - clearTimeout(self.timeout) - - self.hoverState = 'in' - - if (!self.options.delay || !self.options.delay.show) return self.show() - - self.timeout = setTimeout(function () { - if (self.hoverState == 'in') self.show() - }, self.options.delay.show) - } + var $target = $(target).one(Event.SHOW, function (showEvent) { + if (showEvent.isDefaultPrevented()) { + // only register focus restorer if modal will actually get shown + return; + } - Tooltip.prototype.isInStateTrue = function () { - for (var key in this.inState) { - if (this.inState[key]) return true - } + $target.one(Event.HIDDEN, function () { + if ($(_this13).is(':visible')) { + _this13.focus(); + } + }); + }); + + Modal._jQueryInterface.call($(target), config, this); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Modal._jQueryInterface; + $.fn[NAME].Constructor = Modal; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Modal._jQueryInterface; + }; + + return Modal; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): scrollspy.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ - return false - } +var ScrollSpy = (function ($) { - Tooltip.prototype.leave = function (obj) { - var self = obj instanceof this.constructor ? - obj : $(obj.currentTarget).data('bs.' + this.type) + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ - if (!self) { - self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) - $(obj.currentTarget).data('bs.' + this.type, self) - } + var NAME = 'scrollspy'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.scrollspy'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; - if (obj instanceof $.Event) { - self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false + var Default = { + offset: 10 + }; + + var Event = { + ACTIVATE: 'activate.bs.scrollspy', + SCROLL: 'scroll.bs.scrollspy', + LOAD: 'load.bs.scrollspy.data-api' + }; + + var ClassName = { + DROPDOWN_MENU: 'dropdown-menu', + ACTIVE: 'active' + }; + + var Selector = { + DATA_SPY: '[data-spy="scroll"]', + ACTIVE: '.active', + LI_DROPDOWN: 'li.dropdown', + LI: 'li' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var ScrollSpy = (function () { + function ScrollSpy(element, config) { + _classCallCheck(this, ScrollSpy); + + this._scrollElement = element.tagName === 'BODY' ? window : element; + this._config = $.extend({}, Default, config); + this._selector = '' + (this._config.target || '') + ' .nav li > a'; + this._offsets = []; + this._targets = []; + this._activeTarget = null; + this._scrollHeight = 0; + + $(this._scrollElement).on(Event.SCROLL, this._process.bind(this)); + + this.refresh(); + this._process(); } - if (self.isInStateTrue()) return - - clearTimeout(self.timeout) - - self.hoverState = 'out' - - if (!self.options.delay || !self.options.delay.hide) return self.hide() - - self.timeout = setTimeout(function () { - if (self.hoverState == 'out') self.hide() - }, self.options.delay.hide) - } - - Tooltip.prototype.show = function () { - var e = $.Event('show.bs.' + this.type) - - if (this.hasContent() && this.enabled) { - this.$element.trigger(e) - - var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) - if (e.isDefaultPrevented() || !inDom) return - var that = this - - var $tip = this.tip() + _createClass(ScrollSpy, [{ + key: 'refresh', - var tipId = this.getUID(this.type) + // public - this.setContent() - $tip.attr('id', tipId) - this.$element.attr('aria-describedby', tipId) + value: function refresh() { + var _this14 = this; - if (this.options.animation) $tip.addClass('fade') + var offsetMethod = 'offset'; + var offsetBase = 0; - var placement = typeof this.options.placement == 'function' ? - this.options.placement.call(this, $tip[0], this.$element[0]) : - this.options.placement - - var autoToken = /\s?auto?\s?/i - var autoPlace = autoToken.test(placement) - if (autoPlace) placement = placement.replace(autoToken, '') || 'top' - - $tip - .detach() - .css({ top: 0, left: 0, display: 'block' }) - .addClass(placement) - .data('bs.' + this.type, this) - - this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) - this.$element.trigger('inserted.bs.' + this.type) - - var pos = this.getPosition() - var actualWidth = $tip[0].offsetWidth - var actualHeight = $tip[0].offsetHeight - - if (autoPlace) { - var orgPlacement = placement - var viewportDim = this.getPosition(this.$viewport) - - placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' : - placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' : - placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' : - placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' : - placement + if (this._scrollElement !== this._scrollElement.window) { + offsetMethod = 'position'; + offsetBase = this._getScrollTop(); + } - $tip - .removeClass(orgPlacement) - .addClass(placement) + this._offsets = []; + this._targets = []; + + this._scrollHeight = this._getScrollHeight(); + + var targets = $.makeArray($(this._selector)); + + targets.map(function (element) { + var target = undefined; + var targetSelector = Util.getSelectorFromElement(element); + + if (targetSelector) { + target = $(targetSelector)[0]; + } + + if (target && (target.offsetWidth || target.offsetHeight)) { + // todo (fat): remove sketch reliance on jQuery position/offset + return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; + } + }).filter(function (item) { + return item; + }).sort(function (a, b) { + return a[0] - b[0]; + }).forEach(function (item) { + _this14._offsets.push(item[0]); + _this14._targets.push(item[1]); + }); } + }, { + key: '_getScrollTop', - var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) - - this.applyPlacement(calculatedOffset, placement) - - var complete = function () { - var prevHoverState = that.hoverState - that.$element.trigger('shown.bs.' + that.type) - that.hoverState = null + // private - if (prevHoverState == 'out') that.leave(that) + value: function _getScrollTop() { + return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop; } - - $.support.transition && this.$tip.hasClass('fade') ? - $tip - .one('bsTransitionEnd', complete) - .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : - complete() - } - } - - Tooltip.prototype.applyPlacement = function (offset, placement) { - var $tip = this.tip() - var width = $tip[0].offsetWidth - var height = $tip[0].offsetHeight - - // manually read margins because getBoundingClientRect includes difference - var marginTop = parseInt($tip.css('margin-top'), 10) - var marginLeft = parseInt($tip.css('margin-left'), 10) - - // we must check for NaN for ie 8/9 - if (isNaN(marginTop)) marginTop = 0 - if (isNaN(marginLeft)) marginLeft = 0 - - offset.top += marginTop - offset.left += marginLeft - - // $.fn.offset doesn't round pixel values - // so we use setOffset directly with our own function B-0 - $.offset.setOffset($tip[0], $.extend({ - using: function (props) { - $tip.css({ - top: Math.round(props.top), - left: Math.round(props.left) - }) + }, { + key: '_getScrollHeight', + value: function _getScrollHeight() { + return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); } - }, offset), 0) - - $tip.addClass('in') - - // check to see if placing tip in new offset caused the tip to resize itself - var actualWidth = $tip[0].offsetWidth - var actualHeight = $tip[0].offsetHeight - - if (placement == 'top' && actualHeight != height) { - offset.top = offset.top + height - actualHeight - } - - var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight) - - if (delta.left) offset.left += delta.left - else offset.top += delta.top - - var isVertical = /top|bottom/.test(placement) - var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight - var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight' - - $tip.offset(offset) - this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical) - } - - Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) { - this.arrow() - .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%') - .css(isVertical ? 'top' : 'left', '') - } - - Tooltip.prototype.setContent = function () { - var $tip = this.tip() - var title = this.getTitle() - - $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) - $tip.removeClass('fade in top bottom left right') - } - - Tooltip.prototype.hide = function (callback) { - var that = this - var $tip = $(this.$tip) - var e = $.Event('hide.bs.' + this.type) - - function complete() { - if (that.hoverState != 'in') $tip.detach() - that.$element - .removeAttr('aria-describedby') - .trigger('hidden.bs.' + that.type) - callback && callback() - } - - this.$element.trigger(e) - - if (e.isDefaultPrevented()) return + }, { + key: '_process', + value: function _process() { + var scrollTop = this._getScrollTop() + this._config.offset; + var scrollHeight = this._getScrollHeight(); + var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight; + + if (this._scrollHeight !== scrollHeight) { + this.refresh(); + } - $tip.removeClass('in') + if (scrollTop >= maxScroll) { + var target = this._targets[this._targets.length - 1]; - $.support.transition && $tip.hasClass('fade') ? - $tip - .one('bsTransitionEnd', complete) - .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : - complete() + if (this._activeTarget !== target) { + this._activate(target); + } + } - this.hoverState = null + if (this._activeTarget && scrollTop < this._offsets[0]) { + this._activeTarget = null; + this._clear(); + return; + } - return this - } + for (var i = this._offsets.length; i--;) { + var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]); - Tooltip.prototype.fixTitle = function () { - var $e = this.$element - if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') - } - } + if (isActiveTarget) { + this._activate(this._targets[i]); + } + } + } + }, { + key: '_activate', + value: function _activate(target) { + this._activeTarget = target; - Tooltip.prototype.hasContent = function () { - return this.getTitle() - } + this._clear(); - Tooltip.prototype.getPosition = function ($element) { - $element = $element || this.$element + var selector = '' + this._selector + '[data-target="' + target + '"],' + ('' + this._selector + '[href="' + target + '"]'); - var el = $element[0] - var isBody = el.tagName == 'BODY' + // todo (fat): getting all the raw li's up the tree is not great. + var parentListItems = $(selector).parents(Selector.LI); - var elRect = el.getBoundingClientRect() - if (elRect.width == null) { - // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093 - elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top }) - } - var elOffset = isBody ? { top: 0, left: 0 } : $element.offset() - var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } - var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null + for (var i = parentListItems.length; i--;) { + $(parentListItems[i]).addClass(ClassName.ACTIVE); - return $.extend({}, elRect, scroll, outerDims, elOffset) - } + var itemParent = parentListItems[i].parentNode; - Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { - return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : - placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : - placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : - /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } + if (itemParent && $(itemParent).hasClass(ClassName.DROPDOWN_MENU)) { + var closestDropdown = $(itemParent).closest(Selector.LI_DROPDOWN)[0]; + $(closestDropdown).addClass(ClassName.ACTIVE); + } + } - } + $(this._scrollElement).trigger(Event.ACTIVATE, { + relatedTarget: target + }); + } + }, { + key: '_clear', + value: function _clear() { + var activeParents = $(this._selector).parentsUntil(this._config.target, Selector.ACTIVE); - Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) { - var delta = { top: 0, left: 0 } - if (!this.$viewport) return delta - - var viewportPadding = this.options.viewport && this.options.viewport.padding || 0 - var viewportDimensions = this.getPosition(this.$viewport) - - if (/right|left/.test(placement)) { - var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll - var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight - if (topEdgeOffset < viewportDimensions.top) { // top overflow - delta.top = viewportDimensions.top - topEdgeOffset - } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow - delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset - } - } else { - var leftEdgeOffset = pos.left - viewportPadding - var rightEdgeOffset = pos.left + viewportPadding + actualWidth - if (leftEdgeOffset < viewportDimensions.left) { // left overflow - delta.left = viewportDimensions.left - leftEdgeOffset - } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow - delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset + for (var i = activeParents.length; i--;) { + $(activeParents[i]).removeClass(ClassName.ACTIVE); + } } - } + }], [{ + key: 'VERSION', - return delta - } + // getters - Tooltip.prototype.getTitle = function () { - var title - var $e = this.$element - var o = this.options + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_jQueryInterface', - title = $e.attr('data-original-title') - || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) + // static - return title - } + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = typeof config === 'object' && config || null; - Tooltip.prototype.getUID = function (prefix) { - do prefix += ~~(Math.random() * 1000000) - while (document.getElementById(prefix)) - return prefix - } + if (!data) { + data = new ScrollSpy(this, _config); + $(this).data(DATA_KEY, data); + } - Tooltip.prototype.tip = function () { - if (!this.$tip) { - this.$tip = $(this.options.template) - if (this.$tip.length != 1) { - throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!') + if (typeof config === 'string') { + data[config](); + } + }); } - } - return this.$tip - } + }]); - Tooltip.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')) - } - - Tooltip.prototype.enable = function () { - this.enabled = true - } + return ScrollSpy; + })(); - Tooltip.prototype.disable = function () { - this.enabled = false - } + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ - Tooltip.prototype.toggleEnabled = function () { - this.enabled = !this.enabled - } + $(window).on(Event.LOAD, function () { + var scrollSpys = $.makeArray($(Selector.DATA_SPY)); - Tooltip.prototype.toggle = function (e) { - var self = this - if (e) { - self = $(e.currentTarget).data('bs.' + this.type) - if (!self) { - self = new this.constructor(e.currentTarget, this.getDelegateOptions()) - $(e.currentTarget).data('bs.' + this.type, self) - } + for (var i = scrollSpys.length; i--;) { + var $spy = $(scrollSpys[i]); + ScrollSpy._jQueryInterface.call($spy, $spy.data()); } + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = ScrollSpy._jQueryInterface; + $.fn[NAME].Constructor = ScrollSpy; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return ScrollSpy._jQueryInterface; + }; + + return ScrollSpy; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): tab.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ - if (e) { - self.inState.click = !self.inState.click - if (self.isInStateTrue()) self.enter(self) - else self.leave(self) - } else { - self.tip().hasClass('in') ? self.leave(self) : self.enter(self) +var Tab = (function ($) { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + + var NAME = 'tab'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.tab'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; + + var Event = { + HIDE: 'hide.bs.tab', + HIDDEN: 'hidden.bs.tab', + SHOW: 'show.bs.tab', + SHOWN: 'shown.bs.tab', + CLICK: 'click.bs.tab.data-api' + }; + + var ClassName = { + DROPDOWN_MENU: 'dropdown-menu', + ACTIVE: 'active', + FADE: 'fade', + IN: 'in' + }; + + var Selector = { + A: 'a', + LI: 'li', + LI_DROPDOWN: 'li.dropdown', + UL: 'ul:not(.dropdown-menu)', + FADE_CHILD: '> .fade', + ACTIVE: '.active', + ACTIVE_CHILD: '> .active', + DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"]', + DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu > .active' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Tab = (function () { + function Tab(element) { + _classCallCheck(this, Tab); + + this._element = element; } - } - - Tooltip.prototype.destroy = function () { - var that = this - clearTimeout(this.timeout) - this.hide(function () { - that.$element.off('.' + that.type).removeData('bs.' + that.type) - if (that.$tip) { - that.$tip.detach() - } - that.$tip = null - that.$arrow = null - that.$viewport = null - }) - } - - - // TOOLTIP PLUGIN DEFINITION - // ========================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.tooltip') - var options = typeof option == 'object' && option - - if (!data && /destroy|hide/.test(option)) return - if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.tooltip - $.fn.tooltip = Plugin - $.fn.tooltip.Constructor = Tooltip + _createClass(Tab, [{ + key: 'show', + // public - // TOOLTIP NO CONFLICT - // =================== + value: function show() { + var _this15 = this; - $.fn.tooltip.noConflict = function () { - $.fn.tooltip = old - return this - } + if (this._element.parentNode && this._element.parentNode.nodeType == Node.ELEMENT_NODE && $(this._element).parent().hasClass(ClassName.ACTIVE)) { + return; + } -}(jQuery); + var target = undefined; + var previous = undefined; + var ulElement = $(this._element).closest(Selector.UL)[0]; + var selector = Util.getSelectorFromElement(this._element); -/* ======================================================================== - * Bootstrap: popover.js v3.3.4 - * http://getbootstrap.com/javascript/#popovers - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ + if (ulElement) { + previous = $.makeArray($(ulElement).find(Selector.ACTIVE)); + previous = previous[previous.length - 1]; + if (previous) { + previous = $(previous).find(Selector.A)[0]; + } + } -+function ($) { - 'use strict'; - - // POPOVER PUBLIC CLASS DEFINITION - // =============================== + var hideEvent = $.Event(Event.HIDE, { + relatedTarget: this._element + }); - var Popover = function (element, options) { - this.init('popover', element, options) - } + var showEvent = $.Event(Event.SHOW, { + relatedTarget: previous + }); - if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') + if (previous) { + $(previous).trigger(hideEvent); + } - Popover.VERSION = '3.3.4' + $(this._element).trigger(showEvent); - Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { - placement: 'right', - trigger: 'click', - content: '', - template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>' - }) + if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) { + return; + } + if (selector) { + target = $(selector)[0]; + } - // NOTE: POPOVER EXTENDS tooltip.js - // ================================ + this._activate($(this._element).closest(Selector.LI)[0], ulElement); - Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) + var complete = function complete() { + var hiddenEvent = $.Event(Event.HIDDEN, { + relatedTarget: _this15._element + }); - Popover.prototype.constructor = Popover + var shownEvent = $.Event(Event.SHOWN, { + relatedTarget: previous + }); - Popover.prototype.getDefaults = function () { - return Popover.DEFAULTS - } + $(previous).trigger(hiddenEvent); + $(_this15._element).trigger(shownEvent); + }; - Popover.prototype.setContent = function () { - var $tip = this.tip() - var title = this.getTitle() - var content = this.getContent() + if (target) { + this._activate(target, target.parentNode, complete); + } else { + complete(); + } + } + }, { + key: '_activate', - $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) - $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events - this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' - ](content) + // private - $tip.removeClass('fade top bottom left right in') + value: function _activate(element, container, callback) { + var active = $(container).find(Selector.ACTIVE_CHILD)[0]; + var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || !!$(container).find(Selector.FADE_CHILD)[0]); - // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do - // this manually by checking the contents. - if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() - } + var complete = this._transitionComplete.bind(this, element, active, isTransitioning, callback); - Popover.prototype.hasContent = function () { - return this.getTitle() || this.getContent() - } + if (active && isTransitioning) { + $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + } else { + complete(); + } - Popover.prototype.getContent = function () { - var $e = this.$element - var o = this.options + if (active) { + $(active).removeClass(ClassName.IN); + } + } + }, { + key: '_transitionComplete', + value: function _transitionComplete(element, active, isTransitioning, callback) { + if (active) { + $(active).removeClass(ClassName.ACTIVE); + + var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; + if (dropdownChild) { + $(dropdownChild).removeClass(ClassName.ACTIVE); + } + + var activeToggle = $(active).find(Selector.DATA_TOGGLE)[0]; + if (activeToggle) { + activeToggle.setAttribute('aria-expanded', false); + } + } - return $e.attr('data-content') - || (typeof o.content == 'function' ? - o.content.call($e[0]) : - o.content) - } + $(element).addClass(ClassName.ACTIVE); - Popover.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.arrow')) - } + var elementToggle = $(element).find(Selector.DATA_TOGGLE)[0]; + if (elementToggle) { + elementToggle.setAttribute('aria-expanded', true); + } + if (isTransitioning) { + Util.reflow(element); + $(element).addClass(ClassName.IN); + } else { + $(element).removeClass(ClassName.FADE); + } - // POPOVER PLUGIN DEFINITION - // ========================= + if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.popover') - var options = typeof option == 'object' && option + var dropdownElement = $(element).closest(Selector.LI_DROPDOWN)[0]; + if (dropdownElement) { + $(dropdownElement).addClass(ClassName.ACTIVE); + } - if (!data && /destroy|hide/.test(option)) return - if (!data) $this.data('bs.popover', (data = new Popover(this, options))) - if (typeof option == 'string') data[option]() - }) - } + elementToggle = $(element).find(Selector.DATA_TOGGLE)[0]; + if (elementToggle) { + elementToggle.setAttribute('aria-expanded', true); + } + } - var old = $.fn.popover + if (callback) { + callback(); + } + } + }], [{ + key: 'VERSION', - $.fn.popover = Plugin - $.fn.popover.Constructor = Popover + // getters + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: '_jQueryInterface', - // POPOVER NO CONFLICT - // =================== + // static - $.fn.popover.noConflict = function () { - $.fn.popover = old - return this - } + value: function _jQueryInterface(config) { + return this.each(function () { + var $this = $(this); + var data = $this.data(DATA_KEY); -}(jQuery); + if (!data) { + data = data = new Tab(this); + $this.data(DATA_KEY, data); + } -/* ======================================================================== - * Bootstrap: scrollspy.js v3.3.4 - * http://getbootstrap.com/javascript/#scrollspy - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return Tab; + })(); + + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + $(document).on(Event.CLICK, Selector.DATA_TOGGLE, function (event) { + event.preventDefault(); + Tab._jQueryInterface.call($(this), 'show'); + }); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Tab._jQueryInterface; + $.fn[NAME].Constructor = Tab; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Tab._jQueryInterface; + }; + + return Tab; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): tooltip.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // SCROLLSPY CLASS DEFINITION - // ========================== - - function ScrollSpy(element, options) { - this.$body = $(document.body) - this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) - this.options = $.extend({}, ScrollSpy.DEFAULTS, options) - this.selector = (this.options.target || '') + ' .nav li > a' - this.offsets = [] - this.targets = [] - this.activeTarget = null - this.scrollHeight = 0 - - this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) - this.refresh() - this.process() - } - - ScrollSpy.VERSION = '3.3.4' - - ScrollSpy.DEFAULTS = { - offset: 10 - } - - ScrollSpy.prototype.getScrollHeight = function () { - return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) - } - - ScrollSpy.prototype.refresh = function () { - var that = this - var offsetMethod = 'offset' - var offsetBase = 0 - - this.offsets = [] - this.targets = [] - this.scrollHeight = this.getScrollHeight() - - if (!$.isWindow(this.$scrollElement[0])) { - offsetMethod = 'position' - offsetBase = this.$scrollElement.scrollTop() - } - - this.$body - .find(this.selector) - .map(function () { - var $el = $(this) - var href = $el.data('target') || $el.attr('href') - var $href = /^#./.test(href) && $(href) - - return ($href - && $href.length - && $href.is(':visible') - && [[$href[offsetMethod]().top + offsetBase, href]]) || null - }) - .sort(function (a, b) { return a[0] - b[0] }) - .each(function () { - that.offsets.push(this[0]) - that.targets.push(this[1]) - }) - } - - ScrollSpy.prototype.process = function () { - var scrollTop = this.$scrollElement.scrollTop() + this.options.offset - var scrollHeight = this.getScrollHeight() - var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() - var offsets = this.offsets - var targets = this.targets - var activeTarget = this.activeTarget - var i - - if (this.scrollHeight != scrollHeight) { - this.refresh() - } - - if (scrollTop >= maxScroll) { - return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) - } - - if (activeTarget && scrollTop < offsets[0]) { - this.activeTarget = null - return this.clear() - } - - for (i = offsets.length; i--;) { - activeTarget != targets[i] - && scrollTop >= offsets[i] - && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1]) - && this.activate(targets[i]) - } - } - - ScrollSpy.prototype.activate = function (target) { - this.activeTarget = target + * -------------------------------------------------------------------------- + */ - this.clear() +var Tooltip = (function ($) { - var selector = this.selector + - '[data-target="' + target + '"],' + - this.selector + '[href="' + target + '"]' + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ - var active = $(selector) - .parents('li') - .addClass('active') + var NAME = 'tooltip'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.tooltip'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; + var TRANSITION_DURATION = 150; + var CLASS_PREFIX = 'bs-tether'; - if (active.parent('.dropdown-menu').length) { - active = active - .closest('li.dropdown') - .addClass('active') + var Default = { + animation: true, + template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>', + trigger: 'hover focus', + title: '', + delay: 0, + html: false, + selector: false, + placement: 'top', + offset: '0 0', + constraints: null + }; + + var AttachmentMap = { + TOP: 'bottom center', + RIGHT: 'middle left', + BOTTOM: 'top center', + LEFT: 'middle right' + }; + + var HoverState = { + IN: 'in', + OUT: 'out' + }; + + var Event = { + HIDE: 'hide.bs.tooltip', + HIDDEN: 'hidden.bs.tooltip', + SHOW: 'show.bs.tooltip', + SHOWN: 'shown.bs.tooltip', + INSERTED: 'inserted.bs.tooltip', + CLICK: 'click.bs.tooltip', + FOCUSIN: 'focusin.bs.tooltip', + FOCUSOUT: 'focusout.bs.tooltip', + MOUSEENTER: 'mouseenter.bs.tooltip', + MOUSELEAVE: 'mouseleave.bs.tooltip' + }; + + var ClassName = { + FADE: 'fade', + IN: 'in' + }; + + var Selector = { + TOOLTIP: '.tooltip', + TOOLTIP_INNER: '.tooltip-inner' + }; + + var TetherClass = { + element: false, + enabled: false + }; + + var Trigger = { + HOVER: 'hover', + FOCUS: 'focus', + CLICK: 'click', + MANUAL: 'manual' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Tooltip = (function () { + function Tooltip(element, config) { + _classCallCheck(this, Tooltip); + + // private + this._isEnabled = true; + this._timeout = 0; + this._hoverState = ''; + this._activeTrigger = {}; + this._tether = null; + + // protected + this.element = element; + this.config = this._getConfig(config); + this.tip = null; + + this._setListeners(); } - active.trigger('activate.bs.scrollspy') - } - - ScrollSpy.prototype.clear = function () { - $(this.selector) - .parentsUntil(this.options.target, '.active') - .removeClass('active') - } + _createClass(Tooltip, [{ + key: 'enable', + // public - // SCROLLSPY PLUGIN DEFINITION - // =========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.scrollspy') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) - if (typeof option == 'string') data[option]() - }) - } + value: function enable() { + this._isEnabled = true; + } + }, { + key: 'disable', + value: function disable() { + this._isEnabled = false; + } + }, { + key: 'toggleEnabled', + value: function toggleEnabled() { + this._isEnabled = !this._isEnabled; + } + }, { + key: 'toggle', + value: function toggle(event) { + var context = this; + var dataKey = this.constructor.DATA_KEY; + + if (event) { + context = $(event.currentTarget).data(dataKey); + + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } + + context._activeTrigger.click = !context._activeTrigger.click; + + if (context._isWithActiveTrigger()) { + context._enter(null, context); + } else { + context._leave(null, context); + } + } else { + $(context.getTipElement()).hasClass(ClassName.IN) ? context._leave(null, context) : context._enter(null, context); + } + } + }, { + key: 'destroy', + value: function destroy() { + var _this16 = this; - var old = $.fn.scrollspy + clearTimeout(this._timeout); + this.hide(function () { + $(_this16.element).off('.' + _this16.constructor.NAME).removeData(_this16.constructor.DATA_KEY); - $.fn.scrollspy = Plugin - $.fn.scrollspy.Constructor = ScrollSpy + if (_this16.tip) { + $(_this16.tip).detach(); + } + _this16.tip = null; + }); + } + }, { + key: 'show', + value: function show() { + var _this17 = this; - // SCROLLSPY NO CONFLICT - // ===================== + var showEvent = $.Event(this.constructor.Event.SHOW); - $.fn.scrollspy.noConflict = function () { - $.fn.scrollspy = old - return this - } + if (this.isWithContent() && this._isEnabled) { + $(this.element).trigger(showEvent); + var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element); - // SCROLLSPY DATA-API - // ================== + if (showEvent.isDefaultPrevented() || !isInTheDom) { + return; + } - $(window).on('load.bs.scrollspy.data-api', function () { - $('[data-spy="scroll"]').each(function () { - var $spy = $(this) - Plugin.call($spy, $spy.data()) - }) - }) + var tip = this.getTipElement(); + var tipId = Util.getUID(this.constructor.NAME); -}(jQuery); + tip.setAttribute('id', tipId); + this.element.setAttribute('aria-describedby', tipId); -/* ======================================================================== - * Bootstrap: tab.js v3.3.4 - * http://getbootstrap.com/javascript/#tabs - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ + this.setContent(); + if (this.config.animation) { + $(tip).addClass(ClassName.FADE); + } -+function ($) { - 'use strict'; + var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; - // TAB CLASS DEFINITION - // ==================== + var attachment = this._getAttachment(placement); - var Tab = function (element) { - // jscs:disable requireDollarBeforejQueryAssignment - this.element = $(element) - // jscs:enable requireDollarBeforejQueryAssignment - } + $(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body); - Tab.VERSION = '3.3.4' + $(this.element).trigger(this.constructor.Event.INSERTED); - Tab.TRANSITION_DURATION = 150 + this._tether = new Tether({ + element: tip, + target: this.element, + attachment: attachment, + classes: TetherClass, + classPrefix: CLASS_PREFIX, + offset: this.config.offset, + constraints: this.config.constraints + }); - Tab.prototype.show = function () { - var $this = this.element - var $ul = $this.closest('ul:not(.dropdown-menu)') - var selector = $this.data('target') + Util.reflow(tip); + this._tether.position(); - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } + $(tip).addClass(ClassName.IN); - if ($this.parent('li').hasClass('active')) return - - var $previous = $ul.find('.active:last a') - var hideEvent = $.Event('hide.bs.tab', { - relatedTarget: $this[0] - }) - var showEvent = $.Event('show.bs.tab', { - relatedTarget: $previous[0] - }) - - $previous.trigger(hideEvent) - $this.trigger(showEvent) - - if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return - - var $target = $(selector) - - this.activate($this.closest('li'), $ul) - this.activate($target, $target.parent(), function () { - $previous.trigger({ - type: 'hidden.bs.tab', - relatedTarget: $this[0] - }) - $this.trigger({ - type: 'shown.bs.tab', - relatedTarget: $previous[0] - }) - }) - } + var complete = function complete() { + var prevHoverState = _this17._hoverState; + _this17._hoverState = null; - Tab.prototype.activate = function (element, container, callback) { - var $active = container.find('> .active') - var transition = callback - && $.support.transition - && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length) - - function next() { - $active - .removeClass('active') - .find('> .dropdown-menu > .active') - .removeClass('active') - .end() - .find('[data-toggle="tab"]') - .attr('aria-expanded', false) - - element - .addClass('active') - .find('[data-toggle="tab"]') - .attr('aria-expanded', true) - - if (transition) { - element[0].offsetWidth // reflow for transition - element.addClass('in') - } else { - element.removeClass('fade') - } - - if (element.parent('.dropdown-menu').length) { - element - .closest('li.dropdown') - .addClass('active') - .end() - .find('[data-toggle="tab"]') - .attr('aria-expanded', true) - } - - callback && callback() - } + $(_this17.element).trigger(_this17.constructor.Event.SHOWN); - $active.length && transition ? - $active - .one('bsTransitionEnd', next) - .emulateTransitionEnd(Tab.TRANSITION_DURATION) : - next() + if (prevHoverState === HoverState.OUT) { + _this17._leave(null, _this17); + } + }; - $active.removeClass('in') - } + Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE) ? $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION) : complete(); + } + } + }, { + key: 'hide', + value: function hide(callback) { + var _this18 = this; + + var tip = this.getTipElement(); + var hideEvent = $.Event(this.constructor.Event.HIDE); + var complete = function complete() { + if (_this18._hoverState !== HoverState.IN && tip.parentNode) { + tip.parentNode.removeChild(tip); + } + + _this18.element.removeAttribute('aria-describedby'); + $(_this18.element).trigger(_this18.constructor.Event.HIDDEN); + _this18.cleanupTether(); + + if (callback) { + callback(); + } + }; + + $(this.element).trigger(hideEvent); + + if (hideEvent.isDefaultPrevented()) { + return; + } + $(tip).removeClass(ClassName.IN); - // TAB PLUGIN DEFINITION - // ===================== + if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.tab') + $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + } else { + complete(); + } - if (!data) $this.data('bs.tab', (data = new Tab(this))) - if (typeof option == 'string') data[option]() - }) - } + this._hoverState = ''; + } + }, { + key: 'isWithContent', - var old = $.fn.tab + // protected - $.fn.tab = Plugin - $.fn.tab.Constructor = Tab + value: function isWithContent() { + return !!this.getTitle(); + } + }, { + key: 'getTipElement', + value: function getTipElement() { + return this.tip = this.tip || $(this.config.template)[0]; + } + }, { + key: 'setContent', + value: function setContent() { + var tip = this.getTipElement(); + var title = this.getTitle(); + var method = this.config.html ? 'innerHTML' : 'innerText'; + $(tip).find(Selector.TOOLTIP_INNER)[0][method] = title; - // TAB NO CONFLICT - // =============== + $(tip).removeClass(ClassName.FADE).removeClass(ClassName.IN); - $.fn.tab.noConflict = function () { - $.fn.tab = old - return this - } + this.cleanupTether(); + } + }, { + key: 'getTitle', + value: function getTitle() { + var title = this.element.getAttribute('data-original-title'); + if (!title) { + title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; + } - // TAB DATA-API - // ============ + return title; + } + }, { + key: 'cleanupTether', + value: function cleanupTether() { + if (this._tether) { + this._tether.destroy(); + + // clean up after tether's junk classes + // remove after they fix issue + // (https://github.com/HubSpot/tether/issues/36) + $(this.element).removeClass(this._removeTetherClasses); + $(this.tip).removeClass(this._removeTetherClasses); + } + } + }, { + key: '_getAttachment', - var clickHandler = function (e) { - e.preventDefault() - Plugin.call($(this), 'show') - } + // private - $(document) - .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler) - .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler) + value: function _getAttachment(placement) { + return AttachmentMap[placement.toUpperCase()]; + } + }, { + key: '_setListeners', + value: function _setListeners() { + var _this19 = this; + + var triggers = this.config.trigger.split(' '); + + triggers.forEach(function (trigger) { + if (trigger === 'click') { + $(_this19.element).on(_this19.constructor.Event.CLICK, _this19.config.selector, _this19.toggle.bind(_this19)); + } else if (trigger !== Trigger.MANUAL) { + var eventIn = trigger == Trigger.HOVER ? _this19.constructor.Event.MOUSEENTER : _this19.constructor.Event.FOCUSIN; + var eventOut = trigger == Trigger.HOVER ? _this19.constructor.Event.MOUSELEAVE : _this19.constructor.Event.FOCUSOUT; + + $(_this19.element).on(eventIn, _this19.config.selector, _this19._enter.bind(_this19)).on(eventOut, _this19.config.selector, _this19._leave.bind(_this19)); + } + }); + + if (this.config.selector) { + this.config = $.extend({}, this.config, { + trigger: 'manual', + selector: '' + }); + } else { + this._fixTitle(); + } + } + }, { + key: '_removeTetherClasses', + value: function _removeTetherClasses(i, css) { + return ((css.baseVal || css).match(new RegExp('(^|\\s)' + CLASS_PREFIX + '-\\S+', 'g')) || []).join(' '); + } + }, { + key: '_fixTitle', + value: function _fixTitle() { + var titleType = typeof this.element.getAttribute('data-original-title'); + if (this.element.getAttribute('title') || titleType !== 'string') { + this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); + this.element.setAttribute('title', ''); + } + } + }, { + key: '_enter', + value: function _enter(event, context) { + var dataKey = this.constructor.DATA_KEY; -}(jQuery); + context = context || $(event.currentTarget).data(dataKey); -/* ======================================================================== - * Bootstrap: affix.js v3.3.4 - * http://getbootstrap.com/javascript/#affix - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } + if (event) { + context._activeTrigger[event.type == 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; + } -+function ($) { - 'use strict'; + if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) { + context._hoverState = HoverState.IN; + return; + } - // AFFIX CLASS DEFINITION - // ====================== + clearTimeout(context._timeout); - var Affix = function (element, options) { - this.options = $.extend({}, Affix.DEFAULTS, options) + context._hoverState = HoverState.IN; - this.$target = $(this.options.target) - .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) - .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) + if (!context.config.delay || !context.config.delay.show) { + context.show(); + return; + } - this.$element = $(element) - this.affixed = null - this.unpin = null - this.pinnedOffset = null + context._timeout = setTimeout(function () { + if (context._hoverState === HoverState.IN) { + context.show(); + } + }, context.config.delay.show); + } + }, { + key: '_leave', + value: function _leave(event, context) { + var dataKey = this.constructor.DATA_KEY; - this.checkPosition() - } + context = context || $(event.currentTarget).data(dataKey); - Affix.VERSION = '3.3.4' + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $(event.currentTarget).data(dataKey, context); + } - Affix.RESET = 'affix affix-top affix-bottom' + if (event) { + context._activeTrigger[event.type == 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; + } - Affix.DEFAULTS = { - offset: 0, - target: window - } + if (context._isWithActiveTrigger()) { + return; + } - Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - var targetHeight = this.$target.height() + clearTimeout(context._timeout); - if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false + context._hoverState = HoverState.OUT; - if (this.affixed == 'bottom') { - if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' - return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' - } + if (!context.config.delay || !context.config.delay.hide) { + context.hide(); + return; + } - var initializing = this.affixed == null - var colliderTop = initializing ? scrollTop : position.top - var colliderHeight = initializing ? targetHeight : height + context._timeout = setTimeout(function () { + if (context._hoverState === HoverState.OUT) { + context.hide(); + } + }, context.config.delay.hide); + } + }, { + key: '_isWithActiveTrigger', + value: function _isWithActiveTrigger() { + for (var trigger in this._activeTrigger) { + if (this._activeTrigger[trigger]) { + return true; + } + } - if (offsetTop != null && scrollTop <= offsetTop) return 'top' - if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' + return false; + } + }, { + key: '_getConfig', + value: function _getConfig(config) { + config = $.extend({}, this.constructor.Default, $(this.element).data(), config); + + if (config.delay && typeof config.delay === 'number') { + config.delay = { + show: config.delay, + hide: config.delay + }; + } - return false - } + return config; + } + }, { + key: '_getDelegateConfig', + value: function _getDelegateConfig() { + var config = {}; + + if (this.config) { + for (var key in this.config) { + var value = this.config[key]; + if (this.constructor.Default[key] !== value) { + config[key] = value; + } + } + } - Affix.prototype.getPinnedOffset = function () { - if (this.pinnedOffset) return this.pinnedOffset - this.$element.removeClass(Affix.RESET).addClass('affix') - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - return (this.pinnedOffset = position.top - scrollTop) - } + return config; + } + }], [{ + key: 'VERSION', - Affix.prototype.checkPositionWithEventLoop = function () { - setTimeout($.proxy(this.checkPosition, this), 1) - } + // getters - Affix.prototype.checkPosition = function () { - if (!this.$element.is(':visible')) return + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: 'NAME', + get: function () { + return NAME; + } + }, { + key: 'DATA_KEY', + get: function () { + return DATA_KEY; + } + }, { + key: 'Event', + get: function () { + return Event; + } + }, { + key: '_jQueryInterface', - var height = this.$element.height() - var offset = this.options.offset - var offsetTop = offset.top - var offsetBottom = offset.bottom - var scrollHeight = Math.max($(document).height(), $(document.body).height()) + // static - if (typeof offset != 'object') offsetBottom = offsetTop = offset - if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) - if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = typeof config === 'object' ? config : null; - var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) + if (!data && /destroy|hide/.test(config)) { + return; + } - if (this.affixed != affix) { - if (this.unpin != null) this.$element.css('top', '') + if (!data) { + data = new Tooltip(this, _config); + $(this).data(DATA_KEY, data); + } - var affixType = 'affix' + (affix ? '-' + affix : '') - var e = $.Event(affixType + '.bs.affix') + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return Tooltip; + })(); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Tooltip._jQueryInterface; + $.fn[NAME].Constructor = Tooltip; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Tooltip._jQueryInterface; + }; + + return Tooltip; +})(jQuery); + +/** + * -------------------------------------------------------------------------- + * Bootstrap (v4.0.0): popover.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ - this.$element.trigger(e) +var Popover = (function ($) { - if (e.isDefaultPrevented()) return + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ - this.affixed = affix - this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null + var NAME = 'popover'; + var VERSION = '4.0.0'; + var DATA_KEY = 'bs.popover'; + var JQUERY_NO_CONFLICT = $.fn[NAME]; - this.$element - .removeClass(Affix.RESET) - .addClass(affixType) - .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') + var Default = $.extend({}, Tooltip.Default, { + placement: 'right', + trigger: 'click', + content: '', + template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>' + }); + + var ClassName = { + FADE: 'fade', + IN: 'in' + }; + + var Selector = { + TITLE: '.popover-title', + CONTENT: '.popover-content', + ARROW: '.popover-arrow' + }; + + var Event = { + HIDE: 'hide.bs.popover', + HIDDEN: 'hidden.bs.popover', + SHOW: 'show.bs.popover', + SHOWN: 'shown.bs.popover', + INSERTED: 'inserted.bs.popover', + CLICK: 'click.bs.popover', + FOCUSIN: 'focusin.bs.popover', + FOCUSOUT: 'focusout.bs.popover', + MOUSEENTER: 'mouseenter.bs.popover', + MOUSELEAVE: 'mouseleave.bs.popover' + }; + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + var Popover = (function (_Tooltip) { + function Popover() { + _classCallCheck(this, Popover); + + if (_Tooltip != null) { + _Tooltip.apply(this, arguments); + } } - if (affix == 'bottom') { - this.$element.offset({ - top: scrollHeight - height - offsetBottom - }) - } - } + _inherits(Popover, _Tooltip); + _createClass(Popover, [{ + key: 'isWithContent', - // AFFIX PLUGIN DEFINITION - // ======================= + // overrides - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.affix') - var options = typeof option == 'object' && option + value: function isWithContent() { + return this.getTitle() || this._getContent(); + } + }, { + key: 'getTipElement', + value: function getTipElement() { + return this.tip = this.tip || $(this.config.template)[0]; + } + }, { + key: 'setContent', + value: function setContent() { + var tip = this.getTipElement(); + var title = this.getTitle(); + var content = this._getContent(); + var titleElement = $(tip).find(Selector.TITLE)[0]; + + if (titleElement) { + titleElement[this.config.html ? 'innerHTML' : 'innerText'] = title; + } - if (!data) $this.data('bs.affix', (data = new Affix(this, options))) - if (typeof option == 'string') data[option]() - }) - } + // we use append for html objects to maintain js events + $(tip).find(Selector.CONTENT).children().detach().end()[this.config.html ? typeof content === 'string' ? 'html' : 'append' : 'text'](content); - var old = $.fn.affix + $(tip).removeClass(ClassName.FADE).removeClass(ClassName.IN); - $.fn.affix = Plugin - $.fn.affix.Constructor = Affix + this.cleanupTether(); + } + }, { + key: '_getContent', + // private - // AFFIX NO CONFLICT - // ================= + value: function _getContent() { + return this.element.getAttribute('data-content') || (typeof this.config.content == 'function' ? this.config.content.call(this.element) : this.config.content); + } + }], [{ + key: 'VERSION', - $.fn.affix.noConflict = function () { - $.fn.affix = old - return this - } + // getters + get: function () { + return VERSION; + } + }, { + key: 'Default', + get: function () { + return Default; + } + }, { + key: 'NAME', + get: function () { + return NAME; + } + }, { + key: 'DATA_KEY', + get: function () { + return DATA_KEY; + } + }, { + key: 'Event', + get: function () { + return Event; + } + }, { + key: '_jQueryInterface', - // AFFIX DATA-API - // ============== + // static - $(window).on('load', function () { - $('[data-spy="affix"]').each(function () { - var $spy = $(this) - var data = $spy.data() + value: function _jQueryInterface(config) { + return this.each(function () { + var data = $(this).data(DATA_KEY); + var _config = typeof config === 'object' ? config : null; - data.offset = data.offset || {} + if (!data && /destroy|hide/.test(config)) { + return; + } - if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom - if (data.offsetTop != null) data.offset.top = data.offsetTop + if (!data) { + data = new Popover(this, _config); + $(this).data(DATA_KEY, data); + } - Plugin.call($spy, data) - }) - }) + if (typeof config === 'string') { + data[config](); + } + }); + } + }]); + + return Popover; + })(Tooltip); + + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $.fn[NAME] = Popover._jQueryInterface; + $.fn[NAME].Constructor = Popover; + $.fn[NAME].noConflict = function () { + $.fn[NAME] = JQUERY_NO_CONFLICT; + return Popover._jQueryInterface; + }; + + return Popover; +})(jQuery); }(jQuery); diff --git a/dist/js/bootstrap.min.js b/dist/js/bootstrap.min.js index 7665759238..25d4455607 100644 --- a/dist/js/bootstrap.min.js +++ b/dist/js/bootstrap.min.js @@ -3,5 +3,5 @@ * Copyright 2011-2015 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.4",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.4",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")), -d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.4",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
\ No newline at end of file +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(){"use strict";function a(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(a.__proto__=b)}function b(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}{var c=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),d=function(a){function b(){return{bindType:f.end,delegateType:f.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}}}function c(){if(window.QUnit)return!1;var a=document.createElement("bootstrap");for(var b in g)if(void 0!==a.style[b])return{end:g[b]};return!1}function d(b){var c=this,d=!1;return a(this).one(h.TRANSITION_END,function(){d=!0}),setTimeout(function(){d||h.triggerTransitionEnd(c)},b),this}function e(){f=c(),a.fn.emulateTransitionEnd=d,h.supportsTransitionEnd()&&(a.event.special[h.TRANSITION_END]=b())}var f=!1,g={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},h={TRANSITION_END:"bsTransitionEnd",getUID:function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},getSelectorFromElement:function(a){var b=a.getAttribute("data-target");return b||(b=a.getAttribute("href")||"",b=/^#[a-z]/i.test(b)?b:null),b},reflow:function(a){new Function("bs","return bs")(a.offsetHeight)},triggerTransitionEnd:function(b){a(b).trigger(f.end)},supportsTransitionEnd:function(){return!!f}};return e(),h}(jQuery),e=(function(a){var e="alert",f="4.0.0",g="bs.alert",h=a.fn[e],i=150,j={DISMISS:'[data-dismiss="alert"]'},k={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK:"click.bs.alert.data-api"},l={ALERT:"alert",FADE:"fade",IN:"in"},m=function(){function e(a){b(this,e),this._element=a}return c(e,[{key:"close",value:function(a){a=a||this._element;var b=this._getRootElement(a),c=this._triggerCloseEvent(b);c.isDefaultPrevented()||this._removeElement(b)}},{key:"_getRootElement",value:function(b){var c=!1,e=d.getSelectorFromElement(b);return e&&(c=a(e)[0]),c||(c=a(b).closest("."+l.ALERT)[0]),c}},{key:"_triggerCloseEvent",value:function(b){var c=a.Event(k.CLOSE);return a(b).trigger(c),c}},{key:"_removeElement",value:function(b){return a(b).removeClass(l.IN),d.supportsTransitionEnd()&&a(b).hasClass(l.FADE)?void a(b).one(d.TRANSITION_END,this._destroyElement.bind(this,b)).emulateTransitionEnd(i):void this._destroyElement(b)}},{key:"_destroyElement",value:function(b){a(b).detach().trigger(k.CLOSED).remove()}}],[{key:"VERSION",get:function(){return f}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this),d=c.data(g);d||(d=new e(this),c.data(g,d)),"close"===b&&d[b](this)})}},{key:"_handleDismiss",value:function(a){return function(b){b&&b.preventDefault(),a.close(this)}}}]),e}();return a(document).on(k.CLICK,j.DISMISS,m._handleDismiss(new m)),a.fn[e]=m._jQueryInterface,a.fn[e].Constructor=m,a.fn[e].noConflict=function(){return a.fn[e]=h,m._jQueryInterface},m}(jQuery),function(a){var d="button",e="4.0.0",f="bs.button",g=a.fn[d],h={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},i={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},j={CLICK:"click.bs.button.data-api",FOCUS_BLUR:"focus.bs.button.data-api blur.bs.button.data-api"},k=function(){function d(a){b(this,d),this._element=a}return c(d,[{key:"toggle",value:function(){var b=!0,c=a(this._element).closest(i.DATA_TOGGLE)[0];if(c){var d=a(this._element).find(i.INPUT)[0];if(d){if("radio"===d.type)if(d.checked&&a(this._element).hasClass(h.ACTIVE))b=!1;else{var e=a(c).find(i.ACTIVE)[0];e&&a(e).removeClass(h.ACTIVE)}b&&(d.checked=!a(this._element).hasClass(h.ACTIVE),a(this._element).trigger("change"))}}else this._element.setAttribute("aria-pressed",!a(this._element).hasClass(h.ACTIVE));b&&a(this._element).toggleClass(h.ACTIVE)}}],[{key:"VERSION",get:function(){return e}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(f);c||(c=new d(this),a(this).data(f,c)),"toggle"===b&&c[b]()})}}]),d}();return a(document).on(j.CLICK,i.DATA_TOGGLE_CARROT,function(b){b.preventDefault();var c=b.target;a(c).hasClass(h.BUTTON)||(c=a(c).closest(i.BUTTON)),k._jQueryInterface.call(a(c),"toggle")}).on(j.FOCUS_BLUR,i.DATA_TOGGLE_CARROT,function(b){var c=a(b.target).closest(i.BUTTON)[0];a(c).toggleClass(h.FOCUS,/^focus(in)?$/.test(b.type))}),a.fn[d]=k._jQueryInterface,a.fn[d].Constructor=k,a.fn[d].noConflict=function(){return a.fn[d]=g,k._jQueryInterface},k}(jQuery),function(a){var e="carousel",f="4.0.0",g="bs.carousel",h=a.fn[e],i=600,j={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},k={NEXT:"next",PREVIOUS:"prev"},l={SLIDE:"slide.bs.carousel",SLID:"slid.bs.carousel",CLICK:"click.bs.carousel.data-api",LOAD:"load"},m={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"right",LEFT:"left",ITEM:"carousel-item"},n={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".next, .prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},o=function(){function e(c,d){b(this,e),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this._config=d,this._element=a(c)[0],this._indicatorsElement=a(this._element).find(n.INDICATORS)[0],this._addEventListeners()}return c(e,[{key:"next",value:function(){this._isSliding||this._slide(k.NEXT)}},{key:"prev",value:function(){this._isSliding||this._slide(k.PREVIOUS)}},{key:"pause",value:function(b){b||(this._isPaused=!0),a(this._element).find(n.NEXT_PREV)[0]&&d.supportsTransitionEnd()&&(d.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}},{key:"cycle",value:function(a){a||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval(this.next.bind(this),this._config.interval))}},{key:"to",value:function(b){var c=this;this._activeElement=a(this._element).find(n.ACTIVE_ITEM)[0];var d=this._getItemIndex(this._activeElement);if(!(b>this._items.length-1||0>b)){if(this._isSliding)return void a(this._element).one(l.SLID,function(){return c.to(b)});if(d==b)return this.pause(),void this.cycle();var e=b>d?k.NEXT:k.PREVIOUS;this._slide(e,this._items[b])}}},{key:"_addEventListeners",value:function(){this._config.keyboard&&a(this._element).on("keydown.bs.carousel",this._keydown.bind(this)),"hover"!=this._config.pause||"ontouchstart"in document.documentElement||a(this._element).on("mouseenter.bs.carousel",this.pause.bind(this)).on("mouseleave.bs.carousel",this.cycle.bind(this))}},{key:"_keydown",value:function(a){if(a.preventDefault(),!/input|textarea/i.test(a.target.tagName))switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}}},{key:"_getItemIndex",value:function(b){return this._items=a.makeArray(a(b).parent().find(n.ITEM)),this._items.indexOf(b)}},{key:"_getItemByDirection",value:function(a,b){var c=a===k.NEXT,d=a===k.PREVIOUS,e=this._getItemIndex(b),f=this._items.length-1,g=d&&0===e||c&&e==f;if(g&&!this._config.wrap)return b;var h=a==k.PREVIOUS?-1:1,i=(e+h)%this._items.length;return-1===i?this._items[this._items.length-1]:this._items[i]}},{key:"_triggerSlideEvent",value:function(b,c){var d=a.Event(l.SLIDE,{relatedTarget:b,direction:c});return a(this._element).trigger(d),d}},{key:"_setActiveIndicatorElement",value:function(b){if(this._indicatorsElement){a(this._indicatorsElement).find(n.ACTIVE).removeClass(m.ACTIVE);var c=this._indicatorsElement.children[this._getItemIndex(b)];c&&a(c).addClass(m.ACTIVE)}}},{key:"_slide",value:function(b,c){var e=this,f=a(this._element).find(n.ACTIVE_ITEM)[0],g=c||f&&this._getItemByDirection(b,f),h=!!this._interval,j=b==k.NEXT?m.LEFT:m.RIGHT;if(g&&a(g).hasClass(m.ACTIVE))return void(this._isSliding=!1);var o=this._triggerSlideEvent(g,j);if(!o.isDefaultPrevented()&&f&&g){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(g);var p=a.Event(l.SLID,{relatedTarget:g,direction:j});d.supportsTransitionEnd()&&a(this._element).hasClass(m.SLIDE)?(a(g).addClass(b),d.reflow(g),a(f).addClass(j),a(g).addClass(j),a(f).one(d.TRANSITION_END,function(){a(g).removeClass(j).removeClass(b),a(g).addClass(m.ACTIVE),a(f).removeClass(m.ACTIVE).removeClass(b).removeClass(j),e._isSliding=!1,setTimeout(function(){return a(e._element).trigger(p)},0)}).emulateTransitionEnd(i)):(a(f).removeClass(m.ACTIVE),a(g).addClass(m.ACTIVE),this._isSliding=!1,a(this._element).trigger(p)),h&&this.cycle()}}}],[{key:"VERSION",get:function(){return f}},{key:"Default",get:function(){return j}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g),d=a.extend({},j,a(this).data());"object"==typeof b&&a.extend(d,b);var f="string"==typeof b?b:d.slide;c||(c=new e(this,d),a(this).data(g,c)),"number"==typeof b?c.to(b):f?c[f]():d.interval&&(c.pause(),c.cycle())})}},{key:"_dataApiClickHandler",value:function(b){var c=d.getSelectorFromElement(this);if(c){var f=a(c)[0];if(f&&a(f).hasClass(m.CAROUSEL)){var h=a.extend({},a(f).data(),a(this).data()),i=this.getAttribute("data-slide-to");i&&(h.interval=!1),e._jQueryInterface.call(a(f),h),i&&a(f).data(g).to(i),b.preventDefault()}}}}]),e}();return a(document).on(l.CLICK,n.DATA_SLIDE,o._dataApiClickHandler),a(window).on(l.LOAD,function(){a(n.DATA_RIDE).each(function(){var b=a(this);o._jQueryInterface.call(b,b.data())})}),a.fn[e]=o._jQueryInterface,a.fn[e].Constructor=o,a.fn[e].noConflict=function(){return a.fn[e]=h,o._jQueryInterface},o}(jQuery),function(a){var e="collapse",f="4.0.0",g="bs.collapse",h=a.fn[e],i=600,j={toggle:!0,parent:null},k={SHOW:"show.bs.collapse",SHOWN:"shown.bs.collapse",HIDE:"hide.bs.collapse",HIDDEN:"hidden.bs.collapse",CLICK:"click.bs.collapse.data-api"},l={IN:"in",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},m={WIDTH:"width",HEIGHT:"height"},n={ACTIVES:".panel > .in, .panel > .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},o=function(){function e(c,d){b(this,e),this._isTransitioning=!1,this._element=c,this._config=a.extend({},j,d),this._triggerArray=a.makeArray(a('[data-toggle="collapse"][href="#'+c.id+'"],'+('[data-toggle="collapse"][data-target="#'+c.id+'"]'))),this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return c(e,[{key:"toggle",value:function(){a(this._element).hasClass(l.IN)?this.hide():this.show()}},{key:"show",value:function(){var b=this;if(!this._isTransitioning&&!a(this._element).hasClass(l.IN)){var c=void 0,f=void 0;if(this._parent&&(f=a.makeArray(a(n.ACTIVES)),f.length||(f=null)),!(f&&(c=a(f).data(g),c&&c._isTransitioning))){var h=a.Event(k.SHOW);if(a(this._element).trigger(h),!h.isDefaultPrevented()){f&&(e._jQueryInterface.call(a(f),"hide"),c||a(f).data(g,null));var j=this._getDimension();a(this._element).removeClass(l.COLLAPSE).addClass(l.COLLAPSING),this._element.style[j]=0,this._element.setAttribute("aria-expanded",!0),this._triggerArray.length&&a(this._triggerArray).removeClass(l.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var m=function(){a(b._element).removeClass(l.COLLAPSING).addClass(l.COLLAPSE).addClass(l.IN),b._element.style[j]="",b.setTransitioning(!1),a(b._element).trigger(k.SHOWN)};if(!d.supportsTransitionEnd())return void m();var o="scroll"+(j[0].toUpperCase()+j.slice(1));a(this._element).one(d.TRANSITION_END,m).emulateTransitionEnd(i),this._element.style[j]=this._element[o]+"px"}}}}},{key:"hide",value:function(){var b=this;if(!this._isTransitioning&&a(this._element).hasClass(l.IN)){var c=a.Event(k.HIDE);if(a(this._element).trigger(c),!c.isDefaultPrevented()){var e=this._getDimension(),f=e===m.WIDTH?"offsetWidth":"offsetHeight";this._element.style[e]=this._element[f]+"px",d.reflow(this._element),a(this._element).addClass(l.COLLAPSING).removeClass(l.COLLAPSE).removeClass(l.IN),this._element.setAttribute("aria-expanded",!1),this._triggerArray.length&&a(this._triggerArray).addClass(l.COLLAPSED).attr("aria-expanded",!1),this.setTransitioning(!0);var g=function(){b.setTransitioning(!1),a(b._element).removeClass(l.COLLAPSING).addClass(l.COLLAPSE).trigger(k.HIDDEN)};return this._element.style[e]=0,d.supportsTransitionEnd()?void a(this._element).one(d.TRANSITION_END,g).emulateTransitionEnd(i):g()}}}},{key:"setTransitioning",value:function(a){this._isTransitioning=a}},{key:"_getDimension",value:function(){var b=a(this._element).hasClass(m.WIDTH);return b?m.WIDTH:m.HEIGHT}},{key:"_getParent",value:function(){var b=this,c=a(this._config.parent)[0],d='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return a(c).find(d).each(function(a,c){b._addAriaAndCollapsedClass(e._getTargetFromElement(c),[c])}),c}},{key:"_addAriaAndCollapsedClass",value:function(b,c){if(b){var d=a(b).hasClass(l.IN);b.setAttribute("aria-expanded",d),c.length&&a(c).toggleClass(l.COLLAPSED,!d).attr("aria-expanded",d)}}}],[{key:"VERSION",get:function(){return f}},{key:"Default",get:function(){return j}},{key:"_getTargetFromElement",value:function(b){var c=d.getSelectorFromElement(b);return c?a(c)[0]:null}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this),d=c.data(g),f=a.extend({},j,c.data(),"object"==typeof b&&b);!d&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),d||(d=new e(this,f),c.data(g,d)),"string"==typeof b&&d[b]()})}}]),e}();return a(document).on(k.CLICK,n.DATA_TOGGLE,function(b){b.preventDefault();var c=o._getTargetFromElement(this),d=a(c).data(g),e=d?"toggle":a(this).data();o._jQueryInterface.call(a(c),e)}),a.fn[e]=o._jQueryInterface,a.fn[e].Constructor=o,a.fn[e].noConflict=function(){return a.fn[e]=h,o._jQueryInterface},o}(jQuery),function(a){var e="dropdown",f="4.0.0",g="bs.dropdown",h=a.fn[e],i={HIDE:"hide.bs.dropdown",HIDDEN:"hidden.bs.dropdown",SHOW:"show.bs.dropdown",SHOWN:"shown.bs.dropdown",CLICK:"click.bs.dropdown",KEYDOWN:"keydown.bs.dropdown.data-api",CLICK_DATA:"click.bs.dropdown.data-api"},j={BACKDROP:"dropdown-backdrop",DISABLED:"disabled",OPEN:"open"},k={BACKDROP:".dropdown-backdrop",DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",ROLE_MENU:'[role="menu"]',ROLE_LISTBOX:'[role="listbox"]',NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:'[role="menu"] li:not(.disabled) a, [role="listbox"] li:not(.disabled) a'},l=function(){function e(c){b(this,e),a(c).on(i.CLICK,this.toggle)}return c(e,[{key:"toggle",value:function(){if(!this.disabled&&!a(this).hasClass(j.DISABLED)){var b=e._getParentFromElement(this),c=a(b).hasClass(j.OPEN);if(e._clearMenus(),c)return!1;if("ontouchstart"in document.documentElement&&!a(b).closest(k.NAVBAR_NAV).length){var d=document.createElement("div");d.className=j.BACKDROP,a(d).insertBefore(this),a(d).on("click",e._clearMenus)}var f={relatedTarget:this},g=a.Event(i.SHOW,f);if(a(b).trigger(g),!g.isDefaultPrevented())return this.focus(),this.setAttribute("aria-expanded","true"),a(b).toggleClass(j.OPEN),a(b).trigger(i.SHOWN,f),!1}}}],[{key:"VERSION",get:function(){return f}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g);c||a(this).data(g,c=new e(this)),"string"==typeof b&&c[b].call(this)})}},{key:"_clearMenus",value:function(b){if(!b||3!==b.which){var c=a(k.BACKDROP)[0];c&&c.parentNode.removeChild(c);for(var d=a.makeArray(a(k.DATA_TOGGLE)),f=0;f<d.length;f++){var g=e._getParentFromElement(d[f]),h={relatedTarget:d[f]};if(a(g).hasClass(j.OPEN)&&!(b&&"click"===b.type&&/input|textarea/i.test(b.target.tagName)&&a.contains(g,b.target))){var l=a.Event(i.HIDE,h);a(g).trigger(l),l.isDefaultPrevented()||(d[f].setAttribute("aria-expanded","false"),a(g).removeClass(j.OPEN).trigger(i.HIDDEN,h))}}}}},{key:"_getParentFromElement",value:function(b){var c=void 0,e=d.getSelectorFromElement(b);return e&&(c=a(e)[0]),c||b.parentNode}},{key:"_dataApiKeydownHandler",value:function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)&&(b.preventDefault(),b.stopPropagation(),!this.disabled&&!a(this).hasClass(j.DISABLED))){var c=e._getParentFromElement(this),d=a(c).hasClass(j.OPEN);if(!d&&27!==b.which||d&&27===b.which){if(27===b.which){var f=a(c).find(k.DATA_TOGGLE)[0];a(f).trigger("focus")}return void a(this).trigger("click")}var g=a.makeArray(a(k.VISIBLE_ITEMS));if(g=g.filter(function(a){return a.offsetWidth||a.offsetHeight}),g.length){var h=g.indexOf(b.target);38===b.which&&h>0&&h--,40===b.which&&h<g.length-1&&h++,~h||(h=0),g[h].focus()}}}}]),e}();return a(document).on(i.KEYDOWN,k.DATA_TOGGLE,l._dataApiKeydownHandler).on(i.KEYDOWN,k.ROLE_MENU,l._dataApiKeydownHandler).on(i.KEYDOWN,k.ROLE_LISTBOX,l._dataApiKeydownHandler).on(i.CLICK_DATA,l._clearMenus).on(i.CLICK_DATA,k.DATA_TOGGLE,l.prototype.toggle).on(i.CLICK_DATA,k.FORM_CHILD,function(a){a.stopPropagation()}),a.fn[e]=l._jQueryInterface,a.fn[e].Constructor=l,a.fn[e].noConflict=function(){return a.fn[e]=h,l._jQueryInterface},l}(jQuery),function(a){var e="modal",f="4.0.0",g="bs.modal",h=a.fn[e],i=300,j=150,k={backdrop:!0,keyboard:!0,show:!0},l={HIDE:"hide.bs.modal",HIDDEN:"hidden.bs.modal",SHOW:"show.bs.modal",SHOWN:"shown.bs.modal",DISMISS:"click.dismiss.bs.modal",KEYDOWN:"keydown.dismiss.bs.modal",FOCUSIN:"focusin.bs.modal",RESIZE:"resize.bs.modal",CLICK:"click.bs.modal.data-api",MOUSEDOWN:"mousedown.dismiss.bs.modal",MOUSEUP:"mouseup.dismiss.bs.modal"},m={BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",IN:"in"},n={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',SCROLLBAR_MEASURER:"modal-scrollbar-measure"},o=function(){function e(c,d){b(this,e),this._config=d,this._element=c,this._dialog=a(c).find(n.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}return c(e,[{key:"toggle",value:function(a){return this._isShown?this.hide():this.show(a)}},{key:"show",value:function(b){var c=this,d=a.Event(l.SHOW,{relatedTarget:b});a(this._element).trigger(d),this._isShown||d.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),a(document.body).addClass(m.OPEN),this._setEscapeEvent(),this._setResizeEvent(),a(this._element).on(l.DISMISS,n.DATA_DISMISS,this.hide.bind(this)),a(this._dialog).on(l.MOUSEDOWN,function(){a(c._element).one(l.MOUSEUP,function(b){a(b.target).is(c._element)&&(that._ignoreBackdropClick=!0)})}),this._showBackdrop(this._showElement.bind(this,b)))}},{key:"hide",value:function(b){b&&b.preventDefault();var c=a.Event(l.HIDE);a(this._element).trigger(c),this._isShown&&!c.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),a(document).off(l.FOCUSIN),a(this._element).removeClass(m.IN),a(this._element).off(l.DISMISS),a(this._dialog).off(l.MOUSEDOWN),d.supportsTransitionEnd()&&a(this._element).hasClass(m.FADE)?a(this._element).one(d.TRANSITION_END,this._hideModal.bind(this)).emulateTransitionEnd(i):this._hideModal())}},{key:"_showElement",value:function(b){var c=this,e=d.supportsTransitionEnd()&&a(this._element).hasClass(m.FADE);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.scrollTop=0,e&&d.reflow(this._element),a(this._element).addClass(m.IN),this._enforceFocus();var f=a.Event(l.SHOWN,{relatedTarget:b}),g=function(){c._element.focus(),a(c._element).trigger(f)};e?a(this._dialog).one(d.TRANSITION_END,g).emulateTransitionEnd(i):g()}},{key:"_enforceFocus",value:function(){var b=this;a(document).off(l.FOCUSIN).on(l.FOCUSIN,function(c){b._element===c.target||a(b._element).has(c.target).length||b._element.focus()})}},{key:"_setEscapeEvent",value:function(){var b=this;this._isShown&&this._config.keyboard?a(this._element).on(l.KEYDOWN,function(a){27===a.which&&b.hide()}):this._isShown||a(this._element).off(l.KEYDOWN)}},{key:"_setResizeEvent",value:function(){this._isShown?a(window).on(l.RESIZE,this._handleUpdate.bind(this)):a(window).off(l.RESIZE)}},{key:"_hideModal",value:function(){var b=this;this._element.style.display="none",this._showBackdrop(function(){a(document.body).removeClass(m.OPEN),b._resetAdjustments(),b._resetScrollbar(),a(b._element).trigger(l.HIDDEN)})}},{key:"_removeBackdrop",value:function(){this._backdrop&&(a(this._backdrop).remove(),this._backdrop=null)}},{key:"_showBackdrop",value:function(b){var c=this,e=a(this._element).hasClass(m.FADE)?m.FADE:"";if(this._isShown&&this._config.backdrop){var f=d.supportsTransitionEnd()&&e;if(this._backdrop=document.createElement("div"),this._backdrop.className=m.BACKDROP,e&&a(this._backdrop).addClass(e),a(this._backdrop).appendTo(this.$body),a(this._element).on(l.DISMISS,function(a){return c._ignoreBackdropClick?void(c._ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"===c._config.backdrop?c._element.focus():c.hide()))}),f&&d.reflow(this._backdrop),a(this._backdrop).addClass(m.IN),!b)return;if(!f)return void b();a(this._backdrop).one(d.TRANSITION_END,b).emulateTransitionEnd(j)}else if(!this._isShown&&this._backdrop){a(this._backdrop).removeClass(m.IN);var g=function(){c._removeBackdrop(),b&&b()};d.supportsTransitionEnd()&&a(this._element).hasClass(m.FADE)?a(this._backdrop).one(d.TRANSITION_END,g).emulateTransitionEnd(j):g()}else b&&b()}},{key:"_handleUpdate",value:function(){this._adjustDialog()}},{key:"_adjustDialog",value:function(){var a=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&a&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!a&&(this._element.style.paddingRight=this._scrollbarWidth+"px")}},{key:"_resetAdjustments",value:function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}},{key:"_checkScrollbar",value:function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this._isBodyOverflowing=document.body.clientWidth<a,this._scrollbarWidth=this._getScrollbarWidth()}},{key:"_setScrollbar",value:function(){var b=parseInt(a(document.body).css("padding-right")||0,10);this._originalBodyPadding=document.body.style.paddingRight||"",this._isBodyOverflowing&&(document.body.style.paddingRight=b+this._scrollbarWidth+"px")}},{key:"_resetScrollbar",value:function(){document.body.style.paddingRight=this._originalBodyPadding}},{key:"_getScrollbarWidth",value:function(){var a=document.createElement("div");a.className=n.SCROLLBAR_MEASURER,document.body.appendChild(a);var b=a.offsetWidth-a.clientWidth;return document.body.removeChild(a),b}}],[{key:"VERSION",get:function(){return f}},{key:"Default",get:function(){return k}},{key:"_jQueryInterface",value:function(b,c){return this.each(function(){var d=a(this).data(g),f=a.extend({},e.Default,a(this).data(),"object"==typeof b&&b);d||(d=new e(this,f),a(this).data(g,d)),"string"==typeof b?d[b](c):f.show&&d.show(c)})}}]),e}();return a(document).on(l.CLICK,n.DATA_TOGGLE,function(b){var c=this,e=void 0,f=d.getSelectorFromElement(this);f&&(e=a(f)[0]);var h=a(e).data(g)?"toggle":a.extend({},a(e).data(),a(this).data());"A"===this.tagName&&b.preventDefault();var i=a(e).one(l.SHOW,function(b){b.isDefaultPrevented()||i.one(l.HIDDEN,function(){a(c).is(":visible")&&c.focus()})});o._jQueryInterface.call(a(e),h,this)}),a.fn[e]=o._jQueryInterface,a.fn[e].Constructor=o,a.fn[e].noConflict=function(){return a.fn[e]=h,o._jQueryInterface},o}(jQuery),function(a){var e="scrollspy",f="4.0.0",g="bs.scrollspy",h=a.fn[e],i={offset:10},j={ACTIVATE:"activate.bs.scrollspy",SCROLL:"scroll.bs.scrollspy",LOAD:"load.bs.scrollspy.data-api"},k={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active"},l={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",LI_DROPDOWN:"li.dropdown",LI:"li"},m=function(){function e(c,d){b(this,e),this._scrollElement="BODY"===c.tagName?window:c,this._config=a.extend({},i,d),this._selector=""+(this._config.target||"")+" .nav li > a",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,a(this._scrollElement).on(j.SCROLL,this._process.bind(this)),this.refresh(),this._process()}return c(e,[{key:"refresh",value:function(){var b=this,c="offset",e=0;this._scrollElement!==this._scrollElement.window&&(c="position",e=this._getScrollTop()),this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight();var f=a.makeArray(a(this._selector));f.map(function(b){var f=void 0,g=d.getSelectorFromElement(b);return g&&(f=a(g)[0]),f&&(f.offsetWidth||f.offsetHeight)?[a(f)[c]().top+e,g]:void 0}).filter(function(a){return a}).sort(function(a,b){return a[0]-b[0]}).forEach(function(a){b._offsets.push(a[0]),b._targets.push(a[1])})}},{key:"_getScrollTop",value:function(){return this._scrollElement===window?this._scrollElement.scrollY:this._scrollElement.scrollTop}},{key:"_getScrollHeight",value:function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}},{key:"_process",value:function(){var a=this._getScrollTop()+this._config.offset,b=this._getScrollHeight(),c=this._config.offset+b-this._scrollElement.offsetHeight;if(this._scrollHeight!==b&&this.refresh(),a>=c){var d=this._targets[this._targets.length-1];this._activeTarget!==d&&this._activate(d)}if(this._activeTarget&&a<this._offsets[0])return this._activeTarget=null,void this._clear();for(var e=this._offsets.length;e--;){var f=this._activeTarget!==this._targets[e]&&a>=this._offsets[e]&&(void 0===this._offsets[e+1]||a<this._offsets[e+1]);f&&this._activate(this._targets[e])}}},{key:"_activate",value:function(b){this._activeTarget=b,this._clear();for(var c=""+this._selector+'[data-target="'+b+'"],'+(""+this._selector+'[href="'+b+'"]'),d=a(c).parents(l.LI),e=d.length;e--;){a(d[e]).addClass(k.ACTIVE);var f=d[e].parentNode;if(f&&a(f).hasClass(k.DROPDOWN_MENU)){var g=a(f).closest(l.LI_DROPDOWN)[0];a(g).addClass(k.ACTIVE)}}a(this._scrollElement).trigger(j.ACTIVATE,{relatedTarget:b})}},{key:"_clear",value:function(){for(var b=a(this._selector).parentsUntil(this._config.target,l.ACTIVE),c=b.length;c--;)a(b[c]).removeClass(k.ACTIVE)}}],[{key:"VERSION",get:function(){return f}},{key:"Default",get:function(){return i}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g),d="object"==typeof b&&b||null;c||(c=new e(this,d),a(this).data(g,c)),"string"==typeof b&&c[b]()})}}]),e}();return a(window).on(j.LOAD,function(){for(var b=a.makeArray(a(l.DATA_SPY)),c=b.length;c--;){var d=a(b[c]);m._jQueryInterface.call(d,d.data())}}),a.fn[e]=m._jQueryInterface,a.fn[e].Constructor=m,a.fn[e].noConflict=function(){return a.fn[e]=h,m._jQueryInterface},m}(jQuery),function(a){var e="tab",f="4.0.0",g="bs.tab",h=a.fn[e],i=150,j={HIDE:"hide.bs.tab",HIDDEN:"hidden.bs.tab",SHOW:"show.bs.tab",SHOWN:"shown.bs.tab",CLICK:"click.bs.tab.data-api"},k={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",FADE:"fade",IN:"in"},l={A:"a",LI:"li",LI_DROPDOWN:"li.dropdown",UL:"ul:not(.dropdown-menu)",FADE_CHILD:"> .fade",ACTIVE:".active",ACTIVE_CHILD:"> .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu > .active"},m=function(){function e(a){b(this,e),this._element=a}return c(e,[{key:"show",value:function(){var b=this;if(!this._element.parentNode||this._element.parentNode.nodeType!=Node.ELEMENT_NODE||!a(this._element).parent().hasClass(k.ACTIVE)){var c=void 0,e=void 0,f=a(this._element).closest(l.UL)[0],g=d.getSelectorFromElement(this._element);f&&(e=a.makeArray(a(f).find(l.ACTIVE)),e=e[e.length-1],e&&(e=a(e).find(l.A)[0]));var h=a.Event(j.HIDE,{relatedTarget:this._element}),i=a.Event(j.SHOW,{relatedTarget:e});if(e&&a(e).trigger(h),a(this._element).trigger(i),!i.isDefaultPrevented()&&!h.isDefaultPrevented()){g&&(c=a(g)[0]),this._activate(a(this._element).closest(l.LI)[0],f);var m=function(){var c=a.Event(j.HIDDEN,{relatedTarget:b._element}),d=a.Event(j.SHOWN,{relatedTarget:e});a(e).trigger(c),a(b._element).trigger(d)};c?this._activate(c,c.parentNode,m):m()}}}},{key:"_activate",value:function(b,c,e){var f=a(c).find(l.ACTIVE_CHILD)[0],g=e&&d.supportsTransitionEnd()&&(f&&a(f).hasClass(k.FADE)||!!a(c).find(l.FADE_CHILD)[0]),h=this._transitionComplete.bind(this,b,f,g,e);f&&g?a(f).one(d.TRANSITION_END,h).emulateTransitionEnd(i):h(),f&&a(f).removeClass(k.IN)}},{key:"_transitionComplete",value:function(b,c,e,f){if(c){a(c).removeClass(k.ACTIVE);var g=a(c).find(l.DROPDOWN_ACTIVE_CHILD)[0];g&&a(g).removeClass(k.ACTIVE);var h=a(c).find(l.DATA_TOGGLE)[0];h&&h.setAttribute("aria-expanded",!1)}a(b).addClass(k.ACTIVE);var i=a(b).find(l.DATA_TOGGLE)[0];if(i&&i.setAttribute("aria-expanded",!0),e?(d.reflow(b),a(b).addClass(k.IN)):a(b).removeClass(k.FADE),b.parentNode&&a(b.parentNode).hasClass(k.DROPDOWN_MENU)){var j=a(b).closest(l.LI_DROPDOWN)[0];j&&a(j).addClass(k.ACTIVE),i=a(b).find(l.DATA_TOGGLE)[0],i&&i.setAttribute("aria-expanded",!0)}f&&f()}}],[{key:"VERSION",get:function(){return f}},{key:"Default",get:function(){return Default}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this),d=c.data(g);d||(d=d=new e(this),c.data(g,d)),"string"==typeof b&&d[b]()})}}]),e}();return a(document).on(j.CLICK,l.DATA_TOGGLE,function(b){b.preventDefault(),m._jQueryInterface.call(a(this),"show")}),a.fn[e]=m._jQueryInterface,a.fn[e].Constructor=m,a.fn[e].noConflict=function(){return a.fn[e]=h,m._jQueryInterface},m}(jQuery),function(a){var e="tooltip",f="4.0.0",g="bs.tooltip",h=a.fn[e],i=150,j="bs-tether",k={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:"0 0",constraints:null},l={TOP:"bottom center",RIGHT:"middle left",BOTTOM:"top center",LEFT:"middle right"},m={IN:"in",OUT:"out"},n={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},o={FADE:"fade",IN:"in"},p={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner"},q={element:!1,enabled:!1},r={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},s=function(){function h(a,c){b(this,h),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._tether=null,this.element=a,this.config=this._getConfig(c),this.tip=null,this._setListeners()}return c(h,[{key:"enable",value:function(){this._isEnabled=!0}},{key:"disable",value:function(){this._isEnabled=!1}},{key:"toggleEnabled",value:function(){this._isEnabled=!this._isEnabled}},{key:"toggle",value:function(b){var c=this,d=this.constructor.DATA_KEY;b?(c=a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),c._activeTrigger.click=!c._activeTrigger.click,c._isWithActiveTrigger()?c._enter(null,c):c._leave(null,c)):a(c.getTipElement()).hasClass(o.IN)?c._leave(null,c):c._enter(null,c)}},{key:"destroy",value:function(){var b=this;clearTimeout(this._timeout),this.hide(function(){a(b.element).off("."+b.constructor.NAME).removeData(b.constructor.DATA_KEY),b.tip&&a(b.tip).detach(), +b.tip=null})}},{key:"show",value:function(){var b=this,c=a.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){a(this.element).trigger(c);var e=a.contains(this.element.ownerDocument.documentElement,this.element);if(c.isDefaultPrevented()||!e)return;var f=this.getTipElement(),g=d.getUID(this.constructor.NAME);f.setAttribute("id",g),this.element.setAttribute("aria-describedby",g),this.setContent(),this.config.animation&&a(f).addClass(o.FADE);var i="function"==typeof this.config.placement?this.config.placement.call(this,f,this.element):this.config.placement,k=this._getAttachment(i);a(f).data(this.constructor.DATA_KEY,this).appendTo(document.body),a(this.element).trigger(this.constructor.Event.INSERTED),this._tether=new Tether({element:f,target:this.element,attachment:k,classes:q,classPrefix:j,offset:this.config.offset,constraints:this.config.constraints}),d.reflow(f),this._tether.position(),a(f).addClass(o.IN);var l=function(){var c=b._hoverState;b._hoverState=null,a(b.element).trigger(b.constructor.Event.SHOWN),c===m.OUT&&b._leave(null,b)};d.supportsTransitionEnd()&&a(this.tip).hasClass(o.FADE)?a(this.tip).one(d.TRANSITION_END,l).emulateTransitionEnd(h._TRANSITION_DURATION):l()}}},{key:"hide",value:function(b){var c=this,e=this.getTipElement(),f=a.Event(this.constructor.Event.HIDE),g=function(){c._hoverState!==m.IN&&e.parentNode&&e.parentNode.removeChild(e),c.element.removeAttribute("aria-describedby"),a(c.element).trigger(c.constructor.Event.HIDDEN),c.cleanupTether(),b&&b()};a(this.element).trigger(f),f.isDefaultPrevented()||(a(e).removeClass(o.IN),d.supportsTransitionEnd()&&a(this.tip).hasClass(o.FADE)?a(e).one(d.TRANSITION_END,g).emulateTransitionEnd(i):g(),this._hoverState="")}},{key:"isWithContent",value:function(){return!!this.getTitle()}},{key:"getTipElement",value:function(){return this.tip=this.tip||a(this.config.template)[0]}},{key:"setContent",value:function(){var b=this.getTipElement(),c=this.getTitle(),d=this.config.html?"innerHTML":"innerText";a(b).find(p.TOOLTIP_INNER)[0][d]=c,a(b).removeClass(o.FADE).removeClass(o.IN),this.cleanupTether()}},{key:"getTitle",value:function(){var a=this.element.getAttribute("data-original-title");return a||(a="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),a}},{key:"cleanupTether",value:function(){this._tether&&(this._tether.destroy(),a(this.element).removeClass(this._removeTetherClasses),a(this.tip).removeClass(this._removeTetherClasses))}},{key:"_getAttachment",value:function(a){return l[a.toUpperCase()]}},{key:"_setListeners",value:function(){var b=this,c=this.config.trigger.split(" ");c.forEach(function(c){if("click"===c)a(b.element).on(b.constructor.Event.CLICK,b.config.selector,b.toggle.bind(b));else if(c!==r.MANUAL){var d=c==r.HOVER?b.constructor.Event.MOUSEENTER:b.constructor.Event.FOCUSIN,e=c==r.HOVER?b.constructor.Event.MOUSELEAVE:b.constructor.Event.FOCUSOUT;a(b.element).on(d,b.config.selector,b._enter.bind(b)).on(e,b.config.selector,b._leave.bind(b))}}),this.config.selector?this.config=a.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()}},{key:"_removeTetherClasses",value:function(a,b){return((b.baseVal||b).match(new RegExp("(^|\\s)"+j+"-\\S+","g"))||[]).join(" ")}},{key:"_fixTitle",value:function(){var a=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==a)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))}},{key:"_enter",value:function(b,c){var d=this.constructor.DATA_KEY;return c=c||a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),b&&(c._activeTrigger["focusin"==b.type?r.FOCUS:r.HOVER]=!0),a(c.getTipElement()).hasClass(o.IN)||c._hoverState===m.IN?void(c._hoverState=m.IN):(clearTimeout(c._timeout),c._hoverState=m.IN,c.config.delay&&c.config.delay.show?void(c._timeout=setTimeout(function(){c._hoverState===m.IN&&c.show()},c.config.delay.show)):void c.show())}},{key:"_leave",value:function(b,c){var d=this.constructor.DATA_KEY;return c=c||a(b.currentTarget).data(d),c||(c=new this.constructor(b.currentTarget,this._getDelegateConfig()),a(b.currentTarget).data(d,c)),b&&(c._activeTrigger["focusout"==b.type?r.FOCUS:r.HOVER]=!1),c._isWithActiveTrigger()?void 0:(clearTimeout(c._timeout),c._hoverState=m.OUT,c.config.delay&&c.config.delay.hide?void(c._timeout=setTimeout(function(){c._hoverState===m.OUT&&c.hide()},c.config.delay.hide)):void c.hide())}},{key:"_isWithActiveTrigger",value:function(){for(var a in this._activeTrigger)if(this._activeTrigger[a])return!0;return!1}},{key:"_getConfig",value:function(b){return b=a.extend({},this.constructor.Default,a(this.element).data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b}},{key:"_getDelegateConfig",value:function(){var a={};if(this.config)for(var b in this.config){var c=this.config[b];this.constructor.Default[b]!==c&&(a[b]=c)}return a}}],[{key:"VERSION",get:function(){return f}},{key:"Default",get:function(){return k}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return g}},{key:"Event",get:function(){return n}},{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=a(this).data(g),d="object"==typeof b?b:null;(c||!/destroy|hide/.test(b))&&(c||(c=new h(this,d),a(this).data(g,c)),"string"==typeof b&&c[b]())})}}]),h}();return a.fn[e]=s._jQueryInterface,a.fn[e].Constructor=s,a.fn[e].noConflict=function(){return a.fn[e]=h,s._jQueryInterface},s}(jQuery));!function(d){var f="popover",g="4.0.0",h="bs.popover",i=d.fn[f],j=d.extend({},e.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),k={FADE:"fade",IN:"in"},l={TITLE:".popover-title",CONTENT:".popover-content",ARROW:".popover-arrow"},m={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},n=function(e){function i(){b(this,i),null!=e&&e.apply(this,arguments)}return a(i,e),c(i,[{key:"isWithContent",value:function(){return this.getTitle()||this._getContent()}},{key:"getTipElement",value:function(){return this.tip=this.tip||d(this.config.template)[0]}},{key:"setContent",value:function(){var a=this.getTipElement(),b=this.getTitle(),c=this._getContent(),e=d(a).find(l.TITLE)[0];e&&(e[this.config.html?"innerHTML":"innerText"]=b),d(a).find(l.CONTENT).children().detach().end()[this.config.html?"string"==typeof c?"html":"append":"text"](c),d(a).removeClass(k.FADE).removeClass(k.IN),this.cleanupTether()}},{key:"_getContent",value:function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)}}],[{key:"VERSION",get:function(){return g}},{key:"Default",get:function(){return j}},{key:"NAME",get:function(){return f}},{key:"DATA_KEY",get:function(){return h}},{key:"Event",get:function(){return m}},{key:"_jQueryInterface",value:function(a){return this.each(function(){var b=d(this).data(h),c="object"==typeof a?a:null;(b||!/destroy|hide/.test(a))&&(b||(b=new i(this,c),d(this).data(h,b)),"string"==typeof a&&b[a]())})}}]),i}(e);return d.fn[f]=n._jQueryInterface,d.fn[f].Constructor=n,d.fn[f].noConflict=function(){return d.fn[f]=i,n._jQueryInterface},n}(jQuery)}}(jQuery);
\ No newline at end of file diff --git a/dist/js/npm.js b/dist/js/npm.js index 9060ae2dfc..d1224ffb40 100644 --- a/dist/js/npm.js +++ b/dist/js/npm.js @@ -1,12 +1,12 @@ // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. -require('../../js/transition.js') -require('../../js/alert.js') -require('../../js/button.js') -require('../../js/carousel.js') -require('../../js/collapse.js') -require('../../js/dropdown.js') -require('../../js/modal.js') -require('../../js/tooltip.js') -require('../../js/popover.js') -require('../../js/scrollspy.js') -require('../../js/tab.js') +require('../../js/src/util.js') +require('../../js/src/alert.js') +require('../../js/src/button.js') +require('../../js/src/carousel.js') +require('../../js/src/collapse.js') +require('../../js/src/dropdown.js') +require('../../js/src/modal.js') +require('../../js/src/scrollspy.js') +require('../../js/src/tab.js') +require('../../js/src/tooltip.js') +require('../../js/src/popover.js')
\ No newline at end of file diff --git a/js/dist/carousel.js b/js/dist/carousel.js index b1ef4184f3..0d78153be1 100644 --- a/js/dist/carousel.js +++ b/js/dist/carousel.js @@ -133,7 +133,7 @@ var Carousel = (function ($) { } if (this._config.interval && !this._isPaused) { - this._interval = setInterval(this.next.bind(this), this._config.interval); + this._interval = setInterval($.proxy(this.next, this), this._config.interval); } } }, { @@ -173,11 +173,11 @@ var Carousel = (function ($) { value: function _addEventListeners() { if (this._config.keyboard) { - $(this._element).on('keydown.bs.carousel', this._keydown.bind(this)); + $(this._element).on('keydown.bs.carousel', $.proxy(this._keydown, this)); } if (this._config.pause == 'hover' && !('ontouchstart' in document.documentElement)) { - $(this._element).on('mouseenter.bs.carousel', this.pause.bind(this)).on('mouseleave.bs.carousel', this.cycle.bind(this)); + $(this._element).on('mouseenter.bs.carousel', $.proxy(this.pause, this)).on('mouseleave.bs.carousel', $.proxy(this.cycle, this)); } } }, { diff --git a/js/dist/carousel.js.map b/js/dist/carousel.js.map index c4742aa64d..acd05b2c57 100644 --- a/js/dist/carousel.js.map +++ b/js/dist/carousel.js.map @@ -1 +1 @@ -{"version":3,"sources":["js/src/carousel.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,QAAQ,GAAG,CAAC,UAAC,CAAC,EAAK;;;;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C,CAAC,QAAQ,CAAC,CACR,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAA;;AAEtE,GAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,YAAY;AACnC,KAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,YAAY;AACrC,UAAI,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,CAAA;AACvB,cAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC,CAAA;KAC5D,CAAC,CAAA;GACH,CAAC,CAAA;;;;;;;;AASF,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAe,QAAQ,CAAC,gBAAgB,CAAA;AAClD,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,QAAQ,CAAA;AACjC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,QAAQ,CAAC,gBAAgB,CAAA;GACjC,CAAA;;AAED,SAAO,QAAQ,CAAA;CAEhB,CAAA,CAAE,MAAM,CAAC,CAAA","file":"js/src/carousel.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Carousel = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'carousel'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.carousel'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 600\n\n const Default = {\n interval : 5000,\n keyboard : true,\n slide : false,\n pause : 'hover',\n wrap : true\n }\n\n const Direction = {\n NEXT : 'next',\n PREVIOUS : 'prev'\n }\n\n const Event = {\n SLIDE : 'slide.bs.carousel',\n SLID : 'slid.bs.carousel',\n CLICK : 'click.bs.carousel.data-api',\n LOAD : 'load'\n }\n\n const ClassName = {\n CAROUSEL : 'carousel',\n ACTIVE : 'active',\n SLIDE : 'slide',\n RIGHT : 'right',\n LEFT : 'left',\n ITEM : 'carousel-item'\n }\n\n const Selector = {\n ACTIVE : '.active',\n ACTIVE_ITEM : '.active.carousel-item',\n ITEM : '.carousel-item',\n NEXT_PREV : '.next, .prev',\n INDICATORS : '.carousel-indicators',\n DATA_SLIDE : '[data-slide], [data-slide-to]',\n DATA_RIDE : '[data-ride=\"carousel\"]'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Carousel {\n\n constructor(element, config) {\n this._items = null\n this._interval = null\n this._activeElement = null\n\n this._isPaused = false\n this._isSliding = false\n\n this._config = config\n this._element = $(element)[0]\n this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0]\n\n this._addEventListeners()\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n\n // public\n\n next() {\n if (!this._isSliding) {\n this._slide(Direction.NEXT)\n }\n }\n\n prev() {\n if (!this._isSliding) {\n this._slide(Direction.PREVIOUS)\n }\n }\n\n pause(event) {\n if (!event) {\n this._isPaused = true\n }\n\n if ($(this._element).find(Selector.NEXT_PREV)[0] &&\n Util.supportsTransitionEnd()) {\n Util.triggerTransitionEnd(this._element)\n this.cycle(true)\n }\n\n clearInterval(this._interval)\n this._interval = null\n }\n\n cycle(event) {\n if (!event) {\n this._isPaused = false\n }\n\n if (this._interval) {\n clearInterval(this._interval)\n this._interval = null\n }\n\n if (this._config.interval && !this._isPaused) {\n this._interval = setInterval(\n this.next.bind(this), this._config.interval\n )\n }\n }\n\n to(index) {\n this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]\n\n let activeIndex = this._getItemIndex(this._activeElement)\n\n if (index > (this._items.length - 1) || index < 0) {\n return\n }\n\n if (this._isSliding) {\n $(this._element).one(Event.SLID, () => this.to(index))\n return\n }\n\n if (activeIndex == index) {\n this.pause()\n this.cycle()\n return\n }\n\n var direction = index > activeIndex ?\n Direction.NEXT :\n Direction.PREVIOUS\n\n this._slide(direction, this._items[index])\n }\n\n\n // private\n\n _addEventListeners() {\n if (this._config.keyboard) {\n $(this._element)\n .on('keydown.bs.carousel', this._keydown.bind(this))\n }\n\n if (this._config.pause == 'hover' &&\n !('ontouchstart' in document.documentElement)) {\n $(this._element)\n .on('mouseenter.bs.carousel', this.pause.bind(this))\n .on('mouseleave.bs.carousel', this.cycle.bind(this))\n }\n }\n\n _keydown(event) {\n event.preventDefault()\n\n if (/input|textarea/i.test(event.target.tagName)) return\n\n switch (event.which) {\n case 37: this.prev(); break\n case 39: this.next(); break\n default: return\n }\n }\n\n _getItemIndex(element) {\n this._items = $.makeArray($(element).parent().find(Selector.ITEM))\n return this._items.indexOf(element)\n }\n\n _getItemByDirection(direction, activeElement) {\n let isNextDirection = direction === Direction.NEXT\n let isPrevDirection = direction === Direction.PREVIOUS\n let activeIndex = this._getItemIndex(activeElement)\n let lastItemIndex = (this._items.length - 1)\n let isGoingToWrap = (isPrevDirection && activeIndex === 0) ||\n (isNextDirection && activeIndex == lastItemIndex)\n\n if (isGoingToWrap && !this._config.wrap) {\n return activeElement\n }\n\n let delta = direction == Direction.PREVIOUS ? -1 : 1\n let itemIndex = (activeIndex + delta) % this._items.length\n\n return itemIndex === -1 ?\n this._items[this._items.length - 1] : this._items[itemIndex]\n }\n\n\n _triggerSlideEvent(relatedTarget, directionalClassname) {\n let slideEvent = $.Event(Event.SLIDE, {\n relatedTarget: relatedTarget,\n direction: directionalClassname\n })\n\n $(this._element).trigger(slideEvent)\n\n return slideEvent\n }\n\n _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n $(this._indicatorsElement)\n .find(Selector.ACTIVE)\n .removeClass(ClassName.ACTIVE)\n\n let nextIndicator = this._indicatorsElement.children[\n this._getItemIndex(element)\n ]\n\n if (nextIndicator) {\n $(nextIndicator).addClass(ClassName.ACTIVE)\n }\n }\n }\n\n _slide(direction, element) {\n let activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]\n let nextElement = element || activeElement &&\n this._getItemByDirection(direction, activeElement)\n\n let isCycling = !!this._interval\n\n let directionalClassName = direction == Direction.NEXT ?\n ClassName.LEFT :\n ClassName.RIGHT\n\n if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {\n this._isSliding = false\n return\n }\n\n let slideEvent = this._triggerSlideEvent(nextElement, directionalClassName)\n if (slideEvent.isDefaultPrevented()) {\n return\n }\n\n if (!activeElement || !nextElement) {\n // some weirdness is happening, so we bail\n return\n }\n\n this._isSliding = true\n\n if (isCycling) {\n this.pause()\n }\n\n this._setActiveIndicatorElement(nextElement)\n\n var slidEvent = $.Event(Event.SLID, {\n relatedTarget: nextElement,\n direction: directionalClassName\n })\n\n if (Util.supportsTransitionEnd() &&\n $(this._element).hasClass(ClassName.SLIDE)) {\n\n $(nextElement).addClass(direction)\n\n Util.reflow(nextElement)\n\n $(activeElement).addClass(directionalClassName)\n $(nextElement).addClass(directionalClassName)\n\n $(activeElement)\n .one(Util.TRANSITION_END, () => {\n $(nextElement)\n .removeClass(directionalClassName)\n .removeClass(direction)\n\n $(nextElement).addClass(ClassName.ACTIVE)\n\n $(activeElement)\n .removeClass(ClassName.ACTIVE)\n .removeClass(direction)\n .removeClass(directionalClassName)\n\n this._isSliding = false\n\n setTimeout(() => $(this._element).trigger(slidEvent), 0)\n\n })\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n } else {\n $(activeElement).removeClass(ClassName.ACTIVE)\n $(nextElement).addClass(ClassName.ACTIVE)\n\n this._isSliding = false\n $(this._element).trigger(slidEvent)\n }\n\n if (isCycling) {\n this.cycle()\n }\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = $.extend({}, Default, $(this).data())\n\n if (typeof config === 'object') {\n $.extend(_config, config)\n }\n\n let action = typeof config === 'string' ? config : _config.slide\n\n if (!data) {\n data = new Carousel(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config == 'number') {\n data.to(config)\n\n } else if (action) {\n data[action]()\n\n } else if (_config.interval) {\n data.pause()\n data.cycle()\n }\n })\n }\n\n static _dataApiClickHandler(event) {\n let selector = Util.getSelectorFromElement(this)\n\n if (!selector) {\n return\n }\n\n let target = $(selector)[0]\n\n if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {\n return\n }\n\n let config = $.extend({}, $(target).data(), $(this).data())\n\n let slideIndex = this.getAttribute('data-slide-to')\n if (slideIndex) {\n config.interval = false\n }\n\n Carousel._jQueryInterface.call($(target), config)\n\n if (slideIndex) {\n $(target).data(DATA_KEY).to(slideIndex)\n }\n\n event.preventDefault()\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.CLICK, Selector.DATA_SLIDE, Carousel._dataApiClickHandler)\n\n $(window).on(Event.LOAD, function () {\n $(Selector.DATA_RIDE).each(function () {\n let $carousel = $(this)\n Carousel._jQueryInterface.call($carousel, $carousel.data())\n })\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Carousel._jQueryInterface\n $.fn[NAME].Constructor = Carousel\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Carousel._jQueryInterface\n }\n\n return Carousel\n\n})(jQuery)\n\nexport default Carousel\n"]}
\ No newline at end of file +{"version":3,"sources":["js/src/carousel.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,QAAQ,GAAG,CAAC,UAAC,CAAC,EAAK;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AE,CAAA;OACvB;;;WApUG,QAAQ;;;;;;;;;AA+Ud,GAAC,CAAC,QAAQ,CAAC,CACR,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAA;;AAEtE,GAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,YAAY;AACnC,KAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,YAAY;AACrC,UAAI,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,CAAA;AACvB,cAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC,CAAA;KAC5D,CAAC,CAAA;GACH,CAAC,CAAA;;;;;;;;AASF,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAe,QAAQ,CAAC,gBAAgB,CAAA;AAClD,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,QAAQ,CAAA;AACjC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,QAAQ,CAAC,gBAAgB,CAAA;GACjC,CAAA;;AAED,SAAO,QAAQ,CAAA;CAEhB,CAAA,CAAE,MAAM,CAAC,CAAA","file":"js/src/carousel.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Carousel = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'carousel'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.carousel'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 600\n\n const Default = {\n interval : 5000,\n keyboard : true,\n slide : false,\n pause : 'hover',\n wrap : true\n }\n\n const Direction = {\n NEXT : 'next',\n PREVIOUS : 'prev'\n }\n\n const Event = {\n SLIDE : 'slide.bs.carousel',\n SLID : 'slid.bs.carousel',\n CLICK : 'click.bs.carousel.data-api',\n LOAD : 'load'\n }\n\n const ClassName = {\n CAROUSEL : 'carousel',\n ACTIVE : 'active',\n SLIDE : 'slide',\n RIGHT : 'right',\n LEFT : 'left',\n ITEM : 'carousel-item'\n }\n\n const Selector = {\n ACTIVE : '.active',\n ACTIVE_ITEM : '.active.carousel-item',\n ITEM : '.carousel-item',\n NEXT_PREV : '.next, .prev',\n INDICATORS : '.carousel-indicators',\n DATA_SLIDE : '[data-slide], [data-slide-to]',\n DATA_RIDE : '[data-ride=\"carousel\"]'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Carousel {\n\n constructor(element, config) {\n this._items = null\n this._interval = null\n this._activeElement = null\n\n this._isPaused = false\n this._isSliding = false\n\n this._config = config\n this._element = $(element)[0]\n this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0]\n\n this._addEventListeners()\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n\n // public\n\n next() {\n if (!this._isSliding) {\n this._slide(Direction.NEXT)\n }\n }\n\n prev() {\n if (!this._isSliding) {\n this._slide(Direction.PREVIOUS)\n }\n }\n\n pause(event) {\n if (!event) {\n this._isPaused = true\n }\n\n if ($(this._element).find(Selector.NEXT_PREV)[0] &&\n Util.supportsTransitionEnd()) {\n Util.triggerTransitionEnd(this._element)\n this.cycle(true)\n }\n\n clearInterval(this._interval)\n this._interval = null\n }\n\n cycle(event) {\n if (!event) {\n this._isPaused = false\n }\n\n if (this._interval) {\n clearInterval(this._interval)\n this._interval = null\n }\n\n if (this._config.interval && !this._isPaused) {\n this._interval = setInterval(\n $.proxy(this.next, this), this._config.interval\n )\n }\n }\n\n to(index) {\n this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]\n\n let activeIndex = this._getItemIndex(this._activeElement)\n\n if (index > (this._items.length - 1) || index < 0) {\n return\n }\n\n if (this._isSliding) {\n $(this._element).one(Event.SLID, () => this.to(index))\n return\n }\n\n if (activeIndex == index) {\n this.pause()\n this.cycle()\n return\n }\n\n var direction = index > activeIndex ?\n Direction.NEXT :\n Direction.PREVIOUS\n\n this._slide(direction, this._items[index])\n }\n\n\n // private\n\n _addEventListeners() {\n if (this._config.keyboard) {\n $(this._element)\n .on('keydown.bs.carousel', $.proxy(this._keydown, this))\n }\n\n if (this._config.pause == 'hover' &&\n !('ontouchstart' in document.documentElement)) {\n $(this._element)\n .on('mouseenter.bs.carousel', $.proxy(this.pause, this))\n .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))\n }\n }\n\n _keydown(event) {\n event.preventDefault()\n\n if (/input|textarea/i.test(event.target.tagName)) return\n\n switch (event.which) {\n case 37: this.prev(); break\n case 39: this.next(); break\n default: return\n }\n }\n\n _getItemIndex(element) {\n this._items = $.makeArray($(element).parent().find(Selector.ITEM))\n return this._items.indexOf(element)\n }\n\n _getItemByDirection(direction, activeElement) {\n let isNextDirection = direction === Direction.NEXT\n let isPrevDirection = direction === Direction.PREVIOUS\n let activeIndex = this._getItemIndex(activeElement)\n let lastItemIndex = (this._items.length - 1)\n let isGoingToWrap = (isPrevDirection && activeIndex === 0) ||\n (isNextDirection && activeIndex == lastItemIndex)\n\n if (isGoingToWrap && !this._config.wrap) {\n return activeElement\n }\n\n let delta = direction == Direction.PREVIOUS ? -1 : 1\n let itemIndex = (activeIndex + delta) % this._items.length\n\n return itemIndex === -1 ?\n this._items[this._items.length - 1] : this._items[itemIndex]\n }\n\n\n _triggerSlideEvent(relatedTarget, directionalClassname) {\n let slideEvent = $.Event(Event.SLIDE, {\n relatedTarget: relatedTarget,\n direction: directionalClassname\n })\n\n $(this._element).trigger(slideEvent)\n\n return slideEvent\n }\n\n _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n $(this._indicatorsElement)\n .find(Selector.ACTIVE)\n .removeClass(ClassName.ACTIVE)\n\n let nextIndicator = this._indicatorsElement.children[\n this._getItemIndex(element)\n ]\n\n if (nextIndicator) {\n $(nextIndicator).addClass(ClassName.ACTIVE)\n }\n }\n }\n\n _slide(direction, element) {\n let activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]\n let nextElement = element || activeElement &&\n this._getItemByDirection(direction, activeElement)\n\n let isCycling = !!this._interval\n\n let directionalClassName = direction == Direction.NEXT ?\n ClassName.LEFT :\n ClassName.RIGHT\n\n if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {\n this._isSliding = false\n return\n }\n\n let slideEvent = this._triggerSlideEvent(nextElement, directionalClassName)\n if (slideEvent.isDefaultPrevented()) {\n return\n }\n\n if (!activeElement || !nextElement) {\n // some weirdness is happening, so we bail\n return\n }\n\n this._isSliding = true\n\n if (isCycling) {\n this.pause()\n }\n\n this._setActiveIndicatorElement(nextElement)\n\n var slidEvent = $.Event(Event.SLID, {\n relatedTarget: nextElement,\n direction: directionalClassName\n })\n\n if (Util.supportsTransitionEnd() &&\n $(this._element).hasClass(ClassName.SLIDE)) {\n\n $(nextElement).addClass(direction)\n\n Util.reflow(nextElement)\n\n $(activeElement).addClass(directionalClassName)\n $(nextElement).addClass(directionalClassName)\n\n $(activeElement)\n .one(Util.TRANSITION_END, () => {\n $(nextElement)\n .removeClass(directionalClassName)\n .removeClass(direction)\n\n $(nextElement).addClass(ClassName.ACTIVE)\n\n $(activeElement)\n .removeClass(ClassName.ACTIVE)\n .removeClass(direction)\n .removeClass(directionalClassName)\n\n this._isSliding = false\n\n setTimeout(() => $(this._element).trigger(slidEvent), 0)\n\n })\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n } else {\n $(activeElement).removeClass(ClassName.ACTIVE)\n $(nextElement).addClass(ClassName.ACTIVE)\n\n this._isSliding = false\n $(this._element).trigger(slidEvent)\n }\n\n if (isCycling) {\n this.cycle()\n }\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = $.extend({}, Default, $(this).data())\n\n if (typeof config === 'object') {\n $.extend(_config, config)\n }\n\n let action = typeof config === 'string' ? config : _config.slide\n\n if (!data) {\n data = new Carousel(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config == 'number') {\n data.to(config)\n\n } else if (action) {\n data[action]()\n\n } else if (_config.interval) {\n data.pause()\n data.cycle()\n }\n })\n }\n\n static _dataApiClickHandler(event) {\n let selector = Util.getSelectorFromElement(this)\n\n if (!selector) {\n return\n }\n\n let target = $(selector)[0]\n\n if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {\n return\n }\n\n let config = $.extend({}, $(target).data(), $(this).data())\n\n let slideIndex = this.getAttribute('data-slide-to')\n if (slideIndex) {\n config.interval = false\n }\n\n Carousel._jQueryInterface.call($(target), config)\n\n if (slideIndex) {\n $(target).data(DATA_KEY).to(slideIndex)\n }\n\n event.preventDefault()\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.CLICK, Selector.DATA_SLIDE, Carousel._dataApiClickHandler)\n\n $(window).on(Event.LOAD, function () {\n $(Selector.DATA_RIDE).each(function () {\n let $carousel = $(this)\n Carousel._jQueryInterface.call($carousel, $carousel.data())\n })\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Carousel._jQueryInterface\n $.fn[NAME].Constructor = Carousel\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Carousel._jQueryInterface\n }\n\n return Carousel\n\n})(jQuery)\n\nexport default Carousel\n"]}
\ No newline at end of file diff --git a/js/dist/modal.js b/js/dist/modal.js index 4560dff78e..9170fca4b9 100644 --- a/js/dist/modal.js +++ b/js/dist/modal.js @@ -114,7 +114,7 @@ var Modal = (function ($) { this._setEscapeEvent(); this._setResizeEvent(); - $(this._element).on(Event.DISMISS, Selector.DATA_DISMISS, this.hide.bind(this)); + $(this._element).on(Event.DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this)); $(this._dialog).on(Event.MOUSEDOWN, function () { $(_this._element).one(Event.MOUSEUP, function (event) { @@ -124,7 +124,7 @@ var Modal = (function ($) { }); }); - this._showBackdrop(this._showElement.bind(this, relatedTarget)); + this._showBackdrop($.proxy(this._showElement, this, relatedTarget)); } }, { key: 'hide', @@ -155,7 +155,7 @@ var Modal = (function ($) { if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { - $(this._element).one(Util.TRANSITION_END, this._hideModal.bind(this)).emulateTransitionEnd(TRANSITION_DURATION); + $(this._element).one(Util.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION); } else { this._hideModal(); } @@ -232,7 +232,7 @@ var Modal = (function ($) { key: '_setResizeEvent', value: function _setResizeEvent() { if (this._isShown) { - $(window).on(Event.RESIZE, this._handleUpdate.bind(this)); + $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this)); } else { $(window).off(Event.RESIZE); } diff --git a/js/dist/modal.js.map b/js/dist/modal.js.map index 07da218a2b..3f87651e7b 100644 --- a/js/dist/modal.js.map +++ b/js/dist/modal.js.map @@ -1 +1 @@ -{"version":3,"sources":["js/src/modal.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,KAAK,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AASpB,MAAM,IAAI,GAA2B,OAAO,CAAA;AAC5C,MAAM,OAAO,GAAwB,OAAO,CAAA;AAC5C,MAAM,QAAQ,GAAuB,UAAU,CAAA;AAC/C,MAAM,kBAAkB,GAAa,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;AAC/C,MAAM,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file":"js/src/modal.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Modal = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'modal'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.modal'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 300\n const BACKDROP_TRANSITION_DURATION = 150\n\n const Default = {\n backdrop : true,\n keyboard : true,\n show : true\n }\n\n const Event = {\n HIDE Â : 'hide.bs.modal',\n HIDDEN Â : 'hidden.bs.modal',\n SHOW Â : 'show.bs.modal',\n SHOWN Â : 'shown.bs.modal',\n DISMISS : 'click.dismiss.bs.modal',\n KEYDOWN : 'keydown.dismiss.bs.modal',\n FOCUSIN : 'focusin.bs.modal',\n RESIZE : 'resize.bs.modal',\n CLICK : 'click.bs.modal.data-api',\n MOUSEDOWN : 'mousedown.dismiss.bs.modal',\n MOUSEUP : 'mouseup.dismiss.bs.modal'\n }\n\n const ClassName = {\n BACKDROP : 'modal-backdrop',\n OPEN : 'modal-open',\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n DIALOG : '.modal-dialog',\n DATA_TOGGLE : '[data-toggle=\"modal\"]',\n DATA_DISMISS : '[data-dismiss=\"modal\"]',\n SCROLLBAR_MEASURER : 'modal-scrollbar-measure'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Modal {\n\n constructor(element, config) {\n this._config = config\n this._element = element\n this._dialog = $(element).find(Selector.DIALOG)[0]\n this._backdrop = null\n this._isShown = false\n this._isBodyOverflowing = false\n this._ignoreBackdropClick = false\n this._originalBodyPadding = 0\n this._scrollbarWidth = 0\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n\n // public\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n let showEvent = $.Event(Event.SHOW, {\n relatedTarget: relatedTarget\n })\n\n $(this._element).trigger(showEvent)\n\n if (this._isShown || showEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = true\n\n this._checkScrollbar()\n this._setScrollbar()\n\n $(document.body).addClass(ClassName.OPEN)\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(this._element).on(\n Event.DISMISS,\n Selector.DATA_DISMISS,\n this.hide.bind(this)\n )\n\n $(this._dialog).on(Event.MOUSEDOWN, () => {\n $(this._element).one(Event.MOUSEUP, (event) => {\n if ($(event.target).is(this._element)) {\n that._ignoreBackdropClick = true\n }\n })\n })\n\n this._showBackdrop(\n this._showElement.bind(this, relatedTarget)\n )\n }\n\n hide(event) {\n if (event) {\n event.preventDefault()\n }\n\n let hideEvent = $.Event(Event.HIDE)\n\n $(this._element).trigger(hideEvent)\n\n if (!this._isShown || hideEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = false\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(document).off(Event.FOCUSIN)\n\n $(this._element).removeClass(ClassName.IN)\n\n $(this._element).off(Event.DISMISS)\n $(this._dialog).off(Event.MOUSEDOWN)\n\n if (Util.supportsTransitionEnd() &&\n ($(this._element).hasClass(ClassName.FADE))) {\n\n $(this._element)\n .one(Util.TRANSITION_END, this._hideModal.bind(this))\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n this._hideModal()\n }\n }\n\n\n // private\n\n _showElement(relatedTarget) {\n let transition = Util.supportsTransitionEnd() &&\n $(this._element).hasClass(ClassName.FADE)\n\n if (!this._element.parentNode ||\n (this._element.parentNode.nodeType !== Node.ELEMENT_NODE)) {\n // don't move modals dom position\n document.body.appendChild(this._element)\n }\n\n this._element.style.display = 'block'\n this._element.scrollTop = 0\n\n if (transition) {\n Util.reflow(this._element)\n }\n\n $(this._element).addClass(ClassName.IN)\n\n this._enforceFocus()\n\n let shownEvent = $.Event(Event.SHOWN, {\n relatedTarget: relatedTarget\n })\n\n let transitionComplete = () => {\n this._element.focus()\n $(this._element).trigger(shownEvent)\n }\n\n if (transition) {\n $(this._dialog)\n .one(Util.TRANSITION_END, transitionComplete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n transitionComplete()\n }\n }\n\n _enforceFocus() {\n $(document)\n .off(Event.FOCUSIN) // guard against infinite focus loop\n .on(Event.FOCUSIN, (event) => {\n if (this._element !== event.target &&\n (!$(this._element).has(event.target).length)) {\n this._element.focus()\n }\n })\n }\n\n _setEscapeEvent() {\n if (this._isShown && this._config.keyboard) {\n $(this._element).on(Event.KEYDOWN, (event) => {\n if (event.which === 27) {\n this.hide()\n }\n })\n\n } else if (!this._isShown) {\n $(this._element).off(Event.KEYDOWN)\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n $(window).on(Event.RESIZE, this._handleUpdate.bind(this))\n } else {\n $(window).off(Event.RESIZE)\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none'\n this._showBackdrop(() => {\n $(document.body).removeClass(ClassName.OPEN)\n this._resetAdjustments()\n this._resetScrollbar()\n $(this._element).trigger(Event.HIDDEN)\n })\n }\n\n _removeBackdrop() {\n if (this._backdrop) {\n $(this._backdrop).remove()\n this._backdrop = null\n }\n }\n\n _showBackdrop(callback) {\n let animate = $(this._element).hasClass(ClassName.FADE) ?\n ClassName.FADE : ''\n\n if (this._isShown && this._config.backdrop) {\n let doAnimate = Util.supportsTransitionEnd() && animate\n\n this._backdrop = document.createElement('div')\n this._backdrop.className = ClassName.BACKDROP\n\n if (animate) {\n $(this._backdrop).addClass(animate)\n }\n\n $(this._backdrop).appendTo(this.$body)\n\n $(this._element).on(Event.DISMISS, (event) => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false\n return\n }\n if (event.target !== event.currentTarget) {\n return\n }\n if (this._config.backdrop === 'static') {\n this._element.focus()\n } else {\n this.hide()\n }\n })\n\n if (doAnimate) {\n Util.reflow(this._backdrop)\n }\n\n $(this._backdrop).addClass(ClassName.IN)\n\n if (!callback) {\n return\n }\n\n if (!doAnimate) {\n callback()\n return\n }\n\n $(this._backdrop)\n .one(Util.TRANSITION_END, callback)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n\n } else if (!this._isShown && this._backdrop) {\n $(this._backdrop).removeClass(ClassName.IN)\n\n let callbackRemove = () => {\n this._removeBackdrop()\n if (callback) {\n callback()\n }\n }\n\n if (Util.supportsTransitionEnd() &&\n ($(this._element).hasClass(ClassName.FADE))) {\n $(this._backdrop)\n .one(Util.TRANSITION_END, callbackRemove)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n } else {\n callbackRemove()\n }\n\n } else if (callback) {\n callback()\n }\n }\n\n\n // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // todo (fat): these should probably be refactored out of modal.js\n // ----------------------------------------------------------------------\n\n _handleUpdate() {\n this._adjustDialog()\n }\n\n _adjustDialog() {\n let isModalOverflowing =\n this._element.scrollHeight > document.documentElement.clientHeight\n\n if (!this._isBodyOverflowing && isModalOverflowing) {\n this._element.style.paddingLeft = this._scrollbarWidth + 'px'\n }\n\n if (this._isBodyOverflowing && !isModalOverflowing) {\n this._element.style.paddingRight = this._scrollbarWidth + 'px'\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = ''\n this._element.style.paddingRight = ''\n }\n\n _checkScrollbar() {\n let fullWindowWidth = window.innerWidth\n if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8\n let documentElementRect = document.documentElement.getBoundingClientRect()\n fullWindowWidth =\n documentElementRect.right - Math.abs(documentElementRect.left)\n }\n this._isBodyOverflowing = document.body.clientWidth < fullWindowWidth\n this._scrollbarWidth = this._getScrollbarWidth()\n }\n\n _setScrollbar() {\n let bodyPadding = parseInt(\n $(document.body).css('padding-right') || 0,\n 10\n )\n\n this._originalBodyPadding = document.body.style.paddingRight || ''\n\n if (this._isBodyOverflowing) {\n document.body.style.paddingRight =\n bodyPadding + this._scrollbarWidth + 'px'\n }\n }\n\n _resetScrollbar() {\n document.body.style.paddingRight = this._originalBodyPadding\n }\n\n _getScrollbarWidth() { // thx d.walsh\n let scrollDiv = document.createElement('div')\n scrollDiv.className = Selector.SCROLLBAR_MEASURER\n document.body.appendChild(scrollDiv)\n let scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth\n document.body.removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n\n // static\n\n static _jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = $.extend(\n {},\n Modal.Default,\n $(this).data(),\n typeof config === 'object' && config\n )\n\n if (!data) {\n data = new Modal(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n data[config](relatedTarget)\n\n } else if (_config.show) {\n data.show(relatedTarget)\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(Event.CLICK, Selector.DATA_TOGGLE, function (event) {\n let target\n let selector = Util.getSelectorFromElement(this)\n\n if (selector) {\n target = $(selector)[0]\n }\n\n let config = $(target).data(DATA_KEY) ?\n 'toggle' : $.extend({}, $(target).data(), $(this).data())\n\n if (this.tagName === 'A') {\n event.preventDefault()\n }\n\n let $target = $(target).one(Event.SHOW, (showEvent) => {\n if (showEvent.isDefaultPrevented()) {\n // only register focus restorer if modal will actually get shown\n return\n }\n\n $target.one(Event.HIDDEN, () => {\n if ($(this).is(':visible')) {\n this.focus()\n }\n })\n })\n\n Modal._jQueryInterface.call($(target), config, this)\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Modal._jQueryInterface\n $.fn[NAME].Constructor = Modal\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Modal._jQueryInterface\n }\n\n return Modal\n\n})(jQuery)\n\nexport default Modal\n"]}
\ No newline at end of file +{"version":3,"sources":["js/src/modal.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,KAAK,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AASpB,MAAM,IAAI,GAA2B,OAAO,CAAA;AAC5C,MAAM,OAAO,GAAwB,OAAO,CAAA;AAC5C,MAAM,QAAQ,GAAuB,UAAU,CAAA;AAC/C,MAAM,kBAAkB,GAAa,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;AAC/C,MAAM,mBAAmB,GAAY,GAAG,CAAA;AACxC,MAAM,4BAA4B,GAAG,GAAG,CAAA;;AAExC,MAAM,OAAO,GAAG;AACd,YAAQ,EAAG,IAAI;AACf,YAAQ,EAAG,IAAI;AACf,QAAI,EAAO,IAAI;GAChB,CAAA;;AAED,MAAM,KAAK,GAAG;AACZ,QAAI,EAAQ,eAAe;AAC3B,UAAM,EAAM,iBAAiB;AAC7B,QAAI,EAAQ,eAAe;AAC3B,SAAK,EAAO,gBAAgB;AAC5B,WAAO,EAAK,wBAAwB;AACpC,WAAO,EAAK,0BAA0B;AACtC,WAAO,EAAK,kBAAkB;AAC9B,UAAM,EAAM,iBAAiB;AAC7B,SAAK,EAAO,yBAAyB;AACrC,aAAS,EAAG,4BAA4B;AACxC,WAAO,EAAK,0BAA0B;GACvC,CAAA;;AAED,MAAM,SAAS,GAAG;AAChB,YAAQ,EAAG,gBAAgB;AAC3B,QAAI,EAAO,YAAY;AACvB,QAAI,EAAO,MAAM;AACjB,MAAE,EAAS,IAAI;GAChB,CAAA;;AAED,MAAM,QAAQ,GAAG;AACf,UAAM,EAAe,eAAe;AACpC,eAAW,EAAU,uBAAuB;AAC5C,gBAAY,EAAS,wBAAwB;AAC7C,sBAAkB,EAAG,yBAAyB;GAC/C,CAAA;;;;;;;;MASK,KAAK;AAEE,aAFP,KAAK,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EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;GACrD,CAAC,CAAA;;;;;;;;AASF,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAe,KAAK,CAAC,gBAAgB,CAAA;AAC/C,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,KAAK,CAAA;AAC9B,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,KAAK,CAAC,gBAAgB,CAAA;GAC9B,CAAA;;AAED,SAAO,KAAK,CAAA;CAEb,CAAA,CAAE,MAAM,CAAC,CAAA","file":"js/src/modal.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Modal = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'modal'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.modal'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 300\n const BACKDROP_TRANSITION_DURATION = 150\n\n const Default = {\n backdrop : true,\n keyboard : true,\n show : true\n }\n\n const Event = {\n HIDE Â : 'hide.bs.modal',\n HIDDEN Â : 'hidden.bs.modal',\n SHOW Â : 'show.bs.modal',\n SHOWN Â : 'shown.bs.modal',\n DISMISS : 'click.dismiss.bs.modal',\n KEYDOWN : 'keydown.dismiss.bs.modal',\n FOCUSIN : 'focusin.bs.modal',\n RESIZE : 'resize.bs.modal',\n CLICK : 'click.bs.modal.data-api',\n MOUSEDOWN : 'mousedown.dismiss.bs.modal',\n MOUSEUP : 'mouseup.dismiss.bs.modal'\n }\n\n const ClassName = {\n BACKDROP : 'modal-backdrop',\n OPEN : 'modal-open',\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n DIALOG : '.modal-dialog',\n DATA_TOGGLE : '[data-toggle=\"modal\"]',\n DATA_DISMISS : '[data-dismiss=\"modal\"]',\n SCROLLBAR_MEASURER : 'modal-scrollbar-measure'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Modal {\n\n constructor(element, config) {\n this._config = config\n this._element = element\n this._dialog = $(element).find(Selector.DIALOG)[0]\n this._backdrop = null\n this._isShown = false\n this._isBodyOverflowing = false\n this._ignoreBackdropClick = false\n this._originalBodyPadding = 0\n this._scrollbarWidth = 0\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n\n // public\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n let showEvent = $.Event(Event.SHOW, {\n relatedTarget: relatedTarget\n })\n\n $(this._element).trigger(showEvent)\n\n if (this._isShown || showEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = true\n\n this._checkScrollbar()\n this._setScrollbar()\n\n $(document.body).addClass(ClassName.OPEN)\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(this._element).on(\n Event.DISMISS,\n Selector.DATA_DISMISS,\n $.proxy(this.hide, this)\n )\n\n $(this._dialog).on(Event.MOUSEDOWN, () => {\n $(this._element).one(Event.MOUSEUP, (event) => {\n if ($(event.target).is(this._element)) {\n that._ignoreBackdropClick = true\n }\n })\n })\n\n this._showBackdrop(\n $.proxy(this._showElement, this, relatedTarget)\n )\n }\n\n hide(event) {\n if (event) {\n event.preventDefault()\n }\n\n let hideEvent = $.Event(Event.HIDE)\n\n $(this._element).trigger(hideEvent)\n\n if (!this._isShown || hideEvent.isDefaultPrevented()) {\n return\n }\n\n this._isShown = false\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n $(document).off(Event.FOCUSIN)\n\n $(this._element).removeClass(ClassName.IN)\n\n $(this._element).off(Event.DISMISS)\n $(this._dialog).off(Event.MOUSEDOWN)\n\n if (Util.supportsTransitionEnd() &&\n ($(this._element).hasClass(ClassName.FADE))) {\n\n $(this._element)\n .one(Util.TRANSITION_END, $.proxy(this._hideModal, this))\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n this._hideModal()\n }\n }\n\n\n // private\n\n _showElement(relatedTarget) {\n let transition = Util.supportsTransitionEnd() &&\n $(this._element).hasClass(ClassName.FADE)\n\n if (!this._element.parentNode ||\n (this._element.parentNode.nodeType !== Node.ELEMENT_NODE)) {\n // don't move modals dom position\n document.body.appendChild(this._element)\n }\n\n this._element.style.display = 'block'\n this._element.scrollTop = 0\n\n if (transition) {\n Util.reflow(this._element)\n }\n\n $(this._element).addClass(ClassName.IN)\n\n this._enforceFocus()\n\n let shownEvent = $.Event(Event.SHOWN, {\n relatedTarget: relatedTarget\n })\n\n let transitionComplete = () => {\n this._element.focus()\n $(this._element).trigger(shownEvent)\n }\n\n if (transition) {\n $(this._dialog)\n .one(Util.TRANSITION_END, transitionComplete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n } else {\n transitionComplete()\n }\n }\n\n _enforceFocus() {\n $(document)\n .off(Event.FOCUSIN) // guard against infinite focus loop\n .on(Event.FOCUSIN, (event) => {\n if (this._element !== event.target &&\n (!$(this._element).has(event.target).length)) {\n this._element.focus()\n }\n })\n }\n\n _setEscapeEvent() {\n if (this._isShown && this._config.keyboard) {\n $(this._element).on(Event.KEYDOWN, (event) => {\n if (event.which === 27) {\n this.hide()\n }\n })\n\n } else if (!this._isShown) {\n $(this._element).off(Event.KEYDOWN)\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this))\n } else {\n $(window).off(Event.RESIZE)\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none'\n this._showBackdrop(() => {\n $(document.body).removeClass(ClassName.OPEN)\n this._resetAdjustments()\n this._resetScrollbar()\n $(this._element).trigger(Event.HIDDEN)\n })\n }\n\n _removeBackdrop() {\n if (this._backdrop) {\n $(this._backdrop).remove()\n this._backdrop = null\n }\n }\n\n _showBackdrop(callback) {\n let animate = $(this._element).hasClass(ClassName.FADE) ?\n ClassName.FADE : ''\n\n if (this._isShown && this._config.backdrop) {\n let doAnimate = Util.supportsTransitionEnd() && animate\n\n this._backdrop = document.createElement('div')\n this._backdrop.className = ClassName.BACKDROP\n\n if (animate) {\n $(this._backdrop).addClass(animate)\n }\n\n $(this._backdrop).appendTo(this.$body)\n\n $(this._element).on(Event.DISMISS, (event) => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false\n return\n }\n if (event.target !== event.currentTarget) {\n return\n }\n if (this._config.backdrop === 'static') {\n this._element.focus()\n } else {\n this.hide()\n }\n })\n\n if (doAnimate) {\n Util.reflow(this._backdrop)\n }\n\n $(this._backdrop).addClass(ClassName.IN)\n\n if (!callback) {\n return\n }\n\n if (!doAnimate) {\n callback()\n return\n }\n\n $(this._backdrop)\n .one(Util.TRANSITION_END, callback)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n\n } else if (!this._isShown && this._backdrop) {\n $(this._backdrop).removeClass(ClassName.IN)\n\n let callbackRemove = () => {\n this._removeBackdrop()\n if (callback) {\n callback()\n }\n }\n\n if (Util.supportsTransitionEnd() &&\n ($(this._element).hasClass(ClassName.FADE))) {\n $(this._backdrop)\n .one(Util.TRANSITION_END, callbackRemove)\n .emulateTransitionEnd(BACKDROP_TRANSITION_DURATION)\n } else {\n callbackRemove()\n }\n\n } else if (callback) {\n callback()\n }\n }\n\n\n // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // todo (fat): these should probably be refactored out of modal.js\n // ----------------------------------------------------------------------\n\n _handleUpdate() {\n this._adjustDialog()\n }\n\n _adjustDialog() {\n let isModalOverflowing =\n this._element.scrollHeight > document.documentElement.clientHeight\n\n if (!this._isBodyOverflowing && isModalOverflowing) {\n this._element.style.paddingLeft = this._scrollbarWidth + 'px'\n }\n\n if (this._isBodyOverflowing && !isModalOverflowing) {\n this._element.style.paddingRight = this._scrollbarWidth + 'px'\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = ''\n this._element.style.paddingRight = ''\n }\n\n _checkScrollbar() {\n let fullWindowWidth = window.innerWidth\n if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8\n let documentElementRect = document.documentElement.getBoundingClientRect()\n fullWindowWidth =\n documentElementRect.right - Math.abs(documentElementRect.left)\n }\n this._isBodyOverflowing = document.body.clientWidth < fullWindowWidth\n this._scrollbarWidth = this._getScrollbarWidth()\n }\n\n _setScrollbar() {\n let bodyPadding = parseInt(\n $(document.body).css('padding-right') || 0,\n 10\n )\n\n this._originalBodyPadding = document.body.style.paddingRight || ''\n\n if (this._isBodyOverflowing) {\n document.body.style.paddingRight =\n bodyPadding + this._scrollbarWidth + 'px'\n }\n }\n\n _resetScrollbar() {\n document.body.style.paddingRight = this._originalBodyPadding\n }\n\n _getScrollbarWidth() { // thx d.walsh\n let scrollDiv = document.createElement('div')\n scrollDiv.className = Selector.SCROLLBAR_MEASURER\n document.body.appendChild(scrollDiv)\n let scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth\n document.body.removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n\n // static\n\n static _jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = $.extend(\n {},\n Modal.Default,\n $(this).data(),\n typeof config === 'object' && config\n )\n\n if (!data) {\n data = new Modal(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n data[config](relatedTarget)\n\n } else if (_config.show) {\n data.show(relatedTarget)\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document).on(Event.CLICK, Selector.DATA_TOGGLE, function (event) {\n let target\n let selector = Util.getSelectorFromElement(this)\n\n if (selector) {\n target = $(selector)[0]\n }\n\n let config = $(target).data(DATA_KEY) ?\n 'toggle' : $.extend({}, $(target).data(), $(this).data())\n\n if (this.tagName === 'A') {\n event.preventDefault()\n }\n\n let $target = $(target).one(Event.SHOW, (showEvent) => {\n if (showEvent.isDefaultPrevented()) {\n // only register focus restorer if modal will actually get shown\n return\n }\n\n $target.one(Event.HIDDEN, () => {\n if ($(this).is(':visible')) {\n this.focus()\n }\n })\n })\n\n Modal._jQueryInterface.call($(target), config, this)\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Modal._jQueryInterface\n $.fn[NAME].Constructor = Modal\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Modal._jQueryInterface\n }\n\n return Modal\n\n})(jQuery)\n\nexport default Modal\n"]}
\ No newline at end of file diff --git a/js/dist/popover.js b/js/dist/popover.js index d6c3a3594a..3a4402f04d 100644 --- a/js/dist/popover.js +++ b/js/dist/popover.js @@ -85,7 +85,7 @@ var Popover = (function ($) { }, { key: 'getTipElement', value: function getTipElement() { - return this.tip = this.tip || $(this.config['template'])[0]; + return this.tip = this.tip || $(this.config.template)[0]; } }, { key: 'setContent', diff --git a/js/dist/popover.js.map b/js/dist/popover.js.map index c6865e239f..bcb5ed8b44 100644 --- a/js/dist/popover.js.map +++ b/js/dist/popover.js.map @@ -1 +1 @@ -{"version":3,"sources":["js/src/popover.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAUA,IAAM,OAAO,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AAStB,MAAM,IAAI,GAAkB,SAAS,CAAA;AACrC,MAAM,OAAO,GAAe,OAAO,CAAA;AACnC,MAAM,QAAQ,GAAc,YAAY,CAAA;AACxC,MAAM,kBAAkB,GAAI,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;;AAEtC,MAAM,OAAO,GAAG,CAAC,CAAC,MA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I,CAAC,IAAI,CAAC,YAAY;AAC3B,cAAI,IAAI,GAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;AACnC,cAAI,OAAO,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAA;;AAExD,cAAI,CAAC,IAAI,IAAI,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;AACxC,mBAAM;WACP;;AAED,cAAI,CAAC,IAAI,EAAE;AACT,gBAAI,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;AACjC,aAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;WAC7B;;AAED,cAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;AAC9B,gBAAI,CAAC,MAAM,CAAC,EAAE,CAAA;WACf;SACF,CAAC,CAAA;OACH;;;WA3FG,OAAO;KAAS,OAAO;;;;;;;;AAqG7B,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAe,OAAO,CAAC,gBAAgB,CAAA;AACjD,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,OAAO,CAAA;AAChC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,OAAO,CAAC,gBAAgB,CAAA;GAChC,CAAA;;AAED,SAAO,OAAO,CAAA;CAEf,CAAA,CAAE,MAAM,CAAC,CAAA","file":"js/src/popover.js","sourcesContent":["import Tooltip from './tooltip'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Popover = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'popover'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.popover'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Default = $.extend({}, Tooltip.Default, {\n placement : 'right',\n trigger : 'click',\n content : '',\n template : '<div class=\"popover\" role=\"tooltip\">'\n + '<div class=\"popover-arrow\"></div>'\n + '<h3 class=\"popover-title\"></h3>'\n + '<div class=\"popover-content\"></div></div>'\n\t})\n\n const ClassName = {\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n TITLE : '.popover-title',\n CONTENT : '.popover-content',\n ARROW : '.popover-arrow'\n }\n\n const Event = {\n HIDE : 'hide.bs.popover',\n HIDDEN : 'hidden.bs.popover',\n SHOW : 'show.bs.popover',\n SHOWN : 'shown.bs.popover',\n INSERTED : 'inserted.bs.popover',\n CLICK : 'click.bs.popover',\n FOCUSIN : 'focusin.bs.popover',\n FOCUSOUT : 'focusout.bs.popover',\n MOUSEENTER : 'mouseenter.bs.popover',\n MOUSELEAVE : 'mouseleave.bs.popover'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Popover extends Tooltip {\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n\n // overrides\n\n isWithContent() {\n return this.getTitle() || this._getContent()\n }\n\n getTipElement() {\n return (this.tip = this.tip || $(this.config['template'])[0])\n }\n\n setContent() {\n let tip = this.getTipElement()\n let title = this.getTitle()\n let content = this._getContent()\n let titleElement = $(tip).find(Selector.TITLE)[0]\n\n if (titleElement) {\n titleElement[\n this.config.html ? 'innerHTML' : 'innerText'\n ] = title\n }\n\n // we use append for html objects to maintain js events\n $(tip).find(Selector.CONTENT).children().detach().end()[\n this.config.html ?\n (typeof content === 'string' ? 'html' : 'append') : 'text'\n ](content)\n\n $(tip)\n .removeClass(ClassName.FADE)\n .removeClass(ClassName.IN)\n\n this.cleanupTether()\n }\n\n // private\n\n _getContent() {\n return this.element.getAttribute('data-content')\n || (typeof this.config.content == 'function' ?\n this.config.content.call(this.element) :\n this.config.content)\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = typeof config === 'object' ? config : null\n\n if (!data && /destroy|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Popover(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n data[config]()\n }\n })\n }\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Popover._jQueryInterface\n $.fn[NAME].Constructor = Popover\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Popover._jQueryInterface\n }\n\n return Popover\n\n})(jQuery)\n\nexport default Popover\n"]}
\ No newline at end of file +{"version":3,"sources":["js/src/popover.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAUA,IAAM,OAAO,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AAStB,MAAM,IAAI,GAAkB,SAAS,CAAA;AACrC,MAAM,OAAO,GAAe,OAAO,CAAA;AACnC,MAAM,QAAQ,GAAc,YAAY,CAAA;AACxC,MAAM,kBAAkB,GAAI,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;;AAEtC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,EAAE;AAC5C,aAAS,EAAG,OAAO;AACnB,WAAO,EAAK,OAAO;AACnB,WAAO,EAAK,EAAE;AACd,YAAQ,EAAI,sCAAsC,GACtC,mCAAmC,GACnC,iCAAiC,GACjC,2CAA2C;GACxD,CAAC,CAAA;;AAEF,MAAM,SAAS,GAAG;AAChB,QAAI,EAAG,MAAM;AACb,MAAE,EAA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AAM;WACP;;AAED,cAAI,CAAC,IAAI,EAAE;AACT,gBAAI,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;AACjC,aAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;WAC7B;;AAED,cAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;AAC9B,gBAAI,CAAC,MAAM,CAAC,EAAE,CAAA;WACf;SACF,CAAC,CAAA;OACH;;;WA3FG,OAAO;KAAS,OAAO;;;;;;;;AAqG7B,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAe,OAAO,CAAC,gBAAgB,CAAA;AACjD,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,OAAO,CAAA;AAChC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,OAAO,CAAC,gBAAgB,CAAA;GAChC,CAAA;;AAED,SAAO,OAAO,CAAA;CAEf,CAAA,CAAE,MAAM,CAAC,CAAA","file":"js/src/popover.js","sourcesContent":["import Tooltip from './tooltip'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Popover = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'popover'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.popover'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Default = $.extend({}, Tooltip.Default, {\n placement : 'right',\n trigger : 'click',\n content : '',\n template : '<div class=\"popover\" role=\"tooltip\">'\n + '<div class=\"popover-arrow\"></div>'\n + '<h3 class=\"popover-title\"></h3>'\n + '<div class=\"popover-content\"></div></div>'\n })\n\n const ClassName = {\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n TITLE : '.popover-title',\n CONTENT : '.popover-content',\n ARROW : '.popover-arrow'\n }\n\n const Event = {\n HIDE : 'hide.bs.popover',\n HIDDEN : 'hidden.bs.popover',\n SHOW : 'show.bs.popover',\n SHOWN : 'shown.bs.popover',\n INSERTED : 'inserted.bs.popover',\n CLICK : 'click.bs.popover',\n FOCUSIN : 'focusin.bs.popover',\n FOCUSOUT : 'focusout.bs.popover',\n MOUSEENTER : 'mouseenter.bs.popover',\n MOUSELEAVE : 'mouseleave.bs.popover'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Popover extends Tooltip {\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n\n // overrides\n\n isWithContent() {\n return this.getTitle() || this._getContent()\n }\n\n getTipElement() {\n return (this.tip = this.tip || $(this.config.template)[0])\n }\n\n setContent() {\n let tip = this.getTipElement()\n let title = this.getTitle()\n let content = this._getContent()\n let titleElement = $(tip).find(Selector.TITLE)[0]\n\n if (titleElement) {\n titleElement[\n this.config.html ? 'innerHTML' : 'innerText'\n ] = title\n }\n\n // we use append for html objects to maintain js events\n $(tip).find(Selector.CONTENT).children().detach().end()[\n this.config.html ?\n (typeof content === 'string' ? 'html' : 'append') : 'text'\n ](content)\n\n $(tip)\n .removeClass(ClassName.FADE)\n .removeClass(ClassName.IN)\n\n this.cleanupTether()\n }\n\n // private\n\n _getContent() {\n return this.element.getAttribute('data-content')\n || (typeof this.config.content == 'function' ?\n this.config.content.call(this.element) :\n this.config.content)\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = typeof config === 'object' ? config : null\n\n if (!data && /destroy|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Popover(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n data[config]()\n }\n })\n }\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Popover._jQueryInterface\n $.fn[NAME].Constructor = Popover\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Popover._jQueryInterface\n }\n\n return Popover\n\n})(jQuery)\n\nexport default Popover\n"]}
\ No newline at end of file diff --git a/js/dist/scrollspy.js b/js/dist/scrollspy.js index 2c530b21b9..d3e170110d 100644 --- a/js/dist/scrollspy.js +++ b/js/dist/scrollspy.js @@ -64,7 +64,7 @@ var ScrollSpy = (function ($) { this._activeTarget = null; this._scrollHeight = 0; - $(this._scrollElement).on(Event.SCROLL, this._process.bind(this)); + $(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this)); this.refresh(); this._process(); diff --git a/js/dist/scrollspy.js.map b/js/dist/scrollspy.js.map index 46c0410a0a..33b866da15 100644 --- a/js/dist/scrollspy.js.map +++ b/js/dist/scrollspy.js.map @@ -1 +1 @@ -{"version":3,"sources":["js/src/scrollspy.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,SAAS,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AASxB,MAAM,IAAI,GAAiB,WAAW,CAAA;AACtC,MAAM,OAAO,GAAc,OAAO,CAAA;AAClC,MAAM,QAAQ,GAAa,cAAc,CAAA;AACzC,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;;AAErC,MAAM,OAAO,GAAG;AACd,UAAM,EAAG,EAAE;GACZ,CAAA;;AAED,MAAM,KAAK,GAAG;AACZ,YAAQ,EAAG,uBAAuB;AAClC,UAAM,EAAK,qBAAqB;AAChC,QAAI,EAAO,4BAA4B;GACxC,CAAA;;AAED,MAAM,SAAS,GAAG;A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AAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,GAAG;AACpC,UAAI,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;AAC3B,eAAS,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;KACnD;GACF,CAAC,CAAA;;;;;;;;AASF,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAe,SAAS,CAAC,gBAAgB,CAAA;AACnD,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,SAAS,CAAA;AAClC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,SAAS,CAAC,gBAAgB,CAAA;GAClC,CAAA;;AAED,SAAO,SAAS,CAAA;CAEjB,CAAA,CAAE,MAAM,CAAC,CAAA","file":"js/src/scrollspy.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst ScrollSpy = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'scrollspy'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.scrollspy'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Default = {\n offset : 10\n }\n\n const Event = {\n ACTIVATE : 'activate.bs.scrollspy',\n SCROLL : 'scroll.bs.scrollspy',\n LOAD : 'load.bs.scrollspy.data-api'\n }\n\n const ClassName = {\n DROPDOWN_MENU : 'dropdown-menu',\n ACTIVE : 'active'\n }\n\n const Selector = {\n DATA_SPY : '[data-spy=\"scroll\"]',\n ACTIVE : '.active',\n LI_DROPDOWN : 'li.dropdown',\n LI : 'li'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class ScrollSpy {\n\n constructor(element, config) {\n this._scrollElement = element.tagName === 'BODY' ? window : element\n this._config = $.extend({}, Default, config)\n this._selector = `${this._config.target || ''} .nav li > a`\n this._offsets = []\n this._targets = []\n this._activeTarget = null\n this._scrollHeight = 0\n\n $(this._scrollElement).on(Event.SCROLL, this._process.bind(this))\n\n this.refresh()\n this._process()\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n\n // public\n\n refresh() {\n let offsetMethod = 'offset'\n let offsetBase = 0\n\n if (this._scrollElement !== this._scrollElement.window) {\n offsetMethod = 'position'\n offsetBase = this._getScrollTop()\n }\n\n this._offsets = []\n this._targets = []\n\n this._scrollHeight = this._getScrollHeight()\n\n let targets = $.makeArray($(this._selector))\n\n targets\n .map((element) => {\n let target\n let targetSelector = Util.getSelectorFromElement(element)\n\n if (targetSelector) {\n target = $(targetSelector)[0]\n }\n\n if (target && (target.offsetWidth || target.offsetHeight)) {\n // todo (fat): remove sketch reliance on jQuery position/offset\n return [\n $(target)[offsetMethod]().top + offsetBase,\n targetSelector\n ]\n }\n })\n .filter((item) => item)\n .sort((a, b) => a[0] - b[0])\n .forEach((item) => {\n this._offsets.push(item[0])\n this._targets.push(item[1])\n })\n }\n\n\n // private\n\n _getScrollTop() {\n return this._scrollElement === window ?\n this._scrollElement.scrollY : this._scrollElement.scrollTop\n }\n\n _getScrollHeight() {\n return this._scrollElement.scrollHeight || Math.max(\n document.body.scrollHeight,\n document.documentElement.scrollHeight\n )\n }\n\n _process() {\n let scrollTop = this._getScrollTop() + this._config.offset\n let scrollHeight = this._getScrollHeight()\n let maxScroll = this._config.offset\n + scrollHeight\n - this._scrollElement.offsetHeight\n\n if (this._scrollHeight !== scrollHeight) {\n this.refresh()\n }\n\n if (scrollTop >= maxScroll) {\n let target = this._targets[this._targets.length - 1]\n\n if (this._activeTarget !== target) {\n this._activate(target)\n }\n }\n\n if (this._activeTarget && scrollTop < this._offsets[0]) {\n this._activeTarget = null\n this._clear()\n return\n }\n\n for (let i = this._offsets.length; i--;) {\n let isActiveTarget = this._activeTarget !== this._targets[i]\n && scrollTop >= this._offsets[i]\n && (this._offsets[i + 1] === undefined ||\n scrollTop < this._offsets[i + 1])\n\n if (isActiveTarget) {\n this._activate(this._targets[i])\n }\n }\n }\n\n _activate(target) {\n this._activeTarget = target\n\n this._clear()\n\n let selector =\n `${this._selector}[data-target=\"${target}\"],` +\n `${this._selector}[href=\"${target}\"]`\n\n // todo (fat): getting all the raw li's up the tree is not great.\n let parentListItems = $(selector).parents(Selector.LI)\n\n for (let i = parentListItems.length; i--;) {\n $(parentListItems[i]).addClass(ClassName.ACTIVE)\n\n let itemParent = parentListItems[i].parentNode\n\n if (itemParent && $(itemParent).hasClass(ClassName.DROPDOWN_MENU)) {\n let closestDropdown = $(itemParent)\n .closest(Selector.LI_DROPDOWN)[0]\n $(closestDropdown).addClass(ClassName.ACTIVE)\n }\n }\n\n $(this._scrollElement).trigger(Event.ACTIVATE, {\n relatedTarget: target\n })\n }\n\n _clear() {\n let activeParents = $(this._selector).parentsUntil(\n this._config.target,\n Selector.ACTIVE\n )\n\n for (let i = activeParents.length; i--;) {\n $(activeParents[i]).removeClass(ClassName.ACTIVE)\n }\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = typeof config === 'object' && config || null\n\n if (!data) {\n data = new ScrollSpy(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n data[config]()\n }\n })\n }\n\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(window).on(Event.LOAD, function () {\n let scrollSpys = $.makeArray($(Selector.DATA_SPY))\n\n for (let i = scrollSpys.length; i--;) {\n let $spy = $(scrollSpys[i])\n ScrollSpy._jQueryInterface.call($spy, $spy.data())\n }\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = ScrollSpy._jQueryInterface\n $.fn[NAME].Constructor = ScrollSpy\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return ScrollSpy._jQueryInterface\n }\n\n return ScrollSpy\n\n})(jQuery)\n\nexport default ScrollSpy\n"]}
\ No newline at end of file +{"version":3,"sources":["js/src/scrollspy.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,SAAS,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AASxB,MAAM,IAAI,GAAiB,WAAW,CAAA;AACtC,MAAM,OAAO,GAAc,OAAO,CAAA;AAClC,MAAM,QAAQ,GAAa,cAAc,CAAA;AACzC,MAAM,kBAAkB,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;;AAErC,MAAM,OAAO,GAAG;AACd,UAAM,EAAG,EAAE;GACZ,CAAA;;AAED,MAAM,KAAK,GAAG;AACZ,YAAQ,EAAG,uBAAuB;AAClC,UAAM,EAAK,qBAAqB;AAChC,QAAI,EAAO,4BAA4B;GACxC,CAAA;;AAED,MAAM,SAAS,GAAG;AAChB,iBAAa,EAAG,eAAe;AAC/B,UAAM,EAAU,QAAQ;GACzB,CAAA;;AAED,MAAM,QAAQ,GAAG;AACf,YAAQ,EAAM,qBAAqB;AACnC,UAAM,EAAQ,SAAS;AACvB,eAAW,EAAG,aAAa;AAC3B,MAAE,EAAY,IAAI;GACnB,CAAA;;;;;;;;MASK,SAAS;AAEF,aAFP,SAAS,CAED,OAAO,EAAE,MAAM,EAAE;4BAFzB,SAAS;;AAGX,UAAI,CAAC,cAAc,GAAG,OAAO,CAAC,OAAO,KAAK,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;AACnE,UAAI,CAAC,OAAO,GAAU,CAAC,CAAC,MAAM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AAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,SAAS,CAAC,gBAAgB,CAAA;GAClC,CAAA;;AAED,SAAO,SAAS,CAAA;CAEjB,CAAA,CAAE,MAAM,CAAC,CAAA","file":"js/src/scrollspy.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst ScrollSpy = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'scrollspy'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.scrollspy'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n\n const Default = {\n offset : 10\n }\n\n const Event = {\n ACTIVATE : 'activate.bs.scrollspy',\n SCROLL : 'scroll.bs.scrollspy',\n LOAD : 'load.bs.scrollspy.data-api'\n }\n\n const ClassName = {\n DROPDOWN_MENU : 'dropdown-menu',\n ACTIVE : 'active'\n }\n\n const Selector = {\n DATA_SPY : '[data-spy=\"scroll\"]',\n ACTIVE : '.active',\n LI_DROPDOWN : 'li.dropdown',\n LI : 'li'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class ScrollSpy {\n\n constructor(element, config) {\n this._scrollElement = element.tagName === 'BODY' ? window : element\n this._config = $.extend({}, Default, config)\n this._selector = `${this._config.target || ''} .nav li > a`\n this._offsets = []\n this._targets = []\n this._activeTarget = null\n this._scrollHeight = 0\n\n $(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this))\n\n this.refresh()\n this._process()\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n\n // public\n\n refresh() {\n let offsetMethod = 'offset'\n let offsetBase = 0\n\n if (this._scrollElement !== this._scrollElement.window) {\n offsetMethod = 'position'\n offsetBase = this._getScrollTop()\n }\n\n this._offsets = []\n this._targets = []\n\n this._scrollHeight = this._getScrollHeight()\n\n let targets = $.makeArray($(this._selector))\n\n targets\n .map((element) => {\n let target\n let targetSelector = Util.getSelectorFromElement(element)\n\n if (targetSelector) {\n target = $(targetSelector)[0]\n }\n\n if (target && (target.offsetWidth || target.offsetHeight)) {\n // todo (fat): remove sketch reliance on jQuery position/offset\n return [\n $(target)[offsetMethod]().top + offsetBase,\n targetSelector\n ]\n }\n })\n .filter((item) => item)\n .sort((a, b) => a[0] - b[0])\n .forEach((item) => {\n this._offsets.push(item[0])\n this._targets.push(item[1])\n })\n }\n\n\n // private\n\n _getScrollTop() {\n return this._scrollElement === window ?\n this._scrollElement.scrollY : this._scrollElement.scrollTop\n }\n\n _getScrollHeight() {\n return this._scrollElement.scrollHeight || Math.max(\n document.body.scrollHeight,\n document.documentElement.scrollHeight\n )\n }\n\n _process() {\n let scrollTop = this._getScrollTop() + this._config.offset\n let scrollHeight = this._getScrollHeight()\n let maxScroll = this._config.offset\n + scrollHeight\n - this._scrollElement.offsetHeight\n\n if (this._scrollHeight !== scrollHeight) {\n this.refresh()\n }\n\n if (scrollTop >= maxScroll) {\n let target = this._targets[this._targets.length - 1]\n\n if (this._activeTarget !== target) {\n this._activate(target)\n }\n }\n\n if (this._activeTarget && scrollTop < this._offsets[0]) {\n this._activeTarget = null\n this._clear()\n return\n }\n\n for (let i = this._offsets.length; i--;) {\n let isActiveTarget = this._activeTarget !== this._targets[i]\n && scrollTop >= this._offsets[i]\n && (this._offsets[i + 1] === undefined ||\n scrollTop < this._offsets[i + 1])\n\n if (isActiveTarget) {\n this._activate(this._targets[i])\n }\n }\n }\n\n _activate(target) {\n this._activeTarget = target\n\n this._clear()\n\n let selector =\n `${this._selector}[data-target=\"${target}\"],` +\n `${this._selector}[href=\"${target}\"]`\n\n // todo (fat): getting all the raw li's up the tree is not great.\n let parentListItems = $(selector).parents(Selector.LI)\n\n for (let i = parentListItems.length; i--;) {\n $(parentListItems[i]).addClass(ClassName.ACTIVE)\n\n let itemParent = parentListItems[i].parentNode\n\n if (itemParent && $(itemParent).hasClass(ClassName.DROPDOWN_MENU)) {\n let closestDropdown = $(itemParent)\n .closest(Selector.LI_DROPDOWN)[0]\n $(closestDropdown).addClass(ClassName.ACTIVE)\n }\n }\n\n $(this._scrollElement).trigger(Event.ACTIVATE, {\n relatedTarget: target\n })\n }\n\n _clear() {\n let activeParents = $(this._selector).parentsUntil(\n this._config.target,\n Selector.ACTIVE\n )\n\n for (let i = activeParents.length; i--;) {\n $(activeParents[i]).removeClass(ClassName.ACTIVE)\n }\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = typeof config === 'object' && config || null\n\n if (!data) {\n data = new ScrollSpy(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n data[config]()\n }\n })\n }\n\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(window).on(Event.LOAD, function () {\n let scrollSpys = $.makeArray($(Selector.DATA_SPY))\n\n for (let i = scrollSpys.length; i--;) {\n let $spy = $(scrollSpys[i])\n ScrollSpy._jQueryInterface.call($spy, $spy.data())\n }\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = ScrollSpy._jQueryInterface\n $.fn[NAME].Constructor = ScrollSpy\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return ScrollSpy._jQueryInterface\n }\n\n return ScrollSpy\n\n})(jQuery)\n\nexport default ScrollSpy\n"]}
\ No newline at end of file diff --git a/js/dist/tab.js b/js/dist/tab.js index 8c71d01714..b5108deea6 100644 --- a/js/dist/tab.js +++ b/js/dist/tab.js @@ -143,7 +143,7 @@ var Tab = (function ($) { var active = $(container).find(Selector.ACTIVE_CHILD)[0]; var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || !!$(container).find(Selector.FADE_CHILD)[0]); - var complete = this._transitionComplete.bind(this, element, active, isTransitioning, callback); + var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback); if (active && isTransitioning) { $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); diff --git a/js/dist/tab.js.map b/js/dist/tab.js.map index ab1408b8df..2b18f3bdb1 100644 --- a/js/dist/tab.js.map +++ b/js/dist/tab.js.map @@ -1 +1 @@ -{"version":3,"sources":["js/src/tab.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,GAAG,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AASlB,MAAM,IAAI,GAAkB,KAAK,CAAA;AACjC,MAAM,OAAO,GAAe,OAAO,CAAA;AACnC,MAAM,QAAQ,GAAc,QAAQ,CAAA;AACpC,MAAM,kBAAkB,GAAI,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;AACtC,MAAM,mBAAmB,GAAG,GAAG,CAAA;;AAE/B,MAAM,KAAK,GAAG;AACZ,QAAI,EAAK,aAAa;AACtB,UAAM,EAAG,eAAe;AACxB,QAAI,EAAK,aAAa;AACtB,SAAK,EAAI,cAAc;AACvB,SAAK,EAAI,uBAAuB;GACjC,CAAA;;AAED,MAAM,SAAS,GAAG;AAChB,iBAAa,EAAG,eAAe;AAC/B,UAAM,EAAU,QAAQ;AACxB,QAAI,EAAY,MAAM;AACtB,MAAE,EAAc,IAAI;GACrB,CAAA;;AAED,MAAM,QAAQ,GAAG;AACf,KAAC,EAAuB,GAAG;AAC3B,MAAE,EAAsB,IAAI;AAC5B,eAAW,EAAa,aAAa;AACrC,MAAE,EAAsB,wBAAwB;AAChD,cAAU,EAAc,SAAS;AACjC,UAAM,EAAkB,SAAS;AACjC,gBA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7C,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,GAAG,CAAA;AAC5B,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,GAAG,CAAC,gBAAgB,CAAA;GAC5B,CAAA;;AAED,SAAO,GAAG,CAAA;CAEX,CAAA,CAAE,MAAM,CAAC,CAAA","file":"js/src/tab.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Tab = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'tab'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.tab'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n\n const Event = {\n HIDE : 'hide.bs.tab',\n HIDDEN : 'hidden.bs.tab',\n SHOW : 'show.bs.tab',\n SHOWN : 'shown.bs.tab',\n CLICK : 'click.bs.tab.data-api'\n }\n\n const ClassName = {\n DROPDOWN_MENU : 'dropdown-menu',\n ACTIVE : 'active',\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n A : 'a',\n LI : 'li',\n LI_DROPDOWN : 'li.dropdown',\n UL : 'ul:not(.dropdown-menu)',\n FADE_CHILD : '> .fade',\n ACTIVE : '.active',\n ACTIVE_CHILD : '> .active',\n DATA_TOGGLE : '[data-toggle=\"tab\"], [data-toggle=\"pill\"]',\n DROPDOWN_ACTIVE_CHILD : '> .dropdown-menu > .active'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Tab {\n\n constructor(element) {\n this._element = element\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n\n // public\n\n show() {\n if (this._element.parentNode &&\n (this._element.parentNode.nodeType == Node.ELEMENT_NODE) &&\n ($(this._element).parent().hasClass(ClassName.ACTIVE))) {\n return\n }\n\n let target\n let previous\n let ulElement = $(this._element).closest(Selector.UL)[0]\n let selector = Util.getSelectorFromElement(this._element)\n\n if (ulElement) {\n previous = $.makeArray($(ulElement).find(Selector.ACTIVE))\n previous = previous[previous.length - 1]\n\n if (previous) {\n previous = $(previous).find(Selector.A)[0]\n }\n }\n\n let hideEvent = $.Event(Event.HIDE, {\n relatedTarget: this._element\n })\n\n let showEvent = $.Event(Event.SHOW, {\n relatedTarget: previous\n })\n\n if (previous) {\n $(previous).trigger(hideEvent)\n }\n\n $(this._element).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented() ||\n (hideEvent.isDefaultPrevented())) {\n return\n }\n\n if (selector) {\n target = $(selector)[0]\n }\n\n this._activate(\n $(this._element).closest(Selector.LI)[0],\n ulElement\n )\n\n let complete = () => {\n let hiddenEvent = $.Event(Event.HIDDEN, {\n relatedTarget: this._element\n })\n\n let shownEvent = $.Event(Event.SHOWN, {\n relatedTarget: previous\n })\n\n $(previous).trigger(hiddenEvent)\n $(this._element).trigger(shownEvent)\n }\n\n if (target) {\n this._activate(target, target.parentNode, complete)\n } else {\n complete()\n }\n }\n\n\n // private\n\n _activate(element, container, callback) {\n let active = $(container).find(Selector.ACTIVE_CHILD)[0]\n let isTransitioning = callback\n && Util.supportsTransitionEnd()\n && ((active && $(active).hasClass(ClassName.FADE))\n || !!$(container).find(Selector.FADE_CHILD)[0])\n\n let complete = this._transitionComplete.bind(\n this, element, active, isTransitioning, callback)\n\n if (active && isTransitioning) {\n $(active)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n } else {\n complete()\n }\n\n if (active) {\n $(active).removeClass(ClassName.IN)\n }\n }\n\n _transitionComplete(element, active, isTransitioning, callback) {\n if (active) {\n $(active).removeClass(ClassName.ACTIVE)\n\n let dropdownChild = $(active).find(\n Selector.DROPDOWN_ACTIVE_CHILD\n )[0]\n if (dropdownChild) {\n $(dropdownChild).removeClass(ClassName.ACTIVE)\n }\n\n let activeToggle = $(active).find(Selector.DATA_TOGGLE)[0]\n if (activeToggle) {\n activeToggle.setAttribute('aria-expanded', false)\n }\n }\n\n $(element).addClass(ClassName.ACTIVE)\n\n let elementToggle = $(element).find(Selector.DATA_TOGGLE)[0]\n if (elementToggle) {\n elementToggle.setAttribute('aria-expanded', true)\n }\n\n if (isTransitioning) {\n Util.reflow(element)\n $(element).addClass(ClassName.IN)\n } else {\n $(element).removeClass(ClassName.FADE)\n }\n\n if (element.parentNode &&\n ($(element.parentNode).hasClass(ClassName.DROPDOWN_MENU))) {\n\n let dropdownElement = $(element).closest(Selector.LI_DROPDOWN)[0]\n if (dropdownElement) {\n $(dropdownElement).addClass(ClassName.ACTIVE)\n }\n\n elementToggle = $(element).find(Selector.DATA_TOGGLE)[0]\n if (elementToggle) {\n elementToggle.setAttribute('aria-expanded', true)\n }\n }\n\n if (callback) {\n callback()\n }\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let $this = $(this)\n let data = $this.data(DATA_KEY)\n\n if (!data) {\n data = data = new Tab(this)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n data[config]()\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.CLICK, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n Tab._jQueryInterface.call($(this), 'show')\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Tab._jQueryInterface\n $.fn[NAME].Constructor = Tab\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tab._jQueryInterface\n }\n\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------------------------------------------------\n * Bootstrap (v4.0.0): tab.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Tab = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'tab'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.tab'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n\n const Event = {\n HIDE : 'hide.bs.tab',\n HIDDEN : 'hidden.bs.tab',\n SHOW : 'show.bs.tab',\n SHOWN : 'shown.bs.tab',\n CLICK : 'click.bs.tab.data-api'\n }\n\n const ClassName = {\n DROPDOWN_MENU : 'dropdown-menu',\n ACTIVE : 'active',\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n A : 'a',\n LI : 'li',\n LI_DROPDOWN : 'li.dropdown',\n UL : 'ul:not(.dropdown-menu)',\n FADE_CHILD : '> .fade',\n ACTIVE : '.active',\n ACTIVE_CHILD : '> .active',\n DATA_TOGGLE : '[data-toggle=\"tab\"], [data-toggle=\"pill\"]',\n DROPDOWN_ACTIVE_CHILD : '> .dropdown-menu > .active'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Tab {\n\n constructor(element) {\n this._element = element\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n\n // public\n\n show() {\n if (this._element.parentNode &&\n (this._element.parentNode.nodeType == Node.ELEMENT_NODE) &&\n ($(this._element).parent().hasClass(ClassName.ACTIVE))) {\n return\n }\n\n let target\n let previous\n let ulElement = $(this._element).closest(Selector.UL)[0]\n let selector = Util.getSelectorFromElement(this._element)\n\n if (ulElement) {\n previous = $.makeArray($(ulElement).find(Selector.ACTIVE))\n previous = previous[previous.length - 1]\n\n if (previous) {\n previous = $(previous).find(Selector.A)[0]\n }\n }\n\n let hideEvent = $.Event(Event.HIDE, {\n relatedTarget: this._element\n })\n\n let showEvent = $.Event(Event.SHOW, {\n relatedTarget: previous\n })\n\n if (previous) {\n $(previous).trigger(hideEvent)\n }\n\n $(this._element).trigger(showEvent)\n\n if (showEvent.isDefaultPrevented() ||\n (hideEvent.isDefaultPrevented())) {\n return\n }\n\n if (selector) {\n target = $(selector)[0]\n }\n\n this._activate(\n $(this._element).closest(Selector.LI)[0],\n ulElement\n )\n\n let complete = () => {\n let hiddenEvent = $.Event(Event.HIDDEN, {\n relatedTarget: this._element\n })\n\n let shownEvent = $.Event(Event.SHOWN, {\n relatedTarget: previous\n })\n\n $(previous).trigger(hiddenEvent)\n $(this._element).trigger(shownEvent)\n }\n\n if (target) {\n this._activate(target, target.parentNode, complete)\n } else {\n complete()\n }\n }\n\n\n // private\n\n _activate(element, container, callback) {\n let active = $(container).find(Selector.ACTIVE_CHILD)[0]\n let isTransitioning = callback\n && Util.supportsTransitionEnd()\n && ((active && $(active).hasClass(ClassName.FADE))\n || !!$(container).find(Selector.FADE_CHILD)[0])\n\n let complete = $.proxy(\n this._transitionComplete,\n this,\n element,\n active,\n isTransitioning,\n callback\n )\n\n if (active && isTransitioning) {\n $(active)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n } else {\n complete()\n }\n\n if (active) {\n $(active).removeClass(ClassName.IN)\n }\n }\n\n _transitionComplete(element, active, isTransitioning, callback) {\n if (active) {\n $(active).removeClass(ClassName.ACTIVE)\n\n let dropdownChild = $(active).find(\n Selector.DROPDOWN_ACTIVE_CHILD\n )[0]\n if (dropdownChild) {\n $(dropdownChild).removeClass(ClassName.ACTIVE)\n }\n\n let activeToggle = $(active).find(Selector.DATA_TOGGLE)[0]\n if (activeToggle) {\n activeToggle.setAttribute('aria-expanded', false)\n }\n }\n\n $(element).addClass(ClassName.ACTIVE)\n\n let elementToggle = $(element).find(Selector.DATA_TOGGLE)[0]\n if (elementToggle) {\n elementToggle.setAttribute('aria-expanded', true)\n }\n\n if (isTransitioning) {\n Util.reflow(element)\n $(element).addClass(ClassName.IN)\n } else {\n $(element).removeClass(ClassName.FADE)\n }\n\n if (element.parentNode &&\n ($(element.parentNode).hasClass(ClassName.DROPDOWN_MENU))) {\n\n let dropdownElement = $(element).closest(Selector.LI_DROPDOWN)[0]\n if (dropdownElement) {\n $(dropdownElement).addClass(ClassName.ACTIVE)\n }\n\n elementToggle = $(element).find(Selector.DATA_TOGGLE)[0]\n if (elementToggle) {\n elementToggle.setAttribute('aria-expanded', true)\n }\n }\n\n if (callback) {\n callback()\n }\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let $this = $(this)\n let data = $this.data(DATA_KEY)\n\n if (!data) {\n data = data = new Tab(this)\n $this.data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n data[config]()\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\n $(document)\n .on(Event.CLICK, Selector.DATA_TOGGLE, function (event) {\n event.preventDefault()\n Tab._jQueryInterface.call($(this), 'show')\n })\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Tab._jQueryInterface\n $.fn[NAME].Constructor = Tab\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tab._jQueryInterface\n }\n\n return Tab\n\n})(jQuery)\n\nexport default Tab\n"]}
\ No newline at end of file diff --git a/js/dist/tooltip.js b/js/dist/tooltip.js index 5e9fffcd62..3c76a14421 100644 --- a/js/dist/tooltip.js +++ b/js/dist/tooltip.js @@ -71,7 +71,8 @@ var Tooltip = (function ($) { var Selector = { TOOLTIP: '.tooltip', - TOOLTIP_INNER: '.tooltip-inner' }; + TOOLTIP_INNER: '.tooltip-inner' + }; var TetherClass = { element: false, @@ -339,12 +340,12 @@ var Tooltip = (function ($) { triggers.forEach(function (trigger) { if (trigger === 'click') { - $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, _this4.toggle.bind(_this4)); + $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, $.proxy(_this4.toggle, _this4)); } else if (trigger !== Trigger.MANUAL) { var eventIn = trigger == Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN; var eventOut = trigger == Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT; - $(_this4.element).on(eventIn, _this4.config.selector, _this4._enter.bind(_this4)).on(eventOut, _this4.config.selector, _this4._leave.bind(_this4)); + $(_this4.element).on(eventIn, _this4.config.selector, $.proxy(_this4._enter, _this4)).on(eventOut, _this4.config.selector, $.proxy(_this4._leave, _this4)); } }); diff --git a/js/dist/tooltip.js.map b/js/dist/tooltip.js.map index 089bef4ad9..16e875bc1c 100644 --- a/js/dist/tooltip.js.map +++ b/js/dist/tooltip.js.map @@ -1 +1 @@ -{"version":3,"sources":["js/src/tooltip.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,OAAO,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AAStB,MAAM,IAAI,GAAkB,SAAS,CAAA;AACrC,MAAM,OAAO,GAAe,OAAO,CAAA;AACnC,MAAM,QAAQ,GAAc,YAAY,CAAA;AACxC,MAAM,kBAAkB,GAAI,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;AACtC,MAAM,mBAAmB,GAAG,GAAG,CAAA;AAC/B,MAAM,YAAY,GAAU,WAAW,CAAA;;AAEvC,MAAM,OAAO,GAAG;AACd,aAAS,EAAK,IAAI;AAClB,YAAQ,EAAM,sCAAsC,GACtC,mCAAmC,GACnC,yCAAyC;AACvD,WAAO,EAAO,aAAa;AAC3B,SAAK,EAAS,EAAE;AAChB,SAAK,EAAS,CAAC;AACf,QAAI,EAAU,KAAK;AACnB,YAAQ,EAAM,KAAK;AACnB,aAAS,EAAK,KAAK;AACn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C,IAAI,CAAC,CAAC,WAAW,GAAG,OAAO,CAAA;AAChC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,OAAO,CAAC,gBAAgB,CAAA;GAChC,CAAA;;AAED,SAAO,OAAO,CAAA;CAEf,CAAA,CAAE,MAAM,CAAC,CAAA","file":"js/src/tooltip.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Tooltip = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'tooltip'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.tooltip'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n const CLASS_PREFIX = 'bs-tether'\n\n const Default = {\n animation : true,\n template : '<div class=\"tooltip\" role=\"tooltip\">'\n + '<div class=\"tooltip-arrow\"></div>'\n + '<div class=\"tooltip-inner\"></div></div>',\n trigger : 'hover focus',\n title : '',\n delay : 0,\n html : false,\n selector : false,\n placement : 'top',\n offset : '0 0',\n constraints : null\n }\n\n const AttachmentMap = {\n TOP : 'bottom center',\n RIGHT : 'middle left',\n BOTTOM : 'top center',\n LEFT : 'middle right'\n }\n\n const HoverState = {\n IN : 'in',\n OUT : 'out'\n }\n\n const Event = {\n HIDE : 'hide.bs.tooltip',\n HIDDEN : 'hidden.bs.tooltip',\n SHOW : 'show.bs.tooltip',\n SHOWN : 'shown.bs.tooltip',\n INSERTED : 'inserted.bs.tooltip',\n CLICK : 'click.bs.tooltip',\n FOCUSIN : 'focusin.bs.tooltip',\n FOCUSOUT : 'focusout.bs.tooltip',\n MOUSEENTER : 'mouseenter.bs.tooltip',\n MOUSELEAVE : 'mouseleave.bs.tooltip'\n }\n\n const ClassName = {\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n TOOLTIP : '.tooltip',\n TOOLTIP_INNER : '.tooltip-inner',\n }\n\n const TetherClass = {\n element : false,\n enabled : false\n }\n\n const Trigger = {\n HOVER : 'hover',\n FOCUS : 'focus',\n CLICK : 'click',\n MANUAL : 'manual'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Tooltip {\n\n constructor(element, config) {\n\n // private\n this._isEnabled = true\n this._timeout = 0\n this._hoverState = ''\n this._activeTrigger = {}\n this._tether = null\n\n // protected\n this.element = element\n this.config = this._getConfig(config)\n this.tip = null\n\n this._setListeners()\n\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n\n\n // public\n\n enable() {\n this._isEnabled = true\n }\n\n disable() {\n this._isEnabled = false\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled\n }\n\n toggle(event) {\n let context = this\n let dataKey = this.constructor.DATA_KEY\n\n if (event) {\n context = $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n context._activeTrigger.click = !context._activeTrigger.click\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context)\n } else {\n context._leave(null, context)\n }\n\n } else {\n $(context.getTipElement()).hasClass(ClassName.IN) ?\n context._leave(null, context) :\n context._enter(null, context)\n }\n }\n\n destroy() {\n clearTimeout(this._timeout)\n this.hide(() => {\n $(this.element)\n .off(`.${this.constructor.NAME}`)\n .removeData(this.constructor.DATA_KEY)\n\n if (this.tip) {\n $(this.tip).detach()\n }\n\n this.tip = null\n })\n }\n\n show() {\n let showEvent = $.Event(this.constructor.Event.SHOW)\n\n if (this.isWithContent() && this._isEnabled) {\n $(this.element).trigger(showEvent)\n\n let isInTheDom = $.contains(\n this.element.ownerDocument.documentElement,\n this.element\n )\n\n if (showEvent.isDefaultPrevented() || !isInTheDom) {\n return\n }\n\n let tip = this.getTipElement()\n let tipId = Util.getUID(this.constructor.NAME)\n\n tip.setAttribute('id', tipId)\n this.element.setAttribute('aria-describedby', tipId)\n\n this.setContent()\n\n if (this.config.animation) {\n $(tip).addClass(ClassName.FADE)\n }\n\n let placement = typeof this.config.placement === 'function' ?\n this.config.placement.call(this, tip, this.element) :\n this.config.placement\n\n let attachment = this._getAttachment(placement)\n\n $(tip)\n .data(this.constructor.DATA_KEY, this)\n .appendTo(document.body)\n\n $(this.element).trigger(this.constructor.Event.INSERTED)\n\n this._tether = new Tether({\n element : tip,\n target : this.element,\n attachment : attachment,\n classes : TetherClass,\n classPrefix : CLASS_PREFIX,\n offset : this.config.offset,\n constraints : this.config.constraints\n })\n\n Util.reflow(tip)\n this._tether.position()\n\n $(tip).addClass(ClassName.IN)\n\n let complete = () => {\n let prevHoverState = this._hoverState\n this._hoverState = null\n\n $(this.element).trigger(this.constructor.Event.SHOWN)\n\n if (prevHoverState === HoverState.OUT) {\n this._leave(null, this)\n }\n }\n\n Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE) ?\n $(this.tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(Tooltip._TRANSITION_DURATION) :\n complete()\n }\n }\n\n hide(callback) {\n let tip = this.getTipElement()\n let hideEvent = $.Event(this.constructor.Event.HIDE)\n let complete = () => {\n if (this._hoverState !== HoverState.IN && tip.parentNode) {\n tip.parentNode.removeChild(tip)\n }\n\n this.element.removeAttribute('aria-describedby')\n $(this.element).trigger(this.constructor.Event.HIDDEN)\n this.cleanupTether()\n\n if (callback) {\n callback()\n }\n }\n\n $(this.element).trigger(hideEvent)\n\n if (hideEvent.isDefaultPrevented()) {\n return\n }\n\n $(tip).removeClass(ClassName.IN)\n\n if (Util.supportsTransitionEnd() &&\n ($(this.tip).hasClass(ClassName.FADE))) {\n\n $(tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n } else {\n complete()\n }\n\n this._hoverState = ''\n }\n\n\n // protected\n\n isWithContent() {\n return !!this.getTitle()\n }\n\n getTipElement() {\n return (this.tip = this.tip || $(this.config.template)[0])\n }\n\n setContent() {\n let tip = this.getTipElement()\n let title = this.getTitle()\n let method = this.config.html ? 'innerHTML' : 'innerText'\n\n $(tip).find(Selector.TOOLTIP_INNER)[0][method] = title\n\n $(tip)\n .removeClass(ClassName.FADE)\n .removeClass(ClassName.IN)\n\n this.cleanupTether()\n }\n\n getTitle() {\n let title = this.element.getAttribute('data-original-title')\n\n if (!title) {\n title = typeof this.config.title === 'function' ?\n this.config.title.call(this.element) :\n this.config.title\n }\n\n return title\n }\n\n cleanupTether() {\n if (this._tether) {\n this._tether.destroy()\n\n // clean up after tether's junk classes\n // remove after they fix issue\n // (https://github.com/HubSpot/tether/issues/36)\n $(this.element).removeClass(this._removeTetherClasses)\n $(this.tip).removeClass(this._removeTetherClasses)\n }\n }\n\n\n // private\n\n _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()]\n }\n\n _setListeners() {\n let triggers = this.config.trigger.split(' ')\n\n triggers.forEach((trigger) => {\n if (trigger === 'click') {\n $(this.element).on(\n this.constructor.Event.CLICK,\n this.config.selector,\n this.toggle.bind(this)\n )\n\n } else if (trigger !== Trigger.MANUAL) {\n let eventIn = trigger == Trigger.HOVER ?\n this.constructor.Event.MOUSEENTER :\n this.constructor.Event.FOCUSIN\n let eventOut = trigger == Trigger.HOVER ?\n this.constructor.Event.MOUSELEAVE :\n this.constructor.Event.FOCUSOUT\n\n $(this.element)\n .on(\n eventIn,\n this.config.selector,\n this._enter.bind(this)\n )\n .on(\n eventOut,\n this.config.selector,\n this._leave.bind(this)\n )\n }\n })\n\n if (this.config.selector) {\n this.config = $.extend({}, this.config, {\n trigger : 'manual',\n selector : ''\n })\n } else {\n this._fixTitle()\n }\n }\n\n _removeTetherClasses(i, css) {\n return ((css.baseVal || css).match(\n new RegExp(`(^|\\\\s)${CLASS_PREFIX}-\\\\S+`, 'g')) || []\n ).join(' ')\n }\n\n _fixTitle() {\n let titleType = typeof this.element.getAttribute('data-original-title')\n if (this.element.getAttribute('title') ||\n (titleType !== 'string')) {\n this.element.setAttribute(\n 'data-original-title',\n this.element.getAttribute('title') || ''\n )\n this.element.setAttribute('title', '')\n }\n }\n\n _enter(event, context) {\n let dataKey = this.constructor.DATA_KEY\n\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type == 'focusin' ? Trigger.FOCUS : Trigger.HOVER\n ] = true\n }\n\n if ($(context.getTipElement()).hasClass(ClassName.IN) ||\n (context._hoverState === HoverState.IN)) {\n context._hoverState = HoverState.IN\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HoverState.IN\n\n if (!context.config.delay || !context.config.delay.show) {\n context.show()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HoverState.IN) {\n context.show()\n }\n }, context.config.delay.show)\n }\n\n _leave(event, context) {\n let dataKey = this.constructor.DATA_KEY\n\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type == 'focusout' ? Trigger.FOCUS : Trigger.HOVER\n ] = false\n }\n\n if (context._isWithActiveTrigger()) {\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HoverState.OUT\n\n if (!context.config.delay || !context.config.delay.hide) {\n context.hide()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HoverState.OUT) {\n context.hide()\n }\n }, context.config.delay.hide)\n }\n\n _isWithActiveTrigger() {\n for (let trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true\n }\n }\n\n return false\n }\n\n _getConfig(config) {\n config = $.extend(\n {},\n this.constructor.Default,\n $(this.element).data(),\n config\n )\n\n if (config.delay && typeof config.delay === 'number') {\n config.delay = {\n show : config.delay,\n hide : config.delay\n }\n }\n\n return config\n }\n\n _getDelegateConfig() {\n let config = {}\n\n if (this.config) {\n for (let key in this.config) {\n let value = this.config[key]\n if (this.constructor.Default[key] !== value) {\n config[key] = value\n }\n }\n }\n\n return config\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = typeof config === 'object' ?\n config : null\n\n if (!data && /destroy|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Tooltip(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n data[config]()\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Tooltip._jQueryInterface\n $.fn[NAME].Constructor = Tooltip\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tooltip._jQueryInterface\n }\n\n return Tooltip\n\n})(jQuery)\n\nexport default Tooltip\n"]}
\ No newline at end of file +{"version":3,"sources":["js/src/tooltip.js"],"names":[],"mappings":";;;;;;;;;;;;;AAUA,IAAM,OAAO,GAAG,CAAC,UAAC,CAAC,EAAK;;;;;;;;AAStB,MAAM,IAAI,GAAkB,SAAS,CAAA;AACrC,MAAM,OAAO,GAAe,OAAO,CAAA;AACnC,MAAM,QAAQ,GAAc,YAAY,CAAA;AACxC,MAAM,kBAAkB,GAAI,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;AACtC,MAAM,mBAAmB,GAAG,GAAG,CAAA;AAC/B,MAAM,YAAY,GAAU,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,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;WAC7B;;AAED,cAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;AAC9B,gBAAI,CAAC,MAAM,CAAC,EAAE,CAAA;WACf;SACF,CAAC,CAAA;OACH;;;WA9dG,OAAO;;;;;;;;;AAyeb,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAe,OAAO,CAAC,gBAAgB,CAAA;AACjD,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,GAAG,OAAO,CAAA;AAChC,GAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,GAAI,YAAY;AACnC,KAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAA;AAC/B,WAAO,OAAO,CAAC,gBAAgB,CAAA;GAChC,CAAA;;AAED,SAAO,OAAO,CAAA;CAEf,CAAA,CAAE,MAAM,CAAC,CAAA","file":"js/src/tooltip.js","sourcesContent":["import Util from './util'\n\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v4.0.0): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst Tooltip = (($) => {\n\n\n /**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\n const NAME = 'tooltip'\n const VERSION = '4.0.0'\n const DATA_KEY = 'bs.tooltip'\n const JQUERY_NO_CONFLICT = $.fn[NAME]\n const TRANSITION_DURATION = 150\n const CLASS_PREFIX = 'bs-tether'\n\n const Default = {\n animation : true,\n template : '<div class=\"tooltip\" role=\"tooltip\">'\n + '<div class=\"tooltip-arrow\"></div>'\n + '<div class=\"tooltip-inner\"></div></div>',\n trigger : 'hover focus',\n title : '',\n delay : 0,\n html : false,\n selector : false,\n placement : 'top',\n offset : '0 0',\n constraints : null\n }\n\n const AttachmentMap = {\n TOP : 'bottom center',\n RIGHT : 'middle left',\n BOTTOM : 'top center',\n LEFT : 'middle right'\n }\n\n const HoverState = {\n IN : 'in',\n OUT : 'out'\n }\n\n const Event = {\n HIDE : 'hide.bs.tooltip',\n HIDDEN : 'hidden.bs.tooltip',\n SHOW : 'show.bs.tooltip',\n SHOWN : 'shown.bs.tooltip',\n INSERTED : 'inserted.bs.tooltip',\n CLICK : 'click.bs.tooltip',\n FOCUSIN : 'focusin.bs.tooltip',\n FOCUSOUT : 'focusout.bs.tooltip',\n MOUSEENTER : 'mouseenter.bs.tooltip',\n MOUSELEAVE : 'mouseleave.bs.tooltip'\n }\n\n const ClassName = {\n FADE : 'fade',\n IN : 'in'\n }\n\n const Selector = {\n TOOLTIP : '.tooltip',\n TOOLTIP_INNER : '.tooltip-inner'\n }\n\n const TetherClass = {\n element : false,\n enabled : false\n }\n\n const Trigger = {\n HOVER : 'hover',\n FOCUS : 'focus',\n CLICK : 'click',\n MANUAL : 'manual'\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\n class Tooltip {\n\n constructor(element, config) {\n\n // private\n this._isEnabled = true\n this._timeout = 0\n this._hoverState = ''\n this._activeTrigger = {}\n this._tether = null\n\n // protected\n this.element = element\n this.config = this._getConfig(config)\n this.tip = null\n\n this._setListeners()\n\n }\n\n\n // getters\n\n static get VERSION() {\n return VERSION\n }\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get DATA_KEY() {\n return DATA_KEY\n }\n\n static get Event() {\n return Event\n }\n\n\n\n // public\n\n enable() {\n this._isEnabled = true\n }\n\n disable() {\n this._isEnabled = false\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled\n }\n\n toggle(event) {\n let context = this\n let dataKey = this.constructor.DATA_KEY\n\n if (event) {\n context = $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n context._activeTrigger.click = !context._activeTrigger.click\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context)\n } else {\n context._leave(null, context)\n }\n\n } else {\n $(context.getTipElement()).hasClass(ClassName.IN) ?\n context._leave(null, context) :\n context._enter(null, context)\n }\n }\n\n destroy() {\n clearTimeout(this._timeout)\n this.hide(() => {\n $(this.element)\n .off(`.${this.constructor.NAME}`)\n .removeData(this.constructor.DATA_KEY)\n\n if (this.tip) {\n $(this.tip).detach()\n }\n\n this.tip = null\n })\n }\n\n show() {\n let showEvent = $.Event(this.constructor.Event.SHOW)\n\n if (this.isWithContent() && this._isEnabled) {\n $(this.element).trigger(showEvent)\n\n let isInTheDom = $.contains(\n this.element.ownerDocument.documentElement,\n this.element\n )\n\n if (showEvent.isDefaultPrevented() || !isInTheDom) {\n return\n }\n\n let tip = this.getTipElement()\n let tipId = Util.getUID(this.constructor.NAME)\n\n tip.setAttribute('id', tipId)\n this.element.setAttribute('aria-describedby', tipId)\n\n this.setContent()\n\n if (this.config.animation) {\n $(tip).addClass(ClassName.FADE)\n }\n\n let placement = typeof this.config.placement === 'function' ?\n this.config.placement.call(this, tip, this.element) :\n this.config.placement\n\n let attachment = this._getAttachment(placement)\n\n $(tip)\n .data(this.constructor.DATA_KEY, this)\n .appendTo(document.body)\n\n $(this.element).trigger(this.constructor.Event.INSERTED)\n\n this._tether = new Tether({\n element : tip,\n target : this.element,\n attachment : attachment,\n classes : TetherClass,\n classPrefix : CLASS_PREFIX,\n offset : this.config.offset,\n constraints : this.config.constraints\n })\n\n Util.reflow(tip)\n this._tether.position()\n\n $(tip).addClass(ClassName.IN)\n\n let complete = () => {\n let prevHoverState = this._hoverState\n this._hoverState = null\n\n $(this.element).trigger(this.constructor.Event.SHOWN)\n\n if (prevHoverState === HoverState.OUT) {\n this._leave(null, this)\n }\n }\n\n Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE) ?\n $(this.tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(Tooltip._TRANSITION_DURATION) :\n complete()\n }\n }\n\n hide(callback) {\n let tip = this.getTipElement()\n let hideEvent = $.Event(this.constructor.Event.HIDE)\n let complete = () => {\n if (this._hoverState !== HoverState.IN && tip.parentNode) {\n tip.parentNode.removeChild(tip)\n }\n\n this.element.removeAttribute('aria-describedby')\n $(this.element).trigger(this.constructor.Event.HIDDEN)\n this.cleanupTether()\n\n if (callback) {\n callback()\n }\n }\n\n $(this.element).trigger(hideEvent)\n\n if (hideEvent.isDefaultPrevented()) {\n return\n }\n\n $(tip).removeClass(ClassName.IN)\n\n if (Util.supportsTransitionEnd() &&\n ($(this.tip).hasClass(ClassName.FADE))) {\n\n $(tip)\n .one(Util.TRANSITION_END, complete)\n .emulateTransitionEnd(TRANSITION_DURATION)\n\n } else {\n complete()\n }\n\n this._hoverState = ''\n }\n\n\n // protected\n\n isWithContent() {\n return !!this.getTitle()\n }\n\n getTipElement() {\n return (this.tip = this.tip || $(this.config.template)[0])\n }\n\n setContent() {\n let tip = this.getTipElement()\n let title = this.getTitle()\n let method = this.config.html ? 'innerHTML' : 'innerText'\n\n $(tip).find(Selector.TOOLTIP_INNER)[0][method] = title\n\n $(tip)\n .removeClass(ClassName.FADE)\n .removeClass(ClassName.IN)\n\n this.cleanupTether()\n }\n\n getTitle() {\n let title = this.element.getAttribute('data-original-title')\n\n if (!title) {\n title = typeof this.config.title === 'function' ?\n this.config.title.call(this.element) :\n this.config.title\n }\n\n return title\n }\n\n cleanupTether() {\n if (this._tether) {\n this._tether.destroy()\n\n // clean up after tether's junk classes\n // remove after they fix issue\n // (https://github.com/HubSpot/tether/issues/36)\n $(this.element).removeClass(this._removeTetherClasses)\n $(this.tip).removeClass(this._removeTetherClasses)\n }\n }\n\n\n // private\n\n _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()]\n }\n\n _setListeners() {\n let triggers = this.config.trigger.split(' ')\n\n triggers.forEach((trigger) => {\n if (trigger === 'click') {\n $(this.element).on(\n this.constructor.Event.CLICK,\n this.config.selector,\n $.proxy(this.toggle, this)\n )\n\n } else if (trigger !== Trigger.MANUAL) {\n let eventIn = trigger == Trigger.HOVER ?\n this.constructor.Event.MOUSEENTER :\n this.constructor.Event.FOCUSIN\n let eventOut = trigger == Trigger.HOVER ?\n this.constructor.Event.MOUSELEAVE :\n this.constructor.Event.FOCUSOUT\n\n $(this.element)\n .on(\n eventIn,\n this.config.selector,\n $.proxy(this._enter, this)\n )\n .on(\n eventOut,\n this.config.selector,\n $.proxy(this._leave, this)\n )\n }\n })\n\n if (this.config.selector) {\n this.config = $.extend({}, this.config, {\n trigger : 'manual',\n selector : ''\n })\n } else {\n this._fixTitle()\n }\n }\n\n _removeTetherClasses(i, css) {\n return ((css.baseVal || css).match(\n new RegExp(`(^|\\\\s)${CLASS_PREFIX}-\\\\S+`, 'g')) || []\n ).join(' ')\n }\n\n _fixTitle() {\n let titleType = typeof this.element.getAttribute('data-original-title')\n if (this.element.getAttribute('title') ||\n (titleType !== 'string')) {\n this.element.setAttribute(\n 'data-original-title',\n this.element.getAttribute('title') || ''\n )\n this.element.setAttribute('title', '')\n }\n }\n\n _enter(event, context) {\n let dataKey = this.constructor.DATA_KEY\n\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type == 'focusin' ? Trigger.FOCUS : Trigger.HOVER\n ] = true\n }\n\n if ($(context.getTipElement()).hasClass(ClassName.IN) ||\n (context._hoverState === HoverState.IN)) {\n context._hoverState = HoverState.IN\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HoverState.IN\n\n if (!context.config.delay || !context.config.delay.show) {\n context.show()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HoverState.IN) {\n context.show()\n }\n }, context.config.delay.show)\n }\n\n _leave(event, context) {\n let dataKey = this.constructor.DATA_KEY\n\n context = context || $(event.currentTarget).data(dataKey)\n\n if (!context) {\n context = new this.constructor(\n event.currentTarget,\n this._getDelegateConfig()\n )\n $(event.currentTarget).data(dataKey, context)\n }\n\n if (event) {\n context._activeTrigger[\n event.type == 'focusout' ? Trigger.FOCUS : Trigger.HOVER\n ] = false\n }\n\n if (context._isWithActiveTrigger()) {\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HoverState.OUT\n\n if (!context.config.delay || !context.config.delay.hide) {\n context.hide()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HoverState.OUT) {\n context.hide()\n }\n }, context.config.delay.hide)\n }\n\n _isWithActiveTrigger() {\n for (let trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true\n }\n }\n\n return false\n }\n\n _getConfig(config) {\n config = $.extend(\n {},\n this.constructor.Default,\n $(this.element).data(),\n config\n )\n\n if (config.delay && typeof config.delay === 'number') {\n config.delay = {\n show : config.delay,\n hide : config.delay\n }\n }\n\n return config\n }\n\n _getDelegateConfig() {\n let config = {}\n\n if (this.config) {\n for (let key in this.config) {\n let value = this.config[key]\n if (this.constructor.Default[key] !== value) {\n config[key] = value\n }\n }\n }\n\n return config\n }\n\n\n // static\n\n static _jQueryInterface(config) {\n return this.each(function () {\n let data = $(this).data(DATA_KEY)\n let _config = typeof config === 'object' ?\n config : null\n\n if (!data && /destroy|hide/.test(config)) {\n return\n }\n\n if (!data) {\n data = new Tooltip(this, _config)\n $(this).data(DATA_KEY, data)\n }\n\n if (typeof config === 'string') {\n data[config]()\n }\n })\n }\n\n }\n\n\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = Tooltip._jQueryInterface\n $.fn[NAME].Constructor = Tooltip\n $.fn[NAME].noConflict = function () {\n $.fn[NAME] = JQUERY_NO_CONFLICT\n return Tooltip._jQueryInterface\n }\n\n return Tooltip\n\n})(jQuery)\n\nexport default Tooltip\n"]}
\ No newline at end of file diff --git a/js/src/carousel.js b/js/src/carousel.js index bce51d7fde..8c9b452478 100644 --- a/js/src/carousel.js +++ b/js/src/carousel.js @@ -139,7 +139,7 @@ const Carousel = (($) => { if (this._config.interval && !this._isPaused) { this._interval = setInterval( - this.next.bind(this), this._config.interval + $.proxy(this.next, this), this._config.interval ) } } @@ -177,14 +177,14 @@ const Carousel = (($) => { _addEventListeners() { if (this._config.keyboard) { $(this._element) - .on('keydown.bs.carousel', this._keydown.bind(this)) + .on('keydown.bs.carousel', $.proxy(this._keydown, this)) } if (this._config.pause == 'hover' && !('ontouchstart' in document.documentElement)) { $(this._element) - .on('mouseenter.bs.carousel', this.pause.bind(this)) - .on('mouseleave.bs.carousel', this.cycle.bind(this)) + .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) + .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) } } diff --git a/js/src/modal.js b/js/src/modal.js index b2e8fd77ff..300ea2a7f9 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -121,7 +121,7 @@ const Modal = (($) => { $(this._element).on( Event.DISMISS, Selector.DATA_DISMISS, - this.hide.bind(this) + $.proxy(this.hide, this) ) $(this._dialog).on(Event.MOUSEDOWN, () => { @@ -133,7 +133,7 @@ const Modal = (($) => { }) this._showBackdrop( - this._showElement.bind(this, relatedTarget) + $.proxy(this._showElement, this, relatedTarget) ) } @@ -166,7 +166,7 @@ const Modal = (($) => { ($(this._element).hasClass(ClassName.FADE))) { $(this._element) - .one(Util.TRANSITION_END, this._hideModal.bind(this)) + .one(Util.TRANSITION_END, $.proxy(this._hideModal, this)) .emulateTransitionEnd(TRANSITION_DURATION) } else { this._hideModal() @@ -241,7 +241,7 @@ const Modal = (($) => { _setResizeEvent() { if (this._isShown) { - $(window).on(Event.RESIZE, this._handleUpdate.bind(this)) + $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this)) } else { $(window).off(Event.RESIZE) } diff --git a/js/src/scrollspy.js b/js/src/scrollspy.js index e41a3ae12c..763d133e83 100644 --- a/js/src/scrollspy.js +++ b/js/src/scrollspy.js @@ -62,7 +62,7 @@ const ScrollSpy = (($) => { this._activeTarget = null this._scrollHeight = 0 - $(this._scrollElement).on(Event.SCROLL, this._process.bind(this)) + $(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this)) this.refresh() this._process() diff --git a/js/src/tab.js b/js/src/tab.js index 4668ff9e69..f6b174ce2b 100644 --- a/js/src/tab.js +++ b/js/src/tab.js @@ -156,8 +156,14 @@ const Tab = (($) => { && ((active && $(active).hasClass(ClassName.FADE)) || !!$(container).find(Selector.FADE_CHILD)[0]) - let complete = this._transitionComplete.bind( - this, element, active, isTransitioning, callback) + let complete = $.proxy( + this._transitionComplete, + this, + element, + active, + isTransitioning, + callback + ) if (active && isTransitioning) { $(active) diff --git a/js/src/tooltip.js b/js/src/tooltip.js index a040851302..1bd018c0f7 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -373,7 +373,7 @@ const Tooltip = (($) => { $(this.element).on( this.constructor.Event.CLICK, this.config.selector, - this.toggle.bind(this) + $.proxy(this.toggle, this) ) } else if (trigger !== Trigger.MANUAL) { @@ -388,12 +388,12 @@ const Tooltip = (($) => { .on( eventIn, this.config.selector, - this._enter.bind(this) + $.proxy(this._enter, this) ) .on( eventOut, this.config.selector, - this._leave.bind(this) + $.proxy(this._leave, this) ) } }) diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index f3df4d8287..26c3224cf4 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -321,7 +321,7 @@ $(function () { var $target = $('<a href="#" rel="tooltip" title="very very very very very very very very long tooltip in one line"/>') .appendTo($container) .bootstrapTooltip({ - placement: 'right', + placement: 'right' }) .bootstrapTooltip('show') diff --git a/package.json b/package.json index 5e062297ff..5599e0fadf 100644 --- a/package.json +++ b/package.json @@ -55,11 +55,13 @@ "grunt-html": "~4.0.1", "grunt-jekyll": "~0.4.2", "grunt-jscs": "~1.8.0", + "grunt-line-remover": "0.0.2", "grunt-postcss": "^0.3.0", "grunt-sass": "^1.0.0", "grunt-saucelabs": "~8.6.0", "grunt-scss-lint": "^0.3.4", "grunt-sed": "~0.1.1", + "grunt-stamp": "^0.1.0", "load-grunt-tasks": "~3.1.0", "markdown-it": "^4.0.1", "mq4-hover-shim": "^0.1.0", |