Path: blob/master/sites/bitcoin/themes/default/js/bootstrap.js
777 views
/*!1* Bootstrap v3.3.6 (http://getbootstrap.com)2* Copyright 2011-2015 Twitter, Inc.3* Licensed under the MIT license4*/5if ("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requires jQuery"); + function(a) {6"use strict";7var b = a.fn.jquery.split(" ")[0].split(".");8if (b[0] < 2 && b[1] < 9 || 1 == b[0] && 9 == b[1] && b[2] < 1 || b[0] > 2) throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")9}(jQuery), + function(a) {10"use strict";1112function b() {13var a = document.createElement("bootstrap"),14b = {15WebkitTransition: "webkitTransitionEnd",16MozTransition: "transitionend",17OTransition: "oTransitionEnd otransitionend",18transition: "transitionend"19};20for (var c in b)21if (void 0 !== a.style[c]) return {22end: b[c]23};24return !125}26a.fn.emulateTransitionEnd = function(b) {27var c = !1,28d = this;29a(this).one("bsTransitionEnd", function() {30c = !031});32var e = function() {33c || a(d).trigger(a.support.transition.end)34};35return setTimeout(e, b), this36}, a(function() {37a.support.transition = b(), a.support.transition && (a.event.special.bsTransitionEnd = {38bindType: a.support.transition.end,39delegateType: a.support.transition.end,40handle: function(b) {41return a(b.target).is(this) ? b.handleObj.handler.apply(this, arguments) : void 042}43})44})45}(jQuery), + function(a) {46"use strict";4748function b(b) {49return this.each(function() {50var c = a(this),51e = c.data("bs.alert");52e || c.data("bs.alert", e = new d(this)), "string" == typeof b && e[b].call(c)53})54}55var c = '[data-dismiss="alert"]',56d = function(b) {57a(b).on("click", c, this.close)58};59d.VERSION = "3.3.6", d.TRANSITION_DURATION = 150, d.prototype.close = function(b) {60function c() {61g.detach().trigger("closed.bs.alert").remove()62}63var e = a(this),64f = e.attr("data-target");65f || (f = e.attr("href"), f = f && f.replace(/.*(?=#[^\s]*$)/, ""));66var g = a(f);67b && 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())68};69var e = a.fn.alert;70a.fn.alert = b, a.fn.alert.Constructor = d, a.fn.alert.noConflict = function() {71return a.fn.alert = e, this72}, a(document).on("click.bs.alert.data-api", c, d.prototype.close)73}(jQuery), + function(a) {74"use strict";7576function b(b) {77return this.each(function() {78var d = a(this),79e = d.data("bs.button"),80f = "object" == typeof b && b;81e || d.data("bs.button", e = new c(this, f)), "toggle" == b ? e.toggle() : b && e.setState(b)82})83}84var c = function(b, d) {85this.$element = a(b), this.options = a.extend({}, c.DEFAULTS, d), this.isLoading = !186};87c.VERSION = "3.3.6", c.DEFAULTS = {88loadingText: "loading..."89}, c.prototype.setState = function(b) {90var c = "disabled",91d = this.$element,92e = d.is("input") ? "val" : "html",93f = d.data();94b += "Text", null == f.resetText && d.data("resetText", d[e]()), setTimeout(a.proxy(function() {95d[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))96}, this), 0)97}, c.prototype.toggle = function() {98var a = !0,99b = this.$element.closest('[data-toggle="buttons"]');100if (b.length) {101var c = this.$element.find("input");102"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")103} else this.$element.attr("aria-pressed", !this.$element.hasClass("active")), this.$element.toggleClass("active")104};105var d = a.fn.button;106a.fn.button = b, a.fn.button.Constructor = c, a.fn.button.noConflict = function() {107return a.fn.button = d, this108}, a(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function(c) {109var d = a(c.target);110d.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()111}).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function(b) {112a(b.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(b.type))113})114}(jQuery), + function(a) {115"use strict";116117function b(b) {118return this.each(function() {119var d = a(this),120e = d.data("bs.carousel"),121f = a.extend({}, c.DEFAULTS, d.data(), "object" == typeof b && b),122g = "string" == typeof b ? b : f.slide;123e || d.data("bs.carousel", e = new c(this, f)), "number" == typeof b ? e.to(b) : g ? e[g]() : f.interval && e.pause().cycle()124})125}126var c = function(b, c) {127this.$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))128};129c.VERSION = "3.3.6", c.TRANSITION_DURATION = 600, c.DEFAULTS = {130interval: 5e3,131pause: "hover",132wrap: !0,133keyboard: !0134}, c.prototype.keydown = function(a) {135if (!/input|textarea/i.test(a.target.tagName)) {136switch (a.which) {137case 37:138this.prev();139break;140case 39:141this.next();142break;143default:144return145}146a.preventDefault()147}148}, c.prototype.cycle = function(b) {149return 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)), this150}, c.prototype.getItemIndex = function(a) {151return this.$items = a.parent().children(".item"), this.$items.index(a || this.$active)152}, c.prototype.getItemForDirection = function(a, b) {153var c = this.getItemIndex(b),154d = "prev" == a && 0 === c || "next" == a && c == this.$items.length - 1;155if (d && !this.options.wrap) return b;156var e = "prev" == a ? -1 : 1,157f = (c + e) % this.$items.length;158return this.$items.eq(f)159}, c.prototype.to = function(a) {160var b = this,161c = this.getItemIndex(this.$active = this.$element.find(".item.active"));162return a > this.$items.length - 1 || 0 > a ? void 0 : this.sliding ? this.$element.one("slid.bs.carousel", function() {163b.to(a)164}) : c == a ? this.pause().cycle() : this.slide(a > c ? "next" : "prev", this.$items.eq(a))165}, c.prototype.pause = function(b) {166return 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), this167}, c.prototype.next = function() {168return this.sliding ? void 0 : this.slide("next")169}, c.prototype.prev = function() {170return this.sliding ? void 0 : this.slide("prev")171}, c.prototype.slide = function(b, d) {172var e = this.$element.find(".item.active"),173f = d || this.getItemForDirection(b, e),174g = this.interval,175h = "next" == b ? "left" : "right",176i = this;177if (f.hasClass("active")) return this.sliding = !1;178var j = f[0],179k = a.Event("slide.bs.carousel", {180relatedTarget: j,181direction: h182});183if (this.$element.trigger(k), !k.isDefaultPrevented()) {184if (this.sliding = !0, g && this.pause(), this.$indicators.length) {185this.$indicators.find(".active").removeClass("active");186var l = a(this.$indicators.children()[this.getItemIndex(f)]);187l && l.addClass("active")188}189var m = a.Event("slid.bs.carousel", {190relatedTarget: j,191direction: h192});193return a.support.transition && this.$element.hasClass("slide") ? (f.addClass(b), f[0].offsetWidth, e.addClass(h), f.addClass(h), e.one("bsTransitionEnd", function() {194f.removeClass([b, h].join(" ")).addClass("active"), e.removeClass(["active", h].join(" ")), i.sliding = !1, setTimeout(function() {195i.$element.trigger(m)196}, 0)197}).emulateTransitionEnd(c.TRANSITION_DURATION)) : (e.removeClass("active"), f.addClass("active"), this.sliding = !1, this.$element.trigger(m)), g && this.cycle(), this198}199};200var d = a.fn.carousel;201a.fn.carousel = b, a.fn.carousel.Constructor = c, a.fn.carousel.noConflict = function() {202return a.fn.carousel = d, this203};204var e = function(c) {205var d, e = a(this),206f = a(e.attr("data-target") || (d = e.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, ""));207if (f.hasClass("carousel")) {208var g = a.extend({}, f.data(), e.data()),209h = e.attr("data-slide-to");210h && (g.interval = !1), b.call(f, g), h && f.data("bs.carousel").to(h), c.preventDefault()211}212};213a(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() {214a('[data-ride="carousel"]').each(function() {215var c = a(this);216b.call(c, c.data())217})218})219}(jQuery), + function(a) {220"use strict";221222function b(b) {223var c, d = b.attr("data-target") || (c = b.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, "");224return a(d)225}226227function c(b) {228return this.each(function() {229var c = a(this),230e = c.data("bs.collapse"),231f = a.extend({}, d.DEFAULTS, c.data(), "object" == typeof b && b);232!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]()233})234}235var d = function(b, c) {236this.$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()237};238d.VERSION = "3.3.6", d.TRANSITION_DURATION = 350, d.DEFAULTS = {239toggle: !0240}, d.prototype.dimension = function() {241var a = this.$element.hasClass("width");242return a ? "width" : "height"243}, d.prototype.show = function() {244if (!this.transitioning && !this.$element.hasClass("in")) {245var b, e = this.$parent && this.$parent.children(".panel").children(".in, .collapsing");246if (!(e && e.length && (b = e.data("bs.collapse"), b && b.transitioning))) {247var f = a.Event("show.bs.collapse");248if (this.$element.trigger(f), !f.isDefaultPrevented()) {249e && e.length && (c.call(e, "hide"), b || e.data("bs.collapse", null));250var g = this.dimension();251this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1;252var h = function() {253this.$element.removeClass("collapsing").addClass("collapse in")[g](""), this.transitioning = 0, this.$element.trigger("shown.bs.collapse")254};255if (!a.support.transition) return h.call(this);256var i = a.camelCase(["scroll", g].join("-"));257this.$element.one("bsTransitionEnd", a.proxy(h, this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])258}259}260}261}, d.prototype.hide = function() {262if (!this.transitioning && this.$element.hasClass("in")) {263var b = a.Event("hide.bs.collapse");264if (this.$element.trigger(b), !b.isDefaultPrevented()) {265var c = this.dimension();266this.$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;267var e = function() {268this.transitioning = 0, this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")269};270return a.support.transition ? void this.$element[c](0).one("bsTransitionEnd", a.proxy(e, this)).emulateTransitionEnd(d.TRANSITION_DURATION) : e.call(this)271}272}273}, d.prototype.toggle = function() {274this[this.$element.hasClass("in") ? "hide" : "show"]()275}, d.prototype.getParent = function() {276return a(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(a.proxy(function(c, d) {277var e = a(d);278this.addAriaAndCollapsedClass(b(e), e)279}, this)).end()280}, d.prototype.addAriaAndCollapsedClass = function(a, b) {281var c = a.hasClass("in");282a.attr("aria-expanded", c), b.toggleClass("collapsed", !c).attr("aria-expanded", c)283};284var e = a.fn.collapse;285a.fn.collapse = c, a.fn.collapse.Constructor = d, a.fn.collapse.noConflict = function() {286return a.fn.collapse = e, this287}, a(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function(d) {288var e = a(this);289e.attr("data-target") || d.preventDefault();290var f = b(e),291g = f.data("bs.collapse"),292h = g ? "toggle" : e.data();293c.call(f, h)294})295}(jQuery), + function(a) {296"use strict";297298function b(b) {299var c = b.attr("data-target");300c || (c = b.attr("href"), c = c && /#[A-Za-z]/.test(c) && c.replace(/.*(?=#[^\s]*$)/, ""));301var d = c && a(c);302return d && d.length ? d : b.parent()303}304305function c(c) {306c && 3 === c.which || (a(e).remove(), a(f).each(function() {307var d = a(this),308e = b(d),309f = {310relatedTarget: this311};312e.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(a.Event("hidden.bs.dropdown", f)))))313}))314}315316function d(b) {317return this.each(function() {318var c = a(this),319d = c.data("bs.dropdown");320d || c.data("bs.dropdown", d = new g(this)), "string" == typeof b && d[b].call(c)321})322}323var e = ".dropdown-backdrop",324f = '[data-toggle="dropdown"]',325g = function(b) {326a(b).on("click.bs.dropdown", this.toggle)327};328g.VERSION = "3.3.6", g.prototype.toggle = function(d) {329var e = a(this);330if (!e.is(".disabled, :disabled")) {331var f = b(e),332g = f.hasClass("open");333if (c(), !g) {334"ontouchstart" in document.documentElement && !f.closest(".navbar-nav").length && a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click", c);335var h = {336relatedTarget: this337};338if (f.trigger(d = a.Event("show.bs.dropdown", h)), d.isDefaultPrevented()) return;339e.trigger("focus").attr("aria-expanded", "true"), f.toggleClass("open").trigger(a.Event("shown.bs.dropdown", h))340}341return !1342}343}, g.prototype.keydown = function(c) {344if (/(38|40|27|32)/.test(c.which) && !/input|textarea/i.test(c.target.tagName)) {345var d = a(this);346if (c.preventDefault(), c.stopPropagation(), !d.is(".disabled, :disabled")) {347var e = b(d),348g = e.hasClass("open");349if (!g && 27 != c.which || g && 27 == c.which) return 27 == c.which && e.find(f).trigger("focus"), d.trigger("click");350var h = " li:not(.disabled):visible a",351i = e.find(".dropdown-menu" + h);352if (i.length) {353var j = i.index(c.target);35438 == c.which && j > 0 && j--, 40 == c.which && j < i.length - 1 && j++, ~j || (j = 0), i.eq(j).trigger("focus")355}356}357}358};359var h = a.fn.dropdown;360a.fn.dropdown = d, a.fn.dropdown.Constructor = g, a.fn.dropdown.noConflict = function() {361return a.fn.dropdown = h, this362}, a(document).on("click.bs.dropdown.data-api", c).on("click.bs.dropdown.data-api", ".dropdown form", function(a) {363a.stopPropagation()364}).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)365}(jQuery), + function(a) {366"use strict";367368function b(b, d) {369return this.each(function() {370var e = a(this),371f = e.data("bs.modal"),372g = a.extend({}, c.DEFAULTS, e.data(), "object" == typeof b && b);373f || e.data("bs.modal", f = new c(this, g)), "string" == typeof b ? f[b](d) : g.show && f.show(d)374})375}376var c = function(b, c) {377this.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() {378this.$element.trigger("loaded.bs.modal")379}, this))380};381c.VERSION = "3.3.6", c.TRANSITION_DURATION = 300, c.BACKDROP_TRANSITION_DURATION = 150, c.DEFAULTS = {382backdrop: !0,383keyboard: !0,384show: !0385}, c.prototype.toggle = function(a) {386return this.isShown ? this.hide() : this.show(a)387}, c.prototype.show = function(b) {388var d = this,389e = a.Event("show.bs.modal", {390relatedTarget: b391});392this.$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() {393d.$element.one("mouseup.dismiss.bs.modal", function(b) {394a(b.target).is(d.$element) && (d.ignoreBackdropClick = !0)395})396}), this.backdrop(function() {397var e = a.support.transition && d.$element.hasClass("fade");398d.$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();399var f = a.Event("shown.bs.modal", {400relatedTarget: b401});402e ? d.$dialog.one("bsTransitionEnd", function() {403d.$element.trigger("focus").trigger(f)404}).emulateTransitionEnd(c.TRANSITION_DURATION) : d.$element.trigger("focus").trigger(f)405}))406}, c.prototype.hide = function(b) {407b && 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())408}, c.prototype.enforceFocus = function() {409a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function(a) {410this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.trigger("focus")411}, this))412}, c.prototype.escape = function() {413this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", a.proxy(function(a) {41427 == a.which && this.hide()415}, this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal")416}, c.prototype.resize = function() {417this.isShown ? a(window).on("resize.bs.modal", a.proxy(this.handleUpdate, this)) : a(window).off("resize.bs.modal")418}, c.prototype.hideModal = function() {419var a = this;420this.$element.hide(), this.backdrop(function() {421a.$body.removeClass("modal-open"), a.resetAdjustments(), a.resetScrollbar(), a.$element.trigger("hidden.bs.modal")422})423}, c.prototype.removeBackdrop = function() {424this.$backdrop && this.$backdrop.remove(), this.$backdrop = null425}, c.prototype.backdrop = function(b) {426var d = this,427e = this.$element.hasClass("fade") ? "fade" : "";428if (this.isShown && this.options.backdrop) {429var f = a.support.transition && e;430if (this.$backdrop = a(document.createElement("div")).addClass("modal-backdrop " + e).appendTo(this.$body), this.$element.on("click.dismiss.bs.modal", a.proxy(function(a) {431return this.ignoreBackdropClick ? void(this.ignoreBackdropClick = !1) : void(a.target === a.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus() : this.hide()))432}, this)), f && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !b) return;433f ? this.$backdrop.one("bsTransitionEnd", b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : b()434} else if (!this.isShown && this.$backdrop) {435this.$backdrop.removeClass("in");436var g = function() {437d.removeBackdrop(), b && b()438};439a.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : g()440} else b && b()441}, c.prototype.handleUpdate = function() {442this.adjustDialog()443}, c.prototype.adjustDialog = function() {444var a = this.$element[0].scrollHeight > document.documentElement.clientHeight;445this.$element.css({446paddingLeft: !this.bodyIsOverflowing && a ? this.scrollbarWidth : "",447paddingRight: this.bodyIsOverflowing && !a ? this.scrollbarWidth : ""448})449}, c.prototype.resetAdjustments = function() {450this.$element.css({451paddingLeft: "",452paddingRight: ""453})454}, c.prototype.checkScrollbar = function() {455var a = window.innerWidth;456if (!a) {457var b = document.documentElement.getBoundingClientRect();458a = b.right - Math.abs(b.left)459}460this.bodyIsOverflowing = document.body.clientWidth < a, this.scrollbarWidth = this.measureScrollbar()461}, c.prototype.setScrollbar = function() {462var a = parseInt(this.$body.css("padding-right") || 0, 10);463this.originalBodyPad = document.body.style.paddingRight || "", this.bodyIsOverflowing && this.$body.css("padding-right", a + this.scrollbarWidth)464}, c.prototype.resetScrollbar = function() {465this.$body.css("padding-right", this.originalBodyPad)466}, c.prototype.measureScrollbar = function() {467var a = document.createElement("div");468a.className = "modal-scrollbar-measure", this.$body.append(a);469var b = a.offsetWidth - a.clientWidth;470return this.$body[0].removeChild(a), b471};472var d = a.fn.modal;473a.fn.modal = b, a.fn.modal.Constructor = c, a.fn.modal.noConflict = function() {474return a.fn.modal = d, this475}, a(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function(c) {476var d = a(this),477e = d.attr("href"),478f = a(d.attr("data-target") || e && e.replace(/.*(?=#[^\s]+$)/, "")),479g = f.data("bs.modal") ? "toggle" : a.extend({480remote: !/#/.test(e) && e481}, f.data(), d.data());482d.is("a") && c.preventDefault(), f.one("show.bs.modal", function(a) {483a.isDefaultPrevented() || f.one("hidden.bs.modal", function() {484d.is(":visible") && d.trigger("focus")485})486}), b.call(f, g, this)487})488}(jQuery), + function(a) {489"use strict";490491function b(b) {492return this.each(function() {493var d = a(this),494e = d.data("bs.tooltip"),495f = "object" == typeof b && b;496(e || !/destroy|hide/.test(b)) && (e || d.data("bs.tooltip", e = new c(this, f)), "string" == typeof b && e[b]())497})498}499var c = function(a, b) {500this.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)501};502c.VERSION = "3.3.6", c.TRANSITION_DURATION = 150, c.DEFAULTS = {503animation: !0,504placement: "top",505selector: !1,506template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',507trigger: "hover focus",508title: "",509delay: 0,510html: !1,511container: !1,512viewport: {513selector: "body",514padding: 0515}516}, c.prototype.init = function(b, c, d) {517if (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 = {518click: !1,519hover: !1,520focus: !1521}, 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!");522for (var e = this.options.trigger.split(" "), f = e.length; f--;) {523var g = e[f];524if ("click" == g) this.$element.on("click." + this.type, this.options.selector, a.proxy(this.toggle, this));525else if ("manual" != g) {526var h = "hover" == g ? "mouseenter" : "focusin",527i = "hover" == g ? "mouseleave" : "focusout";528this.$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))529}530}531this.options.selector ? this._options = a.extend({}, this.options, {532trigger: "manual",533selector: ""534}) : this.fixTitle()535}, c.prototype.getDefaults = function() {536return c.DEFAULTS537}, c.prototype.getOptions = function(b) {538return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && "number" == typeof b.delay && (b.delay = {539show: b.delay,540hide: b.delay541}), b542}, c.prototype.getDelegateOptions = function() {543var b = {},544c = this.getDefaults();545return this._options && a.each(this._options, function(a, d) {546c[a] != d && (b[a] = d)547}), b548}, c.prototype.enter = function(b) {549var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);550return 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() {551"in" == c.hoverState && c.show()552}, c.options.delay.show)) : c.show())553}, c.prototype.isInStateTrue = function() {554for (var a in this.inState)555if (this.inState[a]) return !0;556return !1557}, c.prototype.leave = function(b) {558var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);559return 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() {560"out" == c.hoverState && c.hide()561}, c.options.delay.hide)) : c.hide())562}, c.prototype.show = function() {563var b = a.Event("show.bs." + this.type);564if (this.hasContent() && this.enabled) {565this.$element.trigger(b);566var d = a.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]);567if (b.isDefaultPrevented() || !d) return;568var e = this,569f = this.tip(),570g = this.getUID(this.type);571this.setContent(), f.attr("id", g), this.$element.attr("aria-describedby", g), this.options.animation && f.addClass("fade");572var h = "function" == typeof this.options.placement ? this.options.placement.call(this, f[0], this.$element[0]) : this.options.placement,573i = /\s?auto?\s?/i,574j = i.test(h);575j && (h = h.replace(i, "") || "top"), f.detach().css({576top: 0,577left: 0,578display: "block"579}).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);580var k = this.getPosition(),581l = f[0].offsetWidth,582m = f[0].offsetHeight;583if (j) {584var n = h,585o = this.getPosition(this.$viewport);586h = "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)587}588var p = this.getCalculatedOffset(h, k, l, m);589this.applyPlacement(p, h);590var q = function() {591var a = e.hoverState;592e.$element.trigger("shown.bs." + e.type), e.hoverState = null, "out" == a && e.leave(e)593};594a.support.transition && this.$tip.hasClass("fade") ? f.one("bsTransitionEnd", q).emulateTransitionEnd(c.TRANSITION_DURATION) : q()595}596}, c.prototype.applyPlacement = function(b, c) {597var d = this.tip(),598e = d[0].offsetWidth,599f = d[0].offsetHeight,600g = parseInt(d.css("margin-top"), 10),601h = parseInt(d.css("margin-left"), 10);602isNaN(g) && (g = 0), isNaN(h) && (h = 0), b.top += g, b.left += h, a.offset.setOffset(d[0], a.extend({603using: function(a) {604d.css({605top: Math.round(a.top),606left: Math.round(a.left)607})608}609}, b), 0), d.addClass("in");610var i = d[0].offsetWidth,611j = d[0].offsetHeight;612"top" == c && j != f && (b.top = b.top + f - j);613var k = this.getViewportAdjustedDelta(c, b, i, j);614k.left ? b.left += k.left : b.top += k.top;615var l = /top|bottom/.test(c),616m = l ? 2 * k.left - e + i : 2 * k.top - f + j,617n = l ? "offsetWidth" : "offsetHeight";618d.offset(b), this.replaceArrow(m, d[0][n], l)619}, c.prototype.replaceArrow = function(a, b, c) {620this.arrow().css(c ? "left" : "top", 50 * (1 - a / b) + "%").css(c ? "top" : "left", "")621}, c.prototype.setContent = function() {622var a = this.tip(),623b = this.getTitle();624a.find(".tooltip-inner")[this.options.html ? "html" : "text"](b), a.removeClass("fade in top bottom left right")625}, c.prototype.hide = function(b) {626function d() {627"in" != e.hoverState && f.detach(), e.$element.removeAttr("aria-describedby").trigger("hidden.bs." + e.type), b && b()628}629var e = this,630f = a(this.$tip),631g = a.Event("hide.bs." + this.type);632return 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)633}, c.prototype.fixTitle = function() {634var a = this.$element;635(a.attr("title") || "string" != typeof a.attr("data-original-title")) && a.attr("data-original-title", a.attr("title") || "").attr("title", "")636}, c.prototype.hasContent = function() {637return this.getTitle()638}, c.prototype.getPosition = function(b) {639b = b || this.$element;640var c = b[0],641d = "BODY" == c.tagName,642e = c.getBoundingClientRect();643null == e.width && (e = a.extend({}, e, {644width: e.right - e.left,645height: e.bottom - e.top646}));647var f = d ? {648top: 0,649left: 0650} : b.offset(),651g = {652scroll: d ? document.documentElement.scrollTop || document.body.scrollTop : b.scrollTop()653},654h = d ? {655width: a(window).width(),656height: a(window).height()657} : null;658return a.extend({}, e, g, h, f)659}, c.prototype.getCalculatedOffset = function(a, b, c, d) {660return "bottom" == a ? {661top: b.top + b.height,662left: b.left + b.width / 2 - c / 2663} : "top" == a ? {664top: b.top - d,665left: b.left + b.width / 2 - c / 2666} : "left" == a ? {667top: b.top + b.height / 2 - d / 2,668left: b.left - c669} : {670top: b.top + b.height / 2 - d / 2,671left: b.left + b.width672}673}, c.prototype.getViewportAdjustedDelta = function(a, b, c, d) {674var e = {675top: 0,676left: 0677};678if (!this.$viewport) return e;679var f = this.options.viewport && this.options.viewport.padding || 0,680g = this.getPosition(this.$viewport);681if (/right|left/.test(a)) {682var h = b.top - f - g.scroll,683i = b.top + f - g.scroll + d;684h < g.top ? e.top = g.top - h : i > g.top + g.height && (e.top = g.top + g.height - i)685} else {686var j = b.left - f,687k = b.left + f + c;688j < g.left ? e.left = g.left - j : k > g.right && (e.left = g.left + g.width - k)689}690return e691}, c.prototype.getTitle = function() {692var a, b = this.$element,693c = this.options;694return a = b.attr("data-original-title") || ("function" == typeof c.title ? c.title.call(b[0]) : c.title)695}, c.prototype.getUID = function(a) {696do a += ~~(1e6 * Math.random()); while (document.getElementById(a));697return a698}, c.prototype.tip = function() {699if (!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!");700return this.$tip701}, c.prototype.arrow = function() {702return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")703}, c.prototype.enable = function() {704this.enabled = !0705}, c.prototype.disable = function() {706this.enabled = !1707}, c.prototype.toggleEnabled = function() {708this.enabled = !this.enabled709}, c.prototype.toggle = function(b) {710var c = this;711b && (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)712}, c.prototype.destroy = function() {713var a = this;714clearTimeout(this.timeout), this.hide(function() {715a.$element.off("." + a.type).removeData("bs." + a.type), a.$tip && a.$tip.detach(), a.$tip = null, a.$arrow = null, a.$viewport = null716})717};718var d = a.fn.tooltip;719a.fn.tooltip = b, a.fn.tooltip.Constructor = c, a.fn.tooltip.noConflict = function() {720return a.fn.tooltip = d, this721}722}(jQuery), + function(a) {723"use strict";724725function b(b) {726return this.each(function() {727var d = a(this),728e = d.data("bs.popover"),729f = "object" == typeof b && b;730(e || !/destroy|hide/.test(b)) && (e || d.data("bs.popover", e = new c(this, f)), "string" == typeof b && e[b]())731})732}733var c = function(a, b) {734this.init("popover", a, b)735};736if (!a.fn.tooltip) throw new Error("Popover requires tooltip.js");737c.VERSION = "3.3.6", c.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, {738placement: "right",739trigger: "click",740content: "",741template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'742}), c.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype), c.prototype.constructor = c, c.prototype.getDefaults = function() {743return c.DEFAULTS744}, c.prototype.setContent = function() {745var a = this.tip(),746b = this.getTitle(),747c = this.getContent();748a.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()749}, c.prototype.hasContent = function() {750return this.getTitle() || this.getContent()751}, c.prototype.getContent = function() {752var a = this.$element,753b = this.options;754return a.attr("data-content") || ("function" == typeof b.content ? b.content.call(a[0]) : b.content)755}, c.prototype.arrow = function() {756return this.$arrow = this.$arrow || this.tip().find(".arrow")757};758var d = a.fn.popover;759a.fn.popover = b, a.fn.popover.Constructor = c, a.fn.popover.noConflict = function() {760return a.fn.popover = d, this761}762}(jQuery), + function(a) {763"use strict";764765function b(c, d) {766this.$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()767}768769function c(c) {770return this.each(function() {771var d = a(this),772e = d.data("bs.scrollspy"),773f = "object" == typeof c && c;774e || d.data("bs.scrollspy", e = new b(this, f)), "string" == typeof c && e[c]()775})776}777b.VERSION = "3.3.6", b.DEFAULTS = {778offset: 10779}, b.prototype.getScrollHeight = function() {780return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)781}, b.prototype.refresh = function() {782var b = this,783c = "offset",784d = 0;785this.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() {786var b = a(this),787e = b.data("target") || b.attr("href"),788f = /^#./.test(e) && a(e);789return f && f.length && f.is(":visible") && [790[f[c]().top + d, e]791] || null792}).sort(function(a, b) {793return a[0] - b[0]794}).each(function() {795b.offsets.push(this[0]), b.targets.push(this[1])796})797}, b.prototype.process = function() {798var a, b = this.$scrollElement.scrollTop() + this.options.offset,799c = this.getScrollHeight(),800d = this.options.offset + c - this.$scrollElement.height(),801e = this.offsets,802f = this.targets,803g = this.activeTarget;804if (this.scrollHeight != c && this.refresh(), b >= d) return g != (a = f[f.length - 1]) && this.activate(a);805if (g && b < e[0]) return this.activeTarget = null, this.clear();806for (a = e.length; a--;) g != f[a] && b >= e[a] && (void 0 === e[a + 1] || b < e[a + 1]) && this.activate(f[a])807}, b.prototype.activate = function(b) {808this.activeTarget = b, this.clear();809var c = this.selector + '[data-target="' + b + '"],' + this.selector + '[href="' + b + '"]',810d = a(c).parents("li").addClass("active");811d.parent(".dropdown-menu").length && (d = d.closest("li.dropdown").addClass("active")), d.trigger("activate.bs.scrollspy")812}, b.prototype.clear = function() {813a(this.selector).parentsUntil(this.options.target, ".active").removeClass("active")814};815var d = a.fn.scrollspy;816a.fn.scrollspy = c, a.fn.scrollspy.Constructor = b, a.fn.scrollspy.noConflict = function() {817return a.fn.scrollspy = d, this818}, a(window).on("load.bs.scrollspy.data-api", function() {819a('[data-spy="scroll"]').each(function() {820var b = a(this);821c.call(b, b.data())822})823})824}(jQuery), + function(a) {825"use strict";826827function b(b) {828return this.each(function() {829var d = a(this),830e = d.data("bs.tab");831e || d.data("bs.tab", e = new c(this)), "string" == typeof b && e[b]()832})833}834var c = function(b) {835this.element = a(b)836};837c.VERSION = "3.3.6", c.TRANSITION_DURATION = 150, c.prototype.show = function() {838var b = this.element,839c = b.closest("ul:not(.dropdown-menu)"),840d = b.data("target");841if (d || (d = b.attr("href"), d = d && d.replace(/.*(?=#[^\s]*$)/, "")), !b.parent("li").hasClass("active")) {842var e = c.find(".active:last a"),843f = a.Event("hide.bs.tab", {844relatedTarget: b[0]845}),846g = a.Event("show.bs.tab", {847relatedTarget: e[0]848});849if (e.trigger(f), b.trigger(g), !g.isDefaultPrevented() && !f.isDefaultPrevented()) {850var h = a(d);851this.activate(b.closest("li"), c), this.activate(h, h.parent(), function() {852e.trigger({853type: "hidden.bs.tab",854relatedTarget: b[0]855}), b.trigger({856type: "shown.bs.tab",857relatedTarget: e[0]858})859})860}861}862}, c.prototype.activate = function(b, d, e) {863function f() {864g.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()865}866var g = d.find("> .active"),867h = e && a.support.transition && (g.length && g.hasClass("fade") || !!d.find("> .fade").length);868g.length && h ? g.one("bsTransitionEnd", f).emulateTransitionEnd(c.TRANSITION_DURATION) : f(), g.removeClass("in")869};870var d = a.fn.tab;871a.fn.tab = b, a.fn.tab.Constructor = c, a.fn.tab.noConflict = function() {872return a.fn.tab = d, this873};874var e = function(c) {875c.preventDefault(), b.call(a(this), "show")876};877a(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', e).on("click.bs.tab.data-api", '[data-toggle="pill"]', e)878}(jQuery), + function(a) {879"use strict";880881function b(b) {882return this.each(function() {883var d = a(this),884e = d.data("bs.affix"),885f = "object" == typeof b && b;886e || d.data("bs.affix", e = new c(this, f)), "string" == typeof b && e[b]()887})888}889var c = function(b, d) {890this.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()891};892c.VERSION = "3.3.6", c.RESET = "affix affix-top affix-bottom", c.DEFAULTS = {893offset: 0,894target: window895}, c.prototype.getState = function(a, b, c, d) {896var e = this.$target.scrollTop(),897f = this.$element.offset(),898g = this.$target.height();899if (null != c && "top" == this.affixed) return c > e ? "top" : !1;900if ("bottom" == this.affixed) return null != c ? e + this.unpin <= f.top ? !1 : "bottom" : a - d >= e + g ? !1 : "bottom";901var h = null == this.affixed,902i = h ? e : f.top,903j = h ? g : b;904return null != c && c >= e ? "top" : null != d && i + j >= a - d ? "bottom" : !1905}, c.prototype.getPinnedOffset = function() {906if (this.pinnedOffset) return this.pinnedOffset;907this.$element.removeClass(c.RESET).addClass("affix");908var a = this.$target.scrollTop(),909b = this.$element.offset();910return this.pinnedOffset = b.top - a911}, c.prototype.checkPositionWithEventLoop = function() {912setTimeout(a.proxy(this.checkPosition, this), 1)913}, c.prototype.checkPosition = function() {914if (this.$element.is(":visible")) {915var b = this.$element.height(),916d = this.options.offset,917e = d.top,918f = d.bottom,919g = Math.max(a(document).height(), a(document.body).height());920"object" != typeof d && (f = e = d), "function" == typeof e && (e = d.top(this.$element)), "function" == typeof f && (f = d.bottom(this.$element));921var h = this.getState(g, b, e, f);922if (this.affixed != h) {923null != this.unpin && this.$element.css("top", "");924var i = "affix" + (h ? "-" + h : ""),925j = a.Event(i + ".bs.affix");926if (this.$element.trigger(j), j.isDefaultPrevented()) return;927this.affixed = h, this.unpin = "bottom" == h ? this.getPinnedOffset() : null, this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix", "affixed") + ".bs.affix")928}929"bottom" == h && this.$element.offset({930top: g - b - f931})932}933};934var d = a.fn.affix;935a.fn.affix = b, a.fn.affix.Constructor = c, a.fn.affix.noConflict = function() {936return a.fn.affix = d, this937}, a(window).on("load", function() {938a('[data-spy="affix"]').each(function() {939var c = a(this),940d = c.data();941d.offset = d.offset || {}, null != d.offsetBottom && (d.offset.bottom = d.offsetBottom), null != d.offsetTop && (d.offset.top = d.offsetTop), b.call(c, d)942})943})944}(jQuery);945946