wishthis/semantic/dist/semantic.min.js
2022-06-12 20:55:45 +02:00

11 lines
No EOL
252 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(g,h,v,b){g.isFunction=g.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},g.site=g.fn.site=function(e){var s,i=(new Date).getTime(),o=[],t=e,n="string"==typeof t,l=[].slice.call(arguments,1),r=g.isPlainObject(e)?g.extend(!0,{},g.site.settings,e):g.extend({},g.site.settings),a=r.namespace,c=r.error,u="module-"+a,d=g(v),f=this,m=d.data(u),p={initialize:function(){p.instantiate()},instantiate:function(){p.verbose("Storing instance of site",p),m=p,d.data(u,p)},normalize:function(){p.fix.console(),p.fix.requestAnimationFrame()},fix:{console:function(){p.debug("Normalizing window.console"),console!==b&&console.log!==b||(p.verbose("Console not available, normalizing events"),p.disable.console()),void 0!==console.group&&void 0!==console.groupEnd&&void 0!==console.groupCollapsed||(p.verbose("Console group not available, normalizing events"),h.console.group=function(){},h.console.groupEnd=function(){},h.console.groupCollapsed=function(){}),void 0===console.markTimeline&&(p.verbose("Mark timeline not available, normalizing events"),h.console.markTimeline=function(){})},consoleClear:function(){p.debug("Disabling programmatic console clearing"),h.console.clear=function(){}},requestAnimationFrame:function(){p.debug("Normalizing requestAnimationFrame"),h.requestAnimationFrame===b&&(p.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 g.fn[e]!==b&&g.fn[e].settings!==b},enabled:{modules:function(e){var n=[];return e=e||r.modules,g.each(e,function(e,t){p.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(e){var n=[];return e=e||r.modules,g.each(e,function(e,t){p.moduleExists(t)||n.push(t)}),n}},change:{setting:function(i,o,e,a){e="string"==typeof e?"all"===e?r.modules:[e]:e||r.modules,a=a===b||a,g.each(e,function(e,t){var n=!p.moduleExists(t)||(g.fn[t].settings.namespace||!1);p.moduleExists(t)&&(p.verbose("Changing default setting",i,o,t),g.fn[t].settings[i]=o,a&&n&&0<(n=g(":data(module-"+n+")")).length&&(p.verbose("Modifying existing settings",n),n[t]("setting",i,o)))})},settings:function(i,e,o){e="string"==typeof e?[e]:e||r.modules,o=o===b||o,g.each(e,function(e,t){var n;p.moduleExists(t)&&(p.verbose("Changing default setting",i,t),g.extend(!0,g.fn[t].settings,i),o&&a&&0<(n=g(":data(module-"+a+")")).length&&(p.verbose("Modifying existing settings",n),n[t]("setting",i)))})}},enable:{console:function(){p.console(!0)},debug:function(e,t){e=e||r.modules,p.debug("Enabling debug for modules",e),p.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||r.modules,p.debug("Enabling verbose debug for modules",e),p.change.setting("verbose",!0,e,t)}},disable:{console:function(){p.console(!1)},debug:function(e,t){e=e||r.modules,p.debug("Disabling debug for modules",e),p.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||r.modules,p.debug("Disabling verbose debug for modules",e),p.change.setting("verbose",!1,e,t)}},console:function(e){e?m.cache.console===b?p.error(c.console):(p.debug("Restoring console function"),h.console=m.cache.console):(p.debug("Disabling console function"),m.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(){p.verbose("Destroying previous site for",d),d.removeData(u)},cache:{},setting:function(e,t){if(g.isPlainObject(e))g.extend(!0,r,e);else{if(t===b)return r[e];r[e]=t}},internal:function(e,t){if(g.isPlainObject(e))g.extend(!0,p,e);else{if(t===b)return p[e];p[e]=t}},debug:function(){r.debug&&(r.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,r.name+":"),p.debug.apply(console,arguments)))},verbose:function(){r.verbose&&r.debug&&(r.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),p.verbose.apply(console,arguments)))},error:function(){p.error=Function.prototype.bind.call(console.error,console,r.name+":"),p.error.apply(console,arguments)},performance:{log:function(e){var t,n;r.performance&&(n=(t=(new Date).getTime())-(i||t),i=t,o.push({Element:f,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var e=r.name+":",n=0;i=!1,clearTimeout(p.performance.timer),g.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):g.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=m;return e=e||l,t=f||t,"string"==typeof i&&r!==b&&(i=i.split(/[\. ]/),o=i.length-1,g.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(g.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==b)return a=r[n],!1;{if(!g.isPlainObject(r[t])||e==o)return r[t]!==b?a=r[t]:p.error(c.method,i),!1;r=r[t]}}})),g.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 n?(m===b&&p.initialize(),p.invoke(t)):(m!==b&&p.destroy(),p.initialize()),s!==b?s:this},g.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:{}}},g.extend(g.expr[":"],{data:g.expr.createPseudo?g.expr.createPseudo(function(t){return function(e){return!!g.data(e,t)}}):function(e,t,n){return!!g.data(e,n[3])}})}(jQuery,window,document),function(oe,D,S,ae){"use strict";oe.isFunction=oe.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")(),oe.fn.calendar=function(h){var v,e=oe(this),b=e.selector||"",y=(new Date).getTime(),w=[],x=h,C="string"==typeof x,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,e,K=oe.isPlainObject(h)?oe.extend(!0,{},oe.fn.calendar.settings,h):oe.extend({},oe.fn.calendar.settings),X=K.className,t=K.namespace,i=K.selector,J=K.formatter,n=K.parser,Z=K.metadata,_=T[K.minTimeGap],s=K.error,o="."+t,a="module-"+t,r=oe(this),l=r.find(i.input),ee=r.find(i.popup),c=r.find(i.activator),u=this,f=r.data(a),m=!1,te=r.hasClass(X.inverted),p=!1,g=!1,ne={initialize:function(){ne.debug("Initializing calendar for",u,r),d=ne.get.isTouch(),ne.setup.config(),ne.setup.popup(),ne.setup.inline(),ne.setup.input(),ne.setup.date(),ne.create.calendar(),ne.bind.events(),ne.observeChanges(),ne.instantiate()},instantiate:function(){ne.verbose("Storing instance of calendar"),f=ne,r.data(a,f)},destroy:function(){ne.verbose("Destroying previous calendar for",u),r.removeData(a),ne.unbind.events(),ne.disconnect.classObserver()},setup:{config:function(){null!==ne.get.minDate()&&ne.set.minDate(r.data(Z.minDate)),null!==ne.get.maxDate()&&ne.set.maxDate(r.data(Z.maxDate)),ne.setting("type",ne.get.type()),ne.setting("on",K.on||(l.length?"focus":"click"))},popup:function(){var e,t,n;K.inline||(c.length||(c=r.children().first()).length)&&(oe.fn.popup===ae?ne.error(s.popup):(ee.length||(e=0!==(t=c.parent()).closest(i.append).length?"appendTo":"prependTo",ee=oe("<div/>").addClass(X.popup)[e](t)),ee.addClass(X.calendar),te&&ee.addClass(X.inverted),e=function(){return ne.refreshTooltips(),K.onVisible.apply(ee,arguments)},t=K.onHidden,l.length||(ee.attr("tabindex","0"),e=function(){return ne.refreshTooltips(),ne.focus(),K.onVisible.apply(ee,arguments)},t=function(){return ne.blur(),K.onHidden.apply(ee,arguments)}),n=ne.setting("on"),n=oe.extend({},K.popupOptions,{popup:ee,on:n,hoverable:"hover"===n,closable:"click"===n,onShow:function(){return ne.set.focusDate(ne.get.date()),ne.set.mode(ne.get.validatedMode(K.startMode)),K.onShow.apply(ee,arguments)},onVisible:e,onHide:K.onHide,onHidden:t}),ne.popup(n)))},inline:function(){c.length&&!K.inline||(K.inline=!0,ee=oe("<div/>").addClass(X.calendar).appendTo(r),l.length||ee.attr("tabindex","0"))},input:function(){K.touchReadonly&&l.length&&d&&l.prop("readonly",!0),ne.check.disabled()},date:function(){var e;K.initialDate?e=n.date(K.initialDate,K):r.data(Z.date)!==ae?e=n.date(r.data(Z.date),K):l.length&&(e=n.date(l.val(),K)),ne.set.date(e,K.formatInput,!1),ne.set.mode(ne.get.mode(),!1)}},trigger:{change:function(){var e,t=l[0];t&&(e=S.createEvent("HTMLEvents"),ne.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{calendar:function(){var e,t,q,n=ne.get.mode(),i=new Date,j=ne.get.date(),o=ne.get.focusDate(),a=ne.helper.dateInRange(o||j||K.initialDate||i),r=(o||ne.set.focusDate(o=a,!1,!1),"year"===n),s="month"===n,l="day"===n,c="hour"===n,u="minute"===n,N="time"===K.type,H=Math.max(K.multiMonth,1),V=l?ne.get.monthOffset():0,d=a.getMinutes(),f=a.getHours(),m=a.getDate(),z=a.getMonth()+V,p=a.getFullYear(),g=l?K.showWeekNumbers?8:7:c?4:_.column,U=l||c?6:_.row,h=l?H:1,W=(v=ee).hasClass("left")?"right center":"left center";for(v.empty(),1<h&&(q=oe("<div/>").addClass(X.grid).appendTo(v)),t=0;t<h;t++){1<h&&(v=oe("<div/>").addClass(X.column).appendTo(q));var v,b=z+t,B=(new Date(p,b,1).getDay()-K.firstDayOfWeek%7+7)%7,y=(!K.constantHeight&&l&&(y=new Date(p,b+1,0).getDate()+B,U=Math.ceil(y/7)),r?10:s?1:0),w=l?1:0,x=c||u?1:0,C=c||u?m:1,k=new Date(p-y,b-w,C-x,f),w=new Date(p+y,b+w,C+x,f),C=r?new Date(10*Math.ceil(p/10)-9,0,0):s?new Date(p,0,0):l?new Date(p,b,0):new Date(p,b,m,-1),x=r?new Date(10*Math.ceil(p/10)+1,0,1):s?new Date(p+1,0,1):l?new Date(p,b+1,1):new Date(p,b,m+1),T=n,T=(l&&K.showWeekNumbers&&(T+=" andweek"),oe("<table/>").addClass(X.table).addClass(T).addClass(ie[g]+" column").appendTo(v)),D=(te&&T.addClass(X.inverted),g);if(!N){var Y=oe("<thead/>").appendTo(T),S=oe("<tr/>").appendTo(Y),A=oe("<th/>").attr("colspan",""+g).appendTo(S),E=r||s?new Date(p,0,1):l?new Date(p,b,1):new Date(p,b,m,f,d),F=oe("<span/>").addClass(X.link).appendTo(A),E=(F.text(J.header(E,n,K)),s?K.disableYear?"day":"year":l?K.disableMonth?"year":"month":"day");if(F.data(Z.mode,E),0===t&&((F=oe("<span/>").addClass(X.prev).appendTo(A)).data(Z.focusDate,k),F.toggleClass(X.disabledCell,!ne.helper.isDateInRange(C,n)),oe("<i/>").addClass(X.prevIcon).appendTo(F)),t===h-1&&((E=oe("<span/>").addClass(X.next).appendTo(A)).data(Z.focusDate,w),E.toggleClass(X.disabledCell,!ne.helper.isDateInRange(x,n)),oe("<i/>").addClass(X.nextIcon).appendTo(E)),l)for(S=oe("<tr/>").appendTo(Y),K.showWeekNumbers&&((A=oe("<th/>").appendTo(S)).text(K.text.weekNo),A.addClass(X.weekCell),D--),O=0;O<D;O++)(A=oe("<th/>").appendTo(S)).text(J.dayColumnHeader((O+K.firstDayOfWeek)%7,K))}for(var $=oe("<tbody/>").appendTo(T),O=r?10*Math.ceil(p/10)-9:l?1-B:0,Q=0;Q<U;Q++)for(S=oe("<tr/>").appendTo($),l&&K.showWeekNumbers&&((A=oe("<th/>").appendTo(S)).text(ne.get.weekOfYear(p,b,O+1-K.firstDayOfWeek)),A.addClass(X.weekCell)),e=0;e<D;e++,O++){var M,P=r?new Date(O,b,1,f,d):s?new Date(p,O,1,f,d):l?new Date(p,b,O,f,d):c?new Date(p,b,m,O):new Date(p,b,m,f,O*K.minTimeGap),R=r?O:s?K.text.monthsShort[O]:l?P.getDate():J.time(P,K,!0),R=((A=oe("<td/>").addClass(X.cell).appendTo(S)).text(R),A.data(Z.date,P),l&&P.getMonth()!==(b+12)%12),I=!K.selectAdjacentDays&&R||!ne.helper.isDateInRange(P,n)||K.isDisabled(P,n)||ne.helper.isDisabled(P,n)||!ne.helper.isEnabled(P,n),L=(I?null!==(L=ne.helper.findDayAsObject(P,n,K.disabledDates))&&L[Z.message]&&(A.attr("data-tooltip",L[Z.message]),A.attr("data-position",L[Z.position]||W),(L[Z.inverted]||te&&L[Z.inverted]===ae)&&A.attr("data-inverted",""),L[Z.variation]&&A.attr("data-variation",L[Z.variation])):null!==(M=ne.helper.findDayAsObject(P,n,K.eventDates))&&(A.addClass(M[Z.class]||K.eventClass),M[Z.message]&&(A.attr("data-tooltip",M[Z.message]),A.attr("data-position",M[Z.position]||W),(M[Z.inverted]||te&&M[Z.inverted]===ae)&&A.attr("data-inverted",""),M[Z.variation]&&A.attr("data-variation",M[Z.variation]))),ne.helper.dateEqual(P,j,n)),G=ne.helper.dateEqual(P,i,n),R=(A.toggleClass(X.adjacentCell,R&&!M),A.toggleClass(X.disabledCell,I),A.toggleClass(X.activeCell,L&&!(R&&I)),c||u||A.toggleClass(X.todayCell,!R&&G),{mode:n,adjacent:R,disabled:I,active:L,today:G});J.cell(A,P,R),ne.helper.dateEqual(P,o,n)&&ne.set.focusDate(P,!1,!1)}K.today&&(k=oe("<tr/>").appendTo($),(C=oe("<td/>").attr("colspan",""+g).addClass(X.today).appendTo(k)).text(J.today(K)),C.data(Z.date,i)),ne.update.focus(!1,T),K.inline&&ne.refreshTooltips()}}},update:{focus:function(e,t){t=t||ee;var r=ne.get.mode(),n=ne.get.date(),s=ne.get.focusDate(),l=ne.get.startDate(),c=ne.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(X.disabledCell),t=o.hasClass(X.activeCell),n=o.hasClass(X.adjacentCell),i=ne.helper.dateEqual(a,s,r),a=!!u&&(!!l&&ne.helper.isDateInRange(a,r,l,u)||!!c&&ne.helper.isDateInRange(a,r,u,c)),o.toggleClass(X.focusCell,i&&(!d||m)&&(!n||K.selectAdjacentDays&&n)&&!e),ne.helper.isTodayButton(o)||o.toggleClass(X.rangeCell,a&&!t&&!e))})}},refresh:function(){ne.create.calendar()},refreshTooltips:function(){var i=oe(D).width();ee.find("td[data-position]").each(function(){var e=oe(this),t=D.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(){ne.debug("Binding events"),ee.on("mousedown"+o,ne.event.mousedown),ee.on("touchstart"+o,ne.event.mousedown),ee.on("mouseup"+o,ne.event.mouseup),ee.on("touchend"+o,ne.event.mouseup),ee.on("mouseover"+o,ne.event.mouseover),l.length?(l.on("input"+o,ne.event.inputChange),l.on("focus"+o,ne.event.inputFocus),l.on("blur"+o,ne.event.inputBlur),l.on("keydown"+o,ne.event.keydown)):ee.on("keydown"+o,ne.event.keydown)}},unbind:{events:function(){ne.debug("Unbinding events"),ee.off(o),l.length&&l.off(o)}},event:{mouseover:function(e){var t=oe(e.target).data(Z.date),e=1===e.buttons;t&&ne.set.focusDate(t,!1,!0,e)},mousedown:function(e){l.length&&e.preventDefault(),m=0<=e.type.indexOf("touch");e=oe(e.target).data(Z.date);e&&ne.set.focusDate(e,!1,!0,!0)},mouseup:function(e){ne.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!==K.onSelect.call(u,t,ne.get.mode())?(e=e.hasClass(X.today),ne.selectDate(t,e)):n?ne.set.focusDate(n):i&&ne.set.mode(i))},keydown:function(e){var t,n,i,o,a,r,s,l=e.which;27!==l&&9!==l||ne.popup("hide"),ne.popup("is visible")&&(37===l||38===l||39===l||40===l?(o="day"===(r=ne.get.mode())?7:"hour"===r?4:"minute"===r?_.column:3,o=37===l?-1:38===l?-o:39==l?1:o,o*="minute"===r?K.minTimeGap:1,a=(t=ne.get.focusDate()||ne.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"===K.type&&(a=ne.helper.mergeDateTime(t,a)),ne.helper.isDateInRange(a,r)&&ne.set.focusDate(a)):13===l&&(r=ne.get.mode(),(s=ne.get.focusDate())&&!K.isDisabled(s,r)&&!ne.helper.isDisabled(s,r)&&ne.helper.isEnabled(s,r)&&ne.selectDate(s),e.preventDefault(),e.stopPropagation())),38!==l&&40!==l||(e.preventDefault(),ne.popup("show"))},inputChange:function(){var e=l.val(),e=n.date(e,K);ne.set.date(e,!1)},inputFocus:function(){ee.addClass(X.active)},inputBlur:function(){var e;ee.removeClass(X.active),K.formatInput&&(e=ne.get.date(),e=J.datetime(e,K),l.val(e)),g&&(ne.trigger.change(),g=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ne.check.disabled()})}}},observeChanges:function(){"MutationObserver"in D&&(e=new MutationObserver(ne.event.class.mutation),ne.debug("Setting up mutation observer",e),ne.observe.class())},disconnect:{classObserver:function(){l.length&&e&&e.disconnect()}},observe:{class:function(){l.length&&e&&e.observe(r[0],{attributes:!0})}},is:{disabled:function(){return r.hasClass(X.disabled)}},check:{disabled:function(){l.attr("tabindex",ne.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 ne.helper.sanitiseDate(r.data(Z.date))||null},inputDate:function(){return l.val()},focusDate:function(){return r.data(Z.focusDate)||null},startDate:function(){var e=ne.get.calendarModule(K.startCalendar);return(e?e.get.date():r.data(Z.startDate))||null},endDate:function(){var e=ne.get.calendarModule(K.endCalendar);return(e?e.get.date():r.data(Z.endDate))||null},minDate:function(){return r.data(Z.minDate)||null},maxDate:function(){return r.data(Z.maxDate)||null},monthOffset:function(){return r.data(Z.monthOffset)||0},mode:function(){var e=r.data(Z.mode)||K.startMode;return ne.get.validatedMode(e)},validatedMode:function(e){var t=ne.get.validModes();return 0<=oe.inArray(e,t)?e:"time"===K.type?"hour":"month"===K.type?"month":"year"===K.type?"year":"day"},type:function(){return r.data(Z.type)||K.type},validModes:function(){var e=[];return"time"!==K.type&&(K.disableYear&&"year"!==K.type||e.push("year"),(K.disableMonth||"year"===K.type)&&"month"!==K.type||e.push("month"),0<=K.type.indexOf("date")&&e.push("day")),0<=K.type.indexOf("time")&&(e.push("hour"),K.disableMinute||e.push("minute")),e},isTouch:function(){try{return S.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e=e instanceof oe?e:oe(e).first()).data(a):null}},set:{date:function(e,t,n){t=!1!==t,n=!1!==n,e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var i=ne.get.mode(),o=J.datetime(e,K);if(n&&!1===K.onBeforeChange.call(u,e,o,i))return!1;if(ne.set.focusDate(e),K.isDisabled(e,i))return!1;var a=ne.get.endDate();a&&e&&a<e&&ne.set.endDate(ae),ne.set.dataKeyValue(Z.date,e),t&&l.length&&l.val(o),n&&K.onChange.call(u,e,o,i)},startDate:function(e,t){e=ne.helper.sanitiseDate(e);var n=ne.get.calendarModule(K.startCalendar);n&&n.set.date(e),ne.set.dataKeyValue(Z.startDate,e,t)},endDate:function(e,t){e=ne.helper.sanitiseDate(e);var n=ne.get.calendarModule(K.endCalendar);n&&n.set.date(e),ne.set.dataKeyValue(Z.endDate,e,t)},focusDate:function(e,t,n,i){e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var o="day"===ne.get.mode(),a=ne.get.focusDate(),o=(o&&e&&a&&((o=12*(e.getFullYear()-a.getFullYear())+e.getMonth()-a.getMonth())&&(a=ne.get.monthOffset()-o,ne.set.monthOffset(a,!1))),ne.set.dataKeyValue(Z.focusDate,e,!!e&&t));n=!1!==n&&o&&!1===t||p!=i,p=i,n&&ne.update.focus(i)},minDate:function(e){e=ne.helper.sanitiseDate(e),null!==K.maxDate&&K.maxDate<=e?ne.verbose("Unable to set minDate variable bigger that maxDate variable",e,K.maxDate):(ne.setting("minDate",e),ne.set.dataKeyValue(Z.minDate,e))},maxDate:function(e){e=ne.helper.sanitiseDate(e),null!==K.minDate&&K.minDate>=e?ne.verbose("Unable to set maxDate variable lower that minDate variable",e,K.minDate):(ne.setting("maxDate",e),ne.set.dataKeyValue(Z.maxDate,e))},monthOffset:function(e,t){var n=Math.max(K.multiMonth,1);e=Math.max(1-n,Math.min(0,e)),ne.set.dataKeyValue(Z.monthOffset,e,t)},mode:function(e,t){ne.set.dataKeyValue(Z.mode,e,t)},dataKeyValue:function(e,t,n){var i=r.data(e),i=i===t||i<=t&&t<=i;return t?r.data(e,t):r.removeData(e),(n=!1!==n&&!i)&&ne.refresh(),!i}},selectDate:function(e,t){ne.verbose("New date selection",e);var n=ne.get.mode();t||"minute"===n||K.disableMinute&&"hour"===n||"date"===K.type&&"day"===n||"month"===K.type&&"month"===n||"year"===K.type&&"year"===n?!1!==ne.set.date(e)&&(g=!0,K.closable&&(ne.popup("hide"),(t=ne.get.calendarModule(K.endCalendar))&&("focus"!==t.setting("on")&&t.popup("show"),t.focus()))):(t="year"===n?K.disableMonth?"day":"month":"month"===n?"day":"day"===n?"hour":"minute",ne.set.mode(t),"hour"===n||"day"===n&&ne.get.date()?ne.set.date(e,!0,!1):ne.set.focusDate(e))},changeDate:function(e){ne.set.date(e)},clear:function(){ne.set.date(ae)},popup:function(){return c.popup.apply(c,arguments)},focus:function(){(l.length?l:ee).focus()},blur:function(){(l.length?l:ee).blur()},helper:{isDisabled:function(n,i){return("day"===i||"month"===i||"year"===i)&&("day"===i&&-1!==K.disabledDaysOfWeek.indexOf(n.getDay())||K.disabledDates.some(function(e){return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?ne.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=ne.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?ne.helper.dateEqual(n,ne.helper.sanitiseDate(e[Z.date]),i):Array.isArray(e[Z.date])?e[Z.date].some(function(e){return ne.helper.dateEqual(n,e,i)}):void 0:void 0:void 0;var t}))},isEnabled:function(t,n){return"day"!==n||(0===K.enabledDates.length||K.enabledDates.some(function(e){return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?ne.helper.dateEqual(t,e,n):null!==e&&"object"==typeof e&&e[Z.date]?ne.helper.dateEqual(t,ne.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])?ne.helper.sanitiseDate(i):i)instanceof Date&&ne.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=ne.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&&ne.helper.dateEqual(t,ne.helper.sanitiseDate(i[Z.date]),n))return i;if(Array.isArray(i[Z.date])&&i[Z.date].some(function(e){return ne.helper.dateEqual(t,e,n)}))return i}}return null},sanitiseDate:function(e){return!(e=e instanceof Date?e:n.date(""+e,K))||isNaN(e.getTime())?null:e},dateDiff:function(e,t,n){var i="time"===K.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?K.minTimeGap*Math.floor(e.getMinutes()/K.minTimeGap):0),(t=new Date(i?2e3:t.getFullYear(),i||o?0:t.getMonth(),i||a?1:t.getDate(),n?t.getHours():0,r?K.minTimeGap*Math.floor(t.getMinutes()/K.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,n){return!!e&&!!t&&0===ne.helper.dateDiff(e,t,n)},isDateInRange:function(e,t,n,i){var o;return n||i||(n=(o=ne.get.startDate())&&K.minDate?new Date(Math.max(o,K.minDate)):o||K.minDate,i=K.maxDate),n=n&&new Date(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),K.minTimeGap*Math.ceil(n.getMinutes()/K.minTimeGap)),!(!e||n&&0<ne.helper.dateDiff(e,n,t)||i&&0<ne.helper.dateDiff(i,e,t))},dateInRange:function(e,t,n){t||n||(t=(i=ne.get.startDate())&&K.minDate?new Date(Math.max(i,K.minDate)):i||K.minDate,n=K.maxDate),t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),K.minTimeGap*Math.ceil(t.getMinutes()/K.minTimeGap));var i="time"===K.type;return e&&(t&&0<ne.helper.dateDiff(e,t,"minute")?i?ne.helper.mergeDateTime(e,t):t:n&&0<ne.helper.dateDiff(n,e,"minute")?i?ne.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()===K.text.today}},setting:function(e,t){if(ne.debug("Changing setting",e,t),oe.isPlainObject(e))oe.extend(!0,K,e);else{if(t===ae)return K[e];oe.isPlainObject(K[e])?oe.extend(!0,K[e],t):K[e]=t}},internal:function(e,t){if(oe.isPlainObject(e))oe.extend(!0,ne,e);else{if(t===ae)return ne[e];ne[e]=t}},debug:function(){!K.silent&&K.debug&&(K.performance?ne.performance.log(arguments):(ne.debug=Function.prototype.bind.call(console.info,console,K.name+":"),ne.debug.apply(console,arguments)))},verbose:function(){!K.silent&&K.verbose&&K.debug&&(K.performance?ne.performance.log(arguments):(ne.verbose=Function.prototype.bind.call(console.info,console,K.name+":"),ne.verbose.apply(console,arguments)))},error:function(){K.silent||(ne.error=Function.prototype.bind.call(console.error,console,K.name+":"),ne.error.apply(console,arguments))},performance:{log:function(e){var t,n;K.performance&&(n=(t=(new Date).getTime())-(y||t),y=t,w.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":n})),clearTimeout(ne.performance.timer),ne.performance.timer=setTimeout(ne.performance.display,500)},display:function(){var e=K.name+":",n=0;y=!1,clearTimeout(ne.performance.timer),oe.each(w,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),(console.group!==ae||console.table!==ae)&&0<w.length&&(console.groupCollapsed(e),console.table?console.table(w):oe.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=f;return e=e||k,t=u||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]:ne.error(s.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}};C?(f===ae&&ne.initialize(),ne.invoke(x)):(f!==ae&&f.invoke("destroy"),ne.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,a=new Date(e);if(!(null!==e.match(/^[0-9]+$/))&&!isNaN(a.getDate()))return a;e=e.toLowerCase();var r,s,l,c=-1,u=-1,d=-1,f=-1,m=-1,a=ae,p="time"===t.type,g=t.type.indexOf("time")<0,h=e.split(t.regExp.dateWords),v=e.split(t.regExp.dateNumbers);if(!g)for(a=0<=oe.inArray(t.text.am.toLowerCase(),h)||!(0<=oe.inArray(t.text.pm.toLowerCase(),h))&&ae,n=0;n<v.length;n++)if(0<=(s=v[n]).indexOf(":")){if(u<0||c<0)for(l=s.split(":"),o=0;o<Math.min(2,l.length);o++)i=parseInt(l[o]),isNaN(i)&&(i=0),0===o?u=i%24:c=i%60;v.splice(n,1)}if(!p){for(n=0;n<h.length;n++)if(!((r=h[n]).length<=0)){for(i=0;i<t.text.months.length;i++)if(t.text.months[i].substring(0,r.length).toLowerCase()===r){f=i+1;break}if(0<=f)break}for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&i>=t.centuryBreak&&n===v.length-1){i<=99&&(i+=t.currentCentury-100),m=i,v.splice(n,1);break}if(f<0)for(n=0;n<v.length;n++)if(o=1<n||t.monthFirst?n:1===n?0:1,i=parseInt(v[o]),!isNaN(i)&&1<=i&&i<=12){f=i,v.splice(o,1);break}for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&1<=i&&i<=31){d=i,v.splice(n,1);break}if(m<0)for(n=v.length-1;0<=n;n--)if(i=parseInt(v[n]),!isNaN(i)){i<=99&&(i+=t.currentCentury),m=i,v.splice(n,1);break}}if(!g){if(u<0)for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&0<=i&&i<=23){u=i,v.splice(n,1);break}if(c<0)for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&0<=i&&i<=59){c=i,v.splice(n,1);break}}if(c<0&&u<0&&d<0&&f<0&&m<0)return null;c<0&&(c=0),u<0&&(u=0),d<0&&(d=1),f<0&&(f=1),m<0&&(m=(new Date).getFullYear()),a!==ae&&(a?12===u&&(u=0):u<12&&(u+=12));e=new Date(m,f-1,d,u,c);return e.getMonth()===f-1&&e.getFullYear()===m||(e=new Date(m,f,0,u,c)),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(D,S,A,E){"use strict";D.isFunction=D.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")(),D.fn.checkbox=function(u){var d,e=D(this),f=e.selector||"",w=(new Date).getTime(),x=[],C=u,k="string"==typeof C,T=[].slice.call(arguments,1);return e.each(function(){var e,m=D.extend(!0,{},D.fn.checkbox.settings,u),t=m.className,n=m.namespace,p=m.selector,s=m.error,i="."+n,o="module-"+n,g=D(this),a=D(this).children(p.label),h=D(this).children(p.input),v=h[0],r=!1,b=!1,l=g.data(o),c=this,y={initialize:function(){y.verbose("Initializing checkbox",m),y.create.label(),y.bind.events(),y.set.tabbable(),y.hide.input(),y.observeChanges(),y.instantiate(),y.setup()},instantiate:function(){y.verbose("Storing instance of module",y),l=y,g.data(o,y)},destroy:function(){y.verbose("Destroying module"),y.unbind.events(),y.show.input(),g.removeData(o)},fix:{reference:function(){g.is(p.input)&&(y.debug("Behavior called on <input> adjusting invoked element"),g=g.closest(p.checkbox),y.refresh())}},setup:function(){y.set.initialLoad(),y.is.indeterminate()?(y.debug("Initial value is indeterminate"),y.indeterminate()):y.is.checked()?(y.debug("Initial value is checked"),y.check()):(y.debug("Initial value is unchecked"),y.uncheck()),y.remove.initialLoad()},refresh:function(){a=g.children(p.label),h=g.children(p.input),v=h[0]},hide:{input:function(){y.verbose("Modifying <input> z-index to be unselectable"),h.addClass(t.hidden)}},show:{input:function(){y.verbose("Modifying <input> z-index to be selectable"),h.removeClass(t.hidden)}},observeChanges:function(){"MutationObserver"in S&&((e=new MutationObserver(function(e){y.debug("DOM tree modified, updating selector cache"),y.refresh()})).observe(c,{childList:!0,subtree:!0}),y.debug("Setting up mutation observer",e))},attachEvents:function(e,t){var n=D(e);t=D.isFunction(y[t])?y[t]:y.toggle,0<n.length?(y.debug("Attaching checkbox events to element",e,t),n.on("click"+i,t)):y.error(s.notFound)},preventDefaultOnInputTarget:function(){"undefined"!=typeof event&&null!==event&&D(event.target).is(p.input)&&(y.verbose("Preventing default check action after manual check action"),event.preventDefault())},event:{change:function(e){y.should.ignoreCallbacks()||m.onChange.call(v)},click:function(e){var t=D(e.target);t.is(p.input)?y.verbose("Using default check action on initialized checkbox"):t.is(p.link)?y.debug("Clicking link inside checkbox, skipping toggle"):(y.toggle(),h.focus(),e.preventDefault())},keydown:function(e){var t=e.which,n=13,i=32,o=27,a=37,r=38,s=39,l=40,c=y.get.radios(),u=c.index(g),d=c.length,f=!1;if(t==a||t==r?f=(0===u?d:u)-1:t!=s&&t!=l||(f=u===d-1?0:u+1),!y.should.ignoreCallbacks()&&!1!==f){if(!1===m.beforeUnchecked.apply(v))return y.verbose("Option not allowed to be unchecked, cancelling key navigation"),!1;if(!1===m.beforeChecked.apply(D(c[f]).children(p.input)[0]))return y.verbose("Next option should not allow check, cancelling key navigation"),!1}b=t==o?(y.verbose("Escape key pressed blurring field"),h.blur(),!0):!(e.ctrlKey||!(t==i||t==n&&m.enableEnterKey))&&(y.verbose("Enter/space key pressed, toggling checkbox"),y.toggle(),!0)},keyup:function(e){b&&e.preventDefault()}},check:function(){y.should.allowCheck()&&(y.debug("Checking checkbox",h),y.set.checked(),y.should.ignoreCallbacks()||(m.onChecked.call(v),y.trigger.change()),y.preventDefaultOnInputTarget())},uncheck:function(){y.should.allowUncheck()&&(y.debug("Unchecking checkbox"),y.set.unchecked(),y.should.ignoreCallbacks()||(m.onUnchecked.call(v),y.trigger.change()),y.preventDefaultOnInputTarget())},indeterminate:function(){y.should.allowIndeterminate()?y.debug("Checkbox is already indeterminate"):(y.debug("Making checkbox indeterminate"),y.set.indeterminate(),y.should.ignoreCallbacks()||(m.onIndeterminate.call(v),y.trigger.change()))},determinate:function(){y.should.allowDeterminate()?y.debug("Checkbox is already determinate"):(y.debug("Making checkbox determinate"),y.set.determinate(),y.should.ignoreCallbacks()||(m.onDeterminate.call(v),y.trigger.change()))},enable:function(){y.is.enabled()?y.debug("Checkbox is already enabled"):(y.debug("Enabling checkbox"),y.set.enabled(),y.should.ignoreCallbacks()||(m.onEnable.call(v),m.onEnabled.call(v),y.trigger.change()))},disable:function(){y.is.disabled()?y.debug("Checkbox is already disabled"):(y.debug("Disabling checkbox"),y.set.disabled(),y.should.ignoreCallbacks()||(m.onDisable.call(v),m.onDisabled.call(v),y.trigger.change()))},get:{radios:function(){var e=y.get.name();return D('input[name="'+e+'"]').closest(p.checkbox)},otherRadios:function(){return y.get.radios().not(g)},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!y.is.disabled()},determinate:function(){return!y.is.indeterminate()},unchecked:function(){return!y.is.checked()}},should:{allowCheck:function(){return y.is.determinate()&&y.is.checked()&&!y.is.initialLoad()?(y.debug("Should not allow check, checkbox is already checked"),!1):!(!y.should.ignoreCallbacks()&&!1===m.beforeChecked.apply(v))||(y.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return y.is.determinate()&&y.is.unchecked()&&!y.is.initialLoad()?(y.debug("Should not allow uncheck, checkbox is already unchecked"),!1):!(!y.should.ignoreCallbacks()&&!1===m.beforeUnchecked.apply(v))||(y.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return y.is.indeterminate()&&!y.is.initialLoad()?(y.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):!(!y.should.ignoreCallbacks()&&!1===m.beforeIndeterminate.apply(v))||(y.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return y.is.determinate()&&!y.is.initialLoad()?(y.debug("Should not allow determinate, checkbox is already determinate"),!1):!(!y.should.ignoreCallbacks()&&!1===m.beforeDeterminate.apply(v))||(y.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},ignoreCallbacks:function(){return r&&!m.fireOnInit}},can:{change:function(){return!(g.hasClass(t.disabled)||g.hasClass(t.readOnly)||h.prop("disabled")||h.prop("readonly"))},uncheck:function(){return"boolean"==typeof m.uncheckable?m.uncheckable:!y.is.radio()}},set:{initialLoad:function(){r=!0},checked:function(){y.verbose("Setting class to checked"),g.removeClass(t.indeterminate).addClass(t.checked),y.is.radio()&&y.uncheckOthers(),!y.is.indeterminate()&&y.is.checked()?y.debug("Input is already checked, skipping input property change"):(y.verbose("Setting state to checked",v),h.prop("indeterminate",!1).prop("checked",!0))},unchecked:function(){y.verbose("Removing checked class"),g.removeClass(t.indeterminate).removeClass(t.checked),!y.is.indeterminate()&&y.is.unchecked()?y.debug("Input is already unchecked"):(y.debug("Setting state to unchecked"),h.prop("indeterminate",!1).prop("checked",!1))},indeterminate:function(){y.verbose("Setting class to indeterminate"),g.addClass(t.indeterminate),y.is.indeterminate()?y.debug("Input is already indeterminate, skipping input property change"):(y.debug("Setting state to indeterminate"),h.prop("indeterminate",!0))},determinate:function(){y.verbose("Removing indeterminate class"),g.removeClass(t.indeterminate),y.is.determinate()?y.debug("Input is already determinate, skipping input property change"):(y.debug("Setting state to determinate"),h.prop("indeterminate",!1))},disabled:function(){y.verbose("Setting class to disabled"),g.addClass(t.disabled),y.is.disabled()?y.debug("Input is already disabled, skipping input property change"):(y.debug("Setting state to disabled"),h.prop("disabled","disabled"))},enabled:function(){y.verbose("Removing disabled class"),g.removeClass(t.disabled),y.is.enabled()?y.debug("Input is already enabled, skipping input property change"):(y.debug("Setting state to enabled"),h.prop("disabled",!1))},tabbable:function(){y.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"),y.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{label:function(){0<h.prevAll(p.label).length?(h.prev(p.label).detach().insertAfter(h),y.debug("Moving existing label",a)):y.has.label()||(a=D("<label>").insertAfter(h),y.debug("Creating label",a))}},has:{label:function(){return 0<a.length}},bind:{events:function(){y.verbose("Attaching checkbox events"),g.on("click"+i,y.event.click).on("change"+i,y.event.change).on("keydown"+i,p.input,y.event.keydown).on("keyup"+i,p.input,y.event.keyup)}},unbind:{events:function(){y.debug("Removing events"),g.off(i)}},uncheckOthers:function(){var e=y.get.otherRadios();y.debug("Unchecking other radios",e),e.removeClass(t.checked)},toggle:function(){y.can.change()?y.is.indeterminate()||y.is.unchecked()?(y.debug("Currently unchecked"),y.check()):y.is.checked()&&y.can.uncheck()&&(y.debug("Currently checked"),y.uncheck()):y.is.radio()||y.debug("Checkbox is read-only or disabled, ignoring toggle")},setting:function(e,t){if(y.debug("Changing setting",e,t),D.isPlainObject(e))D.extend(!0,m,e);else{if(t===E)return m[e];D.isPlainObject(m[e])?D.extend(!0,m[e],t):m[e]=t}},internal:function(e,t){if(D.isPlainObject(e))D.extend(!0,y,e);else{if(t===E)return y[e];y[e]=t}},debug:function(){!m.silent&&m.debug&&(m.performance?y.performance.log(arguments):(y.debug=Function.prototype.bind.call(console.info,console,m.name+":"),y.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?y.performance.log(arguments):(y.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),y.verbose.apply(console,arguments)))},error:function(){m.silent||(y.error=Function.prototype.bind.call(console.error,console,m.name+":"),y.error.apply(console,arguments))},performance:{log:function(e){var t,n;m.performance&&(n=(t=(new Date).getTime())-(w||t),w=t,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:c,"Execution Time":n})),clearTimeout(y.performance.timer),y.performance.timer=setTimeout(y.performance.display,500)},display:function(){var e=m.name+":",n=0;w=!1,clearTimeout(y.performance.timer),D.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",f&&(e+=" '"+f+"'"),(console.group!==E||console.table!==E)&&0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):D.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||T,t=c||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]:y.error(s.method,i),!1;r=r[t]}}})),D.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?(l===E&&y.initialize(),y.invoke(C)):(l!==E&&l.invoke("destroy"),y.initialize())}),d!==E?d:this},D.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,D){"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(g){var h,v=k(this),b=(new Date).getTime(),y=[],w=g,x="string"==typeof w,C=[].slice.call(arguments,1);return v.each(function(){var o,t,a=k.isPlainObject(g)?k.extend(!0,{},k.fn.dimmer.settings,g):k.extend({},k.fn.dimmer.settings),n=a.selector,e=a.namespace,i=a.className,s=a.error,r="."+e,l="module-"+e,c=v.selector||"",u="ontouchstart"in T.documentElement?"touchstart":"click",d=k(this),f=this,m=d.data(l),p={preinitialize:function(){o=p.is.dimmer()?(t=d.parent(),d):(t=d,p.has.dimmer()?a.dimmerName?t.find(n.dimmer).filter("."+a.dimmerName):t.find(n.dimmer):p.create())},initialize:function(){p.debug("Initializing dimmer",a),p.bind.events(),p.set.dimmable(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),m=p,d.data(l,m)},destroy:function(){p.verbose("Destroying previous module",o),p.unbind.events(),p.remove.variation(),t.off(r)},bind:{events:function(){"hover"==a.on?t.on("mouseenter"+r,p.show).on("mouseleave"+r,p.hide):"click"==a.on&&t.on(u+r,p.toggle),p.is.page()&&(p.debug("Setting as a page dimmer",t),p.set.pageDimmer()),p.is.closable()&&(p.verbose("Adding dimmer close event",o),t.on(u+r,n.dimmer,p.event.click))}},unbind:{events:function(){d.removeData(l),t.off(r)}},event:{click:function(e){p.verbose("Determining if event occurred on dimmer",e),0!==o.find(e.target).length&&!k(e.target).is(n.content)||(p.hide(),e.stopImmediatePropagation())}},addContent:function(e){e=k(e);p.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&&(p.debug("Creating named dimmer",a.dimmerName),e.addClass(a.dimmerName)),e.appendTo(t),e},show:function(e){e=k.isFunction(e)?e:function(){},p.debug("Showing dimmer",o,a),p.set.variation(),p.is.dimmed()&&!p.is.animating()||!p.is.enabled()?p.debug("Dimmer is already shown or disabled"):(p.animate.show(e),a.onShow.call(f),a.onChange.call(f))},hide:function(e){e=k.isFunction(e)?e:function(){},p.is.dimmed()||p.is.animating()?(p.debug("Hiding dimmer",o),p.animate.hide(e),a.onHide.call(f),a.onChange.call(f)):p.debug("Dimmer is not visible")},toggle:function(){p.verbose("Toggling dimmer visibility",o),p.is.dimmed()?p.is.closable()&&p.hide():p.show()},animate:{show:function(e){e=k.isFunction(e)?e:function(){},a.useCSS&&k.fn.transition!==D&&o.transition("is supported")?(a.useFlex?(p.debug("Using flex dimmer"),p.remove.legacy()):(p.debug("Using legacy non-flex dimmer"),p.set.legacy()),"auto"!==a.opacity&&p.set.opacity(),o.transition({displayType:a.useFlex?"flex":"block",animation:(a.transition.showMethod||a.transition)+" in",queue:!1,duration:p.get.duration(),useFailSafe:!0,onStart:function(){p.set.dimmed()},onComplete:function(){p.set.active(),e()}})):(p.verbose("Showing dimmer animation with javascript"),p.set.dimmed(),"auto"==a.opacity&&(a.opacity=.8),o.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(p.get.duration(),a.opacity,function(){o.removeAttr("style"),p.set.active(),e()}))},hide:function(e){e=k.isFunction(e)?e:function(){},a.useCSS&&k.fn.transition!==D&&o.transition("is supported")?(p.verbose("Hiding dimmer with css"),o.transition({displayType:a.useFlex?"flex":"block",animation:(a.transition.hideMethod||a.transition)+" out",queue:!1,duration:p.get.duration(),useFailSafe:!0,onComplete:function(){p.remove.dimmed(),p.remove.variation(),p.remove.active(),e()}})):(p.verbose("Hiding dimmer with javascript"),o.stop().fadeOut(p.get.duration(),function(){p.remove.dimmed(),p.remove.active(),o.removeAttr("style"),e()}))}},get:{dimmer:function(){return o},duration:function(){return p.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<d.find(n.dimmer).filter("."+a.dimmerName).length:0<d.find(n.dimmer).length}},is:{active:function(){return o.hasClass(i.active)},animating:function(){return o.is(":animated")||o.hasClass(i.animating)},closable:function(){return"auto"==a.closable?"hover"!=a.on:a.closable},dimmer:function(){return d.hasClass(i.dimmer)},dimmable:function(){return d.hasClass(i.dimmable)},dimmed:function(){return t.hasClass(i.dimmed)},disabled:function(){return t.hasClass(i.disabled)},enabled:function(){return!p.is.disabled()},page:function(){return t.is("body")},pageDimmer:function(){return o.hasClass(i.pageDimmer)}},can:{show:function(){return!o.hasClass(i.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+")",p.debug("Setting opacity to",e),o.css("background-color",t)},legacy:function(){o.addClass(i.legacy)},active:function(){o.addClass(i.active)},dimmable:function(){t.addClass(i.dimmable)},dimmed:function(){t.addClass(i.dimmed)},pageDimmer:function(){o.addClass(i.pageDimmer)},disabled:function(){o.addClass(i.disabled)},variation:function(e){(e=e||a.variation)&&o.addClass(e)}},remove:{active:function(){o.removeClass(i.active)},legacy:function(){o.removeClass(i.legacy)},dimmed:function(){t.removeClass(i.dimmed)},disabled:function(){o.removeClass(i.disabled)},variation:function(e){(e=e||a.variation)&&o.removeClass(e)}},setting:function(e,t){if(p.debug("Changing setting",e,t),k.isPlainObject(e))k.extend(!0,a,e);else{if(t===D)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,p,e);else{if(t===D)return p[e];p[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,a.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),p.verbose.apply(console,arguments)))},error:function(){a.silent||(p.error=Function.prototype.bind.call(console.error,console,a.name+":"),p.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:f,"Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var e=a.name+":",n=0;b=!1,clearTimeout(p.performance.timer),k.each(y,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",c&&(e+=" '"+c+"'"),1<v.length&&(e+=" ("+v.length+")"),(console.group!==D||console.table!==D)&&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=m;return e=e||C,t=f||t,"string"==typeof i&&r!==D&&(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]!==D)return a=r[n],!1;{if(!k.isPlainObject(r[t])||e==o)return r[t]!==D?a=r[t]:p.error(s.method,i),!1;r=r[t]}}})),k.isFunction(a)?n=a.apply(t,e):a!==D&&(n=a),Array.isArray(h)?h.push(n):h!==D?h=[h,n]:n!==D&&(h=n),a}};p.preinitialize(),x?(m===D&&p.initialize(),p.invoke(w)):(m!==D&&m.invoke("destroy"),p.initialize())}),h!==D?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(W){var B,Y=te(this),$=te(ie),Q=Y.selector||"",G="ontouchstart"in ie.documentElement,K=G?"touchstart":"click",X=(new Date).getTime(),J=[],Z=W,_="string"==typeof Z,ee=[].slice.call(arguments,1);return Y.each(function(q){var d,e,t,n,i,o,a,r,s,f=te.isPlainObject(W)?te.extend(!0,{},te.fn.dropdown.settings,W):te.extend({},te.fn.dropdown.settings),m=f.className,p=f.message,l=f.fields,g=f.keys,h=f.metadata,j=f.namespace,c=f.regExp,v=f.selector,u=f.error,N=f.templates,b="."+j,y="module-"+j,w=te(this),x=te(f.context),C=w.find(v.text),k=w.find(v.search),T=w.find(v.sizer),D=w.find(v.input),H=w.find(v.icon),V=w.find(v.clearIcon),S=0<w.prev().find(v.text).length?w.prev().find(v.text):w.prev(),A=w.children(v.menu),E=A.find(v.item),F=f.hideDividers?E.parent().children(v.divider):te(),O=!1,z=!1,U=!1,M=!1,P=this,R=!1,I=w.data(y),L={initialize:function(){L.debug("Initializing dropdown",f),L.is.alreadySetup()?L.setup.reference():(f.ignoreDiacritics&&!String.prototype.normalize&&(f.ignoreDiacritics=!1,L.error(u.noNormalize,P)),L.setup.layout(),f.values&&(L.set.initialLoad(),L.change.values(f.values),L.remove.initialLoad()),L.refreshData(),L.save.defaults(),L.restore.selected(),L.create.id(),L.bind.events(),L.observeChanges(),L.instantiate())},instantiate:function(){L.verbose("Storing instance of dropdown",L),I=L,w.data(y,L)},destroy:function(){L.verbose("Destroying previous dropdown",w),L.remove.tabbable(),L.remove.active(),A.transition("stop all"),A.removeClass(m.visible).addClass(m.hidden),w.off(b).removeData(y),A.off(b),$.off(i),L.disconnect.menuObserver(),L.disconnect.selectObserver(),L.disconnect.classObserver()},observeChanges:function(){"MutationObserver"in ne&&(a=new MutationObserver(L.event.select.mutation),r=new MutationObserver(L.event.menu.mutation),s=new MutationObserver(L.event.class.mutation),L.debug("Setting up mutation observer",a,r,s),L.observe.select(),L.observe.menu(),L.observe.class())},disconnect:{menuObserver:function(){r&&r.disconnect()},selectObserver:function(){a&&a.disconnect()},classObserver:function(){s&&s.disconnect()}},observe:{select:function(){L.has.input()&&a&&a.observe(w[0],{childList:!0,subtree:!0})},menu:function(){L.has.menu()&&r&&r.observe(A[0],{childList:!0,subtree:!0})},class:function(){L.has.search()&&s&&s.observe(w[0],{attributes:!0})}},create:{id:function(){o=(Math.random().toString(16)+"000000000").substr(2,8),i="."+o,L.verbose("Creating unique id for element",o)},userChoice:function(e){var n,i;return!!(e=e||L.get.userValues())&&(e=Array.isArray(e)?e:[e],te.each(e,function(e,t){!1===L.get.item(t)&&(i=f.templates.addition(L.add.variables(p.addResult,t)),i=te("<div />").html(i).attr("data-"+h.value,t).attr("data-"+h.text,t).addClass(m.addition).addClass(m.item),f.hideAdditions&&i.addClass(m.hidden),n=n===oe?i:n.add(i),L.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=L.get.userValues();t&&(L.debug("Adding user labels",t),te.each(t,function(e,t){L.verbose("Adding custom user value"),L.add.label(t,t)}))},menu:function(){A=te("<div />").addClass(m.menu).appendTo(w)},sizer:function(){T=te("<span />").addClass(m.sizer).insertAfter(k)}},search:function(e){e=e!==oe?e:L.get.query(),L.verbose("Searching for query",e),!1===f.fireOnInit&&L.is.initialLoad()?L.verbose("Skipping callback on initial load",f.onSearch):L.has.minCharacters(e)&&!1!==f.onSearch.call(P,e)?L.filter(e):L.hide(null,!0)},select:{firstUnfiltered:function(){L.verbose("Selecting first non-filtered element"),L.remove.selectedItem(),E.not(v.unselectable).not(v.addition+v.hidden).eq(0).addClass(m.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(v.item).not(v.unselectable).eq(0),e=e.prevAll(v.item).not(v.unselectable).eq(0);0<t.length?(L.verbose("Moving selection to",t),t.addClass(m.selected)):(L.verbose("Moving selection to",e),e.addClass(m.selected))}},setup:{api:function(){var e={debug:f.debug,urlData:{value:L.get.value(),query:L.get.query()},on:!1};L.verbose("First request, initializing API"),w.api(e)},layout:function(){w.is("select")&&(L.setup.select(),L.setup.returnedObject()),L.has.menu()||L.create.menu(),L.is.clearable()&&!L.has.clearItem()&&(L.verbose("Adding clear icon"),V=te("<i />").addClass("remove icon").insertBefore(C)),L.is.search()&&!L.has.search()&&(L.verbose("Adding search input"),k=te("<input />").addClass(m.search).prop("autocomplete",L.is.chrome()?"fomantic-search":"off").insertBefore(C)),L.is.multiple()&&L.is.searchSelection()&&!L.has.sizer()&&L.create.sizer(),f.allowTab&&L.set.tabbable()},select:function(){var e=L.get.selectValues();L.debug("Dropdown initialized on a select",e),0<(D=w.is("select")?w:D).parent(v.dropdown).length?(L.debug("UI dropdown already exists. Creating dropdown menu only"),w=D.closest(v.dropdown),L.has.menu()||L.create.menu(),A=w.children(v.menu),L.setup.menu(e)):(L.debug("Creating entire dropdown from select"),w=te("<div />").attr("class",D.attr("class")).addClass(m.selection).addClass(m.dropdown).html(N.dropdown(e,l,f.preserveHTML,f.className)).insertBefore(D),D.hasClass(m.multiple)&&!1===D.prop("multiple")&&(L.error(u.missingMultiple),D.prop("multiple",!0)),D.is("[multiple]")&&L.set.multiple(),D.prop("disabled")&&(L.debug("Disabling dropdown"),w.addClass(m.disabled)),D.removeAttr("required").removeAttr("class").detach().prependTo(w)),L.refresh()},menu:function(e){A.html(N.menu(e,l,f.preserveHTML,f.className)),E=A.find(v.item),F=f.hideDividers?E.parent().children(v.divider):te()},reference:function(){L.debug("Dropdown behavior was called on select, replacing with closest dropdown"),w=w.parent(v.dropdown),I=w.data(y),P=w.get(0),L.refresh(),L.setup.returnedObject()},returnedObject:function(){var e=Y.slice(0,q),t=Y.slice(q+1);Y=e.add(w).add(t)}},refresh:function(){L.refreshSelectors(),L.refreshData()},refreshItems:function(){E=A.find(v.item),F=f.hideDividers?E.parent().children(v.divider):te()},refreshSelectors:function(){L.verbose("Refreshing selector cache"),C=w.find(v.text),k=w.find(v.search),D=w.find(v.input),H=w.find(v.icon),S=0<w.prev().find(v.text).length?w.prev().find(v.text):w.prev(),A=w.children(v.menu),E=A.find(v.item),F=f.hideDividers?E.parent().children(v.divider):te()},refreshData:function(){L.verbose("Refreshing cached metadata"),E.removeData(h.text).removeData(h.value)},clearData:function(){L.verbose("Clearing metadata"),E.removeData(h.text).removeData(h.value),w.removeData(h.defaultText).removeData(h.defaultValue).removeData(h.placeholderText)},clearItems:function(){A.empty(),L.refreshItems()},toggle:function(){L.verbose("Toggling menu visibility"),L.is.active()?L.hide():L.show()},show:function(e,t){if(e=te.isFunction(e)?e:function(){},(R||M)&&L.is.remote()&&L.is.noApiCache()&&L.clearItems(),!L.can.show()&&L.is.remote()&&(L.debug("No API results retrieved, searching before show"),L.queryRemote(L.get.query(),L.show,[e,t])),L.can.show()&&!L.is.active()){if(L.debug("Showing dropdown"),!L.has.message()||L.has.maxSelections()||L.has.allResultsFiltered()||L.remove.message(),L.is.allFiltered())return!0;!1!==f.onShow.call(P)&&L.animate.show(function(){L.can.click()&&L.bind.intent(),L.has.search()&&!t&&L.focusSearch(),L.set.visible(),e.call(P)})}},hide:function(e,t){e=te.isFunction(e)?e:function(){},L.is.active()&&!L.is.animatingOutward()?(L.debug("Hiding dropdown"),!1!==f.onHide.call(P)&&L.animate.hide(function(){L.remove.visible(),L.is.focusedOnSearch()&&!0!==t&&k.blur(),e.call(P)})):L.can.click()&&L.unbind.intent(),R=M=!1},hideOthers:function(){L.verbose("Finding other dropdowns to hide"),Y.not(w).has(v.menu+"."+m.visible).dropdown("hide")},hideMenu:function(){L.verbose("Hiding menu instantaneously"),L.remove.active(),L.remove.visible(),A.transition("hide")},hideSubMenus:function(){var e=A.children(v.item).find(v.menu);L.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){L.bind.keyboardEvents(),L.bind.inputEvents(),L.bind.mouseEvents()},keyboardEvents:function(){L.verbose("Binding keyboard events"),w.on("keydown"+b,L.event.keydown),L.has.search()&&w.on(L.get.inputEvent()+b,v.search,L.event.input),L.is.multiple()&&$.on("keydown"+i,L.event.document.keydown)},inputEvents:function(){L.verbose("Binding input change events"),w.on("change"+b,v.input,L.event.change)},mouseEvents:function(){L.verbose("Binding mouse events"),L.is.multiple()&&w.on(K+b,v.label,L.event.label.click).on(K+b,v.remove,L.event.remove.click),L.is.searchSelection()?(w.on("mousedown"+b,L.event.mousedown).on("mouseup"+b,L.event.mouseup).on("mousedown"+b,v.menu,L.event.menu.mousedown).on("mouseup"+b,v.menu,L.event.menu.mouseup).on(K+b,v.icon,L.event.icon.click).on(K+b,v.clearIcon,L.event.clearIcon.click).on("focus"+b,v.search,L.event.search.focus).on(K+b,v.search,L.event.search.focus).on("blur"+b,v.search,L.event.search.blur).on(K+b,v.text,L.event.text.focus),L.is.multiple()&&w.on(K+b,L.event.click).on(K+b,L.event.search.focus)):("click"==f.on?w.on(K+b,v.icon,L.event.icon.click).on(K+b,L.event.test.toggle):"hover"==f.on?w.on("mouseenter"+b,L.delay.show).on("mouseleave"+b,L.delay.hide):w.on(f.on+b,L.toggle),w.on("mousedown"+b,L.event.mousedown).on("mouseup"+b,L.event.mouseup).on("focus"+b,L.event.focus).on(K+b,v.clearIcon,L.event.clearIcon.click),L.has.menuSearch()?w.on("blur"+b,v.search,L.event.search.blur):w.on("blur"+b,L.event.blur)),A.on((G?"touchstart":"mouseenter")+b,v.item,L.event.item.mouseenter).on("mouseleave"+b,v.item,L.event.item.mouseleave).on("click"+b,v.item,L.event.item.click)},intent:function(){L.verbose("Binding hide intent event to document"),G&&$.on("touchstart"+i,L.event.test.touch).on("touchmove"+i,L.event.test.touch),$.on(K+i,L.event.test.hide)}},unbind:{intent:function(){L.verbose("Removing hide intent event from document"),G&&$.off("touchstart"+i).off("touchmove"+i),$.off(K+i)}},filter:function(e){function t(){L.is.multiple()&&L.filterActive(),(e||!e&&0==L.get.activeItem().length)&&L.select.firstUnfiltered(),L.has.allResultsFiltered()?f.onNoResults.call(P,n)?f.allowAdditions?f.hideAdditions&&(L.verbose("User addition with no menu, setting empty style"),L.set.empty(),L.hideMenu()):(L.verbose("All items filtered, showing message",n),L.add.message(p.noResults)):(L.verbose("All items filtered, hiding dropdown",n),L.hideMenu()):(L.remove.empty(),L.remove.message()),f.allowAdditions&&L.add.userSuggestion(L.escape.htmlEntities(e)),L.is.searchSelection()&&L.can.show()&&L.is.focusedOnSearch()&&L.show()}var n=e!==oe?e:L.get.query();f.useLabels&&L.has.maxSelections()||(f.apiSettings?L.can.useAPI()?L.queryRemote(n,function(){f.filterRemoteData&&L.filterItems(n);var e=D.val();Array.isArray(e)||(e=e&&""!==e?e.split(f.delimiter):[]),L.is.multiple()&&te.each(e,function(e,t){E.filter('[data-value="'+t+'"]').addClass(m.filtered)}),L.focusSearch(!0),t()}):L.error(u.noAPI):(L.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(){L.add.message(p.serverError),R=M=!1,n.apply(null,i)},onFailure:function(){L.add.message(p.serverError),R=M=!1,n.apply(null,i)},onSuccess:function(e){var e=e[l.remoteValues],t=(Array.isArray(e)||(e=[]),L.remove.message(),{});t[l.values]=e,L.setup.menu(t),0!==e.length||f.allowAdditions?""!==(t=L.is.multiple()?L.get.values():L.get.value())&&(L.verbose("Value(s) present after click icon, select value(s) in items"),L.set.selected(t,null,null,!0)):L.add.message(p.noResults),R=M=!1,n.apply(null,i)}};w.api("get request")||L.setup.api(),e=te.extend(!0,{},e,f.apiSettings),w.api("setting",e).api("query")},filterItems:function(e){var n=L.remove.diacritics(e!==oe?e:L.get.query()),i=null,e=L.escape.string(n),t=(f.ignoreSearchCase?"i":"")+"gm",o=new RegExp("^"+e,t);L.has.query()&&(i=[],L.verbose("Searching for matching values",n),E.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=L.remove.diacritics(String(L.get.choiceText(t,!1)))).search(o))return i.push(this),!0;if("exact"===f.fullTextSearch&&L.exactSearch(n,e))return i.push(this),!0;if(!0===f.fullTextSearch&&L.fuzzySearch(n,e))return i.push(this),!0}return("both"===f.match||"value"===f.match)&&(-1!==(t=L.remove.diacritics(String(L.get.choiceValue(t,e)))).search(o)||"exact"===f.fullTextSearch&&L.exactSearch(n,t)||!0===f.fullTextSearch&&L.fuzzySearch(n,t))?(i.push(this),!0):void 0})),L.debug("Showing only matched items",n),L.remove.filteredItem(),i&&E.not(i).addClass(m.filtered),L.has.query()?!0===f.hideDividers?F.addClass(m.hidden):"empty"===f.hideDividers&&F.removeClass(m.hidden).filter(function(){var e=te(this).nextUntil(v.item);return 0===(e.length?e:te(this)).nextUntil(v.divider).filter(v.item+":not(."+m.filtered+")").length}).addClass(m.hidden):F.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&&E.filter("."+m.active).addClass(m.filtered)},focusSearch:function(e){L.has.search()&&!L.is.focusedOnSearch()&&(e?(w.off("focus"+b,v.search),k.focus(),w.on("focus"+b,v.search,L.event.search.focus)):k.focus())},blurSearch:function(){L.has.search()&&k.blur()},forceSelection:function(){var e=E.not(m.filtered).filter("."+m.selected).eq(0),t=E.not(m.filtered).filter("."+m.active).eq(0),e=0<e.length?e:t,t=0<e.length;f.allowAdditions||t&&!L.is.multiple()?(L.debug("Forcing partial selection to selected item",e),L.event.item.click.call(e,{},!0)):L.remove.searchTerm()},change:{values:function(e){f.allowAdditions||L.clear(),L.debug("Creating dropdown with specified values",e);var t={};t[l.values]=e,L.setup.menu(t),te.each(e,function(e,t){if(1==t.selected&&(L.debug("Setting initial selection to",t[l.value]),L.set.selected(t[l.value]),!L.is.multiple()))return!1}),L.has.selectInput()&&(L.disconnect.selectObserver(),D.html(""),D.append("<option disabled selected value></option>"),te.each(e,function(e,t){var n=f.templates.deQuote(t[l.value]),t=f.templates.escape(t[l.name]||"",f.preserveHTML);D.append('<option value="'+n+'">'+t+"</option>")}),L.observe.select())}},event:{change:function(){U||(L.debug("Input changed, updating selection"),L.set.selected())},focus:function(){f.showOnFocus&&!O&&L.is.hidden()&&!t&&(R=!0,L.show())},blur:function(e){t=ie.activeElement===this,O||t||(L.remove.activeLabel(),L.hide())},mousedown:function(){L.is.searchSelection()?n=!0:O=!0},mouseup:function(){L.is.searchSelection()?n=!1:O=!1},click:function(e){te(e.target).is(w)&&(L.is.focusedOnSearch()?L.show():L.focusSearch())},search:{focus:function(e){O=!0,L.is.multiple()&&L.remove.activeLabel(),R||L.is.active()||!(f.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||(R=!0,L.search())},blur:function(e){t=ie.activeElement===this,!L.is.searchSelection()||n||z||t||(f.forceSelection?L.forceSelection():f.allowAdditions||L.remove.searchTerm(),L.hide()),n=!1}},clearIcon:{click:function(e){L.clear(),L.is.searchSelection()&&L.remove.searchTerm(),L.hide(),e.stopPropagation()}},icon:{click:function(e){M=!0,L.has.search()?L.is.active()?L.blurSearch():f.showOnFocus?L.focusSearch():L.toggle():L.toggle(),e.stopPropagation()}},text:{focus:function(e){O=!0,L.focusSearch()}},input:function(e){(L.is.multiple()||L.is.searchSelection())&&L.set.filtered(),clearTimeout(L.timer),L.timer=setTimeout(L.search,f.delay.search)},label:{click:function(e){var t=te(this),n=w.find(v.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)?L.remove.activeLabels():L.remove.activeLabels(t),e.stopPropagation()}},test:{toggle:function(e){var t=L.is.multiple()?L.show:L.toggle;L.is.bubbledLabelClick(e)||L.is.bubbledIconClick(e)||(L.is.multiple()&&(!L.is.multiple()||L.is.active())||(R=!0),L.determine.eventOnElement(e,t)&&e.preventDefault())},touch:function(e){L.determine.eventOnElement(e,function(){"touchstart"==e.type?L.timer=setTimeout(function(){L.hide()},f.delay.touch):"touchmove"==e.type&&clearTimeout(L.timer)}),e.stopPropagation()},hide:function(e){L.determine.eventInModule(e,L.hide)&&P.id&&te(e.target).attr("for")===P.id&&e.preventDefault()}},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&L.check.disabled()})}},select:{mutation:function(e){L.debug("<select> modified, recreating menu"),L.is.selectMutation(e)&&(L.disconnect.selectObserver(),L.refresh(),L.setup.select(),L.set.selected(),L.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(v.addition)||0<t.closest(v.addition).length,t=t.is(v.message)||0<t.closest(v.message).length;e||t?(L.debug("Updating item selector cache"),L.refreshItems()):(L.debug("Menu modified, updating selector cache"),L.refresh())},mousedown:function(){z=!0},mouseup:function(){z=!1}},item:{mouseenter:function(e){var t=te(e.target),n=te(this),i=n.children(v.menu),o=n.siblings(v.item).children(v.menu),n=0<i.length;0<i.find(t).length||!n||(clearTimeout(L.itemTimer),L.itemTimer=setTimeout(function(){L.verbose("Showing sub-menu",i),te.each(o,function(){L.animate.hide(!1,te(this))}),L.animate.show(!1,i)},f.delay.show),e.preventDefault())},mouseleave:function(e){var t=te(this).children(v.menu);0<t.length&&(clearTimeout(L.itemTimer),L.itemTimer=setTimeout(function(){L.verbose("Hiding sub-menu",t),L.animate.hide(!1,t)},f.delay.hide))},click:function(e,t){var n=te(this),e=te(e?e.target:""),i=n.find(v.menu),o=L.get.choiceText(n),a=L.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||(L.is.searchSelection()&&(f.allowAdditions&&L.remove.userAddition(),L.remove.searchTerm(),L.is.focusedOnSearch()||1==t||L.focusSearch(!0)),f.useLabels||(L.remove.filteredItem(),L.set.scrollPosition(n)),L.determine.selectAction.call(this,o,a))}},document:{keydown:function(e){var t,n,i,o,a,r,s,l,c,u,d,f=e.which;L.is.inObject(f,g)&&((n=(t=w.find(v.label)).filter("."+m.active)).data(h.value),r=t.index(n),s=t.length,i=0<n.length,o=1<n.length,a=0===r,r=r+1==s,s=L.is.searchSelection(),l=L.is.focusedOnSearch(),c=L.is.focused(),d=(u=l&&0===L.get.caretPosition(!1))&&0!==L.get.caretPosition(!0),s&&!i&&!l||(f==g.leftArrow?!c&&!u||i?i&&(e.shiftKey?L.verbose("Adding previous label to selection"):(L.verbose("Selecting previous label"),t.removeClass(m.active)),a&&!o?n.addClass(m.active):n.prev(v.siblingLabel).addClass(m.active).end(),e.preventDefault()):(L.verbose("Selecting previous label"),t.last().addClass(m.active)):f==g.rightArrow?(c&&!i&&t.first().addClass(m.active),i&&(e.shiftKey?L.verbose("Adding next label to selection"):(L.verbose("Selecting next label"),t.removeClass(m.active)),r?s?l?t.removeClass(m.active):L.focusSearch():(o?n.next(v.siblingLabel):n).addClass(m.active):n.next(v.siblingLabel).addClass(m.active),e.preventDefault())):f==g.deleteKey||f==g.backspace?i?(L.verbose("Removing active labels"),r&&s&&!l&&L.focusSearch(),n.last().next(v.siblingLabel).addClass(m.active),L.remove.activeLabels(n),e.preventDefault()):!u||d||i||f!=g.backspace||(L.verbose("Removing last label on input backspace"),n=t.last().addClass(m.active),L.remove.activeLabels(n)):n.removeClass(m.active)))}},keydown:function(e){var t=e.which;if(L.is.inObject(t,g)){var n,i=E.not(v.unselectable).filter("."+m.selected).eq(0),o=A.children("."+m.active).eq(0),i=0<i.length?i:o,o=0<i.length?i.siblings(":not(."+m.filtered+")").addBack():A.children(":not(."+m.filtered+")"),a=i.children(v.menu),r=i.closest(v.menu),s=r.hasClass(m.visible)||r.hasClass(m.animating)||0<r.parent(v.menu).length,l=0<a.length,c=0<i.length,u=0<i.not(v.unselectable).length,d=t==g.delimiter&&f.allowAdditions&&L.is.multiple();if(f.allowAdditions&&f.hideAdditions&&(t==g.enter||d)&&u&&(L.verbose("Selecting item from keyboard shortcut",i),L.event.item.click.call(i,e),L.is.searchSelection()&&L.remove.searchTerm(),L.is.multiple()&&e.preventDefault()),L.is.visible()){if(t!=g.enter&&!d||(t==g.enter&&c&&l&&!f.allowCategorySelection?(L.verbose("Pressed enter on unselectable category, opening sub menu"),t=g.rightArrow):u&&(L.verbose("Selecting item from keyboard shortcut",i),L.event.item.click.call(i,e),L.is.searchSelection()&&(L.remove.searchTerm(),L.is.multiple()&&k.focus())),e.preventDefault()),c&&(t==g.leftArrow&&r[0]!==A[0]&&(L.verbose("Left key pressed, closing sub-menu"),L.animate.hide(!1,r),i.removeClass(m.selected),r.closest(v.item).addClass(m.selected),e.preventDefault()),t==g.rightArrow&&l&&(L.verbose("Right key pressed, opening sub-menu"),L.animate.show(!1,a),i.removeClass(m.selected),a.find(v.item).eq(0).addClass(m.selected),e.preventDefault())),t==g.upArrow){if(n=(c&&s?i.prevAll(v.item+":not("+v.unselectable+")"):E).eq(0),o.index(n)<0)return L.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();L.verbose("Up key pressed, changing active item"),i.removeClass(m.selected),n.addClass(m.selected),L.set.scrollPosition(n),f.selectOnKeydown&&L.is.single()&&L.set.selectedItem(n),e.preventDefault()}if(t==g.downArrow){if(0===(n=(c&&s?i.nextAll(v.item+":not("+v.unselectable+")"):E).eq(0)).length)return L.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();L.verbose("Down key pressed, changing active item"),E.removeClass(m.selected),n.addClass(m.selected),L.set.scrollPosition(n),f.selectOnKeydown&&L.is.single()&&L.set.selectedItem(n),e.preventDefault()}t==g.pageUp&&(L.scrollPage("up"),e.preventDefault()),t==g.pageDown&&(L.scrollPage("down"),e.preventDefault()),t==g.escape&&(L.verbose("Escape key pressed, closing dropdown"),L.hide())}else d&&e.preventDefault(),t!=g.downArrow||L.is.visible()||(L.verbose("Down key pressed, showing dropdown"),L.show(),e.preventDefault())}else L.has.search()||L.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e,t=D[0];t&&(e=ie.createEvent("HTMLEvents"),L.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){d=!0,L.verbose("Determining action",f.action),te.isFunction(L.action[f.action])?(L.verbose("Triggering preset action",f.action,e,t),L.action[f.action].call(P,e,t,this)):te.isFunction(f.action)?(L.verbose("Triggering user action",f.action,e,t),f.action.call(P,e,t,this)):L.error(u.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(w).length;return t=te.isFunction(t)?t:function(){},n&&!e?(L.verbose("Triggering event",t),t(),!0):(L.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=te(e.target),i=n.closest(v.siblingLabel),e=ie.body.contains(e.target),i=0===w.find(i).length||!(L.is.multiple()&&f.useLabels),n=0===n.closest(A).length;return t=te.isFunction(t)?t:function(){},e&&i&&n?(L.verbose("Triggering event",t),t(),!0):(L.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=t!==oe?t:e,L.can.activate(te(n))&&(L.set.selected(t,te(n)),L.is.multiple()||L.hideAndClear())},select:function(e,t,n){t=t!==oe?t:e,L.can.activate(te(n))&&(L.set.value(t,e,te(n)),L.is.multiple()||L.hideAndClear())},combo:function(e,t,n){L.set.selected(t=t!==oe?t:e,te(n)),L.hideAndClear()},hide:function(e,t,n){L.set.value(t,e,te(n)),L.hideAndClear()}},get:{id:function(){return o},defaultText:function(){return w.data(h.defaultText)},defaultValue:function(){return w.data(h.defaultValue)},placeholderText:function(){return"auto"!=f.placeholder&&"string"==typeof f.placeholder?f.placeholder:w.data(h.placeholderText)||""},text:function(){return f.preserveHTML?C.html():C.text()},query:function(){return String(k.val()).trim()},searchWidth:function(e){return e=e!==oe?e:k.val(),T.text(e),Math.ceil(T.width()+1)},selectionCount:function(){var e=L.get.values();return L.is.multiple()?Array.isArray(e)?e.length:0:""!==L.get.value()?1:0},transition:function(e){return"auto"===f.transition?L.is.upward(e)?"slide up":"slide down":f.transition},userValues:function(){var e=L.get.values();return!!e&&(e=Array.isArray(e)?e:[e],te.grep(e,function(e){return!1===L.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=k.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<D.length?D.val():w.data(h.value),t=Array.isArray(e)&&1===e.length&&""===e[0];return e===oe||t?"":e},values:function(e){var t=L.get.value();return""===t?"":!L.has.selectInput()&&L.is.multiple()?"string"==typeof t?(e?t:L.escape.htmlEntities(t)).split(f.delimiter):"":t},remoteValues:function(){var e=L.get.values(),i=!1;return e&&te.each(e="string"==typeof e?[e]:e,function(e,t){var n=L.read.remoteData(t);L.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(v.menu).length&&(L.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(v.menu).remove(),e.find(v.menuIcon).remove()),e.data(h.text)!==oe?e.data(h.text):t?e.html()&&e.html().trim():e.text()&&e.text().trim()},choiceValue:function(e,t){return t=t||L.get.choiceText(e),!!e&&(e.data(h.value)!==oe?String(e.data(h.value)):"string"==typeof t?String(f.ignoreSearchCase?t.toLowerCase():t).trim():String(t))},inputEvent:function(){var e=k[0];return!!e&&(e.oninput!==oe?"input":e.onpropertychange!==oe?"propertychange":"keyup")},selectValues:function(){var a={},r=[],s=[];return w.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(h.text)!==oe?e.data(h.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&&(L.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[l.values]=s,L.debug("Retrieved and sorted values from select",a)):(a[l.values]=s,L.debug("Retrieved values from select",a)),a},activeItem:function(){return E.filter("."+m.active)},selectedItem:function(){var e=E.not(v.unselectable).filter("."+m.selected);return 0<e.length?e:E.eq(0)},itemWithAdditions:function(e){var t=L.get.item(e),e=L.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:L.get.values()!==oe?L.get.values():L.get.text(),e=(o=L.is.multiple()&&Array.isArray(n))?0<n.length:n!==oe&&null!==n,i=""===n||!1===n||!0===n||(i||!1),e&&E.each(function(){var e=te(this),t=L.get.choiceText(e),t=L.get.choiceValue(e,t);if(null!==t&&t!==oe)if(o)-1!==te.inArray(L.escape.htmlEntities(String(t)),n.map(function(e){return String(e)}))&&(a=a?a.add(e):e);else if(i){if(L.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()),L.escape.htmlEntities(String(t))===L.escape.htmlEntities(String(n)))return L.verbose("Found select item by value",t,n),a=e,!0}),a},displayType:function(){return w.hasClass("column")?"flex":f.displayType}},check:{maxSelections:function(e){return!f.maxSelections||((e=e!==oe?e:L.get.selectionCount())>=f.maxSelections?(L.debug("Maximum selection count reached"),f.useLabels&&(E.addClass(m.filtered),L.add.message(p.maxSelections)),!0):(L.verbose("No longer at maximum selection count"),L.remove.message(),L.remove.filteredItem(),L.is.searchSelection()&&L.filterItems(),!1))},disabled:function(){k.attr("tabindex",L.is.disabled()?-1:0)}},restore:{defaults:function(e){L.clear(e),L.restore.defaultText(),L.restore.defaultValue()},defaultText:function(){var e=L.get.defaultText();e===L.get.placeholderText?(L.debug("Restoring default placeholder text",e),L.set.placeholderText(e)):(L.debug("Restoring default text",e),L.set.text(e))},placeholderText:function(){L.set.placeholderText()},defaultValue:function(){var e=L.get.defaultValue();e!==oe&&(L.debug("Restoring default value",e),""!==e?(L.set.value(e),L.set.selected()):(L.remove.activeItem(),L.remove.selectedItem()))},labels:function(){f.allowAdditions&&(f.useLabels||(L.error(u.labels),f.useLabels=!0),L.debug("Restoring selected values"),L.create.userLabels()),L.check.maxSelections()},selected:function(){L.restore.values(),L.is.multiple()?(L.debug("Restoring previously selected values and labels"),L.restore.labels()):L.debug("Restoring previously selected values")},values:function(){L.set.initialLoad(),f.apiSettings&&f.saveRemoteData&&L.get.remoteValues()?L.restore.remoteValues():L.set.selected();var e=L.get.value();!e||""===e||Array.isArray(e)&&0===e.length?D.addClass(m.noselection):D.removeClass(m.noselection),L.remove.initialLoad()},remoteValues:function(){var e=L.get.remoteValues();L.debug("Recreating selected from session data",e),e&&(L.is.single()?te.each(e,function(e,t){L.set.text(t)}):te.each(e,function(e,t){L.add.label(e,t)}))}},read:{remoteData:function(e){if(ne.Storage!==oe)return(e=sessionStorage.getItem(e))!==oe&&e;L.error(u.noStorage)}},save:{defaults:function(){L.save.defaultText(),L.save.placeholderText(),L.save.defaultValue()},defaultValue:function(){var e=L.get.value();L.verbose("Saving default value as",e),w.data(h.defaultValue,e)},defaultText:function(){var e=L.get.text();L.verbose("Saving default text as",e),w.data(h.defaultText,e)},placeholderText:function(){var e;!1!==f.placeholder&&C.hasClass(m.placeholder)&&(e=L.get.text(),L.verbose("Saving placeholder text as",e),w.data(h.placeholderText,e))},remoteData:function(e,t){ne.Storage===oe?L.error(u.noStorage):(L.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e))}},clear:function(e){L.is.multiple()&&f.useLabels?L.remove.labels(w.find(v.label),e):(L.remove.activeItem(),L.remove.selectedItem(),L.remove.filteredItem()),L.set.placeholderText(),L.clearValue(e)},clearValue:function(e){L.set.value("",null,null,e)},scrollPage:function(e,t){var t=t||L.get.selectedItem(),n=t.closest(v.menu),i=n.outerHeight(),o=n.scrollTop(),a=E.eq(0).outerHeight(),i=Math.floor(i/a),o=(n.prop("scrollHeight"),"up"==e?o-a*i:o+a*i),a=E.not(v.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&&(L.debug("Scrolling page",e,i),t.removeClass(m.selected),i.addClass(m.selected),f.selectOnKeydown&&L.is.single()&&L.set.selectedItem(i),n.scrollTop(o))},set:{filtered:function(){var e=L.is.multiple(),t=L.is.searchSelection(),n=e&&t,t=t?L.get.query():"",i="string"==typeof t&&0<t.length,o=L.get.searchWidth(),t=""!==t;e&&i&&(L.verbose("Adjusting input width",o,f.glyphWidth),k.css("width",o)),i||n&&t?(L.verbose("Hiding placeholder text"),C.addClass(m.filtered)):e&&(!n||t)||(L.verbose("Showing placeholder text"),C.removeClass(m.filtered))},empty:function(){w.addClass(m.empty)},loading:function(){w.addClass(m.loading)},placeholderText:function(e){e=e||L.get.placeholderText(),L.debug("Setting placeholder text",e),L.set.text(e),C.addClass(m.placeholder)},tabbable:function(){L.is.searchSelection()?(L.debug("Added tabindex to searchable dropdown"),k.val(""),L.check.disabled(),A.attr("tabindex",-1)):(L.debug("Added tabindex to dropdown"),w.attr("tabindex")===oe&&(w.attr("tabindex",0),A.attr("tabindex",-1)))},initialLoad:function(){L.verbose("Setting initial load"),e=!0},activeItem:function(e){f.allowAdditions&&0<e.filter(v.addition).length?e.addClass(m.filtered):e.addClass(m.active)},partialSearch:function(e){var t=L.get.query().length;k.val(e.substr(0,t))},scrollPosition:function(e,t){var n,i,o=(e=e||L.get.selectedItem()).closest(v.menu),a=e&&0<e.length;t=t!==oe&&t,0===L.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),L.debug("Scrolling to active item",e),(t||n||i)&&o.scrollTop(e),o.removeClass(m.loading))},text:function(e){"combo"===f.action?(L.debug("Changing combo button text",e,S),f.preserveHTML?S.html(e):S.text(e)):"activate"===f.action&&(e!==L.get.placeholderText()&&C.removeClass(m.placeholder),L.debug("Changing text",e,C),C.removeClass(m.filtered),f.preserveHTML?C.html(e):C.text(e))},selectedItem:function(e){var t=L.get.choiceValue(e),n=L.get.choiceText(e,!1),i=L.get.choiceText(e,!0);L.debug("Setting user selection to item",e),L.remove.activeItem(),L.set.partialSearch(n),L.set.activeItem(e),L.set.selected(t,e),L.set.text(i)},selectedLetter:function(e){var t=E.filter("."+m.selected),n=0<t.length&&L.has.firstLetter(t,e),i=!1;n&&(n=t.nextAll(E).eq(0),L.has.firstLetter(n,e)&&(i=n)),i||E.each(function(){if(L.has.firstLetter(te(this),e))return i=te(this),!1}),i&&(L.verbose("Scrolling to next value with letter",e),L.set.scrollPosition(i),t.removeClass(m.selected),i.addClass(m.selected),f.selectOnKeydown&&L.is.single()&&L.set.selectedItem(i))},direction:function(e){"auto"==f.direction?(e?L.is.upward(e)&&L.remove.upward(e):L.remove.upward(),(L.can.openDownward(e)?L.remove:L.set).upward(e),L.is.leftward(e)||L.can.openRightward(e)||L.set.leftward(e)):"upward"==f.direction&&L.set.upward(e)},upward:function(e){(e||w).addClass(m.upward)},leftward:function(e){(e||A).addClass(m.leftward)},value:function(e,t,n,i){e===oe||""===e||Array.isArray(e)&&0===e.length?D.addClass(m.noselection):D.removeClass(m.noselection);var o=L.escape.value(e),a=0<D.length,r=L.get.values(),s=e!==oe?String(e):e;if(a){if(!f.allowReselection&&s==r&&(L.verbose("Skipping value update already same value",e,r),!L.is.initialLoad()))return;L.is.single()&&L.has.selectInput()&&L.can.extendSelect()&&(L.debug("Adding user option",e),L.add.optionValue(e)),L.debug("Updating input value",o,r),U=!0,D.val(o),!1===f.fireOnInit&&L.is.initialLoad()?L.debug("Input native change event ignored on initial load"):!0!==i&&L.trigger.change(),U=!1}else L.verbose("Storing value in metadata",o,D),o!==r&&w.data(h.value,s);!1===f.fireOnInit&&L.is.initialLoad()?L.verbose("No callback on initial load",f.onChange):!0!==i&&f.onChange.call(P,e,t,n)},active:function(){w.addClass(m.active)},multiple:function(){w.addClass(m.multiple)},visible:function(){w.addClass(m.visible)},exactly:function(e,t){L.debug("Setting selected to exact values"),L.clear(),L.set.selected(e,t)},selected:function(e,s,l,c){var u=L.is.multiple();(s=f.allowAdditions?s||L.get.itemWithAdditions(e):s||L.get.item(e))&&(L.debug("Setting selected menu item to",s),L.is.multiple()&&L.remove.searchWidth(),L.is.single()?(L.remove.activeItem(),L.remove.selectedItem()):f.useLabels&&L.remove.selectedItem(),s.each(function(){var e=te(this),t=L.get.choiceText(e),n=L.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&&L.save.remoteData(t,n),f.useLabels?(L.add.label(n,t,r),L.add.value(n,t,e),L.set.activeItem(e),L.filterActive(),L.select.nextAvailable(s)):(L.add.value(n,t,e),L.set.text(L.add.variables(p.count)),L.set.activeItem(e))):i||!f.useLabels&&!d||(L.debug("Selected active value, removing label"),L.remove.selected(n)):(f.apiSettings&&f.saveRemoteData&&L.save.remoteData(t,n),c||L.set.text(t),L.set.value(n,t,e,l),e.addClass(m.active).addClass(m.selected))}),c||L.remove.searchTerm())}},add:{label:function(e,t,n){var i,o=L.is.searchSelection()?k:C,a=L.escape.value(e);f.ignoreCase&&(a=a.toLowerCase()),i=te("<a />").addClass(m.label).attr("data-"+h.value,a).html(N.label(a,t,f.preserveHTML,f.className)),i=f.onLabelCreate.call(i,a,t),L.has.label(e)?L.debug("User selection already exists, skipping",a):(f.label.variation&&i.addClass(f.label.variation),!0===n?(L.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})):(L.debug("Adding selection label",i),i.insertBefore(o)))},message:function(e){var t=A.children(v.message),e=f.templates.message(L.add.variables(e));0<t.length?t.html(e):te("<div/>").html(e).addClass(m.message).appendTo(A)},optionValue:function(e){var t=L.escape.value(e);0<D.find('option[value="'+L.escape.string(t)+'"]').length||(L.disconnect.selectObserver(),L.is.single()&&(L.verbose("Removing previous user addition"),D.find("option."+m.addition).remove()),te("<option/>").prop("value",t).addClass(m.addition).html(e).appendTo(D),L.verbose("Adding user addition as an <option>",e),L.observe.select())},userSuggestion:function(e){var t=A.children(v.addition),n=L.get.item(e),n=n&&n.not(v.addition).length,i=0<t.length;f.useLabels&&L.has.maxSelections()||(""===e||n?t.remove():(i?(t.data(h.value,e).data(h.text,e).attr("data-"+h.value,e).attr("data-"+h.text,e).removeClass(m.filtered),f.hideAdditions||(n=f.templates.addition(L.add.variables(p.addResult,e)),t.html(n)),L.verbose("Replacing user suggestion with new value",t)):((t=L.create.userChoice(e)).prependTo(A),L.verbose("Adding item choice to menu corresponding with user choice addition",t)),f.hideAdditions&&!L.is.allFiltered()||t.addClass(m.selected).siblings().removeClass(m.selected),L.refreshItems()))},variables:function(e,t){var n,i=-1!==e.search("{count}"),o=-1!==e.search("{maxCount}"),a=-1!==e.search("{term}");return L.verbose("Adding templated variables to message",e),i&&(n=L.get.selectionCount(),e=e.replace("{count}",n)),o&&(n=L.get.selectionCount(),e=e.replace("{maxCount}",f.maxSelections)),a&&(i=t||L.get.query(),e=e.replace("{term}",i)),e},value:function(e,t,n){var i,o=L.get.values(!0);L.has.value(e)?L.debug("Value already selected"):""===e?L.debug("Cannot select blank values from multiselect"):(i=Array.isArray(o)?(i=o.concat([e]),L.get.uniqueArray(i)):[e],L.has.selectInput()?L.can.extendSelect()&&(L.debug("Adding value to select",e,i,D),L.add.optionValue(e)):(i=i.join(f.delimiter),L.debug("Setting hidden input to delimited value",i,D)),!1===f.fireOnInit&&L.is.initialLoad()?L.verbose("Skipping onadd callback on initial load",f.onAdd):f.onAdd.call(P,e,t,n),L.set.value(i,t,n),L.check.maxSelections())}},remove:{active:function(){w.removeClass(m.active)},activeLabel:function(){w.find(v.label).removeClass(m.active)},empty:function(){w.removeClass(m.empty)},loading:function(){w.removeClass(m.loading)},initialLoad:function(){e=!1},upward:function(e){(e||w).removeClass(m.upward)},leftward:function(e){(e||A).removeClass(m.leftward)},visible:function(){w.removeClass(m.visible)},activeItem:function(){E.removeClass(m.active)},filteredItem:function(){f.useLabels&&L.has.maxSelections()||((f.useLabels&&L.is.multiple()?E.not("."+m.active):E).removeClass(m.filtered),f.hideDividers&&F.removeClass(m.hidden),L.remove.empty())},optionValue:function(e){var e=L.escape.value(e),t=D.find('option[value="'+L.escape.string(e)+'"]');0<t.length&&t.hasClass(m.addition)&&(a&&(a.disconnect(),L.verbose("Temporarily disconnecting mutation observer")),t.remove(),L.verbose("Removing user addition as an <option>",e),a&&a.observe(D[0],{childList:!0,subtree:!0}))},message:function(){A.children(v.message).remove()},searchWidth:function(){k.css("width","")},searchTerm:function(){L.verbose("Cleared search term"),k.val(""),L.set.filtered()},userAddition:function(){E.filter(v.addition).remove()},selected:function(e,t,i){if(!(t=f.allowAdditions?t||L.get.itemWithAdditions(e):t||L.get.item(e)))return!1;t.each(function(){var e=te(this),t=L.get.choiceText(e),n=L.get.choiceValue(e,t);L.is.multiple()?f.useLabels?(L.remove.value(n,t,e,i),L.remove.label(n)):(L.remove.value(n,t,e,i),0===L.get.selectionCount()?L.set.placeholderText():L.set.text(L.add.variables(p.count))):L.remove.value(n,t,e,i),e.removeClass(m.filtered).removeClass(m.active),f.useLabels&&e.removeClass(m.selected)})},selectedItem:function(){E.removeClass(m.selected)},value:function(e,t,n,i){var o,a=L.get.values();e=L.escape.htmlEntities(e),L.has.selectInput()?(L.verbose("Input is <select> removing selected option",e),o=L.remove.arrayValue(e,a),L.remove.optionValue(e)):(L.verbose("Removing from delimited values",e),o=(o=L.remove.arrayValue(e,a)).join(f.delimiter)),!1===f.fireOnInit&&L.is.initialLoad()?L.verbose("No callback on initial load",f.onRemove):f.onRemove.call(P,e,t,n),L.set.value(o,t,n,i),L.check.maxSelections()},arrayValue:function(t,e){return Array.isArray(e)||(e=[e]),e=te.grep(e,function(e){return t!=e}),L.verbose("Removed value from delimited string",t,e),e},label:function(e,t){e=L.escape.value(e),e=w.find(v.label).filter("[data-"+h.value+'="'+L.escape.string(f.ignoreCase?e.toLowerCase():e)+'"]');L.verbose("Removing label",e),e.remove()},activeLabels:function(e){e=e||w.find(v.label).filter("."+m.active),L.verbose("Removing active label selections",e),L.remove.labels(e)},labels:function(e,o){e=e||w.find(v.label),L.verbose("Removing labels",e),e.each(function(){var e=te(this),t=e.data(h.value),n=t!==oe?String(t):t,i=L.is.userValue(n);!1===f.onLabelRemove.call(e,t)?L.debug("Label remove callback cancelled removal"):(L.remove.message(),i?(L.remove.value(n,n,L.get.item(n),o),L.remove.label(n)):L.remove.selected(n,!1,o))})},tabbable:function(){L.is.searchSelection()?(L.debug("Searchable dropdown initialized"),k.removeAttr("tabindex")):(L.debug("Simple selection dropdown initialized"),w.removeAttr("tabindex")),A.removeAttr("tabindex")},diacritics:function(e){return f.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}},has:{menuSearch:function(){return L.has.search()&&0<k.closest(A).length},clearItem:function(){return 0<V.length},search:function(){return 0<k.length},sizer:function(){return 0<T.length},selectInput:function(){return D.is("select")},minCharacters:function(e){return f.minCharacters&&!M?(e=e!==oe?String(e):String(L.get.query())).length>=f.minCharacters:!(M=!1)},firstLetter:function(e,t){return!(!e||0===e.length||"string"!=typeof t)&&(e=L.get.choiceText(e,!1),(t=t.toLowerCase())==String(e).charAt(0).toLowerCase())},input:function(){return 0<D.length},items:function(){return 0<E.length},menu:function(){return 0<A.length},subMenu:function(e){return 0<(e||A).find(v.menu).length},message:function(){return 0!==A.children(v.message).length},label:function(e){var e=L.escape.value(e),t=w.find(v.label);return f.ignoreCase&&(e=e.toLowerCase()),0<t.filter("[data-"+h.value+'="'+L.escape.string(e)+'"]').length},maxSelections:function(){return f.maxSelections&&L.get.selectionCount()>=f.maxSelections},allResultsFiltered:function(){var e=E.not(v.addition);return e.filter(v.unselectable).length===e.length},userSuggestion:function(){return 0<A.children(v.addition).length},query:function(){return""!==L.get.query()},value:function(e){return f.ignoreCase?L.has.valueIgnoringCase(e):L.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=L.get.values(!0);return!!(Array.isArray(t)?t&&-1!==te.inArray(e,t):t==e)},valueIgnoringCase:function(n){var e=L.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 w.hasClass(m.active)},animatingInward:function(){return A.transition("is inward")},animatingOutward:function(){return A.transition("is outward")},bubbledLabelClick:function(e){return te(e.target).is("select, input")&&0<w.closest("label").length},bubbledIconClick:function(e){return 0<te(e.target).closest(H).length},chrome:function(){return!(!ne.chrome||!ne.chrome.webstore&&!ne.chrome.runtime)},alreadySetup:function(){return w.is("select")&&w.parent(v.dropdown).data(y)!==oe&&0===w.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):A.transition&&A.transition("is animating")},leftward:function(e){return(e||A).hasClass(m.leftward)},clearable:function(){return w.hasClass(m.clearable)||f.clearable},disabled:function(){return w.hasClass(m.disabled)},focused:function(){return ie.activeElement===w[0]},focusedOnSearch:function(){return ie.activeElement===k[0]},allFiltered:function(){return(L.is.multiple()||L.has.search())&&!(0==f.hideAdditions&&L.has.userSuggestion())&&!L.has.message()&&L.has.allResultsFiltered()},hidden:function(e){return!L.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 w.hasClass(m.multiple)},remote:function(){return f.apiSettings&&L.can.useAPI()},noApiCache:function(){return f.apiSettings&&!f.apiSettings.cache},single:function(){return!L.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 w.hasClass(m.search)},searchSelection:function(){return L.has.search()&&1===k.parent(v.dropdown).length},selection:function(){return w.hasClass(m.selection)},userValue:function(e){return-1!==te.inArray(e,L.get.userValues())},upward:function(e){return(e||w).hasClass(m.upward)},visible:function(e){return(e||A).hasClass(m.visible)},verticallyScrollableContext:function(){var e=x.get(0)!==ne&&x.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=x.get(0)!==ne&&x.css("overflow-X");return"auto"==e||"scroll"==e}},can:{activate:function(e){return!!f.useLabels||(!L.has.maxSelections()||!(!L.has.maxSelections()||!e.hasClass(m.active)))},openDownward:function(e){var t,e=e||A,n=!0;return e.addClass(m.loading),t={context:{offset:x.get(0)===ne?{top:0,left:0}:x.offset(),scrollTop:x.scrollTop(),height:x.outerHeight()},menu:{offset:e.offset(),height:e.outerHeight()}},L.is.verticallyScrollableContext()&&(t.menu.offset.top+=t.context.scrollTop),L.has.subMenu(e)&&(t.menu.height+=e.find(v.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?(L.verbose("Dropdown can fit in context downward",t),!0):t.above?(L.verbose("Dropdown cannot fit below, opening upward",t),!1):(L.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),e.removeClass(m.loading),n},openRightward:function(e){var t,e=e||A,n=!0;return e.addClass(m.loading),t={context:{offset:x.get(0)===ne?{top:0,left:0}:x.offset(),scrollLeft:x.scrollLeft(),width:x.outerWidth()},menu:{offset:e.offset(),width:e.outerWidth()}},L.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)&&(L.verbose("Dropdown cannot fit in context rightward",t),n=!1),e.removeClass(m.loading),n},click:function(){return G||"click"==f.on},extendSelect:function(){return f.allowAdditions||f.apiSettings},show:function(){return!L.is.disabled()&&(L.has.items()||L.has.message())},useAPI:function(){return te.fn.api!==oe}},animate:{show:function(e,t){var n=t||A,i=t?function(){}:function(){L.hideSubMenus(),L.hideOthers(),L.set.active()};e=te.isFunction(e)?e:function(){},L.verbose("Doing menu show animation",n),L.set.direction(t),t=f.transition.showMethod||L.get.transition(t),L.is.selection()&&L.set.scrollPosition(L.get.selectedItem(),!0),(L.is.hidden(n)||L.is.animating(n))&&("none"===t?(i(),n.transition({displayType:L.get.displayType()}).transition("show"),e.call(P)):te.fn.transition!==oe&&w.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:L.get.displayType(),onComplete:function(){e.call(P)}}):L.error(u.noTransition,t))},hide:function(e,t){var n=t||A,i=t?function(){}:function(){L.can.click()&&L.unbind.intent(),L.remove.active()},t=f.transition.hideMethod||L.get.transition(t);e=te.isFunction(e)?e:function(){},(L.is.visible(n)||L.is.animating(n))&&(L.verbose("Doing menu hide animation",n),"none"===t?(i(),n.transition({displayType:L.get.displayType()}).transition("hide"),e.call(P)):te.fn.transition!==oe&&w.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:L.get.displayType(),onComplete:function(){e.call(P)}}):L.error(u.transition))}},hideAndClear:function(){L.remove.searchTerm(),L.has.maxSelections()||(L.has.search()?L.hide(function(){L.remove.filteredItem()}):L.hide())},delay:{show:function(){L.verbose("Delaying show event to ensure user intent"),clearTimeout(L.timer),L.timer=setTimeout(L.show,f.delay.show)},hide:function(){L.verbose("Delaying hide event to ensure user intent"),clearTimeout(L.timer),L.timer=setTimeout(L.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(c.quote),o=[];return i||!n?e:(L.debug("Encoding quote values for use in select",e),t?(te.each(e,function(e,t){o.push(t.replace(c.quote,"&quot;"))}),o):e.replace(c.quote,"&quot;"))},string:function(e){return(e=String(e)).replace(c.escape,"\\$&")},htmlEntities:function(e){var t={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;")).replace(/[<>"'`]/g,function(e){return t[e]}):e}},setting:function(e,t){if(L.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,L,e);else{if(t===oe)return L[e];L[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?L.performance.log(arguments):(L.debug=Function.prototype.bind.call(console.info,console,f.name+":"),L.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?L.performance.log(arguments):(L.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),L.verbose.apply(console,arguments)))},error:function(){f.silent||(L.error=Function.prototype.bind.call(console.error,console,f.name+":"),L.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-(X||t),X=t,J.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:P,"Execution Time":n})),clearTimeout(L.performance.timer),L.performance.timer=setTimeout(L.performance.display,500)},display:function(){var e=f.name+":",n=0;X=!1,clearTimeout(L.performance.timer),te.each(J,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",Q&&(e+=" '"+Q+"'"),(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=I;return e=e||ee,t=P||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]:L.error(u.method,i),!1;r=r[t]}}})),te.isFunction(a)?n=a.apply(t,e):a!==oe&&(n=a),Array.isArray(B)?B.push(n):B!==oe?B=[B,n]:n!==oe&&(B=n),a}};_?(I===oe&&L.initialize(),L.invoke(Z)):(I!==oe&&I.invoke("destroy"),L.initialize())}),B!==oe?B: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?"&quot;":"")},escape:function(e,t){if(t)return e;var n={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;")).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(R,I,L,q){"use strict";R.isFunction=R.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")(),R.fn.form=function(k){var T,D=R(this),S=D.selector||"",A=(new Date).getTime(),E=[],F=k,O=arguments[1],M="string"==typeof F,P=[].slice.call(arguments,1);return D.each(function(){var n,d,t,e,f,l,m,p,g,i,c,o,a,s,u,h=R(this),v=this,b=[],y=!1,r=!1,w=!1,x=["clean","clean"],C={initialize:function(){C.get.settings(),M?(u===q&&C.instantiate(),C.invoke(F)):(u!==q&&(u.invoke("destroy"),C.refresh()),C.verbose("Initializing form validation",h,f),C.bindEvents(),C.set.defaults(),f.autoCheckRequired&&C.set.autoCheck(),C.instantiate())},instantiate:function(){C.verbose("Storing instance of module",C),u=C,h.data(a,C)},destroy:function(){C.verbose("Destroying previous module",u),C.removeEvents(),h.removeData(a)},refresh:function(){C.verbose("Refreshing selector cache"),n=h.find(p.field),d=h.find(p.group),t=h.find(p.message),h.find(p.prompt),e=h.find(p.submit),h.find(p.clear),h.find(p.reset)},submit:function(){C.verbose("Submitting form",h),r=!0,h.submit()},attachEvents:function(e,t){t=t||"submit",R(e).on("click"+s,function(e){C[t](),e.preventDefault()})},bindEvents:function(){C.verbose("Attaching form events"),h.on("submit"+s,C.validate.form).on("blur"+s,p.field,C.event.field.blur).on("click"+s,p.submit,C.submit).on("click"+s,p.reset,C.reset).on("click"+s,p.clear,C.clear),f.keyboardShortcuts&&h.on("keydown"+s,p.field,C.event.field.keydown),n.each(function(e,t){var t=R(t),n=t.prop("type"),n=C.get.changeEvent(n,t);t.on(n+s,C.event.field.change)}),f.preventLeaving&&R(I).on("beforeunload"+s,C.event.beforeUnload),n.on("change click keyup keydown blur",function(e){C.determine.isDirty()}),h.on("dirty"+s,function(e){f.onDirty.call()}),h.on("clean"+s,function(e){f.onClean.call()})},clear:function(){n.each(function(e,t){var t=R(t),n=t.parent(),i=t.closest(d),o=i.find(p.prompt),a=t.closest(p.uiCalendar),r=t.data(m.defaultValue)||"",s=n.is(p.uiCheckbox),l=n.is(p.uiDropdown)&&C.can.useElement("dropdown"),c=0<a.length&&C.can.useElement("calendar");i.hasClass(g.error)&&(C.verbose("Resetting error on field",i),i.removeClass(g.error),o.remove()),l?(C.verbose("Resetting dropdown value",n,r),n.dropdown("clear",!0)):s?t.prop("checked",!1):c?a.calendar("clear"):(C.verbose("Resetting field value",t,r),t.val(""))}),C.remove.states()},reset:function(){n.each(function(e,t){var t=R(t),n=t.parent(),i=t.closest(d),o=t.closest(p.uiCalendar),a=i.find(p.prompt),r=t.data(m.defaultValue),s=n.is(p.uiCheckbox),l=n.is(p.uiDropdown)&&C.can.useElement("dropdown"),c=0<o.length&&C.can.useElement("calendar"),u=i.hasClass(g.error);r!==q&&(u&&(C.verbose("Resetting error on field",i),i.removeClass(g.error),a.remove()),l?(C.verbose("Resetting dropdown value",n,r),n.dropdown("restore defaults",!0)):s?(C.verbose("Resetting checkbox value",n,r),t.prop("checked",r)):c?o.calendar("set date",r):(C.verbose("Resetting field value",t,r),t.val(r)))}),C.remove.states()},determine:{isValid:function(){var n=!0;return R.each(l,function(e,t){C.validate.field(t,e,!0)||(n=!1)}),n},isDirty:function(e){var i=!1;n.each(function(e,t){var t=R(t),n=0<t.filter(p.checkbox).length?C.is.checkboxDirty(t):C.is.fieldDirty(t);t.data(f.metadata.isDirty,n),i|=n}),i?C.set.dirty():C.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(p.checkbox)?!e.is(":checked"):C.is.blank(e))},blank:function(e){return""===String(e.val()).trim()},valid:function(e,n){var i=!0;return e?(C.verbose("Checking if field is valid",e),C.validate.field(l[e],e,!!n)):(C.verbose("Checking if form is valid"),R.each(l,function(e,t){C.is.valid(e,n)||(i=!1)}),i)},dirty:function(){return w},clean:function(){return!w},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"===x[0]},justClean:function(){return"clean"===x[0]}},removeEvents:function(){h.off(s),n.off(s),e.off(s),n.off(s)},event:{field:{keydown:function(e){var t=R(this),n=e.which,i=t.is(p.input),o=t.is(p.checkbox),a=0<t.closest(p.uiDropdown).length,r=13;n==27&&(C.verbose("Escape key pressed blurring field"),t[0].blur()),e.ctrlKey||n!=r||!i||a||o||(y||(t.one("keyup"+s,C.event.field.keyup),C.submit(),C.debug("Enter pressed on input submitting form")),y=!0)},keyup:function(){y=!1},blur:function(e){var t=R(this),n=t.closest(d),i=C.get.validation(t);i&&("blur"==f.on||n.hasClass(g.error)&&f.revalidate)&&(C.debug("Revalidating field",t,i),C.validate.field(i),f.inline||C.validate.form(!1,!0))},change:function(e){var t=R(this),n=t.closest(d),i=C.get.validation(t);i&&("change"==f.on||n.hasClass(g.error)&&f.revalidate)&&(clearTimeout(C.timer),C.timer=setTimeout(function(){C.debug("Revalidating field",t,i),C.validate.field(i),f.inline||C.validate.form(!1,!0)},f.delay))}},beforeUnload:function(e){if(C.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&&!C.is.bracketedRule(e))&&(e.value!==q?e.value:e.type.match(f.regExp.bracket)[1]+"")},ruleName:function(e){return C.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":C.get.inputEvent()},inputEvent:function(){return L.createElement("input").oninput!==q?"input":L.createElement("input").onpropertychange!==q?"propertychange":"keyup"},fieldsFromShorthand:function(e){var i={};return R.each(e,function(n,e){Array.isArray(e)||"object"!=typeof e?("string"==typeof e&&(e=[e]),i[n]={rules:[]},R.each(e,function(e,t){i[n].rules.push({type:t})})):i[n]=e}),i},prompt:function(e,t){var n,i=C.get.ruleName(e),o=C.get.ancillaryValue(e),a=C.get.field(t.identifier),r=a.val(),r=R.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(p.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||C.verbose("Using default validation prompt for type",r,i),r},settings:function(){var e;R.isPlainObject(k)?0<(e=Object.keys(k)).length&&(k[e[0]].identifier!==q&&k[e[0]].rules!==q)?(f=R.extend(!0,{},R.fn.form.settings,O),l=R.extend({},R.fn.form.settings.defaults,k),C.error(f.error.oldSyntax,v),C.verbose("Extending settings from legacy parameters",l,f)):(k.fields&&(k.fields=C.get.fieldsFromShorthand(k.fields)),f=R.extend(!0,{},R.fn.form.settings,k),l=R.extend({},R.fn.form.settings.defaults,f.fields),C.verbose("Extending settings",l,f)):(f=R.fn.form.settings,l=R.fn.form.settings.defaults,C.verbose("Using default form validation",l,f)),o=f.namespace,m=f.metadata,p=f.selector,g=f.className,i=f.regExp,c=f.error,a="module-"+o,s="."+o,((u=h.data(a))||C).refresh()},field:function(e){var t;return C.verbose("Finding field with identifier",e),e=C.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:R("<input/>")},fields:function(e){var n=R();return R.each(e,function(e,t){n=n.add(C.get.field(t))}),n},validation:function(i){var o,a;return!!l&&(R.each(l,function(e,n){a=n.identifier||e,R.each(C.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),C.get.values.call(v,t)[e]},values:function(e){var e=Array.isArray(e)?C.get.fields(e):n,d={};return e.each(function(e,t){var t=R(t),n=t.closest(p.uiCalendar),i=t.prop("name"),o=t.val(),a=t.is(p.checkbox),r=t.is(p.radio),s=-1!==i.indexOf("[]"),l=0<n.length&&C.can.useElement("calendar"),t=!!a&&t.is(":checked");if(i)if(s)i=i.replace("[]",""),d[i]||(d[i]=[]),a?t?d[i].push(o||!0):d[i].push(!1):d[i].push(o);else if(r)d[i]!==q&&!1!==d[i]||(d[i]=!!t&&(o||!0));else if(a)d[i]=!!t&&(o||!0);else if(l){var c=n.calendar("get date");if(null!==c){if("date"==f.dateHandling)d[i]=c;else if("input"==f.dateHandling)d[i]=n.calendar("get input date");else if("formatter"==f.dateHandling){var u=n.calendar("setting","type");switch(u){case"date":d[i]=f.formatter.date(c);break;case"datetime":d[i]=f.formatter.datetime(c);break;case"time":d[i]=f.formatter.time(c);break;case"month":d[i]=f.formatter.month(c);break;case"year":d[i]=f.formatter.year(c);break;default:C.debug("Wrong calendar mode",n,u),d[i]=""}}}else d[i]=""}else d[i]=o}),d},dirtyFields:function(){return n.filter(function(e,t){return R(t).data(m.isDirty)})}},has:{field:function(e){return C.verbose("Checking for existence of a field with identifier",e),"string"!=typeof(e=C.escape.string(e))&&C.error(c.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 R.fn[e]!==q||(C.error(c.noElement.replace("{element}",e)),!1)}},escape:{string:function(e){return(e=String(e)).replace(i.escape,"\\$&")}},add:{rule:function(e,t){C.add.field(e,t)},field:function(n,e){l[n]!==q&&l[n].rules!==q||(l[n]={rules:[]});var i={rules:[]};C.is.shorthandRules(e)?(e=Array.isArray(e)?e:[e],R.each(e,function(e,t){i.rules.push({type:t})})):i.rules=e.rules,R.each(i.rules,function(e,t){0==R.grep(l[n].rules,function(e){return e.type==t.type}).length&&l[n].rules.push(t)}),C.debug("Adding rules",i.rules,l)},fields:function(e){l=R.extend({},l,C.get.fieldsFromShorthand(e))},prompt:function(e,t,n){var i=C.get.field(e).closest(d),o=i.children(p.prompt),a=0!==o.length;t="string"==typeof t?[t]:t,C.verbose("Adding field error state",e),n||i.addClass(g.error),f.inline&&(a||(o=f.templates.prompt(t,g.label)).appendTo(i),o.html(t[0]),a?C.verbose("Inline errors are disabled, no inline error added",e):f.transition&&C.can.useElement("transition")&&h.transition("is supported")?(C.verbose("Displaying error with css transition",f.transition),o.transition(f.transition+" in",f.duration)):(C.verbose("Displaying error with fallback javascript animation"),o.fadeIn(f.duration)))},errors:function(e){C.debug("Adding form error messages",e),C.set.error(),t.html(f.templates.error(e))}},remove:{errors:function(){C.debug("Removing form error messages"),t.empty()},states:function(){h.removeClass(g.error).removeClass(g.success),f.inline||C.remove.errors(),C.determine.isDirty()},rule:function(n,e){var i=Array.isArray(e)?e:[e];if(l[n]!==q&&Array.isArray(l[n].rules))return e===q?(C.debug("Removed all rules"),void(l[n].rules=[])):void R.each(l[n].rules,function(e,t){t&&-1!==i.indexOf(t.type)&&(C.debug("Removed rule",t.type),l[n].rules.splice(e,1))})},field:function(e){e=Array.isArray(e)?e:[e];R.each(e,function(e,t){C.remove.rule(t)})},rules:function(e,n){Array.isArray(e)?R.each(e,function(e,t){C.remove.rule(t,n)}):C.remove.rule(e,n)},fields:function(e){C.remove.field(e)},prompt:function(e){var t=C.get.field(e).closest(d),n=t.children(p.prompt);t.removeClass(g.error),f.inline&&n.is(":visible")&&(C.verbose("Removing prompt for field",e),f.transition&&C.can.useElement("transition")&&h.transition("is supported")?n.transition(f.transition+" out",f.duration,function(){n.remove()}):n.fadeOut(f.duration,function(){n.remove()}))}},set:{success:function(){h.removeClass(g.error).addClass(g.success)},defaults:function(){n.each(function(e,t){var t=R(t),n=t.parent(),i=0<t.filter(p.checkbox).length,o=n.is(p.uiDropdown)&&C.can.useElement("dropdown"),a=t.closest(p.uiCalendar),r=0<a.length&&C.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(){h.removeClass(g.success).addClass(g.error)},value:function(e,t){var n={};return n[e]=t,C.set.values.call(v,n)},values:function(e){R.isEmptyObject(e)||R.each(e,function(e,t){var n,i=C.get.field(e),o=i.parent(),e=i.closest(p.uiCalendar),a=Array.isArray(t),r=o.is(p.uiCheckbox)&&C.can.useElement("checkbox"),s=o.is(p.uiDropdown)&&C.can.useElement("dropdown"),l=i.is(p.radio)&&r,c=0<e.length&&C.can.useElement("calendar");0<i.length&&(a&&r?(C.verbose("Selecting multiple",t,i),o.checkbox("uncheck"),R.each(t,function(e,t){n=i.filter('[value="'+t+'"]'),o=n.parent(),0<n.length&&o.checkbox("check")})):l?(C.verbose("Selecting radio value",t,i),i.filter('[value="'+t+'"]').parent(p.uiCheckbox).checkbox("check")):r?(C.verbose("Setting checkbox value",t,o),!0===t||1===t?o.checkbox("check"):o.checkbox("uncheck")):s?(C.verbose("Setting dropdown value",t,o),o.dropdown("set selected",t)):c?e.calendar("set date",t):(C.verbose("Setting field value",t,i),i.val(t)))})},dirty:function(){C.verbose("Setting state dirty"),w=!0,x[0]=x[1],x[1]="dirty",C.is.justClean()&&h.trigger("dirty")},clean:function(){C.verbose("Setting state clean"),w=!1,x[0]=x[1],x[1]="clean",C.is.justDirty()&&h.trigger("clean")},asClean:function(){C.set.defaults(),C.set.clean()},asDirty:function(){C.set.defaults(),C.set.dirty()},autoCheck:function(){C.debug("Enabling auto check on required fields"),n.each(function(e,t){var n=R(t),t=R(t).closest(d),i=0<n.filter(p.checkbox).length,o=n.prop("required")||t.hasClass(g.required)||t.parent().hasClass(g.required),t=n.is(":disabled")||t.hasClass(g.disabled)||t.parent().hasClass(g.disabled),a=C.get.validation(n),r=!!a&&0!==R.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===q||(i?(C.verbose("Adding 'checked' rule on field",a),C.add.rule(a,"checked")):(C.verbose("Adding 'empty' rule on field",a),C.add.rule(a,"empty")))})},optional:function(n,i){i=!1!==i,R.each(l,function(e,t){n!=e&&n!=t.identifier||(t.optional=i)})}},validate:{form:function(e,t){var n,i=C.get.values();if(y)return!1;if(b=[],C.determine.isValid()){if(C.debug("Form has no validation errors, submitting"),C.set.success(),f.inline||C.remove.errors(),!0!==t)return f.onSuccess.call(v,e,i)}else if(C.debug("Form has errors"),r=!1,C.set.error(),f.inline||C.add.errors(b),e&&h.data("moduleApi")!==q&&e.stopImmediatePropagation(),f.errorFocus&&(e=!0,"string"==typeof f.errorFocus?(e=(n=R(f.errorFocus)).is("[tabindex]"))||n.attr("tabindex",-1):n=d.filter("."+g.error).first().find(p.field),n.focus(),e||n.removeAttr("tabindex")),!0!==t)return f.onFailure.call(v,b,i)},field:function(i,e,o){o=o===q||o,"string"==typeof i&&(C.verbose("Validating field",i),i=l[e=i]);var a=i.identifier||e,e=C.get.field(a),t=!!i.depends&&C.get.field(i.depends),r=!0,s=[];return i.identifier||(C.debug("Using field name as identifier",a),i.identifier=a),!e.filter(":not(:disabled)").length?C.debug("Field is disabled. Skipping",a):i.optional&&C.is.blank(e)?C.debug("Field is optional and blank. Skipping",a):i.depends&&C.is.empty(t)?C.debug("Field depends on another value that is not present or empty. Skipping",t):i.rules!==q&&(o&&e.closest(d).removeClass(g.error),R.each(i.rules,function(e,t){var n;C.has.field(a)&&0<(n=C.validate.rule(i,t,!0)||[]).length&&(C.debug("Field is invalid",a,t.type),s.push(C.get.prompt(t,i)),r=!1,o&&R(n).closest(d).addClass(g.error))})),r?(o&&(C.remove.prompt(a,s),f.onValid.call(e)),!0):(o&&(b=b.concat(s),C.add.prompt(a,s,!0),f.onInvalid.call(e,s)),!1)},rule:function(e,n,t){function i(e){var t=(t=(l?R(e).filter(":checked"):R(e)).val())===q||""===t||null===t?"":f.shouldTrim&&!1!==n.shouldTrim||n.shouldTrim?String(t+"").trim():String(t+"");return r.call(e,t,o,h)}var e=C.get.field(e.identifier),o=C.get.ancillaryValue(n),a=C.get.ruleName(n),r=f.rules[a],s=[],l=e.is(p.checkbox);if(R.isFunction(r))return l?i(e)||(s=e):R.each(e,function(e,t){i(t)||s.push(t)}),t?s:!(0<s.length);C.error(c.noRule,a)}},setting:function(e,t){if(R.isPlainObject(e))R.extend(!0,f,e);else{if(t===q)return f[e];f[e]=t}},internal:function(e,t){if(R.isPlainObject(e))R.extend(!0,C,e);else{if(t===q)return C[e];C[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,f.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),C.verbose.apply(console,arguments)))},error:function(){f.silent||(C.error=Function.prototype.bind.call(console.error,console,f.name+":"),C.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:v,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){var e=f.name+":",n=0;A=!1,clearTimeout(C.performance.timer),R.each(E,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",S&&(e+=" '"+S+"'"),1<D.length&&(e+=" ("+D.length+")"),(console.group!==q||console.table!==q)&&0<E.length&&(console.groupCollapsed(e),console.table?console.table(E):R.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=u;return e=e||P,t=v||t,"string"==typeof i&&r!==q&&(i=i.split(/[\. ]/),o=i.length-1,R.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(R.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==q)return a=r[n],!1;{if(!R.isPlainObject(r[t])||e==o)return r[t]!==q&&(a=r[t]),!1;r=r[t]}}})),R.isFunction(a)?n=a.apply(t,e):a!==q&&(n=a),Array.isArray(T)?T.push(n):T!==q?T=[T,n]:n!==q&&(T=n),a}};C.initialize()}),T!==q?T:this},R.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 R.each(e,function(e,t){n+="<li>"+t+"</li>"}),R(n+="</ul>")},prompt:function(e,t){return R("<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===q||""===e||Array.isArray(e)&&0===e.length)},checked:function(){return 0<R(this).filter(":checked").length},email:function(e){return R.fn.form.settings.regExp.email.test(e)},url:function(e){return R.fn.form.settings.regExp.url.test(e)},regExp:function(e,t){if(t instanceof RegExp)return e.match(t);var n,i=t.match(R.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 R.fn.form.settings.rules.range(e,t+"..","number")},maxValue:function(e,t){return R.fn.form.settings.rules.range(e,".."+t,"number")},integer:function(e,t){return R.fn.form.settings.rules.range(e,t,"integer")},range:function(e,t,n){var i,o;return(n="string"==typeof n?R.fn.form.settings.regExp[n]:n)instanceof RegExp||(n=R.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===q||i<=e)&&(o===q||e<=o)},decimal:function(e,t){return R.fn.form.settings.rules.range(e,t,"decimal")},number:function(e,t){return R.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(R.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t,"i"))},containsExactly:function(e,t){return t=t.replace(R.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t))},doesntContain:function(e,t){return t=t.replace(R.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t,"i"))},doesntContainExactly:function(e,t){return t=t.replace(R.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t))},minLength:function(e,t){return e!==q&&e.length>=t},length:function(e,t){return e!==q&&e.length>=t},exactLength:function(e,t){return e!==q&&e.length==t},maxLength:function(e,t){return e!==q&&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!==q&&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!==q&&e.toString()!==i.toString()},creditCard:function(n,e){var i,o={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]}},a=!1,e="string"==typeof e&&e.split(",");if("string"==typeof n&&0!==n.length){if(n=n.replace(/[\s\-]/g,""),e&&(R.each(e,function(e,t){(i=o[t])&&(i={length:-1!==R.inArray(n.length,i.length),pattern:-1!==n.search(i.pattern)}).length&&i.pattern&&(a=!0)}),!a))return!1;if((e={number:-1!==R.inArray(n.length,o.unionPay.length),pattern:-1!==n.search(o.unionPay.pattern)}).number&&e.pattern)return!0;for(var t=n.length,r=0,s=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],l=0;t--;)l+=s[r][parseInt(n.charAt(t),10)],r^=1;return l%10==0&&0<l}},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(H,V,z,U){"use strict";H.isFunction=H.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")(),H.fn.modal=function(A){var E,e=H(this),F=H(V),O=H(z),M=H("body"),P=e.selector||"",R=(new Date).getTime(),I=[],L=A,q="string"==typeof L,j=[].slice.call(arguments,1),N=V.requestAnimationFrame||V.mozRequestAnimationFrame||V.webkitRequestAnimationFrame||V.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var o,a,e,i,t,r,s,n,l,c,u=H.isPlainObject(A)?H.extend(!0,{},H.fn.modal.settings,A):H.extend({},H.fn.modal.settings),d=u.selector,f=u.className,m=u.namespace,p=u.fields,g=u.error,h="."+m,v="module-"+m,b=H(this),y=H(u.context),w=b.find(d.close),x=this,C=b.hasClass("modal")?b.data(v):U,k=!1,T="",D="",S={initialize:function(){var a;b.hasClass("modal")||(S.create.modal(),H.isFunction(u.onHidden)||(u.onHidden=function(){S.destroy(),b.remove()})),b.addClass(u.class),""!==u.title&&b.find(d.title).html(S.helpers.escape(u.title,u.preserveHTML)).addClass(u.classTitle),""!==u.content&&b.find(d.content).html(S.helpers.escape(u.content,u.preserveHTML)).addClass(u.classContent),S.has.configActions()&&(0===(a=b.find(d.actions).addClass(u.classActions)).length?a=H("<div/>",{class:f.actions+" "+(u.classActions||"")}).appendTo(b):a.empty(),u.actions.forEach(function(e){var t=e[p.icon]?'<i class="'+S.helpers.deQuote(e[p.icon])+' icon"></i>':"",n=S.helpers.escape(e[p.text]||"",u.preserveHTML),i=S.helpers.deQuote(e[p.class]||""),o=e[p.click]&&H.isFunction(e[p.click])?e[p.click]:function(){};a.append(H("<button/>",{html:t+n,class:f.button+" "+i,click:function(){!1!==o.call(x,b)&&S.hide()}}))})),S.cache={},S.verbose("Initializing dimmer",y),S.create.id(),S.create.dimmer(),u.allowMultiple&&S.create.innerDimmer(),u.centered||b.addClass("top aligned"),S.refreshModals(),S.bind.events(),u.observeChanges&&S.observeChanges(),S.instantiate(),u.autoShow&&S.show()},instantiate:function(){S.verbose("Storing instance of modal"),C=S,b.data(v,C)},create:{modal:function(){b=H("<div/>",{class:f.modal}),u.closeIcon&&(w=H("<i/>",{class:f.close}),b.append(w)),""!==u.title&&H("<div/>",{class:f.title}).appendTo(b),""!==u.content&&H("<div/>",{class:f.content}).appendTo(b),S.has.configActions()&&H("<div/>",{class:f.actions}).appendTo(b),y.append(b)},dimmer:function(){var e={debug:u.debug,dimmerName:"modals"},e=H.extend(!0,e,u.dimmerSettings);H.fn.dimmer===U?S.error(g.dimmer):(S.debug("Creating dimmer"),i=y.dimmer(e),u.detachable?(S.verbose("Modal is detachable, moving content into dimmer"),i.dimmer("add content",b)):S.set.undetached(),t=i.dimmer("get dimmer"))},id:function(){l=(Math.random().toString(16)+"000000000").substr(2,8),n="."+l,S.verbose("Creating unique id for element",l)},innerDimmer:function(){0==b.find(d.dimmer).length&&b.prepend('<div class="ui inverted dimmer"></div>')}},destroy:function(){c&&c.disconnect(),S.verbose("Destroying previous modal"),b.removeData(v).off(h),F.off(n),t.off(n),w.off(h),y.dimmer("destroy")},observeChanges:function(){"MutationObserver"in V&&((c=new MutationObserver(function(e){S.debug("DOM tree modified, refreshing"),S.refresh()})).observe(x,{childList:!0,subtree:!0}),S.debug("Setting up mutation observer",c))},refresh:function(){S.remove.scrolling(),S.cacheSizes(),S.can.useFlex()||S.set.modalOffset(),S.set.screenHeight(),S.set.type()},refreshModals:function(){a=b.siblings(d.modal),o=a.add(b)},attachEvents:function(e,t){var n=H(e);t=H.isFunction(S[t])?S[t]:S.toggle,0<n.length?(S.debug("Attaching modal events to element",e,t),n.off(h).on("click"+h,t)):S.error(g.notFound,e)},bind:{events:function(){S.verbose("Attaching events"),b.on("click"+h,d.close,S.event.close).on("click"+h,d.approve,S.event.approve).on("click"+h,d.deny,S.event.deny),F.on("resize"+n,S.event.resize)},scrollLock:function(){i.get(0).addEventListener("touchmove",S.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){i.get(0).removeEventListener("touchmove",S.event.preventScroll,{passive:!1})}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)},element:function(){return b},settings:function(){return u}},event:{approve:function(){k||!1===u.onApprove.call(x,H(this))?S.verbose("Approve callback returned false cancelling hide"):(k=!0,S.hide(function(){k=!1}))},preventScroll:function(e){-1!==e.target.className.indexOf("dimmer")&&e.preventDefault()},deny:function(){k||!1===u.onDeny.call(x,H(this))?S.verbose("Deny callback returned false cancelling hide"):(k=!0,S.hide(function(){k=!1}))},close:function(){S.hide()},mousedown:function(e){var t=H(e.target),n=S.is.rtl();(r=0<t.closest(d.modal).length)&&S.verbose("Mouse down event registered inside the modal"),(s=S.is.scrolling()&&(!n&&H(V).outerWidth()-u.scrollbarWidth<=e.clientX||n&&u.scrollbarWidth>=e.clientX))&&S.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(u.closable)if(r)S.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(s)S.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var t=0<H(e.target).closest(d.modal).length,e=H.contains(z.documentElement,e.target);if(!t&&e&&S.is.active()&&b.hasClass(f.front)){if(S.debug("Dimmer clicked, hiding all modals"),u.allowMultiple){if(!S.hideAll())return}else if(!S.hide())return;S.remove.clickaway()}}else S.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(S.timer),S.timer=setTimeout(e,t)},keyboard:function(e){27==e.which&&(u.closable?(S.debug("Escape key pressed hiding modal"),b.hasClass(f.front)&&S.hide()):S.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){i.dimmer("is active")&&(S.is.animating()||S.is.active())&&N(S.refresh)}},toggle:function(){S.is.active()||S.is.animating()?S.hide():S.show()},show:function(e){e=H.isFunction(e)?e:function(){},S.refreshModals(),S.set.dimmerSettings(),S.set.dimmerStyles(),S.showModal(e)},hide:function(e){return e=H.isFunction(e)?e:function(){},S.refreshModals(),S.hideModal(e)},showModal:function(e){e=H.isFunction(e)?e:function(){},S.is.animating()||!S.is.active()?(S.showDimmer(),S.cacheSizes(),S.set.bodyMargin(),S.can.useFlex()?S.remove.legacy():(S.set.legacy(),S.set.modalOffset(),S.debug("Using non-flex legacy modal positioning.")),S.set.screenHeight(),S.set.type(),S.set.clickaway(),!u.allowMultiple&&S.others.active()?S.hideOthers(S.showModal):(k=!1,u.allowMultiple&&(S.others.active()&&a.filter("."+f.active).find(d.dimmer).addClass("active"),u.detachable&&b.detach().appendTo(t)),u.onShow.call(x),u.transition&&H.fn.transition!==U&&b.transition("is supported")?(S.debug("Showing modal with css animations"),b.transition({debug:u.debug,animation:(u.transition.showMethod||u.transition)+" in",queue:u.queue,duration:u.transition.showDuration||u.duration,useFailSafe:!0,onComplete:function(){u.onVisible.apply(x),u.keyboardShortcuts&&S.add.keyboardShortcuts(),S.save.focus(),S.set.active(),u.autofocus&&S.set.autofocus(),e()}})):S.error(g.noTransition))):S.debug("Modal is already visible")},hideModal:function(e,t,n){var i=a.filter("."+f.active).last();if(e=H.isFunction(e)?e:function(){},S.debug("Hiding modal"),!1===u.onHide.call(x,H(this)))return S.verbose("Hide callback returned false cancelling hide"),k=!1;(S.is.animating()||S.is.active())&&(u.transition&&H.fn.transition!==U&&b.transition("is supported")?(S.remove.active(),b.transition({debug:u.debug,animation:(u.transition.hideMethod||u.transition)+" out",queue:u.queue,duration:u.transition.hideDuration||u.duration,useFailSafe:!0,onStart:function(){S.others.active()||S.others.animating()||t||S.hideDimmer(),u.keyboardShortcuts&&!S.others.active()&&S.remove.keyboardShortcuts()},onComplete:function(){S.unbind.scrollLock(),u.allowMultiple&&(i.addClass(f.front),b.removeClass(f.front),(n?o:i).find(d.dimmer).removeClass("active")),H.isFunction(u.onHidden)&&u.onHidden.call(x),S.remove.dimmerStyles(),S.restore.focus(),e()}})):S.error(g.noTransition))},showDimmer:function(){i.dimmer("is animating")||!i.dimmer("is active")?(S.save.bodyMargin(),S.debug("Showing dimmer"),i.dimmer("show")):S.debug("Dimmer already visible")},hideDimmer:function(){i.dimmer("is animating")||i.dimmer("is active")?(S.unbind.scrollLock(),i.dimmer("hide",function(){S.restore.bodyMargin(),S.remove.clickaway(),S.remove.screenHeight()})):S.debug("Dimmer is not visible cannot hide")},hideAll:function(n){var i,e=o.filter("."+f.active+", ."+f.animating);if(n=H.isFunction(n)?n:function(){},0<e.length)return S.debug("Hiding all visible modals"),i=!0,H(e.get().reverse()).each(function(e,t){i=i&&H(t).modal("hide modal",n,!1,!0)}),i&&S.hideDimmer(),i},hideOthers:function(e){var t=a.filter("."+f.active+", ."+f.animating);e=H.isFunction(e)?e:function(){},0<t.length&&(S.debug("Hiding other modals",a),t.modal("hide modal",e,!0))},others:{active:function(){return 0<a.filter("."+f.active).length},animating:function(){return 0<a.filter("."+f.animating).length}},add:{keyboardShortcuts:function(){S.verbose("Adding keyboard shortcuts"),O.on("keyup"+h,S.event.keyboard)}},save:{focus:function(){0<H(z.activeElement).closest(b).length||(e=H(z.activeElement).blur())},bodyMargin:function(){T=M.css("margin-"+(S.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(T.replace(/[^\d.]/g,"")),t=V.innerWidth-z.documentElement.clientWidth;D=e+t}},restore:{focus:function(){e&&0<e.length&&u.restoreFocus&&e.focus()},bodyMargin:function(){var n=S.can.leftBodyScrollbar()?"left":"right";M.css("margin-"+n,T),M.find(d.bodyFixed.replace("right",n)).each(function(){var e=H(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},remove:{active:function(){b.removeClass(f.active)},legacy:function(){b.removeClass(f.legacy)},clickaway:function(){u.detachable||b.off("mousedown"+n),t.off("mousedown"+n),t.off("mouseup"+n)},dimmerStyles:function(){t.removeClass(f.inverted),i.removeClass(f.blurring)},bodyStyle:function(){""===M.attr("style")&&(S.verbose("Removing style attribute"),M.removeAttr("style"))},screenHeight:function(){S.debug("Removing page height"),M.css("height","")},keyboardShortcuts:function(){S.verbose("Removing keyboard shortcuts"),O.off("keyup"+h)},scrolling:function(){i.removeClass(f.scrolling),b.removeClass(f.scrolling)}},cacheSizes:function(){b.addClass(f.loading);var e=b.prop("scrollHeight"),t=b.outerWidth(),n=b.outerHeight();S.cache.pageHeight!==U&&0===n||(H.extend(S.cache,{pageHeight:H(z).outerHeight(),width:t,height:n+u.offset,scrollHeight:e+u.offset,contextHeight:("body"==u.context?H(V):i).height()}),S.cache.topOffset=-S.cache.height/2),b.removeClass(f.loading),S.debug("Caching modal and container sizes",S.cache)},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{leftBodyScrollbar:function(){return S.cache.leftBodyScrollbar===U&&(S.cache.leftBodyScrollbar=S.is.rtl()&&(S.is.iframe&&!S.is.firefox()||S.is.safari()||S.is.edge()||S.is.ie())),S.cache.leftBodyScrollbar},useFlex:function(){return"auto"===u.useFlex?u.detachable&&!S.is.ie():(u.useFlex&&S.is.ie()?S.debug("useFlex true is not supported in IE"):u.useFlex&&!u.detachable&&S.debug("useFlex true in combination with detachable false is not supported"),u.useFlex)},fit:function(){var e=S.cache.contextHeight,t=S.cache.contextHeight/2,n=S.cache.topOffset,i=S.cache.scrollHeight,o=S.cache.height,a=u.padding;return o<i?t+n+i+a<e:o+2*a<e}},has:{configActions:function(){return Array.isArray(u.actions)&&0<u.actions.length}},is:{active:function(){return b.hasClass(f.active)},ie:function(){var e,t;return S.cache.isIE===U&&(e=!V.ActiveXObject&&"ActiveXObject"in V,t="ActiveXObject"in V,S.cache.isIE=e||t),S.cache.isIE},animating:function(){return b.transition("is supported")?b.transition("is animating"):b.is(":visible")},scrolling:function(){return i.hasClass(f.scrolling)},modernBrowser:function(){return!(V.ActiveXObject||"ActiveXObject"in V)},rtl:function(){return S.cache.isRTL===U&&(S.cache.isRTL="rtl"===M.attr("dir")||"rtl"===M.css("direction")),S.cache.isRTL},safari:function(){return S.cache.isSafari===U&&(S.cache.isSafari=/constructor/i.test(V.HTMLElement)||!!V.ApplePaySession),S.cache.isSafari},edge:function(){return S.cache.isEdge===U&&(S.cache.isEdge=!!V.setImmediate&&!S.is.ie()),S.cache.isEdge},firefox:function(){return S.cache.isFirefox===U&&(S.cache.isFirefox=!!V.InstallTrigger),S.cache.isFirefox},iframe:function(){return!(self===top)}},set:{autofocus:function(){var e=b.find("[tabindex], :input").filter(":visible").filter(function(){return 0===H(this).closest(".disabled").length}),t=e.filter("[autofocus]"),t=(0<t.length?t:e).first();0<t.length&&t.focus()},bodyMargin:function(){var n=S.can.leftBodyScrollbar()?"left":"right";(u.detachable||S.can.fit())&&M.css("margin-"+n,D+"px"),M.find(d.bodyFixed.replace("right",n)).each(function(){var e=H(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+D+"px)")})},clickaway:function(){u.detachable||b.on("mousedown"+n,S.event.mousedown),t.on("mousedown"+n,S.event.mousedown),t.on("mouseup"+n,S.event.mouseup)},dimmerSettings:function(){var e;H.fn.dimmer===U?S.error(g.dimmer):(e={debug:u.debug,dimmerName:"modals",closable:"auto",useFlex:S.can.useFlex(),duration:{show:u.transition.showDuration||u.duration,hide:u.transition.hideDuration||u.duration}},e=H.extend(!0,e,u.dimmerSettings),u.inverted&&(e.variation=e.variation!==U?e.variation+" inverted":"inverted"),y.dimmer("setting",e))},dimmerStyles:function(){u.inverted?t.addClass(f.inverted):t.removeClass(f.inverted),u.blurring?i.addClass(f.blurring):i.removeClass(f.blurring)},modalOffset:function(){var e;u.detachable?b.css({marginTop:!b.hasClass("aligned")&&S.can.fit()?-S.cache.height/2:u.padding/2,marginLeft:-S.cache.width/2}):(e=S.can.fit(),b.css({top:!b.hasClass("aligned")&&e?H(z).scrollTop()+(S.cache.contextHeight-S.cache.height)/2:!e||b.hasClass("top")?H(z).scrollTop()+u.padding:H(z).scrollTop()+(S.cache.contextHeight-S.cache.height-u.padding),marginLeft:-S.cache.width/2})),S.verbose("Setting modal offset for legacy mode")},screenHeight:function(){S.can.fit()?M.css("height",""):b.hasClass("bottom")||(S.debug("Modal is taller than page content, resizing page height"),M.css("height",S.cache.height+2*u.padding))},active:function(){b.addClass(f.active+" "+f.front),a.filter("."+f.active).removeClass(f.front)},scrolling:function(){i.addClass(f.scrolling),b.addClass(f.scrolling),S.unbind.scrollLock()},legacy:function(){b.addClass(f.legacy)},type:function(){S.can.fit()?(S.verbose("Modal fits on screen"),S.others.active()||S.others.animating()||(S.remove.scrolling(),S.bind.scrollLock())):b.hasClass("bottom")?S.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(S.verbose("Modal cannot fit on screen setting to scrolling"),S.set.scrolling())},undetached:function(){i.addClass(f.undetached)}},setting:function(e,t){if(S.debug("Changing setting",e,t),H.isPlainObject(e))H.extend(!0,u,e);else{if(t===U)return u[e];H.isPlainObject(u[e])?H.extend(!0,u[e],t):u[e]=t}},internal:function(e,t){if(H.isPlainObject(e))H.extend(!0,S,e);else{if(t===U)return S[e];S[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?S.performance.log(arguments):(S.debug=Function.prototype.bind.call(console.info,console,u.name+":"),S.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?S.performance.log(arguments):(S.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),S.verbose.apply(console,arguments)))},error:function(){u.silent||(S.error=Function.prototype.bind.call(console.error,console,u.name+":"),S.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(R||t),R=t,I.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":n})),clearTimeout(S.performance.timer),S.performance.timer=setTimeout(S.performance.display,500)},display:function(){var e=u.name+":",n=0;R=!1,clearTimeout(S.performance.timer),H.each(I,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",P&&(e+=" '"+P+"'"),(console.group!==U||console.table!==U)&&0<I.length&&(console.groupCollapsed(e),console.table?console.table(I):H.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=C;return e=e||j,t=x||t,"string"==typeof i&&r!==U&&(i=i.split(/[\. ]/),o=i.length-1,H.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(H.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==U)return a=r[n],!1;{if(!H.isPlainObject(r[t])||e==o)return r[t]!==U&&(a=r[t]),!1;r=r[t]}}})),H.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}};q?(C===U&&(H.isFunction(u.templates[L])&&(u.autoShow=!0,u.className.modal=u.className.template,u=H.extend(!0,{},u,u.templates[L].apply(S,j)),f=u.className,u.namespace,p=u.fields,g=u.error),S.initialize()),H.isFunction(u.templates[L])||S.invoke(L)):(C!==U&&C.invoke("destroy"),S.initialize(),E=b)}),E!==U?E:this},H.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"}},H.fn.modal.settings.templates={getArguments:function(e){e=[].slice.call(e);return H.isPlainObject(e[0])?H.extend({handler:function(){},content:"",title:""},e[0]):(H.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===H(H.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(H(e).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){n.handler(null)}}]}}}}(jQuery,window,document),function(q,j,N,H){"use strict";q.isFunction=q.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},j=void 0!==j&&j.Math==Math?j:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),q.fn.popup=function(T){var D,e=q(this),S=q(N),A=q(j),E=q("body"),F=e.selector||"",O="ontouchstart"in N.documentElement?"touchstart":"click",M=(new Date).getTime(),P=[],R=T,I="string"==typeof R,L=[].slice.call(arguments,1);return e.each(function(){var c,s,e,t,n,u=q.isPlainObject(T)?q.extend(!0,{},q.fn.popup.settings,T):q.extend({},q.fn.popup.settings),i=u.selector,d=u.className,f=u.error,m=u.metadata,o=u.namespace,a="."+u.namespace,r="module-"+o,p=q(this),l=q(u.context),g=q(u.scrollContext),h=q(u.boundary),v=u.target?q(u.target):p,b=0,y=!1,w=!1,x=this,C=p.data(r),k={initialize:function(){k.debug("Initializing",p),k.createID(),k.bind.events(),!k.exists()&&u.preserve&&k.create(),u.observeChanges&&k.observeChanges(),k.instantiate()},instantiate:function(){k.verbose("Storing instance",k),C=k,p.data(r,C)},observeChanges:function(){"MutationObserver"in j&&((e=new MutationObserver(k.event.documentChanged)).observe(N,{childList:!0,subtree:!0}),k.debug("Setting up mutation observer",e))},refresh:function(){u.popup?c=q(u.popup).eq(0):u.inline&&(c=v.nextAll(i.popup).eq(0),u.popup=c),u.popup?(c.addClass(d.loading),s=k.get.offsetParent(),c.removeClass(d.loading),u.movePopup&&k.has.popup()&&k.get.offsetParent(c)[0]!==s[0]&&(k.debug("Moving popup to the same offset parent as target"),c.detach().appendTo(s))):s=u.inline?k.get.offsetParent(v):k.has.popup()?k.get.offsetParent(c):E,s.is("html")&&s[0]!==E[0]&&(k.debug("Setting page as offset parent"),s=E),k.get.variation()&&k.set.variation()},reposition:function(){k.refresh(),k.set.position()},destroy:function(){k.debug("Destroying previous module"),e&&e.disconnect(),c&&!u.preserve&&k.removePopup(),clearTimeout(k.hideTimer),clearTimeout(k.showTimer),k.unbind.close(),k.unbind.events(),p.removeData(r)},event:{start:function(e){var t=q.isPlainObject(u.delay)?u.delay.show:u.delay;clearTimeout(k.hideTimer),w&&!u.addTouchEvents||(k.showTimer=setTimeout(k.show,t))},end:function(){var e=q.isPlainObject(u.delay)?u.delay.hide:u.delay;clearTimeout(k.showTimer),k.hideTimer=setTimeout(k.hide,e)},touchstart:function(e){w=!0,u.addTouchEvents&&k.show()},resize:function(){k.is.visible()&&k.set.position()},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==x||0<q(e).find(x).length)&&(k.debug("Element removed from DOM, tearing down events"),k.destroy())})})},hideGracefully:function(e){var t=q(e.target),n=q.contains(N.documentElement,e.target),t=0<t.closest(i.popup).length;e&&!t&&n?(k.debug("Click occurred outside popup hiding popup"),k.hide()):k.debug("Click was inside popup, keeping popup open")}},create:function(){var e=k.get.html(),t=k.get.title(),n=k.get.content();e||n||t?(k.debug("Creating pop-up html"),e=e||u.templates.popup({title:t,content:n}),c=q("<div/>").addClass(d.popup).data(m.activator,p).html(e),u.inline?(k.verbose("Inserting popup element inline",c),c.insertAfter(p)):(k.verbose("Appending popup element to body",c),c.appendTo(l)),k.refresh(),k.set.variation(),u.hoverable&&k.bind.popup(),u.onCreate.call(c,x)):u.popup?(q(u.popup).data(m.activator,p),k.verbose("Used popup specified in settings"),k.refresh(),u.hoverable&&k.bind.popup()):0!==v.next(i.popup).length?(k.verbose("Pre-existing popup found"),u.inline=!0,u.popup=v.next(i.popup).data(m.activator,p),k.refresh(),u.hoverable&&k.bind.popup()):k.debug("No content specified skipping display",x)},createID:function(){n=(Math.random().toString(16)+"000000000").substr(2,8),t="."+n,k.verbose("Creating unique id for element",n)},toggle:function(){k.debug("Toggling pop-up"),k.is.hidden()?(k.debug("Popup is hidden, showing pop-up"),k.unbind.close(),k.show()):(k.debug("Popup is visible, hiding pop-up"),k.hide())},show:function(e){e=e||function(){},k.debug("Showing pop-up",u.transition),!k.is.hidden()||k.is.active()&&k.is.dropdown()||(k.exists()||k.create(),!1===u.onShow.call(c,x)?k.debug("onShow callback returned false, cancelling popup animation"):(u.preserve||u.popup||k.refresh(),c&&k.set.position()&&(k.save.conditions(),u.exclusive&&k.hideAll(),k.animate.show(e))))},hide:function(e){e=e||function(){},(k.is.visible()||k.is.animating())&&(!1===u.onHide.call(c,x)?k.debug("onHide callback returned false, cancelling popup animation"):(k.remove.visible(),k.unbind.close(),k.restore.conditions(),k.animate.hide(e)))},hideAll:function(){q(i.popup).filter("."+d.popupVisible).each(function(){q(this).data(m.activator).popup("hide")})},exists:function(){return!!c&&(u.inline||u.popup?k.has.popup():1<=c.closest(l).length)},removePopup:function(){k.has.popup()&&!u.popup&&(k.debug("Removing popup",c),c.remove(),c=H,u.onRemove.call(c,x))},save:{conditions:function(){k.cache={title:p.attr("title")},k.cache.title&&p.removeAttr("title"),k.verbose("Saving original attributes",k.cache.title)}},restore:{conditions:function(){return k.cache&&k.cache.title&&(p.attr("title",k.cache.title),k.verbose("Restoring original attributes",k.cache.title)),!0}},supports:{svg:function(){return"undefined"!=typeof SVGGraphicsElement}},animate:{show:function(e){e=q.isFunction(e)?e:function(){},u.transition&&q.fn.transition!==H&&p.transition("is supported")?(k.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(){k.bind.close(),e.call(c,x),u.onVisible.call(c,x)}})):k.error(f.noTransition)},hide:function(e){e=q.isFunction(e)?e:function(){},k.debug("Hiding pop-up"),u.transition&&q.fn.transition!==H&&p.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(){k.reset(),e.call(c,x),u.onHidden.call(c,x)}}):k.error(f.noTransition)}},change:{content:function(e){c.html(e)}},get:{html:function(){return p.removeData(m.html),p.data(m.html)||u.html},title:function(){return p.removeData(m.title),p.data(m.title)||u.title},content:function(){return p.removeData(m.content),p.data(m.content)||u.content||p.attr("title")},variation:function(){return p.removeData(m.variation),p.data(m.variation)||u.variation},popup:function(){return c},popupOffset:function(){return c.offset()},calculations:function(){var e=k.get.offsetParent(c),t=v[0],n=h[0]==j,i=v.offset(),o=u.inline||u.popup&&u.movePopup?v.offsetParent().offset():{top:0,left:0},a=n?{top:0,left:0}:h.offset(),r={},n=n?{top:A.scrollTop(),left:A.scrollLeft()}:{top:0,left:0},r={target:{element:v[0],width:v.outerWidth(),height:v.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:h.width(),height:h.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&&k.is.fluid()&&(r.container={width:c.parent().outerWidth()},r.popup.width=r.container.width),r.target.margin.top=u.inline?parseInt(j.getComputedStyle(t).getPropertyValue("margin-top"),10):0,r.target.margin.left=u.inline?k.is.rtl()?parseInt(j.getComputedStyle(t).getPropertyValue("margin-right"),10):parseInt(j.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||k.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)},k.verbose("Distance from boundaries determined",e,n)),n},offsetParent:function(e){var t=(e!==H?e:v)[0].parentNode,n=q(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=q(t)).css("transform"),o="static"===n.css("position"),a=n.is("body");return n&&0<n.length?n:q()},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 y||(k.verbose("All available positions available"),y=k.get.positions()),k.debug("Recording last position tried",e),y[e]=!0,"opposite"===u.prefer&&(r=(r=[{top:"bottom",bottom:"top",left:"right",right:"left"}[n],t]).join(" "),o=!0===y[r],k.debug("Trying opposite strategy",r)),"adjacent"===u.prefer&&i&&(r=(r=[n,{left:"center",center:"right",right:"left"}[t]]).join(" "),a=!0===y[r],k.debug("Trying adjacent strategy",r)),(a||o)&&(k.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!==v.length&&0!==c.length){var n,i,o,a,r,s,l;if(t=t||k.get.calculations(),e=e||p.data(m.position)||u.position,n=p.data(m.offset)||u.offset,i=u.distanceAway,o=t.target,a=t.popup,r=t.parent,k.should.centerArrow(t)&&(k.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&&!k.is.svg(o.element))return k.debug("Popup target is hidden, no action taken"),!1;switch(u.inline&&(k.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)),k.debug("Determining popup position from calculations",e,t),k.is.rtl()&&(e=e.replace(/left|right/g,function(e){return"left"==e?"right":"left"}),k.debug("RTL: Popup position updated",e)),e=b==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===H&&k.error(f.invalidPosition,e),k.debug("Calculated popup positioning values",s),c.css(s).removeClass(d.position).addClass(e).addClass(d.loading),l=k.get.popupOffset(),l=k.get.distanceFromBoundary(l,t),!u.forcePosition&&k.is.offstage(l,e)){if(k.debug("Position is outside viewport",e),b<u.maxSearchDepth)return b++,e=k.get.nextPosition(e),k.debug("Trying new position",e),!!c&&k.set.position(e,t);if(!u.lastResort)return k.debug("Popup could not find a position to display",c),k.error(f.cannotPlace,x),k.remove.attempts(),k.remove.loading(),k.reset(),u.onUnplaceable.call(c,x),!1;k.debug("No position found, showing with last position")}return k.debug("Position is on stage",e),k.remove.attempts(),k.remove.loading(),u.setFluidWidth&&k.is.fluid()&&k.set.fluidWidth(t),!0}k.error(f.notFound)},fluidWidth:function(e){e=e||k.get.calculations(),k.debug("Automatically setting element width to parent width",e.parent.width),c.css("width",e.container.width)},variation:function(e){(e=e||k.get.variation())&&k.has.popup()&&(k.verbose("Adding variation to popup",e),c.addClass(e))},visible:function(){p.addClass(d.visible)}},remove:{loading:function(){c.removeClass(d.loading)},variation:function(e){(e=e||k.get.variation())&&(k.verbose("Removing variation",e),c.removeClass(e))},visible:function(){p.removeClass(d.visible)},attempts:function(){k.verbose("Resetting all searched positions"),b=0,y=!1}},bind:{events:function(){k.debug("Binding popup events to module"),"click"==u.on&&p.on(O+a,k.toggle),"hover"==u.on&&p.on("touchstart"+a,k.event.touchstart),k.get.startEvent()&&p.on(k.get.startEvent()+a,k.event.start).on(k.get.endEvent()+a,k.event.end),u.target&&k.debug("Target set to element",v),A.on("resize"+t,k.event.resize)},popup:function(){k.verbose("Allowing hover events on popup to prevent closing"),c&&k.has.popup()&&c.on("mouseenter"+a,k.event.start).on("mouseleave"+a,k.event.end)},close:function(){(!0===u.hideOnScroll||"auto"==u.hideOnScroll&&"click"!=u.on)&&k.bind.closeOnScroll(),k.is.closable()?k.bind.clickaway():"hover"==u.on&&w&&k.bind.touchClose()},closeOnScroll:function(){k.verbose("Binding scroll close event to document"),g.one(k.get.scrollEvent()+t,k.event.hideGracefully)},touchClose:function(){k.verbose("Binding popup touchclose event to document"),S.on("touchstart"+t,function(e){k.verbose("Touched away from popup"),k.event.hideGracefully.call(x,e)})},clickaway:function(){k.verbose("Binding popup close event to document"),S.on(O+t,function(e){k.verbose("Clicked away from popup"),k.event.hideGracefully.call(x,e)})}},unbind:{events:function(){A.off(t),p.off(a)},close:function(){S.off(t),g.off(t)}},has:{popup:function(){return c&&0<c.length}},should:{centerArrow:function(e){return!k.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 q.each(e,function(e,t){t<-u.jitter&&(k.debug("Position exceeds allowable distance from edge",e,t,n),i.push(e))}),0<i.length},svg:function(e){return k.supports.svg()&&e instanceof SVGGraphicsElement},basic:function(){return p.hasClass(d.basic)},active:function(){return p.hasClass(d.active)},animating:function(){return c!==H&&c.hasClass(d.animating)},fluid:function(){return c!==H&&c.hasClass(d.fluid)},visible:function(){return c!==H&&c.hasClass(d.popupVisible)},dropdown:function(){return p.hasClass(d.dropdown)},hidden:function(){return!k.is.visible()},rtl:function(){return"rtl"===p.attr("dir")||"rtl"===p.css("direction")}},reset:function(){k.remove.visible(),u.preserve?q.fn.transition!==H&&c.transition("remove transition"):k.removePopup()},setting:function(e,t){if(q.isPlainObject(e))q.extend(!0,u,e);else{if(t===H)return u[e];u[e]=t}},internal:function(e,t){if(q.isPlainObject(e))q.extend(!0,k,e);else{if(t===H)return k[e];k[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,u.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),k.verbose.apply(console,arguments)))},error:function(){u.silent||(k.error=Function.prototype.bind.call(console.error,console,u.name+":"),k.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(M||t),M=t,P.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){var e=u.name+":",n=0;M=!1,clearTimeout(k.performance.timer),q.each(P,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",F&&(e+=" '"+F+"'"),(console.group!==H||console.table!==H)&&0<P.length&&(console.groupCollapsed(e),console.table?console.table(P):q.each(P,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),P=[]}},invoke:function(i,e,t){var o,a,n,r=C;return e=e||L,t=x||t,"string"==typeof i&&r!==H&&(i=i.split(/[\. ]/),o=i.length-1,q.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(q.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==H)return a=r[n],!1;{if(!q.isPlainObject(r[t])||e==o)return r[t]!==H&&(a=r[t]),!1;r=r[t]}}})),q.isFunction(a)?n=a.apply(t,e):a!==H&&(n=a),Array.isArray(D)?D.push(n):D!==H?D=[D,n]:n!==H&&(D=n),a}};I?(C===H&&k.initialize(),k.invoke(R)):(C!==H&&C.invoke("destroy"),k.initialize())}),D!==H?D:this},q.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:j,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:j,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={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;")).replace(/[<>"'`]/g,function(e){return t[e]}):e},popup:function(e){var t="",n=q.fn.popup.settings.templates.escape;return typeof e!==H&&(typeof e.title!==H&&e.title&&(e.title=n(e.title),t+='<div class="header">'+e.title+"</div>"),typeof e.content!==H&&e.content&&(e.content=n(e.content),t+='<div class="content">'+e.content+"</div>")),t}}}}(jQuery,window,document),function(T,e,D,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.progress=function(h){var v,e=T(this),b=e.selector||"",y=(new Date).getTime(),w=[],x=h,C="string"==typeof x,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,i=r.selector,s=r.error,o="."+e,a="module-"+e,c=T(this),u=T(this).find(i.bar),l=T(this).find(i.progress),d=T(this).find(i.label),f=this,m=c.data(a),p=!1,g={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(){g.set.duration(),g.set.transitionEvent(),g.debug(f),g.read.metadata(),g.read.settings(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of progress",g),m=g,c.data(a,g)},destroy:function(){g.verbose("Destroying previous progress for",c),clearInterval(m.interval),g.remove.state(),c.removeData(a),m=S},reset:function(){g.remove.nextValue(),g.update.progress(0)},complete:function(e){(g.percent===S||g.percent<100)&&(g.remove.progressPoll(),!0!==e&&g.set.percent(100))},read:{metadata:function(){var e={percent:g.helper.forceArray(c.data(t.percent)),total:c.data(t.total),value:g.helper.forceArray(c.data(t.value))};e.total!==S&&(g.debug("Total value set from metadata",e.total),g.set.total(e.total)),0<e.value.length&&(g.debug("Current value set from metadata",e.value),g.set.value(e.value),g.set.progress(e.value)),0<e.percent.length&&(g.debug("Current percent value set from metadata",e.percent),g.set.percent(e.percent))},settings:function(){!1!==r.total&&(g.debug("Current total set in settings",r.total),g.set.total(r.total)),!1!==r.value&&(g.debug("Current value set in settings",r.value),g.set.value(r.value),g.set.progress(g.value)),!1!==r.percent&&(g.debug("Current percent set in settings",r.percent),g.set.percent(r.percent))}},bind:{transitionEnd:function(t){var e=g.get.transitionEnd();u.one(e+o,function(e){clearTimeout(g.failSafeTimer),t.call(this,e)}),g.failSafeTimer=setTimeout(function(){u.triggerHandler(e)},r.duration+r.failSafeDelay),g.verbose("Adding fail safe timer",g.timer)}},increment:function(e){var t;e=g.has.total()?(t=g.get.value(),e||1):(t=g.get.percent(),e||g.get.randomValue()),g.debug("Incrementing percentage by",t,t=t+e,e),t=g.get.normalizedValue(t),g.set.progress(t)},decrement:function(e){var t,n;g.get.total()?(n=(t=g.get.value())-(e=e||1),g.debug("Decrementing value by",e,t)):(n=(t=g.get.percent())-(e=e||g.get.randomValue()),g.debug("Decrementing percentage by",e,t)),n=g.get.normalizedValue(n),g.set.progress(n)},has:{progressPoll:function(){return g.progressPoll},total:function(){return!1!==g.get.total()}},get:{text:function(e,t){var t=t||0,n=g.get.value(t),i=g.get.total(),o=p?g.get.displayPercent(t):g.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]||""),g.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return g.debug("Value cannot decrement below 0"),0;if(g.has.total()){if(e>g.total)return g.debug("Value cannot increment above total",g.total),g.total}else if(100<e)return g.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"==r.updateInterval?r.duration:r.updateInterval},randomValue:function(){return g.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=D.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==S)return n[e]},displayPercent:function(e){var e=T(u[e]),t=e.width(),n=c.width(),e=parseInt(e.css("min-width"),10)<t?t/n*100:g.percent;return 0<r.precision?Math.round(e*(10*r.precision))/(10*r.precision):Math.round(e)},percent:function(e){return g.percent&&g.percent[e||0]||0},value:function(e){return g.nextValue||g.value&&g.value[e||0]||0},total:function(){return g.total!==S&&g.total}},create:{progressPoll:function(){g.progressPoll=setTimeout(function(){g.update.toNextValue(),g.remove.progressPoll()},g.get.updateInterval())}},is:{complete:function(){return g.is.success()||g.is.warning()||g.is.error()},success:function(){return c.hasClass(n.success)},warning:function(){return c.hasClass(n.warning)},error:function(){return c.hasClass(n.error)},active:function(){return c.hasClass(n.active)},visible:function(){return c.is(":visible")}},remove:{progressPoll:function(){g.verbose("Removing progress poll timer"),g.progressPoll&&(clearTimeout(g.progressPoll),delete g.progressPoll)},nextValue:function(){g.verbose("Removing progress value stored for next update"),delete g.nextValue},state:function(){g.verbose("Removing stored state"),delete g.total,delete g.percent,delete g.value},active:function(){g.verbose("Removing active state"),c.removeClass(n.active)},success:function(){g.verbose("Removing success state"),c.removeClass(n.success)},warning:function(){g.verbose("Removing warning state"),c.removeClass(n.warning)},error:function(){g.verbose("Removing error state"),c.removeClass(n.error)}},set:{barWidth:function(e){g.debug("set bar width with ",e),e=g.helper.forceArray(e);var o=-1,a=-1,r=g.helper.sum(e),s=u.length,l=1<s,t=e.map(function(e,t){var n=t===s-1&&0===r,i=T(u[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(u[t]).css({borderTopLeftRadius:t==o?"":0,borderBottomLeftRadius:t==o?"":0,borderTopRightRadius:t==a?"":0,borderBottomRightRadius:t==a?"":0})}),c.attr("data-percent",t)},duration:function(e){e=e||r.duration,g.verbose("Setting progress bar transition duration",e="number"==typeof e?e+"ms":e),u.css({"transition-duration":e})},percent:function(e){e=g.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=g.has.total(),i=g.helper.sum(e),o=1<e.length&&n,a=g.helper.sum(g.helper.forceArray(g.value));o&&a>g.total?g.error(s.sumExceedsTotal,a,g.total):!o&&100<i?g.error(s.tooHigh,i):i<0?g.error(s.tooLow,i):(t=0<r.precision?r.precision:o?g.helper.derivePrecision(Math.min.apply(null,g.value),g.total):0,a=e.map(function(e){return 0<t?Math.round(e*(10*t))/(10*t):Math.round(e)}),g.percent=a,n&&(g.value=e.map(function(e){return 0<t?Math.round(e/100*g.total*(10*t))/(10*t):Math.round(e/100*g.total*10)/10})),g.set.barWidth(e),g.set.labelInterval()),r.onChange.call(f,e,g.value,g.total)},labelInterval:function(){clearInterval(g.interval),g.bind.transitionEnd(function(){g.verbose("Bar finished animating, removing continuous label updates"),clearInterval(g.interval),p=!1,g.set.labels()}),p=!0,g.interval=setInterval(function(){T.contains(D.documentElement,f)||(clearInterval(g.interval),p=!1),g.set.labels()},r.framerate)},labels:function(){g.verbose("Setting both bar progress and outer label text"),g.set.barLabel(),g.set.state()},label:function(e){(e=e||"")&&(e=g.get.text(e),g.verbose("Setting label to text",e),d.text(e))},state:function(e){100===(e=e!==S?e:g.helper.sum(g.percent))?r.autoSuccess&&1===u.length&&!(g.is.warning()||g.is.error()||g.is.success())?(g.set.success(),g.debug("Automatically triggering success at 100%")):(g.verbose("Reached 100% removing active state"),g.remove.active(),g.remove.progressPoll()):0<e?(g.verbose("Adjusting active progress bar label",e),g.set.active()):(g.remove.active(),g.set.label(r.text.active))},barLabel:function(n){l.map(function(e,t){t=T(t);n!==S?t.text(g.get.text(n,e)):"ratio"==r.label&&g.has.total()?(g.verbose("Adding ratio to bar label"),t.text(g.get.text(r.text.ratio,e))):"percent"==r.label&&(g.verbose("Adding percentage to bar label"),t.text(g.get.text(r.text.percent,e)))})},active:function(e){e=e||r.text.active,g.debug("Setting active state"),r.showActivity&&!g.is.active()&&c.addClass(n.active),g.remove.warning(),g.remove.error(),g.remove.success(),(e=r.onLabelUpdate("active",e,g.value,g.total))&&g.set.label(e),g.bind.transitionEnd(function(){r.onActive.call(f,g.value,g.total)})},success:function(e,t){e=e||r.text.success||r.text.active,g.debug("Setting success state"),c.addClass(n.success),g.remove.active(),g.remove.warning(),g.remove.error(),g.complete(t),e=r.text.success?r.onLabelUpdate("success",e,g.value,g.total):r.onLabelUpdate("active",e,g.value,g.total),g.set.label(e),g.bind.transitionEnd(function(){r.onSuccess.call(f,g.total)})},warning:function(e,t){e=e||r.text.warning,g.debug("Setting warning state"),c.addClass(n.warning),g.remove.active(),g.remove.success(),g.remove.error(),g.complete(t),(e=r.onLabelUpdate("warning",e,g.value,g.total))&&g.set.label(e),g.bind.transitionEnd(function(){r.onWarning.call(f,g.value,g.total)})},error:function(e,t){e=e||r.text.error,g.debug("Setting error state"),c.addClass(n.error),g.remove.active(),g.remove.success(),g.remove.warning(),g.complete(t),(e=r.onLabelUpdate("error",e,g.value,g.total))&&g.set.label(e),g.bind.transitionEnd(function(){r.onError.call(f,g.value,g.total)})},transitionEvent:function(){g.get.transitionEnd()},total:function(e){g.total=e},value:function(e){g.value=g.helper.forceArray(e)},progress:function(e){g.has.progressPoll()?(g.debug("Updated within interval, setting next update to use new value",e),g.set.nextValue(e)):(g.debug("First update in progress update interval, immediately updating",e),g.update.progress(e),g.create.progressPoll())},nextValue:function(e){g.nextValue=e}},update:{toNextValue:function(){var e=g.nextValue;e&&(g.debug("Update interval complete using last updated value",e),g.update.progress(e),g.remove.nextValue())},progress:function(e){var n=g.has.total(),e=(n&&g.set.value(e),g.helper.forceArray(e).map(function(e){var t;return!1===(e=g.get.numericValue(e))&&g.error(s.nonNumeric,e),e=g.get.normalizedValue(e),n?(t=0<g.total?e/g.total*100:100,g.debug("Calculating percent complete from total",t)):(t=e,g.debug("Setting value to exact percentage value",t)),t}));g.set.percent(e)}},setting:function(e,t){if(g.debug("Changing setting",e,t),T.isPlainObject(e))T.extend(!0,r,e);else{if(t===S)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,g,e);else{if(t===S)return g[e];g[e]=t}},debug:function(){!r.silent&&r.debug&&(r.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,r.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),g.verbose.apply(console,arguments)))},error:function(){r.silent||(g.error=Function.prototype.bind.call(console.error,console,r.name+":"),g.error.apply(console,arguments))},performance:{log:function(e){var t,n;r.performance&&(n=(t=(new Date).getTime())-(y||t),y=t,w.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:f,"Execution Time":n})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var e=r.name+":",n=0;y=!1,clearTimeout(g.performance.timer),T.each(w,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),(console.group!==S||console.table!==S)&&0<w.length&&(console.groupCollapsed(e),console.table?console.table(w):T.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=m;return e=e||k,t=f||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]:g.error(s.method,i),!1;r=r[t]}}})),T.isFunction(a)?n=a.apply(t,e):a!==S&&(n=a),Array.isArray(v)?v.push(n):v!==S?v=[v,n]:n!==S&&(v=n),a}};C?(m===S&&g.initialize(),g.invoke(x)):(m!==S&&m.invoke("destroy"),g.initialize())}),v!==S?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(R,I,L,q){"use strict";R.isFunction=R.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")(),R.fn.sidebar=function(w){var x,e=R(this),C=R(I),k=R(L),T=R("html"),D=R("head"),S=e.selector||"",A=(new Date).getTime(),E=[],F=w,O="string"==typeof F,M=[].slice.call(arguments,1),P=I.requestAnimationFrame||I.mozRequestAnimationFrame||I.webkitRequestAnimationFrame||I.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var o,a,e,t,r,s=R.isPlainObject(w)?R.extend(!0,{},R.fn.sidebar.settings,w):R.extend({},R.fn.sidebar.settings),n=s.selector,l=s.className,i=s.namespace,c=s.regExp,u=s.error,d="."+i,f="module-"+i,m=R(this),p=R(s.context),g=m.children(n.sidebar),h=(p.children(n.fixed),p.children(n.pusher)),v=this,b=m.data(f),y={initialize:function(){y.debug("Initializing sidebar",w),y.create.id(),r=y.get.transitionEvent(),s.delaySetup?P(y.setup.layout):y.setup.layout(),P(function(){y.setup.cache()}),y.instantiate()},instantiate:function(){y.verbose("Storing instance of module",y),b=y,m.data(f,y)},create:{id:function(){e=(Math.random().toString(16)+"000000000").substr(2,8),a="."+e,y.verbose("Creating unique id for element",e)}},destroy:function(){y.verbose("Destroying previous module for",m),m.off(d).removeData(f),y.is.ios()&&y.remove.ios(),p.off(a),C.off(a),k.off(a)},event:{clickaway:function(e){var t;s.closable&&(t=0<h.find(e.target).length||h.is(e.target),e=p.is(e.target),t&&(y.verbose("User clicked on dimmed page"),y.hide()),e&&(y.verbose("User clicked on dimmable context (scaled out page)"),y.hide()))},touch:function(e){},containScroll:function(e){v.scrollTop<=0&&(v.scrollTop=1),v.scrollTop+v.offsetHeight>=v.scrollHeight&&(v.scrollTop=v.scrollHeight-v.offsetHeight-1)},scroll:function(e){0===R(e.target).closest(n.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){y.verbose("Adding clickaway events to context",p),p.on("click"+a,y.event.clickaway).on("touchend"+a,y.event.clickaway)},scrollLock:function(){s.scrollLock&&(y.debug("Disabling page scroll"),C.on("DOMMouseScroll"+a,y.event.scroll)),y.verbose("Adding events to contain sidebar scroll"),k.on("touchmove"+a,y.event.touch),m.on("scroll"+d,y.event.containScroll)}},unbind:{clickaway:function(){y.verbose("Removing clickaway events from context",p),p.off(a)},scrollLock:function(){y.verbose("Removing scroll lock from page"),k.off(a),C.off(a),m.off("scroll"+d)}},add:{inlineCSS:function(){var e=y.cache.width||m.outerWidth(),t=y.cache.height||m.outerHeight(),n=y.is.rtl(),i=y.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(y.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(y.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); }"),y.is.ie()&&("left"===i||"right"===i?(y.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=R(n+="</style>").appendTo(D),y.debug("Adding sizing css to head",o)}},refresh:function(){y.verbose("Refreshing selector cache"),p=R(s.context),g=p.children(n.sidebar),h=p.children(n.pusher),p.children(n.fixed),y.clear.cache()},refreshSidebars:function(){y.verbose("Refreshing other sidebars"),g=p.children(n.sidebar)},repaint:function(){y.verbose("Forcing repaint event"),v.style.display="none";v.offsetHeight;v.scrollTop=v.scrollTop,v.style.display=""},setup:{cache:function(){y.cache={width:m.outerWidth(),height:m.outerHeight()}},layout:function(){0===p.children(n.pusher).length&&(y.debug("Adding wrapper element for sidebar"),y.error(u.pusher),h=R('<div class="pusher" />'),p.children().not(n.omitted).not(g).wrapAll(h),y.refresh()),0!==m.nextAll(n.pusher).length&&m.nextAll(n.pusher)[0]===h[0]||(y.debug("Moved sidebar to correct parent element"),y.error(u.movedSidebar,v),m.detach().prependTo(p),y.refresh()),y.clear.cache(),y.set.pushable(),y.set.direction()}},attachEvents:function(e,t){var n=R(e);t=R.isFunction(y[t])?y[t]:y.toggle,0<n.length?(y.debug("Attaching sidebar events to element",e,t),n.on("click"+d,t)):y.error(u.notFound,e)},show:function(e){if(e=R.isFunction(e)?e:function(){},y.is.hidden()){if(y.refreshSidebars(),s.overlay&&(y.error(u.overlay),s.transition="overlay"),y.refresh(),y.othersActive())if(y.debug("Other sidebars currently visible"),s.exclusive){if("overlay"!=s.transition)return void y.hideOthers(y.show);y.hideOthers()}else s.transition="overlay";y.pushPage(function(){e.call(v),s.onShow.call(v)}),s.onChange.call(v),s.onVisible.call(v)}else y.debug("Sidebar is already visible")},hide:function(e){e=R.isFunction(e)?e:function(){},(y.is.visible()||y.is.animating())&&(y.debug("Hiding sidebar",e),y.refreshSidebars(),y.pullPage(function(){e.call(v),s.onHidden.call(v)}),s.onChange.call(v),s.onHide.call(v))},othersAnimating:function(){return 0<g.not(m).filter("."+l.animating).length},othersVisible:function(){return 0<g.not(m).filter("."+l.visible).length},othersActive:function(){return y.othersVisible()||y.othersAnimating()},hideOthers:function(e){var t=g.not(m).filter("."+l.visible),n=t.length,i=0;e=e||function(){},t.sidebar("hide",function(){++i==n&&e()})},toggle:function(){y.verbose("Determining toggled direction"),y.is.hidden()?y.show():y.hide()},pushPage:function(t){var e,n,i=y.get.transition(),o="overlay"===i||y.othersActive()?m:h;t=R.isFunction(t)?t:function(){},"scale down"==s.transition&&y.scrollToTop(),y.set.transition(i),y.repaint(),i=function(){y.bind.clickaway(),y.add.inlineCSS(),y.set.animating(),y.set.visible()},e=function(){y.set.dimmed()},n=function(e){e.target==o[0]&&(o.off(r+a,n),y.remove.animating(),y.bind.scrollLock(),t.call(v))},o.off(r+a),o.on(r+a,n),P(i),s.dimPage&&!y.othersVisible()&&P(e)},pullPage:function(t){var e,n,i=y.get.transition(),o="overlay"==i||y.othersActive()?m:h;t=R.isFunction(t)?t:function(){},y.verbose("Removing context push state",y.get.direction()),y.unbind.clickaway(),y.unbind.scrollLock(),e=function(){y.set.transition(i),y.set.animating(),y.remove.visible(),s.dimPage&&!y.othersVisible()&&h.removeClass(l.dimmed)},n=function(e){e.target==o[0]&&(o.off(r+a,n),y.remove.animating(),y.remove.transition(),y.remove.inlineCSS(),("scale down"==i||s.returnScroll&&y.is.mobile())&&y.scrollBack(),t.call(v))},o.off(r+a),o.on(r+a,n),P(e)},scrollToTop:function(){y.verbose("Scrolling to top of page to avoid animation issues"),t=R(I).scrollTop(),m.scrollTop(0),I.scrollTo(0,0)},scrollBack:function(){y.verbose("Scrolling back to original page position"),I.scrollTo(0,t)},clear:{cache:function(){y.verbose("Clearing cached dimensions"),y.cache={}}},set:{ios:function(){T.addClass(l.ios)},pushed:function(){p.addClass(l.pushed)},pushable:function(){p.addClass(l.pushable)},dimmed:function(){h.addClass(l.dimmed)},active:function(){m.addClass(l.active)},animating:function(){m.addClass(l.animating)},transition:function(e){e=e||y.get.transition(),m.addClass(e)},direction:function(e){e=e||y.get.direction(),m.addClass(l[e])},visible:function(){m.addClass(l.visible)},overlay:function(){m.addClass(l.overlay)}},remove:{inlineCSS:function(){y.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},ios:function(){T.removeClass(l.ios)},pushed:function(){p.removeClass(l.pushed)},pushable:function(){p.removeClass(l.pushable)},active:function(){m.removeClass(l.active)},animating:function(){m.removeClass(l.animating)},transition:function(e){e=e||y.get.transition(),m.removeClass(e)},direction:function(e){e=e||y.get.direction(),m.removeClass(l[e])},visible:function(){m.removeClass(l.visible)},overlay:function(){m.removeClass(l.overlay)}},get:{direction:function(){return m.hasClass(l.top)?l.top:m.hasClass(l.right)?l.right:m.hasClass(l.bottom)?l.bottom:l.left},transition:function(){var e=y.get.direction(),e=y.is.mobile()?"auto"==s.mobileTransition?s.defaultTransition.mobile[e]:s.mobileTransition:"auto"==s.transition?s.defaultTransition.computer[e]:s.transition;return y.verbose("Determined transition",e),e},transitionEvent:function(){var e,t=L.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==q)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(c.ios),n=e.match(c.mobileChrome);return!(!t||n)&&(y.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(c.mobile)?(y.verbose("Browser was found to be mobile",e),!0):(y.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!y.is.visible()},visible:function(){return m.hasClass(l.visible)},open:function(){return y.is.visible()},closed:function(){return y.is.hidden()},vertical:function(){return m.hasClass(l.top)},animating:function(){return p.hasClass(l.animating)},rtl:function(){return y.cache.rtl===q&&(y.cache.rtl="rtl"===m.attr("dir")||"rtl"===m.css("direction")),y.cache.rtl}},setting:function(e,t){if(y.debug("Changing setting",e,t),R.isPlainObject(e))R.extend(!0,s,e);else{if(t===q)return s[e];R.isPlainObject(s[e])?R.extend(!0,s[e],t):s[e]=t}},internal:function(e,t){if(R.isPlainObject(e))R.extend(!0,y,e);else{if(t===q)return y[e];y[e]=t}},debug:function(){!s.silent&&s.debug&&(s.performance?y.performance.log(arguments):(y.debug=Function.prototype.bind.call(console.info,console,s.name+":"),y.debug.apply(console,arguments)))},verbose:function(){!s.silent&&s.verbose&&s.debug&&(s.performance?y.performance.log(arguments):(y.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),y.verbose.apply(console,arguments)))},error:function(){s.silent||(y.error=Function.prototype.bind.call(console.error,console,s.name+":"),y.error.apply(console,arguments))},performance:{log:function(e){var t,n;s.performance&&(n=(t=(new Date).getTime())-(A||t),A=t,E.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:v,"Execution Time":n})),clearTimeout(y.performance.timer),y.performance.timer=setTimeout(y.performance.display,500)},display:function(){var e=s.name+":",n=0;A=!1,clearTimeout(y.performance.timer),R.each(E,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",S&&(e+=" '"+S+"'"),(console.group!==q||console.table!==q)&&0<E.length&&(console.groupCollapsed(e),console.table?console.table(E):R.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=b;return e=e||M,t=v||t,"string"==typeof i&&r!==q&&(i=i.split(/[\. ]/),o=i.length-1,R.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(R.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==q)return a=r[n],!1;{if(!R.isPlainObject(r[t])||e==o)return r[t]!==q?a=r[t]:y.error(u.method,i),!1;r=r[t]}}})),R.isFunction(a)?n=a.apply(t,e):a!==q&&(n=a),Array.isArray(x)?x.push(n):x!==q?x=[x,n]:n!==q&&(x=n),a}};O?(b===q&&y.initialize(),y.invoke(F)):(b!==q&&y.invoke("destroy"),y.initialize())}),x!==q?x:this},R.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(O,M,P,R){"use strict";O.isWindow=O.isWindow||function(e){return null!=e&&e===e.window},O.isFunction=O.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},M=void 0!==M&&M.Math==Math?M:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),O.fn.tab=function(c){var u,d=O.isFunction(this)?O(M):O(this),f=d.selector||"",T=(new Date).getTime(),D=[],S=c,A="string"==typeof S,E=[].slice.call(arguments,1),F=!1;return d.each(function(){var m,o,p,g,h,v=O.isPlainObject(c)?O.extend(!0,{},O.fn.tab.settings,c):O.extend({},O.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=O(this),a={},C=!0,r=0,s=this,l=x.data(i),k={initialize:function(){k.debug("Initializing tab menu item",x),k.fix.callbacks(),k.determineTabs(),k.debug("Determining tabs",v.context,o),v.auto&&k.set.auto(),k.bind.events(),v.history&&!F&&(k.initializeHistory(),F=!0),v.autoTabActivation&&l===R&&null==k.determine.activeTab()&&(k.debug("No active tab detected, setting first tab active",k.get.initialPath()),k.changeTab(!0===v.autoTabActivation?k.get.initialPath():v.autoTabActivation)),k.instantiate()},instantiate:function(){k.verbose("Storing instance of module",k),l=k,x.data(i,k)},destroy:function(){k.debug("Destroying tabs",x),x.removeData(i).off(e)},bind:{events:function(){O.isWindow(s)||(k.debug("Attaching tab activation events to element",x),x.on("click"+e,k.event.click))}},determineTabs:function(){var e;"parent"===v.context?(0<x.closest(t.ui).length?(e=x.closest(t.ui),k.verbose("Using closest UI element as parent",e)):e=x,m=e.parent(),k.verbose("Determined parent element for creating context",m)):v.context?(m=O(v.context),k.verbose("Using selector for tab context",v.context,m)):m=O("body"),v.childrenOnly?(o=m.children(t.tabs),k.debug("Searching tab context children for tabs",m,o)):(o=m.find(t.tabs),k.debug("Searching tab context for tabs",m,o))},fix:{callbacks:function(){O.isPlainObject(c)&&(c.onTabLoad||c.onTabInit)&&(c.onTabLoad&&(c.onLoad=c.onTabLoad,delete c.onTabLoad,k.error(w.legacyLoad,c.onLoad)),c.onTabInit&&(c.onFirstLoad=c.onTabInit,delete c.onTabInit,k.error(w.legacyInit,c.onFirstLoad)),v=O.extend(!0,{},O.fn.tab.settings,c))}},initializeHistory:function(){if(k.debug("Initializing page state"),O.address===R)return k.error(w.state),!1;if("state"==v.historyType){if(k.debug("Using HTML5 to manage state"),!1===v.path)return k.error(w.path),!1;O.address.history(!0).state(v.path)}O.address.bind("change",k.event.history.change)},event:{click:function(e){var t=O(this).data(y.tab);t!==R?(v.history?(k.verbose("Updating page state",e),O.address.value(t)):(k.verbose("Changing tab",e),k.changeTab(t)),e.preventDefault()):k.debug("No tab specified")},history:{change:function(e){var t=e.pathNames.join("/")||k.get.initialPath(),n=v.templates.determineTitle(t)||!1;k.performance.display(),k.debug("History change event",t,e),h=e,t!==R&&k.changeTab(t),n&&O.address.title(n)}}},refresh:function(){p&&(k.debug("Refreshing tab",p),k.changeTab(p))},cache:{read:function(e){return e!==R&&a[e]},add:function(e,t){e=e||p,k.debug("Adding cached content for",e),a[e]=t},remove:function(e){e=e||p,k.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}";k.verbose("Setting up automatic tab retrieval from server",e),O.isPlainObject(v.apiSettings)?v.apiSettings.url=e:v.apiSettings={url:e}},loading:function(e){var t=k.get.tabElement(e);t.hasClass(b.loading)||(k.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){O.address.value(e)}},changeTab:function(c){var u=M.history&&M.history.pushState&&v.ignoreFirstLoad&&C,d=v.auto||O.isPlainObject(v.apiSettings),f=d&&!u?k.utilities.pathToArray(c):k.get.defaultPathArray(c);c=k.utilities.arrayToPath(f),O.each(f,function(e,t){var n,i,o=f.slice(0,e+1),a=k.utilities.arrayToPath(o),r=k.is.tab(a),s=e+1==f.length,l=k.get.tabElement(a);return k.verbose("Looking for tab",t),r?(k.verbose("Tab was found",t),p=a,g=k.utilities.filterArray(f,o),s?i=!0:(r=f.slice(0,e+2),t=k.utilities.arrayToPath(r),(i=!k.is.tab(t))&&k.verbose("Tab parameters found",r)),i&&d?(u?(k.debug("Ignoring remote content on first tab load",a),C=!1,k.cache.add(c,l.html()),k.activate.all(a),v.onFirstLoad.call(l[0],a,g,h),v.onLoad.call(l[0],a,g,h)):(k.activate.navigation(a),k.fetch.content(a,c)),!1):(k.debug("Opened local tab",a),k.activate.all(a),k.cache.read(a)||(k.cache.add(a,!0),k.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(l[0],a,g,h)),void v.onLoad.call(l[0],a,g,h))):-1!=c.search("/")||""===c?(k.error(w.missingTab,x,m,a),!1):(c=k.escape.string(c),a=(n=O("#"+c+', a[name="'+c+'"]')).closest("[data-tab]").data(y.tab),l=k.get.tabElement(a),n&&0<n.length&&a?(k.debug("Anchor link used, opening parent tab",l,n),l.hasClass(b.active)||setTimeout(function(){k.scrollTo(n)},0),k.activate.all(a),k.cache.read(a)||(k.cache.add(a,!0),k.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(l[0],a,g,h)),v.onLoad.call(l[0],a,g,h),!1):void 0)})},scrollTo:function(e){var t=!!(e&&0<e.length)&&e.offset().top;!1!==t&&(k.debug("Forcing scroll to an in-page link in a hidden tab",t,e),O(P).scrollTop(t))},update:{content:function(e,t,n){var i=k.get.tabElement(e),o=i[0];n=n!==R?n:v.evaluateScripts,"string"==typeof v.cacheType&&"dom"==v.cacheType.toLowerCase()&&"string"!=typeof t?i.empty().append(O(t).clone(!0)):n?(k.debug("Updating HTML and evaluating inline scripts",e,t),i.html(t)):(k.debug("Updating HTML",e,t),o.innerHTML=t)}},fetch:{content:function(t,n){var e,i=k.get.tabElement(t),o={dataType:"html",encodeParameters:!1,on:"now",cache:v.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(e){"response"==v.cacheType&&k.cache.add(n,e),k.update.content(t,e),t==p?(k.debug("Content loaded",t),k.activate.tab(t)):k.debug("Content loaded in background",t),v.onFirstLoad.call(i[0],t,g,h),v.onLoad.call(i[0],t,g,h),v.loadOnce?k.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");k.cache.add(n,e)},0):k.cache.add(n,i.html())},urlData:{tab:n}},a=i.api("get request")||!1,a=a&&"pending"===a.state();n=n||t,e=k.cache.read(n),v.cache&&e?(k.activate.tab(t),k.debug("Adding cached content",n),v.loadOnce||("once"==v.evaluateScripts?k.update.content(t,e,!1):k.update.content(t,e)),v.onLoad.call(i[0],t,g,h)):a?(k.set.loading(t),k.debug("Content is already loading",n)):O.api!==R?(e=O.extend(!0,{},v.apiSettings,o),k.debug("Retrieving remote content",n,e),k.set.loading(t),i.api(e)):k.error(w.api)}},activate:{all:function(e){k.activate.tab(e),k.activate.navigation(e)},tab:function(e){var t=k.get.tabElement(e),n="siblings"==v.deactivate?t.siblings(o):o.not(t),i=t.hasClass(b.active);k.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=k.get.navElement(e),n="siblings"==v.deactivate?t.siblings(d):d.not(t),i=t.hasClass(b.active);k.verbose("Activating tab navigation for",t,e),i||(t.addClass(b.active),n.removeClass(b.active+" "+b.loading))}},deactivate:{all:function(){k.deactivate.navigation(),k.deactivate.tabs()},navigation:function(){d.removeClass(b.active)},tabs:function(){o.removeClass(b.active+" "+b.loading)}},is:{tab:function(e){return e!==R&&0<k.get.tabElement(e).length}},get:{initialPath:function(){return d.eq(0).data(y.tab)||o.eq(0).data(y.tab)},path:function(){return O.address.value()},defaultPathArray:function(e){return k.utilities.pathToArray(k.get.defaultPath(e))},defaultPath:function(e){var t=d.filter("[data-"+y.tab+'^="'+k.escape.string(e)+'/"]').eq(0).data(y.tab)||!1;if(t){if(k.debug("Found default tab",t),r<v.maxDepth)return r++,k.get.defaultPath(t);k.error(w.recursion)}else k.debug("No default tabs found for",e,o);return r=0,e},navElement:function(e){return e=e||p,d.filter("[data-"+y.tab+'="'+k.escape.string(e)+'"]')},tabElement:function(e){var t;return e=e||p,t=k.utilities.pathToArray(e),t=k.utilities.last(t),e=o.filter("[data-"+y.tab+'="'+k.escape.string(e)+'"]'),t=o.filter("[data-"+y.tab+'="'+k.escape.string(t)+'"]'),0<e.length?e:t},tab:function(){return p}},determine:{activeTab:function(){var n=null;return o.each(function(e,t){O(t).hasClass(b.active)&&(t=O(this).data(y.tab),d.filter("[data-"+y.tab+'="'+k.escape.string(t)+'"]').hasClass(b.active)&&(n=t))}),n}},utilities:{filterArray:function(e,t){return O.grep(e,function(e){return-1==O.inArray(e,t)})},last:function(e){return!!Array.isArray(e)&&e[e.length-1]},pathToArray:function(e){return"string"==typeof(e=e===R?p:e)?e.split("/"):[e]},arrayToPath:function(e){return!!Array.isArray(e)&&e.join("/")}},setting:function(e,t){if(k.debug("Changing setting",e,t),O.isPlainObject(e))O.extend(!0,v,e);else{if(t===R)return v[e];O.isPlainObject(v[e])?O.extend(!0,v[e],t):v[e]=t}},internal:function(e,t){if(O.isPlainObject(e))O.extend(!0,k,e);else{if(t===R)return k[e];k[e]=t}},debug:function(){!v.silent&&v.debug&&(v.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,v.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),k.verbose.apply(console,arguments)))},error:function(){v.silent||(k.error=Function.prototype.bind.call(console.error,console,v.name+":"),k.error.apply(console,arguments))},performance:{log:function(e){var t,n;v.performance&&(n=(t=(new Date).getTime())-(T||t),T=t,D.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:s,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){var e=v.name+":",n=0;T=!1,clearTimeout(k.performance.timer),O.each(D,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",f&&(e+=" '"+f+"'"),(console.group!==R||console.table!==R)&&0<D.length&&(console.groupCollapsed(e),console.table?console.table(D):O.each(D,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),D=[]}},invoke:function(i,e,t){var o,a,n,r=l;return e=e||E,t=s||t,"string"==typeof i&&r!==R&&(i=i.split(/[\. ]/),o=i.length-1,O.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(O.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==R)return a=r[n],!1;{if(!O.isPlainObject(r[t])||e==o)return r[t]!==R?a=r[t]:k.error(w.method,i),!1;r=r[t]}}})),O.isFunction(a)?n=a.apply(t,e):a!==R&&(n=a),Array.isArray(u)?u.push(n):u!==R?u=[u,n]:n!==R&&(u=n),a}};A?(l===R&&k.initialize(),k.invoke(S)):(l!==R&&l.invoke("destroy"),k.initialize())}),u!==R?u:this},O.tab=function(){O(M).tab.apply(this,arguments)},O.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,O){"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(x){var C,e=F(this),k=e.selector||"",T=(new Date).getTime(),D=[],S=x,A="string"==typeof S,E=[].slice.call(arguments,1);return e.each(function(){var n,i,a,o,r,s,l,c=F.isPlainObject(x)?F.extend(!0,{},F.fn.toast.settings,x):F.extend({},F.fn.toast.settings),u=c.className,d=c.selector,f=c.error,e=c.namespace,m=c.fields,t="."+e,p=e+"-module",g=F(this),h=c.context?F(c.context):F("body"),v=g.hasClass("toast")||g.hasClass("message")||g.hasClass("card"),b=this,y=v?g.data(p):O,w={initialize:function(){w.verbose("Initializing element"),w.has.container()||w.create.container(),(v||""!==c.message||""!==c.title||""!==w.get.iconClass()||c.showImage||w.has.configActions())&&("string"==typeof c.showProgress&&-1!==[u.top,u.bottom].indexOf(c.showProgress)||(c.showProgress=!1),w.create.toast(),c.closeOnClick&&(c.closeIcon||0<F(i).find(d.input).length||w.has.configActions())&&(c.closeOnClick=!1),c.closeOnClick||n.addClass(u.unclickable),w.bind.events()),w.instantiate(),n&&w.show()},instantiate:function(){w.verbose("Storing instance of toast"),y=w,g.data(p,y)},destroy:function(){n&&(w.debug("Removing toast",n),w.unbind.events(),n.remove(),s=i=n=O,c.onRemove.call(n,b),l=r=o=O),g.removeData(p)},show:function(e){e=e||function(){},w.debug("Showing toast"),!1===c.onShow.call(n,b)?w.debug("onShow callback returned false, cancelling toast animation"):w.animate.show(e)},close:function(e){e=e||function(){},w.remove.visible(),w.unbind.events(),w.animate.close(e)},create:{container:function(){w.verbose("Creating container"),h.append(F("<div/>",{class:c.position+" "+u.container+" "+(c.horizontal?u.horizontal:"")}))},toast:function(){n=F("<div/>",{class:u.box});var e,t=w.get.iconClass();v?(i=c.cloneModule?g.clone().removeAttr("id"):g,l=i.find("> i"+w.helpers.toClass(u.close)),c.closeIcon=0<l.length,""!==t&&i.find(d.icon).attr("class",t+" "+u.icon),c.showImage&&i.find(d.image).attr("src",c.showImage),""!==c.title&&i.find(d.title).html(w.helpers.escape(c.title,c.preserveHTML)),""!==c.message&&i.find(d.message).html(w.helpers.escape(c.message,c.preserveHTML))):(w.verbose("Creating toast"),i=F("<div/>"),e=F("<div/>",{class:u.content}),""!==t&&i.append(F("<i/>",{class:t+" "+u.icon})),c.showImage&&i.append(F("<img>",{class:u.image+" "+c.classImage,src:c.showImage})),""!==c.title&&e.append(F("<div/>",{class:u.title,text:c.title})),e.append(F("<div/>",{class:u.message,html:w.helpers.escape(c.message,c.preserveHTML)})),i.addClass(c.class+" "+u.toast).append(e),i.css("opacity",c.opacity),c.closeIcon&&((l=F("<i/>",{class:u.close+" "+("string"==typeof c.closeIcon?c.closeIcon:"")})).hasClass(u.left)?i.prepend(l):i.append(l))),i.hasClass(u.compact)&&(c.compact=!0),i.hasClass("card")&&(c.compact=!1),a=i.find(".actions"),w.has.configActions()&&(0===a.length&&(a=F("<div/>",{class:u.actions+" "+(c.classActions||"")}).appendTo(i)),i.hasClass("card")&&!a.hasClass(u.attached)&&(a.addClass(u.extraContent),a.hasClass(u.vertical)&&(a.removeClass(u.vertical),w.error(f.verticalCard))),c.actions.forEach(function(e){var t=e[m.icon]?'<i class="'+w.helpers.deQuote(e[m.icon])+' icon"></i>':"",n=w.helpers.escape(e[m.text]||"",c.preserveHTML),i=w.helpers.deQuote(e[m.class]||""),o=e[m.click]&&F.isFunction(e[m.click])?e[m.click]:function(){};a.append(F("<button/>",{html:t+n,class:u.button+" "+i,click:function(){!1!==o.call(b,g)&&w.close()}}))})),a&&a.hasClass(u.vertical)&&i.addClass(u.vertical),0<a.length&&!a.hasClass(u.attached)&&(!a||a.hasClass(u.basic)&&!a.hasClass(u.left)||i.addClass(u.actions)),"auto"===c.displayTime&&(c.displayTime=Math.max(c.minDisplayTime,i.text().split(" ").length/c.wordsPerMinute*6e4)),n.append(i),0<a.length&&a.hasClass(u.attached)&&(a.addClass(u.buttons),a.detach(),i.addClass(u.attached),a.hasClass(u.vertical)?(i.wrap(F("<div/>",{class:u.vertical+" "+u.attached+" "+(c.compact?u.compact:"")})),a.hasClass(u.left)?i.addClass(u.left).parent().addClass(u.left).prepend(a):i.parent().append(a)):a.hasClass(u.top)?(n.prepend(a),i.addClass(u.bottom)):(n.append(a),i.addClass(u.top))),g!==i&&(b=(g=i)[0]),0<c.displayTime&&(t=u.progressing+" "+(c.pauseOnHover?u.pausable:""),c.showProgress&&(o=F("<div/>",{class:u.progress+" "+(c.classProgress||c.class),"data-percent":""}),c.classProgress||(i.hasClass("toast")&&!i.hasClass(u.inverted)?o.addClass(u.inverted):o.removeClass(u.inverted)),r=F("<div/>",{class:"bar "+(c.progressUp?"up ":"down ")+t}),o.addClass(c.showProgress).append(r),o.hasClass(u.top)?n.prepend(o):n.append(o),r.css("animation-duration",c.displayTime/1e3+"s")),(s=F("<span/>",{class:"wait "+t})).css("animation-duration",c.displayTime/1e3+"s"),s.appendTo(i)),c.compact&&(n.addClass(u.compact),i.addClass(u.compact),o&&o.addClass(u.compact)),c.newestOnTop?n.prependTo(w.get.container()):n.appendTo(w.get.container())}},bind:{events:function(){w.debug("Binding events to toast"),(c.closeOnClick||c.closeIcon)&&(c.closeIcon?l:i).on("click"+t,w.event.click),s&&s.on("animationend"+t,w.close),n.on("click"+t,d.approve,w.event.approve).on("click"+t,d.deny,w.event.deny)}},unbind:{events:function(){w.debug("Unbinding events to toast"),(c.closeOnClick||c.closeIcon)&&(c.closeIcon?l:i).off("click"+t),s&&s.off("animationend"+t),n.off("click"+t)}},animate:{show:function(e){e=F.isFunction(e)?e:function(){},c.transition&&w.can.useElement("transition")&&g.transition("is supported")&&(w.set.visible(),n.transition({animation:c.transition.showMethod+" in",queue:!1,debug:c.debug,verbose:c.verbose,duration:c.transition.showDuration,onComplete:function(){e.call(n,b),c.onVisible.call(n,b)}}))},close:function(e){e=F.isFunction(e)?e:function(){},w.debug("Closing toast"),!1===c.onHide.call(n,b)?w.debug("onHide callback returned false, cancelling toast animation"):c.transition&&F.fn.transition!==O&&g.transition("is supported")?n.transition({animation:c.transition.hideMethod+" out",queue:!1,duration:c.transition.hideDuration,debug:c.debug,verbose:c.verbose,interval:50,onBeforeHide:function(e){e=F.isFunction(e)?e:function(){},""!==c.transition.closeEasing?n&&(n.css("opacity",0),n.wrap("<div/>").parent().hide(c.transition.closeDuration,c.transition.closeEasing,function(){n&&(n.parent().remove(),e.call(n))})):e.call(n)},onComplete:function(){e.call(n,b),c.onHidden.call(n,b),w.destroy()}}):w.error(f.noTransition)},pause:function(){s.css("animationPlayState","paused"),r&&r.css("animationPlayState","paused")},continue:function(){s.css("animationPlayState","running"),r&&r.css("animationPlayState","running")}},has:{container:function(){return w.verbose("Determining if there is already a container"),0<h.find(w.helpers.toClass(c.position)+d.container+(c.horizontal?w.helpers.toClass(u.horizontal):"")).length},toast:function(){return!!w.get.toast()},toasts:function(){return 0<w.get.toasts().length},configActions:function(){return Array.isArray(c.actions)&&0<c.actions.length}},get:{container:function(){return h.find(w.helpers.toClass(c.position)+d.container)[0]},toastBox:function(){return n||null},toast:function(){return i||null},toasts:function(){return F(w.get.container()).find(d.box)},iconClass:function(){return"string"==typeof c.showIcon?c.showIcon:c.showIcon&&c.icons[c.class]?c.icons[c.class]:""},remainingTime:function(){return s?s.css("opacity")*c.displayTime:0}},set:{visible:function(){i.addClass(u.visible)}},remove:{visible:function(){i.removeClass(u.visible)}},event:{click:function(e){0===F(e.target).closest("a").length&&(c.onClick.call(n,b),w.close())},approve:function(){!1===c.onApprove.call(b,g)?w.verbose("Approve callback returned false cancelling close"):w.close()},deny:function(){!1===c.onDeny.call(b,g)?w.verbose("Deny callback returned false cancelling close"):w.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={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{useElement:function(e){return F.fn[e]!==O||(w.error(f.noElement.replace("{element}",e)),!1)}},setting:function(e,t){if(w.debug("Changing setting",e,t),F.isPlainObject(e))F.extend(!0,c,e);else{if(t===O)return c[e];F.isPlainObject(c[e])?F.extend(!0,c[e],t):c[e]=t}},internal:function(e,t){if(F.isPlainObject(e))F.extend(!0,w,e);else{if(t===O)return w[e];w[e]=t}},debug:function(){!c.silent&&c.debug&&(c.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,c.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!c.silent&&c.verbose&&c.debug&&(c.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,c.name+":"),w.verbose.apply(console,arguments)))},error:function(){c.silent||(w.error=Function.prototype.bind.call(console.error,console,c.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var t,n;c.performance&&(n=(t=(new Date).getTime())-(T||t),T=t,D.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:b,"Execution Time":n})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var e=c.name+":",n=0;T=!1,clearTimeout(w.performance.timer),F.each(D,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",k&&(e+=" '"+k+"'"),(console.group!==O||console.table!==O)&&0<D.length&&(console.groupCollapsed(e),console.table?console.table(D):F.each(D,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),D=[]}},invoke:function(i,e,t){var o,a,n,r=y;return e=e||E,t=b||t,"string"==typeof i&&r!==O&&(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]!==O)return a=r[n],!1;{if(!F.isPlainObject(r[t])||e==o)return r[t]!==O?a=r[t]:w.error(f.method,i),!1;r=r[t]}}})),F.isFunction(a)?n=a.apply(t,e):a!==O&&(n=a),Array.isArray(C)?C.push(n):C!==O?C=[C,n]:n!==O&&(C=n),a}};A?(y===O&&w.initialize(),w.invoke(S)):(y!==O&&y.invoke("destroy"),w.initialize(),C=g)}),C!==O?C: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(E,F,O){"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(w){var x,e=E.isFunction(this)?E(F):E(this),C=e.selector||"",k=(new Date).getTime(),T=[],D=w,S="string"==typeof D,A=[].slice.call(arguments,1);return e.each(function(){var a,i,n,e,r,s=E.isPlainObject(w)?E.extend(!0,{},E.fn.api.settings,w):E.extend({},E.fn.api.settings),t=s.namespace,o=s.metadata,l=s.selector,c=s.error,u=s.className,d="."+t,f="module-"+t,m=E(this),p=m.closest(l.form),g=s.stateContext?E(s.stateContext):m,h=this,v=g[0],b=m.data(f),y={initialize:function(){S||y.bind.events(),y.instantiate()},instantiate:function(){y.verbose("Storing instance of module",y),b=y,m.data(f,b)},destroy:function(){y.verbose("Destroying previous module for",h),m.removeData(f).off(d)},bind:{events:function(){var e=y.get.event();e?(y.verbose("Attaching API events to element",e),m.on(e+d,y.event.trigger)):"now"==s.on&&(y.debug("Querying API endpoint immediately"),y.query())}},decode:{json:function(e){if(e!==O&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(F.Storage!==O)return t=sessionStorage.getItem(e),y.debug("Using cached response",e,t),y.decode.json(t);y.error(c.noStorage)}},write:{cachedResponse:function(e,t){t&&""===t?y.debug("Response empty, not caching",t):F.Storage===O?y.error(c.noStorage):(E.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e,t),y.verbose("Storing cached response for url",e,t))}},query:function(){if(y.is.disabled())y.debug("Element is disabled API request aborted");else{if(y.is.loading()){if(!s.interruptRequests)return void y.debug("Cancelling request, previous request is still pending");y.debug("Interrupting previous request"),y.abort()}if(s.defaultData&&E.extend(!0,s.urlData,y.get.defaultData()),s.serializeForm&&(s.data=y.add.formData(s.data)),!1===(i=y.get.settings()))return y.cancelled=!0,void y.error(c.beforeSend);if(y.cancelled=!1,(n=y.get.templatedURL())||y.is.mocked()){if((n=y.add.urlData(n))||y.is.mocked()){if(i.url=s.base+n,a=E.extend(!0,{},s,{type:s.method||s.type,data:e,url:s.base+n,beforeSend:s.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),y.debug("Querying URL",a.url),y.verbose("Using AJAX settings",a),"local"===s.cache&&y.read.cachedResponse(n))return y.debug("Response returned from local cache"),y.request=y.create.request(),void y.request.resolveWith(v,[y.read.cachedResponse(n)]);s.throttle?s.throttleFirstRequest||y.timer?(y.debug("Throttling request",s.throttle),clearTimeout(y.timer),y.timer=setTimeout(function(){y.timer&&delete y.timer,y.debug("Sending throttled request",e,a.method),y.send.request()},s.throttle)):(y.debug("Sending request",e,a.method),y.send.request(),y.timer=setTimeout(function(){},s.throttle)):(y.debug("Sending request",e,a.method),y.send.request())}}else y.error(c.missingURL)}},should:{removeError:function(){return!0===s.hideError||"auto"===s.hideError&&!y.is.form()}},is:{disabled:function(){return 0<m.filter(l.disabled).length},expectingJSON:function(){return"json"===s.dataType||"jsonp"===s.dataType},form:function(){return m.is("form")||g.is("form")},mocked:function(){return s.mockResponse||s.mockResponseAsync||s.response||s.responseAsync},input:function(){return m.is("input")},loading:function(){return!!y.request&&"pending"==y.request.state()},abortedRequest:function(e){return e&&e.readyState!==O&&0===e.readyState?(y.verbose("XHR request determined to be aborted"),!0):(y.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return y.is.expectingJSON()&&E.isFunction(s.successTest)?(y.debug("Checking JSON returned success",s.successTest,e),s.successTest(e)?(y.debug("Response passed success test",e),!0):(y.debug("Response failed success test",e),!1)):(y.verbose("Response is not JSON, skipping validation",s.successTest,e),!0)}},was:{cancelled:function(){return y.cancelled||!1},succesful:function(){return y.verbose('This behavior will be deleted due to typo. Use "was successful" instead.'),y.was.successful()},successful:function(){return y.request&&"resolved"==y.request.state()},failure:function(){return y.request&&"rejected"==y.request.state()},complete:function(){return y.request&&("resolved"==y.request.state()||"rejected"==y.request.state())}},add:{urlData:function(o,a){var e,t;return o&&(e=o.match(s.regExp.required),t=o.match(s.regExp.optional),a=a||s.urlData,e&&(y.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]!==O?a[n]:m.data(n)!==O?m.data(n):g.data(n)!==O?g.data(n):a[n];if(i===O)return y.error(c.requiredParameter,n,o),o=!1;y.verbose("Found required variable",n,i),i=s.encodeParameters?y.get.urlEncodedValue(i):i,o=o.replace(t,i)})),t&&(y.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]!==O?a[n]:m.data(n)!==O?m.data(n):g.data(n)!==O?g.data(n):a[n];o=i!==O?(y.verbose("Optional variable Found",n,i),o.replace(t,i)):(y.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!==O,n=t?p.serializeObject():p.serialize();return e=e||s.data,e=E.isPlainObject(e)?t?(y.debug("Extending existing data with form data",e,n),E.extend(!0,{},e,n)):(y.error(c.missingSerialize),y.debug("Cant extend data. Replacing data with form data",e,n),n):(y.debug("Adding form data",n),n)}},send:{request:function(){y.set.loading(),y.request=y.create.request(),y.is.mocked()?y.mockedXHR=y.create.mockedXHR():y.xhr=y.create.xhr(),s.onRequest.call(v,y.request,y.xhr)}},event:{trigger:function(e){y.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,n){var i=this,o=(new Date).getTime()-r,o=s.loadingDuration-o,a=!!E.isFunction(s.onResponse)&&(y.is.expectingJSON()&&!s.rawResponse?s.onResponse.call(i,E.extend(!0,{},e)):s.onResponse.call(i,e)),o=0<o?o:0;a&&(y.debug("Modified API response in onResponse callback",s.onResponse,a,e),e=a),0<o&&y.debug("Response completed early delaying state change by",o),setTimeout(function(){y.is.validResponse(e)?y.request.resolveWith(i,[e,n]):y.request.rejectWith(i,[n,"invalid"])},o)},fail:function(e,t,n){var i=this,o=(new Date).getTime()-r,o=s.loadingDuration-o;0<(o=0<o?o:0)&&y.debug("Response completed early delaying state change by",o),setTimeout(function(){y.is.abortedRequest(e)?y.request.rejectWith(i,[e,"aborted",n]):y.request.rejectWith(i,[e,"error",t,n])},o)}},request:{done:function(e,t){y.debug("Successful API Response",e),"local"===s.cache&&n&&(y.write.cachedResponse(n,e),y.debug("Saving server response locally",y.cache)),s.onSuccess.call(v,e,m,t)},complete:function(e,t){var n,i;y.was.successful()?(i=e,n=t):i=y.get.responseFromXHR(n=e),y.remove.loading(),s.onComplete.call(v,i,m,n)},fail:function(e,t,n){var i=y.get.responseFromXHR(e),o=y.get.errorFromRequest(i,t,n);if("aborted"==t)return y.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,n),s.onAbort.call(v,t,m,e),!0;"invalid"==t?y.debug("JSON did not pass success test. A server-side error has most likely occurred",i):"error"==t&&e!==O&&(y.debug("XHR produced a server error",t,n),(e.status<200||300<=e.status)&&n!==O&&""!==n&&y.error(c.statusMessage+n,a.url),s.onError.call(v,o,m,e)),s.errorDuration&&"aborted"!==t&&(y.debug("Adding error state"),y.set.error(),y.should.removeError()&&setTimeout(y.remove.error,s.errorDuration)),y.debug("API Request failed",o,e),s.onFailure.call(v,i,m,e)}}},create:{request:function(){return E.Deferred().always(y.event.request.complete).done(y.event.request.done).fail(y.event.request.fail)},mockedXHR:function(){var e=s.mockResponse||s.response,t=s.mockResponseAsync||s.responseAsync,n=E.Deferred().always(y.event.xhr.complete).done(y.event.xhr.done).fail(y.event.xhr.fail);return e?(e=E.isFunction(e)?(y.debug("Using specified synchronous callback",e),e.call(v,i)):(y.debug("Using settings specified response",e),e),n.resolveWith(v,[e,!1,{responseText:e}])):E.isFunction(t)&&(e=function(e){y.debug("Async callback returned response",e),e?n.resolveWith(v,[e,!1,{responseText:e}]):n.rejectWith(v,[{responseText:e},!1,!1])},y.debug("Using specified async response callback",t),t.call(v,i,e)),n},xhr:function(){var e=E.ajax(a).always(y.event.xhr.always).done(y.event.xhr.done).fail(y.event.xhr.fail);return y.verbose("Created server request",e,a),e}},set:{error:function(){y.verbose("Adding error state to element",g),g.addClass(u.error)},loading:function(){y.verbose("Adding loading state to element",g),g.addClass(u.loading),r=(new Date).getTime()}},remove:{error:function(){y.verbose("Removing error state from element",g),g.removeClass(u.error)},loading:function(){y.verbose("Removing loading state from element",g),g.removeClass(u.loading)}},get:{responseFromXHR:function(e){return!!E.isPlainObject(e)&&(y.is.expectingJSON()?y.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,n){return E.isPlainObject(e)&&e.error!==O?e.error:s.error[t]!==O?s.error[t]:n},request:function(){return y.request||!1},xhr:function(){return y.xhr||!1},settings:function(){var e=s.beforeSend.call(m,s);return e&&(e.success!==O&&(y.debug("Legacy success callback detected",e),y.error(c.legacyParameters,e.success),e.onSuccess=e.success),e.failure!==O&&(y.debug("Legacy failure callback detected",e),y.error(c.legacyParameters,e.failure),e.onFailure=e.failure),e.complete!==O&&(y.debug("Legacy complete callback detected",e),y.error(c.legacyParameters,e.complete),e.onComplete=e.complete)),e===O&&y.error(c.noReturnedValue),!1===e?e:e!==O?E.extend(!0,{},e):E.extend(!0,{},s)},urlEncodedValue:function(e){var t=F.decodeURIComponent(e),n=F.encodeURIComponent(e);return t!==e?(y.debug("URL value is already encoded, avoiding double encoding",e),e):(y.verbose("Encoding value using encodeURIComponent",e,n),n)},defaultData:function(){var e={};return E.isWindow(h)||(y.is.input()?e.value=m.val():y.is.form()||(e.text=m.text())),e},event:function(){return E.isWindow(h)||"now"==s.on?(y.debug("API called without element, no events attached"),!1):"auto"==s.on?m.is("input")?h.oninput!==O?"input":h.onpropertychange!==O?"propertychange":"keyup":m.is("form")?"submit":"click":s.on},templatedURL:function(e){if(e=e||m.data(o.action)||s.action||!1,n=m.data(o.url)||s.url||!1)return y.debug("Using specified url",n),n;if(e){if(y.debug("Looking up url for action",e,s.api),s.api[e]===O&&!y.is.mocked())return void y.error(c.missingAction,s.action,s.api);n=s.api[e]}else y.is.form()&&(n=m.attr("action")||g.attr("action")||!1,y.debug("No url or action specified, defaulting to form action",n));return n}},abort:function(){var e=y.get.xhr();e&&"resolved"!==e.state()&&(y.debug("Cancelling API request"),e.abort())},reset:function(){y.remove.error(),y.remove.loading()},setting:function(e,t){if(y.debug("Changing setting",e,t),E.isPlainObject(e))E.extend(!0,s,e);else{if(t===O)return s[e];E.isPlainObject(s[e])?E.extend(!0,s[e],t):s[e]=t}},internal:function(e,t){if(E.isPlainObject(e))E.extend(!0,y,e);else{if(t===O)return y[e];y[e]=t}},debug:function(){!s.silent&&s.debug&&(s.performance?y.performance.log(arguments):(y.debug=Function.prototype.bind.call(console.info,console,s.name+":"),y.debug.apply(console,arguments)))},verbose:function(){!s.silent&&s.verbose&&s.debug&&(s.performance?y.performance.log(arguments):(y.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),y.verbose.apply(console,arguments)))},error:function(){s.silent||(y.error=Function.prototype.bind.call(console.error,console,s.name+":"),y.error.apply(console,arguments))},performance:{log:function(e){var t,n;s.performance&&(n=(t=(new Date).getTime())-(k||t),k=t,T.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(y.performance.timer),y.performance.timer=setTimeout(y.performance.display,500)},display:function(){var e=s.name+":",n=0;k=!1,clearTimeout(y.performance.timer),E.each(T,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",C&&(e+=" '"+C+"'"),(console.group!==O||console.table!==O)&&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=b;return e=e||A,t=h||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]:y.error(c.method,i),!1;r=r[t]}}})),E.isFunction(a)?n=a.apply(t,e):a!==O&&(n=a),Array.isArray(x)?x.push(n):x!==O?x=[x,n]:n!==O&&(x=n),a}};S?(b===O&&y.initialize(),y.invoke(D)):(b!==O&&b.invoke("destroy"),y.initialize())}),x!==O?x: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(x,e,C,k){"use strict";x.isFunction=x.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")(),x.fn.transition=function(){var m,r=x(this),p=r.selector||"",g=(new Date).getTime(),h=[],v=arguments,b=v[0],y=[].slice.call(arguments,1),w="string"==typeof b;return r.each(function(n){var l,s,t,c,i,o,e,a,u=x(this),d=this,f={initialize:function(){l=f.get.settings.apply(d,v),c=l.className,t=l.error,i=l.metadata,a="."+l.namespace,e="module-"+l.namespace,s=u.data(e)||f,o=f.get.animationEndEvent(),!1===(w=w&&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-n)*l.interval:n*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(t.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(t.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(o+".queue"+a,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(" "),x.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(o+".complete"+a,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(i.displayType,e)},transitionExists:function(e,t){x.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(o)},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"+a)},completeCallback:function(){u.off(".complete"+a)},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?x.extend(!0,{},x.fn.transition.settings,e):"function"==typeof n?x.extend({},x.fn.transition.settings,{animation:e,onComplete:n,duration:t}):"string"==typeof t||"number"==typeof t?x.extend({},x.fn.transition.settings,{animation:e,duration:t}):"object"==typeof t?x.extend({},x.fn.transition.settings,t,{animation:e}):"function"==typeof t?x.extend({},x.fn.transition.settings,{animation:e,onComplete:t}):x.extend({},x.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(" "),x.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(i.displayType)===k&&(""===(e=u.css("display"))||"none"===e?f.can.transition(!0):f.save.displayType(e)),u.data(i.displayType))},userStyle:function(e){return(e=e||u.attr("style")||"").replace(/display.*?;/,"")},transitionExists:function(e){return x.fn.transition.exists[e]},animationStartEvent:function(){var e,t=C.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=C.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=x("<"+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!==o}},hide:function(){f.verbose("Hiding element"),f.is.animating()&&f.reset(),d.blur(),f.remove.display(),f.remove.visible(),x.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(o)},stopAll:function(){f.debug("Stopping all animation"),f.remove.queueCallback(),u.triggerHandler(o)},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),x.isPlainObject(e))x.extend(!0,l,e);else{if(t===k)return l[e];x.isPlainObject(l[e])?x.extend(!0,l[e],t):l[e]=t}},internal:function(e,t){if(x.isPlainObject(e))x.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())-(g||t),g=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;g=!1,clearTimeout(f.performance.timer),x.each(h,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",p&&(e+=" '"+p+"'"),1<r.length&&(e+=" ("+r.length+")"),(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=s;return e=e||y,t=d||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]),!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!==k&&a}};f.initialize()}),m!==k?m:this},x.fn.transition.exists={},x.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);