11 lines
No EOL
360 KiB
JavaScript
11 lines
No EOL
360 KiB
JavaScript
/*
|
|
* # Fomantic UI - 2.8.8
|
|
* https://github.com/fomantic/Fomantic-UI
|
|
* http://fomantic-ui.com/
|
|
*
|
|
* Copyright 2022 Contributors
|
|
* Released under the MIT license
|
|
* http://opensource.org/licenses/MIT
|
|
*
|
|
*/
|
|
!function(p,h,v,b){p.isFunction=p.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},p.site=p.fn.site=function(e){var s,i=(new Date).getTime(),o=[],r=e,d="string"==typeof r,f=[].slice.call(arguments,1),l=p.isPlainObject(e)?p.extend(!0,{},p.site.settings,e):p.extend({},p.site.settings),a=l.namespace,m=l.error,t="module-"+a,n=p(v),g=this,c=n.data(t),u={initialize:function(){u.instantiate()},instantiate:function(){u.verbose("Storing instance of site",u),c=u,n.data(t,u)},normalize:function(){u.fix.console(),u.fix.requestAnimationFrame()},fix:{console:function(){u.debug("Normalizing window.console"),console!==b&&console.log!==b||(u.verbose("Console not available, normalizing events"),u.disable.console()),void 0!==console.group&&void 0!==console.groupEnd&&void 0!==console.groupCollapsed||(u.verbose("Console group not available, normalizing events"),h.console.group=function(){},h.console.groupEnd=function(){},h.console.groupCollapsed=function(){}),void 0===console.markTimeline&&(u.verbose("Mark timeline not available, normalizing events"),h.console.markTimeline=function(){})},consoleClear:function(){u.debug("Disabling programmatic console clearing"),h.console.clear=function(){}},requestAnimationFrame:function(){u.debug("Normalizing requestAnimationFrame"),h.requestAnimationFrame===b&&(u.debug("RequestAnimationFrame not available, normalizing event"),h.requestAnimationFrame=h.requestAnimationFrame||h.mozRequestAnimationFrame||h.webkitRequestAnimationFrame||h.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(e){return p.fn[e]!==b&&p.fn[e].settings!==b},enabled:{modules:function(e){var n=[];return e=e||l.modules,p.each(e,function(e,t){u.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(e){var n=[];return e=e||l.modules,p.each(e,function(e,t){u.moduleExists(t)||n.push(t)}),n}},change:{setting:function(o,a,e,r){e="string"==typeof e?"all"===e?l.modules:[e]:e||l.modules,r=r===b||r,p.each(e,function(e,t){var n,i=!u.moduleExists(t)||(p.fn[t].settings.namespace||!1);u.moduleExists(t)&&(u.verbose("Changing default setting",o,a,t),p.fn[t].settings[o]=a,r&&i&&0<(n=p(":data(module-"+i+")")).length&&(u.verbose("Modifying existing settings",n),n[t]("setting",o,a)))})},settings:function(i,e,o){e="string"==typeof e?[e]:e||l.modules,o=o===b||o,p.each(e,function(e,t){var n;u.moduleExists(t)&&(u.verbose("Changing default setting",i,t),p.extend(!0,p.fn[t].settings,i),o&&a&&0<(n=p(":data(module-"+a+")")).length&&(u.verbose("Modifying existing settings",n),n[t]("setting",i)))})}},enable:{console:function(){u.console(!0)},debug:function(e,t){e=e||l.modules,u.debug("Enabling debug for modules",e),u.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||l.modules,u.debug("Enabling verbose debug for modules",e),u.change.setting("verbose",!0,e,t)}},disable:{console:function(){u.console(!1)},debug:function(e,t){e=e||l.modules,u.debug("Disabling debug for modules",e),u.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||l.modules,u.debug("Disabling verbose debug for modules",e),u.change.setting("verbose",!1,e,t)}},console:function(e){e?c.cache.console!==b?(u.debug("Restoring console function"),h.console=c.cache.console):u.error(m.console):(u.debug("Disabling console function"),c.cache.console=h.console,h.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}})},destroy:function(){u.verbose("Destroying previous site for",n),n.removeData(t)},cache:{},setting:function(e,t){if(p.isPlainObject(e))p.extend(!0,l,e);else{if(t===b)return l[e];l[e]=t}},internal:function(e,t){if(p.isPlainObject(e))p.extend(!0,u,e);else{if(t===b)return u[e];u[e]=t}},debug:function(){l.debug&&(l.performance?u.performance.log(arguments):(u.debug=Function.prototype.bind.call(console.info,console,l.name+":"),u.debug.apply(console,arguments)))},verbose:function(){l.verbose&&l.debug&&(l.performance?u.performance.log(arguments):(u.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),u.verbose.apply(console,arguments)))},error:function(){u.error=Function.prototype.bind.call(console.error,console,l.name+":"),u.error.apply(console,arguments)},performance:{log:function(e){var t,n;l.performance&&(n=(t=(new Date).getTime())-(i||t),i=t,o.push({Element:g,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout(u.performance.display,500)},display:function(){var e=l.name+":",n=0;i=!1,clearTimeout(u.performance.timer),p.each(o,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",(console.group!==b||console.table!==b)&&0<o.length&&(console.groupCollapsed(e),console.table?console.table(o):p.each(o,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),o=[]}},invoke:function(i,e,t){var o,a,n,r=c;return e=e||f,t=g||t,"string"==typeof i&&r!==b&&(i=i.split(/[\. ]/),o=i.length-1,p.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(p.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==b)return a=r[n],!1;{if(!p.isPlainObject(r[t])||e==o)return r[t]!==b?a=r[t]:u.error(m.method,i),!1;r=r[t]}}})),p.isFunction(a)?n=a.apply(t,e):a!==b&&(n=a),Array.isArray(s)?s.push(n):s!==b?s=[s,n]:n!==b&&(s=n),a}};return d?(c===b&&u.initialize(),u.invoke(r)):(c!==b&&u.destroy(),u.initialize()),s!==b?s:this},p.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","calendar","checkbox","dimmer","dropdown","embed","form","modal","nag","popup","slider","rating","shape","sidebar","state","sticky","tab","toast","transition","visibility","visit"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},p.extend(p.expr[":"],{data:p.expr.createPseudo?p.expr.createPseudo(function(t){return function(e){return!!p.data(e,t)}}):function(e,t,n){return!!p.data(e,n[3])}})}(jQuery,window,document),function(M,I,j,L){"use strict";M.isFunction=M.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},I=void 0!==I&&I.Math==Math?I:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),M.fn.form=function(k){var T,S=M(this),D=S.selector||"",A=(new Date).getTime(),E=[],F=k,P=arguments[1],O="string"==typeof F,R=[].slice.call(arguments,1);return S.each(function(){var n,d,t,e,f,l,m,g,p,i,u,o,a,s,v,c=M(this),b=this,y=[],x=!1,r=!1,C=!1,w=["clean","clean"],h={initialize:function(){h.get.settings(),O?(v===L&&h.instantiate(),h.invoke(F)):(v!==L&&(v.invoke("destroy"),h.refresh()),h.verbose("Initializing form validation",c,f),h.bindEvents(),h.set.defaults(),f.autoCheckRequired&&h.set.autoCheck(),h.instantiate())},instantiate:function(){h.verbose("Storing instance of module",h),v=h,c.data(a,h)},destroy:function(){h.verbose("Destroying previous module",v),h.removeEvents(),c.removeData(a)},refresh:function(){h.verbose("Refreshing selector cache"),n=c.find(g.field),d=c.find(g.group),t=c.find(g.message),c.find(g.prompt),e=c.find(g.submit),c.find(g.clear),c.find(g.reset)},submit:function(){h.verbose("Submitting form",c),r=!0,c.submit()},attachEvents:function(e,t){t=t||"submit",M(e).on("click"+s,function(e){h[t](),e.preventDefault()})},bindEvents:function(){h.verbose("Attaching form events"),c.on("submit"+s,h.validate.form).on("blur"+s,g.field,h.event.field.blur).on("click"+s,g.submit,h.submit).on("click"+s,g.reset,h.reset).on("click"+s,g.clear,h.clear),f.keyboardShortcuts&&c.on("keydown"+s,g.field,h.event.field.keydown),n.each(function(e,t){var t=M(t),n=t.prop("type"),n=h.get.changeEvent(n,t);t.on(n+s,h.event.field.change)}),f.preventLeaving&&M(I).on("beforeunload"+s,h.event.beforeUnload),n.on("change click keyup keydown blur",function(e){h.determine.isDirty()}),c.on("dirty"+s,function(e){f.onDirty.call()}),c.on("clean"+s,function(e){f.onClean.call()})},clear:function(){n.each(function(c,e){var e=M(e),t=e.parent(),n=e.closest(d),i=n.find(g.prompt),o=e.closest(g.uiCalendar),a=e.data(m.defaultValue)||"",r=t.is(g.uiCheckbox),s=t.is(g.uiDropdown)&&h.can.useElement("dropdown"),l=0<o.length&&h.can.useElement("calendar");n.hasClass(p.error)&&(h.verbose("Resetting error on field",n),n.removeClass(p.error),i.remove()),s?(h.verbose("Resetting dropdown value",t,a),t.dropdown("clear",!0)):r?e.prop("checked",!1):l?o.calendar("clear"):(h.verbose("Resetting field value",e,a),e.val(""))}),h.remove.states()},reset:function(){n.each(function(u,e){var e=M(e),t=e.parent(),n=e.closest(d),i=e.closest(g.uiCalendar),o=n.find(g.prompt),a=e.data(m.defaultValue),r=t.is(g.uiCheckbox),s=t.is(g.uiDropdown)&&h.can.useElement("dropdown"),l=0<i.length&&h.can.useElement("calendar"),c=n.hasClass(p.error);a!==L&&(c&&(h.verbose("Resetting error on field",n),n.removeClass(p.error),o.remove()),s?(h.verbose("Resetting dropdown value",t,a),t.dropdown("restore defaults",!0)):r?(h.verbose("Resetting checkbox value",t,a),e.prop("checked",a)):l?i.calendar("set date",a):(h.verbose("Resetting field value",e,a),e.val(a)))}),h.remove.states()},determine:{isValid:function(){var n=!0;return M.each(l,function(e,t){h.validate.field(t,e,!0)||(n=!1)}),n},isDirty:function(e){var i=!1;n.each(function(e,t){var t=M(t),n=0<t.filter(g.checkbox).length?h.is.checkboxDirty(t):h.is.fieldDirty(t);t.data(f.metadata.isDirty,n),i|=n}),i?h.set.dirty():h.set.clean()}},is:{bracketedRule:function(e){return e.type&&e.type.match(f.regExp.bracket)},shorthandRules:function(e){return"string"==typeof e||Array.isArray(e)},empty:function(e){return!e||0===e.length||(e.is(g.checkbox)?!e.is(":checked"):h.is.blank(e))},blank:function(e){return""===String(e.val()).trim()},valid:function(e,n){var i=!0;return e?(h.verbose("Checking if field is valid",e),h.validate.field(l[e],e,!!n)):(h.verbose("Checking if form is valid"),M.each(l,function(e,t){h.is.valid(e,n)||(i=!1)}),i)},dirty:function(){return C},clean:function(){return!C},fieldDirty:function(e){var t=e.data(m.defaultValue),e=(null==t?t="":Array.isArray(t)&&(t=t.toString()),e.val()),n=(null==e?e="":Array.isArray(e)&&(e=e.toString()),/^(true|false)$/i);return n.test(t)&&n.test(e)?!new RegExp("^"+t+"$","i").test(e):e!==t},checkboxDirty:function(e){return e.data(m.defaultValue)!==e.is(":checked")},justDirty:function(){return"dirty"===w[0]},justClean:function(){return"clean"===w[0]}},removeEvents:function(){c.off(s),n.off(s),e.off(s),n.off(s)},event:{field:{keydown:function(e){var t=M(this),n=e.which,i=t.is(g.input),o=t.is(g.checkbox),a=0<t.closest(g.uiDropdown).length,r=13;n==27&&(h.verbose("Escape key pressed blurring field"),t[0].blur()),e.ctrlKey||n!=r||!i||a||o||(x||(t.one("keyup"+s,h.event.field.keyup),h.submit(),h.debug("Enter pressed on input submitting form")),x=!0)},keyup:function(){x=!1},blur:function(e){var t=M(this),n=t.closest(d),i=h.get.validation(t);i&&("blur"==f.on||n.hasClass(p.error)&&f.revalidate)&&(h.debug("Revalidating field",t,i),h.validate.field(i),f.inline||h.validate.form(!1,!0))},change:function(e){var t=M(this),n=t.closest(d),i=h.get.validation(t);i&&("change"==f.on||n.hasClass(p.error)&&f.revalidate)&&(clearTimeout(h.timer),h.timer=setTimeout(function(){h.debug("Revalidating field",t,i),h.validate.field(i),f.inline||h.validate.form(!1,!0)},f.delay))}},beforeUnload:function(e){if(h.is.dirty()&&!r)return(e=e||I.event)&&(e.returnValue=f.text.leavingMessage),f.text.leavingMessage}},get:{ancillaryValue:function(e){return!(!e.type||!e.value&&!h.is.bracketedRule(e))&&(e.value!==L?e.value:e.type.match(f.regExp.bracket)[1]+"")},ruleName:function(e){return h.is.bracketedRule(e)?e.type.replace(e.type.match(f.regExp.bracket)[0],""):e.type},changeEvent:function(e,t){return"checkbox"==e||"radio"==e||"hidden"==e||t.is("select")?"change":h.get.inputEvent()},inputEvent:function(){return j.createElement("input").oninput!==L?"input":j.createElement("input").onpropertychange!==L?"propertychange":"keyup"},fieldsFromShorthand:function(e){var i={};return M.each(e,function(n,e){Array.isArray(e)||"object"!=typeof e?("string"==typeof e&&(e=[e]),i[n]={rules:[]},M.each(e,function(e,t){i[n].rules.push({type:t})})):i[n]=e}),i},prompt:function(e,t){var n,i=h.get.ruleName(e),o=h.get.ancillaryValue(e),a=h.get.field(t.identifier),r=a.val(),r=M.isFunction(e.prompt)?e.prompt(r):e.prompt||f.prompt[i]||f.text.unspecifiedRule,s=-1!==r.search("{value}"),l=-1!==r.search("{name}");return o&&0<=o.indexOf("..")&&(n=o.split("..",2),e.prompt||(r+=(""===n[0]?f.prompt.maxValue.replace(/\{ruleValue\}/g,"{max}"):""===n[1]?f.prompt.minValue.replace(/\{ruleValue\}/g,"{min}"):f.prompt.range).replace(/\{name\}/g," "+f.text.and)),r=(r=r.replace(/\{min\}/g,n[0])).replace(/\{max\}/g,n[1])),s&&(r=r.replace(/\{value\}/g,a.val())),l&&(s=1==(n=a.closest(g.group).find("label").eq(0)).length?n.text():a.prop("placeholder")||f.text.unspecifiedField,r=r.replace(/\{name\}/g,s)),r=(r=r.replace(/\{identifier\}/g,t.identifier)).replace(/\{ruleValue\}/g,o),e.prompt||h.verbose("Using default validation prompt for type",r,i),r},settings:function(){var e;M.isPlainObject(k)?0<(e=Object.keys(k)).length&&(k[e[0]].identifier!==L&&k[e[0]].rules!==L)?(f=M.extend(!0,{},M.fn.form.settings,P),l=M.extend({},M.fn.form.settings.defaults,k),h.error(f.error.oldSyntax,b),h.verbose("Extending settings from legacy parameters",l,f)):(k.fields&&(k.fields=h.get.fieldsFromShorthand(k.fields)),f=M.extend(!0,{},M.fn.form.settings,k),l=M.extend({},M.fn.form.settings.defaults,f.fields),h.verbose("Extending settings",l,f)):(f=M.fn.form.settings,l=M.fn.form.settings.defaults,h.verbose("Using default form validation",l,f)),o=f.namespace,m=f.metadata,g=f.selector,p=f.className,i=f.regExp,u=f.error,a="module-"+o,s="."+o,((v=c.data(a))||h).refresh()},field:function(e){var t;return h.verbose("Finding field with identifier",e),e=h.escape.string(e),0<(t=n.filter("#"+e)).length||0<(t=n.filter('[name="'+e+'"]')).length||0<(t=n.filter('[name="'+e+'[]"]')).length||0<(t=n.filter("[data-"+m.validate+'="'+e+'"]')).length?t:M("<input/>")},fields:function(e){var n=M();return M.each(e,function(e,t){n=n.add(h.get.field(t))}),n},validation:function(i){var o,a;return!!l&&(M.each(l,function(e,n){a=n.identifier||e,M.each(h.get.field(a),function(e,t){if(t==i[0])return n.identifier=a,o=n,!1})}),o||!1)},value:function(e){var t=[];return t.push(e),h.get.values.call(b,t)[e]},values:function(e){var e=Array.isArray(e)?h.get.fields(e):n,d={};return e.each(function(u,e){var e=M(e),t=e.closest(g.uiCalendar),n=e.prop("name"),i=e.val(),o=e.is(g.checkbox),a=e.is(g.radio),r=-1!==n.indexOf("[]"),s=0<t.length&&h.can.useElement("calendar"),e=!!o&&e.is(":checked");if(n)if(r)n=n.replace("[]",""),d[n]||(d[n]=[]),o?e?d[n].push(i||!0):d[n].push(!1):d[n].push(i);else if(a)d[n]!==L&&!1!==d[n]||(d[n]=!!e&&(i||!0));else if(o)d[n]=!!e&&(i||!0);else if(s){var l=t.calendar("get date");if(null!==l){if("date"==f.dateHandling)d[n]=l;else if("input"==f.dateHandling)d[n]=t.calendar("get input date");else if("formatter"==f.dateHandling){var c=t.calendar("setting","type");switch(c){case"date":d[n]=f.formatter.date(l);break;case"datetime":d[n]=f.formatter.datetime(l);break;case"time":d[n]=f.formatter.time(l);break;case"month":d[n]=f.formatter.month(l);break;case"year":d[n]=f.formatter.year(l);break;default:h.debug("Wrong calendar mode",t,c),d[n]=""}}}else d[n]=""}else d[n]=i}),d},dirtyFields:function(){return n.filter(function(e,t){return M(t).data(m.isDirty)})}},has:{field:function(e){return h.verbose("Checking for existence of a field with identifier",e),"string"!=typeof(e=h.escape.string(e))&&h.error(u.identifier,e),0<n.filter("#"+e).length||(0<n.filter('[name="'+e+'"]').length||0<n.filter("[data-"+m.validate+'="'+e+'"]').length)}},can:{useElement:function(e){return M.fn[e]!==L||(h.error(u.noElement.replace("{element}",e)),!1)}},escape:{string:function(e){return(e=String(e)).replace(i.escape,"\\$&")}},add:{rule:function(e,t){h.add.field(e,t)},field:function(n,e){l[n]!==L&&l[n].rules!==L||(l[n]={rules:[]});var i={rules:[]};h.is.shorthandRules(e)?(e=Array.isArray(e)?e:[e],M.each(e,function(e,t){i.rules.push({type:t})})):i.rules=e.rules,M.each(i.rules,function(e,t){0==M.grep(l[n].rules,function(e){return e.type==t.type}).length&&l[n].rules.push(t)}),h.debug("Adding rules",i.rules,l)},fields:function(e){l=M.extend({},l,h.get.fieldsFromShorthand(e))},prompt:function(e,t,n){var i=h.get.field(e).closest(d),o=i.children(g.prompt),a=0!==o.length;t="string"==typeof t?[t]:t,h.verbose("Adding field error state",e),n||i.addClass(p.error),f.inline&&(a||(o=f.templates.prompt(t,p.label)).appendTo(i),o.html(t[0]),a?h.verbose("Inline errors are disabled, no inline error added",e):f.transition&&h.can.useElement("transition")&&c.transition("is supported")?(h.verbose("Displaying error with css transition",f.transition),o.transition(f.transition+" in",f.duration)):(h.verbose("Displaying error with fallback javascript animation"),o.fadeIn(f.duration)))},errors:function(e){h.debug("Adding form error messages",e),h.set.error(),t.html(f.templates.error(e))}},remove:{errors:function(){h.debug("Removing form error messages"),t.empty()},states:function(){c.removeClass(p.error).removeClass(p.success),f.inline||h.remove.errors(),h.determine.isDirty()},rule:function(n,e){var i=Array.isArray(e)?e:[e];if(l[n]!==L&&Array.isArray(l[n].rules))return e===L?(h.debug("Removed all rules"),void(l[n].rules=[])):void M.each(l[n].rules,function(e,t){t&&-1!==i.indexOf(t.type)&&(h.debug("Removed rule",t.type),l[n].rules.splice(e,1))})},field:function(e){e=Array.isArray(e)?e:[e];M.each(e,function(e,t){h.remove.rule(t)})},rules:function(e,n){Array.isArray(e)?M.each(e,function(e,t){h.remove.rule(t,n)}):h.remove.rule(e,n)},fields:function(e){h.remove.field(e)},prompt:function(e){var t=h.get.field(e).closest(d),n=t.children(g.prompt);t.removeClass(p.error),f.inline&&n.is(":visible")&&(h.verbose("Removing prompt for field",e),f.transition&&h.can.useElement("transition")&&c.transition("is supported")?n.transition(f.transition+" out",f.duration,function(){n.remove()}):n.fadeOut(f.duration,function(){n.remove()}))}},set:{success:function(){c.removeClass(p.error).addClass(p.success)},defaults:function(){n.each(function(e,t){var t=M(t),n=t.parent(),i=0<t.filter(g.checkbox).length,o=n.is(g.uiDropdown)&&h.can.useElement("dropdown"),a=t.closest(g.uiCalendar),r=0<a.length&&h.can.useElement("calendar"),i=i?t.is(":checked"):t.val();o?n.dropdown("save defaults"):r&&a.calendar("refresh"),t.data(m.defaultValue,i),t.data(m.isDirty,!1)})},error:function(){c.removeClass(p.success).addClass(p.error)},value:function(e,t){var n={};return n[e]=t,h.set.values.call(b,n)},values:function(e){M.isEmptyObject(e)||M.each(e,function(e,t){var n,i=h.get.field(e),o=i.parent(),e=i.closest(g.uiCalendar),a=Array.isArray(t),r=o.is(g.uiCheckbox)&&h.can.useElement("checkbox"),s=o.is(g.uiDropdown)&&h.can.useElement("dropdown"),l=i.is(g.radio)&&r,c=0<e.length&&h.can.useElement("calendar");0<i.length&&(a&&r?(h.verbose("Selecting multiple",t,i),o.checkbox("uncheck"),M.each(t,function(e,t){n=i.filter('[value="'+t+'"]'),o=n.parent(),0<n.length&&o.checkbox("check")})):l?(h.verbose("Selecting radio value",t,i),i.filter('[value="'+t+'"]').parent(g.uiCheckbox).checkbox("check")):r?(h.verbose("Setting checkbox value",t,o),!0===t||1===t?o.checkbox("check"):o.checkbox("uncheck")):s?(h.verbose("Setting dropdown value",t,o),o.dropdown("set selected",t)):c?e.calendar("set date",t):(h.verbose("Setting field value",t,i),i.val(t)))})},dirty:function(){h.verbose("Setting state dirty"),C=!0,w[0]=w[1],w[1]="dirty",h.is.justClean()&&c.trigger("dirty")},clean:function(){h.verbose("Setting state clean"),C=!1,w[0]=w[1],w[1]="clean",h.is.justDirty()&&c.trigger("clean")},asClean:function(){h.set.defaults(),h.set.clean()},asDirty:function(){h.set.defaults(),h.set.dirty()},autoCheck:function(){h.debug("Enabling auto check on required fields"),n.each(function(e,t){var n=M(t),t=M(t).closest(d),i=0<n.filter(g.checkbox).length,o=n.prop("required")||t.hasClass(p.required)||t.parent().hasClass(p.required),t=n.is(":disabled")||t.hasClass(p.disabled)||t.parent().hasClass(p.disabled),a=h.get.validation(n),r=!!a&&0!==M.grep(a.rules,function(e){return"empty"==e.type}),a=a.identifier||n.attr("id")||n.attr("name")||n.data(m.validate);!o||t||r||a===L||(i?(h.verbose("Adding 'checked' rule on field",a),h.add.rule(a,"checked")):(h.verbose("Adding 'empty' rule on field",a),h.add.rule(a,"empty")))})},optional:function(n,i){i=!1!==i,M.each(l,function(e,t){n!=e&&n!=t.identifier||(t.optional=i)})}},validate:{form:function(e,t){var n,i=h.get.values();if(x)return!1;if(y=[],h.determine.isValid()){if(h.debug("Form has no validation errors, submitting"),h.set.success(),f.inline||h.remove.errors(),!0!==t)return f.onSuccess.call(b,e,i)}else if(h.debug("Form has errors"),r=!1,h.set.error(),f.inline||h.add.errors(y),e&&c.data("moduleApi")!==L&&e.stopImmediatePropagation(),f.errorFocus&&(e=!0,"string"==typeof f.errorFocus?(e=(n=M(f.errorFocus)).is("[tabindex]"))||n.attr("tabindex",-1):n=d.filter("."+p.error).first().find(g.field),n.focus(),e||n.removeAttr("tabindex")),!0!==t)return f.onFailure.call(b,y,i)},field:function(i,e,o){o=o===L||o,"string"==typeof i&&(h.verbose("Validating field",i),i=l[e=i]);var a=i.identifier||e,e=h.get.field(a),t=!!i.depends&&h.get.field(i.depends),r=!0,s=[];return i.identifier||(h.debug("Using field name as identifier",a),i.identifier=a),!e.filter(":not(:disabled)").length?h.debug("Field is disabled. Skipping",a):i.optional&&h.is.blank(e)?h.debug("Field is optional and blank. Skipping",a):i.depends&&h.is.empty(t)?h.debug("Field depends on another value that is not present or empty. Skipping",t):i.rules!==L&&(o&&e.closest(d).removeClass(p.error),M.each(i.rules,function(e,t){var n;!h.has.field(a)||0<(n=h.validate.rule(i,t,!0)||[]).length&&(h.debug("Field is invalid",a,t.type),s.push(h.get.prompt(t,i)),r=!1,o&&M(n).closest(d).addClass(p.error))})),r?(o&&(h.remove.prompt(a,s),f.onValid.call(e)),!0):(o&&(y=y.concat(s),h.add.prompt(a,s,!0),f.onInvalid.call(e,s)),!1)},rule:function(e,n,t){function i(e){var t=(t=(l?M(e).filter(":checked"):M(e)).val())===L||""===t||null===t?"":f.shouldTrim&&!1!==n.shouldTrim||n.shouldTrim?String(t+"").trim():String(t+"");return r.call(e,t,o,c)}var e=h.get.field(e.identifier),o=h.get.ancillaryValue(n),a=h.get.ruleName(n),r=f.rules[a],s=[],l=e.is(g.checkbox);if(M.isFunction(r))return l?i(e)||(s=e):M.each(e,function(e,t){i(t)||s.push(t)}),t?s:!(0<s.length);h.error(u.noRule,a)}},setting:function(e,t){if(M.isPlainObject(e))M.extend(!0,f,e);else{if(t===L)return f[e];f[e]=t}},internal:function(e,t){if(M.isPlainObject(e))M.extend(!0,h,e);else{if(t===L)return h[e];h[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?h.performance.log(arguments):(h.debug=Function.prototype.bind.call(console.info,console,f.name+":"),h.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?h.performance.log(arguments):(h.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),h.verbose.apply(console,arguments)))},error:function(){f.silent||(h.error=Function.prototype.bind.call(console.error,console,f.name+":"),h.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-(A||t),A=t,E.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:b,"Execution Time":n})),clearTimeout(h.performance.timer),h.performance.timer=setTimeout(h.performance.display,500)},display:function(){var e=f.name+":",n=0;A=!1,clearTimeout(h.performance.timer),M.each(E,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",D&&(e+=" '"+D+"'"),1<S.length&&(e+=" ("+S.length+")"),(console.group!==L||console.table!==L)&&0<E.length&&(console.groupCollapsed(e),console.table?console.table(E):M.each(E,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),E=[]}},invoke:function(i,e,t){var o,a,n,r=v;return e=e||R,t=b||t,"string"==typeof i&&r!==L&&(i=i.split(/[\. ]/),o=i.length-1,M.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(M.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==L)return a=r[n],!1;{if(!M.isPlainObject(r[t])||e==o)return r[t]!==L&&(a=r[t]),!1;r=r[t]}}})),M.isFunction(a)?n=a.apply(t,e):a!==L&&(n=a),Array.isArray(T)?T.push(n):T!==L?T=[T,n]:n!==L&&(T=n),a}};h.initialize()}),T!==L?T:this},M.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!1,performance:!0,fields:!1,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,shouldTrim:!0,transition:"scale",duration:200,autoCheckRequired:!1,preventLeaving:!1,errorFocus:!1,dateHandling:"date",onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},onDirty:function(){},onClean:function(){},metadata:{defaultValue:"default",validate:"validate",isDirty:"isDirty"},regExp:{htmlID:/^[a-zA-Z][\w:.-]*$/g,bracket:/\[(.*)\]/i,decimal:/^\d+\.?\d*$/,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|:,=@]/g,flags:/^\/(.*)\/(.*)?/,integer:/^\-?\d+$/,number:/^\-?\d*(\.\d+)?$/,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/i},text:{and:"and",unspecifiedRule:"Please enter a valid value",unspecifiedField:"This field",leavingMessage:"There are unsaved changes on this page which will be discarded if you continue."},prompt:{range:"{name} must be in a range from {min} to {max}",maxValue:"{name} must have a maximum value of {ruleValue}",minValue:"{name} must have a minimum value of {ruleValue}",empty:"{name} must have a value",checked:"{name} must be checked",email:"{name} must be a valid e-mail",url:"{name} must be a valid url",regExp:"{name} is not formatted correctly",integer:"{name} must be an integer",decimal:"{name} must be a decimal number",number:"{name} must be set to a number",is:'{name} must be "{ruleValue}"',isExactly:'{name} must be exactly "{ruleValue}"',not:'{name} cannot be set to "{ruleValue}"',notExactly:'{name} cannot be set to exactly "{ruleValue}"',contain:'{name} must contain "{ruleValue}"',containExactly:'{name} must contain exactly "{ruleValue}"',doesntContain:'{name} cannot contain "{ruleValue}"',doesntContainExactly:'{name} cannot contain exactly "{ruleValue}"',minLength:"{name} must be at least {ruleValue} characters",length:"{name} must be at least {ruleValue} characters",exactLength:"{name} must be exactly {ruleValue} characters",maxLength:"{name} cannot be longer than {ruleValue} characters",match:"{name} must match {ruleValue} field",different:"{name} must have a different value than {ruleValue} field",creditCard:"{name} must be a valid credit card number",minCount:"{name} must have at least {ruleValue} choices",exactCount:"{name} must have exactly {ruleValue} choices",maxCount:"{name} must have {ruleValue} or less choices"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:'input:not(.search):not([type="file"]), textarea, select',group:".field",input:'input:not([type="file"])',message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:'.reset:not([type="reset"])',submit:'.submit:not([type="submit"])',uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown",uiCalendar:".ui.calendar"},className:{error:"error",label:"ui basic red pointing prompt label",pressed:"down",success:"success",required:"required",disabled:"disabled"},error:{identifier:"You must specify a string identifier for each field",method:"The method you called is not defined.",noRule:"There is no rule matching the one you specified",oldSyntax:"Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.",noElement:"This module requires ui {element}"},templates:{error:function(e){var n='<ul class="list">';return M.each(e,function(e,t){n+="<li>"+t+"</li>"}),M(n+="</ul>")},prompt:function(e,t){return M("<div/>").addClass(t).html(e[0])}},formatter:{date:function(e){return Intl.DateTimeFormat("en-GB").format(e)},datetime:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},time:function(e){return Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},month:function(e){return Intl.DateTimeFormat("en-GB",{month:"2-digit",year:"numeric"}).format(e)},year:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric"}).format(e)}},rules:{empty:function(e){return!(e===L||""===e||Array.isArray(e)&&0===e.length)},checked:function(){return 0<M(this).filter(":checked").length},email:function(e){return M.fn.form.settings.regExp.email.test(e)},url:function(e){return M.fn.form.settings.regExp.url.test(e)},regExp:function(e,t){if(t instanceof RegExp)return e.match(t);var n,i=t.match(M.fn.form.settings.regExp.flags);return i&&(t=2<=i.length?i[1]:t,n=3<=i.length?i[2]:""),e.match(new RegExp(t,n))},minValue:function(e,t){return M.fn.form.settings.rules.range(e,t+"..","number")},maxValue:function(e,t){return M.fn.form.settings.rules.range(e,".."+t,"number")},integer:function(e,t){return M.fn.form.settings.rules.range(e,t,"integer")},range:function(e,t,n){var i,o;return(n="string"==typeof n?M.fn.form.settings.regExp[n]:n)instanceof RegExp||(n=M.fn.form.settings.regExp.integer),t&&-1===["",".."].indexOf(t)&&(-1==t.indexOf("..")?n.test(t)&&(i=o=+t):(t=t.split("..",2),n.test(t[0])&&(i=+t[0]),n.test(t[1])&&(o=+t[1]))),n.test(e)&&(i===L||i<=e)&&(o===L||e<=o)},decimal:function(e,t){return M.fn.form.settings.rules.range(e,t,"decimal")},number:function(e,t){return M.fn.form.settings.rules.range(e,t,"number")},is:function(e,t){return t="string"==typeof t?t.toLowerCase():t,(e="string"==typeof e?e.toLowerCase():e)==t},isExactly:function(e,t){return e==t},not:function(e,t){return(e="string"==typeof e?e.toLowerCase():e)!=(t="string"==typeof t?t.toLowerCase():t)},notExactly:function(e,t){return e!=t},contains:function(e,t){return t=t.replace(M.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t,"i"))},containsExactly:function(e,t){return t=t.replace(M.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t))},doesntContain:function(e,t){return t=t.replace(M.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t,"i"))},doesntContainExactly:function(e,t){return t=t.replace(M.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t))},minLength:function(e,t){return e!==L&&e.length>=t},length:function(e,t){return e!==L&&e.length>=t},exactLength:function(e,t){return e!==L&&e.length==t},maxLength:function(e,t){return e!==L&&e.length<=t},match:function(e,t,n){var i,o;return 0<(o=n.find('[data-validate="'+t+'"]')).length||0<(o=n.find("#"+t)).length||0<(o=n.find('[name="'+t+'"]')).length?i=o.val():0<(o=n.find('[name="'+t+'[]"]')).length&&(i=o),i!==L&&e.toString()==i.toString()},different:function(e,t,n){var i,o;return 0<(o=n.find('[data-validate="'+t+'"]')).length||0<(o=n.find("#"+t)).length||0<(o=n.find('[name="'+t+'"]')).length?i=o.val():0<(o=n.find('[name="'+t+'[]"]')).length&&(i=o),i!==L&&e.toString()!==i.toString()},creditCard:function(n,e){var i,o,a={visa:{pattern:/^4/,length:[16]},amex:{pattern:/^3[47]/,length:[15]},mastercard:{pattern:/^5[1-5]/,length:[16]},discover:{pattern:/^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,length:[16]},unionPay:{pattern:/^(62|88)/,length:[16,17,18,19]},jcb:{pattern:/^35(2[89]|[3-8][0-9])/,length:[16]},maestro:{pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,length:[12,13,14,15,16,17,18,19]},dinersClub:{pattern:/^(30[0-5]|^36)/,length:[14]},laser:{pattern:/^(6304|670[69]|6771)/,length:[16,17,18,19]},visaElectron:{pattern:/^(4026|417500|4508|4844|491(3|7))/,length:[16]}},r=!1,e="string"==typeof e&&e.split(",");if("string"==typeof n&&0!==n.length){if(n=n.replace(/[\s\-]/g,""),e&&(M.each(e,function(e,t){(o=a[t])&&(i={length:-1!==M.inArray(n.length,o.length),pattern:-1!==n.search(o.pattern)}).length&&i.pattern&&(r=!0)}),!r))return!1;if((e={number:-1!==M.inArray(n.length,a.unionPay.length),pattern:-1!==n.search(a.unionPay.pattern)}).number&&e.pattern)return!0;for(var t=n.length,s=0,l=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],c=0;t--;)c+=l[s][parseInt(n.charAt(t),10)],s^=1;return c%10==0&&0<c}},minCount:function(e,t){return 0==t||(1==t?""!==e:e.split(",").length>=t)},exactCount:function(e,t){return 0==t?""===e:1==t?""!==e&&-1===e.search(","):e.split(",").length==t},maxCount:function(e,t){return 0!=t&&(1==t?-1===e.search(","):e.split(",").length<=t)}}}}(jQuery,window,document),function(k,T,S){"use strict";k.isFunction=k.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},T=void 0!==T&&T.Math==Math?T:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),k.fn.accordion=function(p){var h,v=k(this),b=(new Date).getTime(),y=[],x=p,C="string"==typeof x,w=[].slice.call(arguments,1);return v.each(function(){var t,a=k.isPlainObject(p)?k.extend(!0,{},k.fn.accordion.settings,p):k.extend({},k.fn.accordion.settings),r=a.className,n=a.namespace,s=a.selector,g=a.error,i="."+n,e="module-"+n,o=v.selector||"",l=k(this),c=l.find(s.title),u=l.find(s.content),d=this,f=l.data(e),m={initialize:function(){m.debug("Initializing",l),m.bind.events(),a.observeChanges&&m.observeChanges(),m.instantiate()},instantiate:function(){f=m,l.data(e,m)},destroy:function(){m.debug("Destroying previous instance",l),l.off(i).removeData(e)},refresh:function(){c=l.find(s.title),u=l.find(s.content)},observeChanges:function(){"MutationObserver"in T&&((t=new MutationObserver(function(e){m.debug("DOM tree modified, updating selector cache"),m.refresh()})).observe(d,{childList:!0,subtree:!0}),m.debug("Setting up mutation observer",t))},bind:{events:function(){m.debug("Binding delegated events"),l.on(a.on+i,s.trigger,m.event.click)}},event:{click:function(){m.toggle.call(this)}},toggle:function(e){var e=e!==S?"number"==typeof e?c.eq(e):k(e).closest(s.title):k(this).closest(s.title),t=e.next(u),n=t.hasClass(r.animating),t=t.hasClass(r.active),i=t&&!n,t=!t&&n;m.debug("Toggling visibility of content",e),i||t?a.collapsible?m.close.call(e):m.debug("Cannot close accordion content collapsing is disabled"):m.open.call(e)},open:function(e){var e=e!==S?"number"==typeof e?c.eq(e):k(e).closest(s.title):k(this).closest(s.title),t=e.next(u),n=t.hasClass(r.animating);t.hasClass(r.active)||n?m.debug("Accordion already open, skipping",t):(m.debug("Opening accordion content",e),a.onOpening.call(t),a.onChanging.call(t),a.exclusive&&m.closeOthers.call(e),e.addClass(r.active),t.stop(!0,!0).addClass(r.animating),a.animateChildren&&(k.fn.transition!==S&&l.transition("is supported")?t.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:a.debug,verbose:a.verbose,duration:a.duration,skipInlineHidden:!0,onComplete:function(){t.children().removeClass(r.transition)}}):t.children().stop(!0,!0).animate({opacity:1},a.duration,m.resetOpacity)),t.slideDown(a.duration,a.easing,function(){t.removeClass(r.animating).addClass(r.active),m.reset.display.call(this),a.onOpen.call(this),a.onChange.call(this)}))},close:function(e){var e=e!==S?"number"==typeof e?c.eq(e):k(e).closest(s.title):k(this).closest(s.title),t=e.next(u),n=t.hasClass(r.animating),i=t.hasClass(r.active);!i&&!(!i&&n)||i&&n||(m.debug("Closing accordion content",t),a.onClosing.call(t),a.onChanging.call(t),e.removeClass(r.active),t.stop(!0,!0).addClass(r.animating),a.animateChildren&&(k.fn.transition!==S&&l.transition("is supported")?t.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:a.debug,verbose:a.verbose,duration:a.duration,skipInlineHidden:!0}):t.children().stop(!0,!0).animate({opacity:0},a.duration,m.resetOpacity)),t.slideUp(a.duration,a.easing,function(){t.removeClass(r.animating).removeClass(r.active),m.reset.display.call(this),a.onClose.call(this),a.onChange.call(this)}))},closeOthers:function(e){var t,e=e!==S?c.eq(e):k(this).closest(s.title),n=e.parents(s.content).prev(s.title),e=e.closest(s.accordion),i=s.title+"."+r.active+":visible",o=s.content+"."+r.active+":visible",o=a.closeNested?(t=e.find(i).not(n)).next(u):(t=e.find(i).not(n),e=e.find(o).find(i).not(n),(t=t.not(e)).next(u));0<t.length&&(m.debug("Exclusive enabled, closing other content",t),t.removeClass(r.active),o.removeClass(r.animating).stop(!0,!0),a.animateChildren&&(k.fn.transition!==S&&l.transition("is supported")?o.children().transition({animation:"fade out",useFailSafe:!0,debug:a.debug,verbose:a.verbose,duration:a.duration,skipInlineHidden:!0}):o.children().stop(!0,!0).animate({opacity:0},a.duration,m.resetOpacity)),o.slideUp(a.duration,a.easing,function(){k(this).removeClass(r.active),m.reset.display.call(this)}))},reset:{display:function(){m.verbose("Removing inline display from element",this),k(this).css("display",""),""===k(this).attr("style")&&k(this).attr("style","").removeAttr("style")},opacity:function(){m.verbose("Removing inline opacity from element",this),k(this).css("opacity",""),""===k(this).attr("style")&&k(this).attr("style","").removeAttr("style")}},setting:function(e,t){if(m.debug("Changing setting",e,t),k.isPlainObject(e))k.extend(!0,a,e);else{if(t===S)return a[e];k.isPlainObject(a[e])?k.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(m.debug("Changing internal",e,t),t===S)return m[e];k.isPlainObject(e)?k.extend(!0,m,e):m[e]=t},debug:function(){!a.silent&&a.debug&&(a.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,a.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),m.verbose.apply(console,arguments)))},error:function(){a.silent||(m.error=Function.prototype.bind.call(console.error,console,a.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,n;a.performance&&(n=(t=(new Date).getTime())-(b||t),b=t,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var e=a.name+":",n=0;b=!1,clearTimeout(m.performance.timer),k.each(y,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",o&&(e+=" '"+o+"'"),(console.group!==S||console.table!==S)&&0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):k.each(y,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(i,e,t){var o,a,n,r=f;return e=e||w,t=d||t,"string"==typeof i&&r!==S&&(i=i.split(/[\. ]/),o=i.length-1,k.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(k.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==S)return a=r[n],!1;{if(!k.isPlainObject(r[t])||e==o)return r[t]!==S?a=r[t]:m.error(g.method,i),!1;r=r[t]}}})),k.isFunction(a)?n=a.apply(t,e):a!==S&&(n=a),Array.isArray(h)?h.push(n):h!==S?h=[h,n]:n!==S&&(h=n),a}};C?(f===S&&m.initialize(),m.invoke(x)):(f!==S&&f.invoke("destroy"),m.initialize())}),h!==S?h:this},k.fn.accordion.settings={name:"Accordion",namespace:"accordion",silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",observeChanges:!0,exclusive:!0,collapsible:!0,closeNested:!1,animateChildren:!0,duration:350,easing:"easeOutQuad",onOpening:function(){},onClosing:function(){},onChanging:function(){},onOpen:function(){},onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active",animating:"animating",transition:"transition"},selector:{accordion:".accordion",title:".title",trigger:".title",content:".content"}},k.extend(k.easing,{easeOutQuad:function(e,t,n,i,o){return-i*(t/=o)*(t-2)+n}})}(jQuery,window,void document),function(oe,S,D,ae){"use strict";oe.isFunction=oe.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},S=void 0!==S&&S.Math==Math?S:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),oe.fn.calendar=function(h){var v,e=oe(this),b=e.selector||"",y=(new Date).getTime(),x=[],C=h,w="string"==typeof C,k=[].slice.call(arguments,1),T={5:{row:4,column:3},10:{row:3,column:2},15:{row:2,column:2},20:{row:3,column:1},30:{row:2,column:1}},ie=["","one","two","three","four","five","six","seven","eight"];return e.each(function(){var d,t,$=oe.isPlainObject(h)?oe.extend(!0,{},oe.fn.calendar.settings,h):oe.extend({},oe.fn.calendar.settings),G=$.className,n=$.namespace,i=$.selector,J=$.formatter,a=$.parser,Z=$.metadata,te=T[$.minTimeGap],l=$.error,e="."+n,c="module-"+n,o=oe(this),r=o.find(i.input),_=o.find(i.popup),u=o.find(i.activator),s=this,f=o.data(c),m=!1,ne=o.hasClass(G.inverted),g=!1,p=!1,ee={initialize:function(){ee.debug("Initializing calendar for",s,o),d=ee.get.isTouch(),ee.setup.config(),ee.setup.popup(),ee.setup.inline(),ee.setup.input(),ee.setup.date(),ee.create.calendar(),ee.bind.events(),ee.observeChanges(),ee.instantiate()},instantiate:function(){ee.verbose("Storing instance of calendar"),f=ee,o.data(c,f)},destroy:function(){ee.verbose("Destroying previous calendar for",s),o.removeData(c),ee.unbind.events(),ee.disconnect.classObserver()},setup:{config:function(){null!==ee.get.minDate()&&ee.set.minDate(o.data(Z.minDate)),null!==ee.get.maxDate()&&ee.set.maxDate(o.data(Z.maxDate)),ee.setting("type",ee.get.type()),ee.setting("on",$.on||(r.length?"focus":"click"))},popup:function(){var e,t,n;$.inline||(u.length||(u=o.children().first()).length)&&(oe.fn.popup!==ae?(_.length||(e=0!==(t=u.parent()).closest(i.append).length?"appendTo":"prependTo",_=oe("<div/>").addClass(G.popup)[e](t)),_.addClass(G.calendar),ne&&_.addClass(G.inverted),e=function(){return ee.refreshTooltips(),$.onVisible.apply(_,arguments)},t=$.onHidden,r.length||(_.attr("tabindex","0"),e=function(){return ee.refreshTooltips(),ee.focus(),$.onVisible.apply(_,arguments)},t=function(){return ee.blur(),$.onHidden.apply(_,arguments)}),n=ee.setting("on"),n=oe.extend({},$.popupOptions,{popup:_,on:n,hoverable:"hover"===n,closable:"click"===n,onShow:function(){return ee.set.focusDate(ee.get.date()),ee.set.mode(ee.get.validatedMode($.startMode)),$.onShow.apply(_,arguments)},onVisible:e,onHide:$.onHide,onHidden:t}),ee.popup(n)):ee.error(l.popup))},inline:function(){u.length&&!$.inline||($.inline=!0,_=oe("<div/>").addClass(G.calendar).appendTo(o),r.length||_.attr("tabindex","0"))},input:function(){$.touchReadonly&&r.length&&d&&r.prop("readonly",!0),ee.check.disabled()},date:function(){var e;$.initialDate?e=a.date($.initialDate,$):o.data(Z.date)!==ae?e=a.date(o.data(Z.date),$):r.length&&(e=a.date(r.val(),$)),ee.set.date(e,$.formatInput,!1),ee.set.mode(ee.get.mode(),!1)}},trigger:{change:function(){var e,t=r[0];t&&(e=D.createEvent("HTMLEvents"),ee.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{calendar:function(){var u,d,f,e=ee.get.mode(),m=new Date,g=ee.get.date(),p=ee.get.focusDate(),h=ee.helper.dateInRange(p||g||$.initialDate||m),t=(p||ee.set.focusDate(p=h,!1,!1),"year"===e),v="month"===e,n="day"===e,b="hour"===e,y="minute"===e,x="time"===$.type,C=Math.max($.multiMonth,1),w=n?ee.get.monthOffset():0,k=h.getMinutes(),T=h.getHours(),S=h.getDate(),D=h.getMonth()+w,i=h.getFullYear(),A=n?$.showWeekNumbers?8:7:b?4:te.column,E=n||b?6:te.row,F=n?C:1,P=(O=_).hasClass("left")?"right center":"left center";for(O.empty(),1<F&&(f=oe("<div/>").addClass(G.grid).appendTo(O)),d=0;d<F;d++){1<F&&(O=oe("<div/>").addClass(G.column).appendTo(f));var O,o=D+d,R=(new Date(i,o,1).getDay()-$.firstDayOfWeek%7+7)%7,M=(!$.constantHeight&&n&&(M=new Date(i,o+1,0).getDate()+R,E=Math.ceil(M/7)),t?10:v?1:0),I=n?1:0,j=b||y?1:0,L=b||y?S:1,V=new Date(i-M,o-I,L-j,T),I=new Date(i+M,o+I,L+j,T),L=t?new Date(10*Math.ceil(i/10)-9,0,0):v?new Date(i,0,0):n?new Date(i,o,0):new Date(i,o,S,-1),j=t?new Date(10*Math.ceil(i/10)+1,0,1):v?new Date(i+1,0,1):n?new Date(i,o+1,1):new Date(i,o,S+1),q=e,q=(n&&$.showWeekNumbers&&(q+=" andweek"),oe("<table/>").addClass(G.table).addClass(q).addClass(ie[A]+" column").appendTo(O)),z=(ne&&q.addClass(G.inverted),A);if(!x){var N=oe("<thead/>").appendTo(q),H=oe("<tr/>").appendTo(N),a=oe("<th/>").attr("colspan",""+A).appendTo(H),U=t||v?new Date(i,0,1):n?new Date(i,o,1):new Date(i,o,S,T,k),B=oe("<span/>").addClass(G.link).appendTo(a),U=(B.text(J.header(U,e,$)),v?$.disableYear?"day":"year":n?$.disableMonth?"year":"month":"day");if(B.data(Z.mode,U),0===d&&((B=oe("<span/>").addClass(G.prev).appendTo(a)).data(Z.focusDate,V),B.toggleClass(G.disabledCell,!ee.helper.isDateInRange(L,e)),oe("<i/>").addClass(G.prevIcon).appendTo(B)),d===F-1&&((U=oe("<span/>").addClass(G.next).appendTo(a)).data(Z.focusDate,I),U.toggleClass(G.disabledCell,!ee.helper.isDateInRange(j,e)),oe("<i/>").addClass(G.nextIcon).appendTo(U)),n)for(H=oe("<tr/>").appendTo(N),$.showWeekNumbers&&((a=oe("<th/>").appendTo(H)).text($.text.weekNo),a.addClass(G.weekCell),z--),r=0;r<z;r++)(a=oe("<th/>").appendTo(H)).text(J.dayColumnHeader((r+$.firstDayOfWeek)%7,$))}for(var W=oe("<tbody/>").appendTo(q),r=t?10*Math.ceil(i/10)-9:n?1-R:0,Y=0;Y<E;Y++)for(H=oe("<tr/>").appendTo(W),n&&$.showWeekNumbers&&((a=oe("<th/>").appendTo(H)).text(ee.get.weekOfYear(i,o,r+1-$.firstDayOfWeek)),a.addClass(G.weekCell)),u=0;u<z;u++,r++){var s,l=t?new Date(r,o,1,T,k):v?new Date(i,r,1,T,k):n?new Date(i,o,r,T,k):b?new Date(i,o,S,r):new Date(i,o,S,T,r*$.minTimeGap),Q=t?r:v?$.text.monthsShort[r]:n?l.getDate():J.time(l,$,!0),Q=((a=oe("<td/>").addClass(G.cell).appendTo(H)).text(Q),a.data(Z.date,l),n&&l.getMonth()!==(o+12)%12),X=!$.selectAdjacentDays&&Q||!ee.helper.isDateInRange(l,e)||$.isDisabled(l,e)||ee.helper.isDisabled(l,e)||!ee.helper.isEnabled(l,e),c=(X?null!==(c=ee.helper.findDayAsObject(l,e,$.disabledDates))&&c[Z.message]&&(a.attr("data-tooltip",c[Z.message]),a.attr("data-position",c[Z.position]||P),(c[Z.inverted]||ne&&c[Z.inverted]===ae)&&a.attr("data-inverted",""),c[Z.variation]&&a.attr("data-variation",c[Z.variation])):null!==(s=ee.helper.findDayAsObject(l,e,$.eventDates))&&(a.addClass(s[Z.class]||$.eventClass),s[Z.message]&&(a.attr("data-tooltip",s[Z.message]),a.attr("data-position",s[Z.position]||P),(s[Z.inverted]||ne&&s[Z.inverted]===ae)&&a.attr("data-inverted",""),s[Z.variation]&&a.attr("data-variation",s[Z.variation]))),ee.helper.dateEqual(l,g,e)),K=ee.helper.dateEqual(l,m,e),Q=(a.toggleClass(G.adjacentCell,Q&&!s),a.toggleClass(G.disabledCell,X),a.toggleClass(G.activeCell,c&&!(Q&&X)),b||y||a.toggleClass(G.todayCell,!Q&&K),{mode:e,adjacent:Q,disabled:X,active:c,today:K});J.cell(a,l,Q),ee.helper.dateEqual(l,p,e)&&ee.set.focusDate(l,!1,!1)}$.today&&(V=oe("<tr/>").appendTo(W),(L=oe("<td/>").attr("colspan",""+A).addClass(G.today).appendTo(V)).text(J.today($)),L.data(Z.date,m)),ee.update.focus(!1,q),$.inline&&ee.refreshTooltips()}}},update:{focus:function(e,t){t=t||_;var r=ee.get.mode(),n=ee.get.date(),s=ee.get.focusDate(),l=ee.get.startDate(),c=ee.get.endDate(),u=(e?s:null)||n||(d?null:s);t.find("td").each(function(){var e,t,n,i,o=oe(this),a=o.data(Z.date);a&&(e=o.hasClass(G.disabledCell),t=o.hasClass(G.activeCell),n=o.hasClass(G.adjacentCell),i=ee.helper.dateEqual(a,s,r),a=!!u&&(!!l&&ee.helper.isDateInRange(a,r,l,u)||!!c&&ee.helper.isDateInRange(a,r,u,c)),o.toggleClass(G.focusCell,i&&(!d||m)&&(!n||$.selectAdjacentDays&&n)&&!e),ee.helper.isTodayButton(o)||o.toggleClass(G.rangeCell,a&&!t&&!e))})}},refresh:function(){ee.create.calendar()},refreshTooltips:function(){var i=oe(S).width();_.find("td[data-position]").each(function(){var e=oe(this),t=S.getComputedStyle(e[0],":after").width.replace(/[^0-9\.]/g,""),n=e.attr("data-position"),t=i-e.width()-(parseInt(t,10)||250)>e.offset().left?"right":"left";-1===n.indexOf(t)&&e.attr("data-position",n.replace(/(left|right)/,t))})},bind:{events:function(){ee.debug("Binding events"),_.on("mousedown"+e,ee.event.mousedown),_.on("touchstart"+e,ee.event.mousedown),_.on("mouseup"+e,ee.event.mouseup),_.on("touchend"+e,ee.event.mouseup),_.on("mouseover"+e,ee.event.mouseover),r.length?(r.on("input"+e,ee.event.inputChange),r.on("focus"+e,ee.event.inputFocus),r.on("blur"+e,ee.event.inputBlur),r.on("keydown"+e,ee.event.keydown)):_.on("keydown"+e,ee.event.keydown)}},unbind:{events:function(){ee.debug("Unbinding events"),_.off(e),r.length&&r.off(e)}},event:{mouseover:function(e){var t=oe(e.target).data(Z.date),e=1===e.buttons;t&&ee.set.focusDate(t,!1,!0,e)},mousedown:function(e){r.length&&e.preventDefault(),m=0<=e.type.indexOf("touch");e=oe(e.target).data(Z.date);e&&ee.set.focusDate(e,!1,!0,!0)},mouseup:function(e){ee.focus(),e.preventDefault(),e.stopPropagation(),m=!1;var t,n,i,e=oe(e.target);e.hasClass("disabled")||(t=(e=(t=e.parent()).data(Z.date)||t.data(Z.focusDate)||t.data(Z.mode)?t:e).data(Z.date),n=e.data(Z.focusDate),i=e.data(Z.mode),t&&!1!==$.onSelect.call(s,t,ee.get.mode())?(e=e.hasClass(G.today),ee.selectDate(t,e)):n?ee.set.focusDate(n):i&&ee.set.mode(i))},keydown:function(e){var t,n,i,o,a,r,s,l=e.which;27!==l&&9!==l||ee.popup("hide"),ee.popup("is visible")&&(37===l||38===l||39===l||40===l?(o="day"===(r=ee.get.mode())?7:"hour"===r?4:"minute"===r?te.column:3,o=37===l?-1:38===l?-o:39==l?1:o,o*="minute"===r?$.minTimeGap:1,a=(t=ee.get.focusDate()||ee.get.date()||new Date).getFullYear()+("year"===r?o:0),s=t.getMonth()+("month"===r?o:0),n=t.getDate()+("day"===r?o:0),i=t.getHours()+("hour"===r?o:0),o=t.getMinutes()+("minute"===r?o:0),a=new Date(a,s,n,i,o),"time"===$.type&&(a=ee.helper.mergeDateTime(t,a)),ee.helper.isDateInRange(a,r)&&ee.set.focusDate(a)):13===l&&(r=ee.get.mode(),(s=ee.get.focusDate())&&!$.isDisabled(s,r)&&!ee.helper.isDisabled(s,r)&&ee.helper.isEnabled(s,r)&&ee.selectDate(s),e.preventDefault(),e.stopPropagation())),38!==l&&40!==l||(e.preventDefault(),ee.popup("show"))},inputChange:function(){var e=r.val(),e=a.date(e,$);ee.set.date(e,!1)},inputFocus:function(){_.addClass(G.active)},inputBlur:function(){var e;_.removeClass(G.active),$.formatInput&&(e=ee.get.date(),e=J.datetime(e,$),r.val(e)),p&&(ee.trigger.change(),p=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ee.check.disabled()})}}},observeChanges:function(){"MutationObserver"in S&&(t=new MutationObserver(ee.event.class.mutation),ee.debug("Setting up mutation observer",t),ee.observe.class())},disconnect:{classObserver:function(){r.length&&t&&t.disconnect()}},observe:{class:function(){r.length&&t&&t.observe(o[0],{attributes:!0})}},is:{disabled:function(){return o.hasClass(G.disabled)}},check:{disabled:function(){r.attr("tabindex",ee.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,n){return e=Date.UTC(e,t,n+3)/864e5,e=Math.floor(e/7),t=new Date(6048e5*e).getUTCFullYear(),e-Math.floor(Date.UTC(t,0,7)/6048e5)+1},date:function(){return ee.helper.sanitiseDate(o.data(Z.date))||null},inputDate:function(){return r.val()},focusDate:function(){return o.data(Z.focusDate)||null},startDate:function(){var e=ee.get.calendarModule($.startCalendar);return(e?e.get.date():o.data(Z.startDate))||null},endDate:function(){var e=ee.get.calendarModule($.endCalendar);return(e?e.get.date():o.data(Z.endDate))||null},minDate:function(){return o.data(Z.minDate)||null},maxDate:function(){return o.data(Z.maxDate)||null},monthOffset:function(){return o.data(Z.monthOffset)||0},mode:function(){var e=o.data(Z.mode)||$.startMode;return ee.get.validatedMode(e)},validatedMode:function(e){var t=ee.get.validModes();return 0<=oe.inArray(e,t)?e:"time"===$.type?"hour":"month"===$.type?"month":"year"===$.type?"year":"day"},type:function(){return o.data(Z.type)||$.type},validModes:function(){var e=[];return"time"!==$.type&&($.disableYear&&"year"!==$.type||e.push("year"),($.disableMonth||"year"===$.type)&&"month"!==$.type||e.push("month"),0<=$.type.indexOf("date")&&e.push("day")),0<=$.type.indexOf("time")&&(e.push("hour"),$.disableMinute||e.push("minute")),e},isTouch:function(){try{return D.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e=e instanceof oe?e:oe(e).first()).data(c):null}},set:{date:function(e,t,n){t=!1!==t,n=!1!==n,e=ee.helper.sanitiseDate(e),e=ee.helper.dateInRange(e);var i=ee.get.mode(),o=J.datetime(e,$);if(n&&!1===$.onBeforeChange.call(s,e,o,i))return!1;if(ee.set.focusDate(e),$.isDisabled(e,i))return!1;var a=ee.get.endDate();a&&e&&a<e&&ee.set.endDate(ae),ee.set.dataKeyValue(Z.date,e),t&&r.length&&r.val(o),n&&$.onChange.call(s,e,o,i)},startDate:function(e,t){e=ee.helper.sanitiseDate(e);var n=ee.get.calendarModule($.startCalendar);n&&n.set.date(e),ee.set.dataKeyValue(Z.startDate,e,t)},endDate:function(e,t){e=ee.helper.sanitiseDate(e);var n=ee.get.calendarModule($.endCalendar);n&&n.set.date(e),ee.set.dataKeyValue(Z.endDate,e,t)},focusDate:function(e,t,n,i){e=ee.helper.sanitiseDate(e),e=ee.helper.dateInRange(e);var o="day"===ee.get.mode(),a=ee.get.focusDate(),o=(o&&e&&a&&((o=12*(e.getFullYear()-a.getFullYear())+e.getMonth()-a.getMonth())&&(a=ee.get.monthOffset()-o,ee.set.monthOffset(a,!1))),ee.set.dataKeyValue(Z.focusDate,e,!!e&&t));n=!1!==n&&o&&!1===t||g!=i,g=i,n&&ee.update.focus(i)},minDate:function(e){e=ee.helper.sanitiseDate(e),null!==$.maxDate&&$.maxDate<=e?ee.verbose("Unable to set minDate variable bigger that maxDate variable",e,$.maxDate):(ee.setting("minDate",e),ee.set.dataKeyValue(Z.minDate,e))},maxDate:function(e){e=ee.helper.sanitiseDate(e),null!==$.minDate&&$.minDate>=e?ee.verbose("Unable to set maxDate variable lower that minDate variable",e,$.minDate):(ee.setting("maxDate",e),ee.set.dataKeyValue(Z.maxDate,e))},monthOffset:function(e,t){var n=Math.max($.multiMonth,1);e=Math.max(1-n,Math.min(0,e)),ee.set.dataKeyValue(Z.monthOffset,e,t)},mode:function(e,t){ee.set.dataKeyValue(Z.mode,e,t)},dataKeyValue:function(e,t,n){var i=o.data(e),i=i===t||i<=t&&t<=i;return t?o.data(e,t):o.removeData(e),(n=!1!==n&&!i)&&ee.refresh(),!i}},selectDate:function(e,t){ee.verbose("New date selection",e);var n=ee.get.mode();t||"minute"===n||$.disableMinute&&"hour"===n||"date"===$.type&&"day"===n||"month"===$.type&&"month"===n||"year"===$.type&&"year"===n?!1===ee.set.date(e)||(p=!0,$.closable&&(ee.popup("hide"),(t=ee.get.calendarModule($.endCalendar))&&("focus"!==t.setting("on")&&t.popup("show"),t.focus()))):(t="year"===n?$.disableMonth?"day":"month":"month"===n?"day":"day"===n?"hour":"minute",ee.set.mode(t),"hour"===n||"day"===n&&ee.get.date()?ee.set.date(e,!0,!1):ee.set.focusDate(e))},changeDate:function(e){ee.set.date(e)},clear:function(){ee.set.date(ae)},popup:function(){return u.popup.apply(u,arguments)},focus:function(){(r.length?r:_).focus()},blur:function(){(r.length?r:_).blur()},helper:{isDisabled:function(n,i){return("day"===i||"month"===i||"year"===i)&&("day"===i&&-1!==$.disabledDaysOfWeek.indexOf(n.getDay())||$.disabledDates.some(function(e){return(e="string"==typeof e?ee.helper.sanitiseDate(e):e)instanceof Date?ee.helper.dateEqual(n,e,i):null!==e&&"object"==typeof e?e[Z.year]?"number"==typeof e[Z.year]?n.getFullYear()==e[Z.year]:Array.isArray(e[Z.year])?-1<e[Z.year].indexOf(n.getFullYear()):void 0:e[Z.month]?"number"==typeof e[Z.month]?n.getMonth()==e[Z.month]:Array.isArray(e[Z.month])?-1<e[Z.month].indexOf(n.getMonth()):e[Z.month]instanceof Date?(t=ee.helper.sanitiseDate(e[Z.month]),n.getMonth()==t.getMonth()&&n.getFullYear()==t.getFullYear()):void 0:e[Z.date]&&"day"===i?e[Z.date]instanceof Date?ee.helper.dateEqual(n,ee.helper.sanitiseDate(e[Z.date]),i):Array.isArray(e[Z.date])?e[Z.date].some(function(e){return ee.helper.dateEqual(n,e,i)}):void 0:void 0:void 0;var t}))},isEnabled:function(t,n){return"day"!==n||(0===$.enabledDates.length||$.enabledDates.some(function(e){return(e="string"==typeof e?ee.helper.sanitiseDate(e):e)instanceof Date?ee.helper.dateEqual(t,e,n):null!==e&&"object"==typeof e&&e[Z.date]?ee.helper.dateEqual(t,ee.helper.sanitiseDate(e[Z.date]),n):void 0}))},findDayAsObject:function(t,n,e){if("day"===n||"month"===n||"year"===n)for(var i,o=0;o<e.length;o++){if((i="string"==typeof(i=e[o])?ee.helper.sanitiseDate(i):i)instanceof Date&&ee.helper.dateEqual(t,i,n))return(a={})[Z.date]=i,a;if(null!==i&&"object"==typeof i)if(i[Z.year]){if("number"==typeof i[Z.year]&&t.getFullYear()==i[Z.year])return i;if(Array.isArray(i[Z.year])&&-1<i[Z.year].indexOf(t.getFullYear()))return i}else if(i[Z.month]){if("number"==typeof i[Z.month]&&t.getMonth()==i[Z.month])return i;if(Array.isArray(i[Z.month])){if(-1<i[Z.month].indexOf(t.getMonth()))return i}else if(i[Z.month]instanceof Date){var a=ee.helper.sanitiseDate(i[Z.month]);if(t.getMonth()==a.getMonth()&&t.getFullYear()==a.getFullYear())return i}}else if(i[Z.date]&&"day"===n){if(i[Z.date]instanceof Date&&ee.helper.dateEqual(t,ee.helper.sanitiseDate(i[Z.date]),n))return i;if(Array.isArray(i[Z.date])&&i[Z.date].some(function(e){return ee.helper.dateEqual(t,e,n)}))return i}}return null},sanitiseDate:function(e){return!(e=e instanceof Date?e:a.date(""+e,$))||isNaN(e.getTime())?null:e},dateDiff:function(e,t,n){var i="time"===$.type,o="year"===(n=n||"day"),a=o||"month"===n,r="minute"===n,n=r||"hour"===n;return e=new Date(i?2e3:e.getFullYear(),i||o?0:e.getMonth(),i||a?1:e.getDate(),n?e.getHours():0,r?$.minTimeGap*Math.floor(e.getMinutes()/$.minTimeGap):0),(t=new Date(i?2e3:t.getFullYear(),i||o?0:t.getMonth(),i||a?1:t.getDate(),n?t.getHours():0,r?$.minTimeGap*Math.floor(t.getMinutes()/$.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,n){return!!e&&!!t&&0===ee.helper.dateDiff(e,t,n)},isDateInRange:function(e,t,n,i){var o;return n||i||(n=(o=ee.get.startDate())&&$.minDate?new Date(Math.max(o,$.minDate)):o||$.minDate,i=$.maxDate),n=n&&new Date(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),$.minTimeGap*Math.ceil(n.getMinutes()/$.minTimeGap)),!(!e||n&&0<ee.helper.dateDiff(e,n,t)||i&&0<ee.helper.dateDiff(i,e,t))},dateInRange:function(e,t,n){t||n||(t=(i=ee.get.startDate())&&$.minDate?new Date(Math.max(i,$.minDate)):i||$.minDate,n=$.maxDate),t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),$.minTimeGap*Math.ceil(t.getMinutes()/$.minTimeGap));var i="time"===$.type;return e&&(t&&0<ee.helper.dateDiff(e,t,"minute")?i?ee.helper.mergeDateTime(e,t):t:n&&0<ee.helper.dateDiff(n,e,"minute")?i?ee.helper.mergeDateTime(e,n):n:e)},mergeDateTime:function(e,t){return e&&t?new Date(e.getFullYear(),e.getMonth(),e.getDate(),t.getHours(),t.getMinutes()):t},isTodayButton:function(e){return e.text()===$.text.today}},setting:function(e,t){if(ee.debug("Changing setting",e,t),oe.isPlainObject(e))oe.extend(!0,$,e);else{if(t===ae)return $[e];oe.isPlainObject($[e])?oe.extend(!0,$[e],t):$[e]=t}},internal:function(e,t){if(oe.isPlainObject(e))oe.extend(!0,ee,e);else{if(t===ae)return ee[e];ee[e]=t}},debug:function(){!$.silent&&$.debug&&($.performance?ee.performance.log(arguments):(ee.debug=Function.prototype.bind.call(console.info,console,$.name+":"),ee.debug.apply(console,arguments)))},verbose:function(){!$.silent&&$.verbose&&$.debug&&($.performance?ee.performance.log(arguments):(ee.verbose=Function.prototype.bind.call(console.info,console,$.name+":"),ee.verbose.apply(console,arguments)))},error:function(){$.silent||(ee.error=Function.prototype.bind.call(console.error,console,$.name+":"),ee.error.apply(console,arguments))},performance:{log:function(e){var t,n;$.performance&&(n=(t=(new Date).getTime())-(y||t),y=t,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:s,"Execution Time":n})),clearTimeout(ee.performance.timer),ee.performance.timer=setTimeout(ee.performance.display,500)},display:function(){var e=$.name+":",n=0;y=!1,clearTimeout(ee.performance.timer),oe.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),(console.group!==ae||console.table!==ae)&&0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):oe.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(i,e,t){var o,a,n,r=f;return e=e||k,t=s||t,"string"==typeof i&&r!==ae&&(i=i.split(/[\. ]/),o=i.length-1,oe.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(oe.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==ae)return a=r[n],!1;{if(!oe.isPlainObject(r[t])||e==o)return r[t]!==ae?a=r[t]:ee.error(l.method,i),!1;r=r[t]}}})),oe.isFunction(a)?n=a.apply(t,e):a!==ae&&(n=a),Array.isArray(v)?v.push(n):v!==ae?v=[v,n]:n!==ae&&(v=n),a}};w?(f===ae&&ee.initialize(),ee.invoke(C)):(f!==ae&&f.invoke("destroy"),ee.initialize())}),v!==ae?v:this},oe.fn.calendar.settings={name:"Calendar",namespace:"calendar",silent:!1,debug:!1,verbose:!1,performance:!1,type:"datetime",firstDayOfWeek:0,constantHeight:!0,today:!1,closable:!0,monthFirst:!0,touchReadonly:!0,inline:!1,on:null,initialDate:null,startMode:!1,minDate:null,maxDate:null,ampm:!0,disableYear:!1,disableMonth:!1,disableMinute:!1,formatInput:!0,startCalendar:null,endCalendar:null,multiMonth:1,minTimeGap:5,showWeekNumbers:null,disabledDates:[],disabledDaysOfWeek:[],enabledDates:[],eventDates:[],centuryBreak:60,currentCentury:2e3,selectAdjacentDays:!1,popupOptions:{position:"bottom left",lastResort:"bottom left",prefer:"opposite",hideOnScroll:!1},text:{days:["S","M","T","W","T","F","S"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",now:"Now",am:"AM",pm:"PM",weekNo:"Week"},formatter:{header:function(e,t,n){return"year"===t?n.formatter.yearHeader(e,n):"month"===t?n.formatter.monthHeader(e,n):"day"===t?n.formatter.dayHeader(e,n):"hour"===t?n.formatter.hourHeader(e,n):n.formatter.minuteHeader(e,n)},yearHeader:function(e,t){e=10*Math.ceil(e.getFullYear()/10);return e-9+" - "+(2+e)},monthHeader:function(e,t){return e.getFullYear()},dayHeader:function(e,t){return t.text.months[e.getMonth()]+" "+e.getFullYear()},hourHeader:function(e,t){return t.formatter.date(e,t)},minuteHeader:function(e,t){return t.formatter.date(e,t)},dayColumnHeader:function(e,t){return t.text.days[e]},datetime:function(e,t){if(!e)return"";var n="time"===t.type?"":t.formatter.date(e,t),e=t.type.indexOf("time")<0?"":t.formatter.time(e,t,!1);return n+("datetime"===t.type?" ":"")+e},date:function(e,t){if(!e)return"";var n=e.getDate(),i=t.text.months[e.getMonth()],e=e.getFullYear();return"year"===t.type?e:"month"===t.type?i+" "+e:(t.monthFirst?i+" "+n:n+" "+i)+", "+e},time:function(e,t,n){if(!e)return"";var i=e.getHours(),e=e.getMinutes(),o="";return t.ampm&&(o=" "+(i<12?t.text.am:t.text.pm),i=0===i?12:12<i?i-12:i),i+":"+(e<10?"0":"")+e+o},today:function(e){return"date"===e.type?e.text.today:e.text.now},cell:function(e,t,n){}},parser:{date:function(e,t){if(e instanceof Date)return e;if(!e)return null;if(0===(e=String(e).trim()).length)return null;e.match(/^[0-9]{4}[\/\-\.][0-9]{1,2}[\/\-\.][0-9]{1,2}$/)&&(e=e.replace(/[\/\-\.]/g,"/")+" 00:00:00"),e=t.monthFirst||!e.match(/^[0-9]{1,2}[\/\-\.]/)?e:e.replace(/[\/\-\.]/g,"/").replace(/([0-9]+)\/([0-9]+)/,"$2/$1");var n,i,o,u=new Date(e);if(!(null!==e.match(/^[0-9]+$/))&&!isNaN(u.getDate()))return u;e=e.toLowerCase();var d,f,m,a=-1,r=-1,g=-1,s=-1,l=-1,u=ae,p="time"===t.type,h=t.type.indexOf("time")<0,v=e.split(t.regExp.dateWords),c=e.split(t.regExp.dateNumbers);if(!h)for(u=0<=oe.inArray(t.text.am.toLowerCase(),v)||!(0<=oe.inArray(t.text.pm.toLowerCase(),v))&&ae,n=0;n<c.length;n++)if(0<=(f=c[n]).indexOf(":")){if(r<0||a<0)for(m=f.split(":"),o=0;o<Math.min(2,m.length);o++)i=parseInt(m[o]),isNaN(i)&&(i=0),0===o?r=i%24:a=i%60;c.splice(n,1)}if(!p){for(n=0;n<v.length;n++)if(!((d=v[n]).length<=0)){for(i=0;i<t.text.months.length;i++)if(t.text.months[i].substring(0,d.length).toLowerCase()===d){s=i+1;break}if(0<=s)break}for(n=0;n<c.length;n++)if(i=parseInt(c[n]),!isNaN(i)&&i>=t.centuryBreak&&n===c.length-1){i<=99&&(i+=t.currentCentury-100),l=i,c.splice(n,1);break}if(s<0)for(n=0;n<c.length;n++)if(o=1<n||t.monthFirst?n:1===n?0:1,i=parseInt(c[o]),!isNaN(i)&&1<=i&&i<=12){s=i,c.splice(o,1);break}for(n=0;n<c.length;n++)if(i=parseInt(c[n]),!isNaN(i)&&1<=i&&i<=31){g=i,c.splice(n,1);break}if(l<0)for(n=c.length-1;0<=n;n--)if(i=parseInt(c[n]),!isNaN(i)){i<=99&&(i+=t.currentCentury),l=i,c.splice(n,1);break}}if(!h){if(r<0)for(n=0;n<c.length;n++)if(i=parseInt(c[n]),!isNaN(i)&&0<=i&&i<=23){r=i,c.splice(n,1);break}if(a<0)for(n=0;n<c.length;n++)if(i=parseInt(c[n]),!isNaN(i)&&0<=i&&i<=59){a=i,c.splice(n,1);break}}if(a<0&&r<0&&g<0&&s<0&&l<0)return null;a<0&&(a=0),r<0&&(r=0),g<0&&(g=1),s<0&&(s=1),l<0&&(l=(new Date).getFullYear()),u!==ae&&(u?12===r&&(r=0):r<12&&(r+=12));e=new Date(l,s-1,g,r,a);return e.getMonth()===s-1&&e.getFullYear()===l||(e=new Date(l,s,0,r,a)),isNaN(e.getTime())?null:e}},onBeforeChange:function(e,t,n){return!0},onChange:function(e,t,n){},onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){},onSelect:function(e,t){},isDisabled:function(e,t){return!1},selector:{popup:".ui.popup",input:"input",activator:"input",append:".inline.field,.inline.fields"},regExp:{dateWords:/[^A-Za-z\u00C0-\u024F]+/g,dateNumbers:/[^\d:]+/g},error:{popup:"UI Popup, a required component is not included in this page",method:"The method you called is not defined."},className:{calendar:"calendar",active:"active",popup:"ui popup",grid:"ui equal width grid",column:"column",table:"ui celled center aligned unstackable table",inverted:"inverted",prev:"prev link",next:"next link",prevIcon:"chevron left icon",nextIcon:"chevron right icon",link:"link",cell:"link",disabledCell:"disabled",weekCell:"disabled",adjacentCell:"adjacent",activeCell:"active",rangeCell:"range",focusCell:"focus",todayCell:"today",today:"today link",disabled:"disabled"},metadata:{date:"date",focusDate:"focusDate",startDate:"startDate",endDate:"endDate",minDate:"minDate",maxDate:"maxDate",mode:"mode",type:"type",monthOffset:"monthOffset",message:"message",class:"class",inverted:"inverted",variation:"variation",position:"position",month:"month",year:"year"},eventClass:"blue"}}(jQuery,window,document),function(S,D,A,E){"use strict";S.isFunction=S.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},D=void 0!==D&&D.Math==Math?D:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),S.fn.checkbox=function(u){var d,e=S(this),f=e.selector||"",x=(new Date).getTime(),C=[],w=u,k="string"==typeof w,T=[].slice.call(arguments,1);return e.each(function(){var n,m=S.extend(!0,{},S.fn.checkbox.settings,u),t=m.className,o=m.namespace,g=m.selector,l=m.error,i="."+o,a="module-"+o,p=S(this),e=S(this).children(g.label),h=S(this).children(g.input),v=h[0],r=!1,y=!1,s=p.data(a),c=this,b={initialize:function(){b.verbose("Initializing checkbox",m),b.create.label(),b.bind.events(),b.set.tabbable(),b.hide.input(),b.observeChanges(),b.instantiate(),b.setup()},instantiate:function(){b.verbose("Storing instance of module",b),s=b,p.data(a,b)},destroy:function(){b.verbose("Destroying module"),b.unbind.events(),b.show.input(),p.removeData(a)},fix:{reference:function(){p.is(g.input)&&(b.debug("Behavior called on <input> adjusting invoked element"),p=p.closest(g.checkbox),b.refresh())}},setup:function(){b.set.initialLoad(),b.is.indeterminate()?(b.debug("Initial value is indeterminate"),b.indeterminate()):b.is.checked()?(b.debug("Initial value is checked"),b.check()):(b.debug("Initial value is unchecked"),b.uncheck()),b.remove.initialLoad()},refresh:function(){e=p.children(g.label),h=p.children(g.input),v=h[0]},hide:{input:function(){b.verbose("Modifying <input> z-index to be unselectable"),h.addClass(t.hidden)}},show:{input:function(){b.verbose("Modifying <input> z-index to be selectable"),h.removeClass(t.hidden)}},observeChanges:function(){"MutationObserver"in D&&((n=new MutationObserver(function(e){b.debug("DOM tree modified, updating selector cache"),b.refresh()})).observe(c,{childList:!0,subtree:!0}),b.debug("Setting up mutation observer",n))},attachEvents:function(e,t){var n=S(e);t=S.isFunction(b[t])?b[t]:b.toggle,0<n.length?(b.debug("Attaching checkbox events to element",e,t),n.on("click"+i,t)):b.error(l.notFound)},preventDefaultOnInputTarget:function(){"undefined"!=typeof event&&null!==event&&S(event.target).is(g.input)&&(b.verbose("Preventing default check action after manual check action"),event.preventDefault())},event:{change:function(e){b.should.ignoreCallbacks()||m.onChange.call(v)},click:function(e){var t=S(e.target);t.is(g.input)?b.verbose("Using default check action on initialized checkbox"):t.is(g.link)?b.debug("Clicking link inside checkbox, skipping toggle"):(b.toggle(),h.focus(),e.preventDefault())},keydown:function(e){var t=e.which,n=13,i=32,o=27,a=37,u=38,d=39,f=40,r=b.get.radios(),s=r.index(p),l=r.length,c=!1;if(t==a||t==u?c=(0===s?l:s)-1:t!=d&&t!=f||(c=s===l-1?0:s+1),!b.should.ignoreCallbacks()&&!1!==c){if(!1===m.beforeUnchecked.apply(v))return b.verbose("Option not allowed to be unchecked, cancelling key navigation"),!1;if(!1===m.beforeChecked.apply(S(r[c]).children(g.input)[0]))return b.verbose("Next option should not allow check, cancelling key navigation"),!1}y=t==o?(b.verbose("Escape key pressed blurring field"),h.blur(),!0):!(e.ctrlKey||!(t==i||t==n&&m.enableEnterKey))&&(b.verbose("Enter/space key pressed, toggling checkbox"),b.toggle(),!0)},keyup:function(e){y&&e.preventDefault()}},check:function(){b.should.allowCheck()&&(b.debug("Checking checkbox",h),b.set.checked(),b.should.ignoreCallbacks()||(m.onChecked.call(v),b.trigger.change()),b.preventDefaultOnInputTarget())},uncheck:function(){b.should.allowUncheck()&&(b.debug("Unchecking checkbox"),b.set.unchecked(),b.should.ignoreCallbacks()||(m.onUnchecked.call(v),b.trigger.change()),b.preventDefaultOnInputTarget())},indeterminate:function(){b.should.allowIndeterminate()?b.debug("Checkbox is already indeterminate"):(b.debug("Making checkbox indeterminate"),b.set.indeterminate(),b.should.ignoreCallbacks()||(m.onIndeterminate.call(v),b.trigger.change()))},determinate:function(){b.should.allowDeterminate()?b.debug("Checkbox is already determinate"):(b.debug("Making checkbox determinate"),b.set.determinate(),b.should.ignoreCallbacks()||(m.onDeterminate.call(v),b.trigger.change()))},enable:function(){b.is.enabled()?b.debug("Checkbox is already enabled"):(b.debug("Enabling checkbox"),b.set.enabled(),b.should.ignoreCallbacks()||(m.onEnable.call(v),m.onEnabled.call(v),b.trigger.change()))},disable:function(){b.is.disabled()?b.debug("Checkbox is already disabled"):(b.debug("Disabling checkbox"),b.set.disabled(),b.should.ignoreCallbacks()||(m.onDisable.call(v),m.onDisabled.call(v),b.trigger.change()))},get:{radios:function(){var e=b.get.name();return S('input[name="'+e+'"]').closest(g.checkbox)},otherRadios:function(){return b.get.radios().not(p)},name:function(){return h.attr("name")}},is:{initialLoad:function(){return r},radio:function(){return h.hasClass(t.radio)||"radio"==h.attr("type")},indeterminate:function(){return h.prop("indeterminate")!==E&&h.prop("indeterminate")},checked:function(){return h.prop("checked")!==E&&h.prop("checked")},disabled:function(){return h.prop("disabled")!==E&&h.prop("disabled")},enabled:function(){return!b.is.disabled()},determinate:function(){return!b.is.indeterminate()},unchecked:function(){return!b.is.checked()}},should:{allowCheck:function(){return b.is.determinate()&&b.is.checked()&&!b.is.initialLoad()?(b.debug("Should not allow check, checkbox is already checked"),!1):!(!b.should.ignoreCallbacks()&&!1===m.beforeChecked.apply(v))||(b.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return b.is.determinate()&&b.is.unchecked()&&!b.is.initialLoad()?(b.debug("Should not allow uncheck, checkbox is already unchecked"),!1):!(!b.should.ignoreCallbacks()&&!1===m.beforeUnchecked.apply(v))||(b.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return b.is.indeterminate()&&!b.is.initialLoad()?(b.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):!(!b.should.ignoreCallbacks()&&!1===m.beforeIndeterminate.apply(v))||(b.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return b.is.determinate()&&!b.is.initialLoad()?(b.debug("Should not allow determinate, checkbox is already determinate"),!1):!(!b.should.ignoreCallbacks()&&!1===m.beforeDeterminate.apply(v))||(b.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},ignoreCallbacks:function(){return r&&!m.fireOnInit}},can:{change:function(){return!(p.hasClass(t.disabled)||p.hasClass(t.readOnly)||h.prop("disabled")||h.prop("readonly"))},uncheck:function(){return"boolean"==typeof m.uncheckable?m.uncheckable:!b.is.radio()}},set:{initialLoad:function(){r=!0},checked:function(){b.verbose("Setting class to checked"),p.removeClass(t.indeterminate).addClass(t.checked),b.is.radio()&&b.uncheckOthers(),b.is.indeterminate()||!b.is.checked()?(b.verbose("Setting state to checked",v),h.prop("indeterminate",!1).prop("checked",!0)):b.debug("Input is already checked, skipping input property change")},unchecked:function(){b.verbose("Removing checked class"),p.removeClass(t.indeterminate).removeClass(t.checked),b.is.indeterminate()||!b.is.unchecked()?(b.debug("Setting state to unchecked"),h.prop("indeterminate",!1).prop("checked",!1)):b.debug("Input is already unchecked")},indeterminate:function(){b.verbose("Setting class to indeterminate"),p.addClass(t.indeterminate),b.is.indeterminate()?b.debug("Input is already indeterminate, skipping input property change"):(b.debug("Setting state to indeterminate"),h.prop("indeterminate",!0))},determinate:function(){b.verbose("Removing indeterminate class"),p.removeClass(t.indeterminate),b.is.determinate()?b.debug("Input is already determinate, skipping input property change"):(b.debug("Setting state to determinate"),h.prop("indeterminate",!1))},disabled:function(){b.verbose("Setting class to disabled"),p.addClass(t.disabled),b.is.disabled()?b.debug("Input is already disabled, skipping input property change"):(b.debug("Setting state to disabled"),h.prop("disabled","disabled"))},enabled:function(){b.verbose("Removing disabled class"),p.removeClass(t.disabled),b.is.enabled()?b.debug("Input is already enabled, skipping input property change"):(b.debug("Setting state to enabled"),h.prop("disabled",!1))},tabbable:function(){b.verbose("Adding tabindex to checkbox"),h.attr("tabindex")===E&&h.attr("tabindex",0)}},remove:{initialLoad:function(){r=!1}},trigger:{change:function(){var e,t=h[0];t&&(e=A.createEvent("HTMLEvents"),b.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{label:function(){0<h.prevAll(g.label).length?(h.prev(g.label).detach().insertAfter(h),b.debug("Moving existing label",e)):b.has.label()||(e=S("<label>").insertAfter(h),b.debug("Creating label",e))}},has:{label:function(){return 0<e.length}},bind:{events:function(){b.verbose("Attaching checkbox events"),p.on("click"+i,b.event.click).on("change"+i,b.event.change).on("keydown"+i,g.input,b.event.keydown).on("keyup"+i,g.input,b.event.keyup)}},unbind:{events:function(){b.debug("Removing events"),p.off(i)}},uncheckOthers:function(){var e=b.get.otherRadios();b.debug("Unchecking other radios",e),e.removeClass(t.checked)},toggle:function(){b.can.change()?b.is.indeterminate()||b.is.unchecked()?(b.debug("Currently unchecked"),b.check()):b.is.checked()&&b.can.uncheck()&&(b.debug("Currently checked"),b.uncheck()):b.is.radio()||b.debug("Checkbox is read-only or disabled, ignoring toggle")},setting:function(e,t){if(b.debug("Changing setting",e,t),S.isPlainObject(e))S.extend(!0,m,e);else{if(t===E)return m[e];S.isPlainObject(m[e])?S.extend(!0,m[e],t):m[e]=t}},internal:function(e,t){if(S.isPlainObject(e))S.extend(!0,b,e);else{if(t===E)return b[e];b[e]=t}},debug:function(){!m.silent&&m.debug&&(m.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,m.name+":"),b.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),b.verbose.apply(console,arguments)))},error:function(){m.silent||(b.error=Function.prototype.bind.call(console.error,console,m.name+":"),b.error.apply(console,arguments))},performance:{log:function(e){var t,n;m.performance&&(n=(t=(new Date).getTime())-(x||t),x=t,C.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:c,"Execution Time":n})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,500)},display:function(){var e=m.name+":",n=0;x=!1,clearTimeout(b.performance.timer),S.each(C,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",f&&(e+=" '"+f+"'"),(console.group!==E||console.table!==E)&&0<C.length&&(console.groupCollapsed(e),console.table?console.table(C):S.each(C,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),C=[]}},invoke:function(i,e,t){var o,a,n,r=s;return e=e||T,t=c||t,"string"==typeof i&&r!==E&&(i=i.split(/[\. ]/),o=i.length-1,S.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(S.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==E)return a=r[n],!1;{if(!S.isPlainObject(r[t])||e==o)return r[t]!==E?a=r[t]:b.error(l.method,i),!1;r=r[t]}}})),S.isFunction(a)?n=a.apply(t,e):a!==E&&(n=a),Array.isArray(d)?d.push(n):d!==E?d=[d,n]:n!==E&&(d=n),a}};k?(s===E&&b.initialize(),b.invoke(w)):(s!==E&&s.invoke("destroy"),b.initialize())}),d!==E?d:this},S.fn.checkbox.settings={name:"Checkbox",namespace:"checkbox",silent:!1,debug:!1,verbose:!0,performance:!0,uncheckable:"auto",fireOnInit:!1,enableEnterKey:!0,onChange:function(){},beforeChecked:function(){},beforeUnchecked:function(){},beforeDeterminate:function(){},beforeIndeterminate:function(){},onChecked:function(){},onUnchecked:function(){},onDeterminate:function(){},onIndeterminate:function(){},onEnable:function(){},onDisable:function(){},onEnabled:function(){},onDisabled:function(){},className:{checked:"checked",indeterminate:"indeterminate",disabled:"disabled",hidden:"hidden",radio:"radio",readOnly:"read-only"},error:{method:"The method you called is not defined"},selector:{checkbox:".ui.checkbox",label:"label, .box",input:'input[type="checkbox"], input[type="radio"]',link:"a[href]"}}}(jQuery,window,document),function(k,e,T,S){"use strict";k.isFunction=k.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),k.fn.dimmer=function(p){var h,v=k(this),b=(new Date).getTime(),y=[],x=p,C="string"==typeof x,w=[].slice.call(arguments,1);return v.each(function(){var o,t,a=k.isPlainObject(p)?k.extend(!0,{},k.fn.dimmer.settings,p):k.extend({},k.fn.dimmer.settings),n=a.selector,u=a.namespace,e=a.className,d=a.error,i="."+u,f="module-"+u,m=v.selector||"",g="ontouchstart"in T.documentElement?"touchstart":"click",r=k(this),s=this,l=r.data(f),c={preinitialize:function(){o=c.is.dimmer()?(t=r.parent(),r):(t=r,c.has.dimmer()?a.dimmerName?t.find(n.dimmer).filter("."+a.dimmerName):t.find(n.dimmer):c.create())},initialize:function(){c.debug("Initializing dimmer",a),c.bind.events(),c.set.dimmable(),c.instantiate()},instantiate:function(){c.verbose("Storing instance of module",c),l=c,r.data(f,l)},destroy:function(){c.verbose("Destroying previous module",o),c.unbind.events(),c.remove.variation(),t.off(i)},bind:{events:function(){"hover"==a.on?t.on("mouseenter"+i,c.show).on("mouseleave"+i,c.hide):"click"==a.on&&t.on(g+i,c.toggle),c.is.page()&&(c.debug("Setting as a page dimmer",t),c.set.pageDimmer()),c.is.closable()&&(c.verbose("Adding dimmer close event",o),t.on(g+i,n.dimmer,c.event.click))}},unbind:{events:function(){r.removeData(f),t.off(i)}},event:{click:function(e){c.verbose("Determining if event occurred on dimmer",e),0!==o.find(e.target).length&&!k(e.target).is(n.content)||(c.hide(),e.stopImmediatePropagation())}},addContent:function(e){e=k(e);c.debug("Add content to dimmer",e),e.parent()[0]!==o[0]&&e.detach().appendTo(o)},create:function(){var e=k(a.template.dimmer(a));return a.dimmerName&&(c.debug("Creating named dimmer",a.dimmerName),e.addClass(a.dimmerName)),e.appendTo(t),e},show:function(e){e=k.isFunction(e)?e:function(){},c.debug("Showing dimmer",o,a),c.set.variation(),c.is.dimmed()&&!c.is.animating()||!c.is.enabled()?c.debug("Dimmer is already shown or disabled"):(c.animate.show(e),a.onShow.call(s),a.onChange.call(s))},hide:function(e){e=k.isFunction(e)?e:function(){},c.is.dimmed()||c.is.animating()?(c.debug("Hiding dimmer",o),c.animate.hide(e),a.onHide.call(s),a.onChange.call(s)):c.debug("Dimmer is not visible")},toggle:function(){c.verbose("Toggling dimmer visibility",o),c.is.dimmed()?c.is.closable()&&c.hide():c.show()},animate:{show:function(e){e=k.isFunction(e)?e:function(){},a.useCSS&&k.fn.transition!==S&&o.transition("is supported")?(a.useFlex?(c.debug("Using flex dimmer"),c.remove.legacy()):(c.debug("Using legacy non-flex dimmer"),c.set.legacy()),"auto"!==a.opacity&&c.set.opacity(),o.transition({displayType:a.useFlex?"flex":"block",animation:(a.transition.showMethod||a.transition)+" in",queue:!1,duration:c.get.duration(),useFailSafe:!0,onStart:function(){c.set.dimmed()},onComplete:function(){c.set.active(),e()}})):(c.verbose("Showing dimmer animation with javascript"),c.set.dimmed(),"auto"==a.opacity&&(a.opacity=.8),o.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(c.get.duration(),a.opacity,function(){o.removeAttr("style"),c.set.active(),e()}))},hide:function(e){e=k.isFunction(e)?e:function(){},a.useCSS&&k.fn.transition!==S&&o.transition("is supported")?(c.verbose("Hiding dimmer with css"),o.transition({displayType:a.useFlex?"flex":"block",animation:(a.transition.hideMethod||a.transition)+" out",queue:!1,duration:c.get.duration(),useFailSafe:!0,onComplete:function(){c.remove.dimmed(),c.remove.variation(),c.remove.active(),e()}})):(c.verbose("Hiding dimmer with javascript"),o.stop().fadeOut(c.get.duration(),function(){c.remove.dimmed(),c.remove.active(),o.removeAttr("style"),e()}))}},get:{dimmer:function(){return o},duration:function(){return c.is.active()?a.transition.hideDuration||a.duration.hide||a.duration:a.transition.showDuration||a.duration.show||a.duration}},has:{dimmer:function(){return a.dimmerName?0<r.find(n.dimmer).filter("."+a.dimmerName).length:0<r.find(n.dimmer).length}},is:{active:function(){return o.hasClass(e.active)},animating:function(){return o.is(":animated")||o.hasClass(e.animating)},closable:function(){return"auto"==a.closable?"hover"!=a.on:a.closable},dimmer:function(){return r.hasClass(e.dimmer)},dimmable:function(){return r.hasClass(e.dimmable)},dimmed:function(){return t.hasClass(e.dimmed)},disabled:function(){return t.hasClass(e.disabled)},enabled:function(){return!c.is.disabled()},page:function(){return t.is("body")},pageDimmer:function(){return o.hasClass(e.pageDimmer)}},can:{show:function(){return!o.hasClass(e.disabled)}},set:{opacity:function(e){var t=o.css("background-color"),n=t.split(","),i=n&&3<=n.length;e=0===a.opacity?0:a.opacity||e,t=i?(n[2]=n[2].replace(")",""),n[3]=e+")",n.join(",")):"rgba(0, 0, 0, "+e+")",c.debug("Setting opacity to",e),o.css("background-color",t)},legacy:function(){o.addClass(e.legacy)},active:function(){o.addClass(e.active)},dimmable:function(){t.addClass(e.dimmable)},dimmed:function(){t.addClass(e.dimmed)},pageDimmer:function(){o.addClass(e.pageDimmer)},disabled:function(){o.addClass(e.disabled)},variation:function(e){(e=e||a.variation)&&o.addClass(e)}},remove:{active:function(){o.removeClass(e.active)},legacy:function(){o.removeClass(e.legacy)},dimmed:function(){t.removeClass(e.dimmed)},disabled:function(){o.removeClass(e.disabled)},variation:function(e){(e=e||a.variation)&&o.removeClass(e)}},setting:function(e,t){if(c.debug("Changing setting",e,t),k.isPlainObject(e))k.extend(!0,a,e);else{if(t===S)return a[e];k.isPlainObject(a[e])?k.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(k.isPlainObject(e))k.extend(!0,c,e);else{if(t===S)return c[e];c[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?c.performance.log(arguments):(c.debug=Function.prototype.bind.call(console.info,console,a.name+":"),c.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?c.performance.log(arguments):(c.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),c.verbose.apply(console,arguments)))},error:function(){a.silent||(c.error=Function.prototype.bind.call(console.error,console,a.name+":"),c.error.apply(console,arguments))},performance:{log:function(e){var t,n;a.performance&&(n=(t=(new Date).getTime())-(b||t),b=t,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:s,"Execution Time":n})),clearTimeout(c.performance.timer),c.performance.timer=setTimeout(c.performance.display,500)},display:function(){var e=a.name+":",n=0;b=!1,clearTimeout(c.performance.timer),k.each(y,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",m&&(e+=" '"+m+"'"),1<v.length&&(e+=" ("+v.length+")"),(console.group!==S||console.table!==S)&&0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):k.each(y,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(i,e,t){var o,a,n,r=l;return e=e||w,t=s||t,"string"==typeof i&&r!==S&&(i=i.split(/[\. ]/),o=i.length-1,k.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(k.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==S)return a=r[n],!1;{if(!k.isPlainObject(r[t])||e==o)return r[t]!==S?a=r[t]:c.error(d.method,i),!1;r=r[t]}}})),k.isFunction(a)?n=a.apply(t,e):a!==S&&(n=a),Array.isArray(h)?h.push(n):h!==S?h=[h,n]:n!==S&&(h=n),a}};c.preinitialize(),C?(l===S&&c.initialize(),c.invoke(x)):(l!==S&&l.invoke("destroy"),c.initialize())}),h!==S?h:this},k.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",silent:!1,debug:!1,verbose:!1,performance:!0,useFlex:!0,dimmerName:!1,variation:!1,closable:"auto",useCSS:!0,transition:"fade",on:!1,opacity:"auto",duration:{show:500,hide:500},displayLoader:!1,loaderText:!1,loaderVariation:"",onChange:function(){},onShow:function(){},onHide:function(){},error:{method:"The method you called is not defined."},className:{active:"active",animating:"animating",dimmable:"dimmable",dimmed:"dimmed",dimmer:"dimmer",disabled:"disabled",hide:"hide",legacy:"legacy",pageDimmer:"page",show:"show",loader:"ui loader"},selector:{dimmer:"> .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(e){var t,n=k("<div/>").addClass("ui dimmer");return e.displayLoader&&(t=k("<div/>").addClass(e.className.loader).addClass(e.loaderVariation),e.loaderText&&(t.text(e.loaderText),t.addClass("text")),n.append(t)),n}}}}(jQuery,window,document),function(te,ne,ie,oe){"use strict";te.isFunction=te.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ne=void 0!==ne&&ne.Math==Math?ne:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),te.fn.dropdown=function(B){var W,Y=te(this),Q=te(ie),X=Y.selector||"",K="ontouchstart"in ie.documentElement,$=K?"touchstart":"click",G=(new Date).getTime(),J=[],Z=B,_="string"==typeof Z,ee=[].slice.call(arguments,1);return Y.each(function(n){var d,e,i,o,a,r,s,c,u,f=te.isPlainObject(B)?te.extend(!0,{},te.fn.dropdown.settings,B):te.extend({},te.fn.dropdown.settings),m=f.className,x=f.message,C=f.fields,w=f.keys,g=f.metadata,k=f.namespace,T=f.regExp,p=f.selector,S=f.error,D=f.templates,t="."+k,A="module-"+k,h=te(this),E=te(f.context),F=h.find(p.text),P=h.find(p.search),O=h.find(p.sizer),l=h.find(p.input),R=h.find(p.icon),M=h.find(p.clearIcon),I=0<h.prev().find(p.text).length?h.prev().find(p.text):h.prev(),v=h.children(p.menu),b=v.find(p.item),j=f.hideDividers?b.parent().children(p.divider):te(),L=!1,V=!1,q=!1,z=!1,N=this,H=!1,U=h.data(A),y={initialize:function(){y.debug("Initializing dropdown",f),y.is.alreadySetup()?y.setup.reference():(f.ignoreDiacritics&&!String.prototype.normalize&&(f.ignoreDiacritics=!1,y.error(S.noNormalize,N)),y.setup.layout(),f.values&&(y.set.initialLoad(),y.change.values(f.values),y.remove.initialLoad()),y.refreshData(),y.save.defaults(),y.restore.selected(),y.create.id(),y.bind.events(),y.observeChanges(),y.instantiate())},instantiate:function(){y.verbose("Storing instance of dropdown",y),U=y,h.data(A,y)},destroy:function(){y.verbose("Destroying previous dropdown",h),y.remove.tabbable(),y.remove.active(),v.transition("stop all"),v.removeClass(m.visible).addClass(m.hidden),h.off(t).removeData(A),v.off(t),Q.off(a),y.disconnect.menuObserver(),y.disconnect.selectObserver(),y.disconnect.classObserver()},observeChanges:function(){"MutationObserver"in ne&&(s=new MutationObserver(y.event.select.mutation),c=new MutationObserver(y.event.menu.mutation),u=new MutationObserver(y.event.class.mutation),y.debug("Setting up mutation observer",s,c,u),y.observe.select(),y.observe.menu(),y.observe.class())},disconnect:{menuObserver:function(){c&&c.disconnect()},selectObserver:function(){s&&s.disconnect()},classObserver:function(){u&&u.disconnect()}},observe:{select:function(){y.has.input()&&s&&s.observe(h[0],{childList:!0,subtree:!0})},menu:function(){y.has.menu()&&c&&c.observe(v[0],{childList:!0,subtree:!0})},class:function(){y.has.search()&&u&&u.observe(h[0],{attributes:!0})}},create:{id:function(){r=(Math.random().toString(16)+"000000000").substr(2,8),a="."+r,y.verbose("Creating unique id for element",r)},userChoice:function(e){var n,i;return!!(e=e||y.get.userValues())&&(e=Array.isArray(e)?e:[e],te.each(e,function(e,t){!1===y.get.item(t)&&(i=f.templates.addition(y.add.variables(x.addResult,t)),i=te("<div />").html(i).attr("data-"+g.value,t).attr("data-"+g.text,t).addClass(m.addition).addClass(m.item),f.hideAdditions&&i.addClass(m.hidden),n=n===oe?i:n.add(i),y.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=y.get.userValues();t&&(y.debug("Adding user labels",t),te.each(t,function(e,t){y.verbose("Adding custom user value"),y.add.label(t,t)}))},menu:function(){v=te("<div />").addClass(m.menu).appendTo(h)},sizer:function(){O=te("<span />").addClass(m.sizer).insertAfter(P)}},search:function(e){e=e!==oe?e:y.get.query(),y.verbose("Searching for query",e),!1===f.fireOnInit&&y.is.initialLoad()?y.verbose("Skipping callback on initial load",f.onSearch):y.has.minCharacters(e)&&!1!==f.onSearch.call(N,e)?y.filter(e):y.hide(null,!0)},select:{firstUnfiltered:function(){y.verbose("Selecting first non-filtered element"),y.remove.selectedItem(),b.not(p.unselectable).not(p.addition+p.hidden).eq(0).addClass(m.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(p.item).not(p.unselectable).eq(0),e=e.prevAll(p.item).not(p.unselectable).eq(0);0<t.length?(y.verbose("Moving selection to",t),t.addClass(m.selected)):(y.verbose("Moving selection to",e),e.addClass(m.selected))}},setup:{api:function(){var e={debug:f.debug,urlData:{value:y.get.value(),query:y.get.query()},on:!1};y.verbose("First request, initializing API"),h.api(e)},layout:function(){h.is("select")&&(y.setup.select(),y.setup.returnedObject()),y.has.menu()||y.create.menu(),y.is.clearable()&&!y.has.clearItem()&&(y.verbose("Adding clear icon"),M=te("<i />").addClass("remove icon").insertBefore(F)),y.is.search()&&!y.has.search()&&(y.verbose("Adding search input"),P=te("<input />").addClass(m.search).prop("autocomplete",y.is.chrome()?"fomantic-search":"off").insertBefore(F)),y.is.multiple()&&y.is.searchSelection()&&!y.has.sizer()&&y.create.sizer(),f.allowTab&&y.set.tabbable()},select:function(){var e=y.get.selectValues();y.debug("Dropdown initialized on a select",e),0<(l=h.is("select")?h:l).parent(p.dropdown).length?(y.debug("UI dropdown already exists. Creating dropdown menu only"),h=l.closest(p.dropdown),y.has.menu()||y.create.menu(),v=h.children(p.menu),y.setup.menu(e)):(y.debug("Creating entire dropdown from select"),h=te("<div />").attr("class",l.attr("class")).addClass(m.selection).addClass(m.dropdown).html(D.dropdown(e,C,f.preserveHTML,f.className)).insertBefore(l),l.hasClass(m.multiple)&&!1===l.prop("multiple")&&(y.error(S.missingMultiple),l.prop("multiple",!0)),l.is("[multiple]")&&y.set.multiple(),l.prop("disabled")&&(y.debug("Disabling dropdown"),h.addClass(m.disabled)),l.removeAttr("required").removeAttr("class").detach().prependTo(h)),y.refresh()},menu:function(e){v.html(D.menu(e,C,f.preserveHTML,f.className)),b=v.find(p.item),j=f.hideDividers?b.parent().children(p.divider):te()},reference:function(){y.debug("Dropdown behavior was called on select, replacing with closest dropdown"),h=h.parent(p.dropdown),U=h.data(A),N=h.get(0),y.refresh(),y.setup.returnedObject()},returnedObject:function(){var e=Y.slice(0,n),t=Y.slice(n+1);Y=e.add(h).add(t)}},refresh:function(){y.refreshSelectors(),y.refreshData()},refreshItems:function(){b=v.find(p.item),j=f.hideDividers?b.parent().children(p.divider):te()},refreshSelectors:function(){y.verbose("Refreshing selector cache"),F=h.find(p.text),P=h.find(p.search),l=h.find(p.input),R=h.find(p.icon),I=0<h.prev().find(p.text).length?h.prev().find(p.text):h.prev(),v=h.children(p.menu),b=v.find(p.item),j=f.hideDividers?b.parent().children(p.divider):te()},refreshData:function(){y.verbose("Refreshing cached metadata"),b.removeData(g.text).removeData(g.value)},clearData:function(){y.verbose("Clearing metadata"),b.removeData(g.text).removeData(g.value),h.removeData(g.defaultText).removeData(g.defaultValue).removeData(g.placeholderText)},clearItems:function(){v.empty(),y.refreshItems()},toggle:function(){y.verbose("Toggling menu visibility"),y.is.active()?y.hide():y.show()},show:function(e,t){if(e=te.isFunction(e)?e:function(){},(H||z)&&y.is.remote()&&y.is.noApiCache()&&y.clearItems(),!y.can.show()&&y.is.remote()&&(y.debug("No API results retrieved, searching before show"),y.queryRemote(y.get.query(),y.show,[e,t])),y.can.show()&&!y.is.active()){if(y.debug("Showing dropdown"),!y.has.message()||y.has.maxSelections()||y.has.allResultsFiltered()||y.remove.message(),y.is.allFiltered())return!0;!1!==f.onShow.call(N)&&y.animate.show(function(){y.can.click()&&y.bind.intent(),y.has.search()&&!t&&y.focusSearch(),y.set.visible(),e.call(N)})}},hide:function(e,t){e=te.isFunction(e)?e:function(){},y.is.active()&&!y.is.animatingOutward()?(y.debug("Hiding dropdown"),!1!==f.onHide.call(N)&&y.animate.hide(function(){y.remove.visible(),y.is.focusedOnSearch()&&!0!==t&&P.blur(),e.call(N)})):y.can.click()&&y.unbind.intent(),H=z=!1},hideOthers:function(){y.verbose("Finding other dropdowns to hide"),Y.not(h).has(p.menu+"."+m.visible).dropdown("hide")},hideMenu:function(){y.verbose("Hiding menu instantaneously"),y.remove.active(),y.remove.visible(),v.transition("hide")},hideSubMenus:function(){var e=v.children(p.item).find(p.menu);y.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){y.bind.keyboardEvents(),y.bind.inputEvents(),y.bind.mouseEvents()},keyboardEvents:function(){y.verbose("Binding keyboard events"),h.on("keydown"+t,y.event.keydown),y.has.search()&&h.on(y.get.inputEvent()+t,p.search,y.event.input),y.is.multiple()&&Q.on("keydown"+a,y.event.document.keydown)},inputEvents:function(){y.verbose("Binding input change events"),h.on("change"+t,p.input,y.event.change)},mouseEvents:function(){y.verbose("Binding mouse events"),y.is.multiple()&&h.on($+t,p.label,y.event.label.click).on($+t,p.remove,y.event.remove.click),y.is.searchSelection()?(h.on("mousedown"+t,y.event.mousedown).on("mouseup"+t,y.event.mouseup).on("mousedown"+t,p.menu,y.event.menu.mousedown).on("mouseup"+t,p.menu,y.event.menu.mouseup).on($+t,p.icon,y.event.icon.click).on($+t,p.clearIcon,y.event.clearIcon.click).on("focus"+t,p.search,y.event.search.focus).on($+t,p.search,y.event.search.focus).on("blur"+t,p.search,y.event.search.blur).on($+t,p.text,y.event.text.focus),y.is.multiple()&&h.on($+t,y.event.click).on($+t,y.event.search.focus)):("click"==f.on?h.on($+t,p.icon,y.event.icon.click).on($+t,y.event.test.toggle):"hover"==f.on?h.on("mouseenter"+t,y.delay.show).on("mouseleave"+t,y.delay.hide):h.on(f.on+t,y.toggle),h.on("mousedown"+t,y.event.mousedown).on("mouseup"+t,y.event.mouseup).on("focus"+t,y.event.focus).on($+t,p.clearIcon,y.event.clearIcon.click),y.has.menuSearch()?h.on("blur"+t,p.search,y.event.search.blur):h.on("blur"+t,y.event.blur)),v.on((K?"touchstart":"mouseenter")+t,p.item,y.event.item.mouseenter).on("mouseleave"+t,p.item,y.event.item.mouseleave).on("click"+t,p.item,y.event.item.click)},intent:function(){y.verbose("Binding hide intent event to document"),K&&Q.on("touchstart"+a,y.event.test.touch).on("touchmove"+a,y.event.test.touch),Q.on($+a,y.event.test.hide)}},unbind:{intent:function(){y.verbose("Removing hide intent event from document"),K&&Q.off("touchstart"+a).off("touchmove"+a),Q.off($+a)}},filter:function(e){function t(){y.is.multiple()&&y.filterActive(),(e||!e&&0==y.get.activeItem().length)&&y.select.firstUnfiltered(),y.has.allResultsFiltered()?f.onNoResults.call(N,n)?f.allowAdditions?f.hideAdditions&&(y.verbose("User addition with no menu, setting empty style"),y.set.empty(),y.hideMenu()):(y.verbose("All items filtered, showing message",n),y.add.message(x.noResults)):(y.verbose("All items filtered, hiding dropdown",n),y.hideMenu()):(y.remove.empty(),y.remove.message()),f.allowAdditions&&y.add.userSuggestion(y.escape.htmlEntities(e)),y.is.searchSelection()&&y.can.show()&&y.is.focusedOnSearch()&&y.show()}var n=e!==oe?e:y.get.query();f.useLabels&&y.has.maxSelections()||(f.apiSettings?y.can.useAPI()?y.queryRemote(n,function(){f.filterRemoteData&&y.filterItems(n);var e=l.val();Array.isArray(e)||(e=e&&""!==e?e.split(f.delimiter):[]),y.is.multiple()&&te.each(e,function(e,t){b.filter('[data-value="'+t+'"]').addClass(m.filtered)}),y.focusSearch(!0),t()}):y.error(S.noAPI):(y.filterItems(n),t()))},queryRemote:function(e,n,i){Array.isArray(i)||(i=[i]);e={errorDuration:!1,cache:"local",throttle:f.throttle,urlData:{query:e},onError:function(){y.add.message(x.serverError),H=z=!1,n.apply(null,i)},onFailure:function(){y.add.message(x.serverError),H=z=!1,n.apply(null,i)},onSuccess:function(e){var e=e[C.remoteValues],t=(Array.isArray(e)||(e=[]),y.remove.message(),{});t[C.values]=e,y.setup.menu(t),0!==e.length||f.allowAdditions?""!==(t=y.is.multiple()?y.get.values():y.get.value())&&(y.verbose("Value(s) present after click icon, select value(s) in items"),y.set.selected(t,null,null,!0)):y.add.message(x.noResults),H=z=!1,n.apply(null,i)}};h.api("get request")||y.setup.api(),e=te.extend(!0,{},e,f.apiSettings),h.api("setting",e).api("query")},filterItems:function(e){var n=y.remove.diacritics(e!==oe?e:y.get.query()),i=null,e=y.escape.string(n),t=(f.ignoreSearchCase?"i":"")+"gm",o=new RegExp("^"+e,t);y.has.query()&&(i=[],y.verbose("Searching for matching values",n),b.each(function(){var e,t=te(this);if(t.hasClass(m.unfilterable))return i.push(this),!0;if("both"===f.match||"text"===f.match){if(-1!==(e=y.remove.diacritics(String(y.get.choiceText(t,!1)))).search(o))return i.push(this),!0;if("exact"===f.fullTextSearch&&y.exactSearch(n,e))return i.push(this),!0;if(!0===f.fullTextSearch&&y.fuzzySearch(n,e))return i.push(this),!0}return("both"===f.match||"value"===f.match)&&(-1!==(t=y.remove.diacritics(String(y.get.choiceValue(t,e)))).search(o)||"exact"===f.fullTextSearch&&y.exactSearch(n,t)||!0===f.fullTextSearch&&y.fuzzySearch(n,t))?(i.push(this),!0):void 0})),y.debug("Showing only matched items",n),y.remove.filteredItem(),i&&b.not(i).addClass(m.filtered),y.has.query()?!0===f.hideDividers?j.addClass(m.hidden):"empty"===f.hideDividers&&j.removeClass(m.hidden).filter(function(){var e=te(this).nextUntil(p.item);return 0===(e.length?e:te(this)).nextUntil(p.divider).filter(p.item+":not(."+m.filtered+")").length}).addClass(m.hidden):j.removeClass(m.hidden)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=f.ignoreSearchCase?e.toLowerCase():e,t=f.ignoreSearchCase?t.toLowerCase():t,n<i)return!1;if(i===n)return e===t;e:for(var o=0,a=0;o<i;o++){for(var r=e.charCodeAt(o);a<n;)if(t.charCodeAt(a++)===r)continue e;return!1}return!0},exactSearch:function(e,t){return e=f.ignoreSearchCase?e.toLowerCase():e,-1<(t=f.ignoreSearchCase?t.toLowerCase():t).indexOf(e)},filterActive:function(){f.useLabels&&b.filter("."+m.active).addClass(m.filtered)},focusSearch:function(e){y.has.search()&&!y.is.focusedOnSearch()&&(e?(h.off("focus"+t,p.search),P.focus(),h.on("focus"+t,p.search,y.event.search.focus)):P.focus())},blurSearch:function(){y.has.search()&&P.blur()},forceSelection:function(){var e=b.not(m.filtered).filter("."+m.selected).eq(0),t=b.not(m.filtered).filter("."+m.active).eq(0),e=0<e.length?e:t,t=0<e.length;f.allowAdditions||t&&!y.is.multiple()?(y.debug("Forcing partial selection to selected item",e),y.event.item.click.call(e,{},!0)):y.remove.searchTerm()},change:{values:function(e){f.allowAdditions||y.clear(),y.debug("Creating dropdown with specified values",e);var t={};t[C.values]=e,y.setup.menu(t),te.each(e,function(e,t){if(1==t.selected&&(y.debug("Setting initial selection to",t[C.value]),y.set.selected(t[C.value]),!y.is.multiple()))return!1}),y.has.selectInput()&&(y.disconnect.selectObserver(),l.html(""),l.append("<option disabled selected value></option>"),te.each(e,function(e,t){var n=f.templates.deQuote(t[C.value]),t=f.templates.escape(t[C.name]||"",f.preserveHTML);l.append('<option value="'+n+'">'+t+"</option>")}),y.observe.select())}},event:{change:function(){q||(y.debug("Input changed, updating selection"),y.set.selected())},focus:function(){f.showOnFocus&&!L&&y.is.hidden()&&!i&&(H=!0,y.show())},blur:function(e){i=ie.activeElement===this,L||i||(y.remove.activeLabel(),y.hide())},mousedown:function(){y.is.searchSelection()?o=!0:L=!0},mouseup:function(){y.is.searchSelection()?o=!1:L=!1},click:function(e){te(e.target).is(h)&&(y.is.focusedOnSearch()?y.show():y.focusSearch())},search:{focus:function(e){L=!0,y.is.multiple()&&y.remove.activeLabel(),H||y.is.active()||!(f.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||(H=!0,y.search())},blur:function(e){i=ie.activeElement===this,y.is.searchSelection()&&!o&&(V||i||(f.forceSelection?y.forceSelection():f.allowAdditions||y.remove.searchTerm(),y.hide())),o=!1}},clearIcon:{click:function(e){y.clear(),y.is.searchSelection()&&y.remove.searchTerm(),y.hide(),e.stopPropagation()}},icon:{click:function(e){z=!0,y.has.search()?y.is.active()?y.blurSearch():f.showOnFocus?y.focusSearch():y.toggle():y.toggle(),e.stopPropagation()}},text:{focus:function(e){L=!0,y.focusSearch()}},input:function(e){(y.is.multiple()||y.is.searchSelection())&&y.set.filtered(),clearTimeout(y.timer),y.timer=setTimeout(y.search,f.delay.search)},label:{click:function(e){var t=te(this),n=h.find(p.label),i=n.filter("."+m.active),o=t.nextAll("."+m.active),a=t.prevAll("."+m.active),o=(0<o.length?t.nextUntil(o):t.prevUntil(a)).add(i).add(t);e.shiftKey?(i.removeClass(m.active),o.addClass(m.active)):e.ctrlKey?t.toggleClass(m.active):(i.removeClass(m.active),t.addClass(m.active)),f.onLabelSelect.apply(this,n.filter("."+m.active)),e.stopPropagation()}},remove:{click:function(e){var t=te(this).parent();t.hasClass(m.active)?y.remove.activeLabels():y.remove.activeLabels(t),e.stopPropagation()}},test:{toggle:function(e){var t=y.is.multiple()?y.show:y.toggle;y.is.bubbledLabelClick(e)||y.is.bubbledIconClick(e)||(y.is.multiple()&&(!y.is.multiple()||y.is.active())||(H=!0),y.determine.eventOnElement(e,t)&&e.preventDefault())},touch:function(e){y.determine.eventOnElement(e,function(){"touchstart"==e.type?y.timer=setTimeout(function(){y.hide()},f.delay.touch):"touchmove"==e.type&&clearTimeout(y.timer)}),e.stopPropagation()},hide:function(e){y.determine.eventInModule(e,y.hide)&&N.id&&te(e.target).attr("for")===N.id&&e.preventDefault()}},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&y.check.disabled()})}},select:{mutation:function(e){y.debug("<select> modified, recreating menu"),y.is.selectMutation(e)&&(y.disconnect.selectObserver(),y.refresh(),y.setup.select(),y.set.selected(),y.observe.select())}},menu:{mutation:function(e){var e=e[0],t=e.addedNodes?te(e.addedNodes[0]):te(!1),e=e.removedNodes?te(e.removedNodes[0]):te(!1),t=t.add(e),e=t.is(p.addition)||0<t.closest(p.addition).length,t=t.is(p.message)||0<t.closest(p.message).length;e||t?(y.debug("Updating item selector cache"),y.refreshItems()):(y.debug("Menu modified, updating selector cache"),y.refresh())},mousedown:function(){V=!0},mouseup:function(){V=!1}},item:{mouseenter:function(e){var t=te(e.target),n=te(this),i=n.children(p.menu),o=n.siblings(p.item).children(p.menu),n=0<i.length;0<i.find(t).length||!n||(clearTimeout(y.itemTimer),y.itemTimer=setTimeout(function(){y.verbose("Showing sub-menu",i),te.each(o,function(){y.animate.hide(!1,te(this))}),y.animate.show(!1,i)},f.delay.show),e.preventDefault())},mouseleave:function(e){var t=te(this).children(p.menu);0<t.length&&(clearTimeout(y.itemTimer),y.itemTimer=setTimeout(function(){y.verbose("Hiding sub-menu",t),y.animate.hide(!1,t)},f.delay.hide))},click:function(e,t){var n=te(this),e=te(e?e.target:""),i=n.find(p.menu),o=y.get.choiceText(n),a=y.get.choiceValue(n,o),r=0<i.length,i=0<i.find(e).length;"input"!==ie.activeElement.tagName.toLowerCase()&&te(ie.activeElement).blur(),i||r&&!f.allowCategorySelection||(y.is.searchSelection()&&(f.allowAdditions&&y.remove.userAddition(),y.remove.searchTerm(),y.is.focusedOnSearch()||1==t||y.focusSearch(!0)),f.useLabels||(y.remove.filteredItem(),y.set.scrollPosition(n)),y.determine.selectAction.call(this,o,a))}},document:{keydown:function(e){var t,n,i,o,u,a,r,s,l,d,f,c=e.which;y.is.inObject(c,w)&&((n=(t=h.find(p.label)).filter("."+m.active)).data(g.value),a=t.index(n),r=t.length,i=0<n.length,o=1<n.length,u=0===a,a=a+1==r,r=y.is.searchSelection(),s=y.is.focusedOnSearch(),l=y.is.focused(),f=(d=s&&0===y.get.caretPosition(!1))&&0!==y.get.caretPosition(!0),r&&!i&&!s||(c==w.leftArrow?!l&&!d||i?i&&(e.shiftKey?y.verbose("Adding previous label to selection"):(y.verbose("Selecting previous label"),t.removeClass(m.active)),u&&!o?n.addClass(m.active):n.prev(p.siblingLabel).addClass(m.active).end(),e.preventDefault()):(y.verbose("Selecting previous label"),t.last().addClass(m.active)):c==w.rightArrow?(l&&!i&&t.first().addClass(m.active),i&&(e.shiftKey?y.verbose("Adding next label to selection"):(y.verbose("Selecting next label"),t.removeClass(m.active)),a?r?s?t.removeClass(m.active):y.focusSearch():(o?n.next(p.siblingLabel):n).addClass(m.active):n.next(p.siblingLabel).addClass(m.active),e.preventDefault())):c==w.deleteKey||c==w.backspace?i?(y.verbose("Removing active labels"),a&&r&&!s&&y.focusSearch(),n.last().next(p.siblingLabel).addClass(m.active),y.remove.activeLabels(n),e.preventDefault()):!d||f||i||c!=w.backspace||(y.verbose("Removing last label on input backspace"),n=t.last().addClass(m.active),y.remove.activeLabels(n)):n.removeClass(m.active)))}},keydown:function(e){var t=e.which;if(y.is.inObject(t,w)){var n,i=b.not(p.unselectable).filter("."+m.selected).eq(0),o=v.children("."+m.active).eq(0),i=0<i.length?i:o,o=0<i.length?i.siblings(":not(."+m.filtered+")").addBack():v.children(":not(."+m.filtered+")"),a=i.children(p.menu),r=i.closest(p.menu),s=r.hasClass(m.visible)||r.hasClass(m.animating)||0<r.parent(p.menu).length,u=0<a.length,l=0<i.length,d=0<i.not(p.unselectable).length,c=t==w.delimiter&&f.allowAdditions&&y.is.multiple();if(f.allowAdditions&&f.hideAdditions&&(t==w.enter||c)&&d&&(y.verbose("Selecting item from keyboard shortcut",i),y.event.item.click.call(i,e),y.is.searchSelection()&&y.remove.searchTerm(),y.is.multiple()&&e.preventDefault()),y.is.visible()){if(t!=w.enter&&!c||(t==w.enter&&l&&u&&!f.allowCategorySelection?(y.verbose("Pressed enter on unselectable category, opening sub menu"),t=w.rightArrow):d&&(y.verbose("Selecting item from keyboard shortcut",i),y.event.item.click.call(i,e),y.is.searchSelection()&&(y.remove.searchTerm(),y.is.multiple()&&P.focus())),e.preventDefault()),l&&(t==w.leftArrow&&r[0]!==v[0]&&(y.verbose("Left key pressed, closing sub-menu"),y.animate.hide(!1,r),i.removeClass(m.selected),r.closest(p.item).addClass(m.selected),e.preventDefault()),t==w.rightArrow&&u&&(y.verbose("Right key pressed, opening sub-menu"),y.animate.show(!1,a),i.removeClass(m.selected),a.find(p.item).eq(0).addClass(m.selected),e.preventDefault())),t==w.upArrow){if(n=(l&&s?i.prevAll(p.item+":not("+p.unselectable+")"):b).eq(0),o.index(n)<0)return y.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();y.verbose("Up key pressed, changing active item"),i.removeClass(m.selected),n.addClass(m.selected),y.set.scrollPosition(n),f.selectOnKeydown&&y.is.single()&&y.set.selectedItem(n),e.preventDefault()}if(t==w.downArrow){if(0===(n=(l&&s?i.nextAll(p.item+":not("+p.unselectable+")"):b).eq(0)).length)return y.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();y.verbose("Down key pressed, changing active item"),b.removeClass(m.selected),n.addClass(m.selected),y.set.scrollPosition(n),f.selectOnKeydown&&y.is.single()&&y.set.selectedItem(n),e.preventDefault()}t==w.pageUp&&(y.scrollPage("up"),e.preventDefault()),t==w.pageDown&&(y.scrollPage("down"),e.preventDefault()),t==w.escape&&(y.verbose("Escape key pressed, closing dropdown"),y.hide())}else c&&e.preventDefault(),t!=w.downArrow||y.is.visible()||(y.verbose("Down key pressed, showing dropdown"),y.show(),e.preventDefault())}else y.has.search()||y.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e,t=l[0];t&&(e=ie.createEvent("HTMLEvents"),y.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){d=!0,y.verbose("Determining action",f.action),te.isFunction(y.action[f.action])?(y.verbose("Triggering preset action",f.action,e,t),y.action[f.action].call(N,e,t,this)):te.isFunction(f.action)?(y.verbose("Triggering user action",f.action,e,t),f.action.call(N,e,t,this)):y.error(S.action,f.action),d=!1},eventInModule:function(e,t){var e=te(e.target),n=0<e.closest(ie.documentElement).length,e=0<e.closest(h).length;return t=te.isFunction(t)?t:function(){},n&&!e?(y.verbose("Triggering event",t),t(),!0):(y.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=te(e.target),i=n.closest(p.siblingLabel),e=ie.body.contains(e.target),i=0===h.find(i).length||!(y.is.multiple()&&f.useLabels),n=0===n.closest(v).length;return t=te.isFunction(t)?t:function(){},e&&i&&n?(y.verbose("Triggering event",t),t(),!0):(y.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=t!==oe?t:e,y.can.activate(te(n))&&(y.set.selected(t,te(n)),y.is.multiple()||y.hideAndClear())},select:function(e,t,n){t=t!==oe?t:e,y.can.activate(te(n))&&(y.set.value(t,e,te(n)),y.is.multiple()||y.hideAndClear())},combo:function(e,t,n){y.set.selected(t=t!==oe?t:e,te(n)),y.hideAndClear()},hide:function(e,t,n){y.set.value(t,e,te(n)),y.hideAndClear()}},get:{id:function(){return r},defaultText:function(){return h.data(g.defaultText)},defaultValue:function(){return h.data(g.defaultValue)},placeholderText:function(){return"auto"!=f.placeholder&&"string"==typeof f.placeholder?f.placeholder:h.data(g.placeholderText)||""},text:function(){return f.preserveHTML?F.html():F.text()},query:function(){return String(P.val()).trim()},searchWidth:function(e){return e=e!==oe?e:P.val(),O.text(e),Math.ceil(O.width()+1)},selectionCount:function(){var e=y.get.values();return y.is.multiple()?Array.isArray(e)?e.length:0:""!==y.get.value()?1:0},transition:function(e){return"auto"===f.transition?y.is.upward(e)?"slide up":"slide down":f.transition},userValues:function(){var e=y.get.values();return!!e&&(e=Array.isArray(e)?e:[e],te.grep(e,function(e){return!1===y.get.item(e)}))},uniqueArray:function(n){return te.grep(n,function(e,t){return te.inArray(e,n)===t})},caretPosition:function(e){var t,n,i=P.get(0);return e&&"selectionEnd"in i?i.selectionEnd:!e&&"selectionStart"in i?i.selectionStart:ie.selection?(i.focus(),n=(t=ie.selection.createRange()).text.length,e?n:(t.moveStart("character",-i.value.length),t.text.length-n)):void 0},value:function(){var e=0<l.length?l.val():h.data(g.value),t=Array.isArray(e)&&1===e.length&&""===e[0];return e===oe||t?"":e},values:function(e){var t=y.get.value();return""===t?"":!y.has.selectInput()&&y.is.multiple()?"string"==typeof t?(e?t:y.escape.htmlEntities(t)).split(f.delimiter):"":t},remoteValues:function(){var e=y.get.values(),i=!1;return e&&te.each(e="string"==typeof e?[e]:e,function(e,t){var n=y.read.remoteData(t);y.verbose("Restoring value from session data",n,t),n&&((i=i||{})[t]=n)}),i},choiceText:function(e,t){if(t=t!==oe?t:f.preserveHTML,e)return 0<e.find(p.menu).length&&(y.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(p.menu).remove(),e.find(p.menuIcon).remove()),e.data(g.text)!==oe?e.data(g.text):t?e.html()&&e.html().trim():e.text()&&e.text().trim()},choiceValue:function(e,t){return t=t||y.get.choiceText(e),!!e&&(e.data(g.value)!==oe?String(e.data(g.value)):"string"==typeof t?String(f.ignoreSearchCase?t.toLowerCase():t).trim():String(t))},inputEvent:function(){var e=P[0];return!!e&&(e.oninput!==oe?"input":e.onpropertychange!==oe?"propertychange":"keyup")},selectValues:function(){var a={},r=[],s=[];return h.find("option").each(function(){var e=te(this),t=e.html(),n=e.attr("disabled"),i=e.attr("value")!==oe?e.attr("value"):t,o=e.data(g.text)!==oe?e.data(g.text):t,e=e.parent("optgroup");"auto"===f.placeholder&&""===i?a.placeholder=t:(e.length===r.length&&e[0]===r[0]||(s.push({type:"header",divider:f.headerDivider,name:e.attr("label")||""}),r=e),s.push({name:t,value:i,text:o,disabled:n}))}),f.placeholder&&"auto"!==f.placeholder&&(y.debug("Setting placeholder value to",f.placeholder),a.placeholder=f.placeholder),f.sortSelect?(!0===f.sortSelect?s.sort(function(e,t){return e.name.localeCompare(t.name)}):"natural"===f.sortSelect?s.sort(function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}):te.isFunction(f.sortSelect)&&s.sort(f.sortSelect),a[C.values]=s,y.debug("Retrieved and sorted values from select",a)):(a[C.values]=s,y.debug("Retrieved values from select",a)),a},activeItem:function(){return b.filter("."+m.active)},selectedItem:function(){var e=b.not(p.unselectable).filter("."+m.selected);return 0<e.length?e:b.eq(0)},itemWithAdditions:function(e){var t=y.get.item(e),e=y.create.userChoice(e);return t=e&&0<e.length?0<t.length?t.add(e):e:t},item:function(n,i){var e,o,a=!1;return n=n!==oe?n:y.get.values()!==oe?y.get.values():y.get.text(),e=(o=y.is.multiple()&&Array.isArray(n))?0<n.length:n!==oe&&null!==n,i=""===n||!1===n||!0===n||(i||!1),e&&b.each(function(){var e=te(this),t=y.get.choiceText(e),t=y.get.choiceValue(e,t);if(null!==t&&t!==oe)if(o)-1!==te.inArray(y.escape.htmlEntities(String(t)),n.map(function(e){return String(e)}))&&(a=a?a.add(e):e);else if(i){if(y.verbose("Ambiguous dropdown value using strict type check",e,n),t===n)return a=e,!0}else if(f.ignoreCase&&(t=t.toLowerCase(),n=n.toLowerCase()),y.escape.htmlEntities(String(t))===y.escape.htmlEntities(String(n)))return y.verbose("Found select item by value",t,n),a=e,!0}),a},displayType:function(){return h.hasClass("column")?"flex":f.displayType}},check:{maxSelections:function(e){return!f.maxSelections||((e=e!==oe?e:y.get.selectionCount())>=f.maxSelections?(y.debug("Maximum selection count reached"),f.useLabels&&(b.addClass(m.filtered),y.add.message(x.maxSelections)),!0):(y.verbose("No longer at maximum selection count"),y.remove.message(),y.remove.filteredItem(),y.is.searchSelection()&&y.filterItems(),!1))},disabled:function(){P.attr("tabindex",y.is.disabled()?-1:0)}},restore:{defaults:function(e){y.clear(e),y.restore.defaultText(),y.restore.defaultValue()},defaultText:function(){var e=y.get.defaultText();e===y.get.placeholderText?(y.debug("Restoring default placeholder text",e),y.set.placeholderText(e)):(y.debug("Restoring default text",e),y.set.text(e))},placeholderText:function(){y.set.placeholderText()},defaultValue:function(){var e=y.get.defaultValue();e!==oe&&(y.debug("Restoring default value",e),""!==e?(y.set.value(e),y.set.selected()):(y.remove.activeItem(),y.remove.selectedItem()))},labels:function(){f.allowAdditions&&(f.useLabels||(y.error(S.labels),f.useLabels=!0),y.debug("Restoring selected values"),y.create.userLabels()),y.check.maxSelections()},selected:function(){y.restore.values(),y.is.multiple()?(y.debug("Restoring previously selected values and labels"),y.restore.labels()):y.debug("Restoring previously selected values")},values:function(){y.set.initialLoad(),f.apiSettings&&f.saveRemoteData&&y.get.remoteValues()?y.restore.remoteValues():y.set.selected();var e=y.get.value();!e||""===e||Array.isArray(e)&&0===e.length?l.addClass(m.noselection):l.removeClass(m.noselection),y.remove.initialLoad()},remoteValues:function(){var e=y.get.remoteValues();y.debug("Recreating selected from session data",e),e&&(y.is.single()?te.each(e,function(e,t){y.set.text(t)}):te.each(e,function(e,t){y.add.label(e,t)}))}},read:{remoteData:function(e){if(ne.Storage!==oe)return(e=sessionStorage.getItem(e))!==oe&&e;y.error(S.noStorage)}},save:{defaults:function(){y.save.defaultText(),y.save.placeholderText(),y.save.defaultValue()},defaultValue:function(){var e=y.get.value();y.verbose("Saving default value as",e),h.data(g.defaultValue,e)},defaultText:function(){var e=y.get.text();y.verbose("Saving default text as",e),h.data(g.defaultText,e)},placeholderText:function(){var e;!1!==f.placeholder&&F.hasClass(m.placeholder)&&(e=y.get.text(),y.verbose("Saving placeholder text as",e),h.data(g.placeholderText,e))},remoteData:function(e,t){ne.Storage!==oe?(y.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e)):y.error(S.noStorage)}},clear:function(e){y.is.multiple()&&f.useLabels?y.remove.labels(h.find(p.label),e):(y.remove.activeItem(),y.remove.selectedItem(),y.remove.filteredItem()),y.set.placeholderText(),y.clearValue(e)},clearValue:function(e){y.set.value("",null,null,e)},scrollPage:function(e,t){var t=t||y.get.selectedItem(),n=t.closest(p.menu),i=n.outerHeight(),o=n.scrollTop(),a=b.eq(0).outerHeight(),i=Math.floor(i/a),o=(n.prop("scrollHeight"),"up"==e?o-a*i:o+a*i),a=b.not(p.unselectable),i="up"==e?a.index(t)-i:a.index(t)+i,i=("up"==e?0<=i:i<a.length)?a.eq(i):"up"==e?a.first():a.last();0<i.length&&(y.debug("Scrolling page",e,i),t.removeClass(m.selected),i.addClass(m.selected),f.selectOnKeydown&&y.is.single()&&y.set.selectedItem(i),n.scrollTop(o))},set:{filtered:function(){var e=y.is.multiple(),t=y.is.searchSelection(),n=e&&t,t=t?y.get.query():"",i="string"==typeof t&&0<t.length,o=y.get.searchWidth(),t=""!==t;e&&i&&(y.verbose("Adjusting input width",o,f.glyphWidth),P.css("width",o)),i||n&&t?(y.verbose("Hiding placeholder text"),F.addClass(m.filtered)):e&&(!n||t)||(y.verbose("Showing placeholder text"),F.removeClass(m.filtered))},empty:function(){h.addClass(m.empty)},loading:function(){h.addClass(m.loading)},placeholderText:function(e){e=e||y.get.placeholderText(),y.debug("Setting placeholder text",e),y.set.text(e),F.addClass(m.placeholder)},tabbable:function(){y.is.searchSelection()?(y.debug("Added tabindex to searchable dropdown"),P.val(""),y.check.disabled(),v.attr("tabindex",-1)):(y.debug("Added tabindex to dropdown"),h.attr("tabindex")===oe&&(h.attr("tabindex",0),v.attr("tabindex",-1)))},initialLoad:function(){y.verbose("Setting initial load"),e=!0},activeItem:function(e){f.allowAdditions&&0<e.filter(p.addition).length?e.addClass(m.filtered):e.addClass(m.active)},partialSearch:function(e){var t=y.get.query().length;P.val(e.substr(0,t))},scrollPosition:function(e,t){var n,i,o=(e=e||y.get.selectedItem()).closest(p.menu),a=e&&0<e.length;t=t!==oe&&t,0===y.get.activeItem().length&&(t=!1),e&&0<o.length&&a&&(e.position().top,o.addClass(m.loading),e=(a=o.scrollTop())-o.offset().top+e.offset().top,t||(i=a+o.height()<e+5,n=e-5<a),y.debug("Scrolling to active item",e),(t||n||i)&&o.scrollTop(e),o.removeClass(m.loading))},text:function(e){"combo"===f.action?(y.debug("Changing combo button text",e,I),f.preserveHTML?I.html(e):I.text(e)):"activate"===f.action&&(e!==y.get.placeholderText()&&F.removeClass(m.placeholder),y.debug("Changing text",e,F),F.removeClass(m.filtered),f.preserveHTML?F.html(e):F.text(e))},selectedItem:function(e){var t=y.get.choiceValue(e),n=y.get.choiceText(e,!1),i=y.get.choiceText(e,!0);y.debug("Setting user selection to item",e),y.remove.activeItem(),y.set.partialSearch(n),y.set.activeItem(e),y.set.selected(t,e),y.set.text(i)},selectedLetter:function(e){var t=b.filter("."+m.selected),n=0<t.length&&y.has.firstLetter(t,e),i=!1;n&&(n=t.nextAll(b).eq(0),y.has.firstLetter(n,e)&&(i=n)),i||b.each(function(){if(y.has.firstLetter(te(this),e))return i=te(this),!1}),i&&(y.verbose("Scrolling to next value with letter",e),y.set.scrollPosition(i),t.removeClass(m.selected),i.addClass(m.selected),f.selectOnKeydown&&y.is.single()&&y.set.selectedItem(i))},direction:function(e){"auto"==f.direction?(e?y.is.upward(e)&&y.remove.upward(e):y.remove.upward(),(y.can.openDownward(e)?y.remove:y.set).upward(e),y.is.leftward(e)||y.can.openRightward(e)||y.set.leftward(e)):"upward"==f.direction&&y.set.upward(e)},upward:function(e){(e||h).addClass(m.upward)},leftward:function(e){(e||v).addClass(m.leftward)},value:function(e,t,n,i){e===oe||""===e||Array.isArray(e)&&0===e.length?l.addClass(m.noselection):l.removeClass(m.noselection);var o=y.escape.value(e),a=0<l.length,r=y.get.values(),s=e!==oe?String(e):e;if(a){if(!f.allowReselection&&s==r&&(y.verbose("Skipping value update already same value",e,r),!y.is.initialLoad()))return;y.is.single()&&y.has.selectInput()&&y.can.extendSelect()&&(y.debug("Adding user option",e),y.add.optionValue(e)),y.debug("Updating input value",o,r),q=!0,l.val(o),!1===f.fireOnInit&&y.is.initialLoad()?y.debug("Input native change event ignored on initial load"):!0!==i&&y.trigger.change(),q=!1}else y.verbose("Storing value in metadata",o,l),o!==r&&h.data(g.value,s);!1===f.fireOnInit&&y.is.initialLoad()?y.verbose("No callback on initial load",f.onChange):!0!==i&&f.onChange.call(N,e,t,n)},active:function(){h.addClass(m.active)},multiple:function(){h.addClass(m.multiple)},visible:function(){h.addClass(m.visible)},exactly:function(e,t){y.debug("Setting selected to exact values"),y.clear(),y.set.selected(e,t)},selected:function(e,s,l,c){var u=y.is.multiple();(s=f.allowAdditions?s||y.get.itemWithAdditions(e):s||y.get.item(e))&&(y.debug("Setting selected menu item to",s),y.is.multiple()&&y.remove.searchWidth(),y.is.single()?(y.remove.activeItem(),y.remove.selectedItem()):f.useLabels&&y.remove.selectedItem(),s.each(function(){var e=te(this),t=y.get.choiceText(e),n=y.get.choiceValue(e,t),i=e.hasClass(m.filtered),o=e.hasClass(m.active),a=e.hasClass(m.addition),r=u&&1==s.length;u?!o||a?(f.apiSettings&&f.saveRemoteData&&y.save.remoteData(t,n),f.useLabels?(y.add.label(n,t,r),y.add.value(n,t,e),y.set.activeItem(e),y.filterActive(),y.select.nextAvailable(s)):(y.add.value(n,t,e),y.set.text(y.add.variables(x.count)),y.set.activeItem(e))):i||!f.useLabels&&!d||(y.debug("Selected active value, removing label"),y.remove.selected(n)):(f.apiSettings&&f.saveRemoteData&&y.save.remoteData(t,n),c||y.set.text(t),y.set.value(n,t,e,l),e.addClass(m.active).addClass(m.selected))}),c||y.remove.searchTerm())}},add:{label:function(e,t,n){var i,o=y.is.searchSelection()?P:F,a=y.escape.value(e);f.ignoreCase&&(a=a.toLowerCase()),i=te("<a />").addClass(m.label).attr("data-"+g.value,a).html(D.label(a,t,f.preserveHTML,f.className)),i=f.onLabelCreate.call(i,a,t),y.has.label(e)?y.debug("User selection already exists, skipping",a):(f.label.variation&&i.addClass(f.label.variation),!0===n?(y.debug("Animating in label",i),i.addClass(m.hidden).insertBefore(o).transition({animation:f.label.transition,debug:f.debug,verbose:f.verbose,duration:f.label.duration})):(y.debug("Adding selection label",i),i.insertBefore(o)))},message:function(e){var t=v.children(p.message),e=f.templates.message(y.add.variables(e));0<t.length?t.html(e):te("<div/>").html(e).addClass(m.message).appendTo(v)},optionValue:function(e){var t=y.escape.value(e);0<l.find('option[value="'+y.escape.string(t)+'"]').length||(y.disconnect.selectObserver(),y.is.single()&&(y.verbose("Removing previous user addition"),l.find("option."+m.addition).remove()),te("<option/>").prop("value",t).addClass(m.addition).html(e).appendTo(l),y.verbose("Adding user addition as an <option>",e),y.observe.select())},userSuggestion:function(e){var t=v.children(p.addition),n=y.get.item(e),n=n&&n.not(p.addition).length,i=0<t.length;f.useLabels&&y.has.maxSelections()||(""===e||n?t.remove():(i?(t.data(g.value,e).data(g.text,e).attr("data-"+g.value,e).attr("data-"+g.text,e).removeClass(m.filtered),f.hideAdditions||(n=f.templates.addition(y.add.variables(x.addResult,e)),t.html(n)),y.verbose("Replacing user suggestion with new value",t)):((t=y.create.userChoice(e)).prependTo(v),y.verbose("Adding item choice to menu corresponding with user choice addition",t)),f.hideAdditions&&!y.is.allFiltered()||t.addClass(m.selected).siblings().removeClass(m.selected),y.refreshItems()))},variables:function(e,t){var n,i=-1!==e.search("{count}"),o=-1!==e.search("{maxCount}"),a=-1!==e.search("{term}");return y.verbose("Adding templated variables to message",e),i&&(n=y.get.selectionCount(),e=e.replace("{count}",n)),o&&(n=y.get.selectionCount(),e=e.replace("{maxCount}",f.maxSelections)),a&&(i=t||y.get.query(),e=e.replace("{term}",i)),e},value:function(e,t,n){var i,o=y.get.values(!0);y.has.value(e)?y.debug("Value already selected"):""!==e?(i=Array.isArray(o)?(i=o.concat([e]),y.get.uniqueArray(i)):[e],y.has.selectInput()?y.can.extendSelect()&&(y.debug("Adding value to select",e,i,l),y.add.optionValue(e)):(i=i.join(f.delimiter),y.debug("Setting hidden input to delimited value",i,l)),!1===f.fireOnInit&&y.is.initialLoad()?y.verbose("Skipping onadd callback on initial load",f.onAdd):f.onAdd.call(N,e,t,n),y.set.value(i,t,n),y.check.maxSelections()):y.debug("Cannot select blank values from multiselect")}},remove:{active:function(){h.removeClass(m.active)},activeLabel:function(){h.find(p.label).removeClass(m.active)},empty:function(){h.removeClass(m.empty)},loading:function(){h.removeClass(m.loading)},initialLoad:function(){e=!1},upward:function(e){(e||h).removeClass(m.upward)},leftward:function(e){(e||v).removeClass(m.leftward)},visible:function(){h.removeClass(m.visible)},activeItem:function(){b.removeClass(m.active)},filteredItem:function(){f.useLabels&&y.has.maxSelections()||((f.useLabels&&y.is.multiple()?b.not("."+m.active):b).removeClass(m.filtered),f.hideDividers&&j.removeClass(m.hidden),y.remove.empty())},optionValue:function(e){var e=y.escape.value(e),t=l.find('option[value="'+y.escape.string(e)+'"]');0<t.length&&t.hasClass(m.addition)&&(s&&(s.disconnect(),y.verbose("Temporarily disconnecting mutation observer")),t.remove(),y.verbose("Removing user addition as an <option>",e),s&&s.observe(l[0],{childList:!0,subtree:!0}))},message:function(){v.children(p.message).remove()},searchWidth:function(){P.css("width","")},searchTerm:function(){y.verbose("Cleared search term"),P.val(""),y.set.filtered()},userAddition:function(){b.filter(p.addition).remove()},selected:function(e,t,i){if(!(t=f.allowAdditions?t||y.get.itemWithAdditions(e):t||y.get.item(e)))return!1;t.each(function(){var e=te(this),t=y.get.choiceText(e),n=y.get.choiceValue(e,t);y.is.multiple()?f.useLabels?(y.remove.value(n,t,e,i),y.remove.label(n)):(y.remove.value(n,t,e,i),0===y.get.selectionCount()?y.set.placeholderText():y.set.text(y.add.variables(x.count))):y.remove.value(n,t,e,i),e.removeClass(m.filtered).removeClass(m.active),f.useLabels&&e.removeClass(m.selected)})},selectedItem:function(){b.removeClass(m.selected)},value:function(e,t,n,i){var o,a=y.get.values();e=y.escape.htmlEntities(e),y.has.selectInput()?(y.verbose("Input is <select> removing selected option",e),o=y.remove.arrayValue(e,a),y.remove.optionValue(e)):(y.verbose("Removing from delimited values",e),o=(o=y.remove.arrayValue(e,a)).join(f.delimiter)),!1===f.fireOnInit&&y.is.initialLoad()?y.verbose("No callback on initial load",f.onRemove):f.onRemove.call(N,e,t,n),y.set.value(o,t,n,i),y.check.maxSelections()},arrayValue:function(t,e){return Array.isArray(e)||(e=[e]),e=te.grep(e,function(e){return t!=e}),y.verbose("Removed value from delimited string",t,e),e},label:function(e,t){e=y.escape.value(e),e=h.find(p.label).filter("[data-"+g.value+'="'+y.escape.string(f.ignoreCase?e.toLowerCase():e)+'"]');y.verbose("Removing label",e),e.remove()},activeLabels:function(e){e=e||h.find(p.label).filter("."+m.active),y.verbose("Removing active label selections",e),y.remove.labels(e)},labels:function(e,o){e=e||h.find(p.label),y.verbose("Removing labels",e),e.each(function(){var e=te(this),t=e.data(g.value),n=t!==oe?String(t):t,i=y.is.userValue(n);!1!==f.onLabelRemove.call(e,t)?(y.remove.message(),i?(y.remove.value(n,n,y.get.item(n),o),y.remove.label(n)):y.remove.selected(n,!1,o)):y.debug("Label remove callback cancelled removal")})},tabbable:function(){y.is.searchSelection()?(y.debug("Searchable dropdown initialized"),P.removeAttr("tabindex")):(y.debug("Simple selection dropdown initialized"),h.removeAttr("tabindex")),v.removeAttr("tabindex")},diacritics:function(e){return f.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}},has:{menuSearch:function(){return y.has.search()&&0<P.closest(v).length},clearItem:function(){return 0<M.length},search:function(){return 0<P.length},sizer:function(){return 0<O.length},selectInput:function(){return l.is("select")},minCharacters:function(e){return f.minCharacters&&!z?(e=e!==oe?String(e):String(y.get.query())).length>=f.minCharacters:!(z=!1)},firstLetter:function(e,t){return!(!e||0===e.length||"string"!=typeof t)&&(e=y.get.choiceText(e,!1),(t=t.toLowerCase())==String(e).charAt(0).toLowerCase())},input:function(){return 0<l.length},items:function(){return 0<b.length},menu:function(){return 0<v.length},subMenu:function(e){return 0<(e||v).find(p.menu).length},message:function(){return 0!==v.children(p.message).length},label:function(e){var e=y.escape.value(e),t=h.find(p.label);return f.ignoreCase&&(e=e.toLowerCase()),0<t.filter("[data-"+g.value+'="'+y.escape.string(e)+'"]').length},maxSelections:function(){return f.maxSelections&&y.get.selectionCount()>=f.maxSelections},allResultsFiltered:function(){var e=b.not(p.addition);return e.filter(p.unselectable).length===e.length},userSuggestion:function(){return 0<v.children(p.addition).length},query:function(){return""!==y.get.query()},value:function(e){return f.ignoreCase?y.has.valueIgnoringCase(e):y.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=y.get.values(!0);return!!(Array.isArray(t)?t&&-1!==te.inArray(e,t):t==e)},valueIgnoringCase:function(n){var e=y.get.values(!0),i=!1;return Array.isArray(e)||(e=[e]),te.each(e,function(e,t){if(String(n).toLowerCase()==String(t).toLowerCase())return!(i=!0)}),i}},is:{active:function(){return h.hasClass(m.active)},animatingInward:function(){return v.transition("is inward")},animatingOutward:function(){return v.transition("is outward")},bubbledLabelClick:function(e){return te(e.target).is("select, input")&&0<h.closest("label").length},bubbledIconClick:function(e){return 0<te(e.target).closest(R).length},chrome:function(){return!(!ne.chrome||!ne.chrome.webstore&&!ne.chrome.runtime)},alreadySetup:function(){return h.is("select")&&h.parent(p.dropdown).data(A)!==oe&&0===h.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):v.transition&&v.transition("is animating")},leftward:function(e){return(e||v).hasClass(m.leftward)},clearable:function(){return h.hasClass(m.clearable)||f.clearable},disabled:function(){return h.hasClass(m.disabled)},focused:function(){return ie.activeElement===h[0]},focusedOnSearch:function(){return ie.activeElement===P[0]},allFiltered:function(){return(y.is.multiple()||y.has.search())&&!(0==f.hideAdditions&&y.has.userSuggestion())&&!y.has.message()&&y.has.allResultsFiltered()},hidden:function(e){return!y.is.visible(e)},initialLoad:function(){return e},inObject:function(n,e){var i=!1;return te.each(e,function(e,t){if(t==n)return i=!0}),i},multiple:function(){return h.hasClass(m.multiple)},remote:function(){return f.apiSettings&&y.can.useAPI()},noApiCache:function(){return f.apiSettings&&!f.apiSettings.cache},single:function(){return!y.is.multiple()},selectMutation:function(e){var n=!1;return te.each(e,function(e,t){if(te(t.target).is("select")||te(t.addedNodes).is("select"))return!(n=!0)}),n},search:function(){return h.hasClass(m.search)},searchSelection:function(){return y.has.search()&&1===P.parent(p.dropdown).length},selection:function(){return h.hasClass(m.selection)},userValue:function(e){return-1!==te.inArray(e,y.get.userValues())},upward:function(e){return(e||h).hasClass(m.upward)},visible:function(e){return(e||v).hasClass(m.visible)},verticallyScrollableContext:function(){var e=E.get(0)!==ne&&E.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=E.get(0)!==ne&&E.css("overflow-X");return"auto"==e||"scroll"==e}},can:{activate:function(e){return!!f.useLabels||(!y.has.maxSelections()||!(!y.has.maxSelections()||!e.hasClass(m.active)))},openDownward:function(e){var t,e=e||v,n=!0;return e.addClass(m.loading),t={context:{offset:E.get(0)===ne?{top:0,left:0}:E.offset(),scrollTop:E.scrollTop(),height:E.outerHeight()},menu:{offset:e.offset(),height:e.outerHeight()}},y.is.verticallyScrollableContext()&&(t.menu.offset.top+=t.context.scrollTop),y.has.subMenu(e)&&(t.menu.height+=e.find(p.menu).first().outerHeight()),n=(t={above:t.context.scrollTop<=t.menu.offset.top-t.context.offset.top-t.menu.height,below:t.context.scrollTop+t.context.height>=t.menu.offset.top-t.context.offset.top+t.menu.height}).below?(y.verbose("Dropdown can fit in context downward",t),!0):t.above?(y.verbose("Dropdown cannot fit below, opening upward",t),!1):(y.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),e.removeClass(m.loading),n},openRightward:function(e){var t,e=e||v,n=!0;return e.addClass(m.loading),t={context:{offset:E.get(0)===ne?{top:0,left:0}:E.offset(),scrollLeft:E.scrollLeft(),width:E.outerWidth()},menu:{offset:e.offset(),width:e.outerWidth()}},y.is.horizontallyScrollableContext()&&(t.menu.offset.left+=t.context.scrollLeft),(t=t.menu.offset.left-t.context.offset.left+t.menu.width>=t.context.scrollLeft+t.context.width)&&(y.verbose("Dropdown cannot fit in context rightward",t),n=!1),e.removeClass(m.loading),n},click:function(){return K||"click"==f.on},extendSelect:function(){return f.allowAdditions||f.apiSettings},show:function(){return!y.is.disabled()&&(y.has.items()||y.has.message())},useAPI:function(){return te.fn.api!==oe}},animate:{show:function(e,t){var n=t||v,i=t?function(){}:function(){y.hideSubMenus(),y.hideOthers(),y.set.active()};e=te.isFunction(e)?e:function(){},y.verbose("Doing menu show animation",n),y.set.direction(t),t=f.transition.showMethod||y.get.transition(t),y.is.selection()&&y.set.scrollPosition(y.get.selectedItem(),!0),(y.is.hidden(n)||y.is.animating(n))&&("none"===t?(i(),n.transition({displayType:y.get.displayType()}).transition("show"),e.call(N)):te.fn.transition!==oe&&h.transition("is supported")?n.transition({animation:t+" in",debug:f.debug,verbose:f.verbose,duration:f.transition.showDuration||f.duration,queue:!0,onStart:i,displayType:y.get.displayType(),onComplete:function(){e.call(N)}}):y.error(S.noTransition,t))},hide:function(e,t){var n=t||v,i=t?function(){}:function(){y.can.click()&&y.unbind.intent(),y.remove.active()},t=f.transition.hideMethod||y.get.transition(t);e=te.isFunction(e)?e:function(){},(y.is.visible(n)||y.is.animating(n))&&(y.verbose("Doing menu hide animation",n),"none"===t?(i(),n.transition({displayType:y.get.displayType()}).transition("hide"),e.call(N)):te.fn.transition!==oe&&h.transition("is supported")?n.transition({animation:t+" out",duration:f.transition.hideDuration||f.duration,debug:f.debug,verbose:f.verbose,queue:!1,onStart:i,displayType:y.get.displayType(),onComplete:function(){e.call(N)}}):y.error(S.transition))}},hideAndClear:function(){y.remove.searchTerm(),y.has.maxSelections()||(y.has.search()?y.hide(function(){y.remove.filteredItem()}):y.hide())},delay:{show:function(){y.verbose("Delaying show event to ensure user intent"),clearTimeout(y.timer),y.timer=setTimeout(y.show,f.delay.show)},hide:function(){y.verbose("Delaying hide event to ensure user intent"),clearTimeout(y.timer),y.timer=setTimeout(y.hide,f.delay.hide)}},escape:{value:function(e){var t=Array.isArray(e),n="string"==typeof e,i=!n&&!t,n=n&&-1!==e.search(T.quote),o=[];return i||!n?e:(y.debug("Encoding quote values for use in select",e),t?(te.each(e,function(e,t){o.push(t.replace(T.quote,"""))}),o):e.replace(T.quote,"""))},string:function(e){return(e=String(e)).replace(T.escape,"\\$&")},htmlEntities:function(e){var t={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return t[e]}):e}},setting:function(e,t){if(y.debug("Changing setting",e,t),te.isPlainObject(e))te.extend(!0,f,e);else{if(t===oe)return f[e];te.isPlainObject(f[e])?te.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(te.isPlainObject(e))te.extend(!0,y,e);else{if(t===oe)return y[e];y[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?y.performance.log(arguments):(y.debug=Function.prototype.bind.call(console.info,console,f.name+":"),y.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?y.performance.log(arguments):(y.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),y.verbose.apply(console,arguments)))},error:function(){f.silent||(y.error=Function.prototype.bind.call(console.error,console,f.name+":"),y.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-(G||t),G=t,J.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:N,"Execution Time":n})),clearTimeout(y.performance.timer),y.performance.timer=setTimeout(y.performance.display,500)},display:function(){var e=f.name+":",n=0;G=!1,clearTimeout(y.performance.timer),te.each(J,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",X&&(e+=" '"+X+"'"),(console.group!==oe||console.table!==oe)&&0<J.length&&(console.groupCollapsed(e),console.table?console.table(J):te.each(J,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),J=[]}},invoke:function(i,e,t){var o,a,n,r=U;return e=e||ee,t=N||t,"string"==typeof i&&r!==oe&&(i=i.split(/[\. ]/),o=i.length-1,te.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(te.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==oe)return a=r[n],!1;{if(!te.isPlainObject(r[t])||e==o)return r[t]!==oe?a=r[t]:y.error(S.method,i),!1;r=r[t]}}})),te.isFunction(a)?n=a.apply(t,e):a!==oe&&(n=a),Array.isArray(W)?W.push(n):W!==oe?W=[W,n]:n!==oe&&(W=n),a}};_?(U===oe&&y.initialize(),y.invoke(Z)):(U!==oe&&U.invoke("destroy"),y.initialize())}),W!==oe?W:Y},te.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,clearable:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:ne,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,ignoreSearchCase:!0,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,displayType:!1,glyphWidth:1.037,headerDivider:!0,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onSearch:function(e){},onLabelSelect:function(e){},onLabelCreate:function(e,t){return te(this)},onLabelRemove:function(e){return!0},onNoResults:function(e){return!0},onShow:function(){},onHide:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s:=@]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",description:"description",descriptionVertical:"descriptionVertical",value:"value",text:"text",type:"type",image:"image",imageClass:"imageClass",icon:"icon",iconClass:"iconClass",class:"class",divider:"divider"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",divider:".divider, .header",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> span.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered",clearIcon:"> .remove.icon"},className:{active:"active",addition:"addition",animating:"animating",description:"description",descriptionVertical:"vertical",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",icon:"icon",image:"image",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",text:"text",upward:"upward",leftward:"left",visible:"visible",clearable:"clearable",noselection:"noselection",delete:"delete",header:"header",divider:"divider",groupIcon:"",unfilterable:"unfilterable"}},te.fn.dropdown.settings.templates={deQuote:function(e,t){return String(e).replace(/"/g,t?""":"")},escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e},dropdown:function(e,t,n,i){var o=e.placeholder||!1,a="",r=te.fn.dropdown.settings.templates.escape;return a=(a=(a=(a+='<i class="dropdown icon"></i>')+(o?'<div class="default text">'+r(o,n)+"</div>":'<div class="text"></div>'))+('<div class="'+i.menu+'">'))+te.fn.dropdown.settings.templates.menu(e,t,n,i)+"</div>"},menu:function(e,l,c,u){var e=e[l.values]||[],d="",f=te.fn.dropdown.settings.templates.escape,m=te.fn.dropdown.settings.templates.deQuote;return te.each(e,function(e,t){var n,i,o,a,r=t[l.type]||"item",s=-1!==r.indexOf("menu");"item"===r||s?(n=t[l.text]?' data-text="'+m(t[l.text],!0)+'"':"",o=t[l.disabled]?u.disabled+" ":"",a=t[l.descriptionVertical]?u.descriptionVertical+" ":"",i=""!=f(t[l.description]||"",c),d+='<div class="'+o+a+(t[l.class]?m(t[l.class]):u.item)+'" data-value="'+m(t[l.value],!0)+'"'+n+">",s&&(d+='<i class="'+(-1!==r.indexOf("left")?"left":"")+' dropdown icon"></i>'),t[l.image]&&(d+='<img class="'+(t[l.imageClass]?m(t[l.imageClass]):u.image)+'" src="'+m(t[l.image])+'">'),t[l.icon]&&(d+='<i class="'+m(t[l.icon])+" "+(t[l.iconClass]?m(t[l.iconClass]):u.icon)+'"></i>'),i&&(d=(d+='<span class="'+u.description+'">'+f(t[l.description]||"",c)+"</span>")+(s?"":'<span class="'+u.text+'">')),s&&(d+='<span class="'+u.text+'">'),d+=f(t[l.name]||"",c),s?d=(d=d+'</span><div class="'+r+'">')+te.fn.dropdown.settings.templates.menu(t,l,c,u)+"</div>":i&&(d+="</span>"),d+="</div>"):"header"===r&&(o=f(t[l.name]||"",c),a=t[l.icon]?m(t[l.icon]):u.groupIcon,""===o&&""===a||(d+='<div class="'+(t[l.class]?m(t[l.class]):u.header)+'">',""!==a&&(d+='<i class="'+a+" "+(t[l.iconClass]?m(t[l.iconClass]):u.icon)+'"></i>'),d=d+o+"</div>"),t[l.divider]&&(d+='<div class="'+u.divider+'"></div>'))}),d},label:function(e,t,n,i){return(0,te.fn.dropdown.settings.templates.escape)(t,n)+'<i class="'+i.delete+' icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document),function(T,e,S){"use strict";T.isFunction=T.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),T.fn.embed=function(p){var h,v=T(this),b=v.selector||"",y=(new Date).getTime(),x=[],C=p,w="string"==typeof C,k=[].slice.call(arguments,1);return v.each(function(){var i=T.isPlainObject(p)?T.extend(!0,{},T.fn.embed.settings,p):T.extend({},T.fn.embed.settings),e=i.selector,t=i.className,o=i.sources,u=i.error,a=i.metadata,d=i.namespace,f=i.templates,m="."+d,g="module-"+d,r=T(this),n=(r.find(e.placeholder),r.find(e.icon),r.find(e.embed)),s=this,l=r.data(g),c={initialize:function(){c.debug("Initializing embed"),c.determine.autoplay(),c.create(),c.bind.events(),c.instantiate()},instantiate:function(){c.verbose("Storing instance of module",c),l=c,r.data(g,c)},destroy:function(){c.verbose("Destroying previous instance of embed"),c.reset(),r.removeData(g).off(m)},refresh:function(){c.verbose("Refreshing selector cache"),r.find(e.placeholder),r.find(e.icon),n=r.find(e.embed)},bind:{events:function(){c.has.placeholder()&&(c.debug("Adding placeholder events"),r.on("click"+m,e.placeholder,c.createAndShow).on("click"+m,e.icon,c.createAndShow))}},create:function(){c.get.placeholder()?c.createPlaceholder():c.createAndShow()},createPlaceholder:function(e){var t=c.get.icon(),n=c.get.url();c.generate.embed(n);e=e||c.get.placeholder(),r.html(f.placeholder(e,t)),c.debug("Creating placeholder for embed",e,t)},createEmbed:function(e){c.refresh(),e=e||c.get.url(),n=T("<div/>").addClass(t.embed).html(c.generate.embed(e)).appendTo(r),i.onCreate.call(s,e),c.debug("Creating embed object",n)},changeEmbed:function(e){n.html(c.generate.embed(e))},createAndShow:function(){c.createEmbed(),c.show()},change:function(e,t,n){c.debug("Changing video to ",e,t,n),r.data(a.source,e).data(a.id,t),n?r.data(a.url,n):r.removeData(a.url),c.has.embed()?c.changeEmbed():c.create()},reset:function(){c.debug("Clearing embed and showing placeholder"),c.remove.data(),c.remove.active(),c.remove.embed(),c.showPlaceholder(),i.onReset.call(s)},show:function(){c.debug("Showing embed"),c.set.active(),i.onDisplay.call(s)},hide:function(){c.debug("Hiding embed"),c.showPlaceholder()},showPlaceholder:function(){c.debug("Showing placeholder image"),c.remove.active(),i.onPlaceholderDisplay.call(s)},get:{id:function(){return i.id||r.data(a.id)},placeholder:function(){return i.placeholder||r.data(a.placeholder)},icon:function(){return i.icon||(r.data(a.icon)!==S?r.data(a.icon):c.determine.icon())},source:function(e){return i.source||(r.data(a.source)!==S?r.data(a.source):c.determine.source())},type:function(){var e=c.get.source();return o[e]!==S&&o[e].type},url:function(){return i.url||(r.data(a.url)!==S?r.data(a.url):c.determine.url())}},determine:{autoplay:function(){c.should.autoplay()&&(i.autoplay=!0)},source:function(n){var i=!1;return(n=n||c.get.url())&&T.each(o,function(e,t){if(-1!==n.search(t.domain))return i=e,!1}),i},icon:function(){var e=c.get.source();return o[e]!==S&&o[e].icon},url:function(){var e=i.id||r.data(a.id),t=i.source||r.data(a.source),t=o[t]!==S&&o[t].url.replace("{id}",e);return t&&r.data(a.url,t),t}},set:{active:function(){r.addClass(t.active)}},remove:{data:function(){r.removeData(a.id).removeData(a.icon).removeData(a.placeholder).removeData(a.source).removeData(a.url)},active:function(){r.removeClass(t.active)},embed:function(){n.empty()}},encode:{parameters:function(e){var t,n=[];for(t in e)n.push(encodeURIComponent(t)+"="+encodeURIComponent(e[t]));return n.join("&")}},generate:{embed:function(e){c.debug("Generating embed html");var t,n=c.get.source();return(e=c.get.url(e))?(n=c.generate.parameters(n),t=f.iframe(e,n)):c.error(u.noURL,r),t},parameters:function(e,t){e=o[e]&&o[e].parameters!==S?o[e].parameters(i):{};return(t=t||i.parameters)&&(e=T.extend({},e,t)),e=i.onEmbed(e),c.encode.parameters(e)}},has:{embed:function(){return 0<n.length},placeholder:function(){return i.placeholder||r.data(a.placeholder)}},should:{autoplay:function(){return"auto"===i.autoplay?i.placeholder||r.data(a.placeholder)!==S:i.autoplay}},is:{video:function(){return"video"==c.get.type()}},setting:function(e,t){if(c.debug("Changing setting",e,t),T.isPlainObject(e))T.extend(!0,i,e);else{if(t===S)return i[e];T.isPlainObject(i[e])?T.extend(!0,i[e],t):i[e]=t}},internal:function(e,t){if(T.isPlainObject(e))T.extend(!0,c,e);else{if(t===S)return c[e];c[e]=t}},debug:function(){!i.silent&&i.debug&&(i.performance?c.performance.log(arguments):(c.debug=Function.prototype.bind.call(console.info,console,i.name+":"),c.debug.apply(console,arguments)))},verbose:function(){!i.silent&&i.verbose&&i.debug&&(i.performance?c.performance.log(arguments):(c.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),c.verbose.apply(console,arguments)))},error:function(){i.silent||(c.error=Function.prototype.bind.call(console.error,console,i.name+":"),c.error.apply(console,arguments))},performance:{log:function(e){var t,n;i.performance&&(n=(t=(new Date).getTime())-(y||t),y=t,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:s,"Execution Time":n})),clearTimeout(c.performance.timer),c.performance.timer=setTimeout(c.performance.display,500)},display:function(){var e=i.name+":",n=0;y=!1,clearTimeout(c.performance.timer),T.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),1<v.length&&(e+=" ("+v.length+")"),(console.group!==S||console.table!==S)&&0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):T.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(i,e,t){var o,a,n,r=l;return e=e||k,t=s||t,"string"==typeof i&&r!==S&&(i=i.split(/[\. ]/),o=i.length-1,T.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(T.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==S)return a=r[n],!1;{if(!T.isPlainObject(r[t])||e==o)return r[t]!==S?a=r[t]:c.error(u.method,i),!1;r=r[t]}}})),T.isFunction(a)?n=a.apply(t,e):a!==S&&(n=a),Array.isArray(h)?h.push(n):h!==S?h=[h,n]:n!==S&&(h=n),a}};w?(l===S&&c.initialize(),c.invoke(C)):(l!==S&&l.invoke("destroy"),c.initialize())}),h!==S?h:this},T.fn.embed.settings={name:"Embed",namespace:"embed",silent:!1,debug:!1,verbose:!1,performance:!0,icon:!1,source:!1,url:!1,id:!1,autoplay:"auto",color:"#444444",hd:!0,brandedUI:!1,parameters:!1,onDisplay:function(){},onPlaceholderDisplay:function(){},onReset:function(){},onCreate:function(e){},onEmbed:function(e){return e},metadata:{id:"id",icon:"icon",placeholder:"placeholder",source:"source",url:"url"},error:{noURL:"No URL specified",method:"The method you called is not defined"},className:{active:"active",embed:"embed"},selector:{embed:".embed",placeholder:".placeholder",icon:".icon"},sources:{youtube:{name:"youtube",type:"video",icon:"video play",domain:"youtube.com",url:"//www.youtube.com/embed/{id}",parameters:function(e){return{autohide:!e.brandedUI,autoplay:e.autoplay,color:e.color||S,hq:e.hd,jsapi:e.api,modestbranding:!e.brandedUI}}},vimeo:{name:"vimeo",type:"video",icon:"video play",domain:"vimeo.com",url:"//player.vimeo.com/video/{id}",parameters:function(e){return{api:e.api,autoplay:e.autoplay,byline:e.brandedUI,color:e.color||S,portrait:e.brandedUI,title:e.brandedUI}}}},templates:{iframe:function(e,t){return t&&(e+="?"+t),'<iframe src="'+e+'" width="100%" height="100%" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'},placeholder:function(e,t){var n="";return t&&(n+='<i class="'+t+' icon"></i>'),e&&(n+='<img class="placeholder" src="'+e+'">'),n}},api:!1,onPause:function(){},onPlay:function(){},onStop:function(){}}}(jQuery,window,void document),function(z,N,H,U){"use strict";z.isFunction=z.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},N=void 0!==N&&N.Math==Math?N:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),z.fn.modal=function(A){var E,e=z(this),F=z(N),P=z(H),O=z("body"),R=e.selector||"",M=(new Date).getTime(),I=[],j=A,L="string"==typeof j,V=[].slice.call(arguments,1),q=N.requestAnimationFrame||N.mozRequestAnimationFrame||N.webkitRequestAnimationFrame||N.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var a,o,n,i,t,f,m,e,g,p,r=z.isPlainObject(A)?z.extend(!0,{},z.fn.modal.settings,A):z.extend({},z.fn.modal.settings),s=r.selector,l=r.className,h=r.namespace,v=r.fields,b=r.error,y="."+h,x="module-"+h,c=z(this),C=z(r.context),w=c.find(s.close),u=this,k=c.hasClass("modal")?c.data(x):U,T=!1,S="",D="",d={initialize:function(){var a;c.hasClass("modal")||(d.create.modal(),z.isFunction(r.onHidden)||(r.onHidden=function(){d.destroy(),c.remove()})),c.addClass(r.class),""!==r.title&&c.find(s.title).html(d.helpers.escape(r.title,r.preserveHTML)).addClass(r.classTitle),""!==r.content&&c.find(s.content).html(d.helpers.escape(r.content,r.preserveHTML)).addClass(r.classContent),d.has.configActions()&&(0===(a=c.find(s.actions).addClass(r.classActions)).length?a=z("<div/>",{class:l.actions+" "+(r.classActions||"")}).appendTo(c):a.empty(),r.actions.forEach(function(e){var t=e[v.icon]?'<i class="'+d.helpers.deQuote(e[v.icon])+' icon"></i>':"",n=d.helpers.escape(e[v.text]||"",r.preserveHTML),i=d.helpers.deQuote(e[v.class]||""),o=e[v.click]&&z.isFunction(e[v.click])?e[v.click]:function(){};a.append(z("<button/>",{html:t+n,class:l.button+" "+i,click:function(){!1!==o.call(u,c)&&d.hide()}}))})),d.cache={},d.verbose("Initializing dimmer",C),d.create.id(),d.create.dimmer(),r.allowMultiple&&d.create.innerDimmer(),r.centered||c.addClass("top aligned"),d.refreshModals(),d.bind.events(),r.observeChanges&&d.observeChanges(),d.instantiate(),r.autoShow&&d.show()},instantiate:function(){d.verbose("Storing instance of modal"),k=d,c.data(x,k)},create:{modal:function(){c=z("<div/>",{class:l.modal}),r.closeIcon&&(w=z("<i/>",{class:l.close}),c.append(w)),""!==r.title&&z("<div/>",{class:l.title}).appendTo(c),""!==r.content&&z("<div/>",{class:l.content}).appendTo(c),d.has.configActions()&&z("<div/>",{class:l.actions}).appendTo(c),C.append(c)},dimmer:function(){var e={debug:r.debug,dimmerName:"modals"},e=z.extend(!0,e,r.dimmerSettings);z.fn.dimmer!==U?(d.debug("Creating dimmer"),i=C.dimmer(e),r.detachable?(d.verbose("Modal is detachable, moving content into dimmer"),i.dimmer("add content",c)):d.set.undetached(),t=i.dimmer("get dimmer")):d.error(b.dimmer)},id:function(){g=(Math.random().toString(16)+"000000000").substr(2,8),e="."+g,d.verbose("Creating unique id for element",g)},innerDimmer:function(){0==c.find(s.dimmer).length&&c.prepend('<div class="ui inverted dimmer"></div>')}},destroy:function(){p&&p.disconnect(),d.verbose("Destroying previous modal"),c.removeData(x).off(y),F.off(e),t.off(e),w.off(y),C.dimmer("destroy")},observeChanges:function(){"MutationObserver"in N&&((p=new MutationObserver(function(e){d.debug("DOM tree modified, refreshing"),d.refresh()})).observe(u,{childList:!0,subtree:!0}),d.debug("Setting up mutation observer",p))},refresh:function(){d.remove.scrolling(),d.cacheSizes(),d.can.useFlex()||d.set.modalOffset(),d.set.screenHeight(),d.set.type()},refreshModals:function(){o=c.siblings(s.modal),a=o.add(c)},attachEvents:function(e,t){var n=z(e);t=z.isFunction(d[t])?d[t]:d.toggle,0<n.length?(d.debug("Attaching modal events to element",e,t),n.off(y).on("click"+y,t)):d.error(b.notFound,e)},bind:{events:function(){d.verbose("Attaching events"),c.on("click"+y,s.close,d.event.close).on("click"+y,s.approve,d.event.approve).on("click"+y,s.deny,d.event.deny),F.on("resize"+e,d.event.resize)},scrollLock:function(){i.get(0).addEventListener("touchmove",d.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){i.get(0).removeEventListener("touchmove",d.event.preventScroll,{passive:!1})}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)},element:function(){return c},settings:function(){return r}},event:{approve:function(){T||!1===r.onApprove.call(u,z(this))?d.verbose("Approve callback returned false cancelling hide"):(T=!0,d.hide(function(){T=!1}))},preventScroll:function(e){-1!==e.target.className.indexOf("dimmer")&&e.preventDefault()},deny:function(){T||!1===r.onDeny.call(u,z(this))?d.verbose("Deny callback returned false cancelling hide"):(T=!0,d.hide(function(){T=!1}))},close:function(){d.hide()},mousedown:function(e){var t=z(e.target),n=d.is.rtl();(f=0<t.closest(s.modal).length)&&d.verbose("Mouse down event registered inside the modal"),(m=d.is.scrolling()&&(!n&&z(N).outerWidth()-r.scrollbarWidth<=e.clientX||n&&r.scrollbarWidth>=e.clientX))&&d.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(r.closable)if(f)d.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(m)d.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var t=0<z(e.target).closest(s.modal).length,e=z.contains(H.documentElement,e.target);if(!t&&e&&d.is.active()&&c.hasClass(l.front)){if(d.debug("Dimmer clicked, hiding all modals"),r.allowMultiple){if(!d.hideAll())return}else if(!d.hide())return;d.remove.clickaway()}}else d.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(d.timer),d.timer=setTimeout(e,t)},keyboard:function(e){27==e.which&&(r.closable?(d.debug("Escape key pressed hiding modal"),c.hasClass(l.front)&&d.hide()):d.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){i.dimmer("is active")&&(d.is.animating()||d.is.active())&&q(d.refresh)}},toggle:function(){d.is.active()||d.is.animating()?d.hide():d.show()},show:function(e){e=z.isFunction(e)?e:function(){},d.refreshModals(),d.set.dimmerSettings(),d.set.dimmerStyles(),d.showModal(e)},hide:function(e){return e=z.isFunction(e)?e:function(){},d.refreshModals(),d.hideModal(e)},showModal:function(e){e=z.isFunction(e)?e:function(){},d.is.animating()||!d.is.active()?(d.showDimmer(),d.cacheSizes(),d.set.bodyMargin(),d.can.useFlex()?d.remove.legacy():(d.set.legacy(),d.set.modalOffset(),d.debug("Using non-flex legacy modal positioning.")),d.set.screenHeight(),d.set.type(),d.set.clickaway(),!r.allowMultiple&&d.others.active()?d.hideOthers(d.showModal):(T=!1,r.allowMultiple&&(d.others.active()&&o.filter("."+l.active).find(s.dimmer).addClass("active"),r.detachable&&c.detach().appendTo(t)),r.onShow.call(u),r.transition&&z.fn.transition!==U&&c.transition("is supported")?(d.debug("Showing modal with css animations"),c.transition({debug:r.debug,animation:(r.transition.showMethod||r.transition)+" in",queue:r.queue,duration:r.transition.showDuration||r.duration,useFailSafe:!0,onComplete:function(){r.onVisible.apply(u),r.keyboardShortcuts&&d.add.keyboardShortcuts(),d.save.focus(),d.set.active(),r.autofocus&&d.set.autofocus(),e()}})):d.error(b.noTransition))):d.debug("Modal is already visible")},hideModal:function(e,t,n){var i=o.filter("."+l.active).last();if(e=z.isFunction(e)?e:function(){},d.debug("Hiding modal"),!1===r.onHide.call(u,z(this)))return d.verbose("Hide callback returned false cancelling hide"),T=!1;(d.is.animating()||d.is.active())&&(r.transition&&z.fn.transition!==U&&c.transition("is supported")?(d.remove.active(),c.transition({debug:r.debug,animation:(r.transition.hideMethod||r.transition)+" out",queue:r.queue,duration:r.transition.hideDuration||r.duration,useFailSafe:!0,onStart:function(){d.others.active()||d.others.animating()||t||d.hideDimmer(),r.keyboardShortcuts&&!d.others.active()&&d.remove.keyboardShortcuts()},onComplete:function(){d.unbind.scrollLock(),r.allowMultiple&&(i.addClass(l.front),c.removeClass(l.front),(n?a:i).find(s.dimmer).removeClass("active")),z.isFunction(r.onHidden)&&r.onHidden.call(u),d.remove.dimmerStyles(),d.restore.focus(),e()}})):d.error(b.noTransition))},showDimmer:function(){i.dimmer("is animating")||!i.dimmer("is active")?(d.save.bodyMargin(),d.debug("Showing dimmer"),i.dimmer("show")):d.debug("Dimmer already visible")},hideDimmer:function(){i.dimmer("is animating")||i.dimmer("is active")?(d.unbind.scrollLock(),i.dimmer("hide",function(){d.restore.bodyMargin(),d.remove.clickaway(),d.remove.screenHeight()})):d.debug("Dimmer is not visible cannot hide")},hideAll:function(n){var i,e=a.filter("."+l.active+", ."+l.animating);if(n=z.isFunction(n)?n:function(){},0<e.length)return d.debug("Hiding all visible modals"),i=!0,z(e.get().reverse()).each(function(e,t){i=i&&z(t).modal("hide modal",n,!1,!0)}),i&&d.hideDimmer(),i},hideOthers:function(e){var t=o.filter("."+l.active+", ."+l.animating);e=z.isFunction(e)?e:function(){},0<t.length&&(d.debug("Hiding other modals",o),t.modal("hide modal",e,!0))},others:{active:function(){return 0<o.filter("."+l.active).length},animating:function(){return 0<o.filter("."+l.animating).length}},add:{keyboardShortcuts:function(){d.verbose("Adding keyboard shortcuts"),P.on("keyup"+y,d.event.keyboard)}},save:{focus:function(){0<z(H.activeElement).closest(c).length||(n=z(H.activeElement).blur())},bodyMargin:function(){S=O.css("margin-"+(d.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(S.replace(/[^\d.]/g,"")),t=N.innerWidth-H.documentElement.clientWidth;D=e+t}},restore:{focus:function(){n&&0<n.length&&r.restoreFocus&&n.focus()},bodyMargin:function(){var n=d.can.leftBodyScrollbar()?"left":"right";O.css("margin-"+n,S),O.find(s.bodyFixed.replace("right",n)).each(function(){var e=z(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},remove:{active:function(){c.removeClass(l.active)},legacy:function(){c.removeClass(l.legacy)},clickaway:function(){r.detachable||c.off("mousedown"+e),t.off("mousedown"+e),t.off("mouseup"+e)},dimmerStyles:function(){t.removeClass(l.inverted),i.removeClass(l.blurring)},bodyStyle:function(){""===O.attr("style")&&(d.verbose("Removing style attribute"),O.removeAttr("style"))},screenHeight:function(){d.debug("Removing page height"),O.css("height","")},keyboardShortcuts:function(){d.verbose("Removing keyboard shortcuts"),P.off("keyup"+y)},scrolling:function(){i.removeClass(l.scrolling),c.removeClass(l.scrolling)}},cacheSizes:function(){c.addClass(l.loading);var e=c.prop("scrollHeight"),t=c.outerWidth(),n=c.outerHeight();d.cache.pageHeight!==U&&0===n||(z.extend(d.cache,{pageHeight:z(H).outerHeight(),width:t,height:n+r.offset,scrollHeight:e+r.offset,contextHeight:("body"==r.context?z(N):i).height()}),d.cache.topOffset=-d.cache.height/2),c.removeClass(l.loading),d.debug("Caching modal and container sizes",d.cache)},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{leftBodyScrollbar:function(){return d.cache.leftBodyScrollbar===U&&(d.cache.leftBodyScrollbar=d.is.rtl()&&(d.is.iframe&&!d.is.firefox()||d.is.safari()||d.is.edge()||d.is.ie())),d.cache.leftBodyScrollbar},useFlex:function(){return"auto"===r.useFlex?r.detachable&&!d.is.ie():(r.useFlex&&d.is.ie()?d.debug("useFlex true is not supported in IE"):r.useFlex&&!r.detachable&&d.debug("useFlex true in combination with detachable false is not supported"),r.useFlex)},fit:function(){var e=d.cache.contextHeight,t=d.cache.contextHeight/2,n=d.cache.topOffset,i=d.cache.scrollHeight,o=d.cache.height,a=r.padding;return o<i?t+n+i+a<e:o+2*a<e}},has:{configActions:function(){return Array.isArray(r.actions)&&0<r.actions.length}},is:{active:function(){return c.hasClass(l.active)},ie:function(){var e,t;return d.cache.isIE===U&&(e=!N.ActiveXObject&&"ActiveXObject"in N,t="ActiveXObject"in N,d.cache.isIE=e||t),d.cache.isIE},animating:function(){return c.transition("is supported")?c.transition("is animating"):c.is(":visible")},scrolling:function(){return i.hasClass(l.scrolling)},modernBrowser:function(){return!(N.ActiveXObject||"ActiveXObject"in N)},rtl:function(){return d.cache.isRTL===U&&(d.cache.isRTL="rtl"===O.attr("dir")||"rtl"===O.css("direction")),d.cache.isRTL},safari:function(){return d.cache.isSafari===U&&(d.cache.isSafari=/constructor/i.test(N.HTMLElement)||!!N.ApplePaySession),d.cache.isSafari},edge:function(){return d.cache.isEdge===U&&(d.cache.isEdge=!!N.setImmediate&&!d.is.ie()),d.cache.isEdge},firefox:function(){return d.cache.isFirefox===U&&(d.cache.isFirefox=!!N.InstallTrigger),d.cache.isFirefox},iframe:function(){return!(self===top)}},set:{autofocus:function(){var e=c.find("[tabindex], :input").filter(":visible").filter(function(){return 0===z(this).closest(".disabled").length}),t=e.filter("[autofocus]"),t=(0<t.length?t:e).first();0<t.length&&t.focus()},bodyMargin:function(){var n=d.can.leftBodyScrollbar()?"left":"right";(r.detachable||d.can.fit())&&O.css("margin-"+n,D+"px"),O.find(s.bodyFixed.replace("right",n)).each(function(){var e=z(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+D+"px)")})},clickaway:function(){r.detachable||c.on("mousedown"+e,d.event.mousedown),t.on("mousedown"+e,d.event.mousedown),t.on("mouseup"+e,d.event.mouseup)},dimmerSettings:function(){var e;z.fn.dimmer!==U?(e={debug:r.debug,dimmerName:"modals",closable:"auto",useFlex:d.can.useFlex(),duration:{show:r.transition.showDuration||r.duration,hide:r.transition.hideDuration||r.duration}},e=z.extend(!0,e,r.dimmerSettings),r.inverted&&(e.variation=e.variation!==U?e.variation+" inverted":"inverted"),C.dimmer("setting",e)):d.error(b.dimmer)},dimmerStyles:function(){r.inverted?t.addClass(l.inverted):t.removeClass(l.inverted),r.blurring?i.addClass(l.blurring):i.removeClass(l.blurring)},modalOffset:function(){var e;r.detachable?c.css({marginTop:!c.hasClass("aligned")&&d.can.fit()?-d.cache.height/2:r.padding/2,marginLeft:-d.cache.width/2}):(e=d.can.fit(),c.css({top:!c.hasClass("aligned")&&e?z(H).scrollTop()+(d.cache.contextHeight-d.cache.height)/2:!e||c.hasClass("top")?z(H).scrollTop()+r.padding:z(H).scrollTop()+(d.cache.contextHeight-d.cache.height-r.padding),marginLeft:-d.cache.width/2})),d.verbose("Setting modal offset for legacy mode")},screenHeight:function(){d.can.fit()?O.css("height",""):c.hasClass("bottom")||(d.debug("Modal is taller than page content, resizing page height"),O.css("height",d.cache.height+2*r.padding))},active:function(){c.addClass(l.active+" "+l.front),o.filter("."+l.active).removeClass(l.front)},scrolling:function(){i.addClass(l.scrolling),c.addClass(l.scrolling),d.unbind.scrollLock()},legacy:function(){c.addClass(l.legacy)},type:function(){d.can.fit()?(d.verbose("Modal fits on screen"),d.others.active()||d.others.animating()||(d.remove.scrolling(),d.bind.scrollLock())):c.hasClass("bottom")?d.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(d.verbose("Modal cannot fit on screen setting to scrolling"),d.set.scrolling())},undetached:function(){i.addClass(l.undetached)}},setting:function(e,t){if(d.debug("Changing setting",e,t),z.isPlainObject(e))z.extend(!0,r,e);else{if(t===U)return r[e];z.isPlainObject(r[e])?z.extend(!0,r[e],t):r[e]=t}},internal:function(e,t){if(z.isPlainObject(e))z.extend(!0,d,e);else{if(t===U)return d[e];d[e]=t}},debug:function(){!r.silent&&r.debug&&(r.performance?d.performance.log(arguments):(d.debug=Function.prototype.bind.call(console.info,console,r.name+":"),d.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?d.performance.log(arguments):(d.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),d.verbose.apply(console,arguments)))},error:function(){r.silent||(d.error=Function.prototype.bind.call(console.error,console,r.name+":"),d.error.apply(console,arguments))},performance:{log:function(e){var t,n;r.performance&&(n=(t=(new Date).getTime())-(M||t),M=t,I.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":n})),clearTimeout(d.performance.timer),d.performance.timer=setTimeout(d.performance.display,500)},display:function(){var e=r.name+":",n=0;M=!1,clearTimeout(d.performance.timer),z.each(I,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",R&&(e+=" '"+R+"'"),(console.group!==U||console.table!==U)&&0<I.length&&(console.groupCollapsed(e),console.table?console.table(I):z.each(I,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),I=[]}},invoke:function(i,e,t){var o,a,n,r=k;return e=e||V,t=u||t,"string"==typeof i&&r!==U&&(i=i.split(/[\. ]/),o=i.length-1,z.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(z.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==U)return a=r[n],!1;{if(!z.isPlainObject(r[t])||e==o)return r[t]!==U&&(a=r[t]),!1;r=r[t]}}})),z.isFunction(a)?n=a.apply(t,e):a!==U&&(n=a),Array.isArray(E)?E.push(n):E!==U?E=[E,n]:n!==U&&(E=n),a}};L?(k===U&&(z.isFunction(r.templates[j])&&(r.autoShow=!0,r.className.modal=r.className.template,r=z.extend(!0,{},r,r.templates[j].apply(d,V)),l=r.className,r.namespace,v=r.fields,b=r.error),d.initialize()),z.isFunction(r.templates[j])||d.invoke(j)):(k!==U&&k.invoke("destroy"),d.initialize(),E=c)}),E!==U?E:this},z.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,autoShow:!1,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:!1,onApprove:function(){return!0},onDeny:function(){return!0},selector:{title:"> .header",content:"> .content",actions:"> .actions",close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",prompt:".ui.input > input"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front",close:"close icon",button:"ui button",modal:"ui modal",title:"header",content:"content",actions:"actions",template:"ui tiny modal",ok:"positive",cancel:"negative",prompt:"ui fluid input"},text:{ok:"Ok",cancel:"Cancel"}},z.fn.modal.settings.templates={getArguments:function(e){e=[].slice.call(e);return z.isPlainObject(e[0])?z.extend({handler:function(){},content:"",title:""},e[0]):(z.isFunction(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:t.handler}]}},confirm:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){t.handler(!0)}},{text:e.text.cancel,class:e.className.cancel,click:function(){t.handler(!1)}}]}},prompt:function(){var t=this,e=this.get.settings(),n=e.templates.getArguments(arguments);return 0===z(z.parseHTML(n.content)).filter(".ui.input").length&&(n.content+='<p><div class="'+e.className.prompt+'"><input placeholder="'+this.helpers.deQuote(n.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(n.defaultValue||"")+'"></div></p>'),{title:n.title,content:n.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){var e=t.get.settings(),e=t.get.element().find(e.selector.prompt)[0];n.handler(z(e).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){n.handler(null)}}]}}}}(jQuery,window,document),function(x,C,w,k){"use strict";x.isFunction=x.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},C=void 0!==C&&C.Math==Math?C:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),x.fn.nag=function(f){var m,e=x(this),g=e.selector||"",p=(new Date).getTime(),h=[],v=f,b="string"==typeof v,y=[].slice.call(arguments,1);return e.each(function(){var i,o=x.isPlainObject(f)?x.extend(!0,{},x.fn.nag.settings,f):x.extend({},x.fn.nag.settings),r=o.selector,s=o.error,e=o.namespace,t="."+e,n=e+"-module",a=x(this),d=o.context?x(o.context):x("body"),l=this,c=a.data(n),u={initialize:function(){u.verbose("Initializing element"),i=u.get.storage(),a.on("click"+t,r.close,u.dismiss).data(n,u),o.detachable&&a.parent()[0]!==d[0]&&a.detach().prependTo(d),0<o.displayTime&&setTimeout(u.hide,o.displayTime),u.show()},destroy:function(){u.verbose("Destroying instance"),a.removeData(n).off(t)},show:function(){if(u.should.show()&&!a.is(":visible")){if(!1===o.onShow.call(l))return u.debug("onShow callback returned false, cancelling nag animation"),!1;u.debug("Showing nag",o.animation.show),"fade"===o.animation.show?a.fadeIn(o.duration,o.easing,o.onVisible):a.slideDown(o.duration,o.easing,o.onVisible)}},hide:function(){if(!1===o.onHide.call(l))return u.debug("onHide callback returned false, cancelling nag animation"),!1;u.debug("Hiding nag",o.animation.hide),"fade"===o.animation.hide?a.fadeOut(o.duration,o.easing,o.onHidden):a.slideUp(o.duration,o.easing,o.onHidden)},dismiss:function(e){!1!==u.hide()&&o.storageMethod&&(u.debug("Dismissing nag",o.storageMethod,o.key,o.value,o.expires),u.storage.set(o.key,o.value)),e.stopImmediatePropagation(),e.preventDefault()},should:{show:function(){return o.persist?(u.debug("Persistent nag is set, can show nag"),!0):u.storage.get(o.key)!=o.value.toString()?(u.debug("Stored value is not set, can show nag",u.storage.get(o.key)),!0):(u.debug("Stored value is set, cannot show nag",u.storage.get(o.key)),!1)}},get:{expirationDate:function(e){if((e="number"==typeof e?new Date(Date.now()+864e5*e):e)instanceof Date&&e.getTime())return e.toUTCString();u.error(s.expiresFormat)},storage:function(){return"localstorage"===o.storageMethod&&C.localStorage!==k?(u.debug("Using local storage"),C.localStorage):"sessionstorage"===o.storageMethod&&C.sessionStorage!==k?(u.debug("Using session storage"),C.sessionStorage):"cookie"in w?(u.debug("Using cookie"),{setItem:function(e,t,n){e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),t=encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent);var i,o="";for(i in n)n.hasOwnProperty(i)&&(o+="; "+i,"string"==typeof n[i]&&(o+="="+n[i].split(";")[0]));w.cookie=e+"="+t+o},getItem:function(e){for(var t=w.cookie.split("; "),n=0,i=t.length;n<i;n++){var o=t[n].split("=");if(e===o[0].replace(/(%[\dA-F]{2})+/gi,decodeURIComponent))return o[1]||""}},removeItem:function(e,t){i.setItem(e,"",t)}}):void u.error(s.noStorage)},storageOptions:function(){var e={};return o.expires&&(e.expires=u.get.expirationDate(o.expires)),o.domain&&(e.domain=o.domain),o.path&&(e.path=o.path),o.secure&&(e.secure=o.secure),o.samesite&&(e.samesite=o.samesite),e}},clear:function(){u.storage.remove(o.key)},storage:{set:function(e,t){var n=u.get.storageOptions();i===C.localStorage&&n.expires&&(u.debug("Storing expiration value in localStorage",e,n.expires),i.setItem(e+o.expirationKey,n.expires)),u.debug("Value stored",e,t);try{i.setItem(e,t,n)}catch(e){u.error(s.setItem,e)}},get:function(e){var t,n=i.getItem(e);return i!==C.localStorage||null!==(t=i.getItem(e+o.expirationKey))&&t!==k&&new Date(t)<new Date&&(u.debug("Value in localStorage has expired. Deleting key",e),u.storage.remove(e),n=null),n="undefined"!=n&&"null"!=n&&n!==k&&null!==n?n:k},remove:function(e){var t=u.get.storageOptions();t.expires=u.get.expirationDate(-1),i===C.localStorage&&i.removeItem(e+o.expirationKey),i.removeItem(e,t)}},setting:function(e,t){if(u.debug("Changing setting",e,t),x.isPlainObject(e))x.extend(!0,o,e);else{if(t===k)return o[e];x.isPlainObject(o[e])?x.extend(!0,o[e],t):o[e]=t}},internal:function(e,t){if(x.isPlainObject(e))x.extend(!0,u,e);else{if(t===k)return u[e];u[e]=t}},debug:function(){!o.silent&&o.debug&&(o.performance?u.performance.log(arguments):(u.debug=Function.prototype.bind.call(console.info,console,o.name+":"),u.debug.apply(console,arguments)))},verbose:function(){!o.silent&&o.verbose&&o.debug&&(o.performance?u.performance.log(arguments):(u.verbose=Function.prototype.bind.call(console.info,console,o.name+":"),u.verbose.apply(console,arguments)))},error:function(){o.silent||(u.error=Function.prototype.bind.call(console.error,console,o.name+":"),u.error.apply(console,arguments))},performance:{log:function(e){var t,n;o.performance&&(n=(t=(new Date).getTime())-(p||t),p=t,h.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:l,"Execution Time":n})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout(u.performance.display,500)},display:function(){var e=o.name+":",n=0;p=!1,clearTimeout(u.performance.timer),x.each(h,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",g&&(e+=" '"+g+"'"),(console.group!==k||console.table!==k)&&0<h.length&&(console.groupCollapsed(e),console.table?console.table(h):x.each(h,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(i,e,t){var o,a,n,r=c;return e=e||y,t=l||t,"string"==typeof i&&r!==k&&(i=i.split(/[\. ]/),o=i.length-1,x.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(x.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==k)return a=r[n],!1;{if(!x.isPlainObject(r[t])||e==o)return r[t]!==k?a=r[t]:u.error(s.method,i),!1;r=r[t]}}})),x.isFunction(a)?n=a.apply(t,e):a!==k&&(n=a),Array.isArray(m)?m.push(n):m!==k?m=[m,n]:n!==k&&(m=n),a}};b?(c===k&&u.initialize(),u.invoke(v)):(c!==k&&c.invoke("destroy"),u.initialize())}),m!==k?m:this},x.fn.nag.settings={name:"Nag",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},context:!1,detachable:!1,expires:30,domain:!1,path:"/",secure:!1,samesite:!1,storageMethod:"cookie",key:"nag",value:"dismiss",expirationKey:"ExpirationDate",error:{noStorage:"Unsupported storage method",method:"The method you called is not defined.",setItem:"Unexpected error while setting value",expiresFormat:'"expires" must be a number of days or a Date Object'},className:{bottom:"bottom",fixed:"fixed"},selector:{close:"> .close.icon"},duration:500,easing:"easeOutQuad",onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){}},x.extend(x.easing,{easeOutQuad:function(e,t,n,i,o){return-i*(t/=o)*(t-2)+n}})}(jQuery,window,document),function(L,V,q,z){"use strict";L.isFunction=L.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},V=void 0!==V&&V.Math==Math?V:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),L.fn.popup=function(T){var S,e=L(this),D=L(q),A=L(V),E=L("body"),F=e.selector||"",P="ontouchstart"in q.documentElement?"touchstart":"click",O=(new Date).getTime(),R=[],M=T,I="string"==typeof M,j=[].slice.call(arguments,1);return e.each(function(){var c,s,t,e,n,u=L.isPlainObject(T)?L.extend(!0,{},L.fn.popup.settings,T):L.extend({},L.fn.popup.settings),i=u.selector,d=u.className,v=u.error,f=u.metadata,o=u.namespace,a="."+u.namespace,r="module-"+o,m=L(this),l=L(u.context),b=L(u.scrollContext),y=L(u.boundary),g=u.target?L(u.target):m,x=0,C=!1,w=!1,p=this,k=m.data(r),h={initialize:function(){h.debug("Initializing",m),h.createID(),h.bind.events(),!h.exists()&&u.preserve&&h.create(),u.observeChanges&&h.observeChanges(),h.instantiate()},instantiate:function(){h.verbose("Storing instance",h),k=h,m.data(r,k)},observeChanges:function(){"MutationObserver"in V&&((t=new MutationObserver(h.event.documentChanged)).observe(q,{childList:!0,subtree:!0}),h.debug("Setting up mutation observer",t))},refresh:function(){u.popup?c=L(u.popup).eq(0):u.inline&&(c=g.nextAll(i.popup).eq(0),u.popup=c),u.popup?(c.addClass(d.loading),s=h.get.offsetParent(),c.removeClass(d.loading),u.movePopup&&h.has.popup()&&h.get.offsetParent(c)[0]!==s[0]&&(h.debug("Moving popup to the same offset parent as target"),c.detach().appendTo(s))):s=u.inline?h.get.offsetParent(g):h.has.popup()?h.get.offsetParent(c):E,s.is("html")&&s[0]!==E[0]&&(h.debug("Setting page as offset parent"),s=E),h.get.variation()&&h.set.variation()},reposition:function(){h.refresh(),h.set.position()},destroy:function(){h.debug("Destroying previous module"),t&&t.disconnect(),c&&!u.preserve&&h.removePopup(),clearTimeout(h.hideTimer),clearTimeout(h.showTimer),h.unbind.close(),h.unbind.events(),m.removeData(r)},event:{start:function(e){var t=L.isPlainObject(u.delay)?u.delay.show:u.delay;clearTimeout(h.hideTimer),w&&!u.addTouchEvents||(h.showTimer=setTimeout(h.show,t))},end:function(){var e=L.isPlainObject(u.delay)?u.delay.hide:u.delay;clearTimeout(h.showTimer),h.hideTimer=setTimeout(h.hide,e)},touchstart:function(e){w=!0,u.addTouchEvents&&h.show()},resize:function(){h.is.visible()&&h.set.position()},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==p||0<L(e).find(p).length)&&(h.debug("Element removed from DOM, tearing down events"),h.destroy())})})},hideGracefully:function(e){var t=L(e.target),n=L.contains(q.documentElement,e.target),t=0<t.closest(i.popup).length;e&&!t&&n?(h.debug("Click occurred outside popup hiding popup"),h.hide()):h.debug("Click was inside popup, keeping popup open")}},create:function(){var e=h.get.html(),t=h.get.title(),n=h.get.content();e||n||t?(h.debug("Creating pop-up html"),e=e||u.templates.popup({title:t,content:n}),c=L("<div/>").addClass(d.popup).data(f.activator,m).html(e),u.inline?(h.verbose("Inserting popup element inline",c),c.insertAfter(m)):(h.verbose("Appending popup element to body",c),c.appendTo(l)),h.refresh(),h.set.variation(),u.hoverable&&h.bind.popup(),u.onCreate.call(c,p)):u.popup?(L(u.popup).data(f.activator,m),h.verbose("Used popup specified in settings"),h.refresh(),u.hoverable&&h.bind.popup()):0!==g.next(i.popup).length?(h.verbose("Pre-existing popup found"),u.inline=!0,u.popup=g.next(i.popup).data(f.activator,m),h.refresh(),u.hoverable&&h.bind.popup()):h.debug("No content specified skipping display",p)},createID:function(){n=(Math.random().toString(16)+"000000000").substr(2,8),e="."+n,h.verbose("Creating unique id for element",n)},toggle:function(){h.debug("Toggling pop-up"),h.is.hidden()?(h.debug("Popup is hidden, showing pop-up"),h.unbind.close(),h.show()):(h.debug("Popup is visible, hiding pop-up"),h.hide())},show:function(e){e=e||function(){},h.debug("Showing pop-up",u.transition),!h.is.hidden()||h.is.active()&&h.is.dropdown()||(h.exists()||h.create(),!1!==u.onShow.call(c,p)?(u.preserve||u.popup||h.refresh(),c&&h.set.position()&&(h.save.conditions(),u.exclusive&&h.hideAll(),h.animate.show(e))):h.debug("onShow callback returned false, cancelling popup animation"))},hide:function(e){e=e||function(){},(h.is.visible()||h.is.animating())&&(!1!==u.onHide.call(c,p)?(h.remove.visible(),h.unbind.close(),h.restore.conditions(),h.animate.hide(e)):h.debug("onHide callback returned false, cancelling popup animation"))},hideAll:function(){L(i.popup).filter("."+d.popupVisible).each(function(){L(this).data(f.activator).popup("hide")})},exists:function(){return!!c&&(u.inline||u.popup?h.has.popup():1<=c.closest(l).length)},removePopup:function(){h.has.popup()&&!u.popup&&(h.debug("Removing popup",c),c.remove(),c=z,u.onRemove.call(c,p))},save:{conditions:function(){h.cache={title:m.attr("title")},h.cache.title&&m.removeAttr("title"),h.verbose("Saving original attributes",h.cache.title)}},restore:{conditions:function(){return h.cache&&h.cache.title&&(m.attr("title",h.cache.title),h.verbose("Restoring original attributes",h.cache.title)),!0}},supports:{svg:function(){return"undefined"!=typeof SVGGraphicsElement}},animate:{show:function(e){e=L.isFunction(e)?e:function(){},u.transition&&L.fn.transition!==z&&m.transition("is supported")?(h.set.visible(),c.transition({animation:(u.transition.showMethod||u.transition)+" in",queue:!1,debug:u.debug,verbose:u.verbose,duration:u.transition.showDuration||u.duration,onComplete:function(){h.bind.close(),e.call(c,p),u.onVisible.call(c,p)}})):h.error(v.noTransition)},hide:function(e){e=L.isFunction(e)?e:function(){},h.debug("Hiding pop-up"),u.transition&&L.fn.transition!==z&&m.transition("is supported")?c.transition({animation:(u.transition.hideMethod||u.transition)+" out",queue:!1,duration:u.transition.hideDuration||u.duration,debug:u.debug,verbose:u.verbose,onComplete:function(){h.reset(),e.call(c,p),u.onHidden.call(c,p)}}):h.error(v.noTransition)}},change:{content:function(e){c.html(e)}},get:{html:function(){return m.removeData(f.html),m.data(f.html)||u.html},title:function(){return m.removeData(f.title),m.data(f.title)||u.title},content:function(){return m.removeData(f.content),m.data(f.content)||u.content||m.attr("title")},variation:function(){return m.removeData(f.variation),m.data(f.variation)||u.variation},popup:function(){return c},popupOffset:function(){return c.offset()},calculations:function(){var e=h.get.offsetParent(c),t=g[0],n=y[0]==V,i=g.offset(),o=u.inline||u.popup&&u.movePopup?g.offsetParent().offset():{top:0,left:0},a=n?{top:0,left:0}:y.offset(),r={},n=n?{top:A.scrollTop(),left:A.scrollLeft()}:{top:0,left:0},r={target:{element:g[0],width:g.outerWidth(),height:g.outerHeight(),top:i.top-o.top,left:i.left-o.left,margin:{}},popup:{width:c.outerWidth(),height:c.outerHeight()},parent:{width:s.outerWidth(),height:s.outerHeight()},screen:{top:a.top,left:a.left,scroll:{top:n.top,left:n.left},width:y.width(),height:y.height()}};return e.get(0)!==s.get(0)&&(i=e.offset(),r.target.top-=i.top,r.target.left-=i.left,r.parent.width=e.outerWidth(),r.parent.height=e.outerHeight()),u.setFluidWidth&&h.is.fluid()&&(r.container={width:c.parent().outerWidth()},r.popup.width=r.container.width),r.target.margin.top=u.inline?parseInt(V.getComputedStyle(t).getPropertyValue("margin-top"),10):0,r.target.margin.left=u.inline?h.is.rtl()?parseInt(V.getComputedStyle(t).getPropertyValue("margin-right"),10):parseInt(V.getComputedStyle(t).getPropertyValue("margin-left"),10):0,o=r.screen,r.boundary={top:o.top+o.scroll.top,bottom:o.top+o.scroll.top+o.height,left:o.left+o.scroll.left,right:o.left+o.scroll.left+o.width},r},id:function(){return n},startEvent:function(){return"hover"==u.on?"mouseenter":"focus"==u.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==u.on?"mouseleave":"focus"==u.on&&"blur"},distanceFromBoundary:function(e,t){var n={},i=(t=t||h.get.calculations()).popup,t=t.boundary;return e&&(n={top:e.top-t.top,left:e.left-t.left,right:t.right-(e.left+i.width),bottom:t.bottom-(e.top+i.height)},h.verbose("Distance from boundaries determined",e,n)),n},offsetParent:function(e){var t=(e!==z?e:g)[0].parentNode,n=L(t);if(t)for(var i="none"===n.css("transform"),o="static"===n.css("position"),a=n.is("body");t&&!a&&o&&i;)t=t.parentNode,i="none"===(n=L(t)).css("transform"),o="static"===n.css("position"),a=n.is("body");return n&&0<n.length?n:L()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(e){var t=e.split(" "),n=t[0],t=t[1],i="top"==n||"bottom"==n,o=!1,a=!1,r=!1;return C||(h.verbose("All available positions available"),C=h.get.positions()),h.debug("Recording last position tried",e),C[e]=!0,"opposite"===u.prefer&&(r=(r=[{top:"bottom",bottom:"top",left:"right",right:"left"}[n],t]).join(" "),o=!0===C[r],h.debug("Trying opposite strategy",r)),"adjacent"===u.prefer&&i&&(r=(r=[n,{left:"center",center:"right",right:"left"}[t]]).join(" "),a=!0===C[r],h.debug("Trying adjacent strategy",r)),(a||o)&&(h.debug("Using backup position",r),r={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"}[e]),r}},set:{position:function(e,t){if(0!==g.length&&0!==c.length){var n,i,o,a,r,s,l;if(t=t||h.get.calculations(),e=e||m.data(f.position)||u.position,n=m.data(f.offset)||u.offset,i=u.distanceAway,o=t.target,a=t.popup,r=t.parent,h.should.centerArrow(t)&&(h.verbose("Adjusting offset to center arrow on small target element"),"top left"!=e&&"bottom left"!=e||(n=(n+=o.width/2)-u.arrowPixelsFromEdge),"top right"!=e&&"bottom right"!=e||(n=(n-=o.width/2)+u.arrowPixelsFromEdge)),0===o.width&&0===o.height&&!h.is.svg(o.element))return h.debug("Popup target is hidden, no action taken"),!1;switch(u.inline&&(h.debug("Adding margin to calculation",o.margin),"left center"==e||"right center"==e?(n+=o.margin.top,i+=-o.margin.left):"top left"==e||"top center"==e||"top right"==e?(n+=o.margin.left,i-=o.margin.top):(n+=o.margin.left,i+=o.margin.top)),h.debug("Determining popup position from calculations",e,t),h.is.rtl()&&(e=e.replace(/left|right/g,function(e){return"left"==e?"right":"left"}),h.debug("RTL: Popup position updated",e)),e=x==u.maxSearchDepth&&"string"==typeof u.lastResort?u.lastResort:e){case"top left":s={top:"auto",bottom:r.height-o.top+i,left:o.left+n,right:"auto"};break;case"top center":s={bottom:r.height-o.top+i,left:o.left+o.width/2-a.width/2+n,top:"auto",right:"auto"};break;case"top right":s={bottom:r.height-o.top+i,right:r.width-o.left-o.width-n,top:"auto",left:"auto"};break;case"left center":s={top:o.top+o.height/2-a.height/2+n,right:r.width-o.left+i,left:"auto",bottom:"auto"};break;case"right center":s={top:o.top+o.height/2-a.height/2+n,left:o.left+o.width+i,bottom:"auto",right:"auto"};break;case"bottom left":s={top:o.top+o.height+i,left:o.left+n,bottom:"auto",right:"auto"};break;case"bottom center":s={top:o.top+o.height+i,left:o.left+o.width/2-a.width/2+n,bottom:"auto",right:"auto"};break;case"bottom right":s={top:o.top+o.height+i,right:r.width-o.left-o.width-n,left:"auto",bottom:"auto"}}if(s===z&&h.error(v.invalidPosition,e),h.debug("Calculated popup positioning values",s),c.css(s).removeClass(d.position).addClass(e).addClass(d.loading),l=h.get.popupOffset(),l=h.get.distanceFromBoundary(l,t),!u.forcePosition&&h.is.offstage(l,e)){if(h.debug("Position is outside viewport",e),x<u.maxSearchDepth)return x++,e=h.get.nextPosition(e),h.debug("Trying new position",e),!!c&&h.set.position(e,t);if(!u.lastResort)return h.debug("Popup could not find a position to display",c),h.error(v.cannotPlace,p),h.remove.attempts(),h.remove.loading(),h.reset(),u.onUnplaceable.call(c,p),!1;h.debug("No position found, showing with last position")}return h.debug("Position is on stage",e),h.remove.attempts(),h.remove.loading(),u.setFluidWidth&&h.is.fluid()&&h.set.fluidWidth(t),!0}h.error(v.notFound)},fluidWidth:function(e){e=e||h.get.calculations(),h.debug("Automatically setting element width to parent width",e.parent.width),c.css("width",e.container.width)},variation:function(e){(e=e||h.get.variation())&&h.has.popup()&&(h.verbose("Adding variation to popup",e),c.addClass(e))},visible:function(){m.addClass(d.visible)}},remove:{loading:function(){c.removeClass(d.loading)},variation:function(e){(e=e||h.get.variation())&&(h.verbose("Removing variation",e),c.removeClass(e))},visible:function(){m.removeClass(d.visible)},attempts:function(){h.verbose("Resetting all searched positions"),x=0,C=!1}},bind:{events:function(){h.debug("Binding popup events to module"),"click"==u.on&&m.on(P+a,h.toggle),"hover"==u.on&&m.on("touchstart"+a,h.event.touchstart),h.get.startEvent()&&m.on(h.get.startEvent()+a,h.event.start).on(h.get.endEvent()+a,h.event.end),u.target&&h.debug("Target set to element",g),A.on("resize"+e,h.event.resize)},popup:function(){h.verbose("Allowing hover events on popup to prevent closing"),c&&h.has.popup()&&c.on("mouseenter"+a,h.event.start).on("mouseleave"+a,h.event.end)},close:function(){(!0===u.hideOnScroll||"auto"==u.hideOnScroll&&"click"!=u.on)&&h.bind.closeOnScroll(),h.is.closable()?h.bind.clickaway():"hover"==u.on&&w&&h.bind.touchClose()},closeOnScroll:function(){h.verbose("Binding scroll close event to document"),b.one(h.get.scrollEvent()+e,h.event.hideGracefully)},touchClose:function(){h.verbose("Binding popup touchclose event to document"),D.on("touchstart"+e,function(e){h.verbose("Touched away from popup"),h.event.hideGracefully.call(p,e)})},clickaway:function(){h.verbose("Binding popup close event to document"),D.on(P+e,function(e){h.verbose("Clicked away from popup"),h.event.hideGracefully.call(p,e)})}},unbind:{events:function(){A.off(e),m.off(a)},close:function(){D.off(e),b.off(e)}},has:{popup:function(){return c&&0<c.length}},should:{centerArrow:function(e){return!h.is.basic()&&e.target.width<=2*u.arrowPixelsFromEdge}},is:{closable:function(){return"auto"==u.closable?"hover"!=u.on:u.closable},offstage:function(e,n){var i=[];return L.each(e,function(e,t){t<-u.jitter&&(h.debug("Position exceeds allowable distance from edge",e,t,n),i.push(e))}),0<i.length},svg:function(e){return h.supports.svg()&&e instanceof SVGGraphicsElement},basic:function(){return m.hasClass(d.basic)},active:function(){return m.hasClass(d.active)},animating:function(){return c!==z&&c.hasClass(d.animating)},fluid:function(){return c!==z&&c.hasClass(d.fluid)},visible:function(){return c!==z&&c.hasClass(d.popupVisible)},dropdown:function(){return m.hasClass(d.dropdown)},hidden:function(){return!h.is.visible()},rtl:function(){return"rtl"===m.attr("dir")||"rtl"===m.css("direction")}},reset:function(){h.remove.visible(),u.preserve?L.fn.transition!==z&&c.transition("remove transition"):h.removePopup()},setting:function(e,t){if(L.isPlainObject(e))L.extend(!0,u,e);else{if(t===z)return u[e];u[e]=t}},internal:function(e,t){if(L.isPlainObject(e))L.extend(!0,h,e);else{if(t===z)return h[e];h[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?h.performance.log(arguments):(h.debug=Function.prototype.bind.call(console.info,console,u.name+":"),h.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?h.performance.log(arguments):(h.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),h.verbose.apply(console,arguments)))},error:function(){u.silent||(h.error=Function.prototype.bind.call(console.error,console,u.name+":"),h.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(O||t),O=t,R.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:p,"Execution Time":n})),clearTimeout(h.performance.timer),h.performance.timer=setTimeout(h.performance.display,500)},display:function(){var e=u.name+":",n=0;O=!1,clearTimeout(h.performance.timer),L.each(R,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",F&&(e+=" '"+F+"'"),(console.group!==z||console.table!==z)&&0<R.length&&(console.groupCollapsed(e),console.table?console.table(R):L.each(R,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),R=[]}},invoke:function(i,e,t){var o,a,n,r=k;return e=e||j,t=p||t,"string"==typeof i&&r!==z&&(i=i.split(/[\. ]/),o=i.length-1,L.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(L.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==z)return a=r[n],!1;{if(!L.isPlainObject(r[t])||e==o)return r[t]!==z&&(a=r[t]),!1;r=r[t]}}})),L.isFunction(a)?n=a.apply(t,e):a!==z&&(n=a),Array.isArray(S)?S.push(n):S!==z?S=[S,n]:n!==z&&(S=n),a}};I?(k===z&&h.initialize(),h.invoke(M)):(k!==z&&k.invoke("destroy"),h.initialize())}),S!==z?S:this},L.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:V,addTouchEvents:!0,position:"top left",forcePosition:!1,variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:V,prefer:"opposite",lastResort:!1,arrowPixelsFromEdge:20,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",basic:"basic",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible",popupVisible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(e){var t={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return t[e]}):e},popup:function(e){var t="",n=L.fn.popup.settings.templates.escape;return typeof e!==z&&(typeof e.title!==z&&e.title&&(e.title=n(e.title),t+='<div class="header">'+e.title+"</div>"),typeof e.content!==z&&e.content&&(e.content=n(e.content),t+='<div class="content">'+e.content+"</div>")),t}}}}(jQuery,window,document),function(T,e,S,D){"use strict";T.isFunction=T.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),T.fn.progress=function(h){var v,e=T(this),b=e.selector||"",y=(new Date).getTime(),x=[],C=h,w="string"==typeof C,k=[].slice.call(arguments,1);return e.each(function(){var r=T.isPlainObject(h)?T.extend(!0,{},T.fn.progress.settings,h):T.extend({},T.fn.progress.settings),n=r.className,t=r.metadata,e=r.namespace,o=r.selector,s=r.error,a="."+e,m="module-"+e,i=T(this),c=T(this).find(o.bar),g=T(this).find(o.progress),p=T(this).find(o.label),l=this,u=i.data(m),d=!1,f={helper:{sum:function(e){return Array.isArray(e)?e.reduce(function(e,t){return e+Number(t)},0):0},derivePrecision:function(e,t){for(var n=0,i=1,o=e/t;n<10&&!(1<(o*=i));)i=Math.pow(10,n++);return i},forceArray:function(e){return Array.isArray(e)?e:isNaN(e)?"string"==typeof e?e.split(","):[]:[e]}},initialize:function(){f.set.duration(),f.set.transitionEvent(),f.debug(l),f.read.metadata(),f.read.settings(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of progress",f),u=f,i.data(m,f)},destroy:function(){f.verbose("Destroying previous progress for",i),clearInterval(u.interval),f.remove.state(),i.removeData(m),u=D},reset:function(){f.remove.nextValue(),f.update.progress(0)},complete:function(e){(f.percent===D||f.percent<100)&&(f.remove.progressPoll(),!0!==e&&f.set.percent(100))},read:{metadata:function(){var e={percent:f.helper.forceArray(i.data(t.percent)),total:i.data(t.total),value:f.helper.forceArray(i.data(t.value))};e.total!==D&&(f.debug("Total value set from metadata",e.total),f.set.total(e.total)),0<e.value.length&&(f.debug("Current value set from metadata",e.value),f.set.value(e.value),f.set.progress(e.value)),0<e.percent.length&&(f.debug("Current percent value set from metadata",e.percent),f.set.percent(e.percent))},settings:function(){!1!==r.total&&(f.debug("Current total set in settings",r.total),f.set.total(r.total)),!1!==r.value&&(f.debug("Current value set in settings",r.value),f.set.value(r.value),f.set.progress(f.value)),!1!==r.percent&&(f.debug("Current percent set in settings",r.percent),f.set.percent(r.percent))}},bind:{transitionEnd:function(t){var e=f.get.transitionEnd();c.one(e+a,function(e){clearTimeout(f.failSafeTimer),t.call(this,e)}),f.failSafeTimer=setTimeout(function(){c.triggerHandler(e)},r.duration+r.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},increment:function(e){var t;e=f.has.total()?(t=f.get.value(),e||1):(t=f.get.percent(),e||f.get.randomValue()),f.debug("Incrementing percentage by",t,t=t+e,e),t=f.get.normalizedValue(t),f.set.progress(t)},decrement:function(e){var t,n;f.get.total()?(n=(t=f.get.value())-(e=e||1),f.debug("Decrementing value by",e,t)):(n=(t=f.get.percent())-(e=e||f.get.randomValue()),f.debug("Decrementing percentage by",e,t)),n=f.get.normalizedValue(n),f.set.progress(n)},has:{progressPoll:function(){return f.progressPoll},total:function(){return!1!==f.get.total()}},get:{text:function(e,t){var t=t||0,n=f.get.value(t),i=f.get.total(),o=d?f.get.displayPercent(t):f.get.percent(t),a=!1!==i?Math.max(0,i-n):100-o;return e=(e=e||"").replace("{value}",n).replace("{total}",i||0).replace("{left}",a).replace("{percent}",o).replace("{bar}",r.text.bars[t]||""),f.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return f.debug("Value cannot decrement below 0"),0;if(f.has.total()){if(e>f.total)return f.debug("Value cannot increment above total",f.total),f.total}else if(100<e)return f.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"==r.updateInterval?r.duration:r.updateInterval},randomValue:function(){return f.debug("Generating random increment percentage"),Math.floor(Math.random()*r.random.max+r.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},transitionEnd:function(){var e,t=S.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==D)return n[e]},displayPercent:function(e){var e=T(c[e]),t=e.width(),n=i.width(),e=parseInt(e.css("min-width"),10)<t?t/n*100:f.percent;return 0<r.precision?Math.round(e*(10*r.precision))/(10*r.precision):Math.round(e)},percent:function(e){return f.percent&&f.percent[e||0]||0},value:function(e){return f.nextValue||f.value&&f.value[e||0]||0},total:function(){return f.total!==D&&f.total}},create:{progressPoll:function(){f.progressPoll=setTimeout(function(){f.update.toNextValue(),f.remove.progressPoll()},f.get.updateInterval())}},is:{complete:function(){return f.is.success()||f.is.warning()||f.is.error()},success:function(){return i.hasClass(n.success)},warning:function(){return i.hasClass(n.warning)},error:function(){return i.hasClass(n.error)},active:function(){return i.hasClass(n.active)},visible:function(){return i.is(":visible")}},remove:{progressPoll:function(){f.verbose("Removing progress poll timer"),f.progressPoll&&(clearTimeout(f.progressPoll),delete f.progressPoll)},nextValue:function(){f.verbose("Removing progress value stored for next update"),delete f.nextValue},state:function(){f.verbose("Removing stored state"),delete f.total,delete f.percent,delete f.value},active:function(){f.verbose("Removing active state"),i.removeClass(n.active)},success:function(){f.verbose("Removing success state"),i.removeClass(n.success)},warning:function(){f.verbose("Removing warning state"),i.removeClass(n.warning)},error:function(){f.verbose("Removing error state"),i.removeClass(n.error)}},set:{barWidth:function(e){f.debug("set bar width with ",e),e=f.helper.forceArray(e);var o=-1,a=-1,r=f.helper.sum(e),s=c.length,l=1<s,t=e.map(function(e,t){var n=t===s-1&&0===r,i=T(c[t]);return 0===e&&l&&!n?i.css("display","none"):(l&&n&&i.css("background","transparent"),-1==o&&(o=t),a=t,i.css({display:"block",width:e+"%"})),parseFloat(e)});e.forEach(function(e,t){T(c[t]).css({borderTopLeftRadius:t==o?"":0,borderBottomLeftRadius:t==o?"":0,borderTopRightRadius:t==a?"":0,borderBottomRightRadius:t==a?"":0})}),i.attr("data-percent",t)},duration:function(e){e=e||r.duration,f.verbose("Setting progress bar transition duration",e="number"==typeof e?e+"ms":e),c.css({"transition-duration":e})},percent:function(e){e=f.helper.forceArray(e).map(function(e){return e="string"==typeof e?+e.replace("%",""):e,r.limitValues?Math.max(0,Math.min(100,e)):e});var t,n=f.has.total(),i=f.helper.sum(e),o=1<e.length&&n,a=f.helper.sum(f.helper.forceArray(f.value));o&&a>f.total?f.error(s.sumExceedsTotal,a,f.total):!o&&100<i?f.error(s.tooHigh,i):i<0?f.error(s.tooLow,i):(t=0<r.precision?r.precision:o?f.helper.derivePrecision(Math.min.apply(null,f.value),f.total):0,a=e.map(function(e){return 0<t?Math.round(e*(10*t))/(10*t):Math.round(e)}),f.percent=a,n&&(f.value=e.map(function(e){return 0<t?Math.round(e/100*f.total*(10*t))/(10*t):Math.round(e/100*f.total*10)/10})),f.set.barWidth(e),f.set.labelInterval()),r.onChange.call(l,e,f.value,f.total)},labelInterval:function(){clearInterval(f.interval),f.bind.transitionEnd(function(){f.verbose("Bar finished animating, removing continuous label updates"),clearInterval(f.interval),d=!1,f.set.labels()}),d=!0,f.interval=setInterval(function(){T.contains(S.documentElement,l)||(clearInterval(f.interval),d=!1),f.set.labels()},r.framerate)},labels:function(){f.verbose("Setting both bar progress and outer label text"),f.set.barLabel(),f.set.state()},label:function(e){(e=e||"")&&(e=f.get.text(e),f.verbose("Setting label to text",e),p.text(e))},state:function(e){100===(e=e!==D?e:f.helper.sum(f.percent))?r.autoSuccess&&1===c.length&&!(f.is.warning()||f.is.error()||f.is.success())?(f.set.success(),f.debug("Automatically triggering success at 100%")):(f.verbose("Reached 100% removing active state"),f.remove.active(),f.remove.progressPoll()):0<e?(f.verbose("Adjusting active progress bar label",e),f.set.active()):(f.remove.active(),f.set.label(r.text.active))},barLabel:function(n){g.map(function(e,t){t=T(t);n!==D?t.text(f.get.text(n,e)):"ratio"==r.label&&f.has.total()?(f.verbose("Adding ratio to bar label"),t.text(f.get.text(r.text.ratio,e))):"percent"==r.label&&(f.verbose("Adding percentage to bar label"),t.text(f.get.text(r.text.percent,e)))})},active:function(e){e=e||r.text.active,f.debug("Setting active state"),r.showActivity&&!f.is.active()&&i.addClass(n.active),f.remove.warning(),f.remove.error(),f.remove.success(),(e=r.onLabelUpdate("active",e,f.value,f.total))&&f.set.label(e),f.bind.transitionEnd(function(){r.onActive.call(l,f.value,f.total)})},success:function(e,t){e=e||r.text.success||r.text.active,f.debug("Setting success state"),i.addClass(n.success),f.remove.active(),f.remove.warning(),f.remove.error(),f.complete(t),e=r.text.success?r.onLabelUpdate("success",e,f.value,f.total):r.onLabelUpdate("active",e,f.value,f.total),f.set.label(e),f.bind.transitionEnd(function(){r.onSuccess.call(l,f.total)})},warning:function(e,t){e=e||r.text.warning,f.debug("Setting warning state"),i.addClass(n.warning),f.remove.active(),f.remove.success(),f.remove.error(),f.complete(t),(e=r.onLabelUpdate("warning",e,f.value,f.total))&&f.set.label(e),f.bind.transitionEnd(function(){r.onWarning.call(l,f.value,f.total)})},error:function(e,t){e=e||r.text.error,f.debug("Setting error state"),i.addClass(n.error),f.remove.active(),f.remove.success(),f.remove.warning(),f.complete(t),(e=r.onLabelUpdate("error",e,f.value,f.total))&&f.set.label(e),f.bind.transitionEnd(function(){r.onError.call(l,f.value,f.total)})},transitionEvent:function(){f.get.transitionEnd()},total:function(e){f.total=e},value:function(e){f.value=f.helper.forceArray(e)},progress:function(e){f.has.progressPoll()?(f.debug("Updated within interval, setting next update to use new value",e),f.set.nextValue(e)):(f.debug("First update in progress update interval, immediately updating",e),f.update.progress(e),f.create.progressPoll())},nextValue:function(e){f.nextValue=e}},update:{toNextValue:function(){var e=f.nextValue;e&&(f.debug("Update interval complete using last updated value",e),f.update.progress(e),f.remove.nextValue())},progress:function(e){var n=f.has.total(),e=(n&&f.set.value(e),f.helper.forceArray(e).map(function(e){var t;return!1===(e=f.get.numericValue(e))&&f.error(s.nonNumeric,e),e=f.get.normalizedValue(e),n?(t=0<f.total?e/f.total*100:100,f.debug("Calculating percent complete from total",t)):(t=e,f.debug("Setting value to exact percentage value",t)),t}));f.set.percent(e)}},setting:function(e,t){if(f.debug("Changing setting",e,t),T.isPlainObject(e))T.extend(!0,r,e);else{if(t===D)return r[e];T.isPlainObject(r[e])?T.extend(!0,r[e],t):r[e]=t}},internal:function(e,t){if(T.isPlainObject(e))T.extend(!0,f,e);else{if(t===D)return f[e];f[e]=t}},debug:function(){!r.silent&&r.debug&&(r.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,r.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),f.verbose.apply(console,arguments)))},error:function(){r.silent||(f.error=Function.prototype.bind.call(console.error,console,r.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n;r.performance&&(n=(t=(new Date).getTime())-(y||t),y=t,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:l,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=r.name+":",n=0;y=!1,clearTimeout(f.performance.timer),T.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),(console.group!==D||console.table!==D)&&0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):T.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(i,e,t){var o,a,n,r=u;return e=e||k,t=l||t,"string"==typeof i&&r!==D&&(i=i.split(/[\. ]/),o=i.length-1,T.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(T.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==D)return a=r[n],!1;{if(!T.isPlainObject(r[t])||e==o)return r[t]!==D?a=r[t]:f.error(s.method,i),!1;r=r[t]}}})),T.isFunction(a)?n=a.apply(t,e):a!==D&&(n=a),Array.isArray(v)?v.push(n):v!==D?v=[v,n]:n!==D&&(v=n),a}};w?(u===D&&f.initialize(),f.invoke(C)):(u!==D&&u.invoke("destroy"),f.initialize())}),v!==D?v:this},T.fn.progress.settings={name:"Progress",namespace:"progress",silent:!1,debug:!1,verbose:!1,performance:!0,random:{min:2,max:5},duration:300,updateInterval:"auto",autoSuccess:!0,showActivity:!0,limitValues:!0,label:"percent",precision:0,framerate:1e3/30,percent:!1,total:!1,value:!1,failSafeDelay:100,onLabelUpdate:function(e,t,n,i){return t},onChange:function(e,t,n){},onSuccess:function(e){},onActive:function(e,t){},onError:function(e,t){},onWarning:function(e,t){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric",tooHigh:"Value specified is above 100%",tooLow:"Value specified is below 0%",sumExceedsTotal:"Sum of multple values exceed total"},regExp:{variable:/\{\$*[A-z0-9]+\}/g},metadata:{percent:"percent",total:"total",value:"value"},selector:{bar:"> .bar",label:"> .label",progress:".bar > .progress"},text:{active:!1,error:!1,success:!1,warning:!1,percent:"{percent}%",ratio:"{value} of {total}",bars:[""]},className:{active:"active",error:"error",success:"success",warning:"warning"}}}(jQuery,window,document),function(U,t,B,W){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),U.fn.slider=function(O){var R,e=U(this),M=U(t),I=e.selector||"",j=(new Date).getTime(),L=[],V=O,q="string"==typeof V,z=[].slice.call(arguments,1),N=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],H=0;return e.each(function(){var c,r,s,t,m,g,n,l,p,h,v,o,b,u,y,x,d=U.isPlainObject(O)?U.extend(!0,{},U.fn.slider.settings,O):U.extend({},U.fn.slider.settings),C=d.className,w=d.metadata,k=d.namespace,T=d.error,a=d.keys,S=d.interpretLabel,D=!1,e="."+k,A="module-"+k,i=U(this),E=this,F=i.data(A),P=1,f={initialize:function(){f.debug("Initializing slider",d),x=!0,n=H+=1,b=f.setup.testOutTouch(),f.setup.layout(),f.setup.labels(),f.is.disabled()||f.bind.events(),f.read.metadata(),f.read.settings(),x=!1,f.instantiate()},instantiate:function(){f.verbose("Storing instance of slider",f),F=f,i.data(A,f)},destroy:function(){f.verbose("Destroying previous slider for",i),clearInterval(F.interval),f.unbind.events(),f.unbind.slidingEvents(),i.removeData(A),F=W},setup:{layout:function(){i.attr("tabindex")===W&&i.attr("tabindex",0),0==i.find(".inner").length&&i.append("<div class='inner'><div class='track'></div><div class='track-fill'></div><div class='thumb'></div></div>"),o=f.get.precision(),r=i.find(".thumb:not(.second)"),c=r,f.is.range()&&(0==i.find(".thumb.second").length&&i.find(".inner").append("<div class='thumb second'></div>"),s=i.find(".thumb.second")),t=i.find(".track"),m=i.find(".track-fill"),v=r.width()/2},labels:function(){f.is.labeled()&&(0!=(g=i.find(".labels:not(.auto)")).length?f.setup.customLabel():f.setup.autoLabel(),d.showLabelTicks&&i.addClass(C.ticked))},testOutTouch:function(){try{return B.createEvent("TouchEvent"),!0}catch(e){return!1}},customLabel:function(){var n,e=g.find(".label"),i=e.length,o=f.get.min(),a=f.get.max();e.each(function(e){var t=U(this).attr("data-value");n=t?((t=a<t?a:t<o?o:t)-o)/(a-o):(e+1)/(i+1),f.update.labelPosition(n,U(this))})},autoLabel:function(){0!=(g=i.find(".labels")).length?g.empty():g=i.append('<ul class="auto labels"></ul>').find(".labels");for(var e=0,t=f.get.numLabels();e<=t;e++){var n=f.get.label(e),n=""!==n?e%f.get.gapRatio()?U('<li class="halftick label"></li>'):U('<li class="label">'+n+"</li>"):null;n&&(f.update.labelPosition(e/t,n),g.append(n))}}},bind:{events:function(){f.bind.globalKeyboardEvents(),f.bind.keyboardEvents(),f.bind.mouseEvents(),f.is.touch()&&f.bind.touchEvents(),d.autoAdjustLabels&&f.bind.windowEvents()},keyboardEvents:function(){f.verbose("Binding keyboard events"),i.on("keydown"+e,f.event.keydown)},globalKeyboardEvents:function(){U(B).on("keydown"+e+n,f.event.activateFocus)},mouseEvents:function(){f.verbose("Binding mouse events"),i.find(".track, .thumb, .inner").on("mousedown"+e,function(e){e.stopImmediatePropagation(),e.preventDefault(),f.event.down(e)}),i.on("mousedown"+e,f.event.down),i.on("mouseenter"+e,function(e){D=!0}),i.on("mouseleave"+e,function(e){D=!1})},touchEvents:function(){f.verbose("Binding touch events"),i.find(".track, .thumb, .inner").on("touchstart"+e,function(e){e.stopImmediatePropagation(),e.preventDefault(),f.event.down(e)}),i.on("touchstart"+e,f.event.down)},slidingEvents:function(){f.verbose("Binding page wide events while handle is being draged"),f.is.touch()?(U(B).on("touchmove"+e,f.event.move),U(B).on("touchend"+e,f.event.up)):(U(B).on("mousemove"+e,f.event.move),U(B).on("mouseup"+e,f.event.up))},windowEvents:function(){M.on("resize"+e,f.event.resize)}},unbind:{events:function(){i.find(".track, .thumb, .inner").off("mousedown"+e),i.find(".track, .thumb, .inner").off("touchstart"+e),i.off("mousedown"+e),i.off("mouseenter"+e),i.off("mouseleave"+e),i.off("touchstart"+e),i.off("keydown"+e),i.off("focusout"+e),U(B).off("keydown"+e+n,f.event.activateFocus),M.off("resize"+e)},slidingEvents:function(){f.is.touch()?(U(B).off("touchmove"+e),U(B).off("touchend"+e)):(U(B).off("mousemove"+e),U(B).off("mouseup"+e))}},event:{down:function(e){e.preventDefault(),f.is.range()?(e=f.determine.eventPos(e),e=f.determine.pos(e),c=d.preventCrossover&&f.is.range()&&f.thumbVal===f.secondThumbVal?(y=e,W):f.determine.closestThumb(e),u===W&&(u=f.get.currentThumbValue())):u===W&&(u=f.get.value()),f.is.disabled()||f.bind.slidingEvents()},move:function(e){e.preventDefault();var t,n,i=f.determine.valueFromEvent(e);c===W&&(t=f.determine.eventPos(e),t=f.determine.pos(t),c=t<y?r:s),0==f.get.step()||f.is.smooth()?(t=f.thumbVal,n=f.secondThumbVal,e=f.determine.smoothValueFromEvent(e),c.hasClass("second")?(d.preventCrossover&&f.is.range()&&(i=Math.max(t,i),e=Math.max(t,e)),n=i):(d.preventCrossover&&f.is.range()&&(i=Math.min(n,i),e=Math.min(n,e)),t=i),i=Math.abs(t-(n||0)),f.update.position(e),d.onMove.call(E,i,t,n)):f.update.value(i,function(e,t,n){d.onMove.call(E,e,t,n)})},up:function(e){e.preventDefault();e=f.determine.valueFromEvent(e);f.set.value(e),f.unbind.slidingEvents(),u!==W&&(u=W)},keydown:function(e,t){if(d.preventCrossover&&f.is.range()&&f.thumbVal===f.secondThumbVal&&(c=W),f.is.focused()&&U(B).trigger(e),t||f.is.focused()){t=f.determine.keyMovement(e);if(0!=t)switch(e.preventDefault(),t){case 1:f.takeStep();break;case 2:f.takeStep(f.get.multiplier());break;case-1:f.backStep();break;case-2:f.backStep(f.get.multiplier())}}},activateFocus:function(e){!f.is.focused()&&f.is.hover()&&0!=f.determine.keyMovement(e)&&(e.preventDefault(),f.event.keydown(e,!0),i.focus())},resize:function(e){P!=f.get.gapRatio()&&(f.setup.labels(),P=f.get.gapRatio())}},resync:function(){f.verbose("Resyncing thumb position based on value"),f.is.range()&&f.update.position(f.secondThumbVal,s),f.update.position(f.thumbVal,r),f.setup.labels()},takeStep:function(e){var e=e!=W?e:1,t=f.get.step(),n=f.get.currentThumbValue();f.verbose("Taking a step"),0<t?f.set.value(n+t*e):0==t&&(t=f.get.precision(),f.set.value(Math.round((n+e/t)*t)/t))},backStep:function(e){var e=e!=W?e:1,t=f.get.step(),n=f.get.currentThumbValue();f.verbose("Going back a step"),0<t?f.set.value(n-t*e):0==t&&(t=f.get.precision(),f.set.value(Math.round((n-e/t)*t)/t))},is:{range:function(){return i.hasClass(d.className.range)},hover:function(){return D},focused:function(){return i.is(":focus")},disabled:function(){return i.hasClass(d.className.disabled)},labeled:function(){return i.hasClass(d.className.labeled)},reversed:function(){return i.hasClass(d.className.reversed)},vertical:function(){return i.hasClass(d.className.vertical)},smooth:function(){return d.smooth||i.hasClass(d.className.smooth)},touch:function(){return b}},get:{trackOffset:function(){return f.is.vertical()?t.offset().top:t.offset().left},trackLength:function(){return f.is.vertical()?t.height():t.width()},trackLeft:function(){return f.is.vertical()?t.position().top:t.position().left},trackStartPos:function(){return f.is.reversed()?f.get.trackLeft()+f.get.trackLength():f.get.trackLeft()},trackEndPos:function(){return f.is.reversed()?f.get.trackLeft():f.get.trackLeft()+f.get.trackLength()},trackStartMargin:function(){var e=f.is.vertical()?f.is.reversed()?i.css("padding-bottom"):i.css("padding-top"):f.is.reversed()?i.css("padding-right"):i.css("padding-left");return e||"0px"},trackEndMargin:function(){var e=f.is.vertical()?f.is.reversed()?i.css("padding-top"):i.css("padding-bottom"):f.is.reversed()?i.css("padding-left"):i.css("padding-right");return e||"0px"},precision:function(){var e=f.get.step(),e=(e=0!=e?2==(e=String(e).split(".")).length?e[1].length:0:d.decimalPlaces,Math.pow(10,e));return f.debug("Precision determined",e),e},min:function(){return d.min},max:function(){var e=f.get.step(),t=f.get.min(),n=0===e?0:Math.floor((d.max-t)/e);return 0==(0===e?0:(d.max-t)%e)?d.max:t+n*e},step:function(){return d.step},numLabels:function(){var e=Math.round((f.get.max()-f.get.min())/(0===f.get.step()?1:f.get.step()));return f.debug("Determined that there should be "+e+" labels"),e},labelType:function(){return d.labelType},label:function(e){if(S)return S(e);switch(d.labelType){case d.labelTypes.number:return Math.round((e*(0===f.get.step()?1:f.get.step())+f.get.min())*o)/o;case d.labelTypes.letter:return N[e%26];default:return e}},value:function(){return l},currentThumbValue:function(){return c!==W&&c.hasClass("second")?f.secondThumbVal:f.thumbVal},thumbValue:function(e){return"second"!==e?f.thumbVal:f.is.range()?f.secondThumbVal:void f.error(T.notrange)},multiplier:function(){return d.pageMultiplier},thumbPosition:function(e){return"second"!==e?p:f.is.range()?h:void f.error(T.notrange)},gapRatio:function(){var e=1;if(d.autoAdjustLabels){var t=f.get.numLabels(),n=f.get.trackLength(),i=1;if(0<n)for(;n/t*i<d.labelDistance;)t%i||(e=i),i+=1}return e}},determine:{pos:function(e){return f.is.reversed()?f.get.trackStartPos()-e+f.get.trackOffset():e-f.get.trackOffset()-f.get.trackStartPos()},closestThumb:function(e){var t=parseFloat(f.determine.thumbPos(r)),t=Math.abs(e-t),n=parseFloat(f.determine.thumbPos(s)),e=Math.abs(e-n);return(t!==e||f.get.thumbValue()!==f.get.min())&&t<=e?r:s},closestThumbPos:function(e){var t=parseFloat(f.determine.thumbPos(r)),n=Math.abs(e-t),i=parseFloat(f.determine.thumbPos(s));return n<=Math.abs(e-i)?t:i},thumbPos:function(e){return f.is.vertical()?f.is.reversed()?e.css("bottom"):e.css("top"):f.is.reversed()?e.css("right"):e.css("left")},positionFromValue:function(e){var t=f.get.min(),n=f.get.max(),e=n<e?n:e<t?t:e,i=f.get.trackLength(),n=Math.round((e-t)/(n-t)*i);return f.verbose("Determined position: "+n+" from value: "+e),n},positionFromRatio:function(e){var t=f.get.trackLength(),n=f.get.step(),e=Math.round(e*t);return 0==n?e:Math.round(e/n)*n},valueFromEvent:function(e){var e=f.determine.eventPos(e),t=f.determine.pos(e),e=e<f.get.trackOffset()?f.is.reversed()?f.get.max():f.get.min():e>f.get.trackOffset()+f.get.trackLength()?f.is.reversed()?f.get.min():f.get.max():f.determine.value(t);return e},smoothValueFromEvent:function(e){var t=f.get.min(),n=f.get.max(),i=f.get.trackLength(),e=f.determine.eventPos(e)-f.get.trackOffset(),e=(e=e<0?0:i<e?i:e)/i;return(e=f.is.reversed()?1-e:e)*(n-t)+t},eventPos:function(e){if(f.is.touch())return t=(n=(n=e.changedTouches?e:e.originalEvent).changedTouches[0]?n.changedTouches:n.touches)[0].pageY,n=n[0].pageX,f.is.vertical()?t:n;var t=e.pageY||e.originalEvent.pageY,n=e.pageX||e.originalEvent.pageX;return f.is.vertical()?t:n},value:function(e){var t=f.is.reversed()?f.get.trackEndPos():f.get.trackStartPos(),t=(e-t)/((f.is.reversed()?f.get.trackStartPos():f.get.trackEndPos())-t),n=f.get.max()-f.get.min(),i=f.get.step(),t=t*n,n=0==i?t:Math.round(t/i)*i;return f.verbose("Determined value based upon position: "+e+" as: "+t),t!=n&&f.verbose("Rounding value to closest step: "+n),f.verbose("Cutting off additional decimal places"),Math.round((n+f.get.min())*o)/o},keyMovement:function(e){var e=e.which,t=!f.is.vertical()||f.is.reversed()?a.downArrow:a.upArrow,n=!f.is.vertical()||f.is.reversed()?a.upArrow:a.downArrow,i=!f.is.vertical()&&f.is.reversed()?a.rightArrow:a.leftArrow,o=!f.is.vertical()&&f.is.reversed()?a.leftArrow:a.rightArrow;return e==t||e==i?-1:e==n||e==o?1:e==a.pageDown?-2:e==a.pageUp?2:0}},handleNewValuePosition:function(e){var t=f.get.min(),n=f.get.max();return e<=t?e=t:n<=e&&(e=n),f.determine.positionFromValue(e)},set:{value:function(i,o){o=!1!==o;var a=u===W;u=u===W?f.get.value():u,f.update.value(i,function(e,t,n){x&&!d.fireOnInit||!o||(i!==u&&d.onChange.call(E,e,t,n),d.onMove.call(E,e,t,n)),a&&(u=W)})},rangeValue:function(e,t,n){var i,o,a;n=!1!==n,f.is.range()?(i=f.get.min(),o=f.get.max(),u=(a=u===W)?f.get.value():u,e<=i?e=i:o<=e&&(e=o),t<=i?t=i:o<=t&&(t=o),f.thumbVal=e,f.secondThumbVal=t,l=Math.abs(f.thumbVal-f.secondThumbVal),f.update.position(f.thumbVal,r),f.update.position(f.secondThumbVal,s),x&&!d.fireOnInit||!n||(l!==u&&d.onChange.call(E,l,f.thumbVal,f.secondThumbVal),d.onMove.call(E,l,f.thumbVal,f.secondThumbVal)),a&&(u=W)):f.error(T.notrange)},position:function(e,t){e=f.determine.value(e);"second"===t?(f.secondThumbVal=e,f.update.position(e,s)):(f.thumbVal=e,f.update.position(e,r)),l=Math.abs(f.thumbVal-(f.secondThumbVal||0)),f.set.value(l)}},update:{value:function(e,t){var n=f.get.min(),i=f.get.max();e<=n?e=n:i<=e&&(e=i),f.is.range()?((c=c===W?e<=f.get.currentThumbValue()?r:s:c).hasClass("second")?(d.preventCrossover&&f.is.range()&&(e=Math.max(f.thumbVal,e)),f.secondThumbVal=e):(d.preventCrossover&&f.is.range()&&(e=Math.min(f.secondThumbVal,e)),f.thumbVal=e),l=Math.abs(f.thumbVal-f.secondThumbVal)):(l=e,f.thumbVal=l),f.update.position(e),f.debug("Setting slider value to "+l),"function"==typeof t&&t(l,f.thumbVal,f.secondThumbVal)},position:function(e,t){var n=f.handleNewValuePosition(e),t=t!=W?t:c,i=f.thumbVal||f.get.min(),o=f.secondThumbVal||f.get.min();f.is.range()&&t.hasClass("second")?(h=n,o=e):(p=n,i=e);var a,r=f.get.min(),s=f.get.max(),e=100*(e-r)/(s-r),l=100*(Math.min(i,o)-r)/(s-r),i=100*(1-(Math.max(i,o)-r)/(s-r)),o=f.is.vertical()?f.is.reversed()?(a={bottom:"calc("+e+"% - "+v+"px)",top:"auto"},{bottom:l+"%",top:i+"%"}):(a={top:"calc("+e+"% - "+v+"px)",bottom:"auto"},{top:l+"%",bottom:i+"%"}):f.is.reversed()?(a={right:"calc("+e+"% - "+v+"px)",left:"auto"},{right:l+"%",left:i+"%"}):(a={left:"calc("+e+"% - "+v+"px)",right:"auto"},{left:l+"%",right:i+"%"});t.css(a),m.css(o),f.debug("Setting slider position to "+n)},labelPosition:function(e,t){var n=f.get.trackStartMargin(),i=f.get.trackEndMargin(),o=f.is.vertical()?f.is.reversed()?"bottom":"top":f.is.reversed()?"right":"left",a=f.is.reversed()&&!f.is.vertical()?" - ":" + ";t.css(o,"calc("+("(100% - "+n+" - "+i+") * "+e)+a+n+")")}},goto:{max:function(){f.set.value(f.get.max())},min:function(){f.set.value(f.get.min())}},read:{metadata:function(){var e={thumbVal:i.data(w.thumbVal),secondThumbVal:i.data(w.secondThumbVal)};e.thumbVal&&(f.is.range()&&e.secondThumbVal?(f.debug("Current value set from metadata",e.thumbVal,e.secondThumbVal),f.set.rangeValue(e.thumbVal,e.secondThumbVal)):(f.debug("Current value set from metadata",e.thumbVal),f.set.value(e.thumbVal)))},settings:function(){!1!==d.start&&(f.is.range()?(f.debug("Start position set from settings",d.start,d.end),f.set.rangeValue(d.start,d.end)):(f.debug("Start position set from settings",d.start),f.set.value(d.start)))}},setting:function(e,t){if(f.debug("Changing setting",e,t),U.isPlainObject(e))U.extend(!0,d,e);else{if(t===W)return d[e];U.isPlainObject(d[e])?U.extend(!0,d[e],t):d[e]=t}},internal:function(e,t){if(U.isPlainObject(e))U.extend(!0,f,e);else{if(t===W)return f[e];f[e]=t}},debug:function(){!d.silent&&d.debug&&(d.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,d.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),f.verbose.apply(console,arguments)))},error:function(){d.silent||(f.error=Function.prototype.bind.call(console.error,console,d.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n;d.performance&&(n=(t=(new Date).getTime())-(j||t),j=t,L.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:E,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=d.name+":",n=0;j=!1,clearTimeout(f.performance.timer),U.each(L,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",I&&(e+=" '"+I+"'"),(console.group!==W||console.table!==W)&&0<L.length&&(console.groupCollapsed(e),console.table?console.table(L):U.each(L,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),L=[]}},invoke:function(i,e,t){var o,a,n,r=F;return e=e||z,t=E||t,"string"==typeof i&&r!==W&&(i=i.split(/[\. ]/),o=i.length-1,U.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(U.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==W)return a=r[n],!1;{if(!U.isPlainObject(r[t])||e==o)return r[t]!==W?a=r[t]:f.error(T.method,i),!1;r=r[t]}}})),U.isFunction(a)?n=a.apply(t,e):a!==W&&(n=a),U.isArray(R)?R.push(n):R!==W?R=[R,n]:n!==W&&(R=n),a}};q?(F===W&&f.initialize(),f.invoke(V)):(F!==W&&F.invoke("destroy"),f.initialize())}),R!==W?R:this},U.fn.slider.settings={silent:!1,debug:!1,verbose:!1,performance:!0,name:"Slider",namespace:"slider",error:{method:"The method you called is not defined.",notrange:"This slider is not a range slider"},metadata:{thumbVal:"thumbVal",secondThumbVal:"secondThumbVal"},min:0,max:20,step:1,start:0,end:20,labelType:"number",showLabelTicks:!1,smooth:!1,autoAdjustLabels:!0,labelDistance:100,preventCrossover:!0,fireOnInit:!1,interpretLabel:!1,decimalPlaces:2,pageMultiplier:2,selector:{},className:{reversed:"reversed",disabled:"disabled",labeled:"labeled",ticked:"ticked",vertical:"vertical",range:"range",smooth:"smooth"},keys:{pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},labelTypes:{number:"number",letter:"letter"},onChange:function(e,t,n){},onMove:function(e,t,n){}}}(jQuery,window,document),function(k,e,T){"use strict";k.isFunction=k.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),k.fn.rating=function(g){var p,h=k(this),v=h.selector||"",b=(new Date).getTime(),y=[],x=g,C="string"==typeof x,w=[].slice.call(arguments,1);return h.each(function(){var e,o=k.isPlainObject(g)?k.extend(!0,{},k.fn.rating.settings,g):k.extend({},k.fn.rating.settings),u=o.namespace,a=o.className,t=o.metadata,n=o.selector,d=o.cssVars,i="."+u,f="module-"+u,m=this,s=k(this).data(f),r=k(this),l=r.find(n.icon),c={initialize:function(){c.verbose("Initializing rating module",o),0===l.length&&c.setup.layout(),o.interactive&&!c.is.disabled()?c.enable():c.disable(),c.set.initialLoad(),c.set.rating(c.get.initialRating()),c.remove.initialLoad(),c.instantiate()},instantiate:function(){c.verbose("Instantiating module",o),s=c,r.data(f,c)},destroy:function(){c.verbose("Destroying previous instance",s),c.remove.events(),r.removeData(f)},refresh:function(){l=r.find(n.icon)},setup:{layout:function(){var e=c.get.maxRating(),t=c.get.icon(),e=k.fn.rating.settings.templates.icon(e,t);c.debug("Generating icon html dynamically"),r.html(e),c.refresh()}},event:{mouseenter:function(){var e=k(this);e.nextAll().removeClass(a.selected),r.addClass(a.selected),e.addClass(a.selected).prevAll().addClass(a.selected)},mouseleave:function(){r.removeClass(a.selected),l.removeClass(a.selected)},click:function(){var e=k(this),t=c.get.rating(),e=l.index(e)+1;("auto"==o.clearable?1===l.length:o.clearable)&&t==e?c.clearRating():c.set.rating(e)}},clearRating:function(){c.debug("Clearing current rating"),c.set.rating(0)},bind:{events:function(){c.verbose("Binding events"),r.on("mouseenter"+i,n.icon,c.event.mouseenter).on("mouseleave"+i,n.icon,c.event.mouseleave).on("click"+i,n.icon,c.event.click)}},remove:{events:function(){c.verbose("Removing events"),r.off(i)},initialLoad:function(){e=!1}},enable:function(){c.debug("Setting rating to interactive mode"),c.bind.events(),r.removeClass(a.disabled)},disable:function(){c.debug("Setting rating to read-only mode"),c.remove.events(),r.addClass(a.disabled)},is:{initialLoad:function(){return e},disabled:function(){return r.hasClass(a.disabled)}},get:{icon:function(){var e=r.data(t.icon);return e&&r.removeData(t.icon),e||o.icon},initialRating:function(){return r.data(t.rating)!==T?(r.removeData(t.rating),r.data(t.rating)):o.initialRating},maxRating:function(){return r.data(t.maxRating)!==T?(r.removeData(t.maxRating),r.data(t.maxRating)):o.maxRating},rating:function(){var e=l.filter("."+a.active).length;return c.verbose("Current rating retrieved",e),e}},set:{rating:function(e){var t=Math.floor(0<=e-1?e-1:0),t=l.eq(t),n=e<=1?t:t.next(),i=e%1*100;r.removeClass(a.selected),l.removeClass(a.selected).removeClass(a.active).removeClass(a.partiallyActive),0<e&&(c.verbose("Setting current rating to",e),t.prevAll().addBack().addClass(a.active),t.next()&&e%1!=0&&(n.addClass(a.partiallyActive).addClass(a.active),n.css(d.filledCustomPropName,i+"%"),"transparent"===n.css("backgroundColor")&&n.removeClass(a.partiallyActive).removeClass(a.active))),c.is.initialLoad()||o.onRate.call(m,e)},initialLoad:function(){e=!0}},setting:function(e,t){if(c.debug("Changing setting",e,t),k.isPlainObject(e))k.extend(!0,o,e);else{if(t===T)return o[e];k.isPlainObject(o[e])?k.extend(!0,o[e],t):o[e]=t}},internal:function(e,t){if(k.isPlainObject(e))k.extend(!0,c,e);else{if(t===T)return c[e];c[e]=t}},debug:function(){!o.silent&&o.debug&&(o.performance?c.performance.log(arguments):(c.debug=Function.prototype.bind.call(console.info,console,o.name+":"),c.debug.apply(console,arguments)))},verbose:function(){!o.silent&&o.verbose&&o.debug&&(o.performance?c.performance.log(arguments):(c.verbose=Function.prototype.bind.call(console.info,console,o.name+":"),c.verbose.apply(console,arguments)))},error:function(){o.silent||(c.error=Function.prototype.bind.call(console.error,console,o.name+":"),c.error.apply(console,arguments))},performance:{log:function(e){var t,n;o.performance&&(n=(t=(new Date).getTime())-(b||t),b=t,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:m,"Execution Time":n})),clearTimeout(c.performance.timer),c.performance.timer=setTimeout(c.performance.display,500)},display:function(){var e=o.name+":",n=0;b=!1,clearTimeout(c.performance.timer),k.each(y,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",v&&(e+=" '"+v+"'"),1<h.length&&(e+=" ("+h.length+")"),(console.group!==T||console.table!==T)&&0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):k.each(y,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(i,e,t){var o,a,n,r=s;return e=e||w,t=m||t,"string"==typeof i&&r!==T&&(i=i.split(/[\. ]/),o=i.length-1,k.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(k.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==T)return a=r[n],!1;{if(!k.isPlainObject(r[t])||e==o)return r[t]!==T&&(a=r[t]),!1;r=r[t]}}})),k.isFunction(a)?n=a.apply(t,e):a!==T&&(n=a),Array.isArray(p)?p.push(n):p!==T?p=[p,n]:n!==T&&(p=n),a}};C?(s===T&&c.initialize(),c.invoke(x)):(s!==T&&s.invoke("destroy"),c.initialize())}),p!==T?p:this},k.fn.rating.settings={name:"Rating",namespace:"rating",icon:"star",silent:!1,debug:!1,verbose:!1,performance:!0,initialRating:0,interactive:!0,maxRating:4,clearable:"auto",fireOnInit:!1,onRate:function(e){},error:{method:"The method you called is not defined",noMaximum:"No maximum rating specified. Cannot generate HTML automatically"},metadata:{rating:"rating",maxRating:"maxRating",icon:"icon"},className:{active:"active",disabled:"disabled",selected:"selected",loading:"loading",partiallyActive:"partial"},cssVars:{filledCustomPropName:"--full"},selector:{icon:".icon"},templates:{icon:function(e,t){for(var n=1,i="";n<=e;)i+='<i class="'+t+' icon"></i>',n++;return i}}}}(jQuery,window,void document),function(F,P,O,R){"use strict";F.isFunction=F.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},P=void 0!==P&&P.Math==Math?P:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),F.fn.search=function(x){var C,w=F(this),k=w.selector||"",T=(new Date).getTime(),S=[],D=x,A="string"==typeof D,E=[].slice.call(arguments,1);return F(this).each(function(){var u=F.isPlainObject(x)?F.extend(!0,{},F.fn.search.settings,x):F.extend({},F.fn.search.settings),d=u.className,l=u.metadata,h=u.regExp,a=u.fields,f=u.selector,m=u.error,e=u.namespace,i="."+e,t=e+"-module",g=F(this),v=g.find(f.prompt),n=g.find(f.searchButton),o=g.find(f.results),r=g.find(f.result),c=(g.find(f.category),this),s=g.data(t),b=!1,y=!1,p={initialize:function(){p.verbose("Initializing module"),p.get.settings(),p.determine.searchFields(),p.bind.events(),p.set.type(),p.create.results(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),s=p,g.data(t,p)},destroy:function(){p.verbose("Destroying instance"),g.off(i).removeData(t)},refresh:function(){p.debug("Refreshing selector cache"),v=g.find(f.prompt),n=g.find(f.searchButton),g.find(f.category),o=g.find(f.results),r=g.find(f.result)},refreshResults:function(){o=g.find(f.results),r=g.find(f.result)},bind:{events:function(){p.verbose("Binding events to search"),u.automatic&&(g.on(p.get.inputEvent()+i,f.prompt,p.event.input),v.attr("autocomplete",p.is.chrome()?"fomantic-search":"off")),g.on("focus"+i,f.prompt,p.event.focus).on("blur"+i,f.prompt,p.event.blur).on("keydown"+i,f.prompt,p.handleKeyboard).on("click"+i,f.searchButton,p.query).on("mousedown"+i,f.results,p.event.result.mousedown).on("mouseup"+i,f.results,p.event.result.mouseup).on("click"+i,f.result,p.event.result.click)}},determine:{searchFields:function(){x&&x.searchFields!==R&&(u.searchFields=x.searchFields)}},event:{input:function(){u.searchDelay?(clearTimeout(p.timer),p.timer=setTimeout(function(){p.is.focused()&&p.query()},u.searchDelay)):p.query()},focus:function(){p.set.focus(),u.searchOnFocus&&p.has.minimumCharacters()&&p.query(function(){p.can.show()&&p.showResults()})},blur:function(e){function t(){p.cancel.query(),p.remove.focus(),p.timer=setTimeout(p.hideResults,u.hideDelay)}var n=O.activeElement===this;n||(y=!1,p.resultsClicked?(p.debug("Determining if user action caused search to close"),g.one("click.close"+i,f.results,function(e){p.is.inMessage(e)||b?v.focus():(b=!1,p.is.animating()||p.is.hidden()||t())})):(p.debug("Input blurred without user action, closing results"),t()))},result:{mousedown:function(){p.resultsClicked=!0},mouseup:function(){p.resultsClicked=!1},click:function(e){p.debug("Search result selected");var t=F(this),n=t.find(f.title).eq(0),i=t.is("a[href]")?t:t.find("a[href]").eq(0),o=i.attr("href")||!1,a=i.attr("target")||!1,n=0<n.length&&n.text(),r=p.get.results(),t=t.data(l.result)||p.get.result(n,r),s=p.get.value();if(F.isFunction(u.onSelect)&&!1===u.onSelect.call(c,t,r))return p.debug("Custom onSelect callback cancelled default select action"),void(b=!0);p.hideResults(),n&&p.get.value()===s&&p.set.value(n),o&&(e.preventDefault(),p.verbose("Opening search link found in result",i),"_blank"==a||e.ctrlKey?P.open(o):P.location.href=o)}}},ensureVisible:function(e){var t,n,i;0!==e.length&&(e=(t=e.position().top)+e.outerHeight(!0),n=o.scrollTop(),i=o.height(),t<0?o.scrollTop(n+t):i<e&&o.scrollTop(n+(e-i)))},handleKeyboard:function(e){var t,n=g.find(f.result),i=g.find(f.category),o=n.filter("."+d.active),a=n.index(o),r=n.length,o=0<o.length,s=e.which,l=13,c=38,u=40;if(s==27&&(p.verbose("Escape key pressed, blurring search field"),p.hideResults(),y=!0),p.is.visible())if(s==l){if(p.verbose("Enter key pressed, selecting active result"),0<n.filter("."+d.active).length)return p.event.result.click.call(n.filter("."+d.active),e),e.preventDefault(),!1}else s==c&&o?(p.verbose("Up key pressed, changing active result"),t=a-1<0?a:a-1,i.removeClass(d.active),n.removeClass(d.active).eq(t).addClass(d.active).closest(i).addClass(d.active),p.ensureVisible(n.eq(t)),e.preventDefault()):s==u&&(p.verbose("Down key pressed, changing active result"),t=r<=a+1?a:a+1,i.removeClass(d.active),n.removeClass(d.active).eq(t).addClass(d.active).closest(i).addClass(d.active),p.ensureVisible(n.eq(t)),e.preventDefault());else s==l&&(p.verbose("Enter key pressed, executing query"),p.query(),p.set.buttonPressed(),v.one("keyup",p.remove.buttonFocus))},setup:{api:function(t,n){var e={debug:u.debug,on:!1,cache:u.cache,action:"search",urlData:{query:t},onSuccess:function(e){p.parse.response.call(c,e,t),n()},onFailure:function(){p.displayMessage(m.serverError),n()},onAbort:function(e){},onError:p.error};F.extend(!0,e,u.apiSettings),p.verbose("Setting up API request",e),g.api(e)}},can:{useAPI:function(){return F.fn.api!==R},show:function(){return p.is.focused()&&!p.is.visible()&&!p.is.empty()},transition:function(){return u.transition&&F.fn.transition!==R&&g.transition("is supported")}},is:{animating:function(){return o.hasClass(d.animating)},chrome:function(){return!(!P.chrome||!P.chrome.webstore&&!P.chrome.runtime)},hidden:function(){return o.hasClass(d.hidden)},inMessage:function(e){var t;if(e.target)return t=F(e.target),F.contains(O.documentElement,e.target)&&0<t.closest(f.message).length},empty:function(){return""===o.html()},visible:function(){return 0<o.filter(":visible").length},focused:function(){return 0<v.filter(":focus").length}},get:{settings:function(){F.isPlainObject(x)&&x.searchFullText&&(u.fullTextSearch=x.searchFullText,p.error(u.error.oldSearchSyntax,c)),u.ignoreDiacritics&&!String.prototype.normalize&&(u.ignoreDiacritics=!1,p.error(m.noNormalize,c))},inputEvent:function(){var e=v[0];return e!==R&&e.oninput!==R?"input":e!==R&&e.onpropertychange!==R?"propertychange":"keyup"},value:function(){return v.val()},results:function(){return g.data(l.results)},result:function(n,e){var i=!1;return n=n!==R?n:p.get.value(),e=e!==R?e:p.get.results(),"category"===u.type?(p.debug("Finding result that matches",n),F.each(e,function(e,t){if(Array.isArray(t.results)&&(i=p.search.object(n,t.results)[0]))return!1})):(p.debug("Finding result in results object",n),i=p.search.object(n,e)[0]),i||!1}},select:{firstResult:function(){p.verbose("Selecting first result"),r.first().addClass(d.active)}},set:{focus:function(){g.addClass(d.focus)},loading:function(){g.addClass(d.loading)},value:function(e){p.verbose("Setting search input value",e),v.val(e)},type:function(e){e=e||u.type,"category"==u.type&&g.addClass(u.type)},buttonPressed:function(){n.addClass(d.pressed)}},remove:{loading:function(){g.removeClass(d.loading)},focus:function(){g.removeClass(d.focus)},buttonPressed:function(){n.removeClass(d.pressed)},diacritics:function(e){return u.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}},query:function(e){e=F.isFunction(e)?e:function(){};var t=p.get.value(),n=p.read.cache(t);e=e||function(){},p.has.minimumCharacters()?(n?(p.debug("Reading result from cache",t),p.save.results(n.results),p.addResults(n.html),p.inject.id(n.results),e()):(p.debug("Querying for",t),F.isPlainObject(u.source)||Array.isArray(u.source)?(p.search.local(t),e()):p.can.useAPI()?p.search.remote(t,e):(p.error(m.source),e())),u.onSearchQuery.call(c,t)):p.hideResults()},search:{local:function(e){var t,n=p.search.object(e,u.source);p.set.loading(),p.save.results(n),p.debug("Returned full local search results",n),0<u.maxResults&&(p.debug("Using specified max results",n),n=n.slice(0,u.maxResults)),"category"==u.type&&(n=p.create.categoryResults(n)),t=p.generateResults({results:n}),p.remove.loading(),p.addResults(t),p.inject.id(n),p.write.cache(e,{html:t,results:n})},remote:function(e,t){t=F.isFunction(t)?t:function(){},g.api("is loading")&&g.api("abort"),p.setup.api(e,t),g.api("query")},object:function(o,t,e){o=p.remove.diacritics(String(o));function a(e,t){var n=-1==F.inArray(t,r),i=-1==F.inArray(t,l),o=-1==F.inArray(t,s);n&&i&&o&&e.push(t)}var r=[],s=[],l=[],n=o.replace(h.escape,"\\$&"),c=new RegExp(h.beginsWith+n,"i");return t=t||u.source,e=e!==R?e:u.searchFields,Array.isArray(e)||(e=[e]),t===R||!1===t?(p.error(m.source),[]):(F.each(e,function(e,i){F.each(t,function(e,t){var n;"string"!=typeof t[i]&&"number"!=typeof t[i]||(-1!==(n="string"==typeof t[i]?p.remove.diacritics(t[i]):t[i].toString()).search(c)?a(r,t):"exact"===u.fullTextSearch&&p.exactSearch(o,n)?a(s,t):1==u.fullTextSearch&&p.fuzzySearch(o,n)&&a(l,t))})}),F.merge(s,l),F.merge(r,s),r)}},exactSearch:function(e,t){return e=e.toLowerCase(),-1<(t=t.toLowerCase()).indexOf(e)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if("string"!=typeof e)return!1;if(e=e.toLowerCase(),t=t.toLowerCase(),n<i)return!1;if(i===n)return e===t;e:for(var o=0,a=0;o<i;o++){for(var r=e.charCodeAt(o);a<n;)if(t.charCodeAt(a++)===r)continue e;return!1}return!0},parse:{response:function(e,t){Array.isArray(e)&&((n={})[a.results]=e,e=n);var n=p.generateResults(e);p.verbose("Parsing server response",e),e!==R&&t!==R&&e[a.results]!==R&&(p.addResults(n),p.inject.id(e[a.results]),p.write.cache(t,{html:n,results:e[a.results]}),p.save.results(e[a.results]))}},cancel:{query:function(){p.can.useAPI()&&g.api("abort")}},has:{minimumCharacters:function(){return p.get.value().length>=u.minCharacters},results:function(){return 0!==o.length&&""!=o.html()}},clear:{cache:function(e){var t=g.data(l.cache);e?t&&t[e]&&(p.debug("Removing value from cache",e),delete t[e],g.data(l.cache,t)):(p.debug("Clearing cache",e),g.removeData(l.cache))}},read:{cache:function(e){var t=g.data(l.cache);return!!u.cache&&(p.verbose("Checking cache for generated html for query",e),"object"==typeof t&&t[e]!==R&&t[e])}},create:{categoryResults:function(e){var n={};return F.each(e,function(e,t){t.category&&(n[t.category]===R?(p.verbose("Creating new category of results",t.category),n[t.category]={name:t.category,results:[t]}):n[t.category].results.push(t))}),n},id:function(e,t){var n,e=e+1;return t!==R?(t=String.fromCharCode(97+t),p.verbose("Creating category result id",n=t+e)):p.verbose("Creating result id",n=e),n},results:function(){0===o.length&&(o=F("<div />").addClass(d.results).appendTo(g))}},inject:{result:function(e,t,n){p.verbose("Injecting result into results");n=(n!==R?o.children().eq(n).children(f.results).first():o).children(f.result).eq(t);p.verbose("Injecting results metadata",n),n.data(l.result,e)},id:function(e){p.debug("Injecting unique ids into results");var n=0,i=0;return"category"===u.type?F.each(e,function(e,t){0<t.results.length&&(i=0,F.each(t.results,function(e,t){t.id===R&&(t.id=p.create.id(i,n)),p.inject.result(t,i,n),i++}),n++)}):F.each(e,function(e,t){t.id===R&&(t.id=p.create.id(i)),p.inject.result(t,i),i++}),e}},save:{results:function(e){p.verbose("Saving current search results to metadata",e),g.data(l.results,e)}},write:{cache:function(e,t){var n=g.data(l.cache)!==R?g.data(l.cache):{};u.cache&&(p.verbose("Writing generated html to cache",e,t),n[e]=t,g.data(l.cache,n))}},addResults:function(e){if(F.isFunction(u.onResultsAdd)&&!1===u.onResultsAdd.call(o,e))return p.debug("onResultsAdd callback cancelled default action"),!1;e?(o.html(e),p.refreshResults(),u.selectFirstResult&&p.select.firstResult(),p.showResults()):p.hideResults(function(){o.empty()})},showResults:function(e){e=F.isFunction(e)?e:function(){},y||!p.is.visible()&&p.has.results()&&(p.can.transition()?(p.debug("Showing results with css animations"),o.transition({animation:u.transition+" in",debug:u.debug,verbose:u.verbose,duration:u.duration,onShow:function(){var e=g.find(f.result).eq(0);p.ensureVisible(e)},onComplete:function(){e()},queue:!0})):(p.debug("Showing results with javascript"),o.stop().fadeIn(u.duration,u.easing)),u.onResultsOpen.call(o))},hideResults:function(e){e=F.isFunction(e)?e:function(){},p.is.visible()&&(p.can.transition()?(p.debug("Hiding results with css animations"),o.transition({animation:u.transition+" out",debug:u.debug,verbose:u.verbose,duration:u.duration,onComplete:function(){e()},queue:!0})):(p.debug("Hiding results with javascript"),o.stop().fadeOut(u.duration,u.easing)),u.onResultsClose.call(o))},generateResults:function(e){p.debug("Generating html from response",e);var t=u.templates[u.type],n=F.isPlainObject(e[a.results])&&!F.isEmptyObject(e[a.results]),i=Array.isArray(e[a.results])&&0<e[a.results].length,o="";return n||i?(0<u.maxResults&&(n?"standard"==u.type&&p.error(m.maxResults):e[a.results]=e[a.results].slice(0,u.maxResults)),F.isFunction(t)?o=t(e,a,u.preserveHTML):p.error(m.noTemplate,!1)):u.showNoResults&&(o=p.displayMessage(m.noResults,"empty",m.noResultsHeader)),u.onResults.call(c,e),o},displayMessage:function(e,t,n){return p.debug("Displaying message",e,t=t||"standard",n),p.addResults(u.templates.message(e,t,n)),u.templates.message(e,t,n)},setting:function(e,t){if(F.isPlainObject(e))F.extend(!0,u,e);else{if(t===R)return u[e];u[e]=t}},internal:function(e,t){if(F.isPlainObject(e))F.extend(!0,p,e);else{if(t===R)return p[e];p[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,u.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),p.verbose.apply(console,arguments)))},error:function(){u.silent||(p.error=Function.prototype.bind.call(console.error,console,u.name+":"),p.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(T||t),T=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:c,"Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var e=u.name+":",n=0;T=!1,clearTimeout(p.performance.timer),F.each(S,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",k&&(e+=" '"+k+"'"),1<w.length&&(e+=" ("+w.length+")"),(console.group!==R||console.table!==R)&&0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):F.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(i,e,t){var o,a,n,r=s;return e=e||E,t=c||t,"string"==typeof i&&r!==R&&(i=i.split(/[\. ]/),o=i.length-1,F.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(F.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==R)return a=r[n],!1;{if(!F.isPlainObject(r[t])||e==o)return r[t]!==R&&(a=r[t]),!1;r=r[t]}}})),F.isFunction(a)?n=a.apply(t,e):a!==R&&(n=a),Array.isArray(C)?C.push(n):C!==R?C=[C,n]:n!==R&&(C=n),a}};A?(s===R&&p.initialize(),p.invoke(D)):(s!==R&&s.invoke("destroy"),p.initialize())}),C!==R?C:this},F.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchOnFocus:!0,searchFields:["id","title","description"],displayField:"",fullTextSearch:"exact",ignoreDiacritics:!1,automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,preserveHTML:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(e){},onResults:function(e){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResultsHeader:"No Results",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",noTemplate:"A valid template name was not specified.",oldSearchSyntax:"searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined.",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e},message:function(e,t,n){var i="";return e!==R&&t!==R&&(i+='<div class="message '+t+'">',n&&(i+='<div class="header">'+n+"</div>"),i=i+' <div class="description">'+e+"</div></div>"),i},category:function(e,n,i){var o="",a=F.fn.search.settings.templates.escape;return e[n.categoryResults]!==R&&(F.each(e[n.categoryResults],function(e,t){t[n.results]!==R&&0<t.results.length&&(o+='<div class="category">',t[n.categoryName]!==R&&(o+='<div class="name">'+a(t[n.categoryName],i)+"</div>"),o+='<div class="results">',F.each(t.results,function(e,t){t[n.url]?o+='<a class="result" href="'+t[n.url].replace(/"/g,"")+'">':o+='<a class="result">',t[n.image]!==R&&(o+='<div class="image"> <img src="'+t[n.image].replace(/"/g,"")+'"></div>'),o+='<div class="content">',t[n.price]!==R&&(o+='<div class="price">'+a(t[n.price],i)+"</div>"),t[n.title]!==R&&(o+='<div class="title">'+a(t[n.title],i)+"</div>"),t[n.description]!==R&&(o+='<div class="description">'+a(t[n.description],i)+"</div>"),o+="</div></a>"}),o+="</div></div>")}),e[n.action]&&(!1===n.actionURL?o+='<div class="action">'+a(e[n.action][n.actionText],i)+"</div>":o+='<a href="'+e[n.action][n.actionURL].replace(/"/g,"")+'" class="action">'+a(e[n.action][n.actionText],i)+"</a>"),o)},standard:function(e,n,i){var o="",a=F.fn.search.settings.templates.escape;return e[n.results]!==R&&(F.each(e[n.results],function(e,t){t[n.url]?o+='<a class="result" href="'+t[n.url].replace(/"/g,"")+'">':o+='<a class="result">',t[n.image]!==R&&(o+='<div class="image"> <img src="'+t[n.image].replace(/"/g,"")+'"></div>'),o+='<div class="content">',t[n.price]!==R&&(o+='<div class="price">'+a(t[n.price],i)+"</div>"),t[n.title]!==R&&(o+='<div class="title">'+a(t[n.title],i)+"</div>"),t[n.description]!==R&&(o+='<div class="description">'+a(t[n.description],i)+"</div>"),o+="</div></a>"}),e[n.action]&&(!1===n.actionURL?o+='<div class="action">'+a(e[n.action][n.actionText],i)+"</div>":o+='<a href="'+e[n.action][n.actionURL].replace(/"/g,"")+'" class="action">'+a(e[n.action][n.actionText],i)+"</a>"),o)}}}}(jQuery,window,document),function(D,e,A,E){"use strict";D.isFunction=D.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),D.fn.shape=function(v){var b,y=D(this),x=(new Date).getTime(),C=[],w=v,k="string"==typeof w,T=[].slice.call(arguments,1),S=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,0)};return y.each(function(){var n,i,t=y.selector||"",a=D.isPlainObject(v)?D.extend(!0,{},D.fn.shape.settings,v):D.extend({},D.fn.shape.settings),e=a.namespace,r=a.selector,f=a.error,s=a.className,m="."+e,g="module-"+e,l=D(this),o=l.find(">"+r.sides),c=o.find(">"+r.side),p=!1,u=this,h=l.data(g),d={initialize:function(){d.verbose("Initializing module for",u),d.set.defaultSide(),d.instantiate()},instantiate:function(){d.verbose("Storing instance of module",d),h=d,l.data(g,h)},destroy:function(){d.verbose("Destroying previous module for",u),l.removeData(g).off(m)},refresh:function(){d.verbose("Refreshing selector cache for",u),l=D(u),o=D(this).find(r.sides),c=D(this).find(r.side)},repaint:function(){d.verbose("Forcing repaint event");(o[0]||A.createElement("div")).offsetWidth},animate:function(e,t){d.verbose("Animating box with properties",e),t=t||function(e){d.verbose("Executing animation callback"),e!==E&&e.stopPropagation(),d.reset(),d.set.active()},a.beforeChange.call(i[0]),d.get.transitionEvent()?(d.verbose("Starting CSS animation"),l.addClass(s.animating),o.css(e).one(d.get.transitionEvent(),t),d.set.duration(a.duration),S(function(){l.addClass(s.animating),n.addClass(s.hidden)})):t()},queue:function(e){d.debug("Queueing animation of",e),o.one(d.get.transitionEvent(),function(){d.debug("Executing queued animation"),setTimeout(function(){l.shape(e)},0)})},reset:function(){d.verbose("Animating states reset"),l.removeClass(s.animating).attr("style","").removeAttr("style"),o.attr("style","").removeAttr("style"),c.attr("style","").removeAttr("style").removeClass(s.hidden),i.removeClass(s.animating).attr("style","").removeAttr("style")},is:{complete:function(){return c.filter("."+s.active)[0]==i[0]},animating:function(){return l.hasClass(s.animating)},hidden:function(){return 0<l.closest(":hidden").length}},set:{defaultSide:function(){n=c.filter("."+a.className.active),i=0<n.next(r.side).length?n.next(r.side):c.first(),p=!1,d.verbose("Active side set to",n),d.verbose("Next side set to",i)},duration:function(e){e=e||a.duration,d.verbose("Setting animation duration",e="number"==typeof e?e+"ms":e),!a.duration&&0!==a.duration||o.add(c).css({"-webkit-transition-duration":e,"-moz-transition-duration":e,"-ms-transition-duration":e,"-o-transition-duration":e,"transition-duration":e})},currentStageSize:function(){var e=c.filter("."+a.className.active),t=e.outerWidth(!0),e=e.outerHeight(!0);l.css({width:t,height:e})},stageSize:function(){var e=l.clone().addClass(s.loading),t=e.find(">"+r.sides+">"+r.side),n=t.filter("."+a.className.active),t=p?t.eq(p):0<n.next(r.side).length?n.next(r.side):t.first(),i="next"===a.width?t.outerWidth(!0):"initial"===a.width?l.width():a.width,o="next"===a.height?t.outerHeight(!0):"initial"===a.height?l.height():a.height;n.removeClass(s.active),t.addClass(s.active),e.insertAfter(l),e.remove(),"auto"!==a.width&&(l.css("width",i+a.jitter),d.verbose("Specifying width during animation",i)),"auto"!==a.height&&(l.css("height",o+a.jitter),d.verbose("Specifying height during animation",o))},nextSide:function(e){p=e,i=c.filter(e),p=c.index(i),0===i.length&&(d.set.defaultSide(),d.error(f.side)),d.verbose("Next side manually set to",i)},active:function(){d.verbose("Setting new side to active",i),c.removeClass(s.active),i.addClass(s.active),a.onChange.call(i[0]),d.set.defaultSide()}},flip:{to:function(e,t){var n;d.is.hidden()?d.debug("Module not visible",i):!d.is.complete()||d.is.animating()||a.allowRepeats?(n=d.get.transform[e](),d.is.animating()?d.queue("flip "+e):(d.debug("Flipping "+e,i),d.set.stageSize(),d.stage[t](),d.animate(n))):d.debug("Side already visible",i)},up:function(){d.flip.to("up","above")},down:function(){d.flip.to("down","below")},left:function(){d.flip.to("left","left")},right:function(){d.flip.to("right","right")},over:function(){d.flip.to("over","behind")},back:function(){d.flip.to("back","behind")}},get:{transform:{up:function(){var e=n.outerHeight(!0)/2;return{transform:"translateY("+(i.outerHeight(!0)-e)+"px) translateZ(-"+e+"px) rotateX(-90deg)"}},down:function(){var e=n.outerHeight(!0)/2;return{transform:"translateY(-"+e+"px) translateZ(-"+e+"px) rotateX(90deg)"}},left:function(){var e=n.outerWidth(!0)/2;return{transform:"translateX("+(i.outerWidth(!0)-e)+"px) translateZ(-"+e+"px) rotateY(90deg)"}},right:function(){var e=n.outerWidth(!0)/2;return{transform:"translateX(-"+e+"px) translateZ(-"+e+"px) rotateY(-90deg)"}},over:function(){return{transform:"translateX("+-(n.outerWidth(!0)-i.outerWidth(!0))/2+"px) rotateY(180deg)"}},back:function(){return{transform:"translateX("+-(n.outerWidth(!0)-i.outerWidth(!0))/2+"px) rotateY(-180deg)"}}},transitionEvent:function(){var e,t=A.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==E)return n[e]},nextSide:function(){return 0<n.next(r.side).length?n.next(r.side):c.first()}},stage:{above:function(){var e={origin:(n.outerHeight(!0)-i.outerHeight(!0))/2,depth:{active:i.outerHeight(!0)/2,next:n.outerHeight(!0)/2}};d.verbose("Setting the initial animation position as above",i,e),n.css({transform:"rotateX(0deg)"}),i.addClass(s.animating).css({top:e.origin+"px",transform:"rotateX(90deg) translateZ("+e.depth.next+"px) translateY(-"+e.depth.active+"px)"})},below:function(){var e={origin:(n.outerHeight(!0)-i.outerHeight(!0))/2,depth:{active:i.outerHeight(!0)/2,next:n.outerHeight(!0)/2}};d.verbose("Setting the initial animation position as below",i,e),n.css({transform:"rotateX(0deg)"}),i.addClass(s.animating).css({top:e.origin+"px",transform:"rotateX(-90deg) translateZ("+e.depth.next+"px) translateY("+e.depth.active+"px)"})},left:function(){var e=n.outerWidth(!0),t=i.outerWidth(!0),t={origin:(e-t)/2,depth:{active:t/2,next:e/2}};d.verbose("Setting the initial animation position as left",i,t),n.css({transform:"rotateY(0deg)"}),i.addClass(s.animating).css({left:t.origin+"px",transform:"rotateY(-90deg) translateZ("+t.depth.next+"px) translateX(-"+t.depth.active+"px)"})},right:function(){var e=n.outerWidth(!0),t=i.outerWidth(!0),t={origin:(e-t)/2,depth:{active:t/2,next:e/2}};d.verbose("Setting the initial animation position as right",i,t),n.css({transform:"rotateY(0deg)"}),i.addClass(s.animating).css({left:t.origin+"px",transform:"rotateY(90deg) translateZ("+t.depth.next+"px) translateX("+t.depth.active+"px)"})},behind:function(){var e=n.outerWidth(!0),t=i.outerWidth(!0),t={origin:(e-t)/2,depth:{active:t/2,next:e/2}};d.verbose("Setting the initial animation position as behind",i,t),n.css({transform:"rotateY(0deg)"}),i.addClass(s.animating).css({left:t.origin+"px",transform:"rotateY(-180deg)"})}},setting:function(e,t){if(d.debug("Changing setting",e,t),D.isPlainObject(e))D.extend(!0,a,e);else{if(t===E)return a[e];D.isPlainObject(a[e])?D.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(D.isPlainObject(e))D.extend(!0,d,e);else{if(t===E)return d[e];d[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?d.performance.log(arguments):(d.debug=Function.prototype.bind.call(console.info,console,a.name+":"),d.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?d.performance.log(arguments):(d.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),d.verbose.apply(console,arguments)))},error:function(){a.silent||(d.error=Function.prototype.bind.call(console.error,console,a.name+":"),d.error.apply(console,arguments))},performance:{log:function(e){var t,n;a.performance&&(n=(t=(new Date).getTime())-(x||t),x=t,C.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":n})),clearTimeout(d.performance.timer),d.performance.timer=setTimeout(d.performance.display,500)},display:function(){var e=a.name+":",n=0;x=!1,clearTimeout(d.performance.timer),D.each(C,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",t&&(e+=" '"+t+"'"),1<y.length&&(e+=" ("+y.length+")"),(console.group!==E||console.table!==E)&&0<C.length&&(console.groupCollapsed(e),console.table?console.table(C):D.each(C,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),C=[]}},invoke:function(i,e,t){var o,a,n,r=h;return e=e||T,t=u||t,"string"==typeof i&&r!==E&&(i=i.split(/[\. ]/),o=i.length-1,D.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(D.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==E)return a=r[n],!1;{if(!D.isPlainObject(r[t])||e==o)return r[t]!==E&&(a=r[t]),!1;r=r[t]}}})),D.isFunction(a)?n=a.apply(t,e):a!==E&&(n=a),Array.isArray(b)?b.push(n):b!==E?b=[b,n]:n!==E&&(b=n),a}};k?(h===E&&d.initialize(),0<(e=l.find("input")).length?(e.blur(),setTimeout(function(){d.invoke(w)},150)):d.invoke(w)):(h!==E&&h.invoke("destroy"),d.initialize())}),b!==E?b:this},D.fn.shape.settings={name:"Shape",silent:!1,debug:!1,verbose:!1,jitter:0,performance:!0,namespace:"shape",width:"initial",height:"initial",beforeChange:function(){},onChange:function(){},allowRepeats:!1,duration:!1,error:{side:"You tried to switch to a side that does not exist.",method:"The method you called is not defined"},className:{animating:"animating",hidden:"hidden",loading:"loading",active:"active"},selector:{sides:".sides",side:".side"}}}(jQuery,window,document),function(M,I,j,L){"use strict";M.isFunction=M.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},I=void 0!==I&&I.Math==Math?I:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),M.fn.sidebar=function(x){var C,e=M(this),w=M(I),k=M(j),T=M("html"),F=M("head"),S=e.selector||"",D=(new Date).getTime(),A=[],P=x,O="string"==typeof P,R=[].slice.call(arguments,1),E=I.requestAnimationFrame||I.mozRequestAnimationFrame||I.webkitRequestAnimationFrame||I.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var o,a,e,i,r,s=M.isPlainObject(x)?M.extend(!0,{},M.fn.sidebar.settings,x):M.extend({},M.fn.sidebar.settings),t=s.selector,l=s.className,m=s.namespace,g=s.regExp,p=s.error,h="."+m,v="module-"+m,c=M(this),n=M(s.context),b=c.children(t.sidebar),u=(n.children(t.fixed),n.children(t.pusher)),d=this,y=c.data(v),f={initialize:function(){f.debug("Initializing sidebar",x),f.create.id(),r=f.get.transitionEvent(),s.delaySetup?E(f.setup.layout):f.setup.layout(),E(function(){f.setup.cache()}),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),y=f,c.data(v,f)},create:{id:function(){e=(Math.random().toString(16)+"000000000").substr(2,8),a="."+e,f.verbose("Creating unique id for element",e)}},destroy:function(){f.verbose("Destroying previous module for",c),c.off(h).removeData(v),f.is.ios()&&f.remove.ios(),n.off(a),w.off(a),k.off(a)},event:{clickaway:function(e){var t;s.closable&&(t=0<u.find(e.target).length||u.is(e.target),e=n.is(e.target),t&&(f.verbose("User clicked on dimmed page"),f.hide()),e&&(f.verbose("User clicked on dimmable context (scaled out page)"),f.hide()))},touch:function(e){},containScroll:function(e){d.scrollTop<=0&&(d.scrollTop=1),d.scrollTop+d.offsetHeight>=d.scrollHeight&&(d.scrollTop=d.scrollHeight-d.offsetHeight-1)},scroll:function(e){0===M(e.target).closest(t.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){f.verbose("Adding clickaway events to context",n),n.on("click"+a,f.event.clickaway).on("touchend"+a,f.event.clickaway)},scrollLock:function(){s.scrollLock&&(f.debug("Disabling page scroll"),w.on("DOMMouseScroll"+a,f.event.scroll)),f.verbose("Adding events to contain sidebar scroll"),k.on("touchmove"+a,f.event.touch),c.on("scroll"+h,f.event.containScroll)}},unbind:{clickaway:function(){f.verbose("Removing clickaway events from context",n),n.off(a)},scrollLock:function(){f.verbose("Removing scroll lock from page"),k.off(a),w.off(a),c.off("scroll"+h)}},add:{inlineCSS:function(){var e=f.cache.width||c.outerWidth(),t=f.cache.height||c.outerHeight(),n=f.is.rtl(),i=f.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(f.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(f.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),f.is.ie()&&("left"===i||"right"===i?(f.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher:after { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher:after { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after, body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }"),o=M(n+="</style>").appendTo(F),f.debug("Adding sizing css to head",o)}},refresh:function(){f.verbose("Refreshing selector cache"),n=M(s.context),b=n.children(t.sidebar),u=n.children(t.pusher),n.children(t.fixed),f.clear.cache()},refreshSidebars:function(){f.verbose("Refreshing other sidebars"),b=n.children(t.sidebar)},repaint:function(){f.verbose("Forcing repaint event"),d.style.display="none";d.offsetHeight;d.scrollTop=d.scrollTop,d.style.display=""},setup:{cache:function(){f.cache={width:c.outerWidth(),height:c.outerHeight()}},layout:function(){0===n.children(t.pusher).length&&(f.debug("Adding wrapper element for sidebar"),f.error(p.pusher),u=M('<div class="pusher" />'),n.children().not(t.omitted).not(b).wrapAll(u),f.refresh()),0!==c.nextAll(t.pusher).length&&c.nextAll(t.pusher)[0]===u[0]||(f.debug("Moved sidebar to correct parent element"),f.error(p.movedSidebar,d),c.detach().prependTo(n),f.refresh()),f.clear.cache(),f.set.pushable(),f.set.direction()}},attachEvents:function(e,t){var n=M(e);t=M.isFunction(f[t])?f[t]:f.toggle,0<n.length?(f.debug("Attaching sidebar events to element",e,t),n.on("click"+h,t)):f.error(p.notFound,e)},show:function(e){if(e=M.isFunction(e)?e:function(){},f.is.hidden()){if(f.refreshSidebars(),s.overlay&&(f.error(p.overlay),s.transition="overlay"),f.refresh(),f.othersActive())if(f.debug("Other sidebars currently visible"),s.exclusive){if("overlay"!=s.transition)return void f.hideOthers(f.show);f.hideOthers()}else s.transition="overlay";f.pushPage(function(){e.call(d),s.onShow.call(d)}),s.onChange.call(d),s.onVisible.call(d)}else f.debug("Sidebar is already visible")},hide:function(e){e=M.isFunction(e)?e:function(){},(f.is.visible()||f.is.animating())&&(f.debug("Hiding sidebar",e),f.refreshSidebars(),f.pullPage(function(){e.call(d),s.onHidden.call(d)}),s.onChange.call(d),s.onHide.call(d))},othersAnimating:function(){return 0<b.not(c).filter("."+l.animating).length},othersVisible:function(){return 0<b.not(c).filter("."+l.visible).length},othersActive:function(){return f.othersVisible()||f.othersAnimating()},hideOthers:function(e){var t=b.not(c).filter("."+l.visible),n=t.length,i=0;e=e||function(){},t.sidebar("hide",function(){++i==n&&e()})},toggle:function(){f.verbose("Determining toggled direction"),f.is.hidden()?f.show():f.hide()},pushPage:function(t){var e,n,i=f.get.transition(),o="overlay"===i||f.othersActive()?c:u;t=M.isFunction(t)?t:function(){},"scale down"==s.transition&&f.scrollToTop(),f.set.transition(i),f.repaint(),i=function(){f.bind.clickaway(),f.add.inlineCSS(),f.set.animating(),f.set.visible()},e=function(){f.set.dimmed()},n=function(e){e.target==o[0]&&(o.off(r+a,n),f.remove.animating(),f.bind.scrollLock(),t.call(d))},o.off(r+a),o.on(r+a,n),E(i),s.dimPage&&!f.othersVisible()&&E(e)},pullPage:function(t){var e,n,i=f.get.transition(),o="overlay"==i||f.othersActive()?c:u;t=M.isFunction(t)?t:function(){},f.verbose("Removing context push state",f.get.direction()),f.unbind.clickaway(),f.unbind.scrollLock(),e=function(){f.set.transition(i),f.set.animating(),f.remove.visible(),s.dimPage&&!f.othersVisible()&&u.removeClass(l.dimmed)},n=function(e){e.target==o[0]&&(o.off(r+a,n),f.remove.animating(),f.remove.transition(),f.remove.inlineCSS(),("scale down"==i||s.returnScroll&&f.is.mobile())&&f.scrollBack(),t.call(d))},o.off(r+a),o.on(r+a,n),E(e)},scrollToTop:function(){f.verbose("Scrolling to top of page to avoid animation issues"),i=M(I).scrollTop(),c.scrollTop(0),I.scrollTo(0,0)},scrollBack:function(){f.verbose("Scrolling back to original page position"),I.scrollTo(0,i)},clear:{cache:function(){f.verbose("Clearing cached dimensions"),f.cache={}}},set:{ios:function(){T.addClass(l.ios)},pushed:function(){n.addClass(l.pushed)},pushable:function(){n.addClass(l.pushable)},dimmed:function(){u.addClass(l.dimmed)},active:function(){c.addClass(l.active)},animating:function(){c.addClass(l.animating)},transition:function(e){e=e||f.get.transition(),c.addClass(e)},direction:function(e){e=e||f.get.direction(),c.addClass(l[e])},visible:function(){c.addClass(l.visible)},overlay:function(){c.addClass(l.overlay)}},remove:{inlineCSS:function(){f.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},ios:function(){T.removeClass(l.ios)},pushed:function(){n.removeClass(l.pushed)},pushable:function(){n.removeClass(l.pushable)},active:function(){c.removeClass(l.active)},animating:function(){c.removeClass(l.animating)},transition:function(e){e=e||f.get.transition(),c.removeClass(e)},direction:function(e){e=e||f.get.direction(),c.removeClass(l[e])},visible:function(){c.removeClass(l.visible)},overlay:function(){c.removeClass(l.overlay)}},get:{direction:function(){return c.hasClass(l.top)?l.top:c.hasClass(l.right)?l.right:c.hasClass(l.bottom)?l.bottom:l.left},transition:function(){var e=f.get.direction(),e=f.is.mobile()?"auto"==s.mobileTransition?s.defaultTransition.mobile[e]:s.mobileTransition:"auto"==s.transition?s.defaultTransition.computer[e]:s.transition;return f.verbose("Determined transition",e),e},transitionEvent:function(){var e,t=j.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==L)return n[e]}},is:{ie:function(){var e=!I.ActiveXObject&&"ActiveXObject"in I,t="ActiveXObject"in I;return e||t},ios:function(){var e=navigator.userAgent,t=e.match(g.ios),n=e.match(g.mobileChrome);return!(!t||n)&&(f.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(g.mobile)?(f.verbose("Browser was found to be mobile",e),!0):(f.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!f.is.visible()},visible:function(){return c.hasClass(l.visible)},open:function(){return f.is.visible()},closed:function(){return f.is.hidden()},vertical:function(){return c.hasClass(l.top)},animating:function(){return n.hasClass(l.animating)},rtl:function(){return f.cache.rtl===L&&(f.cache.rtl="rtl"===c.attr("dir")||"rtl"===c.css("direction")),f.cache.rtl}},setting:function(e,t){if(f.debug("Changing setting",e,t),M.isPlainObject(e))M.extend(!0,s,e);else{if(t===L)return s[e];M.isPlainObject(s[e])?M.extend(!0,s[e],t):s[e]=t}},internal:function(e,t){if(M.isPlainObject(e))M.extend(!0,f,e);else{if(t===L)return f[e];f[e]=t}},debug:function(){!s.silent&&s.debug&&(s.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,s.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!s.silent&&s.verbose&&s.debug&&(s.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),f.verbose.apply(console,arguments)))},error:function(){s.silent||(f.error=Function.prototype.bind.call(console.error,console,s.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n;s.performance&&(n=(t=(new Date).getTime())-(D||t),D=t,A.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=s.name+":",n=0;D=!1,clearTimeout(f.performance.timer),M.each(A,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",S&&(e+=" '"+S+"'"),(console.group!==L||console.table!==L)&&0<A.length&&(console.groupCollapsed(e),console.table?console.table(A):M.each(A,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),A=[]}},invoke:function(i,e,t){var o,a,n,r=y;return e=e||R,t=d||t,"string"==typeof i&&r!==L&&(i=i.split(/[\. ]/),o=i.length-1,M.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(M.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==L)return a=r[n],!1;{if(!M.isPlainObject(r[t])||e==o)return r[t]!==L?a=r[t]:f.error(p.method,i),!1;r=r[t]}}})),M.isFunction(a)?n=a.apply(t,e):a!==L&&(n=a),Array.isArray(C)?C.push(n):C!==L?C=[C,n]:n!==L&&(C=n),a}};O?(y===L&&f.initialize(),f.invoke(P)):(y!==L&&f.invoke("destroy"),f.initialize())}),C!==L?C:this},M.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,duration:500,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",dimmed:"dimmed",ios:"ios",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}}}(jQuery,window,document),function(S,D,A,E){"use strict";S.isFunction=S.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},D=void 0!==D&&D.Math==Math?D:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),S.fn.sticky=function(v){var b,e=S(this),y=e.selector||"",x=(new Date).getTime(),C=[],w=v,k="string"==typeof w,T=[].slice.call(arguments,1);return e.each(function(){var t,a,r,e,l=S.isPlainObject(v)?S.extend(!0,{},S.fn.sticky.settings,v):S.extend({},S.fn.sticky.settings),n=l.className,f=l.namespace,m=l.error,i="."+f,g="module-"+f,o=S(this),p=S(D),c=S(l.scrollContext),s=o.data(g),h=D.requestAnimationFrame||D.mozRequestAnimationFrame||D.webkitRequestAnimationFrame||D.msRequestAnimationFrame||function(e){setTimeout(e,0)},u=this,d={initialize:function(){d.determineContainer(),d.determineContext(),d.verbose("Initializing sticky",l,t),d.save.positions(),d.checkErrors(),d.bind.events(),l.observeChanges&&d.observeChanges(),d.instantiate()},instantiate:function(){d.verbose("Storing instance of module",d),s=d,o.data(g,d)},destroy:function(){d.verbose("Destroying previous instance"),d.reset(),r&&r.disconnect(),e&&e.disconnect(),p.off("load"+i,d.event.load).off("resize"+i,d.event.resize),c.off("scrollchange"+i,d.event.scrollchange),o.removeData(g)},observeChanges:function(){"MutationObserver"in D&&(r=new MutationObserver(d.event.documentChanged),e=new MutationObserver(d.event.changed),r.observe(A,{childList:!0,subtree:!0}),e.observe(u,{childList:!0,subtree:!0}),e.observe(a[0],{childList:!0,subtree:!0}),d.debug("Setting up mutation observer",e))},determineContainer:function(){t=l.container?S(l.container):o.offsetParent()},determineContext:function(){0===(a=l.context?S(l.context):t).length&&d.error(m.invalidContext,l.context,o)},checkErrors:function(){d.is.hidden()&&d.error(m.visible,o),d.cache.element.height>d.cache.context.height&&(d.reset(),d.error(m.elementSize,o))},bind:{events:function(){p.on("load"+i,d.event.load).on("resize"+i,d.event.resize),c.off("scroll"+i).on("scroll"+i,d.event.scroll).on("scrollchange"+i,d.event.scrollchange)}},event:{changed:function(e){clearTimeout(d.timer),d.timer=setTimeout(function(){d.verbose("DOM tree modified, updating sticky menu",e),d.refresh()},100)},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==u||0<S(e).find(u).length)&&(d.debug("Element removed from DOM, tearing down events"),d.destroy())})})},load:function(){d.verbose("Page contents finished loading"),h(d.refresh)},resize:function(){d.verbose("Window resized"),h(d.refresh)},scroll:function(){h(function(){c.triggerHandler("scrollchange"+i,c.scrollTop())})},scrollchange:function(e,t){d.stick(t),l.onScroll.call(u)}},refresh:function(e){d.reset(),l.context||d.determineContext(),e&&d.determineContainer(),d.save.positions(),d.stick(),l.onReposition.call(u)},supports:{sticky:function(){var e=S("<div/>");return e.addClass(n.supported),e.css("position").match("sticky")}},save:{lastScroll:function(e){d.lastScroll=e},elementScroll:function(e){d.elementScroll=e},positions:function(){var e={height:c.height()},t={margin:{top:parseInt(o.css("margin-top"),10),bottom:parseInt(o.css("margin-bottom"),10)},offset:o.offset(),width:o.outerWidth(),height:o.outerHeight()},n={offset:a.offset(),height:a.outerHeight()};d.is.standardScroll()||(d.debug("Non-standard scroll. Removing scroll offset from element offset"),e.top=c.scrollTop(),e.left=c.scrollLeft(),t.offset.top+=e.top,n.offset.top+=e.top,t.offset.left+=e.left,n.offset.left+=e.left),d.cache={fits:t.height+l.offset<=e.height,sameHeight:t.height==n.height,scrollContext:{height:e.height},element:{margin:t.margin,top:t.offset.top-t.margin.top,left:t.offset.left,width:t.width,height:t.height,bottom:t.offset.top+t.height},context:{top:n.offset.top,height:n.height,bottom:n.offset.top+n.height}},d.set.containerSize(),d.stick(),d.debug("Caching element positions",d.cache)}},get:{direction:function(e){var t="down";return e=e||c.scrollTop(),d.lastScroll!==E&&(d.lastScroll<e?t="down":d.lastScroll>e&&(t="up")),t},scrollChange:function(e){return e=e||c.scrollTop(),d.lastScroll?e-d.lastScroll:0},currentElementScroll:function(){return d.elementScroll||(d.is.top()?Math.abs(parseInt(o.css("top"),10))||0:Math.abs(parseInt(o.css("bottom"),10))||0)},elementScroll:function(e){e=e||c.scrollTop();var t=d.cache.element,n=d.cache.scrollContext,e=d.get.scrollChange(e),t=t.height-n.height+l.offset,n=d.get.currentElementScroll(),e=n+e;return n=d.cache.fits||e<0?0:t<e?t:e}},remove:{lastScroll:function(){delete d.lastScroll},elementScroll:function(e){delete d.elementScroll},minimumSize:function(){t.css("min-height","")},offset:function(){o.css("margin-top","")}},set:{offset:function(){d.verbose("Setting offset on element",l.offset),o.css("margin-top",l.offset)},containerSize:function(){var e=t.get(0).tagName;"HTML"===e||"body"==e?d.determineContainer():Math.abs(t.outerHeight()-d.cache.context.height)>l.jitter&&(d.debug("Context has padding, specifying exact height for container",d.cache.context.height),t.css({height:d.cache.context.height}))},minimumSize:function(){var e=d.cache.element;t.css("min-height",e.height)},scroll:function(e){d.debug("Setting scroll on element",e),d.elementScroll!=e&&(d.is.top()&&o.css("bottom","").css("top",-e),d.is.bottom()&&o.css("top","").css("bottom",e))},size:function(){0!==d.cache.element.height&&0!==d.cache.element.width&&(u.style.setProperty("width",d.cache.element.width+"px","important"),u.style.setProperty("height",d.cache.element.height+"px","important"))}},is:{standardScroll:function(){return c[0]==D},top:function(){return o.hasClass(n.top)},bottom:function(){return o.hasClass(n.bottom)},initialPosition:function(){return!d.is.fixed()&&!d.is.bound()},hidden:function(){return!o.is(":visible")},bound:function(){return o.hasClass(n.bound)},fixed:function(){return o.hasClass(n.fixed)}},stick:function(e){var t=e||c.scrollTop(),n=d.cache,i=n.fits,o=n.sameHeight,a=n.element,r=n.scrollContext,n=n.context,s=d.is.bottom()&&l.pushing?l.bottomOffset:l.offset,e={top:t+s,bottom:t+s+r.height},t=i?0:d.get.elementScroll(e.top),s=!i;0===a.height||o||(d.is.initialPosition()?e.top>=n.bottom?(d.debug("Initial element position is bottom of container"),d.bindBottom()):e.top>a.top&&(a.height+e.top-t>=n.bottom?(d.debug("Initial element position is bottom of container"),d.bindBottom()):(d.debug("Initial element position is fixed"),d.fixTop())):d.is.fixed()?d.is.top()?e.top<=a.top?(d.debug("Fixed element reached top of container"),d.setInitialPosition()):a.height+e.top-t>=n.bottom?(d.debug("Fixed element reached bottom of container"),d.bindBottom()):s&&(d.set.scroll(t),d.save.lastScroll(e.top),d.save.elementScroll(t)):d.is.bottom()&&(e.bottom-a.height<=a.top?(d.debug("Bottom fixed rail has reached top of container"),d.setInitialPosition()):e.bottom>=n.bottom?(d.debug("Bottom fixed rail has reached bottom of container"),d.bindBottom()):s&&(d.set.scroll(t),d.save.lastScroll(e.top),d.save.elementScroll(t))):d.is.bottom()&&(e.top<=a.top?(d.debug("Jumped from bottom fixed to top fixed, most likely used home/end button"),d.setInitialPosition()):l.pushing?d.is.bound()&&e.bottom<=n.bottom&&(d.debug("Fixing bottom attached element to bottom of browser."),d.fixBottom()):d.is.bound()&&e.top<=n.bottom-a.height&&(d.debug("Fixing bottom attached element to top of browser."),d.fixTop())))},bindTop:function(){d.debug("Binding element to top of parent container"),d.remove.offset(),o.css({left:"",top:"",marginBottom:""}).removeClass(n.fixed).removeClass(n.bottom).addClass(n.bound).addClass(n.top),l.onTop.call(u),l.onUnstick.call(u)},bindBottom:function(){d.debug("Binding element to bottom of parent container"),d.remove.offset(),o.css({left:"",top:""}).removeClass(n.fixed).removeClass(n.top).addClass(n.bound).addClass(n.bottom),l.onBottom.call(u),l.onUnstick.call(u)},setInitialPosition:function(){d.debug("Returning to initial position"),d.unfix(),d.unbind()},fixTop:function(){d.debug("Fixing element to top of page"),l.setSize&&d.set.size(),d.set.minimumSize(),d.set.offset(),o.css({left:d.cache.element.left,bottom:"",marginBottom:""}).removeClass(n.bound).removeClass(n.bottom).addClass(n.fixed).addClass(n.top),l.onStick.call(u)},fixBottom:function(){d.debug("Sticking element to bottom of page"),l.setSize&&d.set.size(),d.set.minimumSize(),d.set.offset(),o.css({left:d.cache.element.left,bottom:"",marginBottom:""}).removeClass(n.bound).removeClass(n.top).addClass(n.fixed).addClass(n.bottom),l.onStick.call(u)},unbind:function(){d.is.bound()&&(d.debug("Removing container bound position on element"),d.remove.offset(),o.removeClass(n.bound).removeClass(n.top).removeClass(n.bottom))},unfix:function(){d.is.fixed()&&(d.debug("Removing fixed position on element"),d.remove.minimumSize(),d.remove.offset(),o.removeClass(n.fixed).removeClass(n.top).removeClass(n.bottom),l.onUnstick.call(u))},reset:function(){d.debug("Resetting elements position"),d.unbind(),d.unfix(),d.resetCSS(),d.remove.offset(),d.remove.lastScroll()},resetCSS:function(){o.css({width:"",height:""}),t.css({height:""})},setting:function(e,t){if(S.isPlainObject(e))S.extend(!0,l,e);else{if(t===E)return l[e];l[e]=t}},internal:function(e,t){if(S.isPlainObject(e))S.extend(!0,d,e);else{if(t===E)return d[e];d[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?d.performance.log(arguments):(d.debug=Function.prototype.bind.call(console.info,console,l.name+":"),d.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?d.performance.log(arguments):(d.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),d.verbose.apply(console,arguments)))},error:function(){l.silent||(d.error=Function.prototype.bind.call(console.error,console,l.name+":"),d.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=(new Date).getTime())-(x||t),x=t,C.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":n})),clearTimeout(d.performance.timer),d.performance.timer=setTimeout(d.performance.display,0)},display:function(){var e=l.name+":",n=0;x=!1,clearTimeout(d.performance.timer),S.each(C,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",y&&(e+=" '"+y+"'"),(console.group!==E||console.table!==E)&&0<C.length&&(console.groupCollapsed(e),console.table?console.table(C):S.each(C,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),C=[]}},invoke:function(i,e,t){var o,a,n,r=s;return e=e||T,t=u||t,"string"==typeof i&&r!==E&&(i=i.split(/[\. ]/),o=i.length-1,S.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(S.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==E)return a=r[n],!1;{if(!S.isPlainObject(r[t])||e==o)return r[t]!==E&&(a=r[t]),!1;r=r[t]}}})),S.isFunction(a)?n=a.apply(t,e):a!==E&&(n=a),Array.isArray(b)?b.push(n):b!==E?b=[b,n]:n!==E&&(b=n),a}};k?(s===E&&d.initialize(),d.invoke(w)):(s!==E&&s.invoke("destroy"),d.initialize())}),b!==E?b:this},S.fn.sticky.settings={name:"Sticky",namespace:"sticky",silent:!1,debug:!1,verbose:!0,performance:!0,pushing:!1,context:!1,container:!1,scrollContext:D,offset:0,bottomOffset:0,jitter:5,setSize:!0,observeChanges:!1,onReposition:function(){},onScroll:function(){},onStick:function(){},onUnstick:function(){},onTop:function(){},onBottom:function(){},error:{container:"Sticky element must be inside a relative container",visible:"Element is hidden, you must call refresh after element becomes visible. Use silent setting to surpress this warning in production.",method:"The method you called is not defined.",invalidContext:"Context specified does not exist",elementSize:"Sticky element is larger than its container, cannot create sticky."},className:{bound:"bound",fixed:"fixed",supported:"native",top:"top",bottom:"bottom"}}}(jQuery,window,document),function(P,O,R,M){"use strict";P.isWindow=P.isWindow||function(e){return null!=e&&e===e.window},P.isFunction=P.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},O=void 0!==O&&O.Math==Math?O:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),P.fn.tab=function(c){var u,d=P.isFunction(this)?P(O):P(this),f=d.selector||"",T=(new Date).getTime(),S=[],D=c,A="string"==typeof D,F=[].slice.call(arguments,1),E=!1;return d.each(function(){var m,o,g,p,h,v=P.isPlainObject(c)?P.extend(!0,{},P.fn.tab.settings,c):P.extend({},P.fn.tab.settings),b=v.className,y=v.metadata,t=v.selector,w=v.error,n=v.regExp,e="."+v.namespace,i="module-"+v.namespace,x=P(this),a={},k=!0,r=0,s=this,l=x.data(i),C={initialize:function(){C.debug("Initializing tab menu item",x),C.fix.callbacks(),C.determineTabs(),C.debug("Determining tabs",v.context,o),v.auto&&C.set.auto(),C.bind.events(),v.history&&!E&&(C.initializeHistory(),E=!0),v.autoTabActivation&&l===M&&null==C.determine.activeTab()&&(C.debug("No active tab detected, setting first tab active",C.get.initialPath()),C.changeTab(!0===v.autoTabActivation?C.get.initialPath():v.autoTabActivation)),C.instantiate()},instantiate:function(){C.verbose("Storing instance of module",C),l=C,x.data(i,C)},destroy:function(){C.debug("Destroying tabs",x),x.removeData(i).off(e)},bind:{events:function(){P.isWindow(s)||(C.debug("Attaching tab activation events to element",x),x.on("click"+e,C.event.click))}},determineTabs:function(){var e;"parent"===v.context?(0<x.closest(t.ui).length?(e=x.closest(t.ui),C.verbose("Using closest UI element as parent",e)):e=x,m=e.parent(),C.verbose("Determined parent element for creating context",m)):v.context?(m=P(v.context),C.verbose("Using selector for tab context",v.context,m)):m=P("body"),v.childrenOnly?(o=m.children(t.tabs),C.debug("Searching tab context children for tabs",m,o)):(o=m.find(t.tabs),C.debug("Searching tab context for tabs",m,o))},fix:{callbacks:function(){P.isPlainObject(c)&&(c.onTabLoad||c.onTabInit)&&(c.onTabLoad&&(c.onLoad=c.onTabLoad,delete c.onTabLoad,C.error(w.legacyLoad,c.onLoad)),c.onTabInit&&(c.onFirstLoad=c.onTabInit,delete c.onTabInit,C.error(w.legacyInit,c.onFirstLoad)),v=P.extend(!0,{},P.fn.tab.settings,c))}},initializeHistory:function(){if(C.debug("Initializing page state"),P.address===M)return C.error(w.state),!1;if("state"==v.historyType){if(C.debug("Using HTML5 to manage state"),!1===v.path)return C.error(w.path),!1;P.address.history(!0).state(v.path)}P.address.bind("change",C.event.history.change)},event:{click:function(e){var t=P(this).data(y.tab);t!==M?(v.history?(C.verbose("Updating page state",e),P.address.value(t)):(C.verbose("Changing tab",e),C.changeTab(t)),e.preventDefault()):C.debug("No tab specified")},history:{change:function(e){var t=e.pathNames.join("/")||C.get.initialPath(),n=v.templates.determineTitle(t)||!1;C.performance.display(),C.debug("History change event",t,e),h=e,t!==M&&C.changeTab(t),n&&P.address.title(n)}}},refresh:function(){g&&(C.debug("Refreshing tab",g),C.changeTab(g))},cache:{read:function(e){return e!==M&&a[e]},add:function(e,t){e=e||g,C.debug("Adding cached content for",e),a[e]=t},remove:function(e){e=e||g,C.debug("Removing cached content for",e),delete a[e]}},escape:{string:function(e){return(e=String(e)).replace(n.escape,"\\$&")}},set:{auto:function(){var e="string"==typeof v.path?v.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";C.verbose("Setting up automatic tab retrieval from server",e),P.isPlainObject(v.apiSettings)?v.apiSettings.url=e:v.apiSettings={url:e}},loading:function(e){var t=C.get.tabElement(e);t.hasClass(b.loading)||(C.verbose("Setting loading state for",t),t.addClass(b.loading).siblings(o).removeClass(b.active+" "+b.loading),0<t.length&&v.onRequest.call(t[0],e))},state:function(e){P.address.value(e)}},changeTab:function(c){var u=O.history&&O.history.pushState&&v.ignoreFirstLoad&&k,d=v.auto||P.isPlainObject(v.apiSettings),f=d&&!u?C.utilities.pathToArray(c):C.get.defaultPathArray(c);c=C.utilities.arrayToPath(f),P.each(f,function(e,t){var n,i,o=f.slice(0,e+1),a=C.utilities.arrayToPath(o),r=C.is.tab(a),s=e+1==f.length,l=C.get.tabElement(a);return C.verbose("Looking for tab",t),r?(C.verbose("Tab was found",t),g=a,p=C.utilities.filterArray(f,o),s?i=!0:(r=f.slice(0,e+2),t=C.utilities.arrayToPath(r),(i=!C.is.tab(t))&&C.verbose("Tab parameters found",r)),i&&d?(u?(C.debug("Ignoring remote content on first tab load",a),k=!1,C.cache.add(c,l.html()),C.activate.all(a),v.onFirstLoad.call(l[0],a,p,h),v.onLoad.call(l[0],a,p,h)):(C.activate.navigation(a),C.fetch.content(a,c)),!1):(C.debug("Opened local tab",a),C.activate.all(a),C.cache.read(a)||(C.cache.add(a,!0),C.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(l[0],a,p,h)),void v.onLoad.call(l[0],a,p,h))):-1!=c.search("/")||""===c?(C.error(w.missingTab,x,m,a),!1):(c=C.escape.string(c),a=(n=P("#"+c+', a[name="'+c+'"]')).closest("[data-tab]").data(y.tab),l=C.get.tabElement(a),n&&0<n.length&&a?(C.debug("Anchor link used, opening parent tab",l,n),l.hasClass(b.active)||setTimeout(function(){C.scrollTo(n)},0),C.activate.all(a),C.cache.read(a)||(C.cache.add(a,!0),C.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(l[0],a,p,h)),v.onLoad.call(l[0],a,p,h),!1):void 0)})},scrollTo:function(e){var t=!!(e&&0<e.length)&&e.offset().top;!1!==t&&(C.debug("Forcing scroll to an in-page link in a hidden tab",t,e),P(R).scrollTop(t))},update:{content:function(e,t,n){var i=C.get.tabElement(e),o=i[0];n=n!==M?n:v.evaluateScripts,"string"==typeof v.cacheType&&"dom"==v.cacheType.toLowerCase()&&"string"!=typeof t?i.empty().append(P(t).clone(!0)):n?(C.debug("Updating HTML and evaluating inline scripts",e,t),i.html(t)):(C.debug("Updating HTML",e,t),o.innerHTML=t)}},fetch:{content:function(t,n){var e,i=C.get.tabElement(t),o={dataType:"html",encodeParameters:!1,on:"now",cache:v.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(e){"response"==v.cacheType&&C.cache.add(n,e),C.update.content(t,e),t==g?(C.debug("Content loaded",t),C.activate.tab(t)):C.debug("Content loaded in background",t),v.onFirstLoad.call(i[0],t,p,h),v.onLoad.call(i[0],t,p,h),v.loadOnce?C.cache.add(n,!0):"string"==typeof v.cacheType&&"dom"==v.cacheType.toLowerCase()&&0<i.children().length?setTimeout(function(){var e=(e=i.children().clone(!0)).not("script");C.cache.add(n,e)},0):C.cache.add(n,i.html())},urlData:{tab:n}},a=i.api("get request")||!1,a=a&&"pending"===a.state();n=n||t,e=C.cache.read(n),v.cache&&e?(C.activate.tab(t),C.debug("Adding cached content",n),v.loadOnce||("once"==v.evaluateScripts?C.update.content(t,e,!1):C.update.content(t,e)),v.onLoad.call(i[0],t,p,h)):a?(C.set.loading(t),C.debug("Content is already loading",n)):P.api!==M?(e=P.extend(!0,{},v.apiSettings,o),C.debug("Retrieving remote content",n,e),C.set.loading(t),i.api(e)):C.error(w.api)}},activate:{all:function(e){C.activate.tab(e),C.activate.navigation(e)},tab:function(e){var t=C.get.tabElement(e),n="siblings"==v.deactivate?t.siblings(o):o.not(t),i=t.hasClass(b.active);C.verbose("Showing tab content for",t),i||(t.addClass(b.active),n.removeClass(b.active+" "+b.loading),0<t.length&&v.onVisible.call(t[0],e))},navigation:function(e){var t=C.get.navElement(e),n="siblings"==v.deactivate?t.siblings(d):d.not(t),i=t.hasClass(b.active);C.verbose("Activating tab navigation for",t,e),i||(t.addClass(b.active),n.removeClass(b.active+" "+b.loading))}},deactivate:{all:function(){C.deactivate.navigation(),C.deactivate.tabs()},navigation:function(){d.removeClass(b.active)},tabs:function(){o.removeClass(b.active+" "+b.loading)}},is:{tab:function(e){return e!==M&&0<C.get.tabElement(e).length}},get:{initialPath:function(){return d.eq(0).data(y.tab)||o.eq(0).data(y.tab)},path:function(){return P.address.value()},defaultPathArray:function(e){return C.utilities.pathToArray(C.get.defaultPath(e))},defaultPath:function(e){var t=d.filter("[data-"+y.tab+'^="'+C.escape.string(e)+'/"]').eq(0).data(y.tab)||!1;if(t){if(C.debug("Found default tab",t),r<v.maxDepth)return r++,C.get.defaultPath(t);C.error(w.recursion)}else C.debug("No default tabs found for",e,o);return r=0,e},navElement:function(e){return e=e||g,d.filter("[data-"+y.tab+'="'+C.escape.string(e)+'"]')},tabElement:function(e){var t;return e=e||g,t=C.utilities.pathToArray(e),t=C.utilities.last(t),e=o.filter("[data-"+y.tab+'="'+C.escape.string(e)+'"]'),t=o.filter("[data-"+y.tab+'="'+C.escape.string(t)+'"]'),0<e.length?e:t},tab:function(){return g}},determine:{activeTab:function(){var n=null;return o.each(function(e,t){P(t).hasClass(b.active)&&(t=P(this).data(y.tab),d.filter("[data-"+y.tab+'="'+C.escape.string(t)+'"]').hasClass(b.active)&&(n=t))}),n}},utilities:{filterArray:function(e,t){return P.grep(e,function(e){return-1==P.inArray(e,t)})},last:function(e){return!!Array.isArray(e)&&e[e.length-1]},pathToArray:function(e){return"string"==typeof(e=e===M?g:e)?e.split("/"):[e]},arrayToPath:function(e){return!!Array.isArray(e)&&e.join("/")}},setting:function(e,t){if(C.debug("Changing setting",e,t),P.isPlainObject(e))P.extend(!0,v,e);else{if(t===M)return v[e];P.isPlainObject(v[e])?P.extend(!0,v[e],t):v[e]=t}},internal:function(e,t){if(P.isPlainObject(e))P.extend(!0,C,e);else{if(t===M)return C[e];C[e]=t}},debug:function(){!v.silent&&v.debug&&(v.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,v.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),C.verbose.apply(console,arguments)))},error:function(){v.silent||(C.error=Function.prototype.bind.call(console.error,console,v.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var t,n;v.performance&&(n=(t=(new Date).getTime())-(T||t),T=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:s,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){var e=v.name+":",n=0;T=!1,clearTimeout(C.performance.timer),P.each(S,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",f&&(e+=" '"+f+"'"),(console.group!==M||console.table!==M)&&0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):P.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(i,e,t){var o,a,n,r=l;return e=e||F,t=s||t,"string"==typeof i&&r!==M&&(i=i.split(/[\. ]/),o=i.length-1,P.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(P.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==M)return a=r[n],!1;{if(!P.isPlainObject(r[t])||e==o)return r[t]!==M?a=r[t]:C.error(w.method,i),!1;r=r[t]}}})),P.isFunction(a)?n=a.apply(t,e):a!==M&&(n=a),Array.isArray(u)?u.push(n):u!==M?u=[u,n]:n!==M&&(u=n),a}};A?(l===M&&C.initialize(),C.invoke(D)):(l!==M&&l.invoke("destroy"),C.initialize())}),u!==M?u:this},P.tab=function(){P(O).tab.apply(this,arguments)},P.fn.tab.settings={name:"Tab",namespace:"tab",silent:!1,debug:!1,verbose:!1,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,deactivate:"siblings",alwaysRefresh:!1,cache:!0,loadOnce:!1,cacheType:"response",ignoreFirstLoad:!1,apiSettings:!1,evaluateScripts:"once",autoTabActivation:!0,onFirstLoad:function(e,t,n){},onLoad:function(e,t,n){},onVisible:function(e,t,n){},onRequest:function(e,t,n){},templates:{determineTitle:function(e){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found. Tabs are case-sensitive.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",legacyInit:"onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.",legacyLoad:"onTabLoad has been renamed to onLoad in 2.0. Please adjust your code",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s:=@]/g},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}}(jQuery,window,document),function(F,e,P){"use strict";F.isFunction=F.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),F.fn.toast=function(C){var w,e=F(this),k=e.selector||"",T=(new Date).getTime(),S=[],D=C,A="string"==typeof D,E=[].slice.call(arguments,1);return e.each(function(){var n,i,a,o,f,r,m,s=F.isPlainObject(C)?F.extend(!0,{},F.fn.toast.settings,C):F.extend({},F.fn.toast.settings),l=s.className,g=s.selector,p=s.error,e=s.namespace,h=s.fields,t="."+e,v=e+"-module",c=F(this),b=s.context?F(s.context):F("body"),y=c.hasClass("toast")||c.hasClass("message")||c.hasClass("card"),u=this,x=y?c.data(v):P,d={initialize:function(){d.verbose("Initializing element"),d.has.container()||d.create.container(),(y||""!==s.message||""!==s.title||""!==d.get.iconClass()||s.showImage||d.has.configActions())&&("string"==typeof s.showProgress&&-1!==[l.top,l.bottom].indexOf(s.showProgress)||(s.showProgress=!1),d.create.toast(),s.closeOnClick&&(s.closeIcon||0<F(i).find(g.input).length||d.has.configActions())&&(s.closeOnClick=!1),s.closeOnClick||n.addClass(l.unclickable),d.bind.events()),d.instantiate(),n&&d.show()},instantiate:function(){d.verbose("Storing instance of toast"),x=d,c.data(v,x)},destroy:function(){n&&(d.debug("Removing toast",n),d.unbind.events(),n.remove(),r=i=n=P,s.onRemove.call(n,u),m=f=o=P),c.removeData(v)},show:function(e){e=e||function(){},d.debug("Showing toast"),!1!==s.onShow.call(n,u)?d.animate.show(e):d.debug("onShow callback returned false, cancelling toast animation")},close:function(e){e=e||function(){},d.remove.visible(),d.unbind.events(),d.animate.close(e)},create:{container:function(){d.verbose("Creating container"),b.append(F("<div/>",{class:s.position+" "+l.container+" "+(s.horizontal?l.horizontal:"")}))},toast:function(){n=F("<div/>",{class:l.box});var e,t=d.get.iconClass();y?(i=s.cloneModule?c.clone().removeAttr("id"):c,m=i.find("> i"+d.helpers.toClass(l.close)),s.closeIcon=0<m.length,""!==t&&i.find(g.icon).attr("class",t+" "+l.icon),s.showImage&&i.find(g.image).attr("src",s.showImage),""!==s.title&&i.find(g.title).html(d.helpers.escape(s.title,s.preserveHTML)),""!==s.message&&i.find(g.message).html(d.helpers.escape(s.message,s.preserveHTML))):(d.verbose("Creating toast"),i=F("<div/>"),e=F("<div/>",{class:l.content}),""!==t&&i.append(F("<i/>",{class:t+" "+l.icon})),s.showImage&&i.append(F("<img>",{class:l.image+" "+s.classImage,src:s.showImage})),""!==s.title&&e.append(F("<div/>",{class:l.title,text:s.title})),e.append(F("<div/>",{class:l.message,html:d.helpers.escape(s.message,s.preserveHTML)})),i.addClass(s.class+" "+l.toast).append(e),i.css("opacity",s.opacity),s.closeIcon&&((m=F("<i/>",{class:l.close+" "+("string"==typeof s.closeIcon?s.closeIcon:"")})).hasClass(l.left)?i.prepend(m):i.append(m))),i.hasClass(l.compact)&&(s.compact=!0),i.hasClass("card")&&(s.compact=!1),a=i.find(".actions"),d.has.configActions()&&(0===a.length&&(a=F("<div/>",{class:l.actions+" "+(s.classActions||"")}).appendTo(i)),i.hasClass("card")&&!a.hasClass(l.attached)&&(a.addClass(l.extraContent),a.hasClass(l.vertical)&&(a.removeClass(l.vertical),d.error(p.verticalCard))),s.actions.forEach(function(e){var t=e[h.icon]?'<i class="'+d.helpers.deQuote(e[h.icon])+' icon"></i>':"",n=d.helpers.escape(e[h.text]||"",s.preserveHTML),i=d.helpers.deQuote(e[h.class]||""),o=e[h.click]&&F.isFunction(e[h.click])?e[h.click]:function(){};a.append(F("<button/>",{html:t+n,class:l.button+" "+i,click:function(){!1!==o.call(u,c)&&d.close()}}))})),a&&a.hasClass(l.vertical)&&i.addClass(l.vertical),0<a.length&&!a.hasClass(l.attached)&&(!a||a.hasClass(l.basic)&&!a.hasClass(l.left)||i.addClass(l.actions)),"auto"===s.displayTime&&(s.displayTime=Math.max(s.minDisplayTime,i.text().split(" ").length/s.wordsPerMinute*6e4)),n.append(i),0<a.length&&a.hasClass(l.attached)&&(a.addClass(l.buttons),a.detach(),i.addClass(l.attached),a.hasClass(l.vertical)?(i.wrap(F("<div/>",{class:l.vertical+" "+l.attached+" "+(s.compact?l.compact:"")})),a.hasClass(l.left)?i.addClass(l.left).parent().addClass(l.left).prepend(a):i.parent().append(a)):a.hasClass(l.top)?(n.prepend(a),i.addClass(l.bottom)):(n.append(a),i.addClass(l.top))),c!==i&&(u=(c=i)[0]),0<s.displayTime&&(t=l.progressing+" "+(s.pauseOnHover?l.pausable:""),s.showProgress&&(o=F("<div/>",{class:l.progress+" "+(s.classProgress||s.class),"data-percent":""}),s.classProgress||(i.hasClass("toast")&&!i.hasClass(l.inverted)?o.addClass(l.inverted):o.removeClass(l.inverted)),f=F("<div/>",{class:"bar "+(s.progressUp?"up ":"down ")+t}),o.addClass(s.showProgress).append(f),o.hasClass(l.top)?n.prepend(o):n.append(o),f.css("animation-duration",s.displayTime/1e3+"s")),(r=F("<span/>",{class:"wait "+t})).css("animation-duration",s.displayTime/1e3+"s"),r.appendTo(i)),s.compact&&(n.addClass(l.compact),i.addClass(l.compact),o&&o.addClass(l.compact)),s.newestOnTop?n.prependTo(d.get.container()):n.appendTo(d.get.container())}},bind:{events:function(){d.debug("Binding events to toast"),(s.closeOnClick||s.closeIcon)&&(s.closeIcon?m:i).on("click"+t,d.event.click),r&&r.on("animationend"+t,d.close),n.on("click"+t,g.approve,d.event.approve).on("click"+t,g.deny,d.event.deny)}},unbind:{events:function(){d.debug("Unbinding events to toast"),(s.closeOnClick||s.closeIcon)&&(s.closeIcon?m:i).off("click"+t),r&&r.off("animationend"+t),n.off("click"+t)}},animate:{show:function(e){e=F.isFunction(e)?e:function(){},s.transition&&d.can.useElement("transition")&&c.transition("is supported")&&(d.set.visible(),n.transition({animation:s.transition.showMethod+" in",queue:!1,debug:s.debug,verbose:s.verbose,duration:s.transition.showDuration,onComplete:function(){e.call(n,u),s.onVisible.call(n,u)}}))},close:function(e){e=F.isFunction(e)?e:function(){},d.debug("Closing toast"),!1!==s.onHide.call(n,u)?s.transition&&F.fn.transition!==P&&c.transition("is supported")?n.transition({animation:s.transition.hideMethod+" out",queue:!1,duration:s.transition.hideDuration,debug:s.debug,verbose:s.verbose,interval:50,onBeforeHide:function(e){e=F.isFunction(e)?e:function(){},""!==s.transition.closeEasing?n&&(n.css("opacity",0),n.wrap("<div/>").parent().hide(s.transition.closeDuration,s.transition.closeEasing,function(){n&&(n.parent().remove(),e.call(n))})):e.call(n)},onComplete:function(){e.call(n,u),s.onHidden.call(n,u),d.destroy()}}):d.error(p.noTransition):d.debug("onHide callback returned false, cancelling toast animation")},pause:function(){r.css("animationPlayState","paused"),f&&f.css("animationPlayState","paused")},continue:function(){r.css("animationPlayState","running"),f&&f.css("animationPlayState","running")}},has:{container:function(){return d.verbose("Determining if there is already a container"),0<b.find(d.helpers.toClass(s.position)+g.container+(s.horizontal?d.helpers.toClass(l.horizontal):"")).length},toast:function(){return!!d.get.toast()},toasts:function(){return 0<d.get.toasts().length},configActions:function(){return Array.isArray(s.actions)&&0<s.actions.length}},get:{container:function(){return b.find(d.helpers.toClass(s.position)+g.container)[0]},toastBox:function(){return n||null},toast:function(){return i||null},toasts:function(){return F(d.get.container()).find(g.box)},iconClass:function(){return"string"==typeof s.showIcon?s.showIcon:s.showIcon&&s.icons[s.class]?s.icons[s.class]:""},remainingTime:function(){return r?r.css("opacity")*s.displayTime:0}},set:{visible:function(){i.addClass(l.visible)}},remove:{visible:function(){i.removeClass(l.visible)}},event:{click:function(e){0===F(e.target).closest("a").length&&(s.onClick.call(n,u),d.close())},approve:function(){!1!==s.onApprove.call(u,c)?d.close():d.verbose("Approve callback returned false cancelling close")},deny:function(){!1!==s.onDeny.call(u,c)?d.close():d.verbose("Deny callback returned false cancelling close")}},helpers:{toClass:function(e){var e=e.split(" "),t="";return e.forEach(function(e){t+="."+e}),t},deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{useElement:function(e){return F.fn[e]!==P||(d.error(p.noElement.replace("{element}",e)),!1)}},setting:function(e,t){if(d.debug("Changing setting",e,t),F.isPlainObject(e))F.extend(!0,s,e);else{if(t===P)return s[e];F.isPlainObject(s[e])?F.extend(!0,s[e],t):s[e]=t}},internal:function(e,t){if(F.isPlainObject(e))F.extend(!0,d,e);else{if(t===P)return d[e];d[e]=t}},debug:function(){!s.silent&&s.debug&&(s.performance?d.performance.log(arguments):(d.debug=Function.prototype.bind.call(console.info,console,s.name+":"),d.debug.apply(console,arguments)))},verbose:function(){!s.silent&&s.verbose&&s.debug&&(s.performance?d.performance.log(arguments):(d.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),d.verbose.apply(console,arguments)))},error:function(){s.silent||(d.error=Function.prototype.bind.call(console.error,console,s.name+":"),d.error.apply(console,arguments))},performance:{log:function(e){var t,n;s.performance&&(n=(t=(new Date).getTime())-(T||t),T=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":n})),clearTimeout(d.performance.timer),d.performance.timer=setTimeout(d.performance.display,500)},display:function(){var e=s.name+":",n=0;T=!1,clearTimeout(d.performance.timer),F.each(S,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",k&&(e+=" '"+k+"'"),(console.group!==P||console.table!==P)&&0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):F.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(i,e,t){var o,a,n,r=x;return e=e||E,t=u||t,"string"==typeof i&&r!==P&&(i=i.split(/[\. ]/),o=i.length-1,F.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(F.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==P)return a=r[n],!1;{if(!F.isPlainObject(r[t])||e==o)return r[t]!==P?a=r[t]:d.error(p.method,i),!1;r=r[t]}}})),F.isFunction(a)?n=a.apply(t,e):a!==P&&(n=a),Array.isArray(w)?w.push(n):w!==P?w=[w,n]:n!==P&&(w=n),a}};A?(x===P&&d.initialize(),d.invoke(D)):(x!==P&&x.invoke("destroy"),d.initialize(),w=c)}),w!==P?w:this},F.fn.toast.settings={name:"Toast",namespace:"toast",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",position:"top right",horizontal:!1,class:"neutral",classProgress:!1,classActions:!1,classImage:"mini",title:"",message:"",displayTime:3e3,minDisplayTime:1e3,wordsPerMinute:120,showIcon:!1,newestOnTop:!1,showProgress:!1,pauseOnHover:!0,progressUp:!1,opacity:1,compact:!0,closeIcon:!1,closeOnClick:!0,cloneModule:!0,actions:!1,preserveHTML:!0,showImage:!1,transition:{showMethod:"scale",showDuration:500,hideMethod:"scale",hideDuration:500,closeEasing:"easeOutCubic",closeDuration:500},error:{method:"The method you called is not defined.",noElement:"This module requires ui {element}",verticalCard:"Vertical but not attached actions are not supported for card layout"},className:{container:"ui toast-container",box:"floating toast-box",progress:"ui attached active progress",toast:"ui toast",icon:"centered icon",visible:"visible",content:"content",title:"ui header",message:"message",actions:"actions",extraContent:"extra content",button:"ui button",buttons:"ui buttons",close:"close icon",image:"ui image",vertical:"vertical",horizontal:"horizontal",attached:"attached",inverted:"inverted",compact:"compact",pausable:"pausable",progressing:"progressing",top:"top",bottom:"bottom",left:"left",basic:"basic",unclickable:"unclickable"},icons:{info:"info",success:"checkmark",warning:"warning",error:"times"},selector:{container:".ui.toast-container",box:".toast-box",toast:".ui.toast",title:".header",message:".message:not(.ui)",image:"> img.image, > .image > img",icon:"> i.icon",input:'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onClick:function(){},onHide:function(){},onHidden:function(){},onRemove:function(){},onApprove:function(){},onDeny:function(){}},F.extend(F.easing,{easeOutBounce:function(e,t,n,i,o){return(t/=o)<1/2.75?i*(7.5625*t*t)+n:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+n:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+n:i*(7.5625*(t-=2.625/2.75)*t+.984375)+n},easeOutCubic:function(e){return--e*e*e+1}})}(jQuery,window,void document),function(C,e,w,k){"use strict";C.isFunction=C.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),C.fn.transition=function(){var m,r=C(this),g=r.selector||"",p=(new Date).getTime(),h=[],v=arguments,b=v[0],y=[].slice.call(arguments,1),x="string"==typeof b;return r.each(function(o){var l,s,a,c,t,n,e,i,u=C(this),d=this,f={initialize:function(){l=f.get.settings.apply(d,v),c=l.className,a=l.error,t=l.metadata,i="."+l.namespace,e="module-"+l.namespace,s=u.data(e)||f,n=f.get.animationEndEvent(),!1===(x=x&&f.invoke(b))&&(f.verbose("Converted arguments into settings object",l),l.interval?f.delay(l.animate):f.animate(),f.instantiate())},instantiate:function(){f.verbose("Storing instance of module",f),s=f,u.data(e,s)},destroy:function(){f.verbose("Destroying previous module for",d),u.removeData(e)},refresh:function(){f.verbose("Refreshing display type on next animation"),delete f.displayType},forceRepaint:function(){f.verbose("Forcing element repaint");var e=u.parent(),t=u.next();0===t.length?u.detach().appendTo(e):u.detach().insertBefore(t)},repaint:function(){f.verbose("Repainting element");d.offsetWidth},delay:function(e){var t=(t=f.get.animationDirection())||(f.can.transition()?f.get.direction():"static");e=e!==k?e:l.interval,e="auto"==l.reverse&&t==c.outward||1==l.reverse?(r.length-o)*l.interval:o*l.interval,f.debug("Delaying animation by",e),setTimeout(f.animate,e)},animate:function(e){if(l=e||l,!f.is.supported())return f.error(a.support),!1;if(f.debug("Preparing animation",l.animation),f.is.animating()){if(l.queue)return!l.allowRepeats&&f.has.direction()&&f.is.occurring()&&!0!==f.queuing?f.debug("Animation is currently occurring, preventing queueing same animation",l.animation):f.queue(l.animation),!1;if(!l.allowRepeats&&f.is.occurring())return f.debug("Animation is already occurring, will not execute repeated animation",l.animation),!1;f.debug("New animation started, completing previous early",l.animation),s.complete()}f.can.animate()?f.set.animating(l.animation):f.error(a.noAnimation,l.animation,d)},reset:function(){f.debug("Resetting animation to beginning conditions"),f.remove.animationCallbacks(),f.restore.conditions(),f.remove.animating()},queue:function(e){f.debug("Queueing animation of",e),f.queuing=!0,u.one(n+".queue"+i,function(){f.queuing=!1,f.repaint(),f.animate.apply(this,l)})},complete:function(e){e&&e.target===d&&e.stopPropagation(),f.debug("Animation complete",l.animation),f.remove.completeCallback(),f.remove.failSafe(),f.is.looping()||(f.is.outward()?(f.verbose("Animation is outward, hiding element"),f.restore.conditions(),f.hide()):f.is.inward()?(f.verbose("Animation is outward, showing element"),f.restore.conditions(),f.show()):(f.verbose("Static animation completed"),f.restore.conditions(),l.onComplete.call(d)))},force:{visible:function(){var e=u.attr("style"),e=f.get.userStyle(e),t=f.get.displayType(),e=e+"display: "+t+" !important;",n=u[0].style.display;return!t||"none"===n&&l.skipInlineHidden||u[0].tagName.match(/(script|link|style)/i)?(f.remove.transition(),!1):(f.verbose("Overriding default display to show element",t),u.attr("style",e),!0)},hidden:function(){var e=u.attr("style"),t=u.css("display"),e=e===k||""===e;"none"===t||f.is.hidden()?e&&u.removeAttr("style"):(f.verbose("Overriding default display to hide element"),u.css("display","none"))}},has:{direction:function(e){var n=!1;return"string"==typeof(e=e||l.animation)&&(e=e.split(" "),C.each(e,function(e,t){t!==c.inward&&t!==c.outward||(n=!0)})),n},inlineDisplay:function(){var e=u.attr("style")||"";return Array.isArray(e.match(/display.*?;/,""))}},set:{animating:function(e){f.remove.completeCallback(),e=e||l.animation;e=f.get.animationClass(e);f.save.animation(e),f.force.visible()&&(f.remove.hidden(),f.remove.direction(),f.start.animation(e))},duration:function(e,t){!(t="number"==typeof(t=t||l.duration)?t+"ms":t)&&0!==t||(f.verbose("Setting animation duration",t),u.css({"animation-duration":t}))},direction:function(e){(e=e||f.get.direction())==c.inward?f.set.inward():f.set.outward()},looping:function(){f.debug("Transition set to loop"),u.addClass(c.looping)},hidden:function(){u.addClass(c.transition).addClass(c.hidden)},inward:function(){f.debug("Setting direction to inward"),u.removeClass(c.outward).addClass(c.inward)},outward:function(){f.debug("Setting direction to outward"),u.removeClass(c.inward).addClass(c.outward)},visible:function(){u.addClass(c.transition).addClass(c.visible)}},start:{animation:function(e){e=e||f.get.animationClass(),f.debug("Starting tween",e),u.addClass(e).one(n+".complete"+i,f.complete),l.useFailSafe&&f.add.failSafe(),f.set.duration(l.duration),l.onStart.call(d)}},save:{animation:function(e){f.cache||(f.cache={}),f.cache.animation=e},displayType:function(e){"none"!==e&&u.data(t.displayType,e)},transitionExists:function(e,t){C.fn.transition.exists[e]=t,f.verbose("Saving existence of transition",e,t)}},restore:{conditions:function(){var e=f.get.currentAnimation();e&&(u.removeClass(e),f.verbose("Removing animation class",f.cache)),f.remove.duration()}},add:{failSafe:function(){var e=f.get.duration();f.timer=setTimeout(function(){u.triggerHandler(n)},e+l.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},remove:{animating:function(){u.removeClass(c.animating)},animationCallbacks:function(){f.remove.queueCallback(),f.remove.completeCallback()},queueCallback:function(){u.off(".queue"+i)},completeCallback:function(){u.off(".complete"+i)},display:function(){u.css("display","")},direction:function(){u.removeClass(c.inward).removeClass(c.outward)},duration:function(){u.css("animation-duration","")},failSafe:function(){f.verbose("Removing fail safe timer",f.timer),f.timer&&clearTimeout(f.timer)},hidden:function(){u.removeClass(c.hidden)},visible:function(){u.removeClass(c.visible)},looping:function(){f.debug("Transitions are no longer looping"),f.is.looping()&&(f.reset(),u.removeClass(c.looping))},transition:function(){u.removeClass(c.transition).removeClass(c.visible).removeClass(c.hidden)}},get:{settings:function(e,t,n){return"object"==typeof e?C.extend(!0,{},C.fn.transition.settings,e):"function"==typeof n?C.extend({},C.fn.transition.settings,{animation:e,onComplete:n,duration:t}):"string"==typeof t||"number"==typeof t?C.extend({},C.fn.transition.settings,{animation:e,duration:t}):"object"==typeof t?C.extend({},C.fn.transition.settings,t,{animation:e}):"function"==typeof t?C.extend({},C.fn.transition.settings,{animation:e,onComplete:t}):C.extend({},C.fn.transition.settings,{animation:e})},animationClass:function(e){var e=e||l.animation,t=f.can.transition()&&!f.has.direction()?f.get.direction()+" ":"";return c.animating+" "+c.transition+" "+t+e},currentAnimation:function(){return!(!f.cache||f.cache.animation===k)&&f.cache.animation},currentDirection:function(){return f.is.inward()?c.inward:c.outward},direction:function(){return f.is.hidden()||!f.is.visible()?c.inward:c.outward},animationDirection:function(e){var n;return"string"==typeof(e=e||l.animation)&&(e=e.split(" "),C.each(e,function(e,t){t===c.inward?n=c.inward:t===c.outward&&(n=c.outward)})),n||!1},duration:function(e){return"string"==typeof(e=!1===(e=e||l.duration)?u.css("animation-duration")||0:e)?-1<e.indexOf("ms")?parseFloat(e):1e3*parseFloat(e):e},displayType:function(e){return l.displayType||((e=e===k||e)&&u.data(t.displayType)===k&&(""===(e=u.css("display"))||"none"===e?f.can.transition(!0):f.save.displayType(e)),u.data(t.displayType))},userStyle:function(e){return(e=e||u.attr("style")||"").replace(/display.*?;/,"")},transitionExists:function(e){return C.fn.transition.exists[e]},animationStartEvent:function(){var e,t=w.createElement("div"),n={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(e in n)if(t.style[e]!==k)return n[e];return!1},animationEndEvent:function(){var e,t=w.createElement("div"),n={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(e in n)if(t.style[e]!==k)return n[e];return!1}},can:{transition:function(e){var t,n,i,o,a=l.animation,r=f.get.transitionExists(a),s=f.get.displayType(!1);if(r===k||e){if(f.verbose("Determining whether animation exists"),e=u.attr("class"),t=u.prop("tagName"),n=(t=C("<"+t+" />").addClass(e).insertAfter(u)).addClass(a).removeClass(c.inward).removeClass(c.outward).addClass(c.animating).addClass(c.transition).css("animationName"),i=t.addClass(c.inward).css("animationName"),s||(s=t.attr("class",e).removeAttr("style").removeClass(c.hidden).removeClass(c.visible).show().css("display"),f.verbose("Determining final display state",s),f.save.displayType(s)),t.remove(),n!=i)f.debug("Direction exists for animation",a),o=!0;else{if("none"==n||!n)return void f.debug("No animation defined in css",a);f.debug("Static animation found",a,s),o=!1}f.save.transitionExists(a,o)}return r!==k?r:o},animate:function(){return f.can.transition()!==k}},is:{animating:function(){return u.hasClass(c.animating)},inward:function(){return u.hasClass(c.inward)},outward:function(){return u.hasClass(c.outward)},looping:function(){return u.hasClass(c.looping)},occurring:function(e){return e="."+(e=e||l.animation).replace(" ","."),0<u.filter(e).length},visible:function(){return u.is(":visible")},hidden:function(){return"hidden"===u.css("visibility")},supported:function(){return!1!==n}},hide:function(){f.verbose("Hiding element"),f.is.animating()&&f.reset(),d.blur(),f.remove.display(),f.remove.visible(),C.isFunction(l.onBeforeHide)?l.onBeforeHide.call(d,function(){f.hideNow()}):f.hideNow()},hideNow:function(){f.set.hidden(),f.force.hidden(),l.onHide.call(d),l.onComplete.call(d)},show:function(e){f.verbose("Showing element",e),f.force.visible()&&(f.remove.hidden(),f.set.visible(),l.onShow.call(d),l.onComplete.call(d))},toggle:function(){f.is.visible()?f.hide():f.show()},stop:function(){f.debug("Stopping current animation"),u.triggerHandler(n)},stopAll:function(){f.debug("Stopping all animation"),f.remove.queueCallback(),u.triggerHandler(n)},clear:{queue:function(){f.debug("Clearing animation queue"),f.remove.queueCallback()}},enable:function(){f.verbose("Starting animation"),u.removeClass(c.disabled)},disable:function(){f.debug("Stopping animation"),u.addClass(c.disabled)},setting:function(e,t){if(f.debug("Changing setting",e,t),C.isPlainObject(e))C.extend(!0,l,e);else{if(t===k)return l[e];C.isPlainObject(l[e])?C.extend(!0,l[e],t):l[e]=t}},internal:function(e,t){if(C.isPlainObject(e))C.extend(!0,f,e);else{if(t===k)return f[e];f[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,l.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),f.verbose.apply(console,arguments)))},error:function(){l.silent||(f.error=Function.prototype.bind.call(console.error,console,l.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=(new Date).getTime())-(p||t),p=t,h.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=l.name+":",n=0;p=!1,clearTimeout(f.performance.timer),C.each(h,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",g&&(e+=" '"+g+"'"),1<r.length&&(e+=" ("+r.length+")"),(console.group!==k||console.table!==k)&&0<h.length&&(console.groupCollapsed(e),console.table?console.table(h):C.each(h,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(i,e,t){var o,a,n,r=s;return e=e||y,t=d||t,"string"==typeof i&&r!==k&&(i=i.split(/[\. ]/),o=i.length-1,C.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(C.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==k)return a=r[n],!1;{if(!C.isPlainObject(r[t])||e==o)return r[t]!==k&&(a=r[t]),!1;r=r[t]}}})),C.isFunction(a)?n=a.apply(t,e):a!==k&&(n=a),Array.isArray(m)?m.push(n):m!==k?m=[m,n]:n!==k&&(m=n),a!==k&&a}};f.initialize()}),m!==k?m:this},C.fn.transition.exists={},C.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,skipInlineHidden:!1,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate. Use silent setting to surpress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document),function(E,F,P){"use strict";E.isWindow=E.isWindow||function(e){return null!=e&&e===e.window},F=void 0!==F&&F.Math==Math?F:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),E.api=E.fn.api=function(x){var C,e=E.isFunction(this)?E(F):E(this),w=e.selector||"",k=(new Date).getTime(),T=[],S=x,D="string"==typeof S,A=[].slice.call(arguments,1);return e.each(function(){var a,i,n,e,g,r=E.isPlainObject(x)?E.extend(!0,{},E.fn.api.settings,x):E.extend({},E.fn.api.settings),t=r.namespace,o=r.metadata,p=r.selector,s=r.error,h=r.className,v="."+t,b="module-"+t,l=E(this),y=l.closest(p.form),c=r.stateContext?E(r.stateContext):l,u=this,d=c[0],f=l.data(b),m={initialize:function(){D||m.bind.events(),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),f=m,l.data(b,f)},destroy:function(){m.verbose("Destroying previous module for",u),l.removeData(b).off(v)},bind:{events:function(){var e=m.get.event();e?(m.verbose("Attaching API events to element",e),l.on(e+v,m.event.trigger)):"now"==r.on&&(m.debug("Querying API endpoint immediately"),m.query())}},decode:{json:function(e){if(e!==P&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(F.Storage!==P)return t=sessionStorage.getItem(e),m.debug("Using cached response",e,t),m.decode.json(t);m.error(s.noStorage)}},write:{cachedResponse:function(e,t){t&&""===t?m.debug("Response empty, not caching",t):F.Storage!==P?(E.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e,t),m.verbose("Storing cached response for url",e,t)):m.error(s.noStorage)}},query:function(){if(m.is.disabled())m.debug("Element is disabled API request aborted");else{if(m.is.loading()){if(!r.interruptRequests)return void m.debug("Cancelling request, previous request is still pending");m.debug("Interrupting previous request"),m.abort()}if(r.defaultData&&E.extend(!0,r.urlData,m.get.defaultData()),r.serializeForm&&(r.data=m.add.formData(r.data)),!1===(i=m.get.settings()))return m.cancelled=!0,void m.error(s.beforeSend);if(m.cancelled=!1,(n=m.get.templatedURL())||m.is.mocked()){if((n=m.add.urlData(n))||m.is.mocked()){if(i.url=r.base+n,a=E.extend(!0,{},r,{type:r.method||r.type,data:e,url:r.base+n,beforeSend:r.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),m.debug("Querying URL",a.url),m.verbose("Using AJAX settings",a),"local"===r.cache&&m.read.cachedResponse(n))return m.debug("Response returned from local cache"),m.request=m.create.request(),void m.request.resolveWith(d,[m.read.cachedResponse(n)]);r.throttle?r.throttleFirstRequest||m.timer?(m.debug("Throttling request",r.throttle),clearTimeout(m.timer),m.timer=setTimeout(function(){m.timer&&delete m.timer,m.debug("Sending throttled request",e,a.method),m.send.request()},r.throttle)):(m.debug("Sending request",e,a.method),m.send.request(),m.timer=setTimeout(function(){},r.throttle)):(m.debug("Sending request",e,a.method),m.send.request())}}else m.error(s.missingURL)}},should:{removeError:function(){return!0===r.hideError||"auto"===r.hideError&&!m.is.form()}},is:{disabled:function(){return 0<l.filter(p.disabled).length},expectingJSON:function(){return"json"===r.dataType||"jsonp"===r.dataType},form:function(){return l.is("form")||c.is("form")},mocked:function(){return r.mockResponse||r.mockResponseAsync||r.response||r.responseAsync},input:function(){return l.is("input")},loading:function(){return!!m.request&&"pending"==m.request.state()},abortedRequest:function(e){return e&&e.readyState!==P&&0===e.readyState?(m.verbose("XHR request determined to be aborted"),!0):(m.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return m.is.expectingJSON()&&E.isFunction(r.successTest)?(m.debug("Checking JSON returned success",r.successTest,e),r.successTest(e)?(m.debug("Response passed success test",e),!0):(m.debug("Response failed success test",e),!1)):(m.verbose("Response is not JSON, skipping validation",r.successTest,e),!0)}},was:{cancelled:function(){return m.cancelled||!1},succesful:function(){return m.verbose('This behavior will be deleted due to typo. Use "was successful" instead.'),m.was.successful()},successful:function(){return m.request&&"resolved"==m.request.state()},failure:function(){return m.request&&"rejected"==m.request.state()},complete:function(){return m.request&&("resolved"==m.request.state()||"rejected"==m.request.state())}},add:{urlData:function(o,a){var e,t;return o&&(e=o.match(r.regExp.required),t=o.match(r.regExp.optional),a=a||r.urlData,e&&(m.debug("Looking for required URL variables",e),E.each(e,function(e,t){var n=-1!==t.indexOf("$")?t.substr(2,t.length-3):t.substr(1,t.length-2),i=E.isPlainObject(a)&&a[n]!==P?a[n]:l.data(n)!==P?l.data(n):c.data(n)!==P?c.data(n):a[n];if(i===P)return m.error(s.requiredParameter,n,o),o=!1;m.verbose("Found required variable",n,i),i=r.encodeParameters?m.get.urlEncodedValue(i):i,o=o.replace(t,i)})),t&&(m.debug("Looking for optional URL variables",e),E.each(t,function(e,t){var n=-1!==t.indexOf("$")?t.substr(3,t.length-4):t.substr(2,t.length-3),i=E.isPlainObject(a)&&a[n]!==P?a[n]:l.data(n)!==P?l.data(n):c.data(n)!==P?c.data(n):a[n];o=i!==P?(m.verbose("Optional variable Found",n,i),o.replace(t,i)):(m.verbose("Optional variable not found",n),-1!==o.indexOf("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(e){var t=E.fn.serializeObject!==P,n=t?y.serializeObject():y.serialize();return e=e||r.data,e=E.isPlainObject(e)?t?(m.debug("Extending existing data with form data",e,n),E.extend(!0,{},e,n)):(m.error(s.missingSerialize),m.debug("Cant extend data. Replacing data with form data",e,n),n):(m.debug("Adding form data",n),n)}},send:{request:function(){m.set.loading(),m.request=m.create.request(),m.is.mocked()?m.mockedXHR=m.create.mockedXHR():m.xhr=m.create.xhr(),r.onRequest.call(d,m.request,m.xhr)}},event:{trigger:function(e){m.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,n){var i=this,o=(new Date).getTime()-g,o=r.loadingDuration-o,a=!!E.isFunction(r.onResponse)&&(m.is.expectingJSON()&&!r.rawResponse?r.onResponse.call(i,E.extend(!0,{},e)):r.onResponse.call(i,e)),o=0<o?o:0;a&&(m.debug("Modified API response in onResponse callback",r.onResponse,a,e),e=a),0<o&&m.debug("Response completed early delaying state change by",o),setTimeout(function(){m.is.validResponse(e)?m.request.resolveWith(i,[e,n]):m.request.rejectWith(i,[n,"invalid"])},o)},fail:function(e,t,n){var i=this,o=(new Date).getTime()-g,o=r.loadingDuration-o;0<(o=0<o?o:0)&&m.debug("Response completed early delaying state change by",o),setTimeout(function(){m.is.abortedRequest(e)?m.request.rejectWith(i,[e,"aborted",n]):m.request.rejectWith(i,[e,"error",t,n])},o)}},request:{done:function(e,t){m.debug("Successful API Response",e),"local"===r.cache&&n&&(m.write.cachedResponse(n,e),m.debug("Saving server response locally",m.cache)),r.onSuccess.call(d,e,l,t)},complete:function(e,t){var n,i;m.was.successful()?(i=e,n=t):i=m.get.responseFromXHR(n=e),m.remove.loading(),r.onComplete.call(d,i,l,n)},fail:function(e,t,n){var i=m.get.responseFromXHR(e),o=m.get.errorFromRequest(i,t,n);if("aborted"==t)return m.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,n),r.onAbort.call(d,t,l,e),!0;"invalid"==t?m.debug("JSON did not pass success test. A server-side error has most likely occurred",i):"error"==t&&e!==P&&(m.debug("XHR produced a server error",t,n),(e.status<200||300<=e.status)&&n!==P&&""!==n&&m.error(s.statusMessage+n,a.url),r.onError.call(d,o,l,e)),r.errorDuration&&"aborted"!==t&&(m.debug("Adding error state"),m.set.error(),m.should.removeError()&&setTimeout(m.remove.error,r.errorDuration)),m.debug("API Request failed",o,e),r.onFailure.call(d,i,l,e)}}},create:{request:function(){return E.Deferred().always(m.event.request.complete).done(m.event.request.done).fail(m.event.request.fail)},mockedXHR:function(){var e=r.mockResponse||r.response,t=r.mockResponseAsync||r.responseAsync,n=E.Deferred().always(m.event.xhr.complete).done(m.event.xhr.done).fail(m.event.xhr.fail);return e?(e=E.isFunction(e)?(m.debug("Using specified synchronous callback",e),e.call(d,i)):(m.debug("Using settings specified response",e),e),n.resolveWith(d,[e,!1,{responseText:e}])):E.isFunction(t)&&(e=function(e){m.debug("Async callback returned response",e),e?n.resolveWith(d,[e,!1,{responseText:e}]):n.rejectWith(d,[{responseText:e},!1,!1])},m.debug("Using specified async response callback",t),t.call(d,i,e)),n},xhr:function(){var e=E.ajax(a).always(m.event.xhr.always).done(m.event.xhr.done).fail(m.event.xhr.fail);return m.verbose("Created server request",e,a),e}},set:{error:function(){m.verbose("Adding error state to element",c),c.addClass(h.error)},loading:function(){m.verbose("Adding loading state to element",c),c.addClass(h.loading),g=(new Date).getTime()}},remove:{error:function(){m.verbose("Removing error state from element",c),c.removeClass(h.error)},loading:function(){m.verbose("Removing loading state from element",c),c.removeClass(h.loading)}},get:{responseFromXHR:function(e){return!!E.isPlainObject(e)&&(m.is.expectingJSON()?m.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,n){return E.isPlainObject(e)&&e.error!==P?e.error:r.error[t]!==P?r.error[t]:n},request:function(){return m.request||!1},xhr:function(){return m.xhr||!1},settings:function(){var e=r.beforeSend.call(l,r);return e&&(e.success!==P&&(m.debug("Legacy success callback detected",e),m.error(s.legacyParameters,e.success),e.onSuccess=e.success),e.failure!==P&&(m.debug("Legacy failure callback detected",e),m.error(s.legacyParameters,e.failure),e.onFailure=e.failure),e.complete!==P&&(m.debug("Legacy complete callback detected",e),m.error(s.legacyParameters,e.complete),e.onComplete=e.complete)),e===P&&m.error(s.noReturnedValue),!1===e?e:e!==P?E.extend(!0,{},e):E.extend(!0,{},r)},urlEncodedValue:function(e){var t=F.decodeURIComponent(e),n=F.encodeURIComponent(e);return t!==e?(m.debug("URL value is already encoded, avoiding double encoding",e),e):(m.verbose("Encoding value using encodeURIComponent",e,n),n)},defaultData:function(){var e={};return E.isWindow(u)||(m.is.input()?e.value=l.val():m.is.form()||(e.text=l.text())),e},event:function(){return E.isWindow(u)||"now"==r.on?(m.debug("API called without element, no events attached"),!1):"auto"==r.on?l.is("input")?u.oninput!==P?"input":u.onpropertychange!==P?"propertychange":"keyup":l.is("form")?"submit":"click":r.on},templatedURL:function(e){if(e=e||l.data(o.action)||r.action||!1,n=l.data(o.url)||r.url||!1)return m.debug("Using specified url",n),n;if(e){if(m.debug("Looking up url for action",e,r.api),r.api[e]===P&&!m.is.mocked())return void m.error(s.missingAction,r.action,r.api);n=r.api[e]}else m.is.form()&&(n=l.attr("action")||c.attr("action")||!1,m.debug("No url or action specified, defaulting to form action",n));return n}},abort:function(){var e=m.get.xhr();e&&"resolved"!==e.state()&&(m.debug("Cancelling API request"),e.abort())},reset:function(){m.remove.error(),m.remove.loading()},setting:function(e,t){if(m.debug("Changing setting",e,t),E.isPlainObject(e))E.extend(!0,r,e);else{if(t===P)return r[e];E.isPlainObject(r[e])?E.extend(!0,r[e],t):r[e]=t}},internal:function(e,t){if(E.isPlainObject(e))E.extend(!0,m,e);else{if(t===P)return m[e];m[e]=t}},debug:function(){!r.silent&&r.debug&&(r.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,r.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),m.verbose.apply(console,arguments)))},error:function(){r.silent||(m.error=Function.prototype.bind.call(console.error,console,r.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,n;r.performance&&(n=(t=(new Date).getTime())-(k||t),k=t,T.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var e=r.name+":",n=0;k=!1,clearTimeout(m.performance.timer),E.each(T,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",w&&(e+=" '"+w+"'"),(console.group!==P||console.table!==P)&&0<T.length&&(console.groupCollapsed(e),console.table?console.table(T):E.each(T,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),T=[]}},invoke:function(i,e,t){var o,a,n,r=f;return e=e||A,t=u||t,"string"==typeof i&&r!==P&&(i=i.split(/[\. ]/),o=i.length-1,E.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(E.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==P)return a=r[n],!1;{if(!E.isPlainObject(r[t])||e==o)return r[t]!==P?a=r[t]:m.error(s.method,i),!1;r=r[t]}}})),E.isFunction(a)?n=a.apply(t,e):a!==P&&(n=a),Array.isArray(C)?C.push(n):C!==P?C=[C,n]:n!==P&&(C=n),a}};D?(f===P&&m.initialize(),m.invoke(S)):(f!==P&&f.invoke("destroy"),m.initialize())}),C!==P?C:this},E.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!1,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,void document),function(w,e,k){"use strict";w.isFunction=w.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),w.fn.state=function(m){var g,p=w(this),h=p.selector||"",v=(new Date).getTime(),b=[],y=m,x="string"==typeof y,C=[].slice.call(arguments,1);return p.each(function(){var o=w.isPlainObject(m)?w.extend(!0,{},w.fn.state.settings,m):w.extend({},w.fn.state.settings),u=o.error,n=o.metadata,t=o.className,d=o.namespace,i=o.states,a=o.text,e="."+d,f=d+"-module",r=w(this),s=this,l=r.data(f),c={initialize:function(){c.verbose("Initializing module"),o.automatic&&c.add.defaults(),o.context&&""!==h?w(o.context).on(h,"mouseenter"+e,c.change.text).on(h,"mouseleave"+e,c.reset.text).on(h,"click"+e,c.toggle.state):r.on("mouseenter"+e,c.change.text).on("mouseleave"+e,c.reset.text).on("click"+e,c.toggle.state),c.instantiate()},instantiate:function(){c.verbose("Storing instance of module",c),l=c,r.data(f,c)},destroy:function(){c.verbose("Destroying previous module",l),r.off(e).removeData(f)},refresh:function(){c.verbose("Refreshing selector cache"),r=w(s)},add:{defaults:function(){var n=m&&w.isPlainObject(m.states)?m.states:{};w.each(o.defaults,function(e,t){c.is[e]!==k&&c.is[e]()&&(c.verbose("Adding default states",e,s),w.extend(o.states,t,n))})}},is:{active:function(){return r.hasClass(t.active)},loading:function(){return r.hasClass(t.loading)},inactive:function(){return!r.hasClass(t.active)},state:function(e){return t[e]!==k&&r.hasClass(t[e])},enabled:function(){return!r.is(o.filter.active)},disabled:function(){return r.is(o.filter.active)},textEnabled:function(){return!r.is(o.filter.text)},button:function(){return r.is(".button:not(a, .submit)")},input:function(){return r.is("input")},progress:function(){return r.is(".ui.progress")}},allow:function(e){c.debug("Now allowing state",e),i[e]=!0},disallow:function(e){c.debug("No longer allowing",e),i[e]=!1},allows:function(e){return i[e]||!1},enable:function(){r.removeClass(t.disabled)},disable:function(){r.addClass(t.disabled)},setState:function(e){c.allows(e)&&r.addClass(t[e])},removeState:function(e){c.allows(e)&&r.removeClass(t[e])},toggle:{state:function(){var e;if(c.allows("active")&&c.is.enabled()){if(c.refresh(),w.fn.api!==k)if(e=r.api("get request"),r.api("was cancelled"))c.debug("API Request cancelled by beforesend"),o.activateTest=function(){return!1},o.deactivateTest=function(){return!1};else if(e)return void c.listenTo(e);c.change.state()}}},listenTo:function(e){c.debug("API request detected, waiting for state signal",e),e&&(a.loading&&c.update.text(a.loading),w.when(e).then(function(){"resolved"==e.state()?(c.debug("API request succeeded"),o.activateTest=function(){return!0},o.deactivateTest=function(){return!0}):(c.debug("API request failed"),o.activateTest=function(){return!1},o.deactivateTest=function(){return!1}),c.change.state()}))},change:{state:function(){c.debug("Determining state change direction"),c.is.inactive()?c.activate():c.deactivate(),o.sync&&c.sync(),o.onChange.call(s)},text:function(){c.is.textEnabled()&&(c.is.disabled()?(c.verbose("Changing text to disabled text",a.hover),c.update.text(a.disabled)):c.is.active()?a.hover?(c.verbose("Changing text to hover text",a.hover),c.update.text(a.hover)):a.deactivate&&(c.verbose("Changing text to deactivating text",a.deactivate),c.update.text(a.deactivate)):a.hover?(c.verbose("Changing text to hover text",a.hover),c.update.text(a.hover)):a.activate&&(c.verbose("Changing text to activating text",a.activate),c.update.text(a.activate)))}},activate:function(){o.activateTest.call(s)&&(c.debug("Setting state to active"),r.addClass(t.active),c.update.text(a.active),o.onActivate.call(s))},deactivate:function(){o.deactivateTest.call(s)&&(c.debug("Setting state to inactive"),r.removeClass(t.active),c.update.text(a.inactive),o.onDeactivate.call(s))},sync:function(){c.verbose("Syncing other buttons to current state"),c.is.active()?p.not(r).state("activate"):p.not(r).state("deactivate")},get:{text:function(){return o.selector.text?r.find(o.selector.text).text():r.html()},textFor:function(e){return a[e]||!1}},flash:{text:function(e,t,n){var i=c.get.text();c.debug("Flashing text message",e,t),e=e||o.text.flash,t=t||o.flashDuration,n=n||function(){},c.update.text(e),setTimeout(function(){c.update.text(i),n.call(s)},t)}},reset:{text:function(){var e=a.active||r.data(n.storedText),t=a.inactive||r.data(n.storedText);c.is.textEnabled()&&(c.is.active()&&e?(c.verbose("Resetting active text",e),c.update.text(e)):t&&(c.verbose("Resetting inactive text",e),c.update.text(t)))}},update:{text:function(e){var t=c.get.text();e&&e!==t?(c.debug("Updating text",e),o.selector.text?r.data(n.storedText,e).find(o.selector.text).text(e):r.data(n.storedText,e).html(e)):c.debug("Text is already set, ignoring update",e)}},setting:function(e,t){if(c.debug("Changing setting",e,t),w.isPlainObject(e))w.extend(!0,o,e);else{if(t===k)return o[e];w.isPlainObject(o[e])?w.extend(!0,o[e],t):o[e]=t}},internal:function(e,t){if(w.isPlainObject(e))w.extend(!0,c,e);else{if(t===k)return c[e];c[e]=t}},debug:function(){!o.silent&&o.debug&&(o.performance?c.performance.log(arguments):(c.debug=Function.prototype.bind.call(console.info,console,o.name+":"),c.debug.apply(console,arguments)))},verbose:function(){!o.silent&&o.verbose&&o.debug&&(o.performance?c.performance.log(arguments):(c.verbose=Function.prototype.bind.call(console.info,console,o.name+":"),c.verbose.apply(console,arguments)))},error:function(){o.silent||(c.error=Function.prototype.bind.call(console.error,console,o.name+":"),c.error.apply(console,arguments))},performance:{log:function(e){var t,n;o.performance&&(n=(t=(new Date).getTime())-(v||t),v=t,b.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:s,"Execution Time":n})),clearTimeout(c.performance.timer),c.performance.timer=setTimeout(c.performance.display,500)},display:function(){var e=o.name+":",n=0;v=!1,clearTimeout(c.performance.timer),w.each(b,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",h&&(e+=" '"+h+"'"),(console.group!==k||console.table!==k)&&0<b.length&&(console.groupCollapsed(e),console.table?console.table(b):w.each(b,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),b=[]}},invoke:function(i,e,t){var o,a,n,r=l;return e=e||C,t=s||t,"string"==typeof i&&r!==k&&(i=i.split(/[\. ]/),o=i.length-1,w.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(w.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==k)return a=r[n],!1;{if(!w.isPlainObject(r[t])||e==o)return r[t]!==k?a=r[t]:c.error(u.method,i),!1;r=r[t]}}})),w.isFunction(a)?n=a.apply(t,e):a!==k&&(n=a),Array.isArray(g)?g.push(n):g!==k?g=[g,n]:n!==k&&(g=n),a}};x?(l===k&&c.initialize(),c.invoke(y)):(l!==k&&l.invoke("destroy"),c.initialize())}),g!==k?g:this},w.fn.state.settings={name:"State",debug:!1,verbose:!1,namespace:"state",performance:!0,onActivate:function(){},onDeactivate:function(){},onChange:function(){},activateTest:function(){return!0},deactivateTest:function(){return!0},automatic:!0,sync:!1,flashDuration:1e3,filter:{text:".loading, .disabled",active:".disabled"},context:!1,error:{beforeSend:"The before send function has cancelled state change",method:"The method you called is not defined."},metadata:{promise:"promise",storedText:"stored-text"},className:{active:"active",disabled:"disabled",error:"error",loading:"loading",success:"success",warning:"warning"},selector:{text:!1},defaults:{input:{disabled:!0,loading:!0,active:!0},button:{disabled:!0,loading:!0,active:!0},progress:{active:!0,success:!0,warning:!0,error:!0}},states:{active:!0,disabled:!0,error:!0,loading:!0,success:!0,warning:!0},text:{disabled:!1,flash:!1,hover:!1,active:!1,inactive:!1,activate:!1,deactivate:!1}}}(jQuery,window,void document),function(E,F,P,O){"use strict";E.isFunction=E.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},F=void 0!==F&&F.Math==Math?F:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),E.fn.visibility=function(b){var y,e=E(this),x=e.selector||"",C=(new Date).getTime(),w=[],k=b,T="string"==typeof k,S=[].slice.call(arguments,1),D=e.length,A=0;return e.each(function(){var e,t,n,o=E.isPlainObject(b)?E.extend(!0,{},E.fn.visibility.settings,b):E.extend({},E.fn.visibility.settings),u=o.className,d=o.namespace,f=o.error,m=o.metadata,i="."+d,g="module-"+d,p=E(F),a=E(this),r=E(o.context),s=a.data(g),h=F.requestAnimationFrame||F.mozRequestAnimationFrame||F.webkitRequestAnimationFrame||F.msRequestAnimationFrame||function(e){setTimeout(e,0)},l=this,v=!1,c={initialize:function(){c.debug("Initializing",o),c.setup.cache(),c.should.trackChanges()&&("image"==o.type&&c.setup.image(),"fixed"==o.type&&c.setup.fixed(),o.observeChanges&&c.observeChanges(),c.bind.events()),c.save.position(),c.is.visible()||c.error(f.visible,a),o.initialCheck&&c.checkVisibility(),c.instantiate()},instantiate:function(){c.debug("Storing instance",c),a.data(g,c),s=c},destroy:function(){c.verbose("Destroying previous module"),n&&n.disconnect(),t&&t.disconnect(),p.off("load"+i,c.event.load).off("resize"+i,c.event.resize),r.off("scroll"+i,c.event.scroll).off("scrollchange"+i,c.event.scrollchange),"fixed"==o.type&&(c.resetFixed(),c.remove.placeholder()),a.off(i).removeData(g)},observeChanges:function(){"MutationObserver"in F&&(t=new MutationObserver(c.event.contextChanged),n=new MutationObserver(c.event.changed),t.observe(P,{childList:!0,subtree:!0}),n.observe(l,{childList:!0,subtree:!0}),c.debug("Setting up mutation observer",n))},bind:{events:function(){c.verbose("Binding visibility events to scroll and resize"),o.refreshOnLoad&&p.on("load"+i,c.event.load),p.on("resize"+i,c.event.resize),r.off("scroll"+i).on("scroll"+i,c.event.scroll).on("scrollchange"+i,c.event.scrollchange)}},event:{changed:function(e){c.verbose("DOM tree modified, updating visibility calculations"),c.timer=setTimeout(function(){c.verbose("DOM tree modified, updating sticky menu"),c.refresh()},100)},contextChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==l||0<E(e).find(l).length)&&(c.debug("Element removed from DOM, tearing down events"),c.destroy())})})},resize:function(){c.debug("Window resized"),o.refreshOnResize&&h(c.refresh)},load:function(){c.debug("Page finished loading"),h(c.refresh)},scroll:function(){o.throttle?(clearTimeout(c.timer),c.timer=setTimeout(function(){r.triggerHandler("scrollchange"+i,[r.scrollTop()])},o.throttle)):h(function(){r.triggerHandler("scrollchange"+i,[r.scrollTop()])})},scrollchange:function(e,t){c.checkVisibility(t)}},precache:function(e,t){for(var n=(e=e instanceof Array?e:[e]).length,i=0,o=[],a=P.createElement("img"),r=function(){++i>=e.length&&E.isFunction(t)&&t()};n--;)(a=P.createElement("img")).onload=r,a.onerror=r,a.src=e[n],o.push(a)},enableCallbacks:function(){c.debug("Allowing callbacks to occur"),v=!1},disableCallbacks:function(){c.debug("Disabling all callbacks temporarily"),v=!0},should:{trackChanges:function(){return T?(c.debug("One time query, no need to bind events"),!1):(c.debug("Callbacks being attached"),!0)}},setup:{cache:function(){c.cache={occurred:{},screen:{},element:{}}},image:function(){var e=a.data(m.src);e&&(c.verbose("Lazy loading image",e),o.once=!0,o.observeChanges=!1,o.onOnScreen=function(){c.debug("Image on screen",l),c.precache(e,function(){c.set.image(e,function(){++A==D&&o.onAllLoaded.call(this),o.onLoad.call(this)})})})},fixed:function(){c.debug("Setting up fixed"),o.once=!1,o.observeChanges=!1,o.initialCheck=!0,o.refreshOnLoad=!0,b.transition||(o.transition=!1),c.create.placeholder(),c.debug("Added placeholder",e),o.onTopPassed=function(){c.debug("Element passed, adding fixed position",a),c.show.placeholder(),c.set.fixed(),o.transition&&E.fn.transition!==O&&a.transition(o.transition,o.duration)},o.onTopPassedReverse=function(){c.debug("Element returned to position, removing fixed",a),c.hide.placeholder(),c.remove.fixed()}}},create:{placeholder:function(){c.verbose("Creating fixed position placeholder"),e=a.clone(!1).css("display","none").addClass(u.placeholder).insertAfter(a)}},show:{placeholder:function(){c.verbose("Showing placeholder"),e.css("display","block").css("visibility","hidden")}},hide:{placeholder:function(){c.verbose("Hiding placeholder"),e.css("display","none").css("visibility","")}},set:{fixed:function(){c.verbose("Setting element to fixed position"),a.addClass(u.fixed).css({position:"fixed",top:o.offset+"px",left:"auto",zIndex:o.zIndex}),o.onFixed.call(l)},image:function(e,t){a.attr("src",e),o.transition?E.fn.transition!==O?a.hasClass(u.visible)?c.debug("Transition already occurred on this image, skipping animation"):a.transition(o.transition,o.duration,t):a.fadeIn(o.duration,t):a.show()}},is:{onScreen:function(){return c.get.elementCalculations().onScreen},offScreen:function(){return c.get.elementCalculations().offScreen},visible:function(){return!(!c.cache||!c.cache.element)&&!(0===c.cache.element.width&&0===c.cache.element.offset.top)},verticallyScrollableContext:function(){var e=r.get(0)!==F&&r.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=r.get(0)!==F&&r.css("overflow-x");return"auto"==e||"scroll"==e}},refresh:function(){c.debug("Refreshing constants (width/height)"),"fixed"==o.type&&c.resetFixed(),c.reset(),c.save.position(),o.checkOnRefresh&&c.checkVisibility(),o.onRefresh.call(l)},resetFixed:function(){c.remove.fixed(),c.remove.occurred()},reset:function(){c.verbose("Resetting all cached values"),E.isPlainObject(c.cache)&&(c.cache.screen={},c.cache.element={})},checkVisibility:function(e){c.verbose("Checking visibility of element",c.cache.element),!v&&c.is.visible()&&(c.save.scroll(e),c.save.calculations(),c.passed(),c.passingReverse(),c.topVisibleReverse(),c.bottomVisibleReverse(),c.topPassedReverse(),c.bottomPassedReverse(),c.onScreen(),c.offScreen(),c.passing(),c.topVisible(),c.bottomVisible(),c.topPassed(),c.bottomPassed(),o.onUpdate&&o.onUpdate.call(l,c.get.elementCalculations()))},passed:function(e,t){var n=c.get.elementCalculations();if(e&&t)o.onPassed[e]=t;else{if(e!==O)return c.get.pixelsPassed(e)>n.pixelsPassed;n.passing&&E.each(o.onPassed,function(e,t){n.bottomVisible||n.pixelsPassed>c.get.pixelsPassed(e)?c.execute(t,e):o.once||c.remove.occurred(t)})}},onScreen:function(e){var t=c.get.elementCalculations(),n=e||o.onOnScreen;if(e&&(c.debug("Adding callback for onScreen",e),o.onOnScreen=e),t.onScreen?c.execute(n,"onScreen"):o.once||c.remove.occurred("onScreen"),e!==O)return t.onOnScreen},offScreen:function(e){var t=c.get.elementCalculations(),n=e||o.onOffScreen;if(e&&(c.debug("Adding callback for offScreen",e),o.onOffScreen=e),t.offScreen?c.execute(n,"offScreen"):o.once||c.remove.occurred("offScreen"),e!==O)return t.onOffScreen},passing:function(e){var t=c.get.elementCalculations(),n=e||o.onPassing;if(e&&(c.debug("Adding callback for passing",e),o.onPassing=e),t.passing?c.execute(n,"passing"):o.once||c.remove.occurred("passing"),e!==O)return t.passing},topVisible:function(e){var t=c.get.elementCalculations(),n=e||o.onTopVisible,i="topVisible";if(e&&(c.debug("Adding callback for top visible",e),o.onTopVisible=e),t.topVisible?c.execute(n,i):o.once||c.remove.occurred(i),e===O)return t.topVisible},bottomVisible:function(e){var t=c.get.elementCalculations(),n=e||o.onBottomVisible,i="bottomVisible";if(e&&(c.debug("Adding callback for bottom visible",e),o.onBottomVisible=e),t.bottomVisible?c.execute(n,i):o.once||c.remove.occurred(i),e===O)return t.bottomVisible},topPassed:function(e){var t=c.get.elementCalculations(),n=e||o.onTopPassed;if(e&&(c.debug("Adding callback for top passed",e),o.onTopPassed=e),t.topPassed?c.execute(n,"topPassed"):o.once||c.remove.occurred("topPassed"),e===O)return t.topPassed},bottomPassed:function(e){var t=c.get.elementCalculations(),n=e||o.onBottomPassed,i="bottomPassed";if(e&&(c.debug("Adding callback for bottom passed",e),o.onBottomPassed=e),t.bottomPassed?c.execute(n,i):o.once||c.remove.occurred(i),e===O)return t.bottomPassed},passingReverse:function(e){var t=c.get.elementCalculations(),n=e||o.onPassingReverse,i="passingReverse";if(e&&(c.debug("Adding callback for passing reverse",e),o.onPassingReverse=e),t.passing?o.once||c.remove.occurred(i):c.get.occurred("passing")&&c.execute(n,i),e!==O)return!t.passing},topVisibleReverse:function(e){var t=c.get.elementCalculations(),n=e||o.onTopVisibleReverse,i="topVisibleReverse";if(e&&(c.debug("Adding callback for top visible reverse",e),o.onTopVisibleReverse=e),t.topVisible?o.once||c.remove.occurred(i):c.get.occurred("topVisible")&&c.execute(n,i),e===O)return!t.topVisible},bottomVisibleReverse:function(e){var t=c.get.elementCalculations(),n=e||o.onBottomVisibleReverse,i="bottomVisibleReverse";if(e&&(c.debug("Adding callback for bottom visible reverse",e),o.onBottomVisibleReverse=e),t.bottomVisible?o.once||c.remove.occurred(i):c.get.occurred("bottomVisible")&&c.execute(n,i),e===O)return!t.bottomVisible},topPassedReverse:function(e){var t=c.get.elementCalculations(),n=e||o.onTopPassedReverse,i="topPassedReverse";if(e&&(c.debug("Adding callback for top passed reverse",e),o.onTopPassedReverse=e),t.topPassed?o.once||c.remove.occurred(i):c.get.occurred("topPassed")&&c.execute(n,i),e===O)return!t.onTopPassed},bottomPassedReverse:function(e){var t=c.get.elementCalculations(),n=e||o.onBottomPassedReverse,i="bottomPassedReverse";if(e&&(c.debug("Adding callback for bottom passed reverse",e),o.onBottomPassedReverse=e),t.bottomPassed?o.once||c.remove.occurred(i):c.get.occurred("bottomPassed")&&c.execute(n,i),e===O)return!t.bottomPassed},execute:function(e,t){var n=c.get.elementCalculations(),i=c.get.screenCalculations();(e=e||!1)&&(o.continuous?(c.debug("Callback being called continuously",t,n),e.call(l,n,i)):c.get.occurred(t)||(c.debug("Conditions met",t,n),e.call(l,n,i))),c.save.occurred(t)},remove:{fixed:function(){c.debug("Removing fixed position"),a.removeClass(u.fixed).css({position:"",top:"",left:"",zIndex:""}),o.onUnfixed.call(l)},placeholder:function(){c.debug("Removing placeholder content"),e&&e.remove()},occurred:function(e){var t;e?(t=c.cache.occurred)[e]!==O&&!0===t[e]&&(c.debug("Callback can now be called again",e),c.cache.occurred[e]=!1):c.cache.occurred={}}},save:{calculations:function(){c.verbose("Saving all calculations necessary to determine positioning"),c.save.direction(),c.save.screenCalculations(),c.save.elementCalculations()},occurred:function(e){e&&(c.cache.occurred[e]!==O&&!0===c.cache.occurred[e]||(c.verbose("Saving callback occurred",e),c.cache.occurred[e]=!0))},scroll:function(e){e=e+o.offset||r.scrollTop()+o.offset,c.cache.scroll=e},direction:function(){var e=c.get.scroll(),t=c.get.lastScroll(),e=t<e&&t?"down":e<t&&t?"up":"static";return c.cache.direction=e,c.cache.direction},elementPosition:function(){var e=c.cache.element,t=c.get.screenSize();return c.verbose("Saving element position"),e.fits=e.height<t.height,e.offset=a.offset(),e.width=a.outerWidth(),e.height=a.outerHeight(),c.is.verticallyScrollableContext()&&(e.offset.top+=r.scrollTop()-r.offset().top),c.is.horizontallyScrollableContext()&&(e.offset.left+=r.scrollLeft()-r.offset().left),c.cache.element=e},elementCalculations:function(){var e=c.get.screenCalculations(),t=c.get.elementPosition();return o.includeMargin?(t.margin={},t.margin.top=parseInt(a.css("margin-top"),10),t.margin.bottom=parseInt(a.css("margin-bottom"),10),t.top=t.offset.top-t.margin.top,t.bottom=t.offset.top+t.height+t.margin.bottom):(t.top=t.offset.top,t.bottom=t.offset.top+t.height),t.topPassed=e.top>=t.top,t.bottomPassed=e.top>=t.bottom,t.topVisible=e.bottom>=t.top&&!t.topPassed,t.bottomVisible=e.bottom>=t.bottom&&!t.bottomPassed,t.pixelsPassed=0,t.percentagePassed=0,t.onScreen=(t.topVisible||t.passing)&&!t.bottomPassed,t.passing=t.topPassed&&!t.bottomPassed,t.offScreen=!t.onScreen,t.passing&&(t.pixelsPassed=e.top-t.top,t.percentagePassed=(e.top-t.top)/t.height),c.cache.element=t,c.verbose("Updated element calculations",t),t},screenCalculations:function(){var e=c.get.scroll();return c.save.direction(),c.cache.screen.top=e,c.cache.screen.bottom=e+c.cache.screen.height,c.cache.screen},screenSize:function(){c.verbose("Saving window position"),c.cache.screen={height:r.height()}},position:function(){c.save.screenSize(),c.save.elementPosition()}},get:{pixelsPassed:function(e){var t=c.get.elementCalculations();return-1<e.search("%")?t.height*(parseInt(e,10)/100):parseInt(e,10)},occurred:function(e){return c.cache.occurred!==O&&c.cache.occurred[e]||!1},direction:function(){return c.cache.direction===O&&c.save.direction(),c.cache.direction},elementPosition:function(){return c.cache.element===O&&c.save.elementPosition(),c.cache.element},elementCalculations:function(){return c.cache.element===O&&c.save.elementCalculations(),c.cache.element},screenCalculations:function(){return c.cache.screen===O&&c.save.screenCalculations(),c.cache.screen},screenSize:function(){return c.cache.screen===O&&c.save.screenSize(),c.cache.screen},scroll:function(){return c.cache.scroll===O&&c.save.scroll(),c.cache.scroll},lastScroll:function(){return c.cache.screen===O?(c.debug("First scroll event, no last scroll could be found"),!1):c.cache.screen.top}},setting:function(e,t){if(E.isPlainObject(e))E.extend(!0,o,e);else{if(t===O)return o[e];o[e]=t}},internal:function(e,t){if(E.isPlainObject(e))E.extend(!0,c,e);else{if(t===O)return c[e];c[e]=t}},debug:function(){!o.silent&&o.debug&&(o.performance?c.performance.log(arguments):(c.debug=Function.prototype.bind.call(console.info,console,o.name+":"),c.debug.apply(console,arguments)))},verbose:function(){!o.silent&&o.verbose&&o.debug&&(o.performance?c.performance.log(arguments):(c.verbose=Function.prototype.bind.call(console.info,console,o.name+":"),c.verbose.apply(console,arguments)))},error:function(){o.silent||(c.error=Function.prototype.bind.call(console.error,console,o.name+":"),c.error.apply(console,arguments))},performance:{log:function(e){var t,n;o.performance&&(n=(t=(new Date).getTime())-(C||t),C=t,w.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:l,"Execution Time":n})),clearTimeout(c.performance.timer),c.performance.timer=setTimeout(c.performance.display,500)},display:function(){var e=o.name+":",n=0;C=!1,clearTimeout(c.performance.timer),E.each(w,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",x&&(e+=" '"+x+"'"),(console.group!==O||console.table!==O)&&0<w.length&&(console.groupCollapsed(e),console.table?console.table(w):E.each(w,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),w=[]}},invoke:function(i,e,t){var o,a,n,r=s;return e=e||S,t=l||t,"string"==typeof i&&r!==O&&(i=i.split(/[\. ]/),o=i.length-1,E.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(E.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==O)return a=r[n],!1;{if(!E.isPlainObject(r[t])||e==o)return r[t]!==O?a=r[t]:c.error(f.method,i),!1;r=r[t]}}})),E.isFunction(a)?n=a.apply(t,e):a!==O&&(n=a),Array.isArray(y)?y.push(n):y!==O?y=[y,n]:n!==O&&(y=n),a}};T?(s===O&&c.initialize(),s.save.scroll(),s.save.calculations(),c.invoke(k)):(s!==O&&s.invoke("destroy"),c.initialize())}),y!==O?y:this},E.fn.visibility.settings={name:"Visibility",namespace:"visibility",debug:!1,verbose:!1,performance:!0,observeChanges:!0,initialCheck:!0,refreshOnLoad:!0,refreshOnResize:!0,checkOnRefresh:!0,once:!0,continuous:!1,offset:0,includeMargin:!1,context:F,throttle:!1,type:!1,zIndex:"10",transition:"fade in",duration:1e3,onPassed:{},onOnScreen:!1,onOffScreen:!1,onPassing:!1,onTopVisible:!1,onBottomVisible:!1,onTopPassed:!1,onBottomPassed:!1,onPassingReverse:!1,onTopVisibleReverse:!1,onBottomVisibleReverse:!1,onTopPassedReverse:!1,onBottomPassedReverse:!1,onLoad:function(){},onAllLoaded:function(){},onFixed:function(){},onUnfixed:function(){},onUpdate:!1,onRefresh:function(){},metadata:{src:"src"},className:{fixed:"fixed",placeholder:"constraint",visible:"visible"},error:{method:"The method you called is not defined.",visible:"Element is hidden, you must call refresh after element becomes visible"}}}(jQuery,window,document); |