bootstrap.min.dev.js 46 KB

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