/*! * bootstrap v3.3.7 (http://getbootstrap.com) * copyright 2011-2016 twitter, inc. * licensed under the mit license */ if (typeof jquery === 'undefined') { throw new error('bootstrap\'s javascript requires jquery') } +function ($) { 'use strict'; var version = $.fn.jquery.split(' ')[0].split('.'); if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) { throw new error('bootstrap\'s javascript requires jquery version 1.9.1 or higher, but lower than version 4') } }(jquery); /* ======================================================================== * bootstrap: transition.js v3.3.7 * http://getbootstrap.com/javascript/#transitions * ======================================================================== * copyright 2011-2016 twitter, inc. * licensed under mit (https://github.com/twbs/bootstrap/blob/master/license) * ======================================================================== */ +function ($) { 'use strict'; // css transition support (shoutout: http://www.modernizr.com/) // ============================================================ function transitionend() { var el = document.createelement('bootstrap'); var transendeventnames = { webkittransition : 'webkittransitionend', moztransition : 'transitionend', otransition : 'otransitionend otransitionend', transition : 'transitionend' }; for (var name in transendeventnames) { if (el.style[name] !== undefined) { return { end: transendeventnames[name] } } } return false // explicit for ie8 ( ._.) } // 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 }; $(function () { $.support.transition = transitionend(); if (!$.support.transition) return; $.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) } } }) }(jquery); /* ======================================================================== * bootstrap: alert.js v3.3.7 * http://getbootstrap.com/javascript/#alerts * ======================================================================== * copyright 2011-2016 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) }; alert.version = '3.3.7'; alert.transition_duration = 150; alert.prototype.close = function (e) { var $this = $(this); var selector = $this.attr('data-target'); if (!selector) { selector = $this.attr('href'); selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 } var $parent = $(selector === '#' ? [] : selector); if (e) e.preventdefault(); if (!$parent.length) { $parent = $this.closest('.alert') } $parent.trigger(e = $.event('close.bs.alert')); if (e.isdefaultprevented()) return; $parent.removeclass('in'); function removeelement() { // detach from parent, fire event then clean up data $parent.detach().trigger('closed.bs.alert').remove() } $.support.transition && $parent.hasclass('fade') ? $parent .one('bstransitionend', removeelement) .emulatetransitionend(alert.transition_duration) : removeelement() }; // alert plugin definition // ======================= function plugin(option) { return this.each(function () { var $this = $(this); var data = $this.data('bs.alert'); if (!data) $this.data('bs.alert', (data = new alert(this))); if (typeof option == 'string') data[option].call($this) }) } var old = $.fn.alert; $.fn.alert = plugin; $.fn.alert.constructor = alert; // alert no conflict // ================= $.fn.alert.noconflict = function () { $.fn.alert = old; return this }; // alert data-api // ============== $(document).on('click.bs.alert.data-api', dismiss, alert.prototype.close) }(jquery); /* ======================================================================== * bootstrap: button.js v3.3.7 * http://getbootstrap.com/javascript/#buttons * ======================================================================== * copyright 2011-2016 twitter, inc. * 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.7'; button.defaults = { loadingtext: 'loading...' }; button.prototype.setstate = function (state) { var d = 'disabled'; var $el = this.$element; var val = $el.is('input') ? 'val' : 'html'; var data = $el.data(); state += 'text'; if (data.resettext == null) $el.data('resettext', $el[val]()); // push to event loop to allow forms to submit settimeout($.proxy(function () { $el[val](data[state] == null ? this.options[state] : data[state]); if (state == 'loadingtext') { this.isloading = true; $el.addclass(d).attr(d, d).prop(d, true) } else if (this.isloading) { this.isloading = false; $el.removeclass(d).removeattr(d).prop(d, false) } }, this), 0) }; 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; if (!data) $this.data('bs.button', (data = new button(this, options))); if (option == 'toggle') data.toggle(); else if (option) data.setstate(option) }) } var old = $.fn.button; $.fn.button = plugin; $.fn.button.constructor = button; // button no conflict // ================== $.fn.button.noconflict = function () { $.fn.button = old; return this }; // button data-api // =============== $(document) .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { var $btn = $(e.target).closest('.btn'); plugin.call($btn, 'toggle'); if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) { // prevent double click on radios, and the double selections (so cancellation) on checkboxes e.preventdefault(); // the target component still receive the focus if ($btn.is('input,button')) $btn.trigger('focus'); else $btn.find('input:visible,button:visible').first().trigger('focus') } }) .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)) }) }(jquery); /* ======================================================================== * bootstrap: carousel.js v3.3.7 * http://getbootstrap.com/javascript/#carousel * ======================================================================== * copyright 2011-2016 twitter, inc. * 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.7'; 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 } e.preventdefault() }; carousel.prototype.cycle = function (e) { e || (this.paused = false); this.interval && clearinterval(this.interval); this.options.interval && !this.paused && (this.interval = setinterval($.proxy(this.next, this), this.options.interval)); return this }; carousel.prototype.getitemindex = function (item) { this.$items = item.parent().children('.item'); return this.$items.index(item || this.$active) }; 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) }; carousel.prototype.to = function (pos) { var that = this; var activeindex = this.getitemindex(this.$active = this.$element.find('.item.active')); if (pos > (this.$items.length - 1) || pos < 0) return; if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }); // yes, "slid" if (activeindex == pos) return this.pause().cycle(); return this.slide(pos > activeindex ? 'next' : 'prev', this.$items.eq(pos)) }; carousel.prototype.pause = function (e) { e || (this.paused = true); if (this.$element.find('.next, .prev').length && $.support.transition) { this.$element.trigger($.support.transition.end); this.cycle(true) } 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); var relatedtarget = $next[0]; var slideevent = $.event('slide.bs.carousel', { relatedtarget: relatedtarget, direction: direction }); this.$element.trigger(slideevent); if (slideevent.isdefaultprevented()) return; this.sliding = true; iscycling && this.pause(); if (this.$indicators.length) { this.$indicators.find('.active').removeclass('active'); var $nextindicator = $(this.$indicators.children()[this.getitemindex($next)]); $nextindicator && $nextindicator.addclass('active') } 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) } iscycling && this.cycle(); 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() }) } var old = $.fn.carousel; $.fn.carousel = plugin; $.fn.carousel.constructor = carousel; // carousel no conflict // ==================== $.fn.carousel.noconflict = function () { $.fn.carousel = old; return this }; // carousel data-api // ================= 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; plugin.call($target, options); if (slideindex) { $target.data('bs.carousel').to(slideindex) } e.preventdefault() }; $(document) .on('click.bs.carousel.data-api', '[data-slide]', clickhandler) .on('click.bs.carousel.data-api', '[data-slide-to]', clickhandler); $(window).on('load', function () { $('[data-ride="carousel"]').each(function () { var $carousel = $(this); plugin.call($carousel, $carousel.data()) }) }) }(jquery); /* ======================================================================== * bootstrap: collapse.js v3.3.7 * http://getbootstrap.com/javascript/#collapse * ======================================================================== * copyright 2011-2016 twitter, inc. * licensed under mit (https://github.com/twbs/bootstrap/blob/master/license) * ======================================================================== */ /* jshint latedef: false */ +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) } if (this.options.toggle) this.toggle() }; collapse.version = '3.3.7'; collapse.transition_duration = 350; collapse.defaults = { toggle: true }; collapse.prototype.dimension = function () { var haswidth = this.$element.hasclass('width'); return haswidth ? 'width' : 'height' }; collapse.prototype.show = function () { if (this.transitioning || this.$element.hasclass('in')) return; var activesdata; var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing'); if (actives && actives.length) { activesdata = actives.data('bs.collapse'); if (activesdata && activesdata.transitioning) return } var startevent = $.event('show.bs.collapse'); this.$element.trigger(startevent); if (startevent.isdefaultprevented()) return; if (actives && actives.length) { plugin.call(actives, 'hide'); activesdata || actives.data('bs.collapse', null) } var dimension = this.dimension(); this.$element .removeclass('collapse') .addclass('collapsing')[dimension](0) .attr('aria-expanded', true); this.$trigger .removeclass('collapsed') .attr('aria-expanded', true); this.transitioning = 1; var complete = function () { this.$element .removeclass('collapsing') .addclass('collapse in')[dimension](''); this.transitioning = 0; this.$element .trigger('shown.bs.collapse') }; if (!$.support.transition) return complete.call(this); var scrollsize = $.camelcase(['scroll', dimension].join('-')); this.$element .one('bstransitionend', $.proxy(complete, this)) .emulatetransitionend(collapse.transition_duration)[dimension](this.$element[0][scrollsize]) }; collapse.prototype.hide = function () { if (this.transitioning || !this.$element.hasclass('in')) return; var startevent = $.event('hide.bs.collapse'); this.$element.trigger(startevent); if (startevent.isdefaultprevented()) return; var dimension = this.dimension(); this.$element[dimension](this.$element[dimension]())[0].offsetheight; this.$element .addclass('collapsing') .removeclass('collapse in') .attr('aria-expanded', false); this.$trigger .addclass('collapsed') .attr('aria-expanded', false); this.transitioning = 1; var complete = function () { this.transitioning = 0; this.$element .removeclass('collapsing') .addclass('collapse') .trigger('hidden.bs.collapse') }; if (!$.support.transition) return complete.call(this); this.$element [dimension](0) .one('bstransitionend', $.proxy(complete, this)) .emulatetransitionend(collapse.transition_duration) }; collapse.prototype.toggle = function () { this[this.$element.hasclass('in') ? 'hide' : 'show']() }; 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() }; collapse.prototype.addariaandcollapsedclass = function ($element, $trigger) { var isopen = $element.hasclass('in'); $element.attr('aria-expanded', isopen); $trigger .toggleclass('collapsed', !isopen) .attr('aria-expanded', isopen) }; function gettargetfromtrigger($trigger) { var href; var target = $trigger.attr('data-target') || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, ''); // strip for ie7 return $(target) } // collapse plugin definition // ========================== 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); 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]() }) } var old = $.fn.collapse; $.fn.collapse = plugin; $.fn.collapse.constructor = collapse; // collapse no conflict // ==================== $.fn.collapse.noconflict = function () { $.fn.collapse = old; return this }; // collapse data-api // ================= $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { var $this = $(this); if (!$this.attr('data-target')) e.preventdefault(); var $target = gettargetfromtrigger($this); var data = $target.data('bs.collapse'); var option = data ? 'toggle' : $this.data(); plugin.call($target, option) }) }(jquery); /* ======================================================================== * bootstrap: dropdown.js v3.3.7 * http://getbootstrap.com/javascript/#dropdowns * ======================================================================== * copyright 2011-2016 twitter, inc. * licensed under mit (https://github.com/twbs/bootstrap/blob/master/license) * ======================================================================== */ +function ($) { 'use strict'; // dropdown class definition // ========================= var backdrop = '.dropdown-backdrop'; var toggle = '[data-toggle="dropdown"]'; var dropdown = function (element) { $(element).on('click.bs.dropdown', this.toggle) }; dropdown.version = '3.3.7'; function getparent($this) { var selector = $this.attr('data-target'); if (!selector) { selector = $this.attr('href'); selector = selector && /#[a-za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 } var $parent = selector && $(selector); return $parent && $parent.length ? $parent : $this.parent() } 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 }; if (!$parent.hasclass('open')) return; if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagname) && $.contains($parent[0], e.target)) return; $parent.trigger(e = $.event('hide.bs.dropdown', relatedtarget)); if (e.isdefaultprevented()) return; $this.attr('aria-expanded', 'false'); $parent.removeclass('open').trigger($.event('hidden.bs.dropdown', relatedtarget)) }) } dropdown.prototype.toggle = function (e) { var $this = $(this); if ($this.is('.disabled, :disabled')) return; var $parent = getparent($this); var isactive = $parent.hasclass('open'); clearmenus(); 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) } 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($.event('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('.dropdown-menu' + desc); if (!$items.length) return; var index = $items.index(e.target); if (e.which == 38 && index > 0) index--; // up if (e.which == 40 && index < $items.length - 1) index++; // down if (!~index) index = 0; $items.eq(index).trigger('focus') }; // dropdown plugin definition // ========================== function plugin(option) { return this.each(function () { var $this = $(this); var data = $this.data('bs.dropdown'); if (!data) $this.data('bs.dropdown', (data = new dropdown(this))); if (typeof option == 'string') data[option].call($this) }) } var old = $.fn.dropdown; $.fn.dropdown = plugin; $.fn.dropdown.constructor = dropdown; // dropdown no conflict // ==================== $.fn.dropdown.noconflict = function () { $.fn.dropdown = old; return this }; // apply to standard dropdown elements // =================================== $(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) }(jquery); /* ======================================================================== * bootstrap: modal.js v3.3.7 * http://getbootstrap.com/javascript/#modals * ======================================================================== * copyright 2011-2016 twitter, inc. * 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)) } }; modal.version = '3.3.7'; modal.transition_duration = 300; modal.backdrop_transition_duration = 150; modal.defaults = { backdrop: true, keyboard: true, show: true }; modal.prototype.toggle = function (_relatedtarget) { return this.isshown ? this.hide() : this.show(_relatedtarget) }; modal.prototype.show = function (_relatedtarget) { var that = this; var e = $.event('show.bs.modal', { relatedtarget: _relatedtarget }); this.$element.trigger(e); if (this.isshown || e.isdefaultprevented()) return; this.isshown = true; this.checkscrollbar(); this.setscrollbar(); this.$body.addclass('modal-open'); this.escape(); this.resize(); this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)); 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.backdrop(function () { var transition = $.support.transition && that.$element.hasclass('fade'); if (!that.$element.parent().length) { that.$element.appendto(that.$body) // don't move modals dom position } that.$element .show() .scrolltop(0); that.adjustdialog(); if (transition) { that.$element[0].offsetwidth // force reflow } that.$element.addclass('in'); that.enforcefocus(); var e = $.event('shown.bs.modal', { relatedtarget: _relatedtarget }); 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) }) }; modal.prototype.hide = function (e) { if (e) e.preventdefault(); e = $.event('hide.bs.modal'); this.$element.trigger(e); if (!this.isshown || e.isdefaultprevented()) return; this.isshown = false; this.escape(); this.resize(); $(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'); $.support.transition && this.$element.hasclass('fade') ? this.$element .one('bstransitionend', $.proxy(this.hidemodal, this)) .emulatetransitionend(modal.transition_duration) : this.hidemodal() }; modal.prototype.enforcefocus = function () { $(document) .off('focusin.bs.modal') // guard against infinite focus loop .on('focusin.bs.modal', $.proxy(function (e) { if (document !== e.target && this.$element[0] !== e.target && !this.$element.has(e.target).length) { this.$element.trigger('focus') } }, 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') } }; modal.prototype.resize = function () { if (this.isshown) { $(window).on('resize.bs.modal', $.proxy(this.handleupdate, this)) } else { $(window).off('resize.bs.modal') } }; 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') }) }; 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' : ''; if (this.isshown && this.options.backdrop) { var doanimate = $.support.transition && animate; this.$backdrop = $(document.createelement('div')) .addclass('modal-backdrop ' + animate) .appendto(this.$body); this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { if (this.ignorebackdropclick) { this.ignorebackdropclick = false; 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 this.$backdrop.addclass('in'); if (!callback) return; doanimate ? this.$backdrop .one('bstransitionend', callback) .emulatetransitionend(modal.backdrop_transition_duration) : callback() } else if (!this.isshown && this.$backdrop) { this.$backdrop.removeclass('in'); var callbackremove = function () { that.removebackdrop(); callback && callback() }; $.support.transition && this.$element.hasclass('fade') ? this.$backdrop .one('bstransitionend', callbackremove) .emulatetransitionend(modal.backdrop_transition_duration) : callbackremove() } else if (callback) { callback() } }; // these following methods are used to handle overflowing modals modal.prototype.handleupdate = function () { this.adjustdialog() }; modal.prototype.adjustdialog = function () { var modalisoverflowing = this.$element[0].scrollheight > document.documentelement.clientheight; this.$element.css({ paddingleft: !this.bodyisoverflowing && modalisoverflowing ? this.scrollbarwidth : '', paddingright: this.bodyisoverflowing && !modalisoverflowing ? this.scrollbarwidth : '' }) }; modal.prototype.resetadjustments = function () { this.$element.css({ paddingleft: '', paddingright: '' }) }; 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() }; 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) }; 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 }; // modal plugin definition // ======================= 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); 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) }) } var old = $.fn.modal; $.fn.modal = plugin; $.fn.modal.constructor = modal; // modal no conflict // ================= $.fn.modal.noconflict = function () { $.fn.modal = old; return this }; // modal data-api // ============== $(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()); if ($this.is('a')) e.preventdefault(); $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) }) }(jquery); /* ======================================================================== * bootstrap: tooltip.js v3.3.7 * http://getbootstrap.com/javascript/#tooltip * inspired by the original jquery.tipsy by jason frame * ======================================================================== * copyright 2011-2016 twitter, inc. * licensed under mit (https://github.com/twbs/bootstrap/blob/master/license) * ======================================================================== */ +function ($) { 'use strict'; // tooltip public class definition // =============================== 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.init('tooltip', element, options) }; tooltip.version = '3.3.7'; tooltip.transition_duration = 150; tooltip.defaults = { animation: true, placement: 'top', selector: false, template: '