PageSourceSearch

https://yourinspirationweb.com/wp-content/themes/yiw-4.0/js/bootstrap.js?ver=3.3.5

js yourinspirationweb.com collected 2026-10-02 06:51:53 UTC 38,809 bytes, 1,301 lines download raw bytes

vendor: 5,061 bytes, lines 1-172
1/*!
2 * Bootstrap v3.3.5 (http://getbootstrap.com)
3 * Copyright 2011-2016 Twitter, Inc.
4 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5 */
6
7/*!
8 * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=c2968483f54ddbb0319d644d0d12fc86)
9 * Config saved to config.json and https://gist.github.com/c2968483f54ddbb0319d644d0d12fc86
10 */
11if (typeof jQuery === 'undefined') {
12  throw new Error('Bootstrap\'s JavaScript requires jQuery')
13}
14+function ($) {
15  'use strict';
16  var version = $.fn.jquery.split(' ')[0].split('.')
17  if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) {
18    throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')
19  }
20}(jQuery);
21
22/* ========================================================================
23 * Bootstrap: modal.js v3.3.6
24 * http://getbootstrap.com/javascript/#modals
25 * ========================================================================
26 * Copyright 2011-2015 Twitter, Inc.
27 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
28 * ======================================================================== */
29
30
31+function ($) {
32  'use strict';
33
34  // MODAL CLASS DEFINITION
35  // ======================
36
37  var Modal = function (element, options) {
38    this.options             = options
39    this.$body               = $(document.body)
40    this.$element            = $(element)
41    this.$dialog             = this.$element.find('.modal-dialog')
42    this.$backdrop           = null
43    this.isShown             = null
44    this.originalBodyPad     = null
45    this.scrollbarWidth      = 0
46    this.ignoreBackdropClick = false
47
48    if (this.options.remote) {
49      this.$element
50        .find('.modal-content')
51        .load(this.options.remote, $.proxy(function () {
52          this.$element.trigger('loaded.bs.modal')
53        }, this))
54    }
55  }
56
57  Modal.VERSION  = '3.3.6'
58
59  Modal.TRANSITION_DURATION = 300
60  Modal.BACKDROP_TRANSITION_DURATION = 150
61
62  Modal.DEFAULTS = {
63    backdrop: true,
64    keyboard: true,
65    show: true
66  }
67
68  Modal.prototype.toggle = function (_relatedTarget) {
69    return this.isShown ? this.hide() : this.show(_relatedTarget)
70  }
71
72  Modal.prototype.show = function (_relatedTarget) {
73    var that = this
74    var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
75
76    this.$element.trigger(e)
77
78    if (this.isShown || e.isDefaultPrevented()) return
79
80    this.isShown = true
81
82    this.checkScrollbar()
83    this.setScrollbar()
84    this.$body.addClass('modal-open')
85
86    this.escape()
87    this.resize()
88
89    this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
90
91    this.$dialog.on('mousedown.dismiss.bs.modal', function () {
92      that.$element.one('mouseup.dismiss.bs.modal', function (e) {
93        if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
94      })
95    })
96
97    this.backdrop(function () {
98      var transition = $.support.transition && that.$element.hasClass('fade')
99
100      if (!that.$element.parent().length) {
101        that.$element.appendTo(that.$body) // don't move modals dom position
102      }
103
104      that.$element
105        .show()
106        .scrollTop(0)
107
108      that.adjustDialog()
109
110      if (transition) {
111        that.$element[0].offsetWidth // force reflow
112      }
113
114      that.$element.addClass('in')
115
116      that.enforceFocus()
117
118      var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
119
120      transition ?
121        that.$dialog // wait for modal to slide in
122          .one('bsTransitionEnd', function () {
123            that.$element.trigger('focus').trigger(e)
124          })
125          .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
126        that.$element.trigger('focus').trigger(e)
127    })
128  }
129
130  Modal.prototype.hide = function (e) {
131    if (e) e.preventDefault()
132
133    e = $.Event('hide.bs.modal')
134
135    this.$element.trigger(e)
136
137    if (!this.isShown || e.isDefaultPrevented()) return
138
139    this.isShown = false
140
141    this.escape()
142    this.resize()
143
144    $(document).off('focusin.bs.modal')
145
146    this.$element
147      .removeClass('in')
148      .off('click.dismiss.bs.modal')
149      .off('mouseup.dismiss.bs.modal')
150
151    this.$dialog.off('mousedown.dismiss.bs.modal')
152
153    $.support.transition && this.$element.hasClass('fade') ?
154      this.$element
155        .one('bsTransitionEnd', $.proxy(this.hideModal, this))
156        .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
157      this.hideModal()
158  }
159
160  Modal.prototype.enforceFocus = function () {
161    $(document)
162      .off('focusin.bs.modal') // guard against infinite focus loop
163      .on('focusin.bs.modal', $.proxy(function (e) {
164        if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
165          this.$element.trigger('focus')
166        }
167      }, this))
168  }
169
170  Modal.prototype.escape = function () {
171    if (this.isShown && this.options.keyboard) {
172      this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
vendor: 6,603 bytes, lines 173-388
173        e.which == 27 && this.hide()
174      }, this))
175    } else if (!this.isShown) {
176      this.$element.off('keydown.dismiss.bs.modal')
177    }
178  }
179
180  Modal.prototype.resize = function () {
181    if (this.isShown) {
182      $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
183    } else {
184      $(window).off('resize.bs.modal')
185    }
186  }
187
188  Modal.prototype.hideModal = function () {
189    var that = this
190    this.$element.hide()
191    this.backdrop(function () {
192      that.$body.removeClass('modal-open')
193      that.resetAdjustments()
194      that.resetScrollbar()
195      that.$element.trigger('hidden.bs.modal')
196    })
197  }
198
199  Modal.prototype.removeBackdrop = function () {
200    this.$backdrop && this.$backdrop.remove()
201    this.$backdrop = null
202  }
203
204  Modal.prototype.backdrop = function (callback) {
205    var that = this
206    var animate = this.$element.hasClass('fade') ? 'fade' : ''
207
208    if (this.isShown && this.options.backdrop) {
209      var doAnimate = $.support.transition && animate
210
211      this.$backdrop = $(document.createElement('div'))
212        .addClass('modal-backdrop ' + animate)
213        .appendTo(this.$body)
214
215      this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
216        if (this.ignoreBackdropClick) {
217          this.ignoreBackdropClick = false
218          return
219        }
220        if (e.target !== e.currentTarget) return
221        this.options.backdrop == 'static'
222          ? this.$element[0].focus()
223          : this.hide()
224      }, this))
225
226      if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
227
228      this.$backdrop.addClass('in')
229
230      if (!callback) return
231
232      doAnimate ?
233        this.$backdrop
234          .one('bsTransitionEnd', callback)
235          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
236        callback()
237
238    } else if (!this.isShown && this.$backdrop) {
239      this.$backdrop.removeClass('in')
240
241      var callbackRemove = function () {
242        that.removeBackdrop()
243        callback && callback()
244      }
245      $.support.transition && this.$element.hasClass('fade') ?
246        this.$backdrop
247          .one('bsTransitionEnd', callbackRemove)
248          .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
249        callbackRemove()
250
251    } else if (callback) {
252      callback()
253    }
254  }
255
256  // these following methods are used to handle overflowing modals
257
258  Modal.prototype.handleUpdate = function () {
259    this.adjustDialog()
260  }
261
262  Modal.prototype.adjustDialog = function () {
263    var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
264
265    this.$element.css({
266      paddingLeft:  !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
267      paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
268    })
269  }
270
271  Modal.prototype.resetAdjustments = function () {
272    this.$element.css({
273      paddingLeft: '',
274      paddingRight: ''
275    })
276  }
277
278  Modal.prototype.checkScrollbar = function () {
279    var fullWindowWidth = window.innerWidth
280    if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
281      var documentElementRect = document.documentElement.getBoundingClientRect()
282      fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
283    }
284    this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
285    this.scrollbarWidth = this.measureScrollbar()
286  }
287
288  Modal.prototype.setScrollbar = function () {
289    var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
290    this.originalBodyPad = document.body.style.paddingRight || ''
291    if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
292  }
293
294  Modal.prototype.resetScrollbar = function () {
295    this.$body.css('padding-right', this.originalBodyPad)
296  }
297
298  Modal.prototype.measureScrollbar = function () { // thx walsh
299    var scrollDiv = document.createElement('div')
300    scrollDiv.className = 'modal-scrollbar-measure'
301    this.$body.append(scrollDiv)
302    var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
303    this.$body[0].removeChild(scrollDiv)
304    return scrollbarWidth
305  }
306
307
308  // MODAL PLUGIN DEFINITION
309  // =======================
310
311  function Plugin(option, _relatedTarget) {
312    return this.each(function () {
313      var $this   = $(this)
314      var data    = $this.data('bs.modal')
315      var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
316
317      if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
318      if (typeof option == 'string') data[option](_relatedTarget)
319      else if (options.show) data.show(_relatedTarget)
320    })
321  }
322
323  var old = $.fn.modal
324
325  $.fn.modal             = Plugin
326  $.fn.modal.Constructor = Modal
327
328
329  // MODAL NO CONFLICT
330  // =================
331
332  $.fn.modal.noConflict = function () {
333    $.fn.modal = old
334    return this
335  }
336
337
338  // MODAL DATA-API
339  // ==============
340
341  $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
342    var $this   = $(this)
343    var href    = $this.attr('href')
344    var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
345    var option  = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
346
347    if ($this.is('a')) e.preventDefault()
348
349    $target.one('show.bs.modal', function (showEvent) {
350      if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
351      $target.one('hidden.bs.modal', function () {
352        $this.is(':visible') && $this.trigger('focus')
353      })
354    })
355    Plugin.call($target, option, this)
356  })
357
358}(jQuery);
359
360/* ========================================================================
361 * Bootstrap: tooltip.js v3.3.6
362 * http://getbootstrap.com/javascript/#tooltip
363 * Inspired by the original jQuery.tipsy by Jason Frame
364 * ========================================================================
365 * Copyright 2011-2015 Twitter, Inc.
366 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
367 * ======================================================================== */
368
369
370+function ($) {
371  'use strict';
372
373  // TOOLTIP PUBLIC CLASS DEFINITION
374  // ===============================
375
376  var Tooltip = function (element, options) {
377    this.type       = null
378    this.options    = null
379    this.enabled    = null
380    this.timeout    = null
381    this.hoverState = null
382    this.$element   = null
383    this.inState    = null
384
385    this.init('tooltip', element, options)
386  }
387
388  Tooltip.VERSION  = '3.3.6
vendor: 15,534 bytes, lines 388-876
388'
389
390  Tooltip.TRANSITION_DURATION = 150
391
392  Tooltip.DEFAULTS = {
393    animation: true,
394    placement: 'top',
395    selector: false,
396    template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
397    trigger: 'hover focus',
398    title: '',
399    delay: 0,
400    html: false,
401    container: false,
402    viewport: {
403      selector: 'body',
404      padding: 0
405    }
406  }
407
408  Tooltip.prototype.init = function (type, element, options) {
409    this.enabled   = true
410    this.type      = type
411    this.$element  = $(element)
412    this.options   = this.getOptions(options)
413    this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
414    this.inState   = { click: false, hover: false, focus: false }
415
416    if (this.$element[0] instanceof document.constructor && !this.options.selector) {
417      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
418    }
419
420    var triggers = this.options.trigger.split(' ')
421
422    for (var i = triggers.length; i--;) {
423      var trigger = triggers[i]
424
425      if (trigger == 'click') {
426        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
427      } else if (trigger != 'manual') {
428        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'
429        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
430
431        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
432        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
433      }
434    }
435
436    this.options.selector ?
437      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
438      this.fixTitle()
439  }
440
441  Tooltip.prototype.getDefaults = function () {
442    return Tooltip.DEFAULTS
443  }
444
445  Tooltip.prototype.getOptions = function (options) {
446    options = $.extend({}, this.getDefaults(), this.$element.data(), options)
447
448    if (options.delay && typeof options.delay == 'number') {
449      options.delay = {
450        show: options.delay,
451        hide: options.delay
452      }
453    }
454
455    return options
456  }
457
458  Tooltip.prototype.getDelegateOptions = function () {
459    var options  = {}
460    var defaults = this.getDefaults()
461
462    this._options && $.each(this._options, function (key, value) {
463      if (defaults[key] != value) options[key] = value
464    })
465
466    return options
467  }
468
469  Tooltip.prototype.enter = function (obj) {
470    var self = obj instanceof this.constructor ?
471      obj : $(obj.currentTarget).data('bs.' + this.type)
472
473    if (!self) {
474      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
475      $(obj.currentTarget).data('bs.' + this.type, self)
476    }
477
478    if (obj instanceof $.Event) {
479      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
480    }
481
482    if (self.tip().hasClass('in') || self.hoverState == 'in') {
483      self.hoverState = 'in'
484      return
485    }
486
487    clearTimeout(self.timeout)
488
489    self.hoverState = 'in'
490
491    if (!self.options.delay || !self.options.delay.show) return self.show()
492
493    self.timeout = setTimeout(function () {
494      if (self.hoverState == 'in') self.show()
495    }, self.options.delay.show)
496  }
497
498  Tooltip.prototype.isInStateTrue = function () {
499    for (var key in this.inState) {
500      if (this.inState[key]) return true
501    }
502
503    return false
504  }
505
506  Tooltip.prototype.leave = function (obj) {
507    var self = obj instanceof this.constructor ?
508      obj : $(obj.currentTarget).data('bs.' + this.type)
509
510    if (!self) {
511      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
512      $(obj.currentTarget).data('bs.' + this.type, self)
513    }
514
515    if (obj instanceof $.Event) {
516      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
517    }
518
519    if (self.isInStateTrue()) return
520
521    clearTimeout(self.timeout)
522
523    self.hoverState = 'out'
524
525    if (!self.options.delay || !self.options.delay.hide) return self.hide()
526
527    self.timeout = setTimeout(function () {
528      if (self.hoverState == 'out') self.hide()
529    }, self.options.delay.hide)
530  }
531
532  Tooltip.prototype.show = function () {
533    var e = $.Event('show.bs.' + this.type)
534
535    if (this.hasContent() && this.enabled) {
536      this.$element.trigger(e)
537
538      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
539      if (e.isDefaultPrevented() || !inDom) return
540      var that = this
541
542      var $tip = this.tip()
543
544      var tipId = this.getUID(this.type)
545
546      this.setContent()
547      $tip.attr('id', tipId)
548      this.$element.attr('aria-describedby', tipId)
549
550      if (this.options.animation) $tip.addClass('fade')
551
552      var placement = typeof this.options.placement == 'function' ?
553        this.options.placement.call(this, $tip[0], this.$element[0]) :
554        this.options.placement
555
556      var autoToken = /\s?auto?\s?/i
557      var autoPlace = autoToken.test(placement)
558      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
559
560      $tip
561        .detach()
562        .css({ top: 0, left: 0, display: 'block' })
563        .addClass(placement)
564        .data('bs.' + this.type, this)
565
566      this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
567      this.$element.trigger('inserted.bs.' + this.type)
568
569      var pos          = this.getPosition()
570      var actualWidth  = $tip[0].offsetWidth
571      var actualHeight = $tip[0].offsetHeight
572
573      if (autoPlace) {
574        var orgPlacement = placement
575        var viewportDim = this.getPosition(this.$viewport)
576
577        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :
578                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :
579                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :
580                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :
581                    placement
582
583        $tip
584          .removeClass(orgPlacement)
585          .addClass(placement)
586      }
587
588      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
589
590      this.applyPlacement(calculatedOffset, placement)
591
592      var complete = function () {
593        var prevHoverState = that.hoverState
594        that.$element.trigger('shown.bs.' + that.type)
595        that.hoverState = null
596
597        if (prevHoverState == 'out') that.leave(that)
598      }
599
600      $.support.transition && this.$tip.hasClass('fade') ?
601        $tip
602          .one('bsTransitionEnd', complete)
603          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
604        complete()
605    }
606  }
607
608  Tooltip.prototype.applyPlacement = function (offset, placement) {
609    var $tip   = this.tip()
610    var width  = $tip[0].offsetWidth
611    var height = $tip[0].offsetHeight
612
613    // manually read margins because getBoundingClientRect includes difference
614    var marginTop = parseInt($tip.css('margin-top'), 10)
615    var marginLeft = parseInt($tip.css('margin-left'), 10)
616
617    // we must check for NaN for ie 8/9
618    if (isNaN(marginTop))  marginTop  = 0
619    if (isNaN(marginLeft)) marginLeft = 0
620
621    offset.top  += marginTop
622    offset.left += marginLeft
623
624    // $.fn.offset doesn't round pixel values
625    // so we use setOffset directly with our own function B-0
626    $.offset.setOffset($tip[0], $.extend({
627      using: function (props) {
628        $tip.css({
629          top: Math.round(props.top),
630          left: Math.round(props.left)
631        })
632      }
633    }, offset), 0)
634
635    $tip.addClass('in')
636
637    // check to see if placing tip in new offset caused the tip to resize itself
638    var actualWidth  = $tip[0].offsetWidth
639    var actualHeight = $tip[0].offsetHeight
640
641    if (placement == 'top' && actualHeight != height) {
642      offset.top = offset.top + height - actualHeight
643    }
644
645    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
646
647    if (delta.left) offset.left += delta.left
648    else offset.top += delta.top
649
650    var isVertical          = /top|bottom/.test(placement)
651    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
652    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
653
654    $tip.offset(offset)
655    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
656  }
657
658  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
659    this.arrow()
660      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
661      .css(isVertical ? 'top' : 'left', '')
662  }
663
664  Tooltip.prototype.setContent = function () {
665    var $tip  = this.tip()
666    var title = this.getTitle()
667
668    $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
669    $tip.removeClass('fade in top bottom left right')
670  }
671
672  Tooltip.prototype.hide = function (callback) {
673    var that = this
674    var $tip = $(this.$tip)
675    var e    = $.Event('hide.bs.' + this.type)
676
677    function complete() {
678      if (that.hoverState != 'in') $tip.detach()
679      that.$element
680        .removeAttr('aria-describedby')
681        .trigger('hidden.bs.' + that.type)
682      callback && callback()
683    }
684
685    this.$element.trigger(e)
686
687    if (e.isDefaultPrevented()) return
688
689    $tip.removeClass('in')
690
691    $.support.transition && $tip.hasClass('fade') ?
692      $tip
693        .one('bsTransitionEnd', complete)
694        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
695      complete()
696
697    this.hoverState = null
698
699    return this
700  }
701
702  Tooltip.prototype.fixTitle = function () {
703    var $e = this.$element
704    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
705      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
706    }
707  }
708
709  Tooltip.prototype.hasContent = function () {
710    return this.getTitle()
711  }
712
713  Tooltip.prototype.getPosition = function ($element) {
714    $element   = $element || this.$element
715
716    var el     = $element[0]
717    var isBody = el.tagName == 'BODY'
718
719    var elRect    = el.getBoundingClientRect()
720    if (elRect.width == null) {
721      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
722      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
723    }
724    var elOffset  = isBody ? { top: 0, left: 0 } : $element.offset()
725    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
726    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
727
728    return $.extend({}, elRect, scroll, outerDims, elOffset)
729  }
730
731  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
732    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :
733           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
734           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
735        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
736
737  }
738
739  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
740    var delta = { top: 0, left: 0 }
741    if (!this.$viewport) return delta
742
743    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
744    var viewportDimensions = this.getPosition(this.$viewport)
745
746    if (/right|left/.test(placement)) {
747      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll
748      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
749      if (topEdgeOffset < viewportDimensions.top) { // top overflow
750        delta.top = viewportDimensions.top - topEdgeOffset
751      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
752        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
753      }
754    } else {
755      var leftEdgeOffset  = pos.left - viewportPadding
756      var rightEdgeOffset = pos.left + viewportPadding + actualWidth
757      if (leftEdgeOffset < viewportDimensions.left) { // left overflow
758        delta.left = viewportDimensions.left - leftEdgeOffset
759      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
760        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
761      }
762    }
763
764    return delta
765  }
766
767  Tooltip.prototype.getTitle = function () {
768    var title
769    var $e = this.$element
770    var o  = this.options
771
772    title = $e.attr('data-original-title')
773      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)
774
775    return title
776  }
777
778  Tooltip.prototype.getUID = function (prefix) {
779    do prefix += ~~(Math.random() * 1000000)
780    while (document.getElementById(prefix))
781    return prefix
782  }
783
784  Tooltip.prototype.tip = function () {
785    if (!this.$tip) {
786      this.$tip = $(this.options.template)
787      if (this.$tip.length != 1) {
788        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
789      }
790    }
791    return this.$tip
792  }
793
794  Tooltip.prototype.arrow = function () {
795    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
796  }
797
798  Tooltip.prototype.enable = function () {
799    this.enabled = true
800  }
801
802  Tooltip.prototype.disable = function () {
803    this.enabled = false
804  }
805
806  Tooltip.prototype.toggleEnabled = function () {
807    this.enabled = !this.enabled
808  }
809
810  Tooltip.prototype.toggle = function (e) {
811    var self = this
812    if (e) {
813      self = $(e.currentTarget).data('bs.' + this.type)
814      if (!self) {
815        self = new this.constructor(e.currentTarget, this.getDelegateOptions())
816        $(e.currentTarget).data('bs.' + this.type, self)
817      }
818    }
819
820    if (e) {
821      self.inState.click = !self.inState.click
822      if (self.isInStateTrue()) self.enter(self)
823      else self.leave(self)
824    } else {
825      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
826    }
827  }
828
829  Tooltip.prototype.destroy = function () {
830    var that = this
831    clearTimeout(this.timeout)
832    this.hide(function () {
833      that.$element.off('.' + that.type).removeData('bs.' + that.type)
834      if (that.$tip) {
835        that.$tip.detach()
836      }
837      that.$tip = null
838      that.$arrow = null
839      that.$viewport = null
840    })
841  }
842
843
844  // TOOLTIP PLUGIN DEFINITION
845  // =========================
846
847  function Plugin(option) {
848    return this.each(function () {
849      var $this   = $(this)
850      var data    = $this.data('bs.tooltip')
851      var options = typeof option == 'object' && option
852
853      if (!data && /destroy|hide/.test(option)) return
854      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
855      if (typeof option == 'string') data[option]()
856    })
857  }
858
859  var old = $.fn.tooltip
860
861  $.fn.tooltip             = Plugin
862  $.fn.tooltip.Constructor = Tooltip
863
864
865  // TOOLTIP NO CONFLICT
866  // ===================
867
868  $.fn.tooltip.noConflict = function () {
869    $.fn.tooltip = old
870    return this
871  }
872
873}(jQuery);
874
875/* ========================================================================
876 * Bootstrap: 
vendor: 10,247 bytes, lines 876-1254
876tab.js v3.3.6
877 * http://getbootstrap.com/javascript/#tabs
878 * ========================================================================
879 * Copyright 2011-2015 Twitter, Inc.
880 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
881 * ======================================================================== */
882
883
884+function ($) {
885  'use strict';
886
887  // TAB CLASS DEFINITION
888  // ====================
889
890  var Tab = function (element) {
891    // jscs:disable requireDollarBeforejQueryAssignment
892    this.element = $(element)
893    // jscs:enable requireDollarBeforejQueryAssignment
894  }
895
896  Tab.VERSION = '3.3.6'
897
898  Tab.TRANSITION_DURATION = 150
899
900  Tab.prototype.show = function () {
901    var $this    = this.element
902    var $ul      = $this.closest('ul:not(.dropdown-menu)')
903    var selector = $this.data('target')
904
905    if (!selector) {
906      selector = $this.attr('href')
907      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
908    }
909
910    if ($this.parent('li').hasClass('active')) return
911
912    var $previous = $ul.find('.active:last a')
913    var hideEvent = $.Event('hide.bs.tab', {
914      relatedTarget: $this[0]
915    })
916    var showEvent = $.Event('show.bs.tab', {
917      relatedTarget: $previous[0]
918    })
919
920    $previous.trigger(hideEvent)
921    $this.trigger(showEvent)
922
923    if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
924
925    var $target = $(selector)
926
927    this.activate($this.closest('li'), $ul)
928    this.activate($target, $target.parent(), function () {
929      $previous.trigger({
930        type: 'hidden.bs.tab',
931        relatedTarget: $this[0]
932      })
933      $this.trigger({
934        type: 'shown.bs.tab',
935        relatedTarget: $previous[0]
936      })
937    })
938  }
939
940  Tab.prototype.activate = function (element, container, callback) {
941    var $active    = container.find('> .active')
942    var transition = callback
943      && $.support.transition
944      && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
945
946    function next() {
947      $active
948        .removeClass('active')
949        .find('> .dropdown-menu > .active')
950          .removeClass('active')
951        .end()
952        .find('[data-toggle="tab"]')
953          .attr('aria-expanded', false)
954
955      element
956        .addClass('active')
957        .find('[data-toggle="tab"]')
958          .attr('aria-expanded', true)
959
960      if (transition) {
961        element[0].offsetWidth // reflow for transition
962        element.addClass('in')
963      } else {
964        element.removeClass('fade')
965      }
966
967      if (element.parent('.dropdown-menu').length) {
968        element
969          .closest('li.dropdown')
970            .addClass('active')
971          .end()
972          .find('[data-toggle="tab"]')
973            .attr('aria-expanded', true)
974      }
975
976      callback && callback()
977    }
978
979    $active.length && transition ?
980      $active
981        .one('bsTransitionEnd', next)
982        .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
983      next()
984
985    $active.removeClass('in')
986  }
987
988
989  // TAB PLUGIN DEFINITION
990  // =====================
991
992  function Plugin(option) {
993    return this.each(function () {
994      var $this = $(this)
995      var data  = $this.data('bs.tab')
996
997      if (!data) $this.data('bs.tab', (data = new Tab(this)))
998      if (typeof option == 'string') data[option]()
999    })
1000  }
1001
1002  var old = $.fn.tab
1003
1004  $.fn.tab             = Plugin
1005  $.fn.tab.Constructor = Tab
1006
1007
1008  // TAB NO CONFLICT
1009  // ===============
1010
1011  $.fn.tab.noConflict = function () {
1012    $.fn.tab = old
1013    return this
1014  }
1015
1016
1017  // TAB DATA-API
1018  // ============
1019
1020  var clickHandler = function (e) {
1021    e.preventDefault()
1022    Plugin.call($(this), 'show')
1023  }
1024
1025  $(document)
1026    .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
1027    .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
1028
1029}(jQuery);
1030
1031/* ========================================================================
1032 * Bootstrap: collapse.js v3.3.6
1033 * http://getbootstrap.com/javascript/#collapse
1034 * ========================================================================
1035 * Copyright 2011-2015 Twitter, Inc.
1036 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1037 * ======================================================================== */
1038
1039
1040+function ($) {
1041  'use strict';
1042
1043  // COLLAPSE PUBLIC CLASS DEFINITION
1044  // ================================
1045
1046  var Collapse = function (element, options) {
1047    this.$element      = $(element)
1048    this.options       = $.extend({}, Collapse.DEFAULTS, options)
1049    this.$trigger      = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
1050                           '[data-toggle="collapse"][data-target="#' + element.id + '"]')
1051    this.transitioning = null
1052
1053    if (this.options.parent) {
1054      this.$parent = this.getParent()
1055    } else {
1056      this.addAriaAndCollapsedClass(this.$element, this.$trigger)
1057    }
1058
1059    if (this.options.toggle) this.toggle()
1060  }
1061
1062  Collapse.VERSION  = '3.3.6'
1063
1064  Collapse.TRANSITION_DURATION = 350
1065
1066  Collapse.DEFAULTS = {
1067    toggle: true
1068  }
1069
1070  Collapse.prototype.dimension = function () {
1071    var hasWidth = this.$element.hasClass('width')
1072    return hasWidth ? 'width' : 'height'
1073  }
1074
1075  Collapse.prototype.show = function () {
1076    if (this.transitioning || this.$element.hasClass('in')) return
1077
1078    var activesData
1079    var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
1080
1081    if (actives && actives.length) {
1082      activesData = actives.data('bs.collapse')
1083      if (activesData && activesData.transitioning) return
1084    }
1085
1086    var startEvent = $.Event('show.bs.collapse')
1087    this.$element.trigger(startEvent)
1088    if (startEvent.isDefaultPrevented()) return
1089
1090    if (actives && actives.length) {
1091      Plugin.call(actives, 'hide')
1092      activesData || actives.data('bs.collapse', null)
1093    }
1094
1095    var dimension = this.dimension()
1096
1097    this.$element
1098      .removeClass('collapse')
1099      .addClass('collapsing')[dimension](0)
1100      .attr('aria-expanded', true)
1101
1102    this.$trigger
1103      .removeClass('collapsed')
1104      .attr('aria-expanded', true)
1105
1106    this.transitioning = 1
1107
1108    var complete = function () {
1109      this.$element
1110        .removeClass('collapsing')
1111        .addClass('collapse in')[dimension]('')
1112      this.transitioning = 0
1113      this.$element
1114        .trigger('shown.bs.collapse')
1115    }
1116
1117    if (!$.support.transition) return complete.call(this)
1118
1119    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
1120
1121    this.$element
1122      .one('bsTransitionEnd', $.proxy(complete, this))
1123      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
1124  }
1125
1126  Collapse.prototype.hide = function () {
1127    if (this.transitioning || !this.$element.hasClass('in')) return
1128
1129    var startEvent = $.Event('hide.bs.collapse')
1130    this.$element.trigger(startEvent)
1131    if (startEvent.isDefaultPrevented()) return
1132
1133    var dimension = this.dimension()
1134
1135    this.$element[dimension](this.$element[dimension]())[0].offsetHeight
1136
1137    this.$element
1138      .addClass('collapsing')
1139      .removeClass('collapse in')
1140      .attr('aria-expanded', false)
1141
1142    this.$trigger
1143      .addClass('collapsed')
1144      .attr('aria-expanded', false)
1145
1146    this.transitioning = 1
1147
1148    var complete = function () {
1149      this.transitioning = 0
1150      this.$element
1151        .removeClass('collapsing')
1152        .addClass('collapse')
1153        .trigger('hidden.bs.collapse')
1154    }
1155
1156    if (!$.support.transition) return complete.call(this)
1157
1158    this.$element
1159      [dimension](0)
1160      .one('bsTransitionEnd', $.proxy(complete, this))
1161      .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
1162  }
1163
1164  Collapse.prototype.toggle = function () {
1165    this[this.$element.hasClass('in') ? 'hide' : 'show']()
1166  }
1167
1168  Collapse.prototype.getParent = function () {
1169    return $(this.options.parent)
1170      .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
1171      .each($.proxy(function (i, element) {
1172        var $element = $(element)
1173        this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
1174      }, this))
1175      .end()
1176  }
1177
1178  Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
1179    var isOpen = $element.hasClass('in')
1180
1181    $element.attr('aria-expanded', isOpen)
1182    $trigger
1183      .toggleClass('collapsed', !isOpen)
1184      .attr('aria-expanded', isOpen)
1185  }
1186
1187  function getTargetFromTrigger($trigger) {
1188    var href
1189    var target = $trigger.attr('data-target')
1190      || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
1191
1192    return $(target)
1193  }
1194
1195
1196  // COLLAPSE PLUGIN DEFINITION
1197  // ==========================
1198
1199  function Plugin(option) {
1200    return this.each(function () {
1201      var $this   = $(this)
1202      var data    = $this.data('bs.collapse')
1203      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
1204
1205      if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
1206      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
1207      if (typeof option == 'string') data[option]()
1208    })
1209  }
1210
1211  var old = $.fn.collapse
1212
1213  $.fn.collapse             = Plugin
1214  $.fn.collapse.Constructor = Collapse
1215
1216
1217  // COLLAPSE NO CONFLICT
1218  // ====================
1219
1220  $.fn.collapse.noConflict = function () {
1221    $.fn.collapse = old
1222    return this
1223  }
1224
1225
1226  // COLLAPSE DATA-API
1227  // =================
1228
1229  $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
1230    var $this   = $(this)
1231
1232    if (!$this.attr('data-target')) e.preventDefault()
1233
1234    var $target = getTargetFromTrigger($this)
1235    var data    = $target.data('bs.collapse')
1236    var option  = data ? 'toggle' : $this.data()
1237
1238    Plugin.call($target, option)
1239  })
1240
1241}(jQuery);
1242
1243/* ========================================================================
1244 * Bootstrap: transition.js v3.3.6
1245 * http://getbootstrap.com/javascript/#transitions
1246 * ========================================================================
1247 * Copyright 2011-2015 Twitter, Inc.
1248 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1249 * ======================================================================== */
1250
1251
1252+function ($) {
1253  'use strict';
1254
vendor: 1,364 bytes, lines 1255-1301
1255  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
1256  // ============================================================
1257
1258  function transitionEnd() {
1259    var el = document.createElement('bootstrap')
1260
1261    var transEndEventNames = {
1262      WebkitTransition : 'webkitTransitionEnd',
1263      MozTransition    : 'transitionend',
1264      OTransition      : 'oTransitionEnd otransitionend',
1265      transition       : 'transitionend'
1266    }
1267
1268    for (var name in transEndEventNames) {
1269      if (el.style[name] !== undefined) {
1270        return { end: transEndEventNames[name] }
1271      }
1272    }
1273
1274    return false // explicit for ie8 (  ._.)
1275  }
1276
1277  // http://blog.alexmaccaw.com/css-transitions
1278  $.fn.emulateTransitionEnd = function (duration) {
1279    var called = false
1280    var $el = this
1281    $(this).one('bsTransitionEnd', function () { called = true })
1282    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
1283    setTimeout(callback, duration)
1284    return this
1285  }
1286
1287  $(function () {
1288    $.support.transition = transitionEnd()
1289
1290    if (!$.support.transition) return
1291
1292    $.event.special.bsTransitionEnd = {
1293      bindType: $.support.transition.end,
1294      delegateType: $.support.transition.end,
1295      handle: function (e) {
1296        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
1297      }
1298    }
1299  })
1300
1301}(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.