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