function menubar(n,t){this.$id=$("#"+n);this.$rootItems=this.$id.children("li");this.$items=this.$id.find(".menu-item").not(".separator");this.$parents=this.$id.find(".menu-parent");this.$allItems=this.$parents.add(this.$items);this.$activeItem=null;this.$parentActive=null;this.vmenu=t;this.bChildOpen=!1;this.keys={tab:9,enter:13,esc:27,space:32,left:37,up:38,right:39,down:40};this.bindHandlers()}$(function(){$('.soe-callout[role="button"]').click(function(){window.open(String($(this).attr("data-url")),"_self")})});$("#openSearch").on("show.bs.collapse",function(){$("#openSearchBtn").addClass("active")});$("#openSearch").on("hide.bs.collapse",function(){$("#openSearchBtn").removeClass("active")});window.matchMedia||(window.matchMedia=function(){"use strict";var t=window.styleMedia||window.media;if(!t){var n=document.createElement("style"),i=document.getElementsByTagName("script")[0],r=null;n.type="text/css";n.id="matchmediajs-test";i.parentNode.insertBefore(n,i);r="getComputedStyle"in window&&window.getComputedStyle(n,null)||n.currentStyle;t={matchMedium:function(t){var i="@media "+t+"{ #matchmediajs-test { width: 1px; } }";return n.styleSheet?n.styleSheet.cssText=i:n.textContent=i,r.width==="1px"}}}return function(n){return{matches:t.matchMedium(n||"all"),media:n||"all"}}}()),function(n){n.fn.equalHeightColumns=function(t){var i,r;return t=n.extend({},n.equalHeightColumns.defaults,t),i=t.height,r=n(this),n(this).each(function(){t.children&&(r=n(this).children(t.children));t.height||(t.children?r.each(function(){n(this).height()>i&&(i=n(this).height())}):n(this).height()>i&&(i=n(this).height()))}),t.minHeight&&i<t.minHeight&&(i=t.minHeight),t.maxHeight&&i>t.maxHeight&&(i=t.maxHeight),r.animate({height:i},t.speed),n(this)};n.equalHeightColumns={version:1,defaults:{children:!1,height:0,minHeight:0,maxHeight:0,speed:0}}}(jQuery);$(window).on("load",function(){$(".soe-eh").each(function(){$(this).find(".soe-eh-box").equalHeightColumns()})});$(window).resize(function(){matchMedia("all and (min-width: 768px)").matches&&$(".soe-eh").each(function(){})});$(function(){$('[data-toggle="popover"]').popover()});$(document).ready(function(){var n=new menubar("nav",!1)});menubar.prototype.bindHandlers=function(){var n=this;this.$items.mouseenter(function(){return $(this).addClass("menu-hover"),!0});this.$items.mouseout(function(){return $(this).removeClass("menu-hover"),!0});this.$parents.mouseenter(function(t){return n.handleMouseEnter($(this),t)});this.$parents.mouseleave(function(t){return n.handleMouseLeave($(this),t)});this.$allItems.click(function(t){return n.handleClick($(this),t)});this.$allItems.keydown(function(t){return n.handleKeyDown($(this),t)});this.$allItems.keypress(function(t){return n.handleKeyPress($(this),t)});this.$allItems.focus(function(t){return n.handleFocus($(this),t)});this.$allItems.blur(function(t){return n.handleBlur($(this),t)});$(document).click(function(t){return n.handleDocumentClick(t)})};menubar.prototype.handleMouseEnter=function(n){return n.addClass("menu-hover"),n.attr("aria-haspopup")=="true"&&(n.children("ul").show().attr("aria-hidden","false"),this.bChildOpen=!0),!0};menubar.prototype.handleMouseOut=function(n){return n.removeClass("menu-hover"),!0};menubar.prototype.handleMouseLeave=function(n){var t=n.find(".menu-focus");return t=t.add(n.find(".menu-focus")),n.removeClass("menu-hover"),t.length>0&&(this.bChildOpen=!1,t.removeClass("menu-focus"),this.$activeItem=n,n.focus()),n.children("ul").hide().attr("aria-hidden","true"),!0};menubar.prototype.handleClick=function(n){var t=n.parent();return t.is(".root-level")?(n.children("ul").first().show().attr("aria-hidden","false"),this.bChildOpen=!0):(this.$allItems.removeClass("menu-hover menu-focus"),this.$id.find("ul").not(".root-level").hide().attr("aria-hidden","true")),!0};menubar.prototype.handleFocus=function(n){var t,i;if(this.$activeItem==null)this.$activeItem=n;else if(n[0]!=this.$activeItem[0])return!0;return t=this.$activeItem.parentsUntil("div").filter("li"),this.$allItems.removeClass("menu-focus"),this.$activeItem.addClass("menu-focus"),t.addClass("menu-focus"),this.vmenu==!0&&(this.bChildOpen==!0?(i=n.parent(),i.is(".root-level")&&n.attr("aria-haspopup")=="true"&&n.children("ul").show().attr("aria-hidden","false")):this.vmenu=!1),!0};menubar.prototype.handleBlur=function(n){return n.removeClass("menu-focus"),!0};menubar.prototype.handleKeyDown=function(n,t){var i,r;if(t.altKey||t.ctrlKey)return!0;switch(t.keyCode){case this.keys.tab:this.$id.find("ul").hide().attr("aria-hidden","true");this.$allItems.removeClass("menu-focus");this.$activeItem=null;this.bChildOpen==!1;break;case this.keys.esc:return i=n.parent(),i.is(".root-level")?n.children("ul").first().hide().attr("aria-hidden","true"):(this.$activeItem=i.parent(),this.bChildOpen=!1,this.$activeItem.focus(),i.hide().attr("aria-hidden","true")),t.stopPropagation(),!1;case this.keys.enter:case this.keys.space:return n.hasClass("menu-parent")?(r=n.parent(),r.is(".root-level")?window.location=n.find("a").eq(0).attr("href"):(this.$allItems.removeClass("menu-hover"),this.$allItems.removeClass("menu-focus"),this.$id.find("ul").not(".root-level").hide().attr("aria-hidden","true"),this.$activeItem=null),t.stopPropagation(),!1):(window.location=n.find("a").attr("href"),!1);case this.keys.left:return this.$activeItem=this.vmenu==!0&&i.is(".root-level")?this.moveUp(n):this.moveToPrevious(n),this.$activeItem.focus(),t.stopPropagation(),!1;case this.keys.right:return this.$activeItem=this.vmenu==!0&&i.is(".root-level")?this.moveDown(n):this.moveToNext(n),this.$activeItem.focus(),t.stopPropagation(),!1;case this.keys.up:return this.$activeItem=this.vmenu==!0&&i.is(".root-level")?this.moveToPrevious(n):this.moveUp(n),this.$activeItem.focus(),t.stopPropagation(),!1;case this.keys.down:return this.$activeItem=this.vmenu==!0&&i.is(".root-level")?this.moveToNext(n):this.moveDown(n),this.$activeItem.focus(),t.stopPropagation(),!1}return!0};menubar.prototype.moveToNext=function(n){var o=n.parent(),f=o.children("li"),s=f.length,e=f.index(n),i=null,r,u,t;if(o.is(".root-level"))i=e<s-1?n.next():f.first(),n.attr("aria-haspopup")=="true"&&(t=n.children("ul").first(),t.attr("aria-hidden")=="false"&&(t.hide().attr("aria-hidden","true"),this.bChildOpen=!0)),n.removeClass("menu-focus"),i.attr("aria-haspopup")=="true"&&this.bChildOpen==!0&&(t=i.children("ul").first(),t.show().attr("aria-hidden","false"),this.vmenu||(i=t.children("li").first()));else if(n.attr("aria-haspopup")=="true")t=n.children("ul").first(),i=t.children("li").first(),t.show().attr("aria-hidden","false"),this.bChildOpen=!0;else{if(this.vmenu==!0)return n;r=null;u=null;r=n.parentsUntil("div").filter("ul").not(".root-level");r.hide().attr("aria-hidden","true");r.find("li").removeClass("menu-focus");r.last().parent().removeClass("menu-focus");u=r.last().parent();e=this.$rootItems.index(u);i=e<this.$rootItems.length-1?u.next():this.$rootItems.first();i.attr("aria-haspopup")=="true"&&(t=i.children("ul").first(),i=t.children("li").first(),t.show().attr("aria-hidden","false"),this.bChildOpen=!0)}return i};menubar.prototype.moveToPrevious=function(n){var r=n.parent(),f=r.children("li"),s=f.length,e=f.index(n),t=null,i;if(r.is(".root-level"))t=e>0?n.prev():f.last(),n.attr("aria-haspopup")=="true"&&(i=n.children("ul").first(),i.attr("aria-hidden")=="false"&&(i.hide().attr("aria-hidden","true"),this.bChildOpen=!0)),n.removeClass("menu-focus"),t.attr("aria-haspopup")=="true"&&this.bChildOpen==!0&&(i=t.children("ul").first(),i.show().attr("aria-hidden","false"),this.vmenu||(t=i.children("li").first()));else{var u=r.parent(),o=u.parent();this.vmenu!=!0&&o.is(".root-level")?(r.hide().attr("aria-hidden","true"),n.removeClass("menu-focus"),u.removeClass("menu-focus"),e=this.$rootItems.index(u),t=e>0?u.prev():this.$rootItems.last(),t.addClass("menu-focus"),t.attr("aria-haspopup")=="true"&&(i=t.children("ul").first(),i.show().attr("aria-hidden","false"),this.bChildOpen=!0,t=i.children("li").first())):(t=r.parent(),r.hide().attr("aria-hidden","true"),n.removeClass("menu-focus"),this.vmenu==!0&&(this.bChildOpen=!1))}return t};menubar.prototype.moveDown=function(n,t){var h=n.parent(),r=h.children("li").not(".separator"),e=r.length,f=r.index(n),u=null,o=null,s,i,c;if(h.is(".root-level"))return n.attr("aria-haspopup")!="true"?n:(o=n.children("ul").first(),u=o.children("li").first(),o.show().attr("aria-hidden","false"),this.bChildOpen=!0,u);if(t){for(s=!1,i=f+1,i==e&&(i=0);i!=f;){if(c=r.eq(i).find("a").html().charAt(0),c.toLowerCase()==t){s=!0;break}i=i+1;i==e&&(i=0)}return s==!0?(u=r.eq(i),n.removeClass("menu-focus"),u):n}return u=f<e-1?r.eq(f+1):r.first(),n.removeClass("menu-focus"),u};menubar.prototype.moveUp=function(n){var i=n.parent(),t=i.children("li").not(".separator"),f=t.length,r=t.index(n),u=null;return i.is(".root-level")?n:(u=r>0?t.eq(r-1):t.last(),n.removeClass("menu-focus"),u)};menubar.prototype.handleKeyPress=function(n,t){if(t.altKey||t.ctrlKey||t.shiftKey)return!0;switch(t.keyCode){case this.keys.tab:return!0;case this.keys.esc:case this.keys.enter:case this.keys.space:case this.keys.up:case this.keys.down:case this.keys.left:case this.keys.right:return t.stopPropagation(),!1;default:var i=String.fromCharCode(t.which);return this.$activeItem=this.moveDown(n,i),this.$activeItem.focus(),t.stopPropagation(),!1}return!0};menubar.prototype.handleDocumentClick=function(){var n=this.$id.find("ul").not(".root-level");return n.hide().attr("aria-hidden","true"),this.$allItems.removeClass("menu-focus"),this.$activeItem=null,!0};menubar.prototype.getCurrentParent=function(){};var energy_journey=function(n,t){this.target=n;this.start=t;this.result_count=0;this.scroll_results=[]};if(energy_journey.prototype.init=function(){var t=this,n=0;$("#results").find(".result-item").each(function(){$id=String("scroll-id-"+n);t.scroll_results.push($id);$(this).attr("id",$id);++n});this.scroll_init()},energy_journey.prototype.scroll_init=function(){var t=this,n=$(window).scrollTop();t.scroll_update(n);$(window).scroll(function(){n=$(window).scrollTop();t.scroll_update(n)});$("#"+this.target).scroll(function(){n=$(window).scrollTop();t.scroll_update(n)})},energy_journey.prototype.scroll_update=function(n){for(var t,i=0;i<this.scroll_results.length;i++)t=$("#"+this.scroll_results[i]),this.scroll_check(n,t,760)&&t&&!t.hasClass("active")&&t.addClass("active")},energy_journey.prototype.scroll_check=function(n,t,i){if($(t).length){var i=i!=undefined?i:0,r=$(t).offset().top-i,u=$(t).height();return n>=r?!0:!1}return!1},$(".form-quiz").each(function(){var u=$(this).attr("data-result"),n=$(this).attr("data-card"),o=$(this),h=$("#"+n).find(".quiz-message").eq(0),f=$("#"+n).find(".quiz-correct").eq(0),i=$("#"+n).find(".quiz-incorrect").eq(0),t=$("#"+n).find(".card-a").eq(0),r=$("#"+n).find(".card-b").eq(0),s=!1,e=!1;_height=$(t).height()>$(r).height()?$(t).height():$(r).height();_width=$(t).width();$(t).height(_height);$(r).height(_height);$("#"+n).height(_height);$("#"+n).parent().height(_height);$(f).hide();$(i).hide();$('input[type="radio"]').click(function(t){if(e){t.preventDefault();return}$(this).attr("value")==u?(s=!0,$(this).parent().parent().addClass("has-success"),$(f).show()):($(this).parent().parent().addClass("has-error"),$('input[type="radio"]').each(function(){$(this).attr("value")==u&&($(this).parent().parent().addClass("has-success"),$(i).find("span.answer").eq(0).html($(this).parent().find("span").eq(0).html()),$(i).show())}));$(o).velocity({opacity:0},{duration:799,delay:399,complete:function(){$("#"+n).toggleClass("answer")}});e=!0})}),!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):(n=n||self).parsley=t(n.jQuery)}(this,function(n){"use strict";function u(n){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function r(){return(r=Object.assign||function(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n}).apply(this,arguments)}function ct(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var o,i;if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n)){var r=[],u=!0,f=!1,e=void 0;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);u=!0);}catch(n){f=!0;e=n}finally{try{u||null==i.return||i.return()}finally{if(f)throw e;}}return r}}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance");}()}function s(n){return function(n){if(Array.isArray(n)){for(var t=0,i=new Array(n.length);t<n.length;t++)i[t]=n[t];return i}}(n)||function(n){if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n))return Array.from(n)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance");}()}function w(){}function f(){this.__id__=t.generateID()}function b(t){n.extend(!0,this,t)}function rt(n,t){this.__class__="ValidatorRegistry";this.locale="en";this.init(n||{},t||{})}function k(n){var t=(""+n).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}function ut(n,i){return function(r){for(var o,f=arguments.length,e=new Array(1<f?f-1:0),u=1;u<f;u++)e[u-1]=arguments[u];return e.pop(),i.apply(void 0,[r].concat(s((o=n,e.map(t.parse[o])))))}}function d(n){return{validateDate:ut("date",n),validateNumber:ut("number",n),requirementType:n.length<=2?"string":["string","string"],priority:30}}function c(t,i,r){this.__class__="Form";this.element=t;this.$element=n(t);this.domOptions=i;this.options=r;this.parent=window.Parsley;this.fields=[];this.validationResult=null}function ft(n,t,i,u,f){var o=window.Parsley._validatorRegistry.validators[t],e=new b(o);r(this,{validator:e,name:t,requirements:i,priority:u=u||n.options[t+"Priority"]||e.priority,isDomConstraint:f=!0===f});this._parseRequirements(n.options)}function e(t,i,r,u){this.__class__="Field";this.element=t;this.$element=n(t);void 0!==u&&(this.parent=u);this.options=r;this.domOptions=i;this.constraints=[];this.constraintsByName={};this.validationResult=!0;this._bindConstraints()}function ot(){this.__class__="FieldMultiple"}function v(t,i,f){this.element=t;this.$element=n(t);var e=this.$element.data("Parsley");if(e)return void 0!==f&&e.parent===window.Parsley&&(e.parent=f,e._resetOptions(e.options)),"object"===u(i)&&r(e.options,i),e;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if(void 0!==f&&"Form"!==f.__class__)throw new Error("Parent instance must be a Form instance");return this.parent=f||window.Parsley,this.init(i)}function l(){t.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")}function ht(n,t){return n.parsleyAdaptedCallback||(n.parsleyAdaptedCallback=function(){var i=Array.prototype.slice.call(arguments,0);i.unshift(this);n.apply(t||st,i)}),n.parsleyAdaptedCallback}function o(n){return 0===n.lastIndexOf(tt,0)?n.substr(tt.length):n}var lt=1,p={},t={attr:function(n,t,i){var r,u,f,e=new RegExp("^"+t,"i");if(void 0===i)i={};else for(r in i)i.hasOwnProperty(r)&&delete i[r];if(!n)return i;for(r=(f=n.attributes).length;r--;)(u=f[r])&&u.specified&&e.test(u.name)&&(i[this.camelize(u.name.slice(t.length))]=this.deserializeValue(u.value));return i},checkAttr:function(n,t,i){return n.hasAttribute(t+i)},setAttr:function(n,t,i,r){n.setAttribute(this.dasherize(t+i),String(r))},getType:function(n){return n.getAttribute("type")||"text"},generateID:function(){return""+lt++},deserializeValue:function(n){var t;try{return n?"true"==n||"false"!=n&&("null"==n?null:isNaN(t=Number(n))?/^[\[\{]/.test(n)?JSON.parse(n):n:t):n}catch(t){return n}},camelize:function(n){return n.replace(/-+(.)?/g,function(n,t){return t?t.toUpperCase():""})},dasherize:function(n){return n.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var n;window.console&&"function"==typeof window.console.warn&&(n=window.console).warn.apply(n,arguments)},warnOnce:function(n){p[n]||(p[n]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){p={}},trimString:function(n){return n.replace(/^\s+|\s+$/g,"")},parse:{date:function(n){var r=n.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!r)return null;var t=ct(r.map(function(n){return parseInt(n,10)}),4),u=(t[0],t[1]),f=t[2],e=t[3],i=new Date(u,f-1,e);return i.getFullYear()!==u||i.getMonth()+1!==f||i.getDate()!==e?null:i},string:function(n){return n},integer:function(n){return isNaN(n)?null:parseInt(n,10)},number:function(n){if(isNaN(n))throw null;return parseFloat(n)},boolean:function(n){return!/^\s*false\s*$/i.test(n)},object:function(n){return t.deserializeValue(n)},regexp:function(n){var t="";return n=/^\/.*\/(?:[gimy]*)$/.test(n)?(t=n.replace(/.*\/([gimy]*)$/,"$1"),n.replace(new RegExp("^/(.*?)/"+t+"$"),"$1")):"^"+n+"$",new RegExp(n,t)}},parseRequirement:function(n,t){var r=this.parse[n||"string"],i;if(!r)throw'Unknown requirement specification: "'+n+'"';if(i=r(t),null===i)throw"Requirement is not a ".concat(n,': "').concat(t,'"');return i},namespaceEvents:function(t,i){return(t=this.trimString(t||"").split(/\s+/))[0]?n.map(t,function(n){return"".concat(n,".").concat(i)}).join(" "):""},difference:function(t,i){var r=[];return n.each(t,function(n,t){-1==i.indexOf(t)&&r.push(t)}),r},all:function(t){return n.when.apply(n,s(t).concat([42,42]))},objectCreate:Object.create||function(n){if(1<arguments.length)throw Error("Second argument not supported");if("object"!=u(n))throw TypeError("Argument must be an object");w.prototype=n;var t=new w;return w.prototype=null,t},_SubmitSelector:'input[type="submit"], button:submit'},it={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(){},errorsContainer:function(){},errorsWrapper:'<ul class="parsley-errors-list"><\/ul>',errorTemplate:"<li><\/li>"},a,h,g,et,y,i,nt,st,tt;if(f.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){function t(){var t=n.Deferred();return!0!==i.validationResult&&t.reject(),t.resolve().promise()}var i=this;return[t,t]},actualizeOptions:function(){return t.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(n){for(var i in this.domOptions=t.objectCreate(this.parent.options),this.options=t.objectCreate(this.domOptions),n)n.hasOwnProperty(i)&&(this.options[i]=n[i]);this.actualizeOptions()},_listeners:null,on:function(n,t){return this._listeners=this._listeners||{},(this._listeners[n]=this._listeners[n]||[]).push(t),this},subscribe:function(t,i){n.listenTo(this,t.toLowerCase(),i)},off:function(n,t){var i=this._listeners&&this._listeners[n],r;if(i)if(t)for(r=i.length;r--;)i[r]===t&&i.splice(r,1);else delete this._listeners[n];return this},unsubscribe:function(t){n.unsubscribeTo(this,t.toLowerCase())},trigger:function(n,t,i){var f,r,u;if(t=t||this,r=this._listeners&&this._listeners[n],r)for(u=r.length;u--;)if(!1===(f=r[u].call(t,t,i)))return f;return!this.parent||this.parent.trigger(n,t,i)},asyncIsValid:function(n,i){return t.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:n,force:i})},_findRelated:function(){return this.options.multiple?n(this.parent.element.querySelectorAll("[".concat(this.options.namespace,'multiple="').concat(this.options.multiple,'"]'))):this.$element}},b.prototype={validate:function(n,i){if(this.fn)return 3<arguments.length&&(i=[].slice.call(arguments,1,-1)),this.fn(n,i);if(Array.isArray(n)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var r=arguments[arguments.length-1];if(this.validateDate&&r._isDateInput())return arguments[0]=t.parse.date(arguments[0]),null!==arguments[0]&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!n||!isNaN(n)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values";},parseRequirements:function(i,r){var u,e,f;if("string"!=typeof i)return Array.isArray(i)?i:[i];if(u=this.requirementType,Array.isArray(u)){for(e=function(n,i){var u=n.match(/^\s*\[(.*)\]\s*$/),r;if(!u)throw'Requirement is not an array: "'+n+'"';if(r=u[1].split(",").map(t.trimString),r.length!==i)throw"Requirement has "+r.length+" values when "+i+" are needed";return r}(i,u.length),f=0;f<e.length;f++)e[f]=t.parseRequirement(u[f],e[f]);return e}return n.isPlainObject(u)?function(n,i,r){var e=null,o={},u,f;for(u in n)u?(f=r(u),"string"==typeof f&&(f=t.parseRequirement(n[u],f)),o[u]=f):e=t.parseRequirement(n[u],i);return[e,o]}(u,i,r):[t.parseRequirement(u,i)]},requirementType:"string",priority:2},a={email:/^((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))$/,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,date:{test:function(n){return null!==t.parse.date(n)}},url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-zA-Z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$")},a.range=a.number,rt.prototype={init:function(n,t){for(var i in this.catalog=t,this.validators=r({},this.validators),n)this.addValidator(i,n[i].fn,n[i].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(n){if(void 0===this.catalog[n])throw new Error(n+" is not available in the catalog");return this.locale=n,this},addCatalog:function(n,t,i){return"object"===u(t)&&(this.catalog[n]=t),!0===i?this.setLocale(n):this},addMessage:function(n,t,i){return void 0===this.catalog[n]&&(this.catalog[n]={}),this.catalog[n][t]=i,this},addMessages:function(n,t){for(var i in t)this.addMessage(n,i,t[i]);return this},addValidator:function(n){if(this.validators[n])t.warn('Validator "'+n+'" is already defined.');else if(it.hasOwnProperty(n))return void t.warn('"'+n+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},hasValidator:function(n){return!!this.validators[n]},updateValidator:function(n){return this.validators[n]?this._setValidator.apply(this,arguments):(t.warn('Validator "'+n+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(n){return this.validators[n]||t.warn('Validator "'+n+'" is not defined.'),delete this.validators[n],this},_setValidator:function(n,t,i){for(var r in"object"!==u(t)&&(t={fn:t,priority:i}),t.validate||(t=new b(t)),(this.validators[n]=t).messages||{})this.addMessage(r,n,t.messages[r]);return this},getErrorMessage:function(n){var t;return t="type"===n.name?(this.catalog[this.locale][n.name]||{})[n.requirements]:this.formatMessage(this.catalog[this.locale][n.name],n.requirements),t||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(n,t){if("object"!==u(t))return"string"==typeof n?n.replace(/%s/i,t):"";for(var i in t)n=this.formatMessage(n,t[i]);return n},validators:{notblank:{validateString:function(n){return/\S/.test(n)},priority:2},required:{validateMultiple:function(n){return 0<n.length},validateString:function(n){return/\S/.test(n)},priority:512},type:{validateString:function(n,t,i){var o=2<arguments.length&&void 0!==i?i:{},s=o.step,u=void 0===s?"any":s,h=o.base,c=void 0===h?0:h,l=a[t],f,e,r;if(!l)throw new Error("validator type `"+t+"` is not supported");return n?l.test(n)?"number"===t&&!/^any$/i.test(u||"")&&((f=Number(n),e=Math.max(k(u),k(c)),k(f)>e)||(r=function(n){return Math.round(n*Math.pow(10,e))},(r(f)-r(c))%r(u)!=0))?!1:!0:!1:!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(n,t){return!n||t.test(n)},requirementType:"regexp",priority:64},minlength:{validateString:function(n,t){return!n||n.length>=t},requirementType:"integer",priority:30},maxlength:{validateString:function(n,t){return n.length<=t},requirementType:"integer",priority:30},length:{validateString:function(n,t,i){return!n||n.length>=t&&n.length<=i},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(n,t){return n.length>=t},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(n,t){return n.length<=t},requirementType:"integer",priority:30},check:{validateMultiple:function(n,t,i){return n.length>=t&&n.length<=i},requirementType:["integer","integer"],priority:30},min:d(function(n,t){return t<=n}),max:d(function(n,t){return n<=t}),range:d(function(n,t,i){return t<=n&&n<=i}),equalto:{validateString:function(t,i){if(!t)return!0;var r=n(i);return r.length?t===r.val():t===i},priority:256},euvatin:{validateString:function(n){return n?/^[A-Z][A-Z][A-Za-z0-9 -]{2,}$/.test(n):!0},priority:30}}},h={},h.Form={_actualizeTriggers:function(){var n=this;this.$element.on("submit.Parsley",function(t){n.onSubmitValidate(t)});this.$element.on("click.Parsley",t._SubmitSelector,function(t){n.onSubmitButton(t)});!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function(){var t,n;if(!(this._focusedField=null)===this.validationResult||"none"===this.options.focus)return null;for(t=0;t<this.fields.length;t++)if(n=this.fields[t],!0!==n.validationResult&&0<n.validationResult.length&&void 0===n.options.noFocus&&(this._focusedField=n.$element,"first"===this.options.focus))break;return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},h.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var n=function n(t,i,r){for(var e,f,o=[],s=[],u=0;u<t.length;u++){for(e=!1,f=0;f<i.length;f++)if(t[u].assert.name===i[f].assert.name){e=!0;break}e?s.push(t[u]):o.push(t[u])}return{kept:s,added:o,removed:r?[]:n(i,t,!0).added}}(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult;this._manageStatusClass();this._manageErrorsMessages(n);this._actualizeTriggers();!n.kept.length&&!n.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var t=[],n=0;n<this.validationResult.length;n++)t.push(this.validationResult[n].errorMessage||this._getErrorMessage(this.validationResult[n].assert));return t},addError:function(n,t){var i=1<arguments.length&&void 0!==t?t:{},u=i.message,f=i.assert,r=i.updateClass,e=void 0===r||r;this._buildUI();this._addError(n,{message:u,assert:f});e&&this._errorClass()},updateError:function(n,t){var i=1<arguments.length&&void 0!==t?t:{},u=i.message,f=i.assert,r=i.updateClass,e=void 0===r||r;this._buildUI();this._updateError(n,{message:u,assert:f});e&&this._errorClass()},removeError:function(n,t){var i=(1<arguments.length&&void 0!==t?t:{}).updateClass,r=void 0===i||i;this._buildUI();this._removeError(n);r&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&!0===this.validationResult?this._successClass():0<this.validationResult.length?this._errorClass():this._resetClass()},_manageErrorsMessages:function(t){if(void 0===this.options.errorsMessagesDisabled){if(void 0!==this.options.errorMessage)return t.added.length||t.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(n(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorClassHandler.attr("aria-describedby",this._ui.errorsWrapperId),this._ui.$errorsWrapper.addClass("filled").attr("aria-hidden","false").find(".parsley-custom-error-message").html(this.options.errorMessage)):(this._ui.$errorClassHandler.removeAttr("aria-describedby"),this._ui.$errorsWrapper.removeClass("filled").attr("aria-hidden","true").find(".parsley-custom-error-message").remove());for(var i=0;i<t.removed.length;i++)this._removeError(t.removed[i].assert.name);for(i=0;i<t.added.length;i++)this._addError(t.added[i].assert.name,{message:t.added[i].errorMessage,assert:t.added[i].assert});for(i=0;i<t.kept.length;i++)this._updateError(t.kept[i].assert.name,{message:t.kept[i].errorMessage,assert:t.kept[i].assert})}},_addError:function(t,i){var r=i.message,u=i.assert;this._insertErrorWrapper();this._ui.$errorClassHandler.attr("aria-describedby",this._ui.errorsWrapperId);this._ui.$errorsWrapper.addClass("filled").attr("aria-hidden","false").append(n(this.options.errorTemplate).addClass("parsley-"+t).html(r||this._getErrorMessage(u)))},_updateError:function(n,t){var i=t.message,r=t.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+n).html(i||this._getErrorMessage(r))},_removeError:function(n){this._ui.$errorClassHandler.removeAttr("aria-describedby");this._ui.$errorsWrapper.removeClass("filled").attr("aria-hidden","true").find(".parsley-"+n).remove()},_getErrorMessage:function(n){var t=n.name+"Message";return void 0!==this.options[t]?window.Parsley.formatMessage(this.options[t],n.requirements):window.Parsley.getErrorMessage(n)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var t={};this.element.setAttribute(this.options.namespace+"id",this.__id__);t.$errorClassHandler=this._manageClassHandler();t.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__);t.$errorsWrapper=n(this.options.errorsWrapper).attr("id",t.errorsWrapperId);t.lastValidationResult=[];t.validationInformationVisible=!1;this._ui=t}},_manageClassHandler:function(){var i,r;if("string"==typeof this.options.classHandler&&n(this.options.classHandler).length)return n(this.options.classHandler);if(i=this.options.classHandler,"string"==typeof this.options.classHandler&&"function"==typeof window[this.options.classHandler]&&(i=window[this.options.classHandler]),"function"==typeof i){if(r=i.call(this,this),void 0!==r&&r.length)return r}else{if("object"===u(i)&&i instanceof jQuery&&i.length)return i;i&&t.warn("The class handler `"+i+"` does not exist in DOM nor as a global JS function")}return this._inputHolder()},_inputHolder:function(){return this.options.multiple&&"SELECT"!==this.element.nodeName?this.$element.parent():this.$element},_insertErrorWrapper:function(){var i=this.options.errorsContainer;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof i){if(n(i).length)return n(i).append(this._ui.$errorsWrapper);"function"==typeof window[i]?i=window[i]:t.warn("The errors container `"+i+"` does not exist in DOM nor as a global JS function")}return"function"==typeof i&&(i=i.call(this,this)),"object"===u(i)&&i.length?i.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var i,r=this,n=this._findRelated();n.off(".Parsley");this._failedOnce?n.on(t.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){r._validateIfNeeded()}):(i=t.namespaceEvents(this.options.trigger,"Parsley"))&&n.on(i,function(n){r._validateIfNeeded(n)})},_validateIfNeeded:function(n){var t=this;n&&/key|input/.test(n.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout(function(){return t.validate()},this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1;this._actualizeTriggers();void 0!==this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI();void 0!==this._ui&&this._ui.$errorsWrapper.remove();delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0;this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0;this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}},g={pending:null,resolved:!0,rejected:!1},c.prototype={onSubmitValidate:function(n){var u=this,i,r;!0!==n.parsley&&(i=this._submitSource||this.$element.find(t._SubmitSelector)[0],(this._submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),i&&null!==i.getAttribute("formnovalidate"))||(window.Parsley._remoteCache={},r=this.whenValidate({event:n}),"resolved"===r.state()&&!1!==this._trigger("submit")||(n.stopImmediatePropagation(),n.preventDefault(),"pending"===r.state()&&r.done(function(){u._submit(i)}))))},onSubmitButton:function(n){this._submitSource=n.currentTarget},_submit:function(t){if(!1!==this._trigger("submit")){if(t){var i=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===i.length&&(i=n('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element));i.attr({name:t.getAttribute("name"),value:t.getAttribute("value")})}this.$element.trigger(r(n.Event("submit"),{parsley:!0}))}},validate:function(i){if(1<=arguments.length&&!n.isPlainObject(i)){t.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var r=Array.prototype.slice.call(arguments);i={group:r[0],force:r[1],event:r[2]}}return g[this.whenValidate(i).state()]},whenValidate:function(i){var e,u=this,f=0<arguments.length&&void 0!==i?i:{},c=f.group,l=f.force,o=f.event,h;return(this.submitEvent=o)&&(this.submitEvent=r({},o,{preventDefault:function(){t.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`");u.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields(),h=this._withoutReactualizingFormOptions(function(){return n.map(u.fields,function(n){return n.whenValidate({force:l,group:c})})}),(e=t.all(h).done(function(){u._trigger("success")}).fail(function(){u.validationResult=!1;u.focus();u._trigger("error")}).always(function(){u._trigger("validated")})).pipe.apply(e,s(this._pipeAccordingToValidationResult()))},isValid:function(i){if(1<=arguments.length&&!n.isPlainObject(i)){t.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var r=Array.prototype.slice.call(arguments);i={group:r[0],force:r[1]}}return g[this.whenValid(i).state()]},whenValid:function(i){var f=this,r=0<arguments.length&&void 0!==i?i:{},e=r.group,o=r.force,u;return this._refreshFields(),u=this._withoutReactualizingFormOptions(function(){return n.map(f.fields,function(n){return n.whenValid({group:e,force:o})})}),t.all(u)},refresh:function(){return this._refreshFields(),this},reset:function(){for(var n=0;n<this.fields.length;n++)this.fields[n].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var n=0;n<this.fields.length;n++)this.fields[n].destroy();this.$element.removeData("Parsley");this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var i=this,r=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){i.$element.find(i.options.inputs).not(i.options.excluded).not("[".concat(i.options.namespace,"excluded=true]")).each(function(n,t){var r=new window.Parsley.Factory(t,{},i),u;("Field"===r.__class__||"FieldMultiple"===r.__class__)&&(u=r.__class__+"-"+r.__id__,void 0===i.fieldsMappedById[u]&&(i.fieldsMappedById[u]=r,i.fields.push(r)))});n.each(t.difference(r,i.fields),function(n,t){t.reset()})}),this},_withoutReactualizingFormOptions:function(n){var i=this.actualizeOptions,t;return this.actualizeOptions=function(){return this},t=n(),this.actualizeOptions=i,t},_trigger:function(n){return this.trigger("form:"+n)}},et={pending:null,resolved:!0,rejected:!(ft.prototype={validate:function(n,t){var i;return(i=this.validator).validate.apply(i,[n].concat(s(this.requirementList),[t]))},_parseRequirements:function(n){var t=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(i){return n[t.name+((r=i)[0].toUpperCase()+r.slice(1))];var r})}})},e.prototype={validate:function(i){1<=arguments.length&&!n.isPlainObject(i)&&(t.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),i={options:i});var r=this.whenValidate(i);if(!r)return!0;switch(r.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(n){var i,t=this,r=0<arguments.length&&void 0!==n?n:{},f=r.force,u=r.group;if(this.refresh(),!u||this._isInGroup(u))return this.value=this.getValue(),this._trigger("validate"),(i=this.whenValid({force:f,value:this.value,_refreshed:!0}).always(function(){t._reflowUI()}).done(function(){t._trigger("success")}).fail(function(){t._trigger("error")}).always(function(){t._trigger("validated")})).pipe.apply(i,s(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(n){return void 0===n&&(n=this.getValue()),!(!n.length&&!this._isRequired()&&void 0===this.options.validateIfEmpty)},_isInGroup:function(t){return Array.isArray(this.options.group)?-1!==n.inArray(t,this.options.group):this.options.group===t},isValid:function(i){var r,u;return 1<=arguments.length&&!n.isPlainObject(i)&&(t.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated."),r=Array.prototype.slice.call(arguments),i={force:r[0],value:r[1]}),u=this.whenValid(i),!u||et[u.state()]},whenValid:function(i){var h=this,r=0<arguments.length&&void 0!==i?i:{},e=r.force,c=void 0!==e&&e,u=r.value,o=r.group,s,f;if(r._refreshed||this.refresh(),!o||this._isInGroup(o))return(this.validationResult=!0,!this.hasConstraints())?n.when():(null==u&&(u=this.getValue()),!this.needsValidation(u)&&!0!==c)?n.when():(s=this._getGroupedConstraints(),f=[],n.each(s,function(i,r){var e=t.all(n.map(r,function(n){return h._validateConstraint(u,n)}));if(f.push(e),"rejected"===e.state())return!1}),t.all(f))},_validateConstraint:function(i,r){var u=this,f=r.validate(i,this);return!1===f&&(f=n.Deferred().reject()),t.all([f]).fail(function(n){u.validationResult instanceof Array||(u.validationResult=[]);u.validationResult.push({assert:r,errorMessage:"string"==typeof n&&n})})},getValue:function(){var n;return null==(n="function"==typeof this.options.value?this.options.value(this):void 0!==this.options.value?this.options.value:this.$element.val())?"":this._handleWhitespace(n)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI();this.$element.removeData("Parsley");this.$element.removeData("FieldMultiple");this._trigger("destroy")},refresh:function(){return this._refreshConstraints(),this},_refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},refreshConstraints:function(){return t.warnOnce("Parsley's refreshConstraints is deprecated. Please use refresh"),this.refresh()},addConstraint:function(n,t,i,r){if(window.Parsley._validatorRegistry.validators[n]){var u=new ft(this,n,t,i,r);"undefined"!==this.constraintsByName[u.name]&&this.removeConstraint(u.name);this.constraints.push(u);this.constraintsByName[u.name]=u}return this},removeConstraint:function(n){for(var t=0;t<this.constraints.length;t++)if(n===this.constraints[t].name){this.constraints.splice(t,1);break}return delete this.constraintsByName[n],this},updateConstraint:function(n,t,i){return this.removeConstraint(n).addConstraint(n,t,i)},_bindConstraints:function(){for(var t,i=[],r={},n=0;n<this.constraints.length;n++)!1===this.constraints[n].isDomConstraint&&(i.push(this.constraints[n]),r[this.constraints[n].name]=this.constraints[n]);for(t in this.constraints=i,this.constraintsByName=r,this.options)this.addConstraint(t,this.options[t],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){var n,i,r;return null!==this.element.getAttribute("required")&&this.addConstraint("required",!0,void 0,!0),null!==this.element.getAttribute("pattern")&&this.addConstraint("pattern",this.element.getAttribute("pattern"),void 0,!0),n=this.element.getAttribute("min"),i=this.element.getAttribute("max"),null!==n&&null!==i?this.addConstraint("range",[n,i],void 0,!0):null!==n?this.addConstraint("min",n,void 0,!0):null!==i&&this.addConstraint("max",i,void 0,!0),null!==this.element.getAttribute("minlength")&&null!==this.element.getAttribute("maxlength")?this.addConstraint("length",[this.element.getAttribute("minlength"),this.element.getAttribute("maxlength")],void 0,!0):null!==this.element.getAttribute("minlength")?this.addConstraint("minlength",this.element.getAttribute("minlength"),void 0,!0):null!==this.element.getAttribute("maxlength")&&this.addConstraint("maxlength",this.element.getAttribute("maxlength"),void 0,!0),r=t.getType(this.element),"number"===r?this.addConstraint("type",["number",{step:this.element.getAttribute("step")||"1",base:n||this.element.getAttribute("value")}],void 0,!0):/^(email|url|range|date)$/i.test(r)?this.addConstraint("type",r,void 0,!0):this},_isRequired:function(){return void 0!==this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(n){return this.trigger("field:"+n)},_handleWhitespace:function(n){return!0===this.options.trimValue&&t.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(n=n.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(n=t.trimString(n)),n},_isDateInput:function(){var n=this.constraintsByName.type;return n&&"date"===n.requirements},_getGroupedConstraints:function(){var t;if(!1===this.options.priorityEnabled)return[this.constraints];for(var i=[],r={},n=0;n<this.constraints.length;n++)t=this.constraints[n].priority,r[t]||i.push(r[t]=[]),r[t].push(this.constraints[n]);return i.sort(function(n,t){return t[0].priority-n[0].priority}),i}},ot.prototype={addElement:function(n){return this.$elements.push(n),this},_refreshConstraints:function(){var i,r,t;if(this.constraints=[],"SELECT"===this.element.nodeName)return this.actualizeOptions()._bindConstraints(),this;for(r=0;r<this.$elements.length;r++)if(n("html").has(this.$elements[r]).length)for(i=this.$elements[r].data("FieldMultiple")._refreshConstraints().constraints,t=0;t<i.length;t++)this.addConstraint(i[t].name,i[t].requirements,i[t].priority,i[t].isDomConstraint);else this.$elements.splice(r,1);return this},getValue:function(){var i,r;if("function"==typeof this.options.value)return this.options.value(this);if(void 0!==this.options.value)return this.options.value;if("INPUT"===this.element.nodeName){if(i=t.getType(this.element),"radio"===i)return this._findRelated().filter(":checked").val()||"";if("checkbox"===i)return r=[],this._findRelated().filter(":checked").each(function(){r.push(n(this).val())}),r}return"SELECT"===this.element.nodeName&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}},v.prototype={init:function(n){return this.__class__="Parsley",this.__version__="2.9.2",this.__id__=t.generateID(),this._resetOptions(n),"FORM"===this.element.nodeName||t.checkAttr(this.element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){var n=t.getType(this.element);return"radio"===n||"checkbox"===n||"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple")},handleMultiple:function(){var r,u,e=this,f,i;if(this.options.multiple=this.options.multiple||(r=this.element.getAttribute("name"))||this.element.getAttribute("id"),"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return t.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;for(this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),r&&n('input[name="'+r+'"]').each(function(n,i){var r=t.getType(i);"radio"!==r&&"checkbox"!==r||i.setAttribute(e.options.namespace+"multiple",e.options.multiple)}),f=this._findRelated(),i=0;i<f.length;i++)if(void 0!==(u=n(f.get(i)).data("Parsley"))){this.$element.data("FieldMultiple")||u.addElement(this.$element);break}return this.bind("parsleyField",!0),u||this.bind("parsleyFieldMultiple")},bind:function(i,r){var u;switch(i){case"parsleyForm":u=n.extend(new c(this.element,this.domOptions,this.options),new f,window.ParsleyExtend)._bindFields();break;case"parsleyField":u=n.extend(new e(this.element,this.domOptions,this.options,this.parent),new f,window.ParsleyExtend);break;case"parsleyFieldMultiple":u=n.extend(new e(this.element,this.domOptions,this.options,this.parent),new ot,new f,window.ParsleyExtend)._init();break;default:throw new Error(i+"is not a supported Parsley type");}return this.options.multiple&&t.setAttr(this.element,this.options.namespace,"multiple",this.options.multiple),void 0!==r?this.$element.data("FieldMultiple",u):(this.$element.data("Parsley",u),u._actualizeTriggers(),u._trigger("init")),u}},y=n.fn.jquery.split("."),parseInt(y[0])<=1&&parseInt(y[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";return y.forEach||t.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim"),i=r(new f,{element:document,$element:n(document),actualizeOptions:null,_resetOptions:null,Factory:v,version:"2.9.2"}),r(e.prototype,h.Field,f.prototype),r(c.prototype,h.Form,f.prototype),r(v.prototype,f.prototype),n.fn.parsley=n.fn.psly=function(t){if(1<this.length){var i=[];return this.each(function(){i.push(n(this).parsley(t))}),i}if(0!=this.length)return new v(this[0],t)},void 0===window.ParsleyExtend&&(window.ParsleyExtend={}),i.options=r(t.objectCreate(it),window.ParsleyConfig),window.ParsleyConfig=i.options,window.Parsley=window.psly=i,i.Utils=t,window.ParsleyUtils={},n.each(t,function(n,i){"function"==typeof i&&(window.ParsleyUtils[n]=function(){return t.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),t[n].apply(t,arguments)})}),nt=window.Parsley._validatorRegistry=new rt(window.ParsleyConfig.validators,window.ParsleyConfig.i18n),window.ParsleyValidator={},n.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator hasValidator".split(" "),function(n,i){window.Parsley[i]=function(){return nt[i].apply(nt,arguments)};window.ParsleyValidator[i]=function(){var n;return t.warnOnce("Accessing the method '".concat(i,"' through Validator is deprecated. Simply call 'window.Parsley.").concat(i,"(...)'")),(n=window.Parsley)[i].apply(n,arguments)}}),window.Parsley.UI=h,window.ParsleyUI={removeError:function(n,i,r){var u=!0!==r;return t.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),n.removeError(i,{updateClass:u})},getErrorsMessages:function(n){return t.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),n.getErrorsMessages()}},n.each("addError updateError".split(" "),function(n,i){window.ParsleyUI[i]=function(n,r,u,f,e){var o=!0!==e;return t.warnOnce("Accessing UI is deprecated. Call '".concat(i,"' on the instance directly. Please comment in issue 1073 as to your need to call this method.")),n[i](r,{message:u,assert:f,updateClass:o})}}),!1!==window.ParsleyConfig.autoBind&&n(function(){n("[data-parsley-validate]").length&&n("[data-parsley-validate]").parsley()}),st=n({}),tt="parsley:",n.listen=function(n,t){var i;if(l(),"object"===u(arguments[1])&&"function"==typeof arguments[2]&&(i=arguments[1],t=arguments[2]),"function"!=typeof t)throw new Error("Wrong parameters");window.Parsley.on(o(n),ht(t,i))},n.listenTo=function(n,t,i){if(l(),!(n instanceof e||n instanceof c))throw new Error("Must give Parsley instance");if("string"!=typeof t||"function"!=typeof i)throw new Error("Wrong parameters");n.on(o(t),ht(i))},n.unsubscribe=function(n,t){if(l(),"string"!=typeof n||"function"!=typeof t)throw new Error("Wrong arguments");window.Parsley.off(o(n),t.parsleyAdaptedCallback)},n.unsubscribeTo=function(n,t){if(l(),!(n instanceof e||n instanceof c))throw new Error("Must give Parsley instance");n.off(o(t))},n.unsubscribeAll=function(t){l();window.Parsley.off(o(t));n("form,input,textarea,select").each(function(){var i=n(this).data("Parsley");i&&i.off(o(t))})},n.emit=function(n,t){l();var i=t instanceof e||t instanceof c,r=Array.prototype.slice.call(arguments,i?2:1);r.unshift(o(n));i||(t=window.Parsley);t.trigger.apply(t,s(r))},n.extend(!0,i,{asyncValidators:{"default":{fn:function(n){return 200<=n.status&&n.status<300},url:!1},reverse:{fn:function(n){return n.status<200||300<=n.status},url:!1}},addAsyncValidator:function(n,t,r,u){return i.asyncValidators[n]={fn:t,url:r||!1,options:u||{}},this}}),i.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(t,r,u,f){function a(){var t=i.asyncValidators[e].fn.call(f,h,r,u);return t=t||n.Deferred().reject(),n.when(t)}var o,s,c={},e=u.validator||(!0===u.reverse?"reverse":"default"),l,h;if(void 0===i.asyncValidators[e])throw new Error("Calling an undefined async validator: `"+e+"`");return-1<(r=i.asyncValidators[e].url||r).indexOf("{value}")?r=r.replace("{value}",encodeURIComponent(t)):c[f.element.getAttribute("name")||f.element.getAttribute("id")]=t,l=n.extend(!0,u.options||{},i.asyncValidators[e].options),o=n.extend(!0,{},{url:r,data:c,type:"GET"},l),f.trigger("field:ajaxoptions",f,o),s=n.param(o),void 0===i._remoteCache&&(i._remoteCache={}),h=i._remoteCache[s]=i._remoteCache[s]||n.ajax(o),h.then(a,a)},priority:-1}),i.on("form:submit",function(){i._remoteCache={}}),f.prototype.addAsyncValidator=function(){return t.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),i.addAsyncValidator.apply(i,arguments)},i.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same.",euvatin:"It's not a valid VAT Identification Number."}),i.setLocale("en"),(new function(){var t=this,i=window||global;r(this,{isNativeEvent:function(n){return n.originalEvent&&!1!==n.originalEvent.isTrusted},fakeInputEvent:function(i){t.isNativeEvent(i)&&n(i.target).trigger("input")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),n(document).on("change.inputevent",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&n(document).off("input.inputevent",i.data.selector,t.behavesOk).off("change.inputevent",i.data.selector,t.misbehaves)},install:function(){var u,f,r;if(!i.inputEventPatched)for(i.inputEventPatched="0.0.3",u=0,f=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'];u<f.length;u++){r=f[u];n(document).on("input.inputevent",r,{selector:r},t.behavesOk).on("change.inputevent",r,{selector:r},t.misbehaves)}},uninstall:function(){delete i.inputEventPatched;n(document).off(".inputevent")}})}).install(),i}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(n){"use strict";var t=n.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4");}(jQuery);+function(n){"use strict";function t(){var i=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(void 0!==i.style[n])return{end:t[n]};return!1}n.fn.emulateTransitionEnd=function(t){var i=!1,u=this,r;n(this).one("bsTransitionEnd",function(){i=!0});return r=function(){i||n(u).trigger(n.support.transition.end)},setTimeout(r,t),this};n(function(){n.support.transition=t();n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery);+function(n){"use strict";function u(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));"string"==typeof i&&u[i].call(r)})}var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.VERSION="3.3.7";t.TRANSITION_DURATION=150;t.prototype.close=function(i){function e(){r.detach().trigger("closed.bs.alert").remove()}var f=n(this),u=f.attr("data-target"),r;u||(u=f.attr("href"),u=u&&u.replace(/.*(?=#[^\s]*$)/,""));r=n("#"===u?[]:u);i&&i.preventDefault();r.length||(r=f.closest(".alert"));r.trigger(i=n.Event("close.bs.alert"));i.isDefaultPrevented()||(r.removeClass("in"),n.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e())};r=n.fn.alert;n.fn.alert=u;n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f="object"==typeof i&&i;r||u.data("bs.button",r=new t(this,f));"toggle"==i?r.toggle():i&&r.setState(i)})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.isLoading=!1},r;t.VERSION="3.3.7";t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(t){var i="disabled",r=this.$element,f=r.is("input")?"val":"html",u=r.data();t+="Text";null==u.resetText&&r.data("resetText",r[f]());setTimeout(n.proxy(function(){r[f](null==u[t]?this.options[t]:u[t]);"loadingText"==t?(this.isLoading=!0,r.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,r.removeClass(i).removeAttr(i).prop(i,!1))},this),0)};t.prototype.toggle=function(){var t=!0,i=this.$element.closest('[data-toggle="buttons"]'),n;i.length?(n=this.$element.find("input"),"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),i.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")):(this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active"))};r=n.fn.button;n.fn.button=i;n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=r,this};n(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var r=n(t.target).closest(".btn");i.call(r,"toggle");n(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),r.is("input,button")?r.trigger("focus"):r.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){n(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i),e="string"==typeof i?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));"number"==typeof i?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})}var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",n.proxy(this.keydown,this));"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",n.proxy(this.pause,this)).on("mouseleave.bs.carousel",n.proxy(this.cycle,this))},u,r;t.VERSION="3.3.7";t.TRANSITION_DURATION=600;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0};t.prototype.keydown=function(n){if(!/input|textarea/i.test(n.target.tagName)){switch(n.which){case 37:this.prev();break;case 39:this.next();break;default:return}n.preventDefault()}};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getItemIndex=function(n){return this.$items=n.parent().children(".item"),this.$items.index(n||this.$active)};t.prototype.getItemForDirection=function(n,t){var i=this.getItemIndex(t),f="prev"==n&&0===i||"next"==n&&i==this.$items.length-1,r,u;return f&&!this.options.wrap?t:(r="prev"==n?-1:1,u=(i+r)%this.$items.length,this.$items.eq(u))};t.prototype.to=function(n){var i=this,t=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(n>this.$items.length-1||n<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(n)}):t==n?this.pause().cycle():this.slide(n>t?"next":"prev",this.$items.eq(n))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(i,r){var e=this.$element.find(".item.active"),u=r||this.getItemForDirection(i,e),l=this.interval,f="next"==i?"left":"right",a=this,o,s,h,c;return u.hasClass("active")?this.sliding=!1:(o=u[0],s=n.Event("slide.bs.carousel",{relatedTarget:o,direction:f}),(this.$element.trigger(s),!s.isDefaultPrevented())?((this.sliding=!0,l&&this.pause(),this.$indicators.length)&&(this.$indicators.find(".active").removeClass("active"),h=n(this.$indicators.children()[this.getItemIndex(u)]),h&&h.addClass("active")),c=n.Event("slid.bs.carousel",{relatedTarget:o,direction:f}),n.support.transition&&this.$element.hasClass("slide")?(u.addClass(i),u[0].offsetWidth,e.addClass(f),u.addClass(f),e.one("bsTransitionEnd",function(){u.removeClass([i,f].join(" ")).addClass("active");e.removeClass(["active",f].join(" "));a.sliding=!1;setTimeout(function(){a.$element.trigger(c)},0)}).emulateTransitionEnd(t.TRANSITION_DURATION)):(e.removeClass("active"),u.addClass("active"),this.sliding=!1,this.$element.trigger(c)),l&&this.cycle(),this):void 0)};u=n.fn.carousel;n.fn.carousel=i;n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=u,this};r=function(t){var o,r=n(this),u=n(r.attr("data-target")||(o=r.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,"")),e,f;u.hasClass("carousel")&&(e=n.extend({},u.data(),r.data()),f=r.attr("data-slide-to"),f&&(e.interval=!1),i.call(u,e),f&&u.data("bs.carousel").to(f),t.preventDefault())};n(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r);n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function r(t){var i,r=t.attr("data-target")||(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return n(r)}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.collapse"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i);!r&&f.toggle&&/show|hide/.test(i)&&(f.toggle=!1);r||u.data("bs.collapse",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.$trigger=n('[data-toggle="collapse"][href="#'+i.id+'"],[data-toggle="collapse"][data-target="#'+i.id+'"]');this.transitioning=null;this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger);this.options.toggle&&this.toggle()},u;t.VERSION="3.3.7";t.TRANSITION_DURATION=350;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){var n=this.$element.hasClass("width");return n?"width":"height"};t.prototype.show=function(){var f,r,e,u,o,s;if(!this.transitioning&&!this.$element.hasClass("in")&&(r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing"),!(r&&r.length&&(f=r.data("bs.collapse"),f&&f.transitioning))&&(e=n.Event("show.bs.collapse"),this.$element.trigger(e),!e.isDefaultPrevented()))){if(r&&r.length&&(i.call(r,"hide"),f||r.data("bs.collapse",null)),u=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[u](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1,o=function(){this.$element.removeClass("collapsing").addClass("collapse in")[u]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return o.call(this);s=n.camelCase(["scroll",u].join("-"));this.$element.one("bsTransitionEnd",n.proxy(o,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[u](this.$element[0][s])}};t.prototype.hide=function(){var r,i,u;if(!this.transitioning&&this.$element.hasClass("in")&&(r=n.Event("hide.bs.collapse"),this.$element.trigger(r),!r.isDefaultPrevented()))return i=this.dimension(),this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1,u=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")},n.support.transition?void this.$element[i](0).one("bsTransitionEnd",n.proxy(u,this)).emulateTransitionEnd(t.TRANSITION_DURATION):u.call(this)};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};t.prototype.getParent=function(){return n(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(n.proxy(function(t,i){var u=n(i);this.addAriaAndCollapsedClass(r(u),u)},this)).end()};t.prototype.addAriaAndCollapsedClass=function(n,t){var i=n.hasClass("in");n.attr("aria-expanded",i);t.toggleClass("collapsed",!i).attr("aria-expanded",i)};u=n.fn.collapse;n.fn.collapse=i;n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=u,this};n(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var u=n(this);u.attr("data-target")||t.preventDefault();var f=r(u),e=f.data("bs.collapse"),o=e?"toggle":u.data();i.call(f,o)})}(jQuery);+function(n){"use strict";function r(t){var i=t.attr("data-target"),r;return i||(i=t.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r=i&&n(i),r&&r.length?r:t.parent()}function u(t){t&&3===t.which||(n(o).remove(),n(i).each(function(){var u=n(this),i=r(u),f={relatedTarget:this};i.hasClass("open")&&(t&&"click"==t.type&&/input|textarea/i.test(t.target.tagName)&&n.contains(i[0],t.target)||(i.trigger(t=n.Event("hide.bs.dropdown",f)),t.isDefaultPrevented()||(u.attr("aria-expanded","false"),i.removeClass("open").trigger(n.Event("hidden.bs.dropdown",f)))))}))}function e(i){return this.each(function(){var r=n(this),u=r.data("bs.dropdown");u||r.data("bs.dropdown",u=new t(this));"string"==typeof i&&u[i].call(r)})}var o=".dropdown-backdrop",i='[data-toggle="dropdown"]',t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.VERSION="3.3.7";t.prototype.toggle=function(t){var f=n(this),i,o,e;if(!f.is(".disabled, :disabled")){if(i=r(f),o=i.hasClass("open"),u(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&n(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(n(this)).on("click",u),e={relatedTarget:this},i.trigger(t=n.Event("show.bs.dropdown",e)),t.isDefaultPrevented())return;f.trigger("focus").attr("aria-expanded","true");i.toggleClass("open").trigger(n.Event("shown.bs.dropdown",e))}return!1}};t.prototype.keydown=function(t){var e,o,s,h,f,u;if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=r(e),s=o.hasClass("open"),!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(i).trigger("focus"),e.trigger("click");h=" li:not(.disabled):visible a";f=o.find(".dropdown-menu"+h);f.length&&(u=f.index(t.target),38==t.which&&u>0&&u--,40==t.which&&u<f.length-1&&u++,~u||(u=0),f.eq(u).trigger("focus"))}};f=n.fn.dropdown;n.fn.dropdown=e;n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",u).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i,t.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",t.prototype.keydown)}(jQuery);+function(n){"use strict";function i(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),"object"==typeof i&&i);u||f.data("bs.modal",u=new t(this,e));"string"==typeof i?u[i](r):e.show&&u.show(r)})}var t=function(t,i){this.options=i;this.$body=n(document.body);this.$element=n(t);this.$dialog=this.$element.find(".modal-dialog");this.$backdrop=null;this.isShown=null;this.originalBodyPad=null;this.scrollbarWidth=0;this.ignoreBackdropClick=!1;this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},r;t.VERSION="3.3.7";t.TRANSITION_DURATION=300;t.BACKDROP_TRANSITION_DURATION=150;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this.isShown?this.hide():this.show(n)};t.prototype.show=function(i){var r=this,u=n.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(u);this.isShown||u.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(t){n(t.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})}),this.backdrop(function(){var f=n.support.transition&&r.$element.hasClass("fade"),u;r.$element.parent().length||r.$element.appendTo(r.$body);r.$element.show().scrollTop(0);r.adjustDialog();f&&r.$element[0].offsetWidth;r.$element.addClass("in");r.enforceFocus();u=n.Event("shown.bs.modal",{relatedTarget:i});f?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(u)}).emulateTransitionEnd(t.TRANSITION_DURATION):r.$element.trigger("focus").trigger(u)}))};t.prototype.hide=function(i){i&&i.preventDefault();i=n.Event("hide.bs.modal");this.$element.trigger(i);this.isShown&&!i.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",n.proxy(this.hideModal,this)).emulateTransitionEnd(t.TRANSITION_DURATION):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){document===n.target||this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.trigger("focus")},this))};t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",n.proxy(function(n){27==n.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")};t.prototype.resize=function(){this.isShown?n(window).on("resize.bs.modal",n.proxy(this.handleUpdate,this)):n(window).off("resize.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.$body.removeClass("modal-open");n.resetAdjustments();n.resetScrollbar();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(i){var e=this,f=this.$element.hasClass("fade")?"fade":"",r,u;if(this.isShown&&this.options.backdrop){if(r=n.support.transition&&f,this.$backdrop=n(document.createElement("div")).addClass("modal-backdrop "+f).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(n.target===n.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!i)return;r?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):i()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),u=function(){e.removeBackdrop();i&&i()},n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",u).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):u()):i&&i()};t.prototype.handleUpdate=function(){this.adjustDialog()};t.prototype.adjustDialog=function(){var n=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&n?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!n?this.scrollbarWidth:""})};t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};t.prototype.checkScrollbar=function(){var n=window.innerWidth,t;n||(t=document.documentElement.getBoundingClientRect(),n=t.right-Math.abs(t.left));this.bodyIsOverflowing=document.body.clientWidth<n;this.scrollbarWidth=this.measureScrollbar()};t.prototype.setScrollbar=function(){var n=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";this.bodyIsOverflowing&&this.$body.css("padding-right",n+this.scrollbarWidth)};t.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)};t.prototype.measureScrollbar=function(){var n=document.createElement("div"),t;return n.className="modal-scrollbar-measure",this.$body.append(n),t=n.offsetWidth-n.clientWidth,this.$body[0].removeChild(n),t};r=n.fn.modal;n.fn.modal=i;n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=r,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var r=n(this),f=r.attr("href"),u=n(r.attr("data-target")||f&&f.replace(/.*(?=#[^\s]+$)/,"")),e=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(f)&&f},u.data(),r.data());r.is("a")&&t.preventDefault();u.one("show.bs.modal",function(n){n.isDefaultPrevented()||u.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})});i.call(u,e,this)})}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f="object"==typeof i&&i;!r&&/destroy|hide/.test(i)||(r||u.data("bs.tooltip",r=new t(this,f)),"string"==typeof i&&r[i]())})}var t=function(n,t){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",n,t)},i;t.VERSION="3.3.7";t.TRANSITION_DURATION=150;t.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}};t.prototype.init=function(t,i,r){var f,e,u,o,s;if(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(n.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],"click"==u)this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else"manual"!=u&&(o="hover"==u?"mouseenter":"focusin",s="hover"==u?"mouseleave":"focusout",this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this)));this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){return t=n.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusin"==t.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(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())};t.prototype.isInStateTrue=function(){for(var n in this.inState)if(this.inState[n])return!0;return!1};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusout"==t.type?"focus":"hover"]=!1),!i.isInStateTrue())return 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()};t.prototype.show=function(){var c=n.Event("show.bs."+this.type),l,p,e,w,h;if(this.hasContent()&&this.enabled){if(this.$element.trigger(c),l=n.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),c.isDefaultPrevented()||!l)return;var u=this,r=this.tip(),a=this.getUID(this.type);this.setContent();r.attr("id",a);this.$element.attr("aria-describedby",a);this.options.animation&&r.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,v=/\s?auto?\s?/i,y=v.test(i);y&&(i=i.replace(v,"")||"top");r.detach().css({top:0,left:0,display:"block"}).addClass(i).data("bs."+this.type,this);this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var f=this.getPosition(),o=r[0].offsetWidth,s=r[0].offsetHeight;y&&(p=i,e=this.getPosition(this.$viewport),i="bottom"==i&&f.bottom+s>e.bottom?"top":"top"==i&&f.top-s<e.top?"bottom":"right"==i&&f.right+o>e.width?"left":"left"==i&&f.left-o<e.left?"right":i,r.removeClass(p).addClass(i));w=this.getCalculatedOffset(i,f,o,s);this.applyPlacement(w,i);h=function(){var n=u.hoverState;u.$element.trigger("shown.bs."+u.type);u.hoverState=null;"out"==n&&u.leave(u)};n.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",h).emulateTransitionEnd(t.TRANSITION_DURATION):h()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top+=o;t.left+=s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;"top"==i&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var c=/top|bottom/.test(i),a=c?2*u.left-l+h:2*u.top-e+f,v=c?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(a,r[0][v],c)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i?"left":"top",50*(1-n/t)+"%").css(i?"top":"left","")};t.prototype.setContent=function(){var n=this.tip(),t=this.getTitle();n.find(".tooltip-inner")[this.options.html?"html":"text"](t);n.removeClass("fade in top bottom left right")};t.prototype.hide=function(i){function f(){"in"!=r.hoverState&&u.detach();r.$element&&r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type);i&&i()}var r=this,u=n(this.$tip),e=n.Event("hide.bs."+this.type);if(this.$element.trigger(e),!e.isDefaultPrevented())return u.removeClass("in"),n.support.transition&&u.hasClass("fade")?u.one("bsTransitionEnd",f).emulateTransitionEnd(t.TRANSITION_DURATION):f(),this.hoverState=null,this};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||"string"!=typeof n.attr("data-original-title"))&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){t=t||this.$element;var r=t[0],u="BODY"==r.tagName,i=r.getBoundingClientRect();null==i.width&&(i=n.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var f=window.SVGElement&&r instanceof window.SVGElement,e=u?{top:0,left:0}:f?null:t.offset(),o={scroll:u?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},s=u?{width:n(window).width(),height:n(window).height()}:null;return n.extend({},i,o,s,e)};t.prototype.getCalculatedOffset=function(n,t,i,r){return"bottom"==n?{top:t.top+t.height,left:t.left+t.width/2-i/2}:"top"==n?{top:t.top-r,left:t.left+t.width/2-i/2}:"left"==n?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.right&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)};t.prototype.getUID=function(n){do n+=~~(1e6*Math.random());while(document.getElementById(n));return n};t.prototype.tip=function(){if(!this.$tip&&(this.$tip=n(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=this;t&&(i=n(t.currentTarget).data("bs."+this.type),i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)));t?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){var n=this;clearTimeout(this.timeout);this.hide(function(){n.$element.off("."+n.type).removeData("bs."+n.type);n.$tip&&n.$tip.detach();n.$tip=null;n.$arrow=null;n.$viewport=null;n.$element=null})};i=n.fn.tooltip;n.fn.tooltip=r;n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=i,this}}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f="object"==typeof i&&i;!r&&/destroy|hide/.test(i)||(r||u.data("bs.popover",r=new t(this,f)),"string"==typeof i&&r[i]())})}var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.3.7";t.DEFAULTS=n.extend({},n.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>'});t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype);t.prototype.constructor=t;t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent();n.find(".popover-title")[this.options.html?"html":"text"](i);n.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof t?"html":"append":"text"](t);n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};i=n.fn.popover;n.fn.popover=r;n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery);+function(n){"use strict";function t(i,r){this.$body=n(document.body);this.$scrollElement=n(n(i).is(document.body)?window:i);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||"")+" .nav li > a";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on("scroll.bs.scrollspy",n.proxy(this.process,this));this.refresh();this.process()}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.scrollspy"),f="object"==typeof i&&i;r||u.data("bs.scrollspy",r=new t(this,f));"string"==typeof i&&r[i]()})}t.VERSION="3.3.7";t.DEFAULTS={offset:10};t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};t.prototype.refresh=function(){var t=this,i="offset",r=0;this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();n.isWindow(this.$scrollElement[0])||(i="position",r=this.$scrollElement.scrollTop());this.$body.find(this.selector).map(function(){var f=n(this),u=f.data("target")||f.attr("href"),t=/^#./.test(u)&&n(u);return t&&t.length&&t.is(":visible")&&[[t[i]().top+r,u]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})};t.prototype.process=function(){var n,i=this.$scrollElement.scrollTop()+this.options.offset,f=this.getScrollHeight(),e=this.options.offset+f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget;if(this.scrollHeight!=f&&this.refresh(),i>=e)return u!=(n=r[r.length-1])&&this.activate(n);if(u&&i<t[0])return this.activeTarget=null,this.clear();for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(void 0===t[n+1]||i<t[n+1])&&this.activate(r[n])};t.prototype.activate=function(t){this.activeTarget=t;this.clear();var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate.bs.scrollspy")};t.prototype.clear=function(){n(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var r=n.fn.scrollspy;n.fn.scrollspy=i;n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=r,this};n(window).on("load.bs.scrollspy.data-api",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery);+function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));"string"==typeof i&&r[i]()})}var t=function(t){this.element=n(t)},u,i;t.VERSION="3.3.7";t.TRANSITION_DURATION=150;t.prototype.show=function(){var t=this.element,f=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),u;if(i||(i=t.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=f.find(".active:last a"),e=n.Event("hide.bs.tab",{relatedTarget:t[0]}),o=n.Event("show.bs.tab",{relatedTarget:r[0]});(r.trigger(e),t.trigger(o),o.isDefaultPrevented()||e.isDefaultPrevented())||(u=n(i),this.activate(t.closest("li"),f),this.activate(u,u.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]});t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}};t.prototype.activate=function(i,r,u){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1);i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0);o?(i[0].offsetWidth,i.addClass("in")):i.removeClass("fade");i.parent(".dropdown-menu").length&&i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);u&&u()}var f=r.find("> .active"),o=u&&n.support.transition&&(f.length&&f.hasClass("fade")||!!r.find("> .fade").length);f.length&&o?f.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e();f.removeClass("in")};u=n.fn.tab;n.fn.tab=r;n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=u,this};i=function(t){t.preventDefault();r.call(n(this),"show")};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery);+function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f="object"==typeof i&&i;r||u.data("bs.affix",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);this.$target=n(this.options.target).on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this));this.$element=n(i);this.affixed=null;this.unpin=null;this.pinnedOffset=null;this.checkPosition()},r;t.VERSION="3.3.7";t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0,target:window};t.prototype.getState=function(n,t,i,r){var u=this.$target.scrollTop(),f=this.$element.offset(),e=this.$target.height();if(null!=i&&"top"==this.affixed)return u<i&&"top";if("bottom"==this.affixed)return null!=i?!(u+this.unpin<=f.top)&&"bottom":!(u+e<=n-r)&&"bottom";var o=null==this.affixed,s=o?u:f.top,h=o?e:t;return null!=i&&u<=i?"top":null!=r&&s+h>=n-r&&"bottom"};t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var n=this.$target.scrollTop(),i=this.$element.offset();return this.pinnedOffset=i.top-n};t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){var i,e,o;if(this.$element.is(":visible")){var s=this.$element.height(),r=this.options.offset,f=r.top,u=r.bottom,h=Math.max(n(document).height(),n(document.body).height());if("object"!=typeof r&&(u=f=r),"function"==typeof f&&(f=r.top(this.$element)),"function"==typeof u&&(u=r.bottom(this.$element)),i=this.getState(h,s,f,u),this.affixed!=i){if(null!=this.unpin&&this.$element.css("top",""),e="affix"+(i?"-"+i:""),o=n.Event(e+".bs.affix"),this.$element.trigger(o),o.isDefaultPrevented())return;this.affixed=i;this.unpin="bottom"==i?this.getPinnedOffset():null;this.$element.removeClass(t.RESET).addClass(e).trigger(e.replace("affix","affixed")+".bs.affix")}"bottom"==i&&this.$element.offset({top:h-s-u})}};r=n.fn.affix;n.fn.affix=i;n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=r,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var r=n(this),t=r.data();t.offset=t.offset||{};null!=t.offsetBottom&&(t.offset.bottom=t.offsetBottom);null!=t.offsetTop&&(t.offset.top=t.offsetTop);i.call(r,t)})})}(jQuery)