/** Abstract base class for collection plugins.
Written by Keith Wood (kbwood{at}iinet.com.au) December 2013.
Licensed under the MIT (https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license. */
(function() {
var j = false;
window.JQClass = function() {};
JQClass.classes = {};
JQClass.extend = function extender(f) {
var g = this.prototype;
j = true;
var h = new this();
j = false;
for (var i in f) {
h[i] = typeof f[i] == 'function' && typeof g[i] == 'function' ? (function(d, e) {
return function() {
var b = this._super;
this._super = function(a) {
return g[d].apply(this, a)
};
var c = e.apply(this, arguments);
this._super = b;
return c
}
})(i, f[i]) : f[i]
}
function JQClass() {
if (!j && this._init) {
this._init.apply(this, arguments)
}
}
JQClass.prototype = h;
JQClass.prototype.constructor = JQClass;
JQClass.extend = extender;
return JQClass
}
})();
(function($) {
JQClass.classes.JQPlugin = JQClass.extend({
name: 'plugin',
defaultOptions: {},
regionalOptions: {},
_getters: [],
_getMarker: function() {
return 'is-' + this.name
},
_init: function() {
$.extend(this.defaultOptions, (this.regionalOptions && this.regionalOptions['']) || {});
var c = camelCase(this.name);
$[c] = this;
$.fn[c] = function(a) {
var b = Array.prototype.slice.call(arguments, 1);
if ($[c]._isNotChained(a, b)) {
return $[c][a].apply($[c], [this[0]].concat(b))
}
return this.each(function() {
if (typeof a === 'string') {
if (a[0] === '_' || !$[c][a]) {
throw 'Unknown method: ' + a;
}
$[c][a].apply($[c], [this].concat(b))
} else {
$[c]._attach(this, a)
}
})
}
},
setDefaults: function(a) {
$.extend(this.defaultOptions, a || {})
},
_isNotChained: function(a, b) {
if (a === 'option' && (b.length === 0 || (b.length === 1 && typeof b[0] === 'string'))) {
return true
}
return $.inArray(a, this._getters) > -1
},
_attach: function(a, b) {
a = $(a);
if (a.hasClass(this._getMarker())) {
return
}
a.addClass(this._getMarker());
b = $.extend({}, this.defaultOptions, this._getMetadata(a), b || {});
var c = $.extend({
name: this.name,
elem: a,
options: b
}, this._instSettings(a, b));
a.data(this.name, c);
this._postAttach(a, c);
this.option(a, b)
},
_instSettings: function(a, b) {
return {}
},
_postAttach: function(a, b) {},
_getMetadata: function(d) {
try {
var f = d.data(this.name.toLowerCase()) || '';
f = f.replace(/'/g, '"');
f = f.replace(/([a-zA-Z0-9]+):/g, function(a, b, i) {
var c = f.substring(0, i).match(/"/g);
return (!c || c.length % 2 === 0 ? '"' + b + '":' : b + ':')
});
f = $.parseJSON('{' + f + '}');
for (var g in f) {
var h = f[g];
if (typeof h === 'string' && h.match(/^new Date\((.*)\)$/)) {
f[g] = eval(h)
}
}
return f
} catch (e) {
return {}
}
},
_getInst: function(a) {
return $(a).data(this.name) || {}
},
option: function(a, b, c) {
a = $(a);
var d = a.data(this.name);
if (!b || (typeof b === 'string' && c == null)) {
var e = (d || {}).options;
return (e && b ? e[b] : e)
}
if (!a.hasClass(this._getMarker())) {
return
}
var e = b || {};
if (typeof b === 'string') {
e = {};
e[b] = c
}
this._optionsChanged(a, d, e);
$.extend(d.options, e)
},
_optionsChanged: function(a, b, c) {},
destroy: function(a) {
a = $(a);
if (!a.hasClass(this._getMarker())) {
return
}
this._preDestroy(a, this._getInst(a));
a.removeData(this.name).removeClass(this._getMarker())
},
_preDestroy: function(a, b) {}
});
function camelCase(c) {
return c.replace(/-([a-z])/g, function(a, b) {
return b.toUpperCase()
})
}
$.JQPlugin = {
createPlugin: function(a, b) {
if (typeof a === 'object') {
b = a;
a = 'JQPlugin'
}
a = camelCase(a);
var c = camelCase(b.name);
JQClass.classes[c] = JQClass.classes[a].extend(b);
new JQClass.classes[c]()
}
}
})(jQuery);
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
if ("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requires jQuery"); + function(t) {
"use strict";
var e = t.fn.jquery.split(" ")[0].split(".");
if (e[0] < 2 && e[1] < 9 || 1 == e[0] && 9 == e[1] && e[2] < 1 || e[0] > 2) throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")
}(jQuery), + function(t) {
"use strict";
function e(e) {
return this.each(function() {
var i = t(this),
n = i.data("bs.alert");
n || i.data("bs.alert", n = new o(this)), "string" == typeof e && n[e].call(i)
})
}
var i = '[data-dismiss="alert"]',
o = function(e) {
t(e).on("click", i, this.close)
};
o.VERSION = "3.3.6", o.TRANSITION_DURATION = 150, o.prototype.close = function(e) {
function i() {
a.detach().trigger("closed.bs.alert").remove()
}
var n = t(this),
s = n.attr("data-target");
s || (s = n.attr("href"), s = s && s.replace(/.*(?=#[^\s]*$)/, ""));
var a = t(s);
e && e.preventDefault(), a.length || (a = n.closest(".alert")), a.trigger(e = t.Event("close.bs.alert")), e.isDefaultPrevented() || (a.removeClass("in"), t.support.transition && a.hasClass("fade") ? a.one("bsTransitionEnd", i).emulateTransitionEnd(o.TRANSITION_DURATION) : i())
};
var n = t.fn.alert;
t.fn.alert = e, t.fn.alert.Constructor = o, t.fn.alert.noConflict = function() {
return t.fn.alert = n, this
}, t(document).on("click.bs.alert.data-api", i, o.prototype.close)
}(jQuery), + function(t) {
"use strict";
function e(e) {
return this.each(function() {
var o = t(this),
n = o.data("bs.button"),
s = "object" == typeof e && e;
n || o.data("bs.button", n = new i(this, s)), "toggle" == e ? n.toggle() : e && n.setState(e)
})
}
var i = function(e, o) {
this.$element = t(e), this.options = t.extend({}, i.DEFAULTS, o), this.isLoading = !1
};
i.VERSION = "3.3.6", i.DEFAULTS = {
loadingText: "loading..."
}, i.prototype.setState = function(e) {
var i = "disabled",
o = this.$element,
n = o.is("input") ? "val" : "html",
s = o.data();
e += "Text", null == s.resetText && o.data("resetText", o[n]()), setTimeout(t.proxy(function() {
o[n](null == s[e] ? this.options[e] : s[e]), "loadingText" == e ? (this.isLoading = !0, o.addClass(i).attr(i, i)) : this.isLoading && (this.isLoading = !1, o.removeClass(i).removeAttr(i))
}, this), 0)
}, i.prototype.toggle = function() {
var t = !0,
e = this.$element.closest('[data-toggle="buttons"]');
if (e.length) {
var i = this.$element.find("input");
"radio" == i.prop("type") ? (i.prop("checked") && (t = !1), e.find(".active").removeClass("active"), this.$element.addClass("active")) : "checkbox" == i.prop("type") && (i.prop("checked") !== this.$element.hasClass("active") && (t = !1), this.$element.toggleClass("active")), i.prop("checked", this.$element.hasClass("active")), t && i.trigger("change")
} else this.$element.attr("aria-pressed", !this.$element.hasClass("active")), this.$element.toggleClass("active")
};
var o = t.fn.button;
t.fn.button = e, t.fn.button.Constructor = i, t.fn.button.noConflict = function() {
return t.fn.button = o, this
}, t(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function(i) {
var o = t(i.target);
o.hasClass("btn") || (o = o.closest(".btn")), e.call(o, "toggle"), t(i.target).is('input[type="radio"]') || t(i.target).is('input[type="checkbox"]') || i.preventDefault()
}).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function(e) {
t(e.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(e.type))
})
}(jQuery), + function(t) {
"use strict";
function e(e) {
return this.each(function() {
var o = t(this),
n = o.data("bs.carousel"),
s = t.extend({}, i.DEFAULTS, o.data(), "object" == typeof e && e),
a = "string" == typeof e ? e : s.slide;
n || o.data("bs.carousel", n = new i(this, s)), "number" == typeof e ? n.to(e) : a ? n[a]() : s.interval && n.pause().cycle()
})
}
var i = function(e, i) {
this.$element = t(e), this.$indicators = this.$element.find(".carousel-indicators"), this.options = i, this.paused = null, this.sliding = null, this.interval = null, this.$active = null, this.$items = null, this.options.keyboard && this.$element.on("keydown.bs.carousel", t.proxy(this.keydown, this)), "hover" == this.options.pause && !("ontouchstart" in document.documentElement) && this.$element.on("mouseenter.bs.carousel", t.proxy(this.pause, this)).on("mouseleave.bs.carousel", t.proxy(this.cycle, this))
};
i.VERSION = "3.3.6", i.TRANSITION_DURATION = 600, i.DEFAULTS = {
interval: 5e3,
pause: "hover",
wrap: !0,
keyboard: !0
}, i.prototype.keydown = function(t) {
if (!/input|textarea/i.test(t.target.tagName)) {
switch (t.which) {
case 37:
this.prev();
break;
case 39:
this.next();
break;
default:
return
}
t.preventDefault()
}
}, i.prototype.cycle = function(e) {
return e || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(t.proxy(this.next, this), this.options.interval)), this
}, i.prototype.getItemIndex = function(t) {
return this.$items = t.parent().children(".item"), this.$items.index(t || this.$active)
}, i.prototype.getItemForDirection = function(t, e) {
var i = this.getItemIndex(e),
o = "prev" == t && 0 === i || "next" == t && i == this.$items.length - 1;
if (o && !this.options.wrap) return e;
var n = "prev" == t ? -1 : 1,
s = (i + n) % this.$items.length;
return this.$items.eq(s)
}, i.prototype.to = function(t) {
var e = this,
i = this.getItemIndex(this.$active = this.$element.find(".item.active"));
return t > this.$items.length - 1 || 0 > t ? void 0 : this.sliding ? this.$element.one("slid.bs.carousel", function() {
e.to(t)
}) : i == t ? this.pause().cycle() : this.slide(t > i ? "next" : "prev", this.$items.eq(t))
}, i.prototype.pause = function(e) {
return e || (this.paused = !0), this.$element.find(".next, .prev").length && t.support.transition && (this.$element.trigger(t.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this
}, i.prototype.next = function() {
return this.sliding ? void 0 : this.slide("next")
}, i.prototype.prev = function() {
return this.sliding ? void 0 : this.slide("prev")
}, i.prototype.slide = function(e, o) {
var n = this.$element.find(".item.active"),
s = o || this.getItemForDirection(e, n),
a = this.interval,
r = "next" == e ? "left" : "right",
l = this;
if (s.hasClass("active")) return this.sliding = !1;
var h = s[0],
d = t.Event("slide.bs.carousel", {
relatedTarget: h,
direction: r
});
if (this.$element.trigger(d), !d.isDefaultPrevented()) {
if (this.sliding = !0, a && this.pause(), this.$indicators.length) {
this.$indicators.find(".active").removeClass("active");
var p = t(this.$indicators.children()[this.getItemIndex(s)]);
p && p.addClass("active")
}
var c = t.Event("slid.bs.carousel", {
relatedTarget: h,
direction: r
});
return t.support.transition && this.$element.hasClass("slide") ? (s.addClass(e), s[0].offsetWidth, n.addClass(r), s.addClass(r), n.one("bsTransitionEnd", function() {
s.removeClass([e, r].join(" ")).addClass("active"), n.removeClass(["active", r].join(" ")), l.sliding = !1, setTimeout(function() {
l.$element.trigger(c)
}, 0)
}).emulateTransitionEnd(i.TRANSITION_DURATION)) : (n.removeClass("active"), s.addClass("active"), this.sliding = !1, this.$element.trigger(c)), a && this.cycle(), this
}
};
var o = t.fn.carousel;
t.fn.carousel = e, t.fn.carousel.Constructor = i, t.fn.carousel.noConflict = function() {
return t.fn.carousel = o, this
};
var n = function(i) {
var o, n = t(this),
s = t(n.attr("data-target") || (o = n.attr("href")) && o.replace(/.*(?=#[^\s]+$)/, ""));
if (s.hasClass("carousel")) {
var a = t.extend({}, s.data(), n.data()),
r = n.attr("data-slide-to");
r && (a.interval = !1), e.call(s, a), r && s.data("bs.carousel").to(r), i.preventDefault()
}
};
t(document).on("click.bs.carousel.data-api", "[data-slide]", n).on("click.bs.carousel.data-api", "[data-slide-to]", n), t(window).on("load", function() {
t('[data-ride="carousel"]').each(function() {
var i = t(this);
e.call(i, i.data())
})
})
}(jQuery), + function(t) {
"use strict";
function e(e) {
var i = e.attr("data-target");
i || (i = e.attr("href"), i = i && /#[A-Za-z]/.test(i) && i.replace(/.*(?=#[^\s]*$)/, ""));
var o = i && t(i);
return o && o.length ? o : e.parent()
}
function i(i) {
i && 3 === i.which || (t(n).remove(), t(s).each(function() {
var o = t(this),
n = e(o),
s = {
relatedTarget: this
};
n.hasClass("open") && (i && "click" == i.type && /input|textarea/i.test(i.target.tagName) && t.contains(n[0], i.target) || (n.trigger(i = t.Event("hide.bs.dropdown", s)), i.isDefaultPrevented() || (o.attr("aria-expanded", "false"), n.removeClass("open").trigger(t.Event("hidden.bs.dropdown", s)))))
}))
}
function o(e) {
return this.each(function() {
var i = t(this),
o = i.data("bs.dropdown");
o || i.data("bs.dropdown", o = new a(this)), "string" == typeof e && o[e].call(i)
})
}
var n = ".dropdown-backdrop",
s = '[data-toggle="dropdown"]',
a = function(e) {
t(e).on("click.bs.dropdown", this.toggle)
};
a.VERSION = "3.3.6", a.prototype.toggle = function(o) {
var n = t(this);
if (!n.is(".disabled, :disabled")) {
var s = e(n),
a = s.hasClass("open");
if (i(), !a) {
"ontouchstart" in document.documentElement && !s.closest(".navbar-nav").length && t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click", i);
var r = {
relatedTarget: this
};
if (s.trigger(o = t.Event("show.bs.dropdown", r)), o.isDefaultPrevented()) return;
n.trigger("focus").attr("aria-expanded", "true"), s.toggleClass("open").trigger(t.Event("shown.bs.dropdown", r))
}
return !1
}
}, a.prototype.keydown = function(i) {
if (/(38|40|27|32)/.test(i.which) && !/input|textarea/i.test(i.target.tagName)) {
var o = t(this);
if (i.preventDefault(), i.stopPropagation(), !o.is(".disabled, :disabled")) {
var n = e(o),
a = n.hasClass("open");
if (!a && 27 != i.which || a && 27 == i.which) return 27 == i.which && n.find(s).trigger("focus"), o.trigger("click");
var r = " li:not(.disabled):visible a",
l = n.find(".dropdown-menu" + r);
if (l.length) {
var h = l.index(i.target);
38 == i.which && h > 0 && h--, 40 == i.which && h < l.length - 1 && h++, ~h || (h = 0), l.eq(h).trigger("focus")
}
}
}
};
var r = t.fn.dropdown;
t.fn.dropdown = o, t.fn.dropdown.Constructor = a, t.fn.dropdown.noConflict = function() {
return t.fn.dropdown = r, this
}, t(document).on("click.bs.dropdown.data-api", i).on("click.bs.dropdown.data-api", ".dropdown form", function(t) {
t.stopPropagation()
}).on("click.bs.dropdown.data-api", s, a.prototype.toggle).on("keydown.bs.dropdown.data-api", s, a.prototype.keydown).on("keydown.bs.dropdown.data-api", ".dropdown-menu", a.prototype.keydown)
}(jQuery), + function(t) {
"use strict";
function e(e, o) {
return this.each(function() {
var n = t(this),
s = n.data("bs.modal"),
a = t.extend({}, i.DEFAULTS, n.data(), "object" == typeof e && e);
s || n.data("bs.modal", s = new i(this, a)), "string" == typeof e ? s[e](o) : a.show && s.show(o)
})
}
var i = function(e, i) {
this.options = i, this.$body = t(document.body), this.$element = t(e), 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, t.proxy(function() {
this.$element.trigger("loaded.bs.modal")
}, this))
};
i.VERSION = "3.3.6", i.TRANSITION_DURATION = 300, i.BACKDROP_TRANSITION_DURATION = 150, i.DEFAULTS = {
backdrop: !0,
keyboard: !0,
show: !0
}, i.prototype.toggle = function(t) {
return this.isShown ? this.hide() : this.show(t)
}, i.prototype.show = function(e) {
var o = this,
n = t.Event("show.bs.modal", {
relatedTarget: e
});
this.$element.trigger(n), this.isShown || n.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"]', t.proxy(this.hide, this)), this.$dialog.on("mousedown.dismiss.bs.modal", function() {
o.$element.one("mouseup.dismiss.bs.modal", function(e) {
t(e.target).is(o.$element) && (o.ignoreBackdropClick = !0)
})
}), this.backdrop(function() {
var n = t.support.transition && o.$element.hasClass("fade");
o.$element.parent().length || o.$element.appendTo(o.$body), o.$element.show().scrollTop(0), o.adjustDialog(), n && o.$element[0].offsetWidth, o.$element.addClass("in"), o.enforceFocus();
var s = t.Event("shown.bs.modal", {
relatedTarget: e
});
n ? o.$dialog.one("bsTransitionEnd", function() {
o.$element.trigger("focus").trigger(s)
}).emulateTransitionEnd(i.TRANSITION_DURATION) : o.$element.trigger("focus").trigger(s)
}))
}, i.prototype.hide = function(e) {
e && e.preventDefault(), e = t.Event("hide.bs.modal"), this.$element.trigger(e), this.isShown && !e.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), t(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"), t.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", t.proxy(this.hideModal, this)).emulateTransitionEnd(i.TRANSITION_DURATION) : this.hideModal())
}, i.prototype.enforceFocus = function() {
t(document).off("focusin.bs.modal").on("focusin.bs.modal", t.proxy(function(t) {
this.$element[0] === t.target || this.$element.has(t.target).length || this.$element.trigger("focus")
}, this))
}, i.prototype.escape = function() {
this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", t.proxy(function(t) {
27 == t.which && this.hide()
}, this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal")
}, i.prototype.resize = function() {
this.isShown ? t(window).on("resize.bs.modal", t.proxy(this.handleUpdate, this)) : t(window).off("resize.bs.modal")
}, i.prototype.hideModal = function() {
var t = this;
this.$element.hide(), this.backdrop(function() {
t.$body.removeClass("modal-open"), t.resetAdjustments(), t.resetScrollbar(), t.$element.trigger("hidden.bs.modal")
})
}, i.prototype.removeBackdrop = function() {
this.$backdrop && this.$backdrop.remove(), this.$backdrop = null
}, i.prototype.backdrop = function(e) {
var o = this,
n = this.$element.hasClass("fade") ? "fade" : "";
if (this.isShown && this.options.backdrop) {
var s = t.support.transition && n;
if (this.$backdrop = t(document.createElement("div")).addClass("modal-backdrop " + n).appendTo(this.$body), this.$element.on("click.dismiss.bs.modal", t.proxy(function(t) {
return this.ignoreBackdropClick ? void(this.ignoreBackdropClick = !1) : void(t.target === t.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus() : this.hide()))
}, this)), s && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !e) return;
s ? this.$backdrop.one("bsTransitionEnd", e).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION) : e()
} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass("in");
var a = function() {
o.removeBackdrop(), e && e()
};
t.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", a).emulateTransitionEnd(i.BACKDROP_TRANSITION_DURATION) : a()
} else e && e()
}, i.prototype.handleUpdate = function() {
this.adjustDialog()
}, i.prototype.adjustDialog = function() {
var t = this.$element[0].scrollHeight > document.documentElement.clientHeight;
this.$element.css({
paddingLeft: !this.bodyIsOverflowing && t ? this.scrollbarWidth : "",
paddingRight: this.bodyIsOverflowing && !t ? this.scrollbarWidth : ""
})
}, i.prototype.resetAdjustments = function() {
this.$element.css({
paddingLeft: "",
paddingRight: ""
})
}, i.prototype.checkScrollbar = function() {
var t = window.innerWidth;
if (!t) {
var e = document.documentElement.getBoundingClientRect();
t = e.right - Math.abs(e.left)
}
this.bodyIsOverflowing = document.body.clientWidth < t, this.scrollbarWidth = this.measureScrollbar()
}, i.prototype.setScrollbar = function() {
var t = parseInt(this.$body.css("padding-right") || 0, 10);
this.originalBodyPad = document.body.style.paddingRight || "", this.bodyIsOverflowing && this.$body.css("padding-right", t + this.scrollbarWidth)
}, i.prototype.resetScrollbar = function() {
this.$body.css("padding-right", this.originalBodyPad)
}, i.prototype.measureScrollbar = function() {
var t = document.createElement("div");
t.className = "modal-scrollbar-measure", this.$body.append(t);
var e = t.offsetWidth - t.clientWidth;
return this.$body[0].removeChild(t), e
};
var o = t.fn.modal;
t.fn.modal = e, t.fn.modal.Constructor = i, t.fn.modal.noConflict = function() {
return t.fn.modal = o, this
}, t(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function(i) {
var o = t(this),
n = o.attr("href"),
s = t(o.attr("data-target") || n && n.replace(/.*(?=#[^\s]+$)/, "")),
a = s.data("bs.modal") ? "toggle" : t.extend({
remote: !/#/.test(n) && n
}, s.data(), o.data());
o.is("a") && i.preventDefault(), s.one("show.bs.modal", function(t) {
t.isDefaultPrevented() || s.one("hidden.bs.modal", function() {
o.is(":visible") && o.trigger("focus")
})
}), e.call(s, a, this)
})
}(jQuery), + function(t) {
"use strict";
function e(e) {
return this.each(function() {
var o = t(this),
n = o.data("bs.tooltip"),
s = "object" == typeof e && e;
(n || !/destroy|hide/.test(e)) && (n || o.data("bs.tooltip", n = new i(this, s)), "string" == typeof e && n[e]())
})
}
var i = function(t, e) {
this.type = null, this.options = null, this.enabled = null, this.timeout = null, this.hoverState = null, this.$element = null, this.inState = null, this.init("tooltip", t, e)
};
i.VERSION = "3.3.6", i.TRANSITION_DURATION = 150, i.DEFAULTS = {
animation: !0,
placement: "top",
selector: !1,
template: '
',
trigger: "hover focus",
title: "",
delay: 0,
html: !1,
container: !1,
viewport: {
selector: "body",
padding: 0
}
}, i.prototype.init = function(e, i, o) {
if (this.enabled = !0, this.type = e, this.$element = t(i), this.options = this.getOptions(o), this.$viewport = this.options.viewport && t(t.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : this.options.viewport.selector || this.options.viewport), this.inState = {
click: !1,
hover: !1,
focus: !1
}, this.$element[0] instanceof document.constructor && !this.options.selector) throw new Error("`selector` option must be specified when initializing " + this.type + " on the window.document object!");
for (var n = this.options.trigger.split(" "), s = n.length; s--;) {
var a = n[s];
if ("click" == a) this.$element.on("click." + this.type, this.options.selector, t.proxy(this.toggle, this));
else if ("manual" != a) {
var r = "hover" == a ? "mouseenter" : "focusin",
l = "hover" == a ? "mouseleave" : "focusout";
this.$element.on(r + "." + this.type, this.options.selector, t.proxy(this.enter, this)), this.$element.on(l + "." + this.type, this.options.selector, t.proxy(this.leave, this))
}
}
this.options.selector ? this._options = t.extend({}, this.options, {
trigger: "manual",
selector: ""
}) : this.fixTitle()
}, i.prototype.getDefaults = function() {
return i.DEFAULTS
}, i.prototype.getOptions = function(e) {
return e = t.extend({}, this.getDefaults(), this.$element.data(), e), e.delay && "number" == typeof e.delay && (e.delay = {
show: e.delay,
hide: e.delay
}), e
}, i.prototype.getDelegateOptions = function() {
var e = {},
i = this.getDefaults();
return this._options && t.each(this._options, function(t, o) {
i[t] != o && (e[t] = o)
}), e
}, i.prototype.enter = function(e) {
var i = e instanceof this.constructor ? e : t(e.currentTarget).data("bs." + this.type);
return i || (i = new this.constructor(e.currentTarget, this.getDelegateOptions()), t(e.currentTarget).data("bs." + this.type, i)), e instanceof t.Event && (i.inState["focusin" == e.type ? "focus" : "hover"] = !0), i.tip().hasClass("in") || "in" == i.hoverState ? void(i.hoverState = "in") : (clearTimeout(i.timeout), i.hoverState = "in", i.options.delay && i.options.delay.show ? void(i.timeout = setTimeout(function() {
"in" == i.hoverState && i.show()
}, i.options.delay.show)) : i.show())
}, i.prototype.isInStateTrue = function() {
for (var t in this.inState)
if (this.inState[t]) return !0;
return !1
}, i.prototype.leave = function(e) {
var i = e instanceof this.constructor ? e : t(e.currentTarget).data("bs." + this.type);
return i || (i = new this.constructor(e.currentTarget, this.getDelegateOptions()), t(e.currentTarget).data("bs." + this.type, i)), e instanceof t.Event && (i.inState["focusout" == e.type ? "focus" : "hover"] = !1), i.isInStateTrue() ? void 0 : (clearTimeout(i.timeout), i.hoverState = "out", i.options.delay && i.options.delay.hide ? void(i.timeout = setTimeout(function() {
"out" == i.hoverState && i.hide()
}, i.options.delay.hide)) : i.hide())
}, i.prototype.show = function() {
var e = t.Event("show.bs." + this.type);
if (this.hasContent() && this.enabled) {
this.$element.trigger(e);
var o = t.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]);
if (e.isDefaultPrevented() || !o) return;
var n = this,
s = this.tip(),
a = this.getUID(this.type);
this.setContent(), s.attr("id", a), this.$element.attr("aria-describedby", a), this.options.animation && s.addClass("fade");
var r = "function" == typeof this.options.placement ? this.options.placement.call(this, s[0], this.$element[0]) : this.options.placement,
l = /\s?auto?\s?/i,
h = l.test(r);
h && (r = r.replace(l, "") || "top"), s.detach().css({
top: 0,
left: 0,
display: "block"
}).addClass(r).data("bs." + this.type, this), this.options.container ? s.appendTo(this.options.container) : s.insertAfter(this.$element), this.$element.trigger("inserted.bs." + this.type);
var d = this.getPosition(),
p = s[0].offsetWidth,
c = s[0].offsetHeight;
if (h) {
var f = r,
u = this.getPosition(this.$viewport);
r = "bottom" == r && d.bottom + c > u.bottom ? "top" : "top" == r && d.top - c < u.top ? "bottom" : "right" == r && d.right + p > u.width ? "left" : "left" == r && d.left - p < u.left ? "right" : r, s.removeClass(f).addClass(r)
}
var g = this.getCalculatedOffset(r, d, p, c);
this.applyPlacement(g, r);
var v = function() {
var t = n.hoverState;
n.$element.trigger("shown.bs." + n.type), n.hoverState = null, "out" == t && n.leave(n)
};
t.support.transition && this.$tip.hasClass("fade") ? s.one("bsTransitionEnd", v).emulateTransitionEnd(i.TRANSITION_DURATION) : v()
}
}, i.prototype.applyPlacement = function(e, i) {
var o = this.tip(),
n = o[0].offsetWidth,
s = o[0].offsetHeight,
a = parseInt(o.css("margin-top"), 10),
r = parseInt(o.css("margin-left"), 10);
isNaN(a) && (a = 0), isNaN(r) && (r = 0), e.top += a, e.left += r, t.offset.setOffset(o[0], t.extend({
using: function(t) {
o.css({
top: Math.round(t.top),
left: Math.round(t.left)
})
}
}, e), 0), o.addClass("in");
var l = o[0].offsetWidth,
h = o[0].offsetHeight;
"top" == i && h != s && (e.top = e.top + s - h);
var d = this.getViewportAdjustedDelta(i, e, l, h);
d.left ? e.left += d.left : e.top += d.top;
var p = /top|bottom/.test(i),
c = p ? 2 * d.left - n + l : 2 * d.top - s + h,
f = p ? "offsetWidth" : "offsetHeight";
o.offset(e), this.replaceArrow(c, o[0][f], p)
}, i.prototype.replaceArrow = function(t, e, i) {
this.arrow().css(i ? "left" : "top", 50 * (1 - t / e) + "%").css(i ? "top" : "left", "")
}, i.prototype.setContent = function() {
var t = this.tip(),
e = this.getTitle();
t.find(".tooltip-inner")[this.options.html ? "html" : "text"](e), t.removeClass("fade in top bottom left right")
}, i.prototype.hide = function(e) {
function o() {
"in" != n.hoverState && s.detach(), n.$element.removeAttr("aria-describedby").trigger("hidden.bs." + n.type), e && e()
}
var n = this,
s = t(this.$tip),
a = t.Event("hide.bs." + this.type);
return this.$element.trigger(a), a.isDefaultPrevented() ? void 0 : (s.removeClass("in"), t.support.transition && s.hasClass("fade") ? s.one("bsTransitionEnd", o).emulateTransitionEnd(i.TRANSITION_DURATION) : o(), this.hoverState = null, this)
}, i.prototype.fixTitle = function() {
var t = this.$element;
(t.attr("title") || "string" != typeof t.attr("data-original-title")) && t.attr("data-original-title", t.attr("title") || "").attr("title", "")
}, i.prototype.hasContent = function() {
return this.getTitle()
}, i.prototype.getPosition = function(e) {
e = e || this.$element;
var i = e[0],
o = "BODY" == i.tagName,
n = i.getBoundingClientRect();
null == n.width && (n = t.extend({}, n, {
width: n.right - n.left,
height: n.bottom - n.top
}));
var s = o ? {
top: 0,
left: 0
} : e.offset(),
a = {
scroll: o ? document.documentElement.scrollTop || document.body.scrollTop : e.scrollTop()
},
r = o ? {
width: t(window).width(),
height: t(window).height()
} : null;
return t.extend({}, n, a, r, s)
}, i.prototype.getCalculatedOffset = function(t, e, i, o) {
return "bottom" == t ? {
top: e.top + e.height,
left: e.left + e.width / 2 - i / 2
} : "top" == t ? {
top: e.top - o,
left: e.left + e.width / 2 - i / 2
} : "left" == t ? {
top: e.top + e.height / 2 - o / 2,
left: e.left - i
} : {
top: e.top + e.height / 2 - o / 2,
left: e.left + e.width
}
}, i.prototype.getViewportAdjustedDelta = function(t, e, i, o) {
var n = {
top: 0,
left: 0
};
if (!this.$viewport) return n;
var s = this.options.viewport && this.options.viewport.padding || 0,
a = this.getPosition(this.$viewport);
if (/right|left/.test(t)) {
var r = e.top - s - a.scroll,
l = e.top + s - a.scroll + o;
r < a.top ? n.top = a.top - r : l > a.top + a.height && (n.top = a.top + a.height - l)
} else {
var h = e.left - s,
d = e.left + s + i;
h < a.left ? n.left = a.left - h : d > a.right && (n.left = a.left + a.width - d)
}
return n
}, i.prototype.getTitle = function() {
var t, e = this.$element,
i = this.options;
return t = e.attr("data-original-title") || ("function" == typeof i.title ? i.title.call(e[0]) : i.title)
}, i.prototype.getUID = function(t) {
do t += ~~(1e6 * Math.random()); while (document.getElementById(t));
return t
}, i.prototype.tip = function() {
if (!this.$tip && (this.$tip = t(this.options.template), 1 != this.$tip.length)) throw new Error(this.type + " `template` option must consist of exactly 1 top-level element!");
return this.$tip
}, i.prototype.arrow = function() {
return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
}, i.prototype.enable = function() {
this.enabled = !0
}, i.prototype.disable = function() {
this.enabled = !1
}, i.prototype.toggleEnabled = function() {
this.enabled = !this.enabled
}, i.prototype.toggle = function(e) {
var i = this;
e && (i = t(e.currentTarget).data("bs." + this.type), i || (i = new this.constructor(e.currentTarget, this.getDelegateOptions()), t(e.currentTarget).data("bs." + this.type, i))), e ? (i.inState.click = !i.inState.click, i.isInStateTrue() ? i.enter(i) : i.leave(i)) : i.tip().hasClass("in") ? i.leave(i) : i.enter(i)
}, i.prototype.destroy = function() {
var t = this;
clearTimeout(this.timeout), this.hide(function() {
t.$element.off("." + t.type).removeData("bs." + t.type), t.$tip && t.$tip.detach(), t.$tip = null, t.$arrow = null, t.$viewport = null
})
};
var o = t.fn.tooltip;
t.fn.tooltip = e, t.fn.tooltip.Constructor = i, t.fn.tooltip.noConflict = function() {
return t.fn.tooltip = o, this
}
}(jQuery), + function(t) {
"use strict";
function e(e) {
return this.each(function() {
var o = t(this),
n = o.data("bs.popover"),
s = "object" == typeof e && e;
(n || !/destroy|hide/.test(e)) && (n || o.data("bs.popover", n = new i(this, s)), "string" == typeof e && n[e]())
})
}
var i = function(t, e) {
this.init("popover", t, e)
};
if (!t.fn.tooltip) throw new Error("Popover requires tooltip.js");
i.VERSION = "3.3.6", i.DEFAULTS = t.extend({}, t.fn.tooltip.Constructor.DEFAULTS, {
placement: "right",
trigger: "click",
content: "",
template: ''
}), i.prototype = t.extend({}, t.fn.tooltip.Constructor.prototype), i.prototype.constructor = i, i.prototype.getDefaults = function() {
return i.DEFAULTS
}, i.prototype.setContent = function() {
var t = this.tip(),
e = this.getTitle(),
i = this.getContent();
t.find(".popover-title")[this.options.html ? "html" : "text"](e), t.find(".popover-content").children().detach().end()[this.options.html ? "string" == typeof i ? "html" : "append" : "text"](i), t.removeClass("fade top bottom left right in"), t.find(".popover-title").html() || t.find(".popover-title").hide()
}, i.prototype.hasContent = function() {
return this.getTitle() || this.getContent()
}, i.prototype.getContent = function() {
var t = this.$element,
e = this.options;
return t.attr("data-content") || ("function" == typeof e.content ? e.content.call(t[0]) : e.content)
}, i.prototype.arrow = function() {
return this.$arrow = this.$arrow || this.tip().find(".arrow")
};
var o = t.fn.popover;
t.fn.popover = e, t.fn.popover.Constructor = i, t.fn.popover.noConflict = function() {
return t.fn.popover = o, this
}
}(jQuery), + function(t) {
"use strict";
function e(e) {
return this.each(function() {
var o = t(this),
n = o.data("bs.tab");
n || o.data("bs.tab", n = new i(this)), "string" == typeof e && n[e]()
})
}
var i = function(e) {
this.element = t(e)
};
i.VERSION = "3.3.6", i.TRANSITION_DURATION = 150, i.prototype.show = function() {
var e = this.element,
i = e.closest("ul:not(.dropdown-menu)"),
o = e.data("target");
if (o || (o = e.attr("href"), o = o && o.replace(/.*(?=#[^\s]*$)/, "")), !e.parent("li").hasClass("active")) {
var n = i.find(".active:last a"),
s = t.Event("hide.bs.tab", {
relatedTarget: e[0]
}),
a = t.Event("show.bs.tab", {
relatedTarget: n[0]
});
if (n.trigger(s), e.trigger(a), !a.isDefaultPrevented() && !s.isDefaultPrevented()) {
var r = t(o);
this.activate(e.closest("li"), i), this.activate(r, r.parent(), function() {
n.trigger({
type: "hidden.bs.tab",
relatedTarget: e[0]
}), e.trigger({
type: "shown.bs.tab",
relatedTarget: n[0]
})
})
}
}
}, i.prototype.activate = function(e, o, n) {
function s() {
a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1), e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0), r ? (e[0].offsetWidth, e.addClass("in")) : e.removeClass("fade"), e.parent(".dropdown-menu").length && e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0), n && n()
}
var a = o.find("> .active"),
r = n && t.support.transition && (a.length && a.hasClass("fade") || !!o.find("> .fade").length);
a.length && r ? a.one("bsTransitionEnd", s).emulateTransitionEnd(i.TRANSITION_DURATION) : s(), a.removeClass("in")
};
var o = t.fn.tab;
t.fn.tab = e, t.fn.tab.Constructor = i, t.fn.tab.noConflict = function() {
return t.fn.tab = o, this
};
var n = function(i) {
i.preventDefault(), e.call(t(this), "show")
};
t(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', n).on("click.bs.tab.data-api", '[data-toggle="pill"]', n)
}(jQuery), + function(t) {
"use strict";
function e(e) {
return this.each(function() {
var o = t(this),
n = o.data("bs.affix"),
s = "object" == typeof e && e;
n || o.data("bs.affix", n = new i(this, s)), "string" == typeof e && n[e]()
})
}
var i = function(e, o) {
this.options = t.extend({}, i.DEFAULTS, o), this.$target = t(this.options.target).on("scroll.bs.affix.data-api", t.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", t.proxy(this.checkPositionWithEventLoop, this)), this.$element = t(e), this.affixed = null, this.unpin = null, this.pinnedOffset = null, this.checkPosition()
};
i.VERSION = "3.3.6", i.RESET = "affix affix-top affix-bottom", i.DEFAULTS = {
offset: 0,
target: window
}, i.prototype.getState = function(t, e, i, o) {
var n = this.$target.scrollTop(),
s = this.$element.offset(),
a = this.$target.height();
if (null != i && "top" == this.affixed) return i > n ? "top" : !1;
if ("bottom" == this.affixed) return null != i ? n + this.unpin <= s.top ? !1 : "bottom" : t - o >= n + a ? !1 : "bottom";
var r = null == this.affixed,
l = r ? n : s.top,
h = r ? a : e;
return null != i && i >= n ? "top" : null != o && l + h >= t - o ? "bottom" : !1
}, i.prototype.getPinnedOffset = function() {
if (this.pinnedOffset) return this.pinnedOffset;
this.$element.removeClass(i.RESET).addClass("affix");
var t = this.$target.scrollTop(),
e = this.$element.offset();
return this.pinnedOffset = e.top - t
}, i.prototype.checkPositionWithEventLoop = function() {
setTimeout(t.proxy(this.checkPosition, this), 1)
}, i.prototype.checkPosition = function() {
if (this.$element.is(":visible")) {
var e = this.$element.height(),
o = this.options.offset,
n = o.top,
s = o.bottom,
a = Math.max(t(document).height(), t(document.body).height());
"object" != typeof o && (s = n = o), "function" == typeof n && (n = o.top(this.$element)), "function" == typeof s && (s = o.bottom(this.$element));
var r = this.getState(a, e, n, s);
if (this.affixed != r) {
null != this.unpin && this.$element.css("top", "");
var l = "affix" + (r ? "-" + r : ""),
h = t.Event(l + ".bs.affix");
if (this.$element.trigger(h), h.isDefaultPrevented()) return;
this.affixed = r, this.unpin = "bottom" == r ? this.getPinnedOffset() : null, this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix", "affixed") + ".bs.affix")
}
"bottom" == r && this.$element.offset({
top: a - e - s
})
}
};
var o = t.fn.affix;
t.fn.affix = e, t.fn.affix.Constructor = i, t.fn.affix.noConflict = function() {
return t.fn.affix = o, this
}, t(window).on("load", function() {
t('[data-spy="affix"]').each(function() {
var i = t(this),
o = i.data();
o.offset = o.offset || {}, null != o.offsetBottom && (o.offset.bottom = o.offsetBottom), null != o.offsetTop && (o.offset.top = o.offsetTop), e.call(i, o)
})
})
}(jQuery), + function(t) {
"use strict";
function e(e) {
var i, o = e.attr("data-target") || (i = e.attr("href")) && i.replace(/.*(?=#[^\s]+$)/, "");
return t(o)
}
function i(e) {
return this.each(function() {
var i = t(this),
n = i.data("bs.collapse"),
s = t.extend({}, o.DEFAULTS, i.data(), "object" == typeof e && e);
!n && s.toggle && /show|hide/.test(e) && (s.toggle = !1), n || i.data("bs.collapse", n = new o(this, s)), "string" == typeof e && n[e]()
})
}
var o = function(e, i) {
this.$element = t(e), this.options = t.extend({}, o.DEFAULTS, i), this.$trigger = t('[data-toggle="collapse"][href="#' + e.id + '"],[data-toggle="collapse"][data-target="#' + e.id + '"]'), this.transitioning = null, this.options.parent ? this.$parent = this.getParent() : this.addAriaAndCollapsedClass(this.$element, this.$trigger), this.options.toggle && this.toggle()
};
o.VERSION = "3.3.6", o.TRANSITION_DURATION = 350, o.DEFAULTS = {
toggle: !0
}, o.prototype.dimension = function() {
var t = this.$element.hasClass("width");
return t ? "width" : "height"
}, o.prototype.show = function() {
if (!this.transitioning && !this.$element.hasClass("in")) {
var e, n = this.$parent && this.$parent.children(".panel").children(".in, .collapsing");
if (!(n && n.length && (e = n.data("bs.collapse"), e && e.transitioning))) {
var s = t.Event("show.bs.collapse");
if (this.$element.trigger(s), !s.isDefaultPrevented()) {
n && n.length && (i.call(n, "hide"), e || n.data("bs.collapse", null));
var a = this.dimension();
this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1;
var r = function() {
this.$element.removeClass("collapsing").addClass("collapse in")[a](""), this.transitioning = 0, this.$element.trigger("shown.bs.collapse")
};
if (!t.support.transition) return r.call(this);
var l = t.camelCase(["scroll", a].join("-"));
this.$element.one("bsTransitionEnd", t.proxy(r, this)).emulateTransitionEnd(o.TRANSITION_DURATION)[a](this.$element[0][l]);
}
}
}
}, o.prototype.hide = function() {
if (!this.transitioning && this.$element.hasClass("in")) {
var e = t.Event("hide.bs.collapse");
if (this.$element.trigger(e), !e.isDefaultPrevented()) {
var i = this.dimension();
this.$element[i](this.$element[i]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", !1), this.$trigger.addClass("collapsed").attr("aria-expanded", !1), this.transitioning = 1;
var n = function() {
this.transitioning = 0, this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")
};
return t.support.transition ? void this.$element[i](0).one("bsTransitionEnd", t.proxy(n, this)).emulateTransitionEnd(o.TRANSITION_DURATION) : n.call(this)
}
}
}, o.prototype.toggle = function() {
this[this.$element.hasClass("in") ? "hide" : "show"]()
}, o.prototype.getParent = function() {
return t(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(t.proxy(function(i, o) {
var n = t(o);
this.addAriaAndCollapsedClass(e(n), n)
}, this)).end()
}, o.prototype.addAriaAndCollapsedClass = function(t, e) {
var i = t.hasClass("in");
t.attr("aria-expanded", i), e.toggleClass("collapsed", !i).attr("aria-expanded", i)
};
var n = t.fn.collapse;
t.fn.collapse = i, t.fn.collapse.Constructor = o, t.fn.collapse.noConflict = function() {
return t.fn.collapse = n, this
}, t(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function(o) {
var n = t(this);
n.attr("data-target") || o.preventDefault();
var s = e(n),
a = s.data("bs.collapse"),
r = a ? "toggle" : n.data();
i.call(s, r)
})
}(jQuery), + function(t) {
"use strict";
function e(i, o) {
this.$body = t(document.body), this.$scrollElement = t(t(i).is(document.body) ? window : i), this.options = t.extend({}, e.DEFAULTS, o), this.selector = (this.options.target || "") + " .nav li > a", this.offsets = [], this.targets = [], this.activeTarget = null, this.scrollHeight = 0, this.$scrollElement.on("scroll.bs.scrollspy", t.proxy(this.process, this)), this.refresh(), this.process()
}
function i(i) {
return this.each(function() {
var o = t(this),
n = o.data("bs.scrollspy"),
s = "object" == typeof i && i;
n || o.data("bs.scrollspy", n = new e(this, s)), "string" == typeof i && n[i]()
})
}
e.VERSION = "3.3.6", e.DEFAULTS = {
offset: 10
}, e.prototype.getScrollHeight = function() {
return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
}, e.prototype.refresh = function() {
var e = this,
i = "offset",
o = 0;
this.offsets = [], this.targets = [], this.scrollHeight = this.getScrollHeight(), t.isWindow(this.$scrollElement[0]) || (i = "position", o = this.$scrollElement.scrollTop()), this.$body.find(this.selector).map(function() {
var e = t(this),
n = e.data("target") || e.attr("href"),
s = /^#./.test(n) && t(n);
return s && s.length && s.is(":visible") && [
[s[i]().top + o, n]
] || null
}).sort(function(t, e) {
return t[0] - e[0]
}).each(function() {
e.offsets.push(this[0]), e.targets.push(this[1])
})
}, e.prototype.process = function() {
var t, e = this.$scrollElement.scrollTop() + this.options.offset,
i = this.getScrollHeight(),
o = this.options.offset + i - this.$scrollElement.height(),
n = this.offsets,
s = this.targets,
a = this.activeTarget;
if (this.scrollHeight != i && this.refresh(), e >= o) return a != (t = s[s.length - 1]) && this.activate(t);
if (a && e < n[0]) return this.activeTarget = null, this.clear();
for (t = n.length; t--;) a != s[t] && e >= n[t] && (void 0 === n[t + 1] || e < n[t + 1]) && this.activate(s[t])
}, e.prototype.activate = function(e) {
this.activeTarget = e, this.clear();
var i = this.selector + '[data-target="' + e + '"],' + this.selector + '[href="' + e + '"]',
o = t(i).parents("li").addClass("active");
o.parent(".dropdown-menu").length && (o = o.closest("li.dropdown").addClass("active")), o.trigger("activate.bs.scrollspy")
}, e.prototype.clear = function() {
t(this.selector).parentsUntil(this.options.target, ".active").removeClass("active")
};
var o = t.fn.scrollspy;
t.fn.scrollspy = i, t.fn.scrollspy.Constructor = e, t.fn.scrollspy.noConflict = function() {
return t.fn.scrollspy = o, this
}, t(window).on("load.bs.scrollspy.data-api", function() {
t('[data-spy="scroll"]').each(function() {
var e = t(this);
i.call(e, e.data())
})
})
}(jQuery), + function(t) {
"use strict";
function e() {
var t = document.createElement("bootstrap"),
e = {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "oTransitionEnd otransitionend",
transition: "transitionend"
};
for (var i in e)
if (void 0 !== t.style[i]) return {
end: e[i]
};
return !1
}
t.fn.emulateTransitionEnd = function(e) {
var i = !1,
o = this;
t(this).one("bsTransitionEnd", function() {
i = !0
});
var n = function() {
i || t(o).trigger(t.support.transition.end)
};
return setTimeout(n, e), this
}, t(function() {
t.support.transition = e(), t.support.transition && (t.event.special.bsTransitionEnd = {
bindType: t.support.transition.end,
delegateType: t.support.transition.end,
handle: function(e) {
return t(e.target).is(this) ? e.handleObj.handler.apply(this, arguments) : void 0
}
})
})
}(jQuery);
/*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
* http://jqueryvalidation.org/
* Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
! function(a) {
"function" == typeof define && define.amd ? define(["jquery"], a) : a(jQuery)
}(function(a) {
a.extend(a.fn, {
validate: function(b) {
if (!this.length) return void(b && b.debug && window.console && console.warn("Nothing selected, can't validate, returning nothing."));
var c = a.data(this[0], "validator");
return c ? c : (this.attr("novalidate", "novalidate"), c = new a.validator(b, this[0]), a.data(this[0], "validator", c), c.settings.onsubmit && (this.on("click.validate", ":submit", function(b) {
c.settings.submitHandler && (c.submitButton = b.target), a(this).hasClass("cancel") && (c.cancelSubmit = !0), void 0 !== a(this).attr("formnovalidate") && (c.cancelSubmit = !0)
}), this.on("submit.validate", function(b) {
function d() {
var d, e;
return c.settings.submitHandler ? (c.submitButton && (d = a("").attr("name", c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)), e = c.settings.submitHandler.call(c, c.currentForm, b), c.submitButton && d.remove(), void 0 !== e ? e : !1) : !0
}
return c.settings.debug && b.preventDefault(), c.cancelSubmit ? (c.cancelSubmit = !1, d()) : c.form() ? c.pendingRequest ? (c.formSubmitted = !0, !1) : d() : (c.focusInvalid(), !1)
})), c)
},
valid: function() {
var b, c, d;
return a(this[0]).is("form") ? b = this.validate().form() : (d = [], b = !0, c = a(this[0].form).validate(), this.each(function() {
b = c.element(this) && b, d = d.concat(c.errorList)
}), c.errorList = d), b
},
rules: function(b, c) {
var d, e, f, g, h, i, j = this[0];
if (b) switch (d = a.data(j.form, "validator").settings, e = d.rules, f = a.validator.staticRules(j), b) {
case "add":
a.extend(f, a.validator.normalizeRule(c)), delete f.messages, e[j.name] = f, c.messages && (d.messages[j.name] = a.extend(d.messages[j.name], c.messages));
break;
case "remove":
return c ? (i = {}, a.each(c.split(/\s/), function(b, c) {
i[c] = f[c], delete f[c], "required" === c && a(j).removeAttr("aria-required")
}), i) : (delete e[j.name], f)
}
return g = a.validator.normalizeRules(a.extend({}, a.validator.classRules(j), a.validator.attributeRules(j), a.validator.dataRules(j), a.validator.staticRules(j)), j), g.required && (h = g.required, delete g.required, g = a.extend({
required: h
}, g), a(j).attr("aria-required", "true")), g.remote && (h = g.remote, delete g.remote, g = a.extend(g, {
remote: h
})), g
}
}), a.extend(a.expr[":"], {
blank: function(b) {
return !a.trim("" + a(b).val())
},
filled: function(b) {
return !!a.trim("" + a(b).val())
},
unchecked: function(b) {
return !a(b).prop("checked")
}
}), a.validator = function(b, c) {
this.settings = a.extend(!0, {}, a.validator.defaults, b), this.currentForm = c, this.init()
}, a.validator.format = function(b, c) {
return 1 === arguments.length ? function() {
var c = a.makeArray(arguments);
return c.unshift(b), a.validator.format.apply(this, c)
} : (arguments.length > 2 && c.constructor !== Array && (c = a.makeArray(arguments).slice(1)), c.constructor !== Array && (c = [c]), a.each(c, function(a, c) {
b = b.replace(new RegExp("\\{" + a + "\\}", "g"), function() {
return c
})
}), b)
}, a.extend(a.validator, {
defaults: {
messages: {},
groups: {},
rules: {},
errorClass: "error",
validClass: "valid",
errorElement: "label",
focusCleanup: !1,
focusInvalid: !0,
errorContainer: a([]),
errorLabelContainer: a([]),
onsubmit: !0,
ignore: ":hidden",
ignoreTitle: !1,
onfocusin: function(a) {
this.lastActive = a, this.settings.focusCleanup && (this.settings.unhighlight && this.settings.unhighlight.call(this, a, this.settings.errorClass, this.settings.validClass), this.hideThese(this.errorsFor(a)))
},
onfocusout: function(a) {
this.checkable(a) || !(a.name in this.submitted) && this.optional(a) || this.element(a)
},
onkeyup: function(b, c) {
var d = [16, 17, 18, 20, 35, 36, 37, 38, 39, 40, 45, 144, 225];
9 === c.which && "" === this.elementValue(b) || -1 !== a.inArray(c.keyCode, d) || (b.name in this.submitted || b === this.lastElement) && this.element(b)
},
onclick: function(a) {
a.name in this.submitted ? this.element(a) : a.parentNode.name in this.submitted && this.element(a.parentNode)
},
highlight: function(b, c, d) {
"radio" === b.type ? this.findByName(b.name).addClass(c).removeClass(d) : a(b).addClass(c).removeClass(d)
},
unhighlight: function(b, c, d) {
"radio" === b.type ? this.findByName(b.name).removeClass(c).addClass(d) : a(b).removeClass(c).addClass(d)
}
},
setDefaults: function(b) {
a.extend(a.validator.defaults, b)
},
messages: {
required: "This field is required.",
remote: "Please fix this field.",
email: "Please enter a valid email address.",
url: "Please enter a valid URL.",
date: "Please enter a valid date.",
dateISO: "Please enter a valid date ( ISO ).",
number: "Please enter a valid number.",
digits: "Please enter only digits.",
creditcard: "Please enter a valid credit card number.",
equalTo: "Please enter the same value again.",
maxlength: a.validator.format("Please enter no more than {0} characters."),
minlength: a.validator.format("Please enter at least {0} characters."),
rangelength: a.validator.format("Please enter a value between {0} and {1} characters long."),
range: a.validator.format("Please enter a value between {0} and {1}."),
max: a.validator.format("Please enter a value less than or equal to {0}."),
min: a.validator.format("Please enter a value greater than or equal to {0}.")
},
autoCreateRanges: !1,
prototype: {
init: function() {
function b(b) {
var c = a.data(this.form, "validator"),
d = "on" + b.type.replace(/^validate/, ""),
e = c.settings;
e[d] && !a(this).is(e.ignore) && e[d].call(c, this, b)
}
this.labelContainer = a(this.settings.errorLabelContainer), this.errorContext = this.labelContainer.length && this.labelContainer || a(this.currentForm), this.containers = a(this.settings.errorContainer).add(this.settings.errorLabelContainer), this.submitted = {}, this.valueCache = {}, this.pendingRequest = 0, this.pending = {}, this.invalid = {}, this.reset();
var c, d = this.groups = {};
a.each(this.settings.groups, function(b, c) {
"string" == typeof c && (c = c.split(/\s/)), a.each(c, function(a, c) {
d[c] = b
})
}), c = this.settings.rules, a.each(c, function(b, d) {
c[b] = a.validator.normalizeRule(d)
}), a(this.currentForm).on("focusin.validate focusout.validate keyup.validate", ":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']", b).on("click.validate", "select, option, [type='radio'], [type='checkbox']", b), this.settings.invalidHandler && a(this.currentForm).on("invalid-form.validate", this.settings.invalidHandler), a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required", "true")
},
form: function() {
return this.checkForm(), a.extend(this.submitted, this.errorMap), this.invalid = a.extend({}, this.errorMap), this.valid() || a(this.currentForm).triggerHandler("invalid-form", [this]), this.showErrors(), this.valid()
},
checkForm: function() {
this.prepareForm();
for (var a = 0, b = this.currentElements = this.elements(); b[a]; a++) this.check(b[a]);
return this.valid()
},
element: function(b) {
var c = this.clean(b),
d = this.validationTargetFor(c),
e = !0;
return this.lastElement = d, void 0 === d ? delete this.invalid[c.name] : (this.prepareElement(d), this.currentElements = a(d), e = this.check(d) !== !1, e ? delete this.invalid[d.name] : this.invalid[d.name] = !0), a(b).attr("aria-invalid", !e), this.numberOfInvalids() || (this.toHide = this.toHide.add(this.containers)), this.showErrors(), e
},
showErrors: function(b) {
if (b) {
a.extend(this.errorMap, b), this.errorList = [];
for (var c in b) this.errorList.push({
message: b[c],
element: this.findByName(c)[0]
});
this.successList = a.grep(this.successList, function(a) {
return !(a.name in b)
})
}
this.settings.showErrors ? this.settings.showErrors.call(this, this.errorMap, this.errorList) : this.defaultShowErrors()
},
resetForm: function() {
a.fn.resetForm && a(this.currentForm).resetForm(), this.submitted = {}, this.lastElement = null, this.prepareForm(), this.hideErrors();
var b, c = this.elements().removeData("previousValue").removeAttr("aria-invalid");
if (this.settings.unhighlight)
for (b = 0; c[b]; b++) this.settings.unhighlight.call(this, c[b], this.settings.errorClass, "");
else c.removeClass(this.settings.errorClass)
},
numberOfInvalids: function() {
return this.objectLength(this.invalid)
},
objectLength: function(a) {
var b, c = 0;
for (b in a) c++;
return c
},
hideErrors: function() {
this.hideThese(this.toHide)
},
hideThese: function(a) {
a.not(this.containers).text(""), this.addWrapper(a).hide()
},
valid: function() {
return 0 === this.size()
},
size: function() {
return this.errorList.length
},
focusInvalid: function() {
if (this.settings.focusInvalid) try {
a(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus().trigger("focusin")
} catch (b) {}
},
findLastActive: function() {
var b = this.lastActive;
return b && 1 === a.grep(this.errorList, function(a) {
return a.element.name === b.name
}).length && b
},
elements: function() {
var b = this,
c = {};
return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function() {
return !this.name && b.settings.debug && window.console && console.error("%o has no name assigned", this), this.name in c || !b.objectLength(a(this).rules()) ? !1 : (c[this.name] = !0, !0)
})
},
clean: function(b) {
return a(b)[0]
},
errors: function() {
var b = this.settings.errorClass.split(" ").join(".");
return a(this.settings.errorElement + "." + b, this.errorContext)
},
reset: function() {
this.successList = [], this.errorList = [], this.errorMap = {}, this.toShow = a([]), this.toHide = a([]), this.currentElements = a([])
},
prepareForm: function() {
this.reset(), this.toHide = this.errors().add(this.containers)
},
prepareElement: function(a) {
this.reset(), this.toHide = this.errorsFor(a)
},
elementValue: function(b) {
var c, d = a(b),
e = b.type;
return "radio" === e || "checkbox" === e ? this.findByName(b.name).filter(":checked").val() : "number" === e && "undefined" != typeof b.validity ? b.validity.badInput ? !1 : d.val() : (c = d.val(), "string" == typeof c ? c.replace(/\r/g, "") : c)
},
check: function(b) {
b = this.validationTargetFor(this.clean(b));
var c, d, e, f = a(b).rules(),
g = a.map(f, function(a, b) {
return b
}).length,
h = !1,
i = this.elementValue(b);
for (d in f) {
e = {
method: d,
parameters: f[d]
};
try {
if (c = a.validator.methods[d].call(this, i, b, e.parameters), "dependency-mismatch" === c && 1 === g) {
h = !0;
continue
}
if (h = !1, "pending" === c) return void(this.toHide = this.toHide.not(this.errorsFor(b)));
if (!c) return this.formatAndAdd(b, e), !1
} catch (j) {
throw this.settings.debug && window.console && console.log("Exception occurred when checking element " + b.id + ", check the '" + e.method + "' method.", j), j instanceof TypeError && (j.message += ". Exception occurred when checking element " + b.id + ", check the '" + e.method + "' method."), j
}
}
if (!h) return this.objectLength(f) && this.successList.push(b), !0
},
customDataMessage: function(b, c) {
return a(b).data("msg" + c.charAt(0).toUpperCase() + c.substring(1).toLowerCase()) || a(b).data("msg")
},
customMessage: function(a, b) {
var c = this.settings.messages[a];
return c && (c.constructor === String ? c : c[b])
},
findDefined: function() {
for (var a = 0; a < arguments.length; a++)
if (void 0 !== arguments[a]) return arguments[a];
return void 0
},
defaultMessage: function(b, c) {
return this.findDefined(this.customMessage(b.name, c), this.customDataMessage(b, c), !this.settings.ignoreTitle && b.title || void 0, a.validator.messages[c], "Warning: No message defined for " + b.name + "")
},
formatAndAdd: function(b, c) {
var d = this.defaultMessage(b, c.method),
e = /\$?\{(\d+)\}/g;
"function" == typeof d ? d = d.call(this, c.parameters, b) : e.test(d) && (d = a.validator.format(d.replace(e, "{$1}"), c.parameters)), this.errorList.push({
message: d,
element: b,
method: c.method
}), this.errorMap[b.name] = d, this.submitted[b.name] = d
},
addWrapper: function(a) {
return this.settings.wrapper && (a = a.add(a.parent(this.settings.wrapper))), a
},
defaultShowErrors: function() {
var a, b, c;
for (a = 0; this.errorList[a]; a++) c = this.errorList[a], this.settings.highlight && this.settings.highlight.call(this, c.element, this.settings.errorClass, this.settings.validClass), this.showLabel(c.element, c.message);
if (this.errorList.length && (this.toShow = this.toShow.add(this.containers)), this.settings.success)
for (a = 0; this.successList[a]; a++) this.showLabel(this.successList[a]);
if (this.settings.unhighlight)
for (a = 0, b = this.validElements(); b[a]; a++) this.settings.unhighlight.call(this, b[a], this.settings.errorClass, this.settings.validClass);
this.toHide = this.toHide.not(this.toShow), this.hideErrors(), this.addWrapper(this.toShow).show()
},
validElements: function() {
return this.currentElements.not(this.invalidElements())
},
invalidElements: function() {
return a(this.errorList).map(function() {
return this.element
})
},
showLabel: function(b, c) {
var d, e, f, g = this.errorsFor(b),
h = this.idOrName(b),
i = a(b).attr("aria-describedby");
g.length ? (g.removeClass(this.settings.validClass).addClass(this.settings.errorClass), g.html(c)) : (g = a("<" + this.settings.errorElement + ">").attr("id", h + "-error").addClass(this.settings.errorClass).html(c || ""), d = g, this.settings.wrapper && (d = g.hide().show().wrap("<" + this.settings.wrapper + "/>").parent()), this.labelContainer.length ? this.labelContainer.append(d) : this.settings.errorPlacement ? this.settings.errorPlacement(d, a(b)) : d.insertAfter(b), g.is("label") ? g.attr("for", h) : 0 === g.parents("label[for='" + h + "']").length && (f = g.attr("id").replace(/(:|\.|\[|\]|\$)/g, "\\$1"), i ? i.match(new RegExp("\\b" + f + "\\b")) || (i += " " + f) : i = f, a(b).attr("aria-describedby", i), e = this.groups[b.name], e && a.each(this.groups, function(b, c) {
c === e && a("[name='" + b + "']", this.currentForm).attr("aria-describedby", g.attr("id"))
}))), !c && this.settings.success && (g.text(""), "string" == typeof this.settings.success ? g.addClass(this.settings.success) : this.settings.success(g, b)), this.toShow = this.toShow.add(g)
},
errorsFor: function(b) {
var c = this.idOrName(b),
d = a(b).attr("aria-describedby"),
e = "label[for='" + c + "'], label[for='" + c + "'] *";
return d && (e = e + ", #" + d.replace(/\s+/g, ", #")), this.errors().filter(e)
},
idOrName: function(a) {
return this.groups[a.name] || (this.checkable(a) ? a.name : a.id || a.name)
},
validationTargetFor: function(b) {
return this.checkable(b) && (b = this.findByName(b.name)), a(b).not(this.settings.ignore)[0]
},
checkable: function(a) {
return /radio|checkbox/i.test(a.type)
},
findByName: function(b) {
return a(this.currentForm).find("[name='" + b + "']")
},
getLength: function(b, c) {
switch (c.nodeName.toLowerCase()) {
case "select":
return a("option:selected", c).length;
case "input":
if (this.checkable(c)) return this.findByName(c.name).filter(":checked").length
}
return b.length
},
depend: function(a, b) {
return this.dependTypes[typeof a] ? this.dependTypes[typeof a](a, b) : !0
},
dependTypes: {
"boolean": function(a) {
return a
},
string: function(b, c) {
return !!a(b, c.form).length
},
"function": function(a, b) {
return a(b)
}
},
optional: function(b) {
var c = this.elementValue(b);
return !a.validator.methods.required.call(this, c, b) && "dependency-mismatch"
},
startRequest: function(a) {
this.pending[a.name] || (this.pendingRequest++, this.pending[a.name] = !0)
},
stopRequest: function(b, c) {
this.pendingRequest--, this.pendingRequest < 0 && (this.pendingRequest = 0), delete this.pending[b.name], c && 0 === this.pendingRequest && this.formSubmitted && this.form() ? (a(this.currentForm).submit(), this.formSubmitted = !1) : !c && 0 === this.pendingRequest && this.formSubmitted && (a(this.currentForm).triggerHandler("invalid-form", [this]), this.formSubmitted = !1)
},
previousValue: function(b) {
return a.data(b, "previousValue") || a.data(b, "previousValue", {
old: null,
valid: !0,
message: this.defaultMessage(b, "remote")
})
},
destroy: function() {
this.resetForm(), a(this.currentForm).off(".validate").removeData("validator")
}
},
classRuleSettings: {
required: {
required: !0
},
email: {
email: !0
},
url: {
url: !0
},
date: {
date: !0
},
dateISO: {
dateISO: !0
},
number: {
number: !0
},
digits: {
digits: !0
},
creditcard: {
creditcard: !0
}
},
addClassRules: function(b, c) {
b.constructor === String ? this.classRuleSettings[b] = c : a.extend(this.classRuleSettings, b)
},
classRules: function(b) {
var c = {},
d = a(b).attr("class");
return d && a.each(d.split(" "), function() {
this in a.validator.classRuleSettings && a.extend(c, a.validator.classRuleSettings[this])
}), c
},
normalizeAttributeRule: function(a, b, c, d) {
/min|max/.test(c) && (null === b || /number|range|text/.test(b)) && (d = Number(d), isNaN(d) && (d = void 0)), d || 0 === d ? a[c] = d : b === c && "range" !== b && (a[c] = !0)
},
attributeRules: function(b) {
var c, d, e = {},
f = a(b),
g = b.getAttribute("type");
for (c in a.validator.methods) "required" === c ? (d = b.getAttribute(c), "" === d && (d = !0), d = !!d) : d = f.attr(c), this.normalizeAttributeRule(e, g, c, d);
return e.maxlength && /-1|2147483647|524288/.test(e.maxlength) && delete e.maxlength, e
},
dataRules: function(b) {
var c, d, e = {},
f = a(b),
g = b.getAttribute("type");
for (c in a.validator.methods) d = f.data("rule" + c.charAt(0).toUpperCase() + c.substring(1).toLowerCase()), this.normalizeAttributeRule(e, g, c, d);
return e
},
staticRules: function(b) {
var c = {},
d = a.data(b.form, "validator");
return d.settings.rules && (c = a.validator.normalizeRule(d.settings.rules[b.name]) || {}), c
},
normalizeRules: function(b, c) {
return a.each(b, function(d, e) {
if (e === !1) return void delete b[d];
if (e.param || e.depends) {
var f = !0;
switch (typeof e.depends) {
case "string":
f = !!a(e.depends, c.form).length;
break;
case "function":
f = e.depends.call(c, c)
}
f ? b[d] = void 0 !== e.param ? e.param : !0 : delete b[d]
}
}), a.each(b, function(d, e) {
b[d] = a.isFunction(e) ? e(c) : e
}), a.each(["minlength", "maxlength"], function() {
b[this] && (b[this] = Number(b[this]))
}), a.each(["rangelength", "range"], function() {
var c;
b[this] && (a.isArray(b[this]) ? b[this] = [Number(b[this][0]), Number(b[this][1])] : "string" == typeof b[this] && (c = b[this].replace(/[\[\]]/g, "").split(/[\s,]+/), b[this] = [Number(c[0]), Number(c[1])]))
}), a.validator.autoCreateRanges && (null != b.min && null != b.max && (b.range = [b.min, b.max], delete b.min, delete b.max), null != b.minlength && null != b.maxlength && (b.rangelength = [b.minlength, b.maxlength], delete b.minlength, delete b.maxlength)), b
},
normalizeRule: function(b) {
if ("string" == typeof b) {
var c = {};
a.each(b.split(/\s/), function() {
c[this] = !0
}), b = c
}
return b
},
addMethod: function(b, c, d) {
a.validator.methods[b] = c, a.validator.messages[b] = void 0 !== d ? d : a.validator.messages[b], c.length < 3 && a.validator.addClassRules(b, a.validator.normalizeRule(b))
},
methods: {
required: function(b, c, d) {
if (!this.depend(d, c)) return "dependency-mismatch";
if ("select" === c.nodeName.toLowerCase()) {
var e = a(c).val();
return e && e.length > 0
}
return this.checkable(c) ? this.getLength(b, c) > 0 : b.length > 0
},
email: function(a, b) {
return this.optional(b) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)
},
url: function(a, b) {
return this.optional(b) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)
},
date: function(a, b) {
return this.optional(b) || !/Invalid|NaN/.test(new Date(a).toString())
},
dateISO: function(a, b) {
return this.optional(b) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)
},
number: function(a, b) {
return this.optional(b) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)
},
digits: function(a, b) {
return this.optional(b) || /^\d+$/.test(a)
},
creditcard: function(a, b) {
if (this.optional(b)) return "dependency-mismatch";
if (/[^0-9 \-]+/.test(a)) return !1;
var c, d, e = 0,
f = 0,
g = !1;
if (a = a.replace(/\D/g, ""), a.length < 13 || a.length > 19) return !1;
for (c = a.length - 1; c >= 0; c--) d = a.charAt(c), f = parseInt(d, 10), g && (f *= 2) > 9 && (f -= 9), e += f, g = !g;
return e % 10 === 0
},
minlength: function(b, c, d) {
var e = a.isArray(b) ? b.length : this.getLength(b, c);
return this.optional(c) || e >= d
},
maxlength: function(b, c, d) {
var e = a.isArray(b) ? b.length : this.getLength(b, c);
return this.optional(c) || d >= e
},
rangelength: function(b, c, d) {
var e = a.isArray(b) ? b.length : this.getLength(b, c);
return this.optional(c) || e >= d[0] && e <= d[1]
},
min: function(a, b, c) {
return this.optional(b) || a >= c
},
max: function(a, b, c) {
return this.optional(b) || c >= a
},
range: function(a, b, c) {
return this.optional(b) || a >= c[0] && a <= c[1]
},
equalTo: function(b, c, d) {
var e = a(d);
return this.settings.onfocusout && e.off(".validate-equalTo").on("blur.validate-equalTo", function() {
a(c).valid()
}), b === e.val()
},
remote: function(b, c, d) {
if (this.optional(c)) return "dependency-mismatch";
var e, f, g = this.previousValue(c);
return this.settings.messages[c.name] || (this.settings.messages[c.name] = {}), g.originalMessage = this.settings.messages[c.name].remote, this.settings.messages[c.name].remote = g.message, d = "string" == typeof d && {
url: d
} || d, g.old === b ? g.valid : (g.old = b, e = this, this.startRequest(c), f = {}, f[c.name] = b, a.ajax(a.extend(!0, {
mode: "abort",
port: "validate" + c.name,
dataType: "json",
data: f,
context: e.currentForm,
success: function(d) {
var f, h, i, j = d === !0 || "true" === d;
e.settings.messages[c.name].remote = g.originalMessage, j ? (i = e.formSubmitted, e.prepareElement(c), e.formSubmitted = i, e.successList.push(c), delete e.invalid[c.name], e.showErrors()) : (f = {}, h = d || e.defaultMessage(c, "remote"), f[c.name] = g.message = a.isFunction(h) ? h(b) : h, e.invalid[c.name] = !0, e.showErrors(f)), g.valid = j, e.stopRequest(c, j)
}
}, d)), "pending")
}
}
});
var b, c = {};
a.ajaxPrefilter ? a.ajaxPrefilter(function(a, b, d) {
var e = a.port;
"abort" === a.mode && (c[e] && c[e].abort(), c[e] = d)
}) : (b = a.ajax, a.ajax = function(d) {
var e = ("mode" in d ? d : a.ajaxSettings).mode,
f = ("port" in d ? d : a.ajaxSettings).port;
return "abort" === e ? (c[f] && c[f].abort(), c[f] = b.apply(this, arguments), c[f]) : b.apply(this, arguments)
})
});