1!function (a) { 2 a(function () { 3 a.support.transition = (function () { 4 var b = (function () { 5 var e = document.createElement("bootstrap"), d = {WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd otransitionend", transition: "transitionend"}, c; 6 for (c in d) { 7 if (e.style[c] !== undefined) { 8 return d[c] 9 } 10 } 11 }()); 12 return b && {end: b} 13 })() 14 }) 15}(window.jQuery); 16!function (d) { 17 var c = '[data-dismiss="alert"]', b = function (e) { 18 d(e).on("click", c, this.close) 19 }; 20 b.prototype.close = function (j) { 21 var i = d(this), g = i.attr("data-target"), h; 22 if (!g) { 23 g = i.attr("href"); 24 g = g && g.replace(/.*(?=#[^\s]*$)/, "") 25 } 26 h = d(g); 27 j && j.preventDefault(); 28 h.length || (h = i.hasClass("alert") ? i : i.parent()); 29 h.trigger(j = d.Event("close")); 30 if (j.isDefaultPrevented()) { 31 return 32 } 33 h.removeClass("in"); 34 function f() { 35 h.trigger("closed").remove() 36 } 37 38 d.support.transition && h.hasClass("fade") ? h.on(d.support.transition.end, f) : f() 39 }; 40 var a = d.fn.alert; 41 d.fn.alert = function (e) { 42 return this.each(function () { 43 var g = d(this), f = g.data("alert"); 44 if (!f) { 45 g.data("alert", (f = new b(this))) 46 } 47 if (typeof e == "string") { 48 f[e].call(g) 49 } 50 }) 51 }; 52 d.fn.alert.Constructor = b; 53 d.fn.alert.noConflict = function () { 54 d.fn.alert = a; 55 return this 56 }; 57 d(document).on("click.alert.data-api", c, b.prototype.close) 58}(window.jQuery); 59!function (c) { 60 var b = function (e, d) { 61 this.$element = c(e); 62 this.options = c.extend({}, c.fn.button.defaults, d) 63 }; 64 b.prototype.setState = function (g) { 65 var i = "disabled", e = this.$element, f = e.data(), h = e.is("input") ? "val" : "html"; 66 g = g + "Text"; 67 f.resetText || e.data("resetText", e[h]()); 68 e[h](f[g] || this.options[g]); 69 setTimeout(function () { 70 g == "loadingText" ? e.addClass(i).attr(i, i) : e.removeClass(i).removeAttr(i) 71 }, 0) 72 }; 73 b.prototype.toggle = function () { 74 var d = this.$element.closest('[data-toggle="buttons-radio"]'); 75 d && d.find(".active").removeClass("active"); 76 this.$element.toggleClass("active") 77 }; 78 var a = c.fn.button; 79 c.fn.button = function (d) { 80 return this.each(function () { 81 var g = c(this), f = g.data("button"), e = typeof d == "object" && d; 82 if (!f) { 83 g.data("button", (f = new b(this, e))) 84 } 85 if (d == "toggle") { 86 f.toggle() 87 } else { 88 if (d) { 89 f.setState(d) 90 } 91 } 92 }) 93 }; 94 c.fn.button.defaults = {loadingText: "loading..."}; 95 c.fn.button.Constructor = b; 96 c.fn.button.noConflict = function () { 97 c.fn.button = a; 98 return this 99 }; 100 c(document).on("click.button.data-api", "[data-toggle^=button]", function (f) { 101 var d = c(f.target); 102 if (!d.hasClass("btn")) { 103 d = d.closest(".btn") 104 } 105 d.button("toggle") 106 }) 107}(window.jQuery); 108!function (b) { 109 var c = function (e, d) { 110 this.$element = b(e); 111 this.options = d; 112 this.options.pause == "hover" && this.$element.on("mouseenter", b.proxy(this.pause, this)).on("mouseleave", b.proxy(this.cycle, this)) 113 }; 114 c.prototype = {cycle: function (d) { 115 if (!d) { 116 this.paused = false 117 } 118 this.options.interval && !this.paused && (this.interval = setInterval(b.proxy(this.next, this), this.options.interval)); 119 return this 120 }, to: function (h) { 121 var d = this.$element.find(".item.active"), e = d.parent().children(), f = e.index(d), g = this; 122 if (h > (e.length - 1) || h < 0) { 123 return 124 } 125 if (this.sliding) { 126 return this.$element.one("slid", function () { 127 g.to(h) 128 }) 129 } 130 if (f == h) { 131 return this.pause().cycle() 132 } 133 return this.slide(h > f ? "next" : "prev", b(e[h])) 134 }, pause: function (d) { 135 if (!d) { 136 this.paused = true 137 } 138 if (this.$element.find(".next, .prev").length && b.support.transition.end) { 139 this.$element.trigger(b.support.transition.end); 140 this.cycle() 141 } 142 clearInterval(this.interval); 143 this.interval = null; 144 return this 145 }, next: function () { 146 if (this.sliding) { 147 return 148 } 149 return this.slide("next") 150 }, prev: function () { 151 if (this.sliding) { 152 return 153 } 154 return this.slide("prev") 155 }, slide: function (k, f) { 156 if (!b.support.transition && this.$element.hasClass("slide")) { 157 this.$element.find(".item").stop(true, true) 158 } 159 var m = this.$element.find(".item.active"), d = f || m[k](), j = this.interval, l = k == "next" ? "left" : "right", g = k == "next" ? "first" : "last", h = this, i; 160 this.sliding = true; 161 j && this.pause(); 162 d = d.length ? d : this.$element.find(".item")[g](); 163 i = b.Event("slide", {relatedTarget: d[0]}); 164 if (d.hasClass("active")) { 165 return 166 } 167 if (b.support.transition && this.$element.hasClass("slide")) { 168 this.$element.trigger(i); 169 if (i.isDefaultPrevented()) { 170 return 171 } 172 d.addClass(k); 173 d[0].offsetWidth; 174 m.addClass(l); 175 d.addClass(l); 176 this.$element.one(b.support.transition.end, function () { 177 d.removeClass([k, l].join(" ")).addClass("active"); 178 m.removeClass(["active", l].join(" ")); 179 h.sliding = false; 180 setTimeout(function () { 181 h.$element.trigger("slid") 182 }, 0) 183 }) 184 } else { 185 if (!b.support.transition && this.$element.hasClass("slide")) { 186 this.$element.trigger(i); 187 if (i.isDefaultPrevented()) { 188 return 189 } 190 m.animate({left: (l == "right" ? "100%" : "-100%")}, 600, function () { 191 m.removeClass("active"); 192 h.sliding = false; 193 setTimeout(function () { 194 h.$element.trigger("slid") 195 }, 0) 196 }); 197 d.addClass(k).css({left: (l == "right" ? "-100%" : "100%")}).animate({left: "0"}, 600, function () { 198 d.removeClass(k).addClass("active") 199 }) 200 } else { 201 this.$element.trigger(i); 202 if (i.isDefaultPrevented()) { 203 return 204 } 205 m.removeClass("active"); 206 d.addClass("active"); 207 this.sliding = false; 208 this.$element.trigger("slid") 209 } 210 } 211 j && this.cycle(); 212 return this 213 }}; 214 var a = b.fn.carousel; 215 b.fn.carousel = function (d) { 216 return this.each(function () { 217 var h = b(this), g = h.data("carousel"), e = b.extend({}, b.fn.carousel.defaults, typeof d == "object" && d), f = typeof d == "string" ? d : e.slide; 218 if (!g) { 219 h.data("carousel", (g = new c(this, e))) 220 } 221 if (typeof d == "number") { 222 g.to(d) 223 } else { 224 if (f) { 225 g[f]() 226 } else { 227 if (e.interval) { 228 g.cycle() 229 } 230 } 231 } 232 }) 233 }; 234 b.fn.carousel.defaults = {interval: 5000, pause: "hover"}; 235 b.fn.carousel.Constructor = c; 236 b.fn.carousel.noConflict = function () { 237 b.fn.carousel = a; 238 return this 239 }; 240 b(document).on("click.carousel.data-api", "[data-slide]", function (i) { 241 var h = b(this), f, d = b(h.attr("data-target") || (f = h.attr("href")) && f.replace(/.*(?=#[^\s]+$)/, "")), g = b.extend({}, d.data(), h.data()); 242 d.carousel(g); 243 i.preventDefault() 244 }) 245}(window.jQuery); 246!function (b) { 247 var c = function (e, d) { 248 this.$element = b(e); 249 this.options = b.extend({}, b.fn.collapse.defaults, d); 250 if (this.options.parent) { 251 this.$parent = b(this.options.parent) 252 } 253 this.options.toggle && this.toggle() 254 }; 255 c.prototype = {constructor: c, dimension: function () { 256 var d = this.$element.hasClass("width"); 257 return d ? "width" : "height" 258 }, show: function () { 259 var g, d, f, e; 260 if (this.transitioning) { 261 return 262 } 263 g = this.dimension(); 264 d = b.camelCase(["scroll", g].join("-")); 265 f = this.$parent && this.$parent.find("> .accordion-group > .in"); 266 if (f && f.length) { 267 e = f.data("collapse"); 268 if (e && e.transitioning) { 269 return 270 } 271 f.collapse("hide"); 272 e || f.data("collapse", null) 273 } 274 this.$element[g](0); 275 this.transition("addClass", b.Event("show"), "shown"); 276 b.support.transition && this.$element[g](this.$element[0][d]) 277 }, hide: function () { 278 var d; 279 if (this.transitioning) { 280 return 281 } 282 d = this.dimension(); 283 this.reset(this.$element[d]()); 284 this.transition("removeClass", b.Event("hide"), "hidden"); 285 this.$element[d](0) 286 }, reset: function (d) { 287 var e = this.dimension(); 288 this.$element.removeClass("collapse")[e](d || "auto")[0].offsetWidth; 289 this.$element[d !== null ? "addClass" : "removeClass"]("collapse"); 290 return this 291 }, transition: function (h, e, f) { 292 var g = this, d = function () { 293 if (e.type == "show") { 294 g.reset() 295 } 296 g.transitioning = 0; 297 g.$element.trigger(f) 298 }; 299 this.$element.trigger(e); 300 if (e.isDefaultPrevented()) { 301 return 302 } 303 this.transitioning = 1; 304 this.$element[h]("in"); 305 b.support.transition && this.$element.hasClass("collapse") ? this.$element.one(b.support.transition.end, d) : d() 306 }, toggle: function () { 307 this[this.$element.hasClass("in") ? "hide" : "show"]() 308 }}; 309 var a = b.fn.collapse; 310 b.fn.collapse = function (d) { 311 return this.each(function () { 312 var g = b(this), f = g.data("collapse"), e = typeof d == "object" && d; 313 if (!f) { 314 g.data("collapse", (f = new c(this, e))) 315 } 316 if (typeof d == "string") { 317 f[d]() 318 } 319 }) 320 }; 321 b.fn.collapse.defaults = {toggle: true}; 322 b.fn.collapse.Constructor = c; 323 b.fn.collapse.noConflict = function () { 324 b.fn.collapse = a; 325 return this 326 }; 327 b(document).on("click.collapse.data-api", "[data-toggle=collapse]", function (i) { 328 var h = b(this), d, g = h.attr("data-target") || i.preventDefault() || (d = h.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, ""), f = b(g).data("collapse") ? "toggle" : h.data(); 329 h[b(g).hasClass("in") ? "addClass" : "removeClass"]("collapsed"); 330 b(g).collapse(f) 331 }) 332}(window.jQuery); 333!function (f) { 334 var b = "[data-toggle=dropdown]", a = function (h) { 335 var g = f(h).on("click.dropdown.data-api", this.toggle); 336 f("html").on("click.dropdown.data-api", function () { 337 g.parent().removeClass("open") 338 }) 339 }; 340 a.prototype = {constructor: a, toggle: function (j) { 341 var i = f(this), h, g; 342 if (i.is(".disabled, :disabled")) { 343 return 344 } 345 h = e(i); 346 g = h.hasClass("open"); 347 d(); 348 if (!g) { 349 h.toggleClass("open") 350 } 351 i.focus(); 352 return false 353 }, keydown: function (l) { 354 var k, m, g, j, i, h; 355 if (!/(38|40|27)/.test(l.keyCode)) { 356 return 357 } 358 k = f(this); 359 l.preventDefault(); 360 l.stopPropagation(); 361 if (k.is(".disabled, :disabled")) { 362 return 363 } 364 j = e(k); 365 i = j.hasClass("open"); 366 if (!i || (i && l.keyCode == 27)) { 367 return k.click() 368 } 369 m = f("[role=menu] li:not(.divider):visible a", j); 370 if (!m.length) { 371 return 372 } 373 h = m.index(m.filter(":focus")); 374 if (l.keyCode == 38 && h > 0) { 375 h-- 376 } 377 if (l.keyCode == 40 && h < m.length - 1) { 378 h++ 379 } 380 if (!~h) { 381 h = 0 382 } 383 m.eq(h).focus() 384 }}; 385 function d() { 386 f(b).each(function () { 387 e(f(this)).removeClass("open") 388 }) 389 } 390 391 function e(i) { 392 var g = i.attr("data-target"), h; 393 if (!g) { 394 g = i.attr("href"); 395 g = g && /#/.test(g) && g.replace(/.*(?=#[^\s]*$)/, "") 396 } 397 h = f(g); 398 h.length || (h = i.parent()); 399 return h 400 } 401 402 var c = f.fn.dropdown; 403 f.fn.dropdown = function (g) { 404 return this.each(function () { 405 var i = f(this), h = i.data("dropdown"); 406 if (!h) { 407 i.data("dropdown", (h = new a(this))) 408 } 409 if (typeof g == "string") { 410 h[g].call(i) 411 } 412 }) 413 }; 414 f.fn.dropdown.Constructor = a; 415 f.fn.dropdown.noConflict = function () { 416 f.fn.dropdown = c; 417 return this 418 }; 419 f(document).on("click.dropdown.data-api touchstart.dropdown.data-api", d).on("click.dropdown touchstart.dropdown.data-api", ".dropdown form",function (g) { 420 g.stopPropagation() 421 }).on("touchstart.dropdown.data-api", ".dropdown-menu",function (g) { 422 g.stopPropagation() 423 }).on("click.dropdown.data-api touchstart.dropdown.data-api", b, a.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api", b + ", [role=menu]", a.prototype.keydown) 424}(window.jQuery); 425!function (c) { 426 var b = function (e, d) { 427 this.options = d; 428 this.$element = c(e).delegate('[data-dismiss="modal"]', "click.dismiss.modal", c.proxy(this.hide, this)); 429 this.options.remote && this.$element.find(".modal-body").load(this.options.remote) 430 }; 431 b.prototype = {constructor: b, toggle: function () { 432 return this[!this.isShown ? "show" : "hide"]() 433 }, show: function () { 434 var d = this, f = c.Event("show"); 435 this.$element.trigger(f); 436 if (this.isShown || f.isDefaultPrevented()) { 437 return 438 } 439 this.isShown = true; 440 this.escape(); 441 this.backdrop(function () { 442 var e = c.support.transition && d.$element.hasClass("fade"); 443 if (!d.$element.parent().length) { 444 d.$element.appendTo(document.body) 445 } 446 d.$element.show(); 447 if (e) { 448 d.$element[0].offsetWidth 449 } 450 d.$element.addClass("in").attr("aria-hidden", false); 451 d.enforceFocus(); 452 e ? d.$element.one(c.support.transition.end, function () { 453 d.$element.focus().trigger("shown") 454 }) : d.$element.focus().trigger("shown") 455 }) 456 }, hide: function (f) { 457 f && f.preventDefault(); 458 var d = this; 459 f = c.Event("hide"); 460 this.$element.trigger(f); 461 if (!this.isShown || f.isDefaultPrevented()) { 462 return 463 } 464 this.isShown = false; 465 this.escape(); 466 c(document).off("focusin.modal"); 467 this.$element.removeClass("in").attr("aria-hidden", true); 468 c.support.transition && this.$element.hasClass("fade") ? this.hideWithTransition() : this.hideModal() 469 }, enforceFocus: function () { 470 var d = this; 471 c(document).on("focusin.modal", function (f) { 472 if (d.$element[0] !== f.target && !d.$element.has(f.target).length) { 473 d.$element.focus() 474 } 475 }) 476 }, escape: function () { 477 var d = this; 478 if (this.isShown && this.options.keyboard) { 479 this.$element.on("keyup.dismiss.modal", function (f) { 480 f.which == 27 && d.hide() 481 }) 482 } else { 483 if (!this.isShown) { 484 this.$element.off("keyup.dismiss.modal") 485 } 486 } 487 }, hideWithTransition: function () { 488 var d = this, e = setTimeout(function () { 489 d.$element.off(c.support.transition.end); 490 d.hideModal() 491 }, 500); 492 this.$element.one(c.support.transition.end, function () { 493 clearTimeout(e); 494 d.hideModal() 495 }) 496 }, hideModal: function (d) { 497 this.$element.hide().trigger("hidden"); 498 this.backdrop() 499 }, removeBackdrop: function () { 500 this.$backdrop.remove(); 501 this.$backdrop = null 502 }, backdrop: function (g) { 503 var f = this, e = this.$element.hasClass("fade") ? "fade" : ""; 504 if (this.isShown && this.options.backdrop) { 505 var d = c.support.transition && e; 506 this.$backdrop = c('<div class="modal-backdrop ' + e + '" />').appendTo(document.body); 507 this.$backdrop.click(this.options.backdrop == "static" ? c.proxy(this.$element[0].focus, this.$element[0]) : c.proxy(this.hide, this)); 508 if (d) { 509 this.$backdrop[0].offsetWidth 510 } 511 this.$backdrop.addClass("in"); 512 d ? this.$backdrop.one(c.support.transition.end, g) : g() 513 } else { 514 if (!this.isShown && this.$backdrop) { 515 this.$backdrop.removeClass("in"); 516 c.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one(c.support.transition.end, c.proxy(this.removeBackdrop, this)) : this.removeBackdrop() 517 } else { 518 if (g) { 519 g() 520 } 521 } 522 } 523 }}; 524 var a = c.fn.modal; 525 c.fn.modal = function (d) { 526 return this.each(function () { 527 var g = c(this), f = g.data("modal"), e = c.extend({}, c.fn.modal.defaults, g.data(), typeof d == "object" && d); 528 if (!f) { 529 g.data("modal", (f = new b(this, e))) 530 } 531 if (typeof d == "string") { 532 f[d]() 533 } else { 534 if (e.show) { 535 f.show() 536 } 537 } 538 }) 539 }; 540 c.fn.modal.defaults = {backdrop: true, keyboard: true, show: true}; 541 c.fn.modal.Constructor = b; 542 c.fn.modal.noConflict = function () { 543 c.fn.modal = a; 544 return this 545 }; 546 c(document).on("click.modal.data-api", '[data-toggle="modal"]', function (i) { 547 var h = c(this), f = h.attr("href"), d = c(h.attr("data-target") || (f && f.replace(/.*(?=#[^\s]+$)/, ""))), g = d.data("modal") ? "toggle" : c.extend({remote: !/#/.test(f) && f}, d.data(), h.data()); 548 i.preventDefault(); 549 d.modal(g).one("hide", function () { 550 h.focus() 551 }) 552 }) 553}(window.jQuery); 554!function (c) { 555 var b = function (e, d) { 556 this.init("tooltip", e, d) 557 }; 558 b.prototype = {constructor: b, init: function (g, f, e) { 559 var h, d; 560 this.type = g; 561 this.$element = c(f); 562 this.options = this.getOptions(e); 563 this.enabled = true; 564 if (this.options.trigger == "click") { 565 this.$element.on("click." + this.type, this.options.selector, c.proxy(this.toggle, this)) 566 } else { 567 if (this.options.trigger != "manual") { 568 h = this.options.trigger == "hover" ? "mouseenter" : "focus"; 569 d = this.options.trigger == "hover" ? "mouseleave" : "blur"; 570 this.$element.on(h + "." + this.type, this.options.selector, c.proxy(this.enter, this)); 571 this.$element.on(d + "." + this.type, this.options.selector, c.proxy(this.leave, this)) 572 } 573 } 574 this.options.selector ? (this._options = c.extend({}, this.options, {trigger: "manual", selector: ""})) : this.fixTitle() 575 }, getOptions: function (d) { 576 d = c.extend({}, c.fn[this.type].defaults, d, this.$element.data()); 577 if (d.delay && typeof d.delay == "number") { 578 d.delay = {show: d.delay, hide: d.delay} 579 } 580 return d 581 }, enter: function (f) { 582 var d = c(f.currentTarget)[this.type](this._options).data(this.type); 583 if (!d.options.delay || !d.options.delay.show) { 584 return d.show() 585 } 586 clearTimeout(this.timeout); 587 d.hoverState = "in"; 588 this.timeout = setTimeout(function () { 589 if (d.hoverState == "in") { 590 d.show() 591 } 592 }, d.options.delay.show) 593 }, leave: function (f) { 594 var d = c(f.currentTarget)[this.type](this._options).data(this.type); 595 if (this.timeout) { 596 clearTimeout(this.timeout) 597 } 598 if (!d.options.delay || !d.options.delay.hide) { 599 return d.hide() 600 } 601 d.hoverState = "out"; 602 this.timeout = setTimeout(function () { 603 if (d.hoverState == "out") { 604 d.hide() 605 } 606 }, d.options.delay.hide) 607 }, show: function () { 608 var h, d, j, f, i, e, g; 609 if (this.hasContent() && this.enabled) { 610 h = this.tip(); 611 this.setContent(); 612 if (this.options.animation) { 613 h.addClass("fade") 614 } 615 e = typeof this.options.placement == "function" ? this.options.placement.call(this, h[0], this.$element[0]) : this.options.placement; 616 d = /in/.test(e); 617 h.detach().css({top: 0, left: 0, display: "block"}).insertAfter(this.$element); 618 j = this.getPosition(d); 619 f = h[0].offsetWidth; 620 i = h[0].offsetHeight; 621 switch (d ? e.split(" ")[1] : e) { 622 case"bottom": 623 g = {top: j.top + j.height, left: j.left + j.width / 2 - f / 2}; 624 break; 625 case"top": 626 g = {top: j.top - i, left: j.left + j.width / 2 - f / 2}; 627 break; 628 case"left": 629 g = {top: j.top + j.height / 2 - i / 2, left: j.left - f}; 630 break; 631 case"right": 632 g = {top: j.top + j.height / 2 - i / 2, left: j.left + j.width}; 633 break 634 } 635 h.offset(g).addClass(e).addClass("in") 636 } 637 }, setContent: function () { 638 var e = this.tip(), d = this.getTitle(); 639 e.find(".tooltip-inner")[this.options.html ? "html" : "text"](d); 640 e.removeClass("fade in top bottom left right") 641 }, hide: function () { 642 var d = this, e = this.tip(); 643 e.removeClass("in"); 644 function f() { 645 var g = setTimeout(function () { 646 e.off(c.support.transition.end).detach() 647 }, 500); 648 e.one(c.support.transition.end, function () { 649 clearTimeout(g); 650 e.detach() 651 }) 652 } 653 654 c.support.transition && this.$tip.hasClass("fade") ? f() : e.detach(); 655 return this 656 }, fixTitle: function () { 657 var d = this.$element; 658 if (d.attr("title") || typeof(d.attr("data-original-title")) != "string") { 659 d.attr("data-original-title", d.attr("title") || "").removeAttr("title") 660 } 661 }, hasContent: function () { 662 return this.getTitle() 663 }, getPosition: function (d) { 664 return c.extend({}, (d ? {top: 0, left: 0} : this.$element.offset()), {width: this.$element[0].offsetWidth, height: this.$element[0].offsetHeight}) 665 }, getTitle: function () { 666 var f, d = this.$element, e = this.options; 667 f = d.attr("data-original-title") || (typeof e.title == "function" ? e.title.call(d[0]) : e.title); 668 return f 669 }, tip: function () { 670 return this.$tip = this.$tip || c(this.options.template) 671 }, validate: function () { 672 if (!this.$element[0].parentNode) { 673 this.hide(); 674 this.$element = null; 675 this.options = null 676 } 677 }, enable: function () { 678 this.enabled = true 679 }, disable: function () { 680 this.enabled = false 681 }, toggleEnabled: function () { 682 this.enabled = !this.enabled 683 }, toggle: function (f) { 684 var d = c(f.currentTarget)[this.type](this._options).data(this.type); 685 d[d.tip().hasClass("in") ? "hide" : "show"]() 686 }, destroy: function () { 687 this.hide().$element.off("." + this.type).removeData(this.type) 688 }}; 689 var a = c.fn.tooltip; 690 c.fn.tooltip = function (d) { 691 return this.each(function () { 692 var g = c(this), f = g.data("tooltip"), e = typeof d == "object" && d; 693 if (!f) { 694 g.data("tooltip", (f = new b(this, e))) 695 } 696 if (typeof d == "string") { 697 f[d]() 698 } 699 }) 700 }; 701 c.fn.tooltip.Constructor = b; 702 c.fn.tooltip.defaults = {animation: true, placement: "top", selector: false, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', trigger: "hover", title: "", delay: 0, html: false}; 703 c.fn.tooltip.noConflict = function () { 704 c.fn.tooltip = a; 705 return this 706 } 707}(window.jQuery); 708!function (c) { 709 var b = function (e, d) { 710 this.init("popover", e, d) 711 }; 712 b.prototype = c.extend({}, c.fn.tooltip.Constructor.prototype, {constructor: b, setContent: function () { 713 var f = this.tip(), e = this.getTitle(), d = this.getContent(); 714 f.find(".popover-title")[this.options.html ? "html" : "text"](e); 715 f.find(".popover-content")[this.options.html ? "html" : "text"](d); 716 f.removeClass("fade top bottom left right in") 717 }, hasContent: function () { 718 return this.getTitle() || this.getContent() 719 }, getContent: function () { 720 var e, d = this.$element, f = this.options; 721 e = d.attr("data-content") || (typeof f.content == "function" ? f.content.call(d[0]) : f.content); 722 return e 723 }, tip: function () { 724 if (!this.$tip) { 725 this.$tip = c(this.options.template) 726 } 727 return this.$tip 728 }, destroy: function () { 729 this.hide().$element.off("." + this.type).removeData(this.type) 730 }}); 731 var a = c.fn.popover; 732 c.fn.popover = function (d) { 733 return this.each(function () { 734 var g = c(this), f = g.data("popover"), e = typeof d == "object" && d; 735 if (!f) { 736 g.data("popover", (f = new b(this, e))) 737 } 738 if (typeof d == "string") { 739 f[d]() 740 } 741 }) 742 }; 743 c.fn.popover.Constructor = b; 744 c.fn.popover.defaults = c.extend({}, c.fn.tooltip.defaults, {placement: "right", trigger: "click", content: "", template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>'}); 745 c.fn.popover.noConflict = function () { 746 c.fn.popover = a; 747 return this 748 } 749}(window.jQuery); 750!function (c) { 751 function b(g, f) { 752 var h = c.proxy(this.process, this), d = c(g).is("body") ? c(window) : c(g), e; 753 this.options = c.extend({}, c.fn.scrollspy.defaults, f); 754 this.$scrollElement = d.on("scroll.scroll-spy.data-api", h); 755 this.selector = (this.options.target || ((e = c(g).attr("href")) && e.replace(/.*(?=#[^\s]+$)/, "")) || "") + " .nav li > a"; 756 this.$body = c("body"); 757 this.refresh(); 758 this.process() 759 } 760 761 b.prototype = {constructor: b, refresh: function () { 762 var d = this, e; 763 this.offsets = c([]); 764 this.targets = c([]); 765 e = this.$body.find(this.selector).map(function () { 766 var g = c(this), f = g.data("target") || g.attr("href"), h = /^#\w/.test(f) && c(f); 767 return(h && h.length && [ 768 [h.position().top + d.$scrollElement.scrollTop(), f] 769 ]) || null 770 }).sort(function (g, f) { 771 return g[0] - f[0] 772 }).each(function () { 773 d.offsets.push(this[0]); 774 d.targets.push(this[1]) 775 }) 776 }, process: function () { 777 var j = this.$scrollElement.scrollTop() + this.options.offset, f = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight, h = f - this.$scrollElement.height(), g = this.offsets, d = this.targets, k = this.activeTarget, e; 778 if (j >= h) { 779 return k != (e = d.last()[0]) && this.activate(e) 780 } 781 for (e = g.length; e--;) { 782 k != d[e] && j >= g[e] && (!g[e + 1] || j <= g[e + 1]) && this.activate(d[e]) 783 } 784 }, activate: function (f) { 785 var e, d; 786 this.activeTarget = f; 787 c(this.selector).parent(".active").removeClass("active"); 788 d = this.selector + '[data-target="' + f + '"],' + this.selector + '[href="' + f + '"]'; 789 e = c(d).parent("li").addClass("active"); 790 if (e.parent(".dropdown-menu").length) { 791 e = e.closest("li.dropdown").addClass("active") 792 } 793 e.trigger("activate") 794 }}; 795 var a = c.fn.scrollspy; 796 c.fn.scrollspy = function (d) { 797 return this.each(function () { 798 var g = c(this), f = g.data("scrollspy"), e = typeof d == "object" && d; 799 if (!f) { 800 g.data("scrollspy", (f = new b(this, e))) 801 } 802 if (typeof d == "string") { 803 f[d]() 804 } 805 }) 806 }; 807 c.fn.scrollspy.Constructor = b; 808 c.fn.scrollspy.defaults = {offset: 10}; 809 c.fn.scrollspy.noConflict = function () { 810 c.fn.scrollspy = a; 811 return this 812 }; 813 c(window).on("load", function () { 814 c('[data-spy="scroll"]').each(function () { 815 var d = c(this); 816 d.scrollspy(d.data()) 817 }) 818 }) 819}(window.jQuery); 820!function (c) { 821 var b = function (d) { 822 this.element = c(d) 823 }; 824 b.prototype = {constructor: b, show: function () { 825 var j = this.element, g = j.closest("ul:not(.dropdown-menu)"), f = j.attr("data-target"), h, d, i; 826 if (!f) { 827 f = j.attr("href"); 828 f = f && f.replace(/.*(?=#[^\s]*$)/, "") 829 } 830 if (j.parent("li").hasClass("active")) { 831 return 832 } 833 h = g.find(".active:last a")[0]; 834 i = c.Event("show", {relatedTarget: h}); 835 j.trigger(i); 836 if (i.isDefaultPrevented()) { 837 return 838 } 839 d = c(f); 840 this.activate(j.parent("li"), g); 841 this.activate(d, d.parent(), function () { 842 j.trigger({type: "shown", relatedTarget: h}) 843 }) 844 }, activate: function (f, e, i) { 845 var d = e.find("> .active"), h = i && c.support.transition && d.hasClass("fade"); 846 847 function g() { 848 d.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"); 849 f.addClass("active"); 850 if (h) { 851 f[0].offsetWidth; 852 f.addClass("in") 853 } else { 854 f.removeClass("fade") 855 } 856 if (f.parent(".dropdown-menu")) { 857 f.closest("li.dropdown").addClass("active") 858 } 859 i && i() 860 } 861 862 h ? d.one(c.support.transition.end, g) : g(); 863 d.removeClass("in") 864 }}; 865 var a = c.fn.tab; 866 c.fn.tab = function (d) { 867 return this.each(function () { 868 var f = c(this), e = f.data("tab"); 869 if (!e) { 870 f.data("tab", (e = new b(this))) 871 } 872 if (typeof d == "string") { 873 e[d]() 874 } 875 }) 876 }; 877 c.fn.tab.Constructor = b; 878 c.fn.tab.noConflict = function () { 879 c.fn.tab = a; 880 return this 881 }; 882 c(document).on("click.tab.data-api", '[data-toggle="tab"], [data-toggle="pill"]', function (d) { 883 d.preventDefault(); 884 c(this).tab("show") 885 }) 886}(window.jQuery); 887!function (b) { 888 var c = function (e, d) { 889 this.$element = b(e); 890 this.options = b.extend({}, b.fn.typeahead.defaults, d); 891 this.matcher = this.options.matcher || this.matcher; 892 this.sorter = this.options.sorter || this.sorter; 893 this.highlighter = this.options.highlighter || this.highlighter; 894 this.updater = this.options.updater || this.updater; 895 this.source = this.options.source; 896 this.$menu = b(this.options.menu); 897 this.shown = false; 898 this.listen() 899 }; 900 c.prototype = {constructor: c, select: function () { 901 var d = this.$menu.find(".active").attr("data-value"); 902 this.$element.val(this.updater(d)).change(); 903 return this.hide() 904 }, updater: function (d) { 905 return d 906 }, show: function () { 907 var d = b.extend({}, this.$element.position(), {height: this.$element[0].offsetHeight}); 908 this.$menu.insertAfter(this.$element).css({top: d.top + d.height, left: d.left}).show(); 909 this.shown = true; 910 return this 911 }, hide: function () { 912 this.$menu.hide(); 913 this.shown = false; 914 return this 915 }, lookup: function (e) { 916 var d; 917 this.query = this.$element.val(); 918 if (!this.query || this.query.length < this.options.minLength) { 919 return this.shown ? this.hide() : this 920 } 921 d = b.isFunction(this.source) ? this.source(this.query, b.proxy(this.process, this)) : this.source; 922 return d ? this.process(d) : this 923 }, process: function (d) { 924 var e = this; 925 d = b.grep(d, function (f) { 926 return e.matcher(f) 927 }); 928 d = this.sorter(d); 929 if (!d.length) { 930 return this.shown ? this.hide() : this 931 } 932 return this.render(d.slice(0, this.options.items)).show() 933 }, matcher: function (d) { 934 return ~d.toLowerCase().indexOf(this.query.toLowerCase()) 935 }, sorter: function (f) { 936 var g = [], e = [], d = [], h; 937 while (h = f.shift()) { 938 if (!h.toLowerCase().indexOf(this.query.toLowerCase())) { 939 g.push(h) 940 } else { 941 if (~h.indexOf(this.query)) { 942 e.push(h) 943 } else { 944 d.push(h) 945 } 946 } 947 } 948 return g.concat(e, d) 949 }, highlighter: function (d) { 950 var e = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); 951 return d.replace(new RegExp("(" + e + ")", "ig"), function (f, g) { 952 return"<strong>" + g + "</strong>" 953 }) 954 }, render: function (d) { 955 var e = this; 956 d = b(d).map(function (f, g) { 957 f = b(e.options.item).attr("data-value", g); 958 f.find("a").html(e.highlighter(g)); 959 return f[0] 960 }); 961 d.first().addClass("active"); 962 this.$menu.html(d); 963 return this 964 }, next: function (e) { 965 var f = this.$menu.find(".active").removeClass("active"), d = f.next(); 966 if (!d.length) { 967 d = b(this.$menu.find("li")[0]) 968 } 969 d.addClass("active") 970 }, prev: function (e) { 971 var f = this.$menu.find(".active").removeClass("active"), d = f.prev(); 972 if (!d.length) { 973 d = this.$menu.find("li").last() 974 } 975 d.addClass("active") 976 }, listen: function () { 977 this.$element.on("blur", b.proxy(this.blur, this)).on("keypress", b.proxy(this.keypress, this)).on("keyup", b.proxy(this.keyup, this)); 978 if (this.eventSupported("keydown")) { 979 this.$element.on("keydown", b.proxy(this.keydown, this)) 980 } 981 this.$menu.on("click", b.proxy(this.click, this)).on("mouseenter", "li", b.proxy(this.mouseenter, this)) 982 }, eventSupported: function (d) { 983 var e = d in this.$element; 984 if (!e) { 985 this.$element.setAttribute(d, "return;"); 986 e = typeof this.$element[d] === "function" 987 } 988 return e 989 }, move: function (d) { 990 if (!this.shown) { 991 return 992 } 993 switch (d.keyCode) { 994 case 9: 995 case 13: 996 case 27: 997 d.preventDefault(); 998 break; 999 case 38: 1000 d.preventDefault(); 1001 this.prev(); 1002 break; 1003 case 40: 1004 d.preventDefault(); 1005 this.next(); 1006 break 1007 } 1008 d.stopPropagation() 1009 }, keydown: function (d) { 1010 this.suppressKeyPressRepeat = ~b.inArray(d.keyCode, [40, 38, 9, 13, 27]); 1011 this.move(d) 1012 }, keypress: function (d) { 1013 if (this.suppressKeyPressRepeat) { 1014 return 1015 } 1016 this.move(d) 1017 }, keyup: function (d) { 1018 switch (d.keyCode) { 1019 case 40: 1020 case 38: 1021 case 16: 1022 case 17: 1023 case 18: 1024 break; 1025 case 9: 1026 case 13: 1027 if (!this.shown) { 1028 return 1029 } 1030 this.select(); 1031 break; 1032 case 27: 1033 if (!this.shown) { 1034 return 1035 } 1036 this.hide(); 1037 break; 1038 default: 1039 this.lookup() 1040 } 1041 d.stopPropagation(); 1042 d.preventDefault() 1043 }, blur: function (f) { 1044 var d = this; 1045 setTimeout(function () { 1046 d.hide() 1047 }, 150) 1048 }, click: function (d) { 1049 d.stopPropagation(); 1050 d.preventDefault(); 1051 this.select() 1052 }, mouseenter: function (d) { 1053 this.$menu.find(".active").removeClass("active"); 1054 b(d.currentTarget).addClass("active") 1055 }}; 1056 var a = b.fn.typeahead; 1057 b.fn.typeahead = function (d) { 1058 return this.each(function () { 1059 var g = b(this), f = g.data("typeahead"), e = typeof d == "object" && d; 1060 if (!f) { 1061 g.data("typeahead", (f = new c(this, e))) 1062 } 1063 if (typeof d == "string") { 1064 f[d]() 1065 } 1066 }) 1067 }; 1068 b.fn.typeahead.defaults = {source: [], items: 8, menu: '<ul class="typeahead dropdown-menu"></ul>', item: '<li><a href="#"></a></li>', minLength: 1}; 1069 b.fn.typeahead.Constructor = c; 1070 b.fn.typeahead.noConflict = function () { 1071 b.fn.typeahead = a; 1072 return this 1073 }; 1074 b(document).on("focus.typeahead.data-api", '[data-provide="typeahead"]', function (f) { 1075 var d = b(this); 1076 if (d.data("typeahead")) { 1077 return 1078 } 1079 f.preventDefault(); 1080 d.typeahead(d.data()) 1081 }) 1082}(window.jQuery); 1083!function (c) { 1084 var b = function (e, d) { 1085 this.options = c.extend({}, c.fn.affix.defaults, d); 1086 this.$window = c(window).on("scroll.affix.data-api", c.proxy(this.checkPosition, this)).on("click.affix.data-api", c.proxy(function () { 1087 setTimeout(c.proxy(this.checkPosition, this), 1) 1088 }, this)); 1089 this.$element = c(e); 1090 this.checkPosition() 1091 }; 1092 b.prototype.checkPosition = function () { 1093 if (!this.$element.is(":visible")) { 1094 return 1095 } 1096 var h = c(document).height(), j = this.$window.scrollTop(), d = this.$element.offset(), k = this.options.offset, f = k.bottom, g = k.top, i = "affix affix-top affix-bottom", e; 1097 if (typeof k != "object") { 1098 f = g = k 1099 } 1100 if (typeof g == "function") { 1101 g = k.top() 1102 } 1103 if (typeof f == "function") { 1104 f = k.bottom() 1105 } 1106 e = this.unpin != null && (j + this.unpin <= d.top) ? false : f != null && (d.top + this.$element.height() >= h - f) ? "bottom" : g != null && j <= g ? "top" : false; 1107 if (this.affixed === e) { 1108 return 1109 } 1110 this.affixed = e; 1111 this.unpin = e == "bottom" ? d.top - j : null; 1112 this.$element.removeClass(i).addClass("affix" + (e ? "-" + e : "")) 1113 }; 1114 var a = c.fn.affix; 1115 c.fn.affix = function (d) { 1116 return this.each(function () { 1117 var g = c(this), f = g.data("affix"), e = typeof d == "object" && d; 1118 if (!f) { 1119 g.data("affix", (f = new b(this, e))) 1120 } 1121 if (typeof d == "string") { 1122 f[d]() 1123 } 1124 }) 1125 }; 1126 c.fn.affix.Constructor = b; 1127 c.fn.affix.defaults = {offset: 0}; 1128 c.fn.affix.noConflict = function () { 1129 c.fn.affix = a; 1130 return this 1131 }; 1132 c(window).on("load", function () { 1133 c('[data-spy="affix"]').each(function () { 1134 var e = c(this), d = e.data(); 1135 d.offset = d.offset || {}; 1136 d.offsetBottom && (d.offset.bottom = d.offsetBottom); 1137 d.offsetTop && (d.offset.top = d.offsetTop); 1138 e.affix(d) 1139 }) 1140 }) 1141}(window.jQuery);