vendor: 45,765 bytes, lines 1-771
1if(typeof jQuery==='undefined'){throw new Error('Bootstrap\'s JavaScript requires jQuery')} 2+function($){'use strict';var version=$.fn.jquery.split(' ')[0].split('.') 3if((version[0]<2&&version[1]<9)||(version[0]==1&&version[1]==9&&version[2]<1)){throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')}}(jQuery);+function($){'use strict';function transitionEnd(){var el=document.createElement('bootstrap') 4var transEndEventNames={WebkitTransition:'webkitTransitionEnd',MozTransition:'transitionend',OTransition:'oTransitionEnd otransitionend',transition:'transitionend'} 5for(var name in transEndEventNames){if(el.style[name]!==undefined){return{end:transEndEventNames[name]}}} 6return false} 7$.fn.emulateTransitionEnd=function(duration){var called=false 8var $el=this 9$(this).one('bsTransitionEnd',function(){called=true}) 10var callback=function(){if(!called)$($el).trigger($.support.transition.end)} 11setTimeout(callback,duration) 12return this} 13$(function(){$.support.transition=transitionEnd() 14if(!$.support.transition)return 15$.event.special.bsTransitionEnd={bindType:$.support.transition.end,delegateType:$.support.transition.end,handle:function(e){if($(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}})}(jQuery);+function($){'use strict';var dismiss='[data-dismiss="alert"]' 16var Alert=function(el){$(el).on('click',dismiss,this.close)} 17Alert.VERSION='3.3.4' 18Alert.TRANSITION_DURATION=150 19Alert.prototype.close=function(e){var $this=$(this) 20var selector=$this.attr('data-target') 21if(!selector){selector=$this.attr('href') 22selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')} 23var $parent=$(selector) 24if(e)e.preventDefault() 25if(!$parent.length){$parent=$this.closest('.alert')} 26$parent.trigger(e=$.Event('close.bs.alert')) 27if(e.isDefaultPrevented())return 28$parent.removeClass('in') 29function removeElement(){$parent.detach().trigger('closed.bs.alert').remove()} 30$.support.transition&&$parent.hasClass('fade')?$parent.one('bsTransitionEnd',removeElement).emulateTransitionEnd(Alert.TRANSITION_DURATION):removeElement()} 31function Plugin(option){return this.each(function(){var $this=$(this) 32var data=$this.data('bs.alert') 33if(!data)$this.data('bs.alert',(data=new Alert(this))) 34if(typeof option=='string')data[option].call($this)})} 35var old=$.fn.alert 36$.fn.alert=Plugin 37$.fn.alert.Constructor=Alert 38$.fn.alert.noConflict=function(){$.fn.alert=old 39return this} 40$(document).on('click.bs.alert.data-api',dismiss,Alert.prototype.close)}(jQuery);+function($){'use strict';var Button=function(element,options){this.$element=$(element) 41this.options=$.extend({},Button.DEFAULTS,options) 42this.isLoading=false} 43Button.VERSION='3.3.4' 44Button.DEFAULTS={loadingText:'loading...'} 45Button.prototype.setState=function(state){var d='disabled' 46var $el=this.$element 47var val=$el.is('input')?'val':'html' 48var data=$el.data() 49state=state+'Text' 50if(data.resetText==null)$el.data('resetText',$el[val]()) 51setTimeout($.proxy(function(){$el[val](data[state]==null?this.options[state]:data[state]) 52if(state=='loadingText'){this.isLoading=true 53$el.addClass(d).attr(d,d)}else if(this.isLoading){this.isLoading=false 54$el.removeClass(d).removeAttr(d)}},this),0)} 55Button.prototype.toggle=function(){var changed=true 56var $parent=this.$element.closest('[data-toggle="buttons"]') 57if($parent.length){var $input=this.$element.find('input') 58if($input.prop('type')=='radio'){if($input.prop('checked')&&this.$element.hasClass('active'))changed=false 59else $parent.find('.active').removeClass('active')} 60if(changed)$input.prop('checked',!this.$element.hasClass('active')).trigger('change')}else{this.$element.attr('aria-pressed',!this.$element.hasClass('active'))} 61if(changed)this.$element.toggleClass('active')} 62function Plugin(option){return this.each(function(){var $this=$(this) 63var data=$this.data('bs.button') 64var options=typeof option=='object'&&option 65if(!data)$this.data('bs.button',(data=new Button(this,options))) 66if(option=='toggle')data.toggle() 67else if(option)data.setState(option)})} 68var old=$.fn.button 69$.fn.button=Plugin 70$.fn.button.Constructor=Button 71$.fn.button.noConflict=function(){$.fn.button=old 72return this} 73$(document).on('click.bs.button.data-api','[data-toggle^="button"]',function(e){var $btn=$(e.target) 74if(!$btn.hasClass('btn'))$btn=$btn.closest('.btn') 75Plugin.call($btn,'toggle') 76e.preventDefault()}).on('focus.bs.button.data-api blur.bs.button.data-api','[data-toggle^="button"]',function(e){$(e.target).closest('.btn').toggleClass('focus',/^focus(in)?$/.test(e.type))})}(jQuery);+function($){'use strict';var Carousel=function(element,options){this.$element=$(element) 77this.$indicators=this.$element.find('.carousel-indicators') 78this.options=options 79this.paused=null 80this.sliding=null 81this.interval=null 82this.$active=null 83this.$items=null 84this.options.keyboard&&this.$element.on('keydown.bs.carousel',$.proxy(this.keydown,this)) 85this.options.pause=='hover'&&!('ontouchstart'in document.documentElement)&&this.$element.on('mouseenter.bs.carousel',$.proxy(this.pause,this)).on('mouseleave.bs.carousel',$.proxy(this.cycle,this))} 86Carousel.VERSION='3.3.4' 87Carousel.TRANSITION_DURATION=600 88Carousel.DEFAULTS={interval:5000,pause:'hover',wrap:true,keyboard:true} 89Carousel.prototype.keydown=function(e){if(/input|textarea/i.test(e.target.tagName))return 90switch(e.which){case 37:this.prev();break 91case 39:this.next();break 92default:return} 93e.preventDefault()} 94Carousel.prototype.cycle=function(e){e||(this.paused=false) 95this.interval&&clearInterval(this.interval) 96this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval)) 97return this} 98Carousel.prototype.getItemIndex=function(item){this.$items=item.parent().children('.item') 99return this.$items.index(item||this.$active)} 100Carousel.prototype.getItemForDirection=function(direction,active){var activeIndex=this.getItemIndex(active) 101var willWrap=(direction=='prev'&&activeIndex===0)||(direction=='next'&&activeIndex==(this.$items.length-1)) 102if(willWrap&&!this.options.wrap)return active 103var delta=direction=='prev'?-1:1 104var itemIndex=(activeIndex+delta)%this.$items.length 105return this.$items.eq(itemIndex)} 106Carousel.prototype.to=function(pos){var that=this 107var activeIndex=this.getItemIndex(this.$active=this.$element.find('.item.active')) 108if(pos>(this.$items.length-1)||pos<0)return 109if(this.sliding)return this.$element.one('slid.bs.carousel',function(){that.to(pos)}) 110if(activeIndex==pos)return this.pause().cycle() 111return this.slide(pos>activeIndex?'next':'prev',this.$items.eq(pos))} 112Carousel.prototype.pause=function(e){e||(this.paused=true) 113if(this.$element.find('.next, .prev').length&&$.support.transition){this.$element.trigger($.support.transition.end) 114this.cycle(true)} 115this.interval=clearInterval(this.interval) 116return this} 117Carousel.prototype.next=function(){if(this.sliding)return 118return this.slide('next')} 119Carousel.prototype.prev=function(){if(this.sliding)return 120return this.slide('prev')} 121Carousel.prototype.slide=function(type,next){var $active=this.$element.find('.item.active') 122var $next=next||this.getItemForDirection(type,$active) 123var isCycling=this.interval 124var direction=type=='next'?'left':'right' 125var that=this 126if($next.hasClass('active'))return(this.sliding=false) 127var relatedTarget=$next[0] 128var slideEvent=$.Event('slide.bs.carousel',{relatedTarget:relatedTarget,direction:direction}) 129this.$element.trigger(slideEvent) 130if(slideEvent.isDefaultPrevented())return 131this.sliding=true 132isCycling&&this.pause() 133if(this.$indicators.length){this.$indicators.find('.active').removeClass('active') 134var $nextIndicator=$(this.$indicators.children()[this.getItemIndex($next)]) 135$nextIndicator&&$nextIndicator.addClass('active')} 136var slidEvent=$.Event('slid.bs.carousel',{relatedTarget:relatedTarget,direction:direction}) 137if($.support.transition&&this.$element.hasClass('slide')){$next.addClass(type) 138$next[0].offsetWidth 139$active.addClass(direction) 140$next.addClass(direction) 141$active.one('bsTransitionEnd',function(){$next.removeClass([type,direction].join(' ')).addClass('active') 142$active.removeClass(['active',direction].join(' ')) 143that.sliding=false 144setTimeout(function(){that.$element.trigger(slidEvent)},0)}).emulateTransitionEnd(Carousel.TRANSITION_DURATION)}else{$active.removeClass('active') 145$next.addClass('active') 146this.sliding=false 147this.$element.trigger(slidEvent)} 148isCycling&&this.cycle() 149return this} 150function Plugin(option){return this.each(function(){var $this=$(this) 151var data=$this.data('bs.carousel') 152var options=$.extend({},Carousel.DEFAULTS,$this.data(),typeof option=='object'&&option) 153var action=typeof option=='string'?option:options.slide 154if(!data)$this.data('bs.carousel',(data=new Carousel(this,options))) 155if(typeof option=='number')data.to(option) 156else if(action)data[action]() 157else if(options.interval)data.pause().cycle()})} 158var old=$.fn.carousel 159$.fn.carousel=Plugin 160$.fn.carousel.Constructor=Carousel 161$.fn.carousel.noConflict=function(){$.fn.carousel=old 162return this} 163var clickHandler=function(e){var href 164var $this=$(this) 165var $target=$($this.attr('data-target')||(href=$this.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'')) 166if(!$target.hasClass('carousel'))return 167var options=$.extend({},$target.data(),$this.data()) 168var slideIndex=$this.attr('data-slide-to') 169if(slideIndex)options.interval=false 170Plugin.call($target,options) 171if(slideIndex){$target.data('bs.carousel').to(slideIndex)} 172e.preventDefault()} 173$(document).on('click.bs.carousel.data-api','[data-slide]',clickHandler).on('click.bs.carousel.data-api','[data-slide-to]',clickHandler) 174$(window).on('load',function(){$('[data-ride="carousel"]').each(function(){var $carousel=$(this) 175Plugin.call($carousel,$carousel.data())})})}(jQuery);+function($){'use strict';var Collapse=function(element,options){this.$element=$(element) 176this.options=$.extend({},Collapse.DEFAULTS,options) 177this.$trigger=$('[data-toggle="collapse"][href="#'+element.id+'"],'+'[data-toggle="collapse"][data-target="#'+element.id+'"]') 178this.transitioning=null 179if(this.options.parent){this.$parent=this.getParent()}else{this.addAriaAndCollapsedClass(this.$element,this.$trigger)} 180if(this.options.toggle)this.toggle()} 181Collapse.VERSION='3.3.4' 182Collapse.TRANSITION_DURATION=350 183Collapse.DEFAULTS={toggle:true} 184Collapse.prototype.dimension=function(){var hasWidth=this.$element.hasClass('width') 185return hasWidth?'width':'height'} 186Collapse.prototype.show=function(){if(this.transitioning||this.$element.hasClass('in'))return 187var activesData 188var actives=this.$parent&&this.$parent.children('.panel').children('.in, .collapsing') 189if(actives&&actives.length){activesData=actives.data('bs.collapse') 190if(activesData&&activesData.transitioning)return} 191var startEvent=$.Event('show.bs.collapse') 192this.$element.trigger(startEvent) 193if(startEvent.isDefaultPrevented())return 194if(actives&&actives.length){Plugin.call(actives,'hide') 195activesData||actives.data('bs.collapse',null)} 196var dimension=this.dimension() 197this.$element.removeClass('collapse').addClass('collapsing')[dimension](0).attr('aria-expanded',true) 198this.$trigger.removeClass('collapsed').attr('aria-expanded',true) 199this.transitioning=1 200var complete=function(){this.$element.removeClass('collapsing').addClass('collapse in')[dimension]('') 201this.transitioning=0 202this.$element.trigger('shown.bs.collapse')} 203if(!$.support.transition)return complete.call(this) 204var scrollSize=$.camelCase(['scroll',dimension].join('-')) 205this.$element.one('bsTransitionEnd',$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])} 206Collapse.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass('in'))return 207var startEvent=$.Event('hide.bs.collapse') 208this.$element.trigger(startEvent) 209if(startEvent.isDefaultPrevented())return 210var dimension=this.dimension() 211this.$element[dimension](this.$element[dimension]())[0].offsetHeight 212this.$element.addClass('collapsing').removeClass('collapse in').attr('aria-expanded',false) 213this.$trigger.addClass('collapsed').attr('aria-expanded',false) 214this.transitioning=1 215var complete=function(){this.transitioning=0 216this.$element.removeClass('collapsing').addClass('collapse').trigger('hidden.bs.collapse')} 217if(!$.support.transition)return complete.call(this) 218this.$element[dimension](0).one('bsTransitionEnd',$.proxy(complete,this)).emulateTransitionEnd(Collapse.TRANSITION_DURATION)} 219Collapse.prototype.toggle=function(){this[this.$element.hasClass('in')?'hide':'show']()} 220Collapse.prototype.getParent=function(){return $(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each($.proxy(function(i,element){var $element=$(element) 221this.addAriaAndCollapsedClass(getTargetFromTrigger($element),$element)},this)).end()} 222Collapse.prototype.addAriaAndCollapsedClass=function($element,$trigger){var isOpen=$element.hasClass('in') 223$element.attr('aria-expanded',isOpen) 224$trigger.toggleClass('collapsed',!isOpen).attr('aria-expanded',isOpen)} 225function getTargetFromTrigger($trigger){var href 226var target=$trigger.attr('data-target')||(href=$trigger.attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,'') 227return $(target)} 228function Plugin(option){return this.each(function(){var $this=$(this) 229var data=$this.data('bs.collapse') 230var options=$.extend({},Collapse.DEFAULTS,$this.data(),typeof option=='object'&&option) 231if(!data&&options.toggle&&/show|hide/.test(option))options.toggle=false 232if(!data)$this.data('bs.collapse',(data=new Collapse(this,options))) 233if(typeof option=='string')data[option]()})} 234var old=$.fn.collapse 235$.fn.collapse=Plugin 236$.fn.collapse.Constructor=Collapse 237$.fn.collapse.noConflict=function(){$.fn.collapse=old 238return this} 239$(document).on('click.bs.collapse.data-api','[data-toggle="collapse"]',function(e){var $this=$(this) 240if(!$this.attr('data-target'))e.preventDefault() 241var $target=getTargetFromTrigger($this) 242var data=$target.data('bs.collapse') 243var option=data?'toggle':$this.data() 244Plugin.call($target,option)})}(jQuery);+function($){'use strict';var backdrop='.dropdown-backdrop' 245var toggle='[data-toggle="dropdown"]' 246var Dropdown=function(element){$(element).on('click.bs.dropdown',this.toggle)} 247Dropdown.VERSION='3.3.4' 248Dropdown.prototype.toggle=function(e){var $this=$(this) 249if($this.is('.disabled, :disabled'))return 250var $parent=getParent($this) 251var isActive=$parent.hasClass('open') 252clearMenus() 253if(!isActive){if('ontouchstart'in document.documentElement&&!$parent.closest('.navbar-nav').length){$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click',clearMenus)} 254var relatedTarget={relatedTarget:this} 255$parent.trigger(e=$.Event('show.bs.dropdown',relatedTarget)) 256if(e.isDefaultPrevented())return 257$this.trigger('focus').attr('aria-expanded','true') 258$parent.toggleClass('open').trigger('shown.bs.dropdown',relatedTarget)} 259return false} 260Dropdown.prototype.keydown=function(e){if(!/(38|40|27|32)/.test(e.which)||/input|textarea/i.test(e.target.tagName))return 261var $this=$(this) 262e.preventDefault() 263e.stopPropagation() 264if($this.is('.disabled, :disabled'))return 265var $parent=getParent($this) 266var isActive=$parent.hasClass('open') 267if((!isActive&&e.which!=27)||(isActive&&e.which==27)){if(e.which==27)$parent.find(toggle).trigger('focus') 268return $this.trigger('click')} 269var desc=' li:not(.disabled):visible a' 270var $items=$parent.find('[role="menu"]'+desc+', [role="listbox"]'+desc) 271if(!$items.length)return 272var index=$items.index(e.target) 273if(e.which==38&&index>0)index-- 274if(e.which==40&&index<$items.length-1)index++ 275if(!~index)index=0 276$items.eq(index).trigger('focus')} 277function clearMenus(e){if(e&&e.which===3)return 278$(backdrop).remove() 279$(toggle).each(function(){var $this=$(this) 280var $parent=getParent($this) 281var relatedTarget={relatedTarget:this} 282if(!$parent.hasClass('open'))return 283$parent.trigger(e=$.Event('hide.bs.dropdown',relatedTarget)) 284if(e.isDefaultPrevented())return 285$this.attr('aria-expanded','false') 286$parent.removeClass('open').trigger('hidden.bs.dropdown',relatedTarget)})} 287function getParent($this){var selector=$this.attr('data-target') 288if(!selector){selector=$this.attr('href') 289selector=selector&&/#[A-Za-z]/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,'')} 290var $parent=selector&&$(selector) 291return $parent&&$parent.length?$parent:$this.parent()} 292function Plugin(option){return this.each(function(){var $this=$(this) 293var data=$this.data('bs.dropdown') 294if(!data)$this.data('bs.dropdown',(data=new Dropdown(this))) 295if(typeof option=='string')data[option].call($this)})} 296var old=$.fn.dropdown 297$.fn.dropdown=Plugin 298$.fn.dropdown.Constructor=Dropdown 299$.fn.dropdown.noConflict=function(){$.fn.dropdown=old 300return this} 301$(document).on('click.bs.dropdown.data-api',clearMenus).on('click.bs.dropdown.data-api','.dropdown form',function(e){e.stopPropagation()}).on('click.bs.dropdown.data-api',toggle,Dropdown.prototype.toggle).on('keydown.bs.dropdown.data-api',toggle,Dropdown.prototype.keydown).on('keydown.bs.dropdown.data-api','[role="menu"]',Dropdown.prototype.keydown).on('keydown.bs.dropdown.data-api','[role="listbox"]',Dropdown.prototype.keydown)}(jQuery);+function($){'use strict';var Modal=function(element,options){this.options=options 302this.$body=$(document.body) 303this.$element=$(element) 304this.$dialog=this.$element.find('.modal-dialog') 305this.$backdrop=null 306this.isShown=null 307this.originalBodyPad=null 308this.scrollbarWidth=0 309this.ignoreBackdropClick=false 310if(this.options.remote){this.$element.find('.modal-content').load(this.options.remote,$.proxy(function(){this.$element.trigger('loaded.bs.modal')},this))}} 311Modal.VERSION='3.3.4' 312Modal.TRANSITION_DURATION=300 313Modal.BACKDROP_TRANSITION_DURATION=150 314Modal.DEFAULTS={backdrop:true,keyboard:true,show:true} 315Modal.prototype.toggle=function(_relatedTarget){return this.isShown?this.hide():this.show(_relatedTarget)} 316Modal.prototype.show=function(_relatedTarget){var that=this 317var e=$.Event('show.bs.modal',{relatedTarget:_relatedTarget}) 318this.$element.trigger(e) 319if(this.isShown||e.isDefaultPrevented())return 320this.isShown=true 321this.checkScrollbar() 322this.setScrollbar() 323this.$body.addClass('modal-open') 324this.escape() 325this.resize() 326this.$element.on('click.dismiss.bs.modal','[data-dismiss="modal"]',$.proxy(this.hide,this)) 327this.$dialog.on('mousedown.dismiss.bs.modal',function(){that.$element.one('mouseup.dismiss.bs.modal',function(e){if($(e.target).is(that.$element))that.ignoreBackdropClick=true})}) 328this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass('fade') 329if(!that.$element.parent().length){that.$element.appendTo(that.$body)} 330that.$element.show().scrollTop(0) 331that.adjustDialog() 332if(transition){that.$element[0].offsetWidth} 333that.$element.addClass('in').attr('aria-hidden',false) 334that.enforceFocus() 335var e=$.Event('shown.bs.modal',{relatedTarget:_relatedTarget}) 336transition?that.$dialog.one('bsTransitionEnd',function(){that.$element.trigger('focus').trigger(e)}).emulateTransitionEnd(Modal.TRANSITION_DURATION):that.$element.trigger('focus').trigger(e)})} 337Modal.prototype.hide=function(e){if(e)e.preventDefault() 338e=$.Event('hide.bs.modal') 339this.$element.trigger(e) 340if(!this.isShown||e.isDefaultPrevented())return 341this.isShown=false 342this.escape() 343this.resize() 344$(document).off('focusin.bs.modal') 345this.$element.removeClass('in').attr('aria-hidden',true).off('click.dismiss.bs.modal').off('mouseup.dismiss.bs.modal') 346this.$dialog.off('mousedown.dismiss.bs.modal') 347$.support.transition&&this.$element.hasClass('fade')?this.$element.one('bsTransitionEnd',$.proxy(this.hideModal,this)).emulateTransitionEnd(Modal.TRANSITION_DURATION):this.hideModal()} 348Modal.prototype.enforceFocus=function(){$(document).off('focusin.bs.modal').on('focusin.bs.modal',$.proxy(function(e){if(this.$element[0]!==e.target&&!this.$element.has(e.target).length){this.$element.trigger('focus')}},this))} 349Modal.prototype.escape=function(){if(this.isShown&&this.options.keyboard){this.$element.on('keydown.dismiss.bs.modal',$.proxy(function(e){e.which==27&&this.hide()},this))}else if(!this.isShown){this.$element.off('keydown.dismiss.bs.modal')}} 350Modal.prototype.resize=function(){if(this.isShown){$(window).on('resize.bs.modal',$.proxy(this.handleUpdate,this))}else{$(window).off('resize.bs.modal')}} 351Modal.prototype.hideModal=function(){var that=this 352this.$element.hide() 353this.backdrop(function(){that.$body.removeClass('modal-open') 354that.resetAdjustments() 355that.resetScrollbar() 356that.$element.trigger('hidden.bs.modal')})} 357Modal.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove() 358this.$backdrop=null} 359Modal.prototype.backdrop=function(callback){var that=this 360var animate=this.$element.hasClass('fade')?'fade':'' 361if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate 362this.$backdrop=$('<div class="modal-backdrop '+animate+'" />').appendTo(this.$body) 363this.$element.on('click.dismiss.bs.modal',$.proxy(function(e){if(this.ignoreBackdropClick){this.ignoreBackdropClick=false 364return} 365if(e.target!==e.currentTarget)return 366this.options.backdrop=='static'?this.$element[0].focus():this.hide()},this)) 367if(doAnimate)this.$backdrop[0].offsetWidth 368this.$backdrop.addClass('in') 369if(!callback)return 370doAnimate?this.$backdrop.one('bsTransitionEnd',callback).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callback()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass('in') 371var callbackRemove=function(){that.removeBackdrop() 372callback&&callback()} 373$.support.transition&&this.$element.hasClass('fade')?this.$backdrop.one('bsTransitionEnd',callbackRemove).emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION):callbackRemove()}else if(callback){callback()}} 374Modal.prototype.handleUpdate=function(){this.adjustDialog()} 375Modal.prototype.adjustDialog=function(){var modalIsOverflowing=this.$element[0].scrollHeight>document.documentElement.clientHeight 376this.$element.css({paddingLeft:!this.bodyIsOverflowing&&modalIsOverflowing?this.scrollbarWidth:'',paddingRight:this.bodyIsOverflowing&&!modalIsOverflowing?this.scrollbarWidth:''})} 377Modal.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:'',paddingRight:''})} 378Modal.prototype.checkScrollbar=function(){var fullWindowWidth=window.innerWidth 379if(!fullWindowWidth){var documentElementRect=document.documentElement.getBoundingClientRect() 380fullWindowWidth=documentElementRect.right-Math.abs(documentElementRect.left)} 381this.bodyIsOverflowing=document.body.clientWidth<fullWindowWidth 382this.scrollbarWidth=this.measureScrollbar()} 383Modal.prototype.setScrollbar=function(){var bodyPad=parseInt((this.$body.css('padding-right')||0),10) 384this.originalBodyPad=document.body.style.paddingRight||'' 385if(this.bodyIsOverflowing)this.$body.css('padding-right',bodyPad+this.scrollbarWidth)} 386Modal.prototype.resetScrollbar=function(){this.$body.css('padding-right',this.originalBodyPad)} 387Modal.prototype.measureScrollbar=function(){var scrollDiv=document.createElement('div') 388scrollDiv.className='modal-scrollbar-measure' 389this.$body.append(scrollDiv) 390var scrollbarWidth=scrollDiv.offsetWidth-scrollDiv.clientWidth 391this.$body[0].removeChild(scrollDiv) 392return scrollbarWidth} 393function Plugin(option,_relatedTarget){return this.each(function(){var $this=$(this) 394var data=$this.data('bs.modal') 395var options=$.extend({},Modal.DEFAULTS,$this.data(),typeof option=='object'&&option) 396if(!data)$this.data('bs.modal',(data=new Modal(this,options))) 397if(typeof option=='string')data[option](_relatedTarget) 398else if(options.show)data.show(_relatedTarget)})} 399var old=$.fn.modal 400$.fn.modal=Plugin 401$.fn.modal.Constructor=Modal 402$.fn.modal.noConflict=function(){$.fn.modal=old 403return this} 404$(document).on('click.bs.modal.data-api','[data-toggle="modal"]',function(e){var $this=$(this) 405var href=$this.attr('href') 406var $target=$($this.attr('data-target')||(href&&href.replace(/.*(?=#[^\s]+$)/,''))) 407var option=$target.data('bs.modal')?'toggle':$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data()) 408if($this.is('a'))e.preventDefault() 409$target.one('show.bs.modal',function(showEvent){if(showEvent.isDefaultPrevented())return 410$target.one('hidden.bs.modal',function(){$this.is(':visible')&&$this.trigger('focus')})}) 411Plugin.call($target,option,this)})}(jQuery);+function($){'use strict';var Tooltip=function(element,options){this.type=null 412this.options=null 413this.enabled=null 414this.timeout=null 415this.hoverState=null 416this.$element=null 417this.init('tooltip',element,options)} 418Tooltip.VERSION='3.3.4' 419Tooltip.TRANSITION_DURATION=150 420Tooltip.DEFAULTS={animation:true,placement:'top',selector:false,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:'hover focus',title:'',delay:0,html:false,container:false,viewport:{selector:'body',padding:0}} 421Tooltip.prototype.init=function(type,element,options){this.enabled=true 422this.type=type 423this.$element=$(element) 424this.options=this.getOptions(options) 425this.$viewport=this.options.viewport&&$(this.options.viewport.selector||this.options.viewport) 426if(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!')} 427var triggers=this.options.trigger.split(' ') 428for(var i=triggers.length;i--;){var trigger=triggers[i] 429if(trigger=='click'){this.$element.on('click.'+this.type,this.options.selector,$.proxy(this.toggle,this))}else if(trigger!='manual'){var eventIn=trigger=='hover'?'mouseenter':'focusin' 430var eventOut=trigger=='hover'?'mouseleave':'focusout' 431this.$element.on(eventIn+'.'+this.type,this.options.selector,$.proxy(this.enter,this)) 432this.$element.on(eventOut+'.'+this.type,this.options.selector,$.proxy(this.leave,this))}} 433this.options.selector?(this._options=$.extend({},this.options,{trigger:'manual',selector:''})):this.fixTitle()} 434Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS} 435Tooltip.prototype.getOptions=function(options){options=$.extend({},this.getDefaults(),this.$element.data(),options) 436if(options.delay&&typeof options.delay=='number'){options.delay={show:options.delay,hide:options.delay}} 437return options} 438Tooltip.prototype.getDelegateOptions=function(){var options={} 439var defaults=this.getDefaults() 440this._options&&$.each(this._options,function(key,value){if(defaults[key]!=value)options[key]=value}) 441return options} 442Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data('bs.'+this.type) 443if(self&&self.$tip&&self.$tip.is(':visible')){self.hoverState='in' 444return} 445if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions()) 446$(obj.currentTarget).data('bs.'+this.type,self)} 447clearTimeout(self.timeout) 448self.hoverState='in' 449if(!self.options.delay||!self.options.delay.show)return self.show() 450self.timeout=setTimeout(function(){if(self.hoverState=='in')self.show()},self.options.delay.show)} 451Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget).data('bs.'+this.type) 452if(!self){self=new this.constructor(obj.currentTarget,this.getDelegateOptions()) 453$(obj.currentTarget).data('bs.'+this.type,self)} 454clearTimeout(self.timeout) 455self.hoverState='out' 456if(!self.options.delay||!self.options.delay.hide)return self.hide() 457self.timeout=setTimeout(function(){if(self.hoverState=='out')self.hide()},self.options.delay.hide)} 458Tooltip.prototype.show=function(){var e=$.Event('show.bs.'+this.type) 459if(this.hasContent()&&this.enabled){this.$element.trigger(e) 460var inDom=$.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]) 461if(e.isDefaultPrevented()||!inDom)return 462var that=this 463var $tip=this.tip() 464var tipId=this.getUID(this.type) 465this.setContent() 466$tip.attr('id',tipId) 467this.$element.attr('aria-describedby',tipId) 468if(this.options.animation)$tip.addClass('fade') 469var placement=typeof this.options.placement=='function'?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement 470var autoToken=/\s?auto?\s?/i 471var autoPlace=autoToken.test(placement) 472if(autoPlace)placement=placement.replace(autoToken,'')||'top' 473$tip.detach().css({top:0,left:0,display:'block'}).addClass(placement).data('bs.'+this.type,this) 474this.options.container?$tip.appendTo(this.options.container):$tip.insertAfter(this.$element) 475var pos=this.getPosition() 476var actualWidth=$tip[0].offsetWidth 477var actualHeight=$tip[0].offsetHeight 478if(autoPlace){var orgPlacement=placement 479var $container=this.options.container?$(this.options.container):this.$element.parent() 480var containerDim=this.getPosition($container) 481placement=placement=='bottom'&&pos.bottom+actualHeight>containerDim.bottom?'top':placement=='top'&&pos.top-actualHeight<containerDim.top?'bottom':placement=='right'&&pos.right+actualWidth>containerDim.width?'left':placement=='left'&&pos.left-actualWidth<containerDim.left?'right':placement 482$tip.removeClass(orgPlacement).addClass(placement)} 483var calculatedOffset=this.getCalculatedOffset(placement,pos,actualWidth,actualHeight) 484this.applyPlacement(calculatedOffset,placement) 485var complete=function(){var prevHoverState=that.hoverState 486that.$element.trigger('shown.bs.'+that.type) 487that.hoverState=null 488if(prevHoverState=='out')that.leave(that)} 489$.support.transition&&this.$tip.hasClass('fade')?$tip.one('bsTransitionEnd',complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete()}} 490Tooltip.prototype.applyPlacement=function(offset,placement){var $tip=this.tip() 491var width=$tip[0].offsetWidth 492var height=$tip[0].offsetHeight 493var marginTop=parseInt($tip.css('margin-top'),10) 494var marginLeft=parseInt($tip.css('margin-left'),10) 495if(isNaN(marginTop))marginTop=0 496if(isNaN(marginLeft))marginLeft=0 497offset.top=offset.top+marginTop 498offset.left=offset.left+marginLeft 499$.offset.setOffset($tip[0],$.extend({using:function(props){$tip.css({top:Math.round(props.top),left:Math.round(props.left)})}},offset),0) 500$tip.addClass('in') 501var actualWidth=$tip[0].offsetWidth 502var actualHeight=$tip[0].offsetHeight 503if(placement=='top'&&actualHeight!=height){offset.top=offset.top+height-actualHeight} 504var delta=this.getViewportAdjustedDelta(placement,offset,actualWidth,actualHeight) 505if(delta.left)offset.left+=delta.left 506else offset.top+=delta.top 507var isVertical=/top|bottom/.test(placement) 508var arrowDelta=isVertical?delta.left*2-width+actualWidth:delta.top*2-height+actualHeight 509var arrowOffsetPosition=isVertical?'offsetWidth':'offsetHeight' 510$tip.offset(offset) 511this.replaceArrow(arrowDelta,$tip[0][arrowOffsetPosition],isVertical)} 512Tooltip.prototype.replaceArrow=function(delta,dimension,isVertical){this.arrow().css(isVertical?'left':'top',50*(1-delta/dimension)+'%').css(isVertical?'top':'left','')} 513Tooltip.prototype.setContent=function(){var $tip=this.tip() 514var title=this.getTitle() 515$tip.find('.tooltip-inner')[this.options.html?'html':'text'](title) 516$tip.removeClass('fade in top bottom left right')} 517Tooltip.prototype.hide=function(callback){var that=this 518var $tip=$(this.$tip) 519var e=$.Event('hide.bs.'+this.type) 520function complete(){if(that.hoverState!='in')$tip.detach() 521that.$element.removeAttr('aria-describedby').trigger('hidden.bs.'+that.type) 522callback&&callback()} 523this.$element.trigger(e) 524if(e.isDefaultPrevented())return 525$tip.removeClass('in') 526$.support.transition&&$tip.hasClass('fade')?$tip.one('bsTransitionEnd',complete).emulateTransitionEnd(Tooltip.TRANSITION_DURATION):complete() 527this.hoverState=null 528return this} 529Tooltip.prototype.fixTitle=function(){var $e=this.$element 530if($e.attr('title')||typeof($e.attr('data-original-title'))!='string'){$e.attr('data-original-title',$e.attr('title')||'').attr('title','')}} 531Tooltip.prototype.hasContent=function(){return this.getTitle()} 532Tooltip.prototype.getPosition=function($element){$element=$element||this.$element 533var el=$element[0] 534var isBody=el.tagName=='BODY' 535var elRect=el.getBoundingClientRect() 536if(elRect.width==null){elRect=$.extend({},elRect,{width:elRect.right-elRect.left,height:elRect.bottom-elRect.top})} 537var elOffset=isBody?{top:0,left:0}:$element.offset() 538var scroll={scroll:isBody?document.documentElement.scrollTop||document.body.scrollTop:$element.scrollTop()} 539var outerDims=isBody?{width:$(window).width(),height:$(window).height()}:null 540return $.extend({},elRect,scroll,outerDims,elOffset)} 541Tooltip.prototype.getCalculatedOffset=function(placement,pos,actualWidth,actualHeight){return placement=='bottom'?{top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2}:placement=='top'?{top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2}:placement=='left'?{top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth}:{top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}} 542Tooltip.prototype.getViewportAdjustedDelta=function(placement,pos,actualWidth,actualHeight){var delta={top:0,left:0} 543if(!this.$viewport)return delta 544var viewportPadding=this.options.viewport&&this.options.viewport.padding||0 545var viewportDimensions=this.getPosition(this.$viewport) 546if(/right|left/.test(placement)){var topEdgeOffset=pos.top-viewportPadding-viewportDimensions.scroll 547var bottomEdgeOffset=pos.top+viewportPadding-viewportDimensions.scroll+actualHeight 548if(topEdgeOffset<viewportDimensions.top){delta.top=viewportDimensions.top-topEdgeOffset}else if(bottomEdgeOffset>viewportDimensions.top+viewportDimensions.height){delta.top=viewportDimensions.top+viewportDimensions.height-bottomEdgeOffset}}else{var leftEdgeOffset=pos.left-viewportPadding 549var rightEdgeOffset=pos.left+viewportPadding+actualWidth 550if(leftEdgeOffset<viewportDimensions.left){delta.left=viewportDimensions.left-leftEdgeOffset}else if(rightEdgeOffset>viewportDimensions.width){delta.left=viewportDimensions.left+viewportDimensions.width-rightEdgeOffset}} 551return delta} 552Tooltip.prototype.getTitle=function(){var title 553var $e=this.$element 554var o=this.options 555title=$e.attr('data-original-title')||(typeof o.title=='function'?o.title.call($e[0]):o.title) 556return title} 557Tooltip.prototype.getUID=function(prefix){do prefix+=~~(Math.random()*1000000) 558while(document.getElementById(prefix)) 559return prefix} 560Tooltip.prototype.tip=function(){return(this.$tip=this.$tip||$(this.options.template))} 561Tooltip.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find('.tooltip-arrow'))} 562Tooltip.prototype.enable=function(){this.enabled=true} 563Tooltip.prototype.disable=function(){this.enabled=false} 564Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled} 565Tooltip.prototype.toggle=function(e){var self=this 566if(e){self=$(e.currentTarget).data('bs.'+this.type) 567if(!self){self=new this.constructor(e.currentTarget,this.getDelegateOptions()) 568$(e.currentTarget).data('bs.'+this.type,self)}} 569self.tip().hasClass('in')?self.leave(self):self.enter(self)} 570Tooltip.prototype.destroy=function(){var that=this 571clearTimeout(this.timeout) 572this.hide(function(){that.$element.off('.'+that.type).removeData('bs.'+that.type)})} 573function Plugin(option){return this.each(function(){var $this=$(this) 574var data=$this.data('bs.tooltip') 575var options=typeof option=='object'&&option 576if(!data&&/destroy|hide/.test(option))return 577if(!data)$this.data('bs.tooltip',(data=new Tooltip(this,options))) 578if(typeof option=='string')data[option]()})} 579var old=$.fn.tooltip 580$.fn.tooltip=Plugin 581$.fn.tooltip.Constructor=Tooltip 582$.fn.tooltip.noConflict=function(){$.fn.tooltip=old 583return this}}(jQuery);+function($){'use strict';var Popover=function(element,options){this.init('popover',element,options)} 584if(!$.fn.tooltip)throw new Error('Popover requires tooltip.js') 585Popover.VERSION='3.3.4' 586Popover.DEFAULTS=$.extend({},$.fn.tooltip.Constructor.DEFAULTS,{placement:'right',trigger:'click',content:'',template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}) 587Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype) 588Popover.prototype.constructor=Popover 589Popover.prototype.getDefaults=function(){return Popover.DEFAULTS} 590Popover.prototype.setContent=function(){var $tip=this.tip() 591var title=this.getTitle() 592var content=this.getContent() 593$tip.find('.popover-title')[this.options.html?'html':'text'](title) 594$tip.find('.popover-content').children().detach().end()[this.options.html?(typeof content=='string'?'html':'append'):'text'](content) 595$tip.removeClass('fade top bottom left right in') 596if(!$tip.find('.popover-title').html())$tip.find('.popover-title').hide()} 597Popover.prototype.hasContent=function(){return this.getTitle()||this.getContent()} 598Popover.prototype.getContent=function(){var $e=this.$element 599var o=this.options 600return $e.attr('data-content')||(typeof o.content=='function'?o.content.call($e[0]):o.content)} 601Popover.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find('.arrow'))} 602function Plugin(option){return this.each(function(){var $this=$(this) 603var data=$this.data('bs.popover') 604var options=typeof option=='object'&&option 605if(!data&&/destroy|hide/.test(option))return 606if(!data)$this.data('bs.popover',(data=new Popover(this,options))) 607if(typeof option=='string')data[option]()})} 608var old=$.fn.popover 609$.fn.popover=Plugin 610$.fn.popover.Constructor=Popover 611$.fn.popover.noConflict=function(){$.fn.popover=old 612return this}}(jQuery);+function($){'use strict';function ScrollSpy(element,options){this.$body=$(document.body) 613this.$scrollElement=$(element).is(document.body)?$(window):$(element) 614this.options=$.extend({},ScrollSpy.DEFAULTS,options) 615this.selector=(this.options.target||'')+' .nav li > a' 616this.offsets=[] 617this.targets=[] 618this.activeTarget=null 619this.scrollHeight=0 620this.$scrollElement.on('scroll.bs.scrollspy',$.proxy(this.process,this)) 621this.refresh() 622this.process()} 623ScrollSpy.VERSION='3.3.4' 624ScrollSpy.DEFAULTS={offset:10} 625ScrollSpy.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)} 626ScrollSpy.prototype.refresh=function(){var that=this 627var offsetMethod='offset' 628var offsetBase=0 629this.offsets=[] 630this.targets=[] 631this.scrollHeight=this.getScrollHeight() 632if(!$.isWindow(this.$scrollElement[0])){offsetMethod='position' 633offsetBase=this.$scrollElement.scrollTop()} 634this.$body.find(this.selector).map(function(){var $el=$(this) 635var href=$el.data('target')||$el.attr('href') 636var $href=/^#./.test(href)&&$(href) 637return($href&&$href.length&&$href.is(':visible')&&[[$href[offsetMethod]().top+offsetBase,href]])||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){that.offsets.push(this[0]) 638that.targets.push(this[1])})} 639ScrollSpy.prototype.process=function(){var scrollTop=this.$scrollElement.scrollTop()+this.options.offset 640var scrollHeight=this.getScrollHeight() 641var maxScroll=this.options.offset+scrollHeight-this.$scrollElement.height() 642var offsets=this.offsets 643var targets=this.targets 644var activeTarget=this.activeTarget 645var i 646if(this.scrollHeight!=scrollHeight){this.refresh()} 647if(scrollTop>=maxScroll){return activeTarget!=(i=targets[targets.length-1])&&this.activate(i)} 648if(activeTarget&&scrollTop<offsets[0]){this.activeTarget=null 649return this.clear()} 650for(i=offsets.length;i--;){activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(offsets[i+1]===undefined||scrollTop<offsets[i+1])&&this.activate(targets[i])}} 651ScrollSpy.prototype.activate=function(target){this.activeTarget=target 652this.clear() 653var selector=this.selector+'[data-target="'+target+'"],'+this.selector+'[href="'+target+'"]' 654var active=$(selector).parents('li').addClass('active') 655if(active.parent('.dropdown-menu').length){active=active.closest('li.dropdown').addClass('active')} 656active.trigger('activate.bs.scrollspy')} 657ScrollSpy.prototype.clear=function(){$(this.selector).parentsUntil(this.options.target,'.active').removeClass('active')} 658function Plugin(option){return this.each(function(){var $this=$(this) 659var data=$this.data('bs.scrollspy') 660var options=typeof option=='object'&&option 661if(!data)$this.data('bs.scrollspy',(data=new ScrollSpy(this,options))) 662if(typeof option=='string')data[option]()})} 663var old=$.fn.scrollspy 664$.fn.scrollspy=Plugin 665$.fn.scrollspy.Constructor=ScrollSpy 666$.fn.scrollspy.noConflict=function(){$.fn.scrollspy=old 667return this} 668$(window).on('load.bs.scrollspy.data-api',function(){$('[data-spy="scroll"]').each(function(){var $spy=$(this) 669Plugin.call($spy,$spy.data())})})}(jQuery);+function($){'use strict';var Tab=function(element){this.element=$(element)} 670Tab.VERSION='3.3.4' 671Tab.TRANSITION_DURATION=150 672Tab.prototype.show=function(){var $this=this.element 673var $ul=$this.closest('ul:not(.dropdown-menu)') 674var selector=$this.data('target') 675if(!selector){selector=$this.attr('href') 676selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,'')} 677if($this.parent('li').hasClass('active'))return 678var $previous=$ul.find('.active:last a') 679var hideEvent=$.Event('hide.bs.tab',{relatedTarget:$this[0]}) 680var showEvent=$.Event('show.bs.tab',{relatedTarget:$previous[0]}) 681$previous.trigger(hideEvent) 682$this.trigger(showEvent) 683if(showEvent.isDefaultPrevented()||hideEvent.isDefaultPrevented())return 684var $target=$(selector) 685this.activate($this.closest('li'),$ul) 686this.activate($target,$target.parent(),function(){$previous.trigger({type:'hidden.bs.tab',relatedTarget:$this[0]}) 687$this.trigger({type:'shown.bs.tab',relatedTarget:$previous[0]})})} 688Tab.prototype.activate=function(element,container,callback){var $active=container.find('> .active') 689var transition=callback&&$.support.transition&&(($active.length&&$active.hasClass('fade'))||!!container.find('> .fade').length) 690function next(){$active.removeClass('active').find('> .dropdown-menu > .active').removeClass('active').end().find('[data-toggle="tab"]').attr('aria-expanded',false) 691element.addClass('active').find('[data-toggle="tab"]').attr('aria-expanded',true) 692if(transition){element[0].offsetWidth 693element.addClass('in')}else{element.removeClass('fade')} 694if(element.parent('.dropdown-menu').length){element.closest('li.dropdown').addClass('active').end().find('[data-toggle="tab"]').attr('aria-expanded',true)} 695callback&&callback()} 696$active.length&&transition?$active.one('bsTransitionEnd',next).emulateTransitionEnd(Tab.TRANSITION_DURATION):next() 697$active.removeClass('in')} 698function Plugin(option){return this.each(function(){var $this=$(this) 699var data=$this.data('bs.tab') 700if(!data)$this.data('bs.tab',(data=new Tab(this))) 701if(typeof option=='string')data[option]()})} 702var old=$.fn.tab 703$.fn.tab=Plugin 704$.fn.tab.Constructor=Tab 705$.fn.tab.noConflict=function(){$.fn.tab=old 706return this} 707var clickHandler=function(e){e.preventDefault() 708Plugin.call($(this),'show')} 709$(document).on('click.bs.tab.data-api','[data-toggle="tab"]',clickHandler).on('click.bs.tab.data-api','[data-toggle="pill"]',clickHandler)}(jQuery);+function($){'use strict';var Affix=function(element,options){this.options=$.extend({},Affix.DEFAULTS,options) 710this.$target=$(this.options.target).on('scroll.bs.affix.data-api',$.proxy(this.checkPosition,this)).on('click.bs.affix.data-api',$.proxy(this.checkPositionWithEventLoop,this)) 711this.$element=$(element) 712this.affixed=null 713this.unpin=null 714this.pinnedOffset=null 715this.checkPosition()} 716Affix.VERSION='3.3.4' 717Affix.RESET='affix affix-top affix-bottom' 718Affix.DEFAULTS={offset:0,target:window} 719Affix.prototype.getState=function(scrollHeight,height,offsetTop,offsetBottom){var scrollTop=this.$target.scrollTop() 720var position=this.$element.offset() 721var targetHeight=this.$target.height() 722if(offsetTop!=null&&this.affixed=='top')return scrollTop<offsetTop?'top':false 723if(this.affixed=='bottom'){if(offsetTop!=null)return(scrollTop+this.unpin<=position.top)?false:'bottom' 724return(scrollTop+targetHeight<=scrollHeight-offsetBottom)?false:'bottom'} 725var initializing=this.affixed==null 726var colliderTop=initializing?scrollTop:position.top 727var colliderHeight=initializing?targetHeight:height 728if(offsetTop!=null&&scrollTop<=offsetTop)return'top' 729if(offsetBottom!=null&&(colliderTop+colliderHeight>=scrollHeight-offsetBottom))return'bottom' 730return false} 731Affix.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset 732this.$element.removeClass(Affix.RESET).addClass('affix') 733var scrollTop=this.$target.scrollTop() 734var position=this.$element.offset() 735return(this.pinnedOffset=position.top-scrollTop)} 736Affix.prototype.checkPositionWithEventLoop=function(){setTimeout($.proxy(this.checkPosition,this),1)} 737Affix.prototype.checkPosition=function(){if(!this.$element.is(':visible'))return 738var height=this.$element.height() 739var offset=this.options.offset 740var offsetTop=offset.top 741var offsetBottom=offset.bottom 742var scrollHeight=$(document.body).height() 743if(typeof offset!='object')offsetBottom=offsetTop=offset 744if(typeof offsetTop=='function')offsetTop=offset.top(this.$element) 745if(typeof offsetBottom=='function')offsetBottom=offset.bottom(this.$element) 746var affix=this.getState(scrollHeight,height,offsetTop,offsetBottom) 747if(this.affixed!=affix){if(this.unpin!=null)this.$element.css('top','') 748var affixType='affix'+(affix?'-'+affix:'') 749var e=$.Event(affixType+'.bs.affix') 750this.$element.trigger(e) 751if(e.isDefaultPrevented())return 752this.affixed=affix 753this.unpin=affix=='bottom'?this.getPinnedOffset():null 754this.$element.removeClass(Affix.RESET).addClass(affixType).trigger(affixType.replace('affix','affixed')+'.bs.affix')} 755if(affix=='bottom'){this.$element.offset({top:scrollHeight-height-offsetBottom})}} 756function Plugin(option){return this.each(function(){var $this=$(this) 757var data=$this.data('bs.affix') 758var options=typeof option=='object'&&option 759if(!data)$this.data('bs.affix',(data=new Affix(this,options))) 760if(typeof option=='string')data[option]()})} 761var old=$.fn.affix 762$.fn.affix=Plugin 763$.fn.affix.Constructor=Affix 764$.fn.affix.noConflict=function(){$.fn.affix=old 765return this} 766$(window).on('load',function(){$('[data-spy="affix"]').each(function(){var $spy=$(this) 767var data=$spy.data() 768data.offset=data.offset||{} 769if(data.offsetBottom!=null)data.offset.bottom=data.offsetBottom 770if(data.offsetTop!=null)data.offset.top=data.offsetTop 771Plugin.call($spy,data)})})}(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.