forked from dandanthedan/Bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom.js
More file actions
2 lines (2 loc) · 45.8 KB
/
custom.js
File metadata and controls
2 lines (2 loc) · 45.8 KB
1
2
if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,n=this;t(this).one("bsTransitionEnd",function(){i=!0});var o=function(){i||t(n).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.alert");o||i.data("bs.alert",o=new n(this)),"string"==typeof e&&o[e].call(i)})}var i='[data-dismiss="alert"]',n=function(e){t(e).on("click",i,this.close)};n.VERSION="3.2.0",n.prototype.close=function(e){function i(){s.detach().trigger("closed.bs.alert").remove()}var n=t(this),o=n.attr("data-target");o||(o=n.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,""));var s=t(o);e&&e.preventDefault(),s.length||(s=n.hasClass("alert")?n:n.parent()),s.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",i).emulateTransitionEnd(150):i())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",i,n.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.button"),s="object"==typeof e&&e;o||n.data("bs.button",o=new i(this,s)),"toggle"==e?o.toggle():e&&o.setState(e)})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.isLoading=!1};i.VERSION="3.2.0",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",n=this.$element,o=n.is("input")?"val":"html",s=n.data();e+="Text",null==s.resetText&&n.data("resetText",n[o]()),n[o](null==s[e]?this.options[e]:s[e]),setTimeout(t.proxy(function(){"loadingText"==e?(this.isLoading=!0,n.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,n.removeClass(i).removeAttr(i))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&i.prop("checked",!this.$element.hasClass("active")).trigger("change")}t&&this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var n=t(i.target);n.hasClass("btn")||(n=n.closest(".btn")),e.call(n,"toggle"),i.preventDefault()})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.carousel"),s=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e),a="string"==typeof e?e:s.slide;o||n.data("bs.carousel",o=new i(this,s)),"number"==typeof e?o.to(e):a?o[a]():s.interval&&o.pause().cycle()})}var i=function(e,i){this.$element=t(e).on("keydown.bs.carousel",t.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.2.0",i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},i.prototype.keydown=function(t){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.to=function(e){var i=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));return e>this.$items.length-1||0>e?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(e)}):n==e?this.pause().cycle():this.slide(e>n?"next":"prev",t(this.$items[e]))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide("next")},i.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},i.prototype.slide=function(e,i){var n=this.$element.find(".item.active"),o=i||n[e](),s=this.interval,a="next"==e?"left":"right",r="next"==e?"first":"last",l=this;if(!o.length){if(!this.options.wrap)return;o=this.$element.find(".item")[r]()}if(o.hasClass("active"))return this.sliding=!1;var c=o[0],d=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(d),!d.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=t(this.$indicators.children()[this.getItemIndex(o)]);h&&h.addClass("active")}var p=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(o.addClass(e),o[0].offsetWidth,n.addClass(a),o.addClass(a),n.one("bsTransitionEnd",function(){o.removeClass([e,a].join(" ")).addClass("active"),n.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(p)},0)}).emulateTransitionEnd(1e3*n.css("transition-duration").slice(0,-1))):(n.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(p)),s&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this},t(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(i){var n,o=t(this),s=t(o.attr("data-target")||(n=o.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(s.hasClass("carousel")){var a=t.extend({},s.data(),o.data()),r=o.attr("data-slide-to");r&&(a.interval=!1),e.call(s,a),r&&s.data("bs.carousel").to(r),i.preventDefault()}}),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.collapse"),s=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!o&&s.toggle&&"show"==e&&(e=!e),o||n.data("bs.collapse",o=new i(this,s)),"string"==typeof e&&o[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.transitioning=null,this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};i.VERSION="3.2.0",i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var i=t.Event("show.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){var n=this.$parent&&this.$parent.find("> .panel > .in");if(n&&n.length){var o=n.data("bs.collapse");if(o&&o.transitioning)return;e.call(n,"hide"),o||n.data("bs.collapse",null)}var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var r=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(350)[s](this.$element[0][r])}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(n,this)).emulateTransitionEnd(350):n.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var n=t.fn.collapse;t.fn.collapse=e,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var n,o=t(this),s=o.attr("data-target")||i.preventDefault()||(n=o.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""),a=t(s),r=a.data("bs.collapse"),l=r?"toggle":o.data(),c=o.attr("data-parent"),d=c&&t(c);r&&r.transitioning||(d&&d.find('[data-toggle="collapse"][data-parent="'+c+'"]').not(o).addClass("collapsed"),o[a.hasClass("in")?"addClass":"removeClass"]("collapsed")),e.call(a,l)})}(jQuery),+function(t){"use strict";function e(e){e&&3===e.which||(t(o).remove(),t(s).each(function(){var n=i(t(this)),o={relatedTarget:this};n.hasClass("open")&&(n.trigger(e=t.Event("hide.bs.dropdown",o)),e.isDefaultPrevented()||n.removeClass("open").trigger("hidden.bs.dropdown",o))}))}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n=i&&t(i);return n&&n.length?n:e.parent()}function n(e){return this.each(function(){var i=t(this),n=i.data("bs.dropdown");n||i.data("bs.dropdown",n=new a(this)),"string"==typeof e&&n[e].call(i)})}var o=".dropdown-backdrop",s='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.2.0",a.prototype.toggle=function(n){var o=t(this);if(!o.is(".disabled, :disabled")){var s=i(o),a=s.hasClass("open");if(e(),!a){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click",e);var r={relatedTarget:this};if(s.trigger(n=t.Event("show.bs.dropdown",r)),n.isDefaultPrevented())return;o.trigger("focus"),s.toggleClass("open").trigger("shown.bs.dropdown",r)}return!1}},a.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var n=t(this);if(e.preventDefault(),e.stopPropagation(),!n.is(".disabled, :disabled")){var o=i(n),a=o.hasClass("open");if(!a||a&&27==e.keyCode)return 27==e.which&&o.find(s).trigger("focus"),n.trigger("click");var r=" li:not(.divider):visible a",l=o.find('[role="menu"]'+r+', [role="listbox"]'+r);if(l.length){var c=l.index(l.filter(":focus"));38==e.keyCode&&c>0&&c--,40==e.keyCode&&c<l.length-1&&c++,~c||(c=0),l.eq(c).trigger("focus")}}}};var r=t.fn.dropdown;t.fn.dropdown=n,t.fn.dropdown.Constructor=a,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=r,this},t(document).on("click.bs.dropdown.data-api",e).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",s,a.prototype.toggle).on("keydown.bs.dropdown.data-api",s+', [role="menu"], [role="listbox"]',a.prototype.keydown)}(jQuery),+function(t){"use strict";function e(e,n){return this.each(function(){var o=t(this),s=o.data("bs.modal"),a=t.extend({},i.DEFAULTS,o.data(),"object"==typeof e&&e);s||o.data("bs.modal",s=new i(this,a)),"string"==typeof e?s[e](n):a.show&&s.show(n)})}var i=function(e,i){this.options=i,this.$body=t(document.body),this.$element=t(e),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};i.VERSION="3.2.0",i.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},i.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},i.prototype.show=function(e){var i=this,n=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.backdrop(function(){var n=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),n&&i.$element[0].offsetWidth,i.$element.addClass("in").attr("aria-hidden",!1),i.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:e});n?i.$element.find(".modal-dialog").one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(o)}).emulateTransitionEnd(300):i.$element.trigger("focus").trigger(o)}))},i.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},i.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},i.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},i.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden.bs.modal")})},i.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},i.prototype.backdrop=function(e){var i=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&n;if(this.$backdrop=t('<div class="modal-backdrop '+n+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;o?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(150):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var s=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",s).emulateTransitionEnd(150):s()}else e&&e()},i.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},i.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",t+this.scrollbarWidth)},i.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},i.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var n=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=i,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(i){var n=t(this),o=n.attr("href"),s=t(n.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),a=s.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},s.data(),n.data());n.is("a")&&i.preventDefault(),s.one("show.bs.modal",function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",function(){n.is(":visible")&&n.trigger("focus")})}),e.call(s,a,this)})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.tooltip"),s="object"==typeof e&&e;(o||"destroy"!=e)&&(o||n.data("bs.tooltip",o=new i(this,s)),"string"==typeof e&&o[e]())})}var i=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};i.VERSION="3.2.0",i.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},i.prototype.init=function(e,i,n){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(this.options.viewport.selector||this.options.viewport);for(var o=this.options.trigger.split(" "),s=o.length;s--;){var a=o[s];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var r="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,n){i[t]!=n&&(e[t]=n)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},i.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(document.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var n=this,o=this.tip(),s=this.getUID(this.type);this.setContent(),o.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&o.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,r=/\s?auto?\s?/i,l=r.test(a);l&&(a=a.replace(r,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element);var c=this.getPosition(),d=o[0].offsetWidth,h=o[0].offsetHeight;if(l){var p=a,f=this.$element.parent(),u=this.getPosition(f);a="bottom"==a&&c.top+c.height+h-u.scroll>u.height?"top":"top"==a&&c.top-u.scroll-h<0?"bottom":"right"==a&&c.right+d>u.width?"left":"left"==a&&c.left-d<u.left?"right":a,o.removeClass(p).addClass(a)}var m=this.getCalculatedOffset(a,c,d,h);this.applyPlacement(m,a);var g=function(){n.$element.trigger("shown.bs."+n.type),n.hoverState=null};t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",g).emulateTransitionEnd(150):g()}},i.prototype.applyPlacement=function(e,i){var n=this.tip(),o=n[0].offsetWidth,s=n[0].offsetHeight,a=parseInt(n.css("margin-top"),10),r=parseInt(n.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(r)&&(r=0),e.top=e.top+a,e.left=e.left+r,t.offset.setOffset(n[0],t.extend({using:function(t){n.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),n.addClass("in");var l=n[0].offsetWidth,c=n[0].offsetHeight;"top"==i&&c!=s&&(e.top=e.top+s-c);var d=this.getViewportAdjustedDelta(i,e,l,c);d.left?e.left+=d.left:e.top+=d.top;var h=d.left?2*d.left-o+l:2*d.top-s+c,p=d.left?"left":"top",f=d.left?"offsetWidth":"offsetHeight";n.offset(e),this.replaceArrow(h,n[0][f],p)},i.prototype.replaceArrow=function(t,e,i){this.arrow().css(i,t?50*(1-t/e)+"%":"")},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},i.prototype.hide=function(){function e(){"in"!=i.hoverState&&n.detach(),i.$element.trigger("hidden.bs."+i.type)}var i=this,n=this.tip(),o=t.Event("hide.bs."+this.type);return this.$element.removeAttr("aria-describedby"),this.$element.trigger(o),o.isDefaultPrevented()?void 0:(n.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?n.one("bsTransitionEnd",e).emulateTransitionEnd(150):e(),this.hoverState=null,this)},i.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},i.prototype.hasContent=function(){return this.getTitle()},i.prototype.getPosition=function(e){e=e||this.$element;var i=e[0],n="BODY"==i.tagName;return t.extend({},"function"==typeof i.getBoundingClientRect?i.getBoundingClientRect():null,{scroll:n?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop(),width:n?t(window).width():e.outerWidth(),height:n?t(window).height():e.outerHeight()},n?{top:0,left:0}:e.offset())},i.prototype.getCalculatedOffset=function(t,e,i,n){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-n,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},i.prototype.getViewportAdjustedDelta=function(t,e,i,n){var o={top:0,left:0};if(!this.$viewport)return o;var s=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-s-a.scroll,l=e.top+s-a.scroll+n;r<a.top?o.top=a.top-r:l>a.top+a.height&&(o.top=a.top+a.height-l)}else{var c=e.left-s,d=e.left+s+i;c<a.left?o.left=a.left-c:d>a.width&&(o.left=a.left+a.width-d)}return o},i.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},i.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},i.prototype.tip=function(){return this.$tip=this.$tip||t(this.options.template)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},i.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},i.prototype.enable=function(){this.enabled=!0},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data("bs."+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),i.tip().hasClass("in")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.popover"),s="object"==typeof e&&e;(o||"destroy"!=e)&&(o||n.data("bs.popover",o=new i(this,s)),"string"==typeof e&&o[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");i.VERSION="3.2.0",i.DEFAULTS=t.extend({},t.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>'}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").empty()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},i.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery),+function(t){"use strict";function e(i,n){var o=t.proxy(this.process,this);this.$body=t("body"),this.$scrollElement=t(t(i).is("body")?window:i),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",o),this.refresh(),this.process()}function i(i){return this.each(function(){var n=t(this),o=n.data("bs.scrollspy"),s="object"==typeof i&&i;o||n.data("bs.scrollspy",o=new e(this,s)),"string"==typeof i&&o[i]()})}e.VERSION="3.2.0",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e="offset",i=0;t.isWindow(this.$scrollElement[0])||(e="position",i=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var n=this;this.$body.find(this.selector).map(function(){var n=t(this),o=n.data("target")||n.attr("href"),s=/^#./.test(o)&&t(o);return s&&s.length&&s.is(":visible")&&[[s[e]().top+i,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),n=this.options.offset+i-this.$scrollElement.height(),o=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=n)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e<=o[0])return a!=(t=s[0])&&this.activate(t);for(t=o.length;t--;)a!=s[t]&&e>=o[t]&&(!o[t+1]||e<=o[t+1])&&this.activate(s[t])},e.prototype.activate=function(e){this.activeTarget=e,t(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',n=t(i).parents("li").addClass("active");n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")};var n=t.fn.scrollspy;t.fn.scrollspy=i,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=n,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);i.call(e,e.data())})})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.tab");o||n.data("bs.tab",o=new i(this)),"string"==typeof e&&o[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.2.0",i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),n=e.data("target");if(n||(n=e.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var o=i.find(".active:last a")[0],s=t.Event("show.bs.tab",{relatedTarget:o});if(e.trigger(s),!s.isDefaultPrevented()){var a=t(n);this.activate(e.closest("li"),i),this.activate(a,a.parent(),function(){e.trigger({type:"shown.bs.tab",relatedTarget:o})})}}},i.prototype.activate=function(e,i,n){function o(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),n&&n()}var s=i.find("> .active"),a=n&&t.support.transition&&s.hasClass("fade");a?s.one("bsTransitionEnd",o).emulateTransitionEnd(150):o(),s.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=n,this},t(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(i){i.preventDefault(),e.call(t(this),"show")})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.affix"),s="object"==typeof e&&e;o||n.data("bs.affix",o=new i(this,s)),"string"==typeof e&&o[e]()})}var i=function(e,n){this.options=t.extend({},i.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.2.0",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=t(document).height(),n=this.$target.scrollTop(),o=this.$element.offset(),s=this.options.offset,a=s.top,r=s.bottom;"object"!=typeof s&&(r=a=s),"function"==typeof a&&(a=s.top(this.$element)),"function"==typeof r&&(r=s.bottom(this.$element));var l=null!=this.unpin&&n+this.unpin<=o.top?!1:null!=r&&o.top+this.$element.height()>=e-r?"bottom":null!=a&&a>=n?"top":!1;if(this.affixed!==l){null!=this.unpin&&this.$element.css("top","");var c="affix"+(l?"-"+l:""),d=t.Event(c+".bs.affix");this.$element.trigger(d),d.isDefaultPrevented()||(this.affixed=l,this.unpin="bottom"==l?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(c).trigger(t.Event(c.replace("affix","affixed"))),"bottom"==l&&this.$element.offset({top:e-this.$element.height()-r}))}}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),n=i.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),e.call(i,n)})})}(jQuery),function(t,e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Spinner=e()}(this,function(){"use strict";function t(t,e){var i,n=document.createElement(t||"div");for(i in e)n[i]=e[i];return n}function e(t){for(var e=1,i=arguments.length;i>e;e++)t.appendChild(arguments[e]);return t}function i(t,e,i,n){var o=["opacity",e,~~(100*t),i,n].join("-"),s=.01+i/n*100,a=Math.max(1-(1-t)/e*(100-s),t),r=c.substring(0,c.indexOf("Animation")).toLowerCase(),l=r&&"-"+r+"-"||"";
return h[o]||(p.insertRule("@"+l+"keyframes "+o+"{0%{opacity:"+a+"}"+s+"%{opacity:"+t+"}"+(s+.01)+"%{opacity:1}"+(s+e)%100+"%{opacity:"+t+"}100%{opacity:"+a+"}}",p.cssRules.length),h[o]=1),o}function n(t,e){var i,n,o=t.style;for(e=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<d.length;n++)if(i=d[n]+e,void 0!==o[i])return i;return void 0!==o[e]?e:void 0}function o(t,e){for(var i in e)t.style[n(t,i)||i]=e[i];return t}function s(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)void 0===t[n]&&(t[n]=i[n])}return t}function a(t,e){return"string"==typeof t?t:t[e%t.length]}function r(t){this.opts=s(t||{},r.defaults,f)}function l(){function i(e,i){return t("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',i)}p.addRule(".spin-vml","behavior:url(#default#VML)"),r.prototype.lines=function(t,n){function s(){return o(i("group",{coordsize:d+" "+d,coordorigin:-c+" "+-c}),{width:d,height:d})}function r(t,r,l){e(p,e(o(s(),{rotation:360/n.lines*t+"deg",left:~~r}),e(o(i("roundrect",{arcsize:n.corners}),{width:c,height:n.width,left:n.radius,top:-n.width>>1,filter:l}),i("fill",{color:a(n.color,t),opacity:n.opacity}),i("stroke",{opacity:0}))))}var l,c=n.length+n.width,d=2*c,h=2*-(n.width+n.length)+"px",p=o(s(),{position:"absolute",top:h,left:h});if(n.shadow)for(l=1;l<=n.lines;l++)r(l,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(l=1;l<=n.lines;l++)r(l);return e(t,p)},r.prototype.opacity=function(t,e,i,n){var o=t.firstChild;n=n.shadow&&n.lines||0,o&&e+n<o.childNodes.length&&(o=o.childNodes[e+n],o=o&&o.firstChild,o=o&&o.firstChild,o&&(o.opacity=i))}}var c,d=["webkit","Moz","ms","O"],h={},p=function(){var i=t("style",{type:"text/css"});return e(document.getElementsByTagName("head")[0],i),i.sheet||i.styleSheet}(),f={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};r.defaults={},s(r.prototype,{spin:function(e){this.stop();{var i=this,n=i.opts,s=i.el=o(t(0,{className:n.className}),{position:n.position,width:0,zIndex:n.zIndex});n.radius+n.length+n.width}if(o(s,{left:n.left,top:n.top}),e&&e.insertBefore(s,e.firstChild||null),s.setAttribute("role","progressbar"),i.lines(s,i.opts),!c){var a,r=0,l=(n.lines-1)*(1-n.direction)/2,d=n.fps,h=d/n.speed,p=(1-n.opacity)/(h*n.trail/100),f=h/n.lines;!function u(){r++;for(var t=0;t<n.lines;t++)a=Math.max(1-(r+(n.lines-t)*f)%h*p,n.opacity),i.opacity(s,t*n.direction+l,a,n);i.timeout=i.el&&setTimeout(u,~~(1e3/d))}()}return i},stop:function(){var t=this.el;return t&&(clearTimeout(this.timeout),t.parentNode&&t.parentNode.removeChild(t),this.el=void 0),this},lines:function(n,s){function r(e,i){return o(t(),{position:"absolute",width:s.length+s.width+"px",height:s.width+"px",background:e,boxShadow:i,transformOrigin:"left",transform:"rotate("+~~(360/s.lines*d+s.rotate)+"deg) translate("+s.radius+"px,0)",borderRadius:(s.corners*s.width>>1)+"px"})}for(var l,d=0,h=(s.lines-1)*(1-s.direction)/2;d<s.lines;d++)l=o(t(),{position:"absolute",top:1+~(s.width/2)+"px",transform:s.hwaccel?"translate3d(0,0,0)":"",opacity:s.opacity,animation:c&&i(s.opacity,s.trail,h+d*s.direction,s.lines)+" "+1/s.speed+"s linear infinite"}),s.shadow&&e(l,o(r("#000","0 0 4px #000"),{top:"2px"})),e(n,e(l,r(a(s.color,d),"0 0 1px rgba(0,0,0,.1)")));return n},opacity:function(t,e,i){e<t.childNodes.length&&(t.childNodes[e].style.opacity=i)}});var u=o(t("group"),{behavior:"url(#default#VML)"});return!n(u,"transform")&&u.adj?l():c=n(u,"animation"),r}),function(t){if("object"==typeof exports)t(require("jquery"),require("spin"));else if("function"==typeof define&&define.amd)define(["jquery","spin"],t);else{if(!window.Spinner)throw new Error("Spin.js not present");t(window.jQuery,window.Spinner)}}(function(t,e){t.fn.spin=function(i,n){return this.each(function(){var o=t(this),s=o.data();s.spinner&&(s.spinner.stop(),delete s.spinner),i!==!1&&(i=t.extend({color:n||o.css("color")},t.fn.spin.presets[i]||i),s.spinner=new e(i).spin(this))})},t.fn.spin.presets={tiny:{lines:8,length:2,width:2,radius:3},small:{lines:8,length:4,width:3,radius:5},large:{lines:10,length:8,width:4,radius:8}}}),function(t,e,i){t.ichecked||(t.ichecked=function(){i=t.jQuery||t.Zepto;var n={autoInit:!0,autoAjax:!0,tap:!0,checkboxClass:"icheckbox",radioClass:"iradio",checkedClass:"checked",disabledClass:"disabled",indeterminateClass:"indeterminate",hoverClass:"hover",callbacks:{ifCreated:!1},classes:{base:"icheck",div:"#-item",area:"#-area-",input:"#-input",label:"#-label"}};t.icheck=i.extend(n,t.icheck);var o=t.navigator.userAgent,s=/MSIE [5-8]/.test(o)||e.documentMode<9,a=/Opera Mini/.test(o),r=n.classes.base,l=n.classes.div.replace("#",r),c=n.classes.area.replace("#",r),d=n.classes.input.replace("#",r),h=n.classes.label.replace("#",r);delete n.classes;var p,f,u="input[type=checkbox],input[type=radio]",m={},g={},v=new RegExp(r+"\\[(.*?)\\]"),y=function(t,e,i){return t&&(e=v.exec(t),e&&g[e[1]]&&(i=e[1])),i},b=t.getComputedStyle,w=t.PointerEvent||t.MSPointerEvent,C="ontouchend"in t,$=/mobile|tablet|phone|ip(ad|od)|android|silk|webos/i.test(o),k=["mouse","down","up","over","out"],x=t.PointerEvent?["pointer",k[1],k[2],k[3],k[4]]:["MSPointer","Down","Up","Over","Out"],T=["touch","start","end"],E=C&&$||w,S=E?C?T[0]+T[1]:x[0]+x[3]:k[0]+k[3],D=E?C?T[0]+T[2]:x[0]+x[4]:k[0]+k[4],N=E?C?!1:x[0]+x[1]:k[0]+k[1],j=E?C?!1:x[0]+x[2]:k[0]+k[2],O=a?"":S+".i "+D+".i ",P=!a&&N?N+".i "+j+".i":"",A=n.areaStyle!==!1?'position:absolute;display:block;content:"";top:#;bottom:#;left:#;right:#;':0,I="position:absolute!;display:block!;outline:none!;"+(n.debug?"":"opacity:0!;z-index:-99!;clip:rect(0 0 0 0)!;"),L=function(i,n,o){p||(p=e.createElement("style"),(e.head||e.getElementsByTagName("head")[0]).appendChild(p),t.createPopup||p.appendChild(e.createTextNode("")),f=p.sheet||p.styleSheet),n||(n="div."+(o?c+o+":after":l+" input."+d)),i=i.replace(/!/g," !important"),f.addRule?f.addRule(n,i,0):f.insertRule(n+"{"+i+"}",0)};L(I),(C&&$||a)&&L("cursor:pointer!;","label."+h+",div."+l),L("display:none!","iframe.icheck-frame");var R=function(t,e,i,n,o,s,a){return n=t.className,n?(o=" "+n+" ",1===i?s=e:0===i?a=e:(s=e[0],a=e[1]),s&&o.indexOf(" "+s+" ")<0&&(o+=s+" "),a&&~o.indexOf(" "+a+" ")&&(o=o.replace(" "+a+" "," ")),o=o.replace(/^\s+|\s+$/g,""),o!==n&&(t.className=o),o):void 0},U=function(t,e,n,o,s,a){g[e]&&(o=g[e],s=o.className,a=i(W(t,"div",s)),a.length&&(i(t).removeClass(d+" "+s).attr("style",o.style),i("label."+o.esc).removeClass(h+" "+s),i(a).replaceWith(i(t)),n&&M(t,e,n)),g[e]=!1)},F=function(t,e,n,o,s){for(n=[],o=t.length;o--;)if(e=t[o],e.type)~u.indexOf(e.type)&&n.push(e);else for(e=i(e).find(u),s=e.length;s--;)n.push(e[s]);return n},W=function(t,e,i,n){for(;t&&9!==t.nodeType;)if(t=t.parentNode,t&&t.tagName==e.toUpperCase()&&~t.className.indexOf(i)){n=t;break}return n},M=function(t,e,n){n="if"+n,g[e].callbacks!==!1&&("function"==typeof g[e].callbacks[n]&&g[e].callbacks[n](t,g[e]),g[e].callbacks[n]!==!1&&i(t).trigger(n))},Q=function(o,s,a,p){for(var f=F(o),v=f.length;v--;){for(var w,C,$,k,x,T,E,S,D,N,j,O,P,I,Q,B,V,z,q=f[v],_=q.attributes,Z={},J=_.length,X={},Y={},G=q.id,K=q.className,te=q.type,ee=i.cache?i.cache[q[i.expando]]:0,ie=y(K),ne="",oe=!1,se=[],ae=t.FastClick?" needsclick":"";J--;)w=_[J].name,C=_[J].value,~w.indexOf("data-")&&(X[w.substr(5)]=C),"style"==w&&(E=C),Z[w]=C;ee&&ee.data&&(X=i.extend(X,ee.data));for($ in X)C=X[$],("true"==C||"false"==C)&&(C="true"==C),Y[$.replace(/checkbox|radio|class|id|label/g,function(t,e){return 0===e?t:t.charAt(0).toUpperCase()+t.slice(1)})]=C;if(S=i.extend({},n,t.icheck,Y,s),N=S.handle,"checkbox"!==N&&"radio"!==N&&(N=u),S.init!==!1&&~N.indexOf(te)){for(ie&&U(q,ie);!g[ie];)if(ie=Math.random().toString(36).substr(2,5),!g[ie]){D=r+"["+ie+"]";break}if(delete S.autoInit,delete S.autoAjax,S.style=E||"",S.className=D,S.esc=D.replace(/(\[|\])/g,"\\$1"),g[ie]=S,I=W(q,"label",""),I&&(!I.htmlFor&&G&&(I.htmlFor=G),se.push(I)),G)for(Q=i('label[for="'+G+'"]');Q.length--;)P=Q[Q.length],P!==I&&se.push(P);for(z=se.length;z--;)P=se[z],V=P.className,B=y(V),V=B?R(P,r+"["+B+"]",0):(V?V+" ":"")+h,P.className=V+" "+D+ae;if(j=e.createElement("div"),S.inherit)for(k=S.inherit.split(/\s*,\s*/),T=k.length;T--;)x=k[T],void 0!==Z[x]&&("class"==x?ne+=Z[x]+" ":j.setAttribute(x,"id"==x?r+"-"+Z[x]:Z[x]));ne+=S[te+"Class"],ne+=" "+l+" "+D,S.area&&A&&(oe=0|(""+S.area).replace(/%|px|em|\+|-/g,""),oe&&(m[oe]||(L(A.replace(/#/g,"-"+oe+"%"),!1,oe),m[oe]=!0),ne+=" "+c+oe)),j.className=ne+ae,q.className=(K?K+" ":"")+d+" "+D,q.parentNode.replaceChild(j,q),j.appendChild(q),S.insert&&i(j).append(S.insert),oe&&(O=b?b(j,null).getPropertyValue("position"):j.currentStyle.position,"static"==O&&(j.style.position="relative")),H(q,j,ie,"updated",!0,!1,a),g[ie].done=!0,p||M(q,ie,"Created")}}},H=function(t,e,i,n,o,s,a){var r=g[i],l={},c={};l.checked=[t.checked,"Checked","Unchecked"],s&&!a||"click"===n||(l.disabled=[t.disabled,"Disabled","Enabled"],l.indeterminate=["true"==t.getAttribute("indeterminate")||!!t.indeterminate,"Indeterminate","Determinate"]),"updated"==n||"click"==n?(c.checked=s?!l.checked[0]:l.checked[0],s&&!a||"click"===n||(c.disabled=l.disabled[0],c.indeterminate=l.indeterminate[0])):"checked"==n||"unchecked"==n?c.checked="checked"==n:"disabled"==n||"enabled"==n?c.disabled="disabled"==n:"indeterminate"==n||"determinate"==n?c.indeterminate="determinate"!==n:c.checked=!l.checked[0],B(t,e,l,c,i,r,n,o,s,a)},B=function(t,e,n,o,s,a,r,l,c,d,h){var p,f,u,m,v,b,w,C,k,x,T,E,S,D,N=t.type,j="radio"==N?"Radio":"Checkbox",O="LabelClass";if(e||(e=W(t,"div",a.className)),e){for(p in o)if(f=o[p],n[p][0]!==f&&"updated"!==r&&"click"!==r&&(t[p]=f),d&&(f?t.setAttribute(p,p):t.removeAttribute(p)),a[p]!==f){if(a[p]=f,S=!0,"checked"==p&&(D=!0,!h&&f&&(g[s].done||d)&&"radio"==N&&t.name))for(b=W(t,"form",""),w='input[name="'+t.name+'"]',w=b&&!d?i(b).find(w):i(w),C=w.length;C--;)k=w[C],x=y(k.className),t!==k&&g[x]&&g[x].checked&&(T={checked:[!0,"Checked","Unchecked"]},E={checked:!1},B(k,!1,T,E,x,g[x],"updated",l,c,d,!0));if(u=[a[p+"Class"],a[p+j+"Class"],a[n[p][1]+"Class"],a[n[p][1]+j+"Class"],a[p+O]],m=[u[3]||u[2],u[1]||u[0]],f&&m.reverse(),R(e,m),a.mirror&&u[4])for(v=i("label."+a.esc);v.length--;)R(v[v.length],u[4],f?1:0);(!l||h)&&M(t,s,n[p][f?1:2])}(!l||h)&&(S&&M(t,s,"Changed"),D&&M(t,s,"Toggled")),a.cursor&&!$&&(a.disabled||a.pointer?a.disabled&&a.pointer&&(e.style.cursor="default",a.pointer=!1):(e.style.cursor="pointer",a.pointer=!0)),g[s]=a}};i.fn.icheck=function(t,e){if(/^(checked|unchecked|indeterminate|determinate|disabled|enabled|updated|toggle|destroy|data|styler)$/.test(t))for(var i=F(this),n=i.length;n--;){var o=i[n],s=y(o.className);if(s){if("data"==t)return g[s];if("styler"==t)return W(o,"div",g[s].className);"destroy"==t?U(o,s,"Destroyed"):H(o,!1,s,t),"function"==typeof e&&e(o)}}else"object"!=typeof t&&t||Q(this,t||{});return this};var V;i(e).on("click.i "+O+P,"label."+h+",div."+l,function(t){var e=this,n=y(e.className);if(n){var o,r,l,c,d=t.type,h=g[n],p=h.esc,f="DIV"==e.tagName,u=[["label",h.activeLabelClass,h.hoverLabelClass],["div",h.activeClass,h.hoverClass]];if(f&&u.reverse(),d==N||d==j){if(u[0][1]&&R(e,u[0][1],d==N?1:0),h.mirror&&u[1][1])for(l=i(u[1][0]+"."+p);l.length--;)R(l[l.length],u[1][1],d==N?1:0);f&&d==j&&h.tap&&$&&w&&!a&&(c=!0)}else if(d==S||d==D){if(u[0][2]&&R(e,u[0][2],d==S?1:0),h.mirror&&u[1][2])for(l=i(u[1][0]+"."+p);l.length--;)R(l[l.length],u[1][2],d==S?1:0);f&&d==D&&h.tap&&$&&C&&!a&&(c=!0)}else f&&($&&(C||w)&&h.tap&&!a||(c=!0));c&&setTimeout(function(){r=t.currentTarget||{},"LABEL"!==r.tagName&&(!h.change||+new Date-h.change>100)&&(o=i(e).find("input."+p).click(),(s||a)&&o.change())},2)}}).on("click.i change.i focusin.i focusout.i keyup.i keydown.i","input."+d,function(t){var e=this,n=y(e.className);if(n){var o,s,a=t.type,r=g[n],l=r.esc,c="click"==a?!1:W(e,"div",r.className);if("click"==a)g[n].change=+new Date,t.stopPropagation();else if("change"==a)c&&!e.disabled&&H(e,c,n,"click");else if(~a.indexOf("focus")){if(s=[r.focusClass,r.focusLabelClass],s[0]&&c&&R(c,s[0],"focusin"==a?1:0),r.mirror&&s[1])for(o=i("label."+l);o.length--;)R(o[o.length],s[1],"focusin"==a?1:0)}else c&&!e.disabled&&("keyup"==a?(("checkbox"==e.type&&32==t.keyCode&&r.keydown||"radio"==e.type&&!e.checked)&&H(e,c,n,"click",!1,!0),g[n].keydown=g[V].keydown=!1):(V=n,g[n].keydown=!0))}}).ready(function(){if(t.icheck.autoInit&&i("."+r).icheck(),t.jQuery){var n=e.body||e.getElementsByTagName("body")[0];i.ajaxSetup({converters:{"text html":function(o){if(t.icheck.autoAjax&&n){var a,l=e.createElement("iframe");s||(l.style="display:none"),l.className="iframe.icheck-frame",l.src="about:blank",n.appendChild(l),a=l.contentDocument?l.contentDocument:l.contentWindow.document,a.open(),a.write(o),a.close(),n.removeChild(l),a=i(a),Q(a.find("."+r),{},!0),a=a[0],o=(a.body||a.getElementsByTagName("body")[0]).innerHTML,a=null}return o}}})}})},"function"==typeof define&&define.amd?define("icheck",[t.jQuery?"jquery":"zepto"],t.ichecked):t.ichecked())}(window,document),function(t,e,i){"use strict";e.icheck={autoInit:!1,autoAjax:!1},t(i).on("ready ajaxSuccess",function(){t("input:not(.icheck-input)").icheck()}),t(function(){t(".Button.Hidden").removeClass("Hidden").hide(),t(i).on("click",".ToggleFlyout",function(e){t(".InProgress",e.currentTarget).spin({lines:11,radius:5,length:5,width:2})}),t(i).on("click",".EditComment",function(e){t(".TinyProgress",t(e.currentTarget).closest(".Item")).empty().spin({lines:9,radius:3,length:3,width:2})}),t(i).on("click",".MorePager a",function(e){t(e.currentTarget).parent().spin({lines:9,radius:3,length:3,width:2})});var e=".Overlay",n="> .Popup",o=function(){var e=t(this),i=t('<div class="backdrop fade">');t("body").addClass("modal-open"),t(n,e).addClass("fade"),e.data("backdrop")||(e.data("backdrop",i),e.append(i)),setTimeout(function(){i.addClass("in").spin({lines:11,radius:10,length:10,width:4})},0)},s=function(){var e=t(this),i=e.data("backdrop");t(n,e).addClass("in"),i.length&&i.spin(!1)},a=function(){var i=t(this),o=i.data("backdrop");t(n,i).removeClass("in"),setTimeout(function(){o.length&&o.removeClass("in"),t("body").removeClass("modal-open")},150),setTimeout(function(){t(e).remove()},300)};t(i).on("popupLoading",function(){t(e).each(o)}).on("popupReveal",function(){t(e).each(s)}).on("popupClose",function(){t(e).each(a)});var r=["a.Delete","a.DeleteComment","a.DeleteFile","a.PopConfirm","a.ClearConversation","ul#DP_Remove a"];t(i).on("click",r.join(),function(){t(i).trigger("popupLoading"),setTimeout(function(){t(i).trigger("popupReveal")},150)})}),t.popup.close=function(e){return t(i).unbind("keydown.popup"),t("#"+e.popupId).trigger("popupClose"),!1}}(jQuery,window,document);