/*! * Bootstrap.js by @fat & @mdo * Copyright 2012 Twitter, Inc. * http://www.apache.org/licenses/LICENSE-2.0.txt */ !function (e) { "use strict"; e(function () { e.support.transition = function () { var e = function () { var e = document.createElement("bootstrap"), t = {WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd otransitionend", transition: "transitionend"}, n; for (n in t) { if (e.style[n] !== undefined) { return t[n] } } }(); return e && {end: e} }() }) }(window.jQuery); !function (e) { "use strict"; var t = '[data-dismiss="alert"]', n = function (n) { e(n).on("click", t, this.close) }; n.prototype.close = function (t) { function s() { i.trigger("closed").remove() } var n = e(this), r = n.attr("data-target"), i; if (!r) { r = n.attr("href"); r = r && r.replace(/.*(?=#[^\s]*$)/, "") } i = e(r); t && t.preventDefault(); i.length || (i = n.hasClass("alert") ? n : n.parent()); i.trigger(t = e.Event("close")); if (t.isDefaultPrevented())return; i.removeClass("in"); e.support.transition && i.hasClass("fade") ? i.on(e.support.transition.end, s) : s() }; var r = e.fn.alert; e.fn.alert = function (t) { return this.each(function () { var r = e(this), i = r.data("alert"); if (!i)r.data("alert", i = new n(this)); if (typeof t == "string")i[t].call(r) }) }; e.fn.alert.Constructor = n; e.fn.alert.noConflict = function () { e.fn.alert = r; return this }; e(document).on("click.alert.data-api", t, n.prototype.close) }(window.jQuery); !function (e) { "use strict"; var t = function (t, n) { this.$element = e(t); this.options = e.extend({}, e.fn.button.defaults, n) }; t.prototype.setState = function (e) { var t = "disabled", n = this.$element, r = n.data(), i = n.is("input") ? "val" : "html"; e = e + "Text"; r.resetText || n.data("resetText", n[i]()); n[i](r[e] || this.options[e]); setTimeout(function () { e == "loadingText" ? n.addClass(t).attr(t, t) : n.removeClass(t).removeAttr(t) }, 0) }; t.prototype.toggle = function () { var e = this.$element.closest('[data-toggle="buttons-radio"]'); e && e.find(".active").removeClass("active"); this.$element.toggleClass("active") }; var n = e.fn.button; e.fn.button = function (n) { return this.each(function () { var r = e(this), i = r.data("button"), s = typeof n == "object" && n; if (!i)r.data("button", i = new t(this, s)); if (n == "toggle")i.toggle(); else if (n)i.setState(n) }) }; e.fn.button.defaults = {loadingText: "loading..."}; e.fn.button.Constructor = t; e.fn.button.noConflict = function () { e.fn.button = n; return this }; e(document).on("click.button.data-api", "[data-toggle^=button]", function (t) { var n = e(t.target); if (!n.hasClass("btn"))n = n.closest(".btn"); n.button("toggle") }) }(window.jQuery); !function (e) { "use strict"; var t = function (t, n) { this.$element = e(t); this.options = n; this.options.pause == "hover" && this.$element.on("mouseenter", e.proxy(this.pause, this)).on("mouseleave", e.proxy(this.cycle, this)) }; t.prototype = {cycle: function (t) { if (!t)this.paused = false; this.options.interval && !this.paused && (this.interval = setInterval(e.proxy(this.next, this), this.options.interval)); return this }, to: function (t) { var n = this.$element.find(".item.active"), r = n.parent().children(), i = r.index(n), s = this; if (t > r.length - 1 || t < 0)return; if (this.sliding) { return this.$element.one("slid", function () { s.to(t) }) } if (i == t) { return this.pause().cycle() } return this.slide(t > i ? "next" : "prev", e(r[t])) }, pause: function (t) { if (!t)this.paused = true; if (this.$element.find(".next, .prev").length && e.support.transition.end) { this.$element.trigger(e.support.transition.end); this.cycle() } clearInterval(this.interval); this.interval = null; return this }, next: function () { if (this.sliding)return; return this.slide("next") }, prev: function () { if (this.sliding)return; return this.slide("prev") }, slide: function (t, n) { if (!e.support.transition && this.$element.hasClass("slide")) { this.$element.find(".item").stop(true, true) } var r = this.$element.find(".item.active"), i = n || r[t](), s = this.interval, o = t == "next" ? "left" : "right", u = t == "next" ? "first" : "last", a = this, f; this.sliding = true; s && this.pause(); i = i.length ? i : this.$element.find(".item")[u](); f = e.Event("slide", {relatedTarget: i[0]}); if (i.hasClass("active"))return; if (e.support.transition && this.$element.hasClass("slide")) { this.$element.trigger(f); if (f.isDefaultPrevented())return; i.addClass(t); i[0].offsetWidth; r.addClass(o); i.addClass(o); this.$element.one(e.support.transition.end, function () { i.removeClass([t, o].join(" ")).addClass("active"); r.removeClass(["active", o].join(" ")); a.sliding = false; setTimeout(function () { a.$element.trigger("slid") }, 0) }) } else if (!e.support.transition && this.$element.hasClass("slide")) { this.$element.trigger(f); if (f.isDefaultPrevented())return; r.animate({left: o == "right" ? "100%" : "-100%"}, 600, function () { r.removeClass("active"); a.sliding = false; setTimeout(function () { a.$element.trigger("slid") }, 0) }); i.addClass(t).css({left: o == "right" ? "-100%" : "100%"}).animate({left: "0"}, 600, function () { i.removeClass(t).addClass("active") }) } else { this.$element.trigger(f); if (f.isDefaultPrevented())return; r.removeClass("active"); i.addClass("active"); this.sliding = false; this.$element.trigger("slid") } s && this.cycle(); return this }}; var n = e.fn.carousel; e.fn.carousel = function (n) { return this.each(function () { var r = e(this), i = r.data("carousel"), s = e.extend({}, e.fn.carousel.defaults, typeof n == "object" && n), o = typeof n == "string" ? n : s.slide; if (!i)r.data("carousel", i = new t(this, s)); if (typeof n == "number")i.to(n); else if (o)i[o](); else if (s.interval)i.cycle() }) }; e.fn.carousel.defaults = {interval: 5e3, pause: "hover"}; e.fn.carousel.Constructor = t; e.fn.carousel.noConflict = function () { e.fn.carousel = n; return this }; e(document).on("click.carousel.data-api", "[data-slide]", function (t) { var n = e(this), r, i = e(n.attr("data-target") || (r = n.attr("href")) && r.replace(/.*(?=#[^\s]+$)/, "")), s = e.extend({}, i.data(), n.data()); i.carousel(s); t.preventDefault() }) }(window.jQuery); !function (e) { "use strict"; var t = function (t, n) { this.$element = e(t); this.options = e.extend({}, e.fn.collapse.defaults, n); if (this.options.parent) { this.$parent = e(this.options.parent) } this.options.toggle && this.toggle() }; t.prototype = {constructor: t, dimension: function () { var e = this.$element.hasClass("width"); return e ? "width" : "height" }, show: function () { var t, n, r, i; if (this.transitioning)return; t = this.dimension(); n = e.camelCase(["scroll", t].join("-")); r = this.$parent && this.$parent.find("> .accordion-group > .in"); if (r && r.length) { i = r.data("collapse"); if (i && i.transitioning)return; r.collapse("hide"); i || r.data("collapse", null) } this.$element[t](0); this.transition("addClass", e.Event("show"), "shown"); e.support.transition && this.$element[t](this.$element[0][n]) }, hide: function () { var t; if (this.transitioning)return; t = this.dimension(); this.reset(this.$element[t]()); this.transition("removeClass", e.Event("hide"), "hidden"); this.$element[t](0) }, reset: function (e) { var t = this.dimension(); this.$element.removeClass("collapse")[t](e || "auto")[0].offsetWidth; this.$element[e !== null ? "addClass" : "removeClass"]("collapse"); return this }, transition: function (t, n, r) { var i = this, s = function () { if (n.type == "show")i.reset(); i.transitioning = 0; i.$element.trigger(r) }; this.$element.trigger(n); if (n.isDefaultPrevented())return; this.transitioning = 1; this.$element[t]("in"); e.support.transition && this.$element.hasClass("collapse") ? this.$element.one(e.support.transition.end, s) : s() }, toggle: function () { this[this.$element.hasClass("in") ? "hide" : "show"]() }}; var n = e.fn.collapse; e.fn.collapse = function (n) { return this.each(function () { var r = e(this), i = r.data("collapse"), s = typeof n == "object" && n; if (!i)r.data("collapse", i = new t(this, s)); if (typeof n == "string")i[n]() }) }; e.fn.collapse.defaults = {toggle: true}; e.fn.collapse.Constructor = t; e.fn.collapse.noConflict = function () { e.fn.collapse = n; return this }; e(document).on("click.collapse.data-api", "[data-toggle=collapse]", function (t) { var n = e(this), r, i = n.attr("data-target") || t.preventDefault() || (r = n.attr("href")) && r.replace(/.*(?=#[^\s]+$)/, ""), s = e(i).data("collapse") ? "toggle" : n.data(); n[e(i).hasClass("in") ? "addClass" : "removeClass"]("collapsed"); e(i).collapse(s) }) }(window.jQuery); !function (e) { "use strict"; function r() { e(t).each(function () { i(e(this)).removeClass("open") }) } function i(t) { var n = t.attr("data-target"), r; if (!n) { n = t.attr("href"); n = n && /#/.test(n) && n.replace(/.*(?=#[^\s]*$)/, "") } r = e(n); r.length || (r = t.parent()); return r } var t = "[data-toggle=dropdown]", n = function (t) { var n = e(t).on("click.dropdown.data-api", this.toggle); e("html").on("click.dropdown.data-api", function () { n.parent().removeClass("open") }) }; n.prototype = {constructor: n, toggle: function (t) { var n = e(this), s, o; if (n.is(".disabled, :disabled"))return; s = i(n); o = s.hasClass("open"); r(); if (!o) { s.toggleClass("open") } n.focus(); return false }, keydown: function (t) { var n, r, s, o, u, a; if (!/(38|40|27)/.test(t.keyCode))return; n = e(this); t.preventDefault(); t.stopPropagation(); if (n.is(".disabled, :disabled"))return; o = i(n); u = o.hasClass("open"); if (!u || u && t.keyCode == 27)return n.click(); r = e("[role=menu] li:not(.divider):visible a", o); if (!r.length)return; a = r.index(r.filter(":focus")); if (t.keyCode == 38 && a > 0)a--; if (t.keyCode == 40 && a < r.length - 1)a++; if (!~a)a = 0; r.eq(a).focus() }}; var s = e.fn.dropdown; e.fn.dropdown = function (t) { return this.each(function () { var r = e(this), i = r.data("dropdown"); if (!i)r.data("dropdown", i = new n(this)); if (typeof t == "string")i[t].call(r) }) }; e.fn.dropdown.Constructor = n; e.fn.dropdown.noConflict = function () { e.fn.dropdown = s; return this }; e(document).on("click.dropdown.data-api touchstart.dropdown.data-api", r).on("click.dropdown touchstart.dropdown.data-api", ".dropdown form",function (e) { e.stopPropagation() }).on("touchstart.dropdown.data-api", ".dropdown-menu",function (e) { e.stopPropagation() }).on("click.dropdown.data-api touchstart.dropdown.data-api", t, n.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api", t + ", [role=menu]", n.prototype.keydown) }(window.jQuery); !function (e) { "use strict"; var t = function (t, n) { this.options = n; this.$element = e(t).delegate('[data-dismiss="modal"]', "click.dismiss.modal", e.proxy(this.hide, this)); this.options.remote && this.$element.find(".modal-body").load(this.options.remote) }; t.prototype = {constructor: t, toggle: function () { return this[!this.isShown ? "show" : "hide"]() }, show: function () { var t = this, n = e.Event("show"); this.$element.trigger(n); if (this.isShown || n.isDefaultPrevented())return; this.isShown = true; this.escape(); this.backdrop(function () { var n = e.support.transition && t.$element.hasClass("fade"); if (!t.$element.parent().length) { t.$element.appendTo(document.body) } t.$element.show(); if (n) { t.$element[0].offsetWidth } t.$element.addClass("in").attr("aria-hidden", false); t.enforceFocus(); n ? t.$element.one(e.support.transition.end, function () { t.$element.focus().trigger("shown") }) : t.$element.focus().trigger("shown") }) }, hide: function (t) { t && t.preventDefault(); var n = this; t = e.Event("hide"); this.$element.trigger(t); if (!this.isShown || t.isDefaultPrevented())return; this.isShown = false; this.escape(); e(document).off("focusin.modal"); this.$element.removeClass("in").attr("aria-hidden", true); e.support.transition && this.$element.hasClass("fade") ? this.hideWithTransition() : this.hideModal() }, enforceFocus: function () { var t = this; e(document).on("focusin.modal", function (e) { if (t.$element[0] !== e.target && !t.$element.has(e.target).length) { t.$element.focus() } }) }, escape: function () { var e = this; if (this.isShown && this.options.keyboard) { this.$element.on("keyup.dismiss.modal", function (t) { t.which == 27 && e.hide() }) } else if (!this.isShown) { this.$element.off("keyup.dismiss.modal") } }, hideWithTransition: function () { var t = this, n = setTimeout(function () { t.$element.off(e.support.transition.end); t.hideModal() }, 500); this.$element.one(e.support.transition.end, function () { clearTimeout(n); t.hideModal() }) }, hideModal: function (e) { this.$element.hide().trigger("hidden"); this.backdrop() }, removeBackdrop: function () { this.$backdrop.remove(); this.$backdrop = null }, backdrop: function (t) { var n = this, r = this.$element.hasClass("fade") ? "fade" : ""; if (this.isShown && this.options.backdrop) { var i = e.support.transition && r; this.$backdrop = e('
').appendTo(document.body); this.$backdrop.click(this.options.backdrop == "static" ? e.proxy(this.$element[0].focus, this.$element[0]) : e.proxy(this.hide, this)); if (i)this.$backdrop[0].offsetWidth; this.$backdrop.addClass("in"); i ? this.$backdrop.one(e.support.transition.end, t) : t() } else if (!this.isShown && this.$backdrop) { this.$backdrop.removeClass("in"); e.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one(e.support.transition.end, e.proxy(this.removeBackdrop, this)) : this.removeBackdrop() } else if (t) { t() } }}; var n = e.fn.modal; e.fn.modal = function (n) { return this.each(function () { var r = e(this), i = r.data("modal"), s = e.extend({}, e.fn.modal.defaults, r.data(), typeof n == "object" && n); if (!i)r.data("modal", i = new t(this, s)); if (typeof n == "string")i[n](); else if (s.show)i.show() }) }; e.fn.modal.defaults = {backdrop: true, keyboard: true, show: true}; e.fn.modal.Constructor = t; e.fn.modal.noConflict = function () { e.fn.modal = n; return this }; e(document).on("click.modal.data-api", '[data-toggle="modal"]', function (t) { var n = e(this), r = n.attr("href"), i = e(n.attr("data-target") || r && r.replace(/.*(?=#[^\s]+$)/, "")), s = i.data("modal") ? "toggle" : e.extend({remote: !/#/.test(r) && r}, i.data(), n.data()); t.preventDefault(); i.modal(s).one("hide", function () { n.focus() }) }) }(window.jQuery); !function (e) { "use strict"; var t = function (e, t) { this.init("tooltip", e, t) }; t.prototype = {constructor: t, init: function (t, n, r) { var i, s; this.type = t; this.$element = e(n); this.options = this.getOptions(r); this.enabled = true; if (this.options.trigger == "click") { this.$element.on("click." + this.type, this.options.selector, e.proxy(this.toggle, this)) } else if (this.options.trigger != "manual") { i = this.options.trigger == "hover" ? "mouseenter" : "focus"; s = this.options.trigger == "hover" ? "mouseleave" : "blur"; this.$element.on(i + "." + this.type, this.options.selector, e.proxy(this.enter, this)); this.$element.on(s + "." + this.type, this.options.selector, e.proxy(this.leave, this)) } this.options.selector ? this._options = e.extend({}, this.options, {trigger: "manual", selector: ""}) : this.fixTitle() }, getOptions: function (t) { t = e.extend({}, e.fn[this.type].defaults, t, this.$element.data()); if (t.delay && typeof t.delay == "number") { t.delay = {show: t.delay, hide: t.delay} } return t }, enter: function (t) { var n = e(t.currentTarget)[this.type](this._options).data(this.type); if (!n.options.delay || !n.options.delay.show)return n.show(); clearTimeout(this.timeout); n.hoverState = "in"; this.timeout = setTimeout(function () { if (n.hoverState == "in")n.show() }, n.options.delay.show) }, leave: function (t) { var n = e(t.currentTarget)[this.type](this._options).data(this.type); if (this.timeout)clearTimeout(this.timeout); if (!n.options.delay || !n.options.delay.hide)return n.hide(); n.hoverState = "out"; this.timeout = setTimeout(function () { if (n.hoverState == "out")n.hide() }, n.options.delay.hide) }, show: function () { var e, t, n, r, i, s, o; if (this.hasContent() && this.enabled) { e = this.tip(); this.setContent(); if (this.options.animation) { e.addClass("fade") } s = typeof this.options.placement == "function" ? this.options.placement.call(this, e[0], this.$element[0]) : this.options.placement; t = /in/.test(s); e.detach().css({top: 0, left: 0, display: "block"}).insertAfter(this.$element); n = this.getPosition(t); r = e[0].offsetWidth; i = e[0].offsetHeight; switch (t ? s.split(" ")[1] : s) { case"bottom": o = {top: n.top + n.height, left: n.left + n.width / 2 - r / 2}; break; case"top": o = {top: n.top - i, left: n.left + n.width / 2 - r / 2}; break; case"left": o = {top: n.top + n.height / 2 - i / 2, left: n.left - r}; break; case"right": o = {top: n.top + n.height / 2 - i / 2, left: n.left + n.width}; break } e.offset(o).addClass(s).addClass("in") } }, setContent: function () { var e = this.tip(), t = this.getTitle(); e.find(".tooltip-inner")[this.options.html ? "html" : "text"](t); e.removeClass("fade in top bottom left right") }, hide: function () { function r() { var t = setTimeout(function () { n.off(e.support.transition.end).detach() }, 500); n.one(e.support.transition.end, function () { clearTimeout(t); n.detach() }) } var t = this, n = this.tip(); n.removeClass("in"); e.support.transition && this.$tip.hasClass("fade") ? r() : n.detach(); return this }, 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") || "").removeAttr("title") } }, hasContent: function () { return this.getTitle() }, getPosition: function (t) { return e.extend({}, t ? {top: 0, left: 0} : this.$element.offset(), {width: this.$element[0].offsetWidth, height: this.$element[0].offsetHeight}) }, getTitle: function () { var e, t = this.$element, n = this.options; e = t.attr("data-original-title") || (typeof n.title == "function" ? n.title.call(t[0]) : n.title); return e }, tip: function () { return this.$tip = this.$tip || e(this.options.template) }, validate: function () { if (!this.$element[0].parentNode) { this.hide(); this.$element = null; this.options = null } }, enable: function () { this.enabled = true }, disable: function () { this.enabled = false }, toggleEnabled: function () { this.enabled = !this.enabled }, toggle: function (t) { var n = e(t.currentTarget)[this.type](this._options).data(this.type); n[n.tip().hasClass("in") ? "hide" : "show"]() }, destroy: function () { this.hide().$element.off("." + this.type).removeData(this.type) }}; var n = e.fn.tooltip; e.fn.tooltip = function (n) { return this.each(function () { var r = e(this), i = r.data("tooltip"), s = typeof n == "object" && n; if (!i)r.data("tooltip", i = new t(this, s)); if (typeof n == "string")i[n]() }) }; e.fn.tooltip.Constructor = t; e.fn.tooltip.defaults = {animation: true, placement: "top", selector: false, template: '