", {
55 | "class": (function(_this) {
56 | return function() {
57 | var classes;
58 | classes = ["" + _this.options.baseClass].concat(_this._getClasses(_this.options.wrapperClass));
59 | classes.push(_this.options.state ? _this.options.baseClass + "-on" : _this.options.baseClass + "-off");
60 | if (_this.options.size != null) {
61 | classes.push(_this.options.baseClass + "-" + _this.options.size);
62 | }
63 | if (_this.options.disabled) {
64 | classes.push(_this.options.baseClass + "-disabled");
65 | }
66 | if (_this.options.readonly) {
67 | classes.push(_this.options.baseClass + "-readonly");
68 | }
69 | if (_this.options.indeterminate) {
70 | classes.push(_this.options.baseClass + "-indeterminate");
71 | }
72 | if (_this.options.inverse) {
73 | classes.push(_this.options.baseClass + "-inverse");
74 | }
75 | if (_this.$element.attr("id")) {
76 | classes.push(_this.options.baseClass + "-id-" + (_this.$element.attr("id")));
77 | }
78 | return classes.join(" ");
79 | };
80 | })(this)()
81 | });
82 | this.$container = $("
", {
83 | "class": this.options.baseClass + "-container"
84 | });
85 | this.$on = $("
", {
86 | html: this.options.onText,
87 | "class": this.options.baseClass + "-handle-on " + this.options.baseClass + "-" + this.options.onColor
88 | });
89 | this.$off = $("", {
90 | html: this.options.offText,
91 | "class": this.options.baseClass + "-handle-off " + this.options.baseClass + "-" + this.options.offColor
92 | });
93 | this.$label = $("", {
94 | html: this.options.labelText,
95 | "class": this.options.baseClass + "-label"
96 | });
97 | this.$element.on("init.bootstrapSwitch", (function(_this) {
98 | return function() {
99 | return _this.options.onInit.apply(element, arguments);
100 | };
101 | })(this));
102 | this.$element.on("switchChange.bootstrapSwitch", (function(_this) {
103 | return function(e) {
104 | if (false === _this.options.onSwitchChange.apply(element, arguments)) {
105 | if (_this.$element.is(":radio")) {
106 | return $("[name='" + (_this.$element.attr('name')) + "']").trigger("previousState.bootstrapSwitch", true);
107 | } else {
108 | return _this.$element.trigger("previousState.bootstrapSwitch", true);
109 | }
110 | }
111 | };
112 | })(this));
113 | this.$container = this.$element.wrap(this.$container).parent();
114 | this.$wrapper = this.$container.wrap(this.$wrapper).parent();
115 | this.$element.before(this.options.inverse ? this.$off : this.$on).before(this.$label).before(this.options.inverse ? this.$on : this.$off);
116 | if (this.options.indeterminate) {
117 | this.$element.prop("indeterminate", true);
118 | }
119 | this._init();
120 | this._elementHandlers();
121 | this._handleHandlers();
122 | this._labelHandlers();
123 | this._formHandler();
124 | this._externalLabelHandler();
125 | this.$element.trigger("init.bootstrapSwitch", this.options.state);
126 | }
127 |
128 | BootstrapSwitch.prototype._constructor = BootstrapSwitch;
129 |
130 | BootstrapSwitch.prototype.setPrevOptions = function() {
131 | return this.prevOptions = $.extend(true, {}, this.options);
132 | };
133 |
134 | BootstrapSwitch.prototype.state = function(value, skip) {
135 | if (typeof value === "undefined") {
136 | return this.options.state;
137 | }
138 | if (this.options.disabled || this.options.readonly) {
139 | return this.$element;
140 | }
141 | if (this.options.state && !this.options.radioAllOff && this.$element.is(":radio")) {
142 | return this.$element;
143 | }
144 | if (this.$element.is(":radio")) {
145 | $("[name='" + (this.$element.attr('name')) + "']").trigger("setPreviousOptions.bootstrapSwitch");
146 | } else {
147 | this.$element.trigger("setPreviousOptions.bootstrapSwitch");
148 | }
149 | if (this.options.indeterminate) {
150 | this.indeterminate(false);
151 | }
152 | value = !!value;
153 | this.$element.prop("checked", value).trigger("change.bootstrapSwitch", skip);
154 | return this.$element;
155 | };
156 |
157 | BootstrapSwitch.prototype.toggleState = function(skip) {
158 | if (this.options.disabled || this.options.readonly) {
159 | return this.$element;
160 | }
161 | if (this.options.indeterminate) {
162 | this.indeterminate(false);
163 | return this.state(true);
164 | } else {
165 | return this.$element.prop("checked", !this.options.state).trigger("change.bootstrapSwitch", skip);
166 | }
167 | };
168 |
169 | BootstrapSwitch.prototype.size = function(value) {
170 | if (typeof value === "undefined") {
171 | return this.options.size;
172 | }
173 | if (this.options.size != null) {
174 | this.$wrapper.removeClass(this.options.baseClass + "-" + this.options.size);
175 | }
176 | if (value) {
177 | this.$wrapper.addClass(this.options.baseClass + "-" + value);
178 | }
179 | this._width();
180 | this._containerPosition();
181 | this.options.size = value;
182 | return this.$element;
183 | };
184 |
185 | BootstrapSwitch.prototype.animate = function(value) {
186 | if (typeof value === "undefined") {
187 | return this.options.animate;
188 | }
189 | value = !!value;
190 | if (value === this.options.animate) {
191 | return this.$element;
192 | }
193 | return this.toggleAnimate();
194 | };
195 |
196 | BootstrapSwitch.prototype.toggleAnimate = function() {
197 | this.options.animate = !this.options.animate;
198 | this.$wrapper.toggleClass(this.options.baseClass + "-animate");
199 | return this.$element;
200 | };
201 |
202 | BootstrapSwitch.prototype.disabled = function(value) {
203 | if (typeof value === "undefined") {
204 | return this.options.disabled;
205 | }
206 | value = !!value;
207 | if (value === this.options.disabled) {
208 | return this.$element;
209 | }
210 | return this.toggleDisabled();
211 | };
212 |
213 | BootstrapSwitch.prototype.toggleDisabled = function() {
214 | this.options.disabled = !this.options.disabled;
215 | this.$element.prop("disabled", this.options.disabled);
216 | this.$wrapper.toggleClass(this.options.baseClass + "-disabled");
217 | return this.$element;
218 | };
219 |
220 | BootstrapSwitch.prototype.readonly = function(value) {
221 | if (typeof value === "undefined") {
222 | return this.options.readonly;
223 | }
224 | value = !!value;
225 | if (value === this.options.readonly) {
226 | return this.$element;
227 | }
228 | return this.toggleReadonly();
229 | };
230 |
231 | BootstrapSwitch.prototype.toggleReadonly = function() {
232 | this.options.readonly = !this.options.readonly;
233 | this.$element.prop("readonly", this.options.readonly);
234 | this.$wrapper.toggleClass(this.options.baseClass + "-readonly");
235 | return this.$element;
236 | };
237 |
238 | BootstrapSwitch.prototype.indeterminate = function(value) {
239 | if (typeof value === "undefined") {
240 | return this.options.indeterminate;
241 | }
242 | value = !!value;
243 | if (value === this.options.indeterminate) {
244 | return this.$element;
245 | }
246 | return this.toggleIndeterminate();
247 | };
248 |
249 | BootstrapSwitch.prototype.toggleIndeterminate = function() {
250 | this.options.indeterminate = !this.options.indeterminate;
251 | this.$element.prop("indeterminate", this.options.indeterminate);
252 | this.$wrapper.toggleClass(this.options.baseClass + "-indeterminate");
253 | this._containerPosition();
254 | return this.$element;
255 | };
256 |
257 | BootstrapSwitch.prototype.inverse = function(value) {
258 | if (typeof value === "undefined") {
259 | return this.options.inverse;
260 | }
261 | value = !!value;
262 | if (value === this.options.inverse) {
263 | return this.$element;
264 | }
265 | return this.toggleInverse();
266 | };
267 |
268 | BootstrapSwitch.prototype.toggleInverse = function() {
269 | var $off, $on;
270 | this.$wrapper.toggleClass(this.options.baseClass + "-inverse");
271 | $on = this.$on.clone(true);
272 | $off = this.$off.clone(true);
273 | this.$on.replaceWith($off);
274 | this.$off.replaceWith($on);
275 | this.$on = $off;
276 | this.$off = $on;
277 | this.options.inverse = !this.options.inverse;
278 | return this.$element;
279 | };
280 |
281 | BootstrapSwitch.prototype.onColor = function(value) {
282 | var color;
283 | color = this.options.onColor;
284 | if (typeof value === "undefined") {
285 | return color;
286 | }
287 | if (color != null) {
288 | this.$on.removeClass(this.options.baseClass + "-" + color);
289 | }
290 | this.$on.addClass(this.options.baseClass + "-" + value);
291 | this.options.onColor = value;
292 | return this.$element;
293 | };
294 |
295 | BootstrapSwitch.prototype.offColor = function(value) {
296 | var color;
297 | color = this.options.offColor;
298 | if (typeof value === "undefined") {
299 | return color;
300 | }
301 | if (color != null) {
302 | this.$off.removeClass(this.options.baseClass + "-" + color);
303 | }
304 | this.$off.addClass(this.options.baseClass + "-" + value);
305 | this.options.offColor = value;
306 | return this.$element;
307 | };
308 |
309 | BootstrapSwitch.prototype.onText = function(value) {
310 | if (typeof value === "undefined") {
311 | return this.options.onText;
312 | }
313 | this.$on.html(value);
314 | this._width();
315 | this._containerPosition();
316 | this.options.onText = value;
317 | return this.$element;
318 | };
319 |
320 | BootstrapSwitch.prototype.offText = function(value) {
321 | if (typeof value === "undefined") {
322 | return this.options.offText;
323 | }
324 | this.$off.html(value);
325 | this._width();
326 | this._containerPosition();
327 | this.options.offText = value;
328 | return this.$element;
329 | };
330 |
331 | BootstrapSwitch.prototype.labelText = function(value) {
332 | if (typeof value === "undefined") {
333 | return this.options.labelText;
334 | }
335 | this.$label.html(value);
336 | this._width();
337 | this.options.labelText = value;
338 | return this.$element;
339 | };
340 |
341 | BootstrapSwitch.prototype.handleWidth = function(value) {
342 | if (typeof value === "undefined") {
343 | return this.options.handleWidth;
344 | }
345 | this.options.handleWidth = value;
346 | this._width();
347 | this._containerPosition();
348 | return this.$element;
349 | };
350 |
351 | BootstrapSwitch.prototype.labelWidth = function(value) {
352 | if (typeof value === "undefined") {
353 | return this.options.labelWidth;
354 | }
355 | this.options.labelWidth = value;
356 | this._width();
357 | this._containerPosition();
358 | return this.$element;
359 | };
360 |
361 | BootstrapSwitch.prototype.baseClass = function(value) {
362 | return this.options.baseClass;
363 | };
364 |
365 | BootstrapSwitch.prototype.wrapperClass = function(value) {
366 | if (typeof value === "undefined") {
367 | return this.options.wrapperClass;
368 | }
369 | if (!value) {
370 | value = $.fn.bootstrapSwitch.defaults.wrapperClass;
371 | }
372 | this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" "));
373 | this.$wrapper.addClass(this._getClasses(value).join(" "));
374 | this.options.wrapperClass = value;
375 | return this.$element;
376 | };
377 |
378 | BootstrapSwitch.prototype.radioAllOff = function(value) {
379 | if (typeof value === "undefined") {
380 | return this.options.radioAllOff;
381 | }
382 | value = !!value;
383 | if (value === this.options.radioAllOff) {
384 | return this.$element;
385 | }
386 | this.options.radioAllOff = value;
387 | return this.$element;
388 | };
389 |
390 | BootstrapSwitch.prototype.onInit = function(value) {
391 | if (typeof value === "undefined") {
392 | return this.options.onInit;
393 | }
394 | if (!value) {
395 | value = $.fn.bootstrapSwitch.defaults.onInit;
396 | }
397 | this.options.onInit = value;
398 | return this.$element;
399 | };
400 |
401 | BootstrapSwitch.prototype.onSwitchChange = function(value) {
402 | if (typeof value === "undefined") {
403 | return this.options.onSwitchChange;
404 | }
405 | if (!value) {
406 | value = $.fn.bootstrapSwitch.defaults.onSwitchChange;
407 | }
408 | this.options.onSwitchChange = value;
409 | return this.$element;
410 | };
411 |
412 | BootstrapSwitch.prototype.destroy = function() {
413 | var $form;
414 | $form = this.$element.closest("form");
415 | if ($form.length) {
416 | $form.off("reset.bootstrapSwitch").removeData("bootstrap-switch");
417 | }
418 | this.$container.children().not(this.$element).remove();
419 | this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch");
420 | return this.$element;
421 | };
422 |
423 | BootstrapSwitch.prototype._width = function() {
424 | var $handles, handleWidth;
425 | $handles = this.$on.add(this.$off);
426 | $handles.add(this.$label).css("width", "");
427 | handleWidth = this.options.handleWidth === "auto" ? Math.max(this.$on.width(), this.$off.width()) : this.options.handleWidth;
428 | $handles.width(handleWidth);
429 | this.$label.width((function(_this) {
430 | return function(index, width) {
431 | if (_this.options.labelWidth !== "auto") {
432 | return _this.options.labelWidth;
433 | }
434 | if (width < handleWidth) {
435 | return handleWidth;
436 | } else {
437 | return width;
438 | }
439 | };
440 | })(this));
441 | this._handleWidth = this.$on.outerWidth();
442 | this._labelWidth = this.$label.outerWidth();
443 | this.$container.width((this._handleWidth * 2) + this._labelWidth);
444 | return this.$wrapper.width(this._handleWidth + this._labelWidth);
445 | };
446 |
447 | BootstrapSwitch.prototype._containerPosition = function(state, callback) {
448 | if (state == null) {
449 | state = this.options.state;
450 | }
451 | this.$container.css("margin-left", (function(_this) {
452 | return function() {
453 | var values;
454 | values = [0, "-" + _this._handleWidth + "px"];
455 | if (_this.options.indeterminate) {
456 | return "-" + (_this._handleWidth / 2) + "px";
457 | }
458 | if (state) {
459 | if (_this.options.inverse) {
460 | return values[1];
461 | } else {
462 | return values[0];
463 | }
464 | } else {
465 | if (_this.options.inverse) {
466 | return values[0];
467 | } else {
468 | return values[1];
469 | }
470 | }
471 | };
472 | })(this));
473 | if (!callback) {
474 | return;
475 | }
476 | return setTimeout(function() {
477 | return callback();
478 | }, 50);
479 | };
480 |
481 | BootstrapSwitch.prototype._init = function() {
482 | var init, initInterval;
483 | init = (function(_this) {
484 | return function() {
485 | _this.setPrevOptions();
486 | _this._width();
487 | return _this._containerPosition(null, function() {
488 | if (_this.options.animate) {
489 | return _this.$wrapper.addClass(_this.options.baseClass + "-animate");
490 | }
491 | });
492 | };
493 | })(this);
494 | if (this.$wrapper.is(":visible")) {
495 | return init();
496 | }
497 | return initInterval = window.setInterval((function(_this) {
498 | return function() {
499 | if (_this.$wrapper.is(":visible")) {
500 | init();
501 | return window.clearInterval(initInterval);
502 | }
503 | };
504 | })(this), 50);
505 | };
506 |
507 | BootstrapSwitch.prototype._elementHandlers = function() {
508 | return this.$element.on({
509 | "setPreviousOptions.bootstrapSwitch": (function(_this) {
510 | return function(e) {
511 | return _this.setPrevOptions();
512 | };
513 | })(this),
514 | "previousState.bootstrapSwitch": (function(_this) {
515 | return function(e) {
516 | _this.options = _this.prevOptions;
517 | if (_this.options.indeterminate) {
518 | _this.$wrapper.addClass(_this.options.baseClass + "-indeterminate");
519 | }
520 | return _this.$element.prop("checked", _this.options.state).trigger("change.bootstrapSwitch", true);
521 | };
522 | })(this),
523 | "change.bootstrapSwitch": (function(_this) {
524 | return function(e, skip) {
525 | var state;
526 | e.preventDefault();
527 | e.stopImmediatePropagation();
528 | state = _this.$element.is(":checked");
529 | _this._containerPosition(state);
530 | if (state === _this.options.state) {
531 | return;
532 | }
533 | _this.options.state = state;
534 | _this.$wrapper.toggleClass(_this.options.baseClass + "-off").toggleClass(_this.options.baseClass + "-on");
535 | if (!skip) {
536 | if (_this.$element.is(":radio")) {
537 | $("[name='" + (_this.$element.attr('name')) + "']").not(_this.$element).prop("checked", false).trigger("change.bootstrapSwitch", true);
538 | }
539 | return _this.$element.trigger("switchChange.bootstrapSwitch", [state]);
540 | }
541 | };
542 | })(this),
543 | "focus.bootstrapSwitch": (function(_this) {
544 | return function(e) {
545 | e.preventDefault();
546 | return _this.$wrapper.addClass(_this.options.baseClass + "-focused");
547 | };
548 | })(this),
549 | "blur.bootstrapSwitch": (function(_this) {
550 | return function(e) {
551 | e.preventDefault();
552 | return _this.$wrapper.removeClass(_this.options.baseClass + "-focused");
553 | };
554 | })(this),
555 | "keydown.bootstrapSwitch": (function(_this) {
556 | return function(e) {
557 | if (!e.which || _this.options.disabled || _this.options.readonly) {
558 | return;
559 | }
560 | switch (e.which) {
561 | case 37:
562 | e.preventDefault();
563 | e.stopImmediatePropagation();
564 | return _this.state(false);
565 | case 39:
566 | e.preventDefault();
567 | e.stopImmediatePropagation();
568 | return _this.state(true);
569 | }
570 | };
571 | })(this)
572 | });
573 | };
574 |
575 | BootstrapSwitch.prototype._handleHandlers = function() {
576 | this.$on.on("click.bootstrapSwitch", (function(_this) {
577 | return function(event) {
578 | event.preventDefault();
579 | event.stopPropagation();
580 | _this.state(false);
581 | return _this.$element.trigger("focus.bootstrapSwitch");
582 | };
583 | })(this));
584 | return this.$off.on("click.bootstrapSwitch", (function(_this) {
585 | return function(event) {
586 | event.preventDefault();
587 | event.stopPropagation();
588 | _this.state(true);
589 | return _this.$element.trigger("focus.bootstrapSwitch");
590 | };
591 | })(this));
592 | };
593 |
594 | BootstrapSwitch.prototype._labelHandlers = function() {
595 | return this.$label.on({
596 | "click": function(e) {
597 | return e.stopPropagation();
598 | },
599 | "mousedown.bootstrapSwitch touchstart.bootstrapSwitch": (function(_this) {
600 | return function(e) {
601 | if (_this._dragStart || _this.options.disabled || _this.options.readonly) {
602 | return;
603 | }
604 | e.preventDefault();
605 | e.stopPropagation();
606 | _this._dragStart = (e.pageX || e.originalEvent.touches[0].pageX) - parseInt(_this.$container.css("margin-left"), 10);
607 | if (_this.options.animate) {
608 | _this.$wrapper.removeClass(_this.options.baseClass + "-animate");
609 | }
610 | return _this.$element.trigger("focus.bootstrapSwitch");
611 | };
612 | })(this),
613 | "mousemove.bootstrapSwitch touchmove.bootstrapSwitch": (function(_this) {
614 | return function(e) {
615 | var difference;
616 | if (_this._dragStart == null) {
617 | return;
618 | }
619 | e.preventDefault();
620 | difference = (e.pageX || e.originalEvent.touches[0].pageX) - _this._dragStart;
621 | if (difference < -_this._handleWidth || difference > 0) {
622 | return;
623 | }
624 | _this._dragEnd = difference;
625 | return _this.$container.css("margin-left", _this._dragEnd + "px");
626 | };
627 | })(this),
628 | "mouseup.bootstrapSwitch touchend.bootstrapSwitch": (function(_this) {
629 | return function(e) {
630 | var state;
631 | if (!_this._dragStart) {
632 | return;
633 | }
634 | e.preventDefault();
635 | if (_this.options.animate) {
636 | _this.$wrapper.addClass(_this.options.baseClass + "-animate");
637 | }
638 | if (_this._dragEnd) {
639 | state = _this._dragEnd > -(_this._handleWidth / 2);
640 | _this._dragEnd = false;
641 | _this.state(_this.options.inverse ? !state : state);
642 | } else {
643 | _this.state(!_this.options.state);
644 | }
645 | return _this._dragStart = false;
646 | };
647 | })(this),
648 | "mouseleave.bootstrapSwitch": (function(_this) {
649 | return function(e) {
650 | return _this.$label.trigger("mouseup.bootstrapSwitch");
651 | };
652 | })(this)
653 | });
654 | };
655 |
656 | BootstrapSwitch.prototype._externalLabelHandler = function() {
657 | var $externalLabel;
658 | $externalLabel = this.$element.closest("label");
659 | return $externalLabel.on("click", (function(_this) {
660 | return function(event) {
661 | event.preventDefault();
662 | event.stopImmediatePropagation();
663 | if (event.target === $externalLabel[0]) {
664 | return _this.toggleState();
665 | }
666 | };
667 | })(this));
668 | };
669 |
670 | BootstrapSwitch.prototype._formHandler = function() {
671 | var $form;
672 | $form = this.$element.closest("form");
673 | if ($form.data("bootstrap-switch")) {
674 | return;
675 | }
676 | return $form.on("reset.bootstrapSwitch", function() {
677 | return window.setTimeout(function() {
678 | return $form.find("input").filter(function() {
679 | return $(this).data("bootstrap-switch");
680 | }).each(function() {
681 | return $(this).bootstrapSwitch("state", this.checked);
682 | });
683 | }, 1);
684 | }).data("bootstrap-switch", true);
685 | };
686 |
687 | BootstrapSwitch.prototype._getClasses = function(classes) {
688 | var c, cls, i, len;
689 | if (!$.isArray(classes)) {
690 | return [this.options.baseClass + "-" + classes];
691 | }
692 | cls = [];
693 | for (i = 0, len = classes.length; i < len; i++) {
694 | c = classes[i];
695 | cls.push(this.options.baseClass + "-" + c);
696 | }
697 | return cls;
698 | };
699 |
700 | return BootstrapSwitch;
701 |
702 | })();
703 | $.fn.bootstrapSwitch = function() {
704 | var args, option, ret;
705 | option = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
706 | ret = this;
707 | this.each(function() {
708 | var $this, data;
709 | $this = $(this);
710 | data = $this.data("bootstrap-switch");
711 | if (!data) {
712 | $this.data("bootstrap-switch", data = new BootstrapSwitch(this, option));
713 | }
714 | if (typeof option === "string") {
715 | return ret = data[option].apply(data, args);
716 | }
717 | });
718 | return ret;
719 | };
720 | $.fn.bootstrapSwitch.Constructor = BootstrapSwitch;
721 | return $.fn.bootstrapSwitch.defaults = {
722 | state: true,
723 | size: null,
724 | animate: true,
725 | disabled: false,
726 | readonly: false,
727 | indeterminate: false,
728 | inverse: false,
729 | radioAllOff: false,
730 | onColor: "primary",
731 | offColor: "default",
732 | onText: "ON",
733 | offText: "OFF",
734 | labelText: " ",
735 | handleWidth: "auto",
736 | labelWidth: "auto",
737 | baseClass: "bootstrap-switch",
738 | wrapperClass: "wrapper",
739 | onInit: function() {},
740 | onSwitchChange: function() {}
741 | };
742 | })(window.jQuery, window);
743 |
744 | }).call(this);
745 |
--------------------------------------------------------------------------------
/svn-server/assets/js/bootstrap.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Bootstrap v3.3.4 (http://getbootstrap.com)
3 | * Copyright 2011-2015 Twitter, Inc.
4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 | */
6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.4",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);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())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.4",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){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))};c.VERSION="3.3.4",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){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},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){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},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};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(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!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]()})}var d=function(b,c){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()};d.VERSION="3.3.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();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;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),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 e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";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))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-m
p.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;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))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();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()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){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()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;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(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .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()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){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()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a(document.body).height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
--------------------------------------------------------------------------------