New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fomantic-ui-css

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fomantic-ui-css - npm Package Compare versions

Comparing version 2.6.3 to 2.6.4

2

components/accordion.js
/*!
* # Semantic UI 2.6.3 - Accordion
* # Semantic UI 2.6.4 - Accordion
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - API
* # Semantic UI 2.6.4 - API
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Calendar
* # Semantic UI 2.6.4 - Calendar
* http://github.com/semantic-org/semantic-ui/

@@ -219,2 +219,3 @@ *

var container = $container;
var tooltipPosition = container.hasClass("left") ? "right center" : "left center";
container.empty();

@@ -319,3 +320,10 @@ if (pages > 1) {

var adjacent = isDay && cellDate.getMonth() !== ((month + 12) % 12);
var disabled = adjacent || !module.helper.isDateInRange(cellDate, mode) || settings.isDisabled(cellDate, mode);
var disabled = adjacent || !module.helper.isDateInRange(cellDate, mode) || settings.isDisabled(cellDate, mode) || module.helper.isDisabled(cellDate, mode);
if (disabled) {
var disabledReason = module.helper.disabledReason(cellDate, mode);
if (disabledReason !== null) {
cell.attr("data-tooltip", disabledReason[metadata.message]);
cell.attr("data-position", tooltipPosition);
}
}
var active = module.helper.dateEqual(cellDate, date, mode);

@@ -383,3 +391,3 @@ var isToday = module.helper.dateEqual(cellDate, today, mode);

(!!endDate && module.helper.isDateInRange(cellDate, mode, rangeDate, endDate)));
cell.toggleClass(className.focusCell, focused && (!isTouch || isTouchDown) && !adjacent);
cell.toggleClass(className.focusCell, focused && (!isTouch || isTouchDown) && !adjacent && !disabled);
cell.toggleClass(className.rangeCell, inRange && !active && !disabled);

@@ -452,2 +460,5 @@ });

var target = $(event.target);
if (target.hasClass("disabled")) {
return;
}
var parent = target.parent();

@@ -502,3 +513,3 @@ if (parent.data(metadata.date) || parent.data(metadata.focusDate) || parent.data(metadata.mode)) {

var date = module.get.focusDate();
if (date && !settings.isDisabled(date, mode)) {
if (date && !settings.isDisabled(date, mode) && !module.helper.isDisabled(date, mode)) {
module.selectDate(date);

@@ -797,2 +808,25 @@ }

helper: {
isDisabled: function(date, mode) {
return mode === 'day' && ((settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
if (d instanceof Date) {
return module.helper.dateEqual(date, d, mode);
}
if (d !== null && typeof d === 'object') {
return module.helper.dateEqual(date, d[metadata.date], mode);
}
}));
},
disabledReason: function(date, mode) {
if (mode === 'day') {
for (var i = 0; i < settings.disabledDates.length; i++) {
var d = settings.disabledDates[i];
if (d !== null && typeof d === 'object' && module.helper.dateEqual(date, d[metadata.date], mode)) {
var reason = {};
reason[metadata.message] = d[metadata.message];
return reason;
}
}
}
return null;
},
sanitiseDate: function (date) {

@@ -1060,24 +1094,26 @@ if (!date) {

type : 'datetime', // picker type, can be 'datetime', 'date', 'time', 'month', or 'year'
firstDayOfWeek : 0, // day for first day column (0 = Sunday)
constantHeight : true, // add rows to shorter months to keep day calendar height consistent (6 rows)
today : false, // show a 'today/now' button at the bottom of the calendar
closable : true, // close the popup after selecting a date/time
monthFirst : true, // month before day when parsing/converting date from/to text
touchReadonly : true, // set input to readonly on touch devices
inline : false, // create the calendar inline instead of inside a popup
on : null, // when to show the popup (defaults to 'focus' for input, 'click' for others)
initialDate : null, // date to display initially when no date is selected (null = now)
startMode : false, // display mode to start in, can be 'year', 'month', 'day', 'hour', 'minute' (false = 'day')
minDate : null, // minimum date/time that can be selected, dates/times before are disabled
maxDate : null, // maximum date/time that can be selected, dates/times after are disabled
ampm : true, // show am/pm in time mode
disableYear : false, // disable year selection mode
disableMonth : false, // disable month selection mode
disableMinute : false, // disable minute selection mode
formatInput : true, // format the input text upon input blur and module creation
startCalendar : null, // jquery object or selector for another calendar that represents the start date of a date range
endCalendar : null, // jquery object or selector for another calendar that represents the end date of a date range
multiMonth : 1, // show multiple months when in 'day' mode
showWeekNumbers: null, // show Number of Week at the very first column of a dayView
type : 'datetime', // picker type, can be 'datetime', 'date', 'time', 'month', or 'year'
firstDayOfWeek : 0, // day for first day column (0 = Sunday)
constantHeight : true, // add rows to shorter months to keep day calendar height consistent (6 rows)
today : false, // show a 'today/now' button at the bottom of the calendar
closable : true, // close the popup after selecting a date/time
monthFirst : true, // month before day when parsing/converting date from/to text
touchReadonly : true, // set input to readonly on touch devices
inline : false, // create the calendar inline instead of inside a popup
on : null, // when to show the popup (defaults to 'focus' for input, 'click' for others)
initialDate : null, // date to display initially when no date is selected (null = now)
startMode : false, // display mode to start in, can be 'year', 'month', 'day', 'hour', 'minute' (false = 'day')
minDate : null, // minimum date/time that can be selected, dates/times before are disabled
maxDate : null, // maximum date/time that can be selected, dates/times after are disabled
ampm : true, // show am/pm in time mode
disableYear : false, // disable year selection mode
disableMonth : false, // disable month selection mode
disableMinute : false, // disable minute selection mode
formatInput : true, // format the input text upon input blur and module creation
startCalendar : null, // jquery object or selector for another calendar that represents the start date of a date range
endCalendar : null, // jquery object or selector for another calendar that represents the end date of a date range
multiMonth : 1, // show multiple months when in 'day' mode
showWeekNumbers : null, // show Number of Week at the very first column of a dayView
disabledDates : [], // specific day(s) which won't be selectable and contain additional information.
disabledDaysOfWeek : [], // day(s) which won't be selectable(s) (0 = Sunday)
// popup options ('popup', 'on', 'hoverable', and show/hide callbacks are overridden)

@@ -1442,3 +1478,4 @@ popupOptions: {

mode: 'mode',
monthOffset: 'monthOffset'
monthOffset: 'monthOffset',
message: 'message'
}

@@ -1445,0 +1482,0 @@ };

@@ -1,1 +0,1 @@

!function(pe,e,M,w){"use strict";e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),pe.fn.calendar=function(m){var h,e=pe(this),g=e.selector||"",D=(new Date).getTime(),v=[],y=m,b="string"==typeof y,C=[].slice.call(arguments,1);return e.each(function(){var c,re,ie=pe.isPlainObject(m)?pe.extend(!0,{},pe.fn.calendar.settings,m):pe.extend({},pe.fn.calendar.settings),le=ie.className,e=ie.namespace,t=ie.selector,se=ie.formatter,a=ie.parser,ue=ie.metadata,l=ie.error,n="."+e,o="module-"+e,r=pe(this),i=r.find(t.input),de=r.find(t.popup),s=r.find(t.activator),u=this,d=r.data(o),f=!1,p=!1;re={initialize:function(){re.debug("Initializing calendar for",u,r),c=re.get.isTouch(),re.setup.config(),re.setup.popup(),re.setup.inline(),re.setup.input(),re.setup.date(),re.create.calendar(),re.bind.events(),re.instantiate()},instantiate:function(){re.verbose("Storing instance of calendar"),d=re,r.data(o,d)},destroy:function(){re.verbose("Destroying previous calendar for",u),r.removeData(o),re.unbind.events()},setup:{config:function(){null!==re.get.minDate()&&re.set.minDate(r.data(ue.minDate)),null!==re.get.maxDate()&&re.set.maxDate(r.data(ue.maxDate))},popup:function(){if(!ie.inline&&(s.length||(s=r.children().first()).length))if(pe.fn.popup!==w){de.length||(de=pe("<div/>").addClass(le.popup).prependTo(s.parent())),de.addClass(le.calendar);var e=ie.onVisible,t=ie.onHidden;i.length||(de.attr("tabindex","0"),e=function(){return re.focus(),ie.onVisible.apply(de,arguments)},t=function(){return re.blur(),ie.onHidden.apply(de,arguments)});var a=ie.on||(i.length?"focus":"click"),n=pe.extend({},ie.popupOptions,{popup:de,on:a,hoverable:"hover"===a,onShow:function(){return re.set.focusDate(re.get.date()),re.set.mode(ie.startMode),ie.onShow.apply(de,arguments)},onVisible:e,onHide:ie.onHide,onHidden:t});re.popup(n)}else re.error(l.popup)},inline:function(){s.length&&!ie.inline||(de=pe("<div/>").addClass(le.calendar).appendTo(r),i.length||de.attr("tabindex","0"))},input:function(){ie.touchReadonly&&i.length&&c&&i.prop("readonly",!0)},date:function(){if(i.length){var e=i.val(),t=a.date(e,ie);re.set.date(t,ie.formatInput,!1)}}},create:{calendar:function(){var e,t,a,n,o,r,i,l=re.get.mode(),s=new Date,u=re.get.date(),d=re.get.focusDate(),p=d||u||ie.initialDate||s;p=re.helper.dateInRange(p),d||(d=p,re.set.focusDate(d,!1,!1));var c="year"===l,f="month"===l,m="day"===l,h="hour"===l,g="minute"===l,D="time"===ie.type,v=Math.max(ie.multiMonth,1),y=m?re.get.monthOffset():0,b=p.getMinutes(),C=p.getHours(),M=p.getDate(),w=p.getMonth()+y,x=p.getFullYear(),k=m?ie.showWeekNumbers?8:7:h?4:3,T=m||h?6:4,N=m?v:1,O=de;for(O.empty(),1<N&&(i=pe("<div/>").addClass(le.grid).appendTo(O)),n=0;n<N;n++){if(1<N)O=pe("<div/>").addClass(le.column).appendTo(i);var F=w+n,H=(new Date(x,F,1).getDay()-ie.firstDayOfWeek%7+7)%7;if(!ie.constantHeight&&m){var I=new Date(x,F+1,0).getDate()+H;T=Math.ceil(I/7)}var Y=c?10:f?1:0,E=m?1:0,R=h||g?1:0,V=h||g?M:1,W=new Date(x-Y,F-E,V-R,C),j=new Date(x+Y,F+E,V+R,C),A=c?new Date(10*Math.ceil(x/10)-9,0,0):f?new Date(x,0,0):m?new Date(x,F,0):new Date(x,F,M,-1),S=c?new Date(10*Math.ceil(x/10)+1,0,1):f?new Date(x+1,0,1):m?new Date(x,F+1,1):new Date(x,F,M+1),P=l;m&&ie.showWeekNumbers&&(P+=" andweek");var K=pe("<table/>").addClass(le.table).addClass(P).appendTo(O),U=k;if(!D){var q=pe("<thead/>").appendTo(K);o=pe("<tr/>").appendTo(q),r=pe("<th/>").attr("colspan",""+k).appendTo(o);var J=c||f?new Date(x,0,1):m?new Date(x,F,1):new Date(x,F,M,C,b),z=pe("<span/>").addClass(le.link).appendTo(r);z.text(se.header(J,l,ie));var L=f?ie.disableYear?"day":"year":m?ie.disableMonth?"year":"month":"day";if(z.data(ue.mode,L),0===n){var B=pe("<span/>").addClass(le.prev).appendTo(r);B.data(ue.focusDate,W),B.toggleClass(le.disabledCell,!re.helper.isDateInRange(A,l)),pe("<i/>").addClass(le.prevIcon).appendTo(B)}if(n===N-1){var Q=pe("<span/>").addClass(le.next).appendTo(r);Q.data(ue.focusDate,j),Q.toggleClass(le.disabledCell,!re.helper.isDateInRange(S,l)),pe("<i/>").addClass(le.nextIcon).appendTo(Q)}if(m)for(o=pe("<tr/>").appendTo(q),ie.showWeekNumbers&&((r=pe("<th/>").appendTo(o)).text(ie.text.weekNo),r.addClass(le.disabledCell),U--),e=0;e<U;e++)(r=pe("<th/>").appendTo(o)).text(se.dayColumnHeader((e+ie.firstDayOfWeek)%7,ie))}var Z=pe("<tbody/>").appendTo(K);for(e=c?10*Math.ceil(x/10)-9:m?1-H:0,t=0;t<T;t++)for(o=pe("<tr/>").appendTo(Z),m&&ie.showWeekNumbers&&((r=pe("<th/>").appendTo(o)).text(re.get.weekOfYear(x,F,e+1-ie.firstDayOfWeek)),r.addClass(le.disabledCell)),a=0;a<U;a++,e++){var G=c?new Date(e,F,1,C,b):f?new Date(x,e,1,C,b):m?new Date(x,F,e,C,b):h?new Date(x,F,M,e):new Date(x,F,M,C,5*e),X=c?e:f?ie.text.monthsShort[e]:m?G.getDate():se.time(G,ie,!0);(r=pe("<td/>").addClass(le.cell).appendTo(o)).text(X),r.data(ue.date,G);var $=m&&G.getMonth()!==(F+12)%12,_=$||!re.helper.isDateInRange(G,l)||ie.isDisabled(G,l),ee=re.helper.dateEqual(G,u,l),te=re.helper.dateEqual(G,s,l);r.toggleClass(le.adjacentCell,$),r.toggleClass(le.disabledCell,_),r.toggleClass(le.activeCell,ee&&!$),h||g||r.toggleClass(le.todayCell,!$&&te);var ae={mode:l,adjacent:$,disabled:_,active:ee,today:te};se.cell(r,G,ae),re.helper.dateEqual(G,d,l)&&re.set.focusDate(G,!1,!1)}if(ie.today){var ne=pe("<tr/>").appendTo(Z),oe=pe("<td/>").attr("colspan",""+k).addClass(le.today).appendTo(ne);oe.text(se.today(ie)),oe.data(ue.date,s)}re.update.focus(!1,K)}}},update:{focus:function(e,t){t=t||de;var l=re.get.mode(),a=re.get.date(),s=re.get.focusDate(),u=re.get.startDate(),d=re.get.endDate(),p=(e?s:null)||a||(c?null:s);t.find("td").each(function(){var e=pe(this),t=e.data(ue.date);if(t){var a=e.hasClass(le.disabledCell),n=e.hasClass(le.activeCell),o=e.hasClass(le.adjacentCell),r=re.helper.dateEqual(t,s,l),i=!!p&&(!!u&&re.helper.isDateInRange(t,l,u,p)||!!d&&re.helper.isDateInRange(t,l,p,d));e.toggleClass(le.focusCell,r&&(!c||f)&&!o),e.toggleClass(le.rangeCell,i&&!n&&!a)}})}},refresh:function(){re.create.calendar()},bind:{events:function(){re.debug("Binding events"),de.on("mousedown"+n,re.event.mousedown),de.on("touchstart"+n,re.event.mousedown),de.on("mouseup"+n,re.event.mouseup),de.on("touchend"+n,re.event.mouseup),de.on("mouseover"+n,re.event.mouseover),i.length?(i.on("input"+n,re.event.inputChange),i.on("focus"+n,re.event.inputFocus),i.on("blur"+n,re.event.inputBlur),i.on("click"+n,re.event.inputClick),i.on("keydown"+n,re.event.keydown)):de.on("keydown"+n,re.event.keydown)}},unbind:{events:function(){re.debug("Unbinding events"),de.off(n),i.length&&i.off(n)}},event:{mouseover:function(e){var t=pe(e.target).data(ue.date),a=1===e.buttons;t&&re.set.focusDate(t,!1,!0,a)},mousedown:function(e){i.length&&e.preventDefault(),f=0<=e.type.indexOf("touch");var t=pe(e.target).data(ue.date);t&&re.set.focusDate(t,!1,!0,!0)},mouseup:function(e){re.focus(),e.preventDefault(),e.stopPropagation(),f=!1;var t=pe(e.target),a=t.parent();(a.data(ue.date)||a.data(ue.focusDate)||a.data(ue.mode))&&(t=a);var n=t.data(ue.date),o=t.data(ue.focusDate),r=t.data(ue.mode);if(n){var i=t.hasClass(le.today);re.selectDate(n,i)}else o?re.set.focusDate(o):r&&re.set.mode(r)},keydown:function(e){if(27!==e.keyCode&&9!==e.keyCode||re.popup("hide"),re.popup("is visible"))if(37===e.keyCode||38===e.keyCode||39===e.keyCode||40===e.keyCode){var t="day"===(d=re.get.mode())?7:"hour"===d?4:3,a=37===e.keyCode?-1:38===e.keyCode?-t:39==e.keyCode?1:t;a*="minute"===d?5:1;var n=re.get.focusDate()||re.get.date()||new Date,o=n.getFullYear()+("year"===d?a:0),r=n.getMonth()+("month"===d?a:0),i=n.getDate()+("day"===d?a:0),l=n.getHours()+("hour"===d?a:0),s=n.getMinutes()+("minute"===d?a:0),u=new Date(o,r,i,l,s);"time"===ie.type&&(u=re.helper.mergeDateTime(n,u)),re.helper.isDateInRange(u,d)&&re.set.focusDate(u)}else if(13===e.keyCode){var d=re.get.mode(),p=re.get.focusDate();p&&!ie.isDisabled(p,d)&&re.selectDate(p),e.preventDefault(),e.stopPropagation()}38!==e.keyCode&&40!==e.keyCode||(e.preventDefault(),re.popup("show"))},inputChange:function(){var e=i.val(),t=a.date(e,ie);re.set.date(t,!1)},inputFocus:function(){de.addClass(le.active)},inputBlur:function(){if(de.removeClass(le.active),ie.formatInput){var e=re.get.date(),t=se.datetime(e,ie);i.val(t)}},inputClick:function(){re.popup("show")}},get:{weekOfYear:function(e,t,a){var n,o,r;return n=Date.UTC(e,t,a+3)/864e5,o=Math.floor(n/7),r=new Date(6048e5*o).getUTCFullYear(),o-Math.floor(Date.UTC(r,0,7)/6048e5)+1},date:function(){return r.data(ue.date)||null},focusDate:function(){return r.data(ue.focusDate)||null},startDate:function(){var e=re.get.calendarModule(ie.startCalendar);return(e?e.get.date():r.data(ue.startDate))||null},endDate:function(){var e=re.get.calendarModule(ie.endCalendar);return(e?e.get.date():r.data(ue.endDate))||null},minDate:function(){return r.data(ue.minDate)||null},maxDate:function(){return r.data(ue.maxDate)||null},monthOffset:function(){return r.data(ue.monthOffset)||0},mode:function(){var e=r.data(ue.mode)||ie.startMode,t=re.get.validModes();return 0<=pe.inArray(e,t)?e:"time"===ie.type?"hour":"month"===ie.type?"month":"year"===ie.type?"year":"day"},validModes:function(){var e=[];return"time"!==ie.type&&(ie.disableYear&&"year"!==ie.type||e.push("year"),(!ie.disableMonth&&"year"!==ie.type||"month"===ie.type)&&e.push("month"),0<=ie.type.indexOf("date")&&e.push("day")),0<=ie.type.indexOf("time")&&(e.push("hour"),ie.disableMinute||e.push("minute")),e},isTouch:function(){try{return M.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e instanceof pe||(e=r.parent().children(e).first()),e.data(o)):null}},set:{date:function(e,t,a){t=!1!==t,a=!1!==a,e=re.helper.sanitiseDate(e),e=re.helper.dateInRange(e);var n=re.get.mode(),o=se.datetime(e,ie);if(a&&!1===ie.onChange.call(u,e,o,n))return!1;if(re.set.focusDate(e),ie.isDisabled(e,n))return!1;var r=re.get.endDate();r&&e&&r<e&&re.set.endDate(w),re.set.dataKeyValue(ue.date,e),t&&i.length&&i.val(o)},startDate:function(e,t){e=re.helper.sanitiseDate(e);var a=re.get.calendarModule(ie.startCalendar);a&&a.set.date(e),re.set.dataKeyValue(ue.startDate,e,t)},endDate:function(e,t){e=re.helper.sanitiseDate(e);var a=re.get.calendarModule(ie.endCalendar);a&&a.set.date(e),re.set.dataKeyValue(ue.endDate,e,t)},focusDate:function(e,t,a,n){e=re.helper.sanitiseDate(e),e=re.helper.dateInRange(e);var o="day"===re.get.mode(),r=re.get.focusDate();if(o&&e&&r){var i=12*(e.getFullYear()-r.getFullYear())+e.getMonth()-r.getMonth();if(i){var l=re.get.monthOffset()-i;re.set.monthOffset(l,!1)}}var s=re.set.dataKeyValue(ue.focusDate,e,t);a=!1!==a&&s&&!1===t||p!=n,p=n,a&&re.update.focus(n)},minDate:function(e){e=re.helper.sanitiseDate(e),null!==ie.maxDate&&ie.maxDate<=e?re.verbose("Unable to set minDate variable bigger that maxDate variable",e,ie.maxDate):(re.setting("minDate",e),re.set.dataKeyValue(ue.minDate,e))},maxDate:function(e){e=re.helper.sanitiseDate(e),null!==ie.minDate&&ie.minDate>=e?re.verbose("Unable to set maxDate variable lower that minDate variable",e,ie.minDate):(re.setting("maxDate",e),re.set.dataKeyValue(ue.maxDate,e))},monthOffset:function(e,t){var a=Math.max(ie.multiMonth,1);e=Math.max(1-a,Math.min(0,e)),re.set.dataKeyValue(ue.monthOffset,e,t)},mode:function(e,t){re.set.dataKeyValue(ue.mode,e,t)},dataKeyValue:function(e,t,a){var n=r.data(e),o=n===t||n<=t&&t<=n;return t?r.data(e,t):r.removeData(e),(a=!1!==a&&!o)&&re.refresh(),!o}},selectDate:function(e,t){re.verbose("New date selection",e);var a=re.get.mode();if(t||"minute"===a||ie.disableMinute&&"hour"===a||"date"===ie.type&&"day"===a||"month"===ie.type&&"month"===a||"year"===ie.type&&"year"===a){if(!(!1===re.set.date(e))&&ie.closable){re.popup("hide");var n=re.get.calendarModule(ie.endCalendar);n&&(n.popup("show"),n.focus())}}else{var o="year"===a?ie.disableMonth?"day":"month":"month"===a?"day":"day"===a?"hour":"minute";re.set.mode(o),"hour"===a||"day"===a&&re.get.date()?re.set.date(e):re.set.focusDate(e)}},changeDate:function(e){re.set.date(e)},clear:function(){re.set.date(w)},popup:function(){return s.popup.apply(s,arguments)},focus:function(){i.length?i.focus():de.focus()},blur:function(){i.length?i.blur():de.blur()},helper:{sanitiseDate:function(e){return e?(e instanceof Date||(e=a.date(""+e,ie)),isNaN(e.getTime())?w:e):w},dateDiff:function(e,t,a){a=a||"day";var n="time"===ie.type,o="year"===a,r=o||"month"===a,i="minute"===a,l=i||"hour"===a;return e=new Date(n?2e3:e.getFullYear(),n?0:o?0:e.getMonth(),n?1:r?1:e.getDate(),l?e.getHours():0,i?5*Math.floor(e.getMinutes()/5):0),(t=new Date(n?2e3:t.getFullYear(),n?0:o?0:t.getMonth(),n?1:r?1:t.getDate(),l?t.getHours():0,i?5*Math.floor(t.getMinutes()/5):0)).getTime()-e.getTime()},dateEqual:function(e,t,a){return!!e&&!!t&&0===re.helper.dateDiff(e,t,a)},isDateInRange:function(e,t,a,n){if(!a&&!n){var o=re.get.startDate();a=o&&ie.minDate?new Date(Math.max(o,ie.minDate)):o||ie.minDate,n=ie.maxDate}return a=a&&new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),5*Math.ceil(a.getMinutes()/5)),!(!e||a&&0<re.helper.dateDiff(e,a,t)||n&&0<re.helper.dateDiff(n,e,t))},dateInRange:function(e,t,a){if(!t&&!a){var n=re.get.startDate();t=n&&ie.minDate?new Date(Math.max(n,ie.minDate)):n||ie.minDate,a=ie.maxDate}t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),5*Math.ceil(t.getMinutes()/5));var o="time"===ie.type;return e?t&&0<re.helper.dateDiff(e,t,"minute")?o?re.helper.mergeDateTime(e,t):t:a&&0<re.helper.dateDiff(a,e,"minute")?o?re.helper.mergeDateTime(e,a):a:e:e},mergeDateTime:function(e,t){return e&&t?new Date(e.getFullYear(),e.getMonth(),e.getDate(),t.getHours(),t.getMinutes()):t}},setting:function(e,t){if(re.debug("Changing setting",e,t),pe.isPlainObject(e))pe.extend(!0,ie,e);else{if(t===w)return ie[e];pe.isPlainObject(ie[e])?pe.extend(!0,ie[e],t):ie[e]=t}},internal:function(e,t){if(pe.isPlainObject(e))pe.extend(!0,re,e);else{if(t===w)return re[e];re[e]=t}},debug:function(){!ie.silent&&ie.debug&&(ie.performance?re.performance.log(arguments):(re.debug=Function.prototype.bind.call(console.info,console,ie.name+":"),re.debug.apply(console,arguments)))},verbose:function(){!ie.silent&&ie.verbose&&ie.debug&&(ie.performance?re.performance.log(arguments):(re.verbose=Function.prototype.bind.call(console.info,console,ie.name+":"),re.verbose.apply(console,arguments)))},error:function(){ie.silent||(re.error=Function.prototype.bind.call(console.error,console,ie.name+":"),re.error.apply(console,arguments))},performance:{log:function(e){var t,a;ie.performance&&(a=(t=(new Date).getTime())-(D||t),D=t,v.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":a})),clearTimeout(re.performance.timer),re.performance.timer=setTimeout(re.performance.display,500)},display:function(){var e=ie.name+":",a=0;D=!1,clearTimeout(re.performance.timer),pe.each(v,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",g&&(e+=" '"+g+"'"),(console.group!==w||console.table!==w)&&0<v.length&&(console.groupCollapsed(e),console.table?console.table(v):pe.each(v,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),v=[]}},invoke:function(n,e,t){var o,r,a,i=d;return e=e||C,t=u||t,"string"==typeof n&&i!==w&&(n=n.split(/[\. ]/),o=n.length-1,pe.each(n,function(e,t){var a=e!=o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(pe.isPlainObject(i[a])&&e!=o)i=i[a];else{if(i[a]!==w)return r=i[a],!1;if(!pe.isPlainObject(i[t])||e==o)return i[t]!==w?r=i[t]:re.error(l.method,n),!1;i=i[t]}})),pe.isFunction(r)?a=r.apply(t,e):r!==w&&(a=r),pe.isArray(h)?h.push(a):h!==w?h=[h,a]:a!==w&&(h=a),r}},b?(d===w&&re.initialize(),re.invoke(y)):(d!==w&&d.invoke("destroy"),re.initialize())}),h!==w?h:this},pe.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,showWeekNumbers:null,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,a){return"year"===t?a.formatter.yearHeader(e,a):"month"===t?a.formatter.monthHeader(e,a):"day"===t?a.formatter.dayHeader(e,a):"hour"===t?a.formatter.hourHeader(e,a):a.formatter.minuteHeader(e,a)},yearHeader:function(e,t){var a=10*Math.ceil(e.getFullYear()/10);return a-9+" - "+(a+2)},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 a="time"===t.type?"":t.formatter.date(e,t),n=t.type.indexOf("time")<0?"":t.formatter.time(e,t,!1);return a+("datetime"===t.type?" ":"")+n},date:function(e,t){if(!e)return"";var a=e.getDate(),n=t.text.months[e.getMonth()],o=e.getFullYear();return"year"===t.type?o:"month"===t.type?n+" "+o:(t.monthFirst?n+" "+a:a+" "+n)+", "+o},time:function(e,t,a){if(!e)return"";var n=e.getHours(),o=e.getMinutes(),r="";return t.ampm&&(r=" "+(n<12?t.text.am:t.text.pm),n=0===n?12:12<n?n-12:n),n+":"+(o<10?"0":"")+o+r},today:function(e){return"date"===e.type?e.text.today:e.text.now},cell:function(e,t,a){}},parser:{date:function(e,t){if(!e)return null;if(0===(e=(""+e).trim().toLowerCase()).length)return null;var a,n,o,r=-1,i=-1,l=-1,s=-1,u=-1,d=w,p="time"===t.type,c=t.type.indexOf("time")<0,f=e.split(t.regExp.dateWords),m=e.split(t.regExp.dateNumbers);if(!c)for(d=0<=pe.inArray(t.text.am.toLowerCase(),f)||!(0<=pe.inArray(t.text.pm.toLowerCase(),f))&&w,a=0;a<m.length;a++){var h=m[a];if(0<=h.indexOf(":")){if(i<0||r<0){var g=h.split(":");for(o=0;o<Math.min(2,g.length);o++)n=parseInt(g[o]),isNaN(n)&&(n=0),0===o?i=n%24:r=n%60}m.splice(a,1)}}if(!p){for(a=0;a<f.length;a++){var D=f[a];if(!(D.length<=0)){for(D=D.substring(0,Math.min(D.length,3)),n=0;n<t.text.months.length;n++){var v=t.text.months[n];if((v=v.substring(0,Math.min(D.length,Math.min(v.length,3))).toLowerCase())===D){s=n+1;break}}if(0<=s)break}}for(a=0;a<m.length;a++)if(n=parseInt(m[a]),!isNaN(n)&&59<n){u=n,m.splice(a,1);break}if(s<0)for(a=0;a<m.length;a++)if(o=1<a||t.monthFirst?a:1===a?0:1,n=parseInt(m[o]),!isNaN(n)&&1<=n&&n<=12){s=n,m.splice(o,1);break}for(a=0;a<m.length;a++)if(n=parseInt(m[a]),!isNaN(n)&&1<=n&&n<=31){l=n,m.splice(a,1);break}if(u<0)for(a=m.length-1;0<=a;a--)if(n=parseInt(m[a]),!isNaN(n)){n<99&&(n+=2e3),u=n,m.splice(a,1);break}}if(!c){if(i<0)for(a=0;a<m.length;a++)if(n=parseInt(m[a]),!isNaN(n)&&0<=n&&n<=23){i=n,m.splice(a,1);break}if(r<0)for(a=0;a<m.length;a++)if(n=parseInt(m[a]),!isNaN(n)&&0<=n&&n<=59){r=n,m.splice(a,1);break}}if(r<0&&i<0&&l<0&&s<0&&u<0)return null;r<0&&(r=0),i<0&&(i=0),l<0&&(l=1),s<0&&(s=1),u<0&&(u=(new Date).getFullYear()),d!==w&&(d?12===i&&(i=0):i<12&&(i+=12));var y=new Date(u,s-1,l,i,r);return y.getMonth()===s-1&&y.getFullYear()===u||(y=new Date(u,s,0,i,r)),isNaN(y.getTime())?null:y}},onChange:function(e,t,a){return!0},onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){},isDisabled:function(e,t){return!1},selector:{popup:".ui.popup",input:"input",activator:"input"},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",prev:"prev link",next:"next link",prevIcon:"chevron left icon",nextIcon:"chevron right icon",link:"link",cell:"link",disabledCell:"disabled",adjacentCell:"adjacent",activeCell:"active",rangeCell:"range",focusCell:"focus",todayCell:"today",today:"today link"},metadata:{date:"date",focusDate:"focusDate",startDate:"startDate",endDate:"endDate",minDate:"minDate",maxDate:"maxDate",mode:"mode",monthOffset:"monthOffset"}}}(jQuery,window,document);
!function(ce,e,M,w){"use strict";e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),ce.fn.calendar=function(m){var h,e=ce(this),g=e.selector||"",D=(new Date).getTime(),v=[],y=m,b="string"==typeof y,C=[].slice.call(arguments,1);return e.each(function(){var p,le,se=ce.isPlainObject(m)?ce.extend(!0,{},ce.fn.calendar.settings,m):ce.extend({},ce.fn.calendar.settings),de=se.className,e=se.namespace,t=se.selector,ue=se.formatter,a=se.parser,fe=se.metadata,l=se.error,n="."+e,o="module-"+e,r=ce(this),i=r.find(t.input),pe=r.find(t.popup),s=r.find(t.activator),d=this,u=r.data(o),c=!1,f=!1;le={initialize:function(){le.debug("Initializing calendar for",d,r),p=le.get.isTouch(),le.setup.config(),le.setup.popup(),le.setup.inline(),le.setup.input(),le.setup.date(),le.create.calendar(),le.bind.events(),le.instantiate()},instantiate:function(){le.verbose("Storing instance of calendar"),u=le,r.data(o,u)},destroy:function(){le.verbose("Destroying previous calendar for",d),r.removeData(o),le.unbind.events()},setup:{config:function(){null!==le.get.minDate()&&le.set.minDate(r.data(fe.minDate)),null!==le.get.maxDate()&&le.set.maxDate(r.data(fe.maxDate))},popup:function(){if(!se.inline&&(s.length||(s=r.children().first()).length))if(ce.fn.popup!==w){pe.length||(pe=ce("<div/>").addClass(de.popup).prependTo(s.parent())),pe.addClass(de.calendar);var e=se.onVisible,t=se.onHidden;i.length||(pe.attr("tabindex","0"),e=function(){return le.focus(),se.onVisible.apply(pe,arguments)},t=function(){return le.blur(),se.onHidden.apply(pe,arguments)});var a=se.on||(i.length?"focus":"click"),n=ce.extend({},se.popupOptions,{popup:pe,on:a,hoverable:"hover"===a,onShow:function(){return le.set.focusDate(le.get.date()),le.set.mode(se.startMode),se.onShow.apply(pe,arguments)},onVisible:e,onHide:se.onHide,onHidden:t});le.popup(n)}else le.error(l.popup)},inline:function(){s.length&&!se.inline||(pe=ce("<div/>").addClass(de.calendar).appendTo(r),i.length||pe.attr("tabindex","0"))},input:function(){se.touchReadonly&&i.length&&p&&i.prop("readonly",!0)},date:function(){if(i.length){var e=i.val(),t=a.date(e,se);le.set.date(t,se.formatInput,!1)}}},create:{calendar:function(){var e,t,a,n,o,r,i,l=le.get.mode(),s=new Date,d=le.get.date(),u=le.get.focusDate(),f=u||d||se.initialDate||s;f=le.helper.dateInRange(f),u||(u=f,le.set.focusDate(u,!1,!1));var p="year"===l,c="month"===l,m="day"===l,h="hour"===l,g="minute"===l,D="time"===se.type,v=Math.max(se.multiMonth,1),y=m?le.get.monthOffset():0,b=f.getMinutes(),C=f.getHours(),M=f.getDate(),w=f.getMonth()+y,x=f.getFullYear(),k=m?se.showWeekNumbers?8:7:h?4:3,T=m||h?6:4,N=m?v:1,O=pe,F=O.hasClass("left")?"right center":"left center";for(O.empty(),1<N&&(i=ce("<div/>").addClass(de.grid).appendTo(O)),n=0;n<N;n++){if(1<N)O=ce("<div/>").addClass(de.column).appendTo(i);var H=w+n,I=(new Date(x,H,1).getDay()-se.firstDayOfWeek%7+7)%7;if(!se.constantHeight&&m){var Y=new Date(x,H+1,0).getDate()+I;T=Math.ceil(Y/7)}var E=p?10:c?1:0,R=m?1:0,W=h||g?1:0,j=h||g?M:1,V=new Date(x-E,H-R,j-W,C),A=new Date(x+E,H+R,j+W,C),S=p?new Date(10*Math.ceil(x/10)-9,0,0):c?new Date(x,0,0):m?new Date(x,H,0):new Date(x,H,M,-1),q=p?new Date(10*Math.ceil(x/10)+1,0,1):c?new Date(x+1,0,1):m?new Date(x,H+1,1):new Date(x,H,M+1),P=l;m&&se.showWeekNumbers&&(P+=" andweek");var K=ce("<table/>").addClass(de.table).addClass(P).appendTo(O),U=k;if(!D){var J=ce("<thead/>").appendTo(K);o=ce("<tr/>").appendTo(J),r=ce("<th/>").attr("colspan",""+k).appendTo(o);var z=p||c?new Date(x,0,1):m?new Date(x,H,1):new Date(x,H,M,C,b),L=ce("<span/>").addClass(de.link).appendTo(r);L.text(ue.header(z,l,se));var B=c?se.disableYear?"day":"year":m?se.disableMonth?"year":"month":"day";if(L.data(fe.mode,B),0===n){var Q=ce("<span/>").addClass(de.prev).appendTo(r);Q.data(fe.focusDate,V),Q.toggleClass(de.disabledCell,!le.helper.isDateInRange(S,l)),ce("<i/>").addClass(de.prevIcon).appendTo(Q)}if(n===N-1){var Z=ce("<span/>").addClass(de.next).appendTo(r);Z.data(fe.focusDate,A),Z.toggleClass(de.disabledCell,!le.helper.isDateInRange(q,l)),ce("<i/>").addClass(de.nextIcon).appendTo(Z)}if(m)for(o=ce("<tr/>").appendTo(J),se.showWeekNumbers&&((r=ce("<th/>").appendTo(o)).text(se.text.weekNo),r.addClass(de.disabledCell),U--),e=0;e<U;e++)(r=ce("<th/>").appendTo(o)).text(ue.dayColumnHeader((e+se.firstDayOfWeek)%7,se))}var G=ce("<tbody/>").appendTo(K);for(e=p?10*Math.ceil(x/10)-9:m?1-I:0,t=0;t<T;t++)for(o=ce("<tr/>").appendTo(G),m&&se.showWeekNumbers&&((r=ce("<th/>").appendTo(o)).text(le.get.weekOfYear(x,H,e+1-se.firstDayOfWeek)),r.addClass(de.disabledCell)),a=0;a<U;a++,e++){var X=p?new Date(e,H,1,C,b):c?new Date(x,e,1,C,b):m?new Date(x,H,e,C,b):h?new Date(x,H,M,e):new Date(x,H,M,C,5*e),$=p?e:c?se.text.monthsShort[e]:m?X.getDate():ue.time(X,se,!0);(r=ce("<td/>").addClass(de.cell).appendTo(o)).text($),r.data(fe.date,X);var _=m&&X.getMonth()!==(H+12)%12,ee=_||!le.helper.isDateInRange(X,l)||se.isDisabled(X,l)||le.helper.isDisabled(X,l);if(ee){var te=le.helper.disabledReason(X,l);null!==te&&(r.attr("data-tooltip",te[fe.message]),r.attr("data-position",F))}var ae=le.helper.dateEqual(X,d,l),ne=le.helper.dateEqual(X,s,l);r.toggleClass(de.adjacentCell,_),r.toggleClass(de.disabledCell,ee),r.toggleClass(de.activeCell,ae&&!_),h||g||r.toggleClass(de.todayCell,!_&&ne);var oe={mode:l,adjacent:_,disabled:ee,active:ae,today:ne};ue.cell(r,X,oe),le.helper.dateEqual(X,u,l)&&le.set.focusDate(X,!1,!1)}if(se.today){var re=ce("<tr/>").appendTo(G),ie=ce("<td/>").attr("colspan",""+k).addClass(de.today).appendTo(re);ie.text(ue.today(se)),ie.data(fe.date,s)}le.update.focus(!1,K)}}},update:{focus:function(e,t){t=t||pe;var l=le.get.mode(),a=le.get.date(),s=le.get.focusDate(),d=le.get.startDate(),u=le.get.endDate(),f=(e?s:null)||a||(p?null:s);t.find("td").each(function(){var e=ce(this),t=e.data(fe.date);if(t){var a=e.hasClass(de.disabledCell),n=e.hasClass(de.activeCell),o=e.hasClass(de.adjacentCell),r=le.helper.dateEqual(t,s,l),i=!!f&&(!!d&&le.helper.isDateInRange(t,l,d,f)||!!u&&le.helper.isDateInRange(t,l,f,u));e.toggleClass(de.focusCell,r&&(!p||c)&&!o&&!a),e.toggleClass(de.rangeCell,i&&!n&&!a)}})}},refresh:function(){le.create.calendar()},bind:{events:function(){le.debug("Binding events"),pe.on("mousedown"+n,le.event.mousedown),pe.on("touchstart"+n,le.event.mousedown),pe.on("mouseup"+n,le.event.mouseup),pe.on("touchend"+n,le.event.mouseup),pe.on("mouseover"+n,le.event.mouseover),i.length?(i.on("input"+n,le.event.inputChange),i.on("focus"+n,le.event.inputFocus),i.on("blur"+n,le.event.inputBlur),i.on("click"+n,le.event.inputClick),i.on("keydown"+n,le.event.keydown)):pe.on("keydown"+n,le.event.keydown)}},unbind:{events:function(){le.debug("Unbinding events"),pe.off(n),i.length&&i.off(n)}},event:{mouseover:function(e){var t=ce(e.target).data(fe.date),a=1===e.buttons;t&&le.set.focusDate(t,!1,!0,a)},mousedown:function(e){i.length&&e.preventDefault(),c=0<=e.type.indexOf("touch");var t=ce(e.target).data(fe.date);t&&le.set.focusDate(t,!1,!0,!0)},mouseup:function(e){le.focus(),e.preventDefault(),e.stopPropagation(),c=!1;var t=ce(e.target);if(!t.hasClass("disabled")){var a=t.parent();(a.data(fe.date)||a.data(fe.focusDate)||a.data(fe.mode))&&(t=a);var n=t.data(fe.date),o=t.data(fe.focusDate),r=t.data(fe.mode);if(n){var i=t.hasClass(de.today);le.selectDate(n,i)}else o?le.set.focusDate(o):r&&le.set.mode(r)}},keydown:function(e){if(27!==e.keyCode&&9!==e.keyCode||le.popup("hide"),le.popup("is visible"))if(37===e.keyCode||38===e.keyCode||39===e.keyCode||40===e.keyCode){var t="day"===(u=le.get.mode())?7:"hour"===u?4:3,a=37===e.keyCode?-1:38===e.keyCode?-t:39==e.keyCode?1:t;a*="minute"===u?5:1;var n=le.get.focusDate()||le.get.date()||new Date,o=n.getFullYear()+("year"===u?a:0),r=n.getMonth()+("month"===u?a:0),i=n.getDate()+("day"===u?a:0),l=n.getHours()+("hour"===u?a:0),s=n.getMinutes()+("minute"===u?a:0),d=new Date(o,r,i,l,s);"time"===se.type&&(d=le.helper.mergeDateTime(n,d)),le.helper.isDateInRange(d,u)&&le.set.focusDate(d)}else if(13===e.keyCode){var u=le.get.mode(),f=le.get.focusDate();!f||se.isDisabled(f,u)||le.helper.isDisabled(f,u)||le.selectDate(f),e.preventDefault(),e.stopPropagation()}38!==e.keyCode&&40!==e.keyCode||(e.preventDefault(),le.popup("show"))},inputChange:function(){var e=i.val(),t=a.date(e,se);le.set.date(t,!1)},inputFocus:function(){pe.addClass(de.active)},inputBlur:function(){if(pe.removeClass(de.active),se.formatInput){var e=le.get.date(),t=ue.datetime(e,se);i.val(t)}},inputClick:function(){le.popup("show")}},get:{weekOfYear:function(e,t,a){var n,o,r;return n=Date.UTC(e,t,a+3)/864e5,o=Math.floor(n/7),r=new Date(6048e5*o).getUTCFullYear(),o-Math.floor(Date.UTC(r,0,7)/6048e5)+1},date:function(){return r.data(fe.date)||null},focusDate:function(){return r.data(fe.focusDate)||null},startDate:function(){var e=le.get.calendarModule(se.startCalendar);return(e?e.get.date():r.data(fe.startDate))||null},endDate:function(){var e=le.get.calendarModule(se.endCalendar);return(e?e.get.date():r.data(fe.endDate))||null},minDate:function(){return r.data(fe.minDate)||null},maxDate:function(){return r.data(fe.maxDate)||null},monthOffset:function(){return r.data(fe.monthOffset)||0},mode:function(){var e=r.data(fe.mode)||se.startMode,t=le.get.validModes();return 0<=ce.inArray(e,t)?e:"time"===se.type?"hour":"month"===se.type?"month":"year"===se.type?"year":"day"},validModes:function(){var e=[];return"time"!==se.type&&(se.disableYear&&"year"!==se.type||e.push("year"),(!se.disableMonth&&"year"!==se.type||"month"===se.type)&&e.push("month"),0<=se.type.indexOf("date")&&e.push("day")),0<=se.type.indexOf("time")&&(e.push("hour"),se.disableMinute||e.push("minute")),e},isTouch:function(){try{return M.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e instanceof ce||(e=r.parent().children(e).first()),e.data(o)):null}},set:{date:function(e,t,a){t=!1!==t,a=!1!==a,e=le.helper.sanitiseDate(e),e=le.helper.dateInRange(e);var n=le.get.mode(),o=ue.datetime(e,se);if(a&&!1===se.onChange.call(d,e,o,n))return!1;if(le.set.focusDate(e),se.isDisabled(e,n))return!1;var r=le.get.endDate();r&&e&&r<e&&le.set.endDate(w),le.set.dataKeyValue(fe.date,e),t&&i.length&&i.val(o)},startDate:function(e,t){e=le.helper.sanitiseDate(e);var a=le.get.calendarModule(se.startCalendar);a&&a.set.date(e),le.set.dataKeyValue(fe.startDate,e,t)},endDate:function(e,t){e=le.helper.sanitiseDate(e);var a=le.get.calendarModule(se.endCalendar);a&&a.set.date(e),le.set.dataKeyValue(fe.endDate,e,t)},focusDate:function(e,t,a,n){e=le.helper.sanitiseDate(e),e=le.helper.dateInRange(e);var o="day"===le.get.mode(),r=le.get.focusDate();if(o&&e&&r){var i=12*(e.getFullYear()-r.getFullYear())+e.getMonth()-r.getMonth();if(i){var l=le.get.monthOffset()-i;le.set.monthOffset(l,!1)}}var s=le.set.dataKeyValue(fe.focusDate,e,t);a=!1!==a&&s&&!1===t||f!=n,f=n,a&&le.update.focus(n)},minDate:function(e){e=le.helper.sanitiseDate(e),null!==se.maxDate&&se.maxDate<=e?le.verbose("Unable to set minDate variable bigger that maxDate variable",e,se.maxDate):(le.setting("minDate",e),le.set.dataKeyValue(fe.minDate,e))},maxDate:function(e){e=le.helper.sanitiseDate(e),null!==se.minDate&&se.minDate>=e?le.verbose("Unable to set maxDate variable lower that minDate variable",e,se.minDate):(le.setting("maxDate",e),le.set.dataKeyValue(fe.maxDate,e))},monthOffset:function(e,t){var a=Math.max(se.multiMonth,1);e=Math.max(1-a,Math.min(0,e)),le.set.dataKeyValue(fe.monthOffset,e,t)},mode:function(e,t){le.set.dataKeyValue(fe.mode,e,t)},dataKeyValue:function(e,t,a){var n=r.data(e),o=n===t||n<=t&&t<=n;return t?r.data(e,t):r.removeData(e),(a=!1!==a&&!o)&&le.refresh(),!o}},selectDate:function(e,t){le.verbose("New date selection",e);var a=le.get.mode();if(t||"minute"===a||se.disableMinute&&"hour"===a||"date"===se.type&&"day"===a||"month"===se.type&&"month"===a||"year"===se.type&&"year"===a){if(!(!1===le.set.date(e))&&se.closable){le.popup("hide");var n=le.get.calendarModule(se.endCalendar);n&&(n.popup("show"),n.focus())}}else{var o="year"===a?se.disableMonth?"day":"month":"month"===a?"day":"day"===a?"hour":"minute";le.set.mode(o),"hour"===a||"day"===a&&le.get.date()?le.set.date(e):le.set.focusDate(e)}},changeDate:function(e){le.set.date(e)},clear:function(){le.set.date(w)},popup:function(){return s.popup.apply(s,arguments)},focus:function(){i.length?i.focus():pe.focus()},blur:function(){i.length?i.blur():pe.blur()},helper:{isDisabled:function(t,a){return"day"===a&&(-1!==se.disabledDaysOfWeek.indexOf(t.getDay())||se.disabledDates.some(function(e){return e instanceof Date?le.helper.dateEqual(t,e,a):null!==e&&"object"==typeof e?le.helper.dateEqual(t,e[fe.date],a):void 0}))},disabledReason:function(e,t){if("day"===t)for(var a=0;a<se.disabledDates.length;a++){var n=se.disabledDates[a];if(null!==n&&"object"==typeof n&&le.helper.dateEqual(e,n[fe.date],t)){var o={};return o[fe.message]=n[fe.message],o}}return null},sanitiseDate:function(e){return e?(e instanceof Date||(e=a.date(""+e,se)),isNaN(e.getTime())?w:e):w},dateDiff:function(e,t,a){a=a||"day";var n="time"===se.type,o="year"===a,r=o||"month"===a,i="minute"===a,l=i||"hour"===a;return e=new Date(n?2e3:e.getFullYear(),n?0:o?0:e.getMonth(),n?1:r?1:e.getDate(),l?e.getHours():0,i?5*Math.floor(e.getMinutes()/5):0),(t=new Date(n?2e3:t.getFullYear(),n?0:o?0:t.getMonth(),n?1:r?1:t.getDate(),l?t.getHours():0,i?5*Math.floor(t.getMinutes()/5):0)).getTime()-e.getTime()},dateEqual:function(e,t,a){return!!e&&!!t&&0===le.helper.dateDiff(e,t,a)},isDateInRange:function(e,t,a,n){if(!a&&!n){var o=le.get.startDate();a=o&&se.minDate?new Date(Math.max(o,se.minDate)):o||se.minDate,n=se.maxDate}return a=a&&new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),5*Math.ceil(a.getMinutes()/5)),!(!e||a&&0<le.helper.dateDiff(e,a,t)||n&&0<le.helper.dateDiff(n,e,t))},dateInRange:function(e,t,a){if(!t&&!a){var n=le.get.startDate();t=n&&se.minDate?new Date(Math.max(n,se.minDate)):n||se.minDate,a=se.maxDate}t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),5*Math.ceil(t.getMinutes()/5));var o="time"===se.type;return e?t&&0<le.helper.dateDiff(e,t,"minute")?o?le.helper.mergeDateTime(e,t):t:a&&0<le.helper.dateDiff(a,e,"minute")?o?le.helper.mergeDateTime(e,a):a:e:e},mergeDateTime:function(e,t){return e&&t?new Date(e.getFullYear(),e.getMonth(),e.getDate(),t.getHours(),t.getMinutes()):t}},setting:function(e,t){if(le.debug("Changing setting",e,t),ce.isPlainObject(e))ce.extend(!0,se,e);else{if(t===w)return se[e];ce.isPlainObject(se[e])?ce.extend(!0,se[e],t):se[e]=t}},internal:function(e,t){if(ce.isPlainObject(e))ce.extend(!0,le,e);else{if(t===w)return le[e];le[e]=t}},debug:function(){!se.silent&&se.debug&&(se.performance?le.performance.log(arguments):(le.debug=Function.prototype.bind.call(console.info,console,se.name+":"),le.debug.apply(console,arguments)))},verbose:function(){!se.silent&&se.verbose&&se.debug&&(se.performance?le.performance.log(arguments):(le.verbose=Function.prototype.bind.call(console.info,console,se.name+":"),le.verbose.apply(console,arguments)))},error:function(){se.silent||(le.error=Function.prototype.bind.call(console.error,console,se.name+":"),le.error.apply(console,arguments))},performance:{log:function(e){var t,a;se.performance&&(a=(t=(new Date).getTime())-(D||t),D=t,v.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":a})),clearTimeout(le.performance.timer),le.performance.timer=setTimeout(le.performance.display,500)},display:function(){var e=se.name+":",a=0;D=!1,clearTimeout(le.performance.timer),ce.each(v,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",g&&(e+=" '"+g+"'"),(console.group!==w||console.table!==w)&&0<v.length&&(console.groupCollapsed(e),console.table?console.table(v):ce.each(v,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),v=[]}},invoke:function(n,e,t){var o,r,a,i=u;return e=e||C,t=d||t,"string"==typeof n&&i!==w&&(n=n.split(/[\. ]/),o=n.length-1,ce.each(n,function(e,t){var a=e!=o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(ce.isPlainObject(i[a])&&e!=o)i=i[a];else{if(i[a]!==w)return r=i[a],!1;if(!ce.isPlainObject(i[t])||e==o)return i[t]!==w?r=i[t]:le.error(l.method,n),!1;i=i[t]}})),ce.isFunction(r)?a=r.apply(t,e):r!==w&&(a=r),ce.isArray(h)?h.push(a):h!==w?h=[h,a]:a!==w&&(h=a),r}},b?(u===w&&le.initialize(),le.invoke(y)):(u!==w&&u.invoke("destroy"),le.initialize())}),h!==w?h:this},ce.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,showWeekNumbers:null,disabledDates:[],disabledDaysOfWeek:[],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,a){return"year"===t?a.formatter.yearHeader(e,a):"month"===t?a.formatter.monthHeader(e,a):"day"===t?a.formatter.dayHeader(e,a):"hour"===t?a.formatter.hourHeader(e,a):a.formatter.minuteHeader(e,a)},yearHeader:function(e,t){var a=10*Math.ceil(e.getFullYear()/10);return a-9+" - "+(a+2)},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 a="time"===t.type?"":t.formatter.date(e,t),n=t.type.indexOf("time")<0?"":t.formatter.time(e,t,!1);return a+("datetime"===t.type?" ":"")+n},date:function(e,t){if(!e)return"";var a=e.getDate(),n=t.text.months[e.getMonth()],o=e.getFullYear();return"year"===t.type?o:"month"===t.type?n+" "+o:(t.monthFirst?n+" "+a:a+" "+n)+", "+o},time:function(e,t,a){if(!e)return"";var n=e.getHours(),o=e.getMinutes(),r="";return t.ampm&&(r=" "+(n<12?t.text.am:t.text.pm),n=0===n?12:12<n?n-12:n),n+":"+(o<10?"0":"")+o+r},today:function(e){return"date"===e.type?e.text.today:e.text.now},cell:function(e,t,a){}},parser:{date:function(e,t){if(!e)return null;if(0===(e=(""+e).trim().toLowerCase()).length)return null;var a,n,o,r=-1,i=-1,l=-1,s=-1,d=-1,u=w,f="time"===t.type,p=t.type.indexOf("time")<0,c=e.split(t.regExp.dateWords),m=e.split(t.regExp.dateNumbers);if(!p)for(u=0<=ce.inArray(t.text.am.toLowerCase(),c)||!(0<=ce.inArray(t.text.pm.toLowerCase(),c))&&w,a=0;a<m.length;a++){var h=m[a];if(0<=h.indexOf(":")){if(i<0||r<0){var g=h.split(":");for(o=0;o<Math.min(2,g.length);o++)n=parseInt(g[o]),isNaN(n)&&(n=0),0===o?i=n%24:r=n%60}m.splice(a,1)}}if(!f){for(a=0;a<c.length;a++){var D=c[a];if(!(D.length<=0)){for(D=D.substring(0,Math.min(D.length,3)),n=0;n<t.text.months.length;n++){var v=t.text.months[n];if((v=v.substring(0,Math.min(D.length,Math.min(v.length,3))).toLowerCase())===D){s=n+1;break}}if(0<=s)break}}for(a=0;a<m.length;a++)if(n=parseInt(m[a]),!isNaN(n)&&59<n){d=n,m.splice(a,1);break}if(s<0)for(a=0;a<m.length;a++)if(o=1<a||t.monthFirst?a:1===a?0:1,n=parseInt(m[o]),!isNaN(n)&&1<=n&&n<=12){s=n,m.splice(o,1);break}for(a=0;a<m.length;a++)if(n=parseInt(m[a]),!isNaN(n)&&1<=n&&n<=31){l=n,m.splice(a,1);break}if(d<0)for(a=m.length-1;0<=a;a--)if(n=parseInt(m[a]),!isNaN(n)){n<99&&(n+=2e3),d=n,m.splice(a,1);break}}if(!p){if(i<0)for(a=0;a<m.length;a++)if(n=parseInt(m[a]),!isNaN(n)&&0<=n&&n<=23){i=n,m.splice(a,1);break}if(r<0)for(a=0;a<m.length;a++)if(n=parseInt(m[a]),!isNaN(n)&&0<=n&&n<=59){r=n,m.splice(a,1);break}}if(r<0&&i<0&&l<0&&s<0&&d<0)return null;r<0&&(r=0),i<0&&(i=0),l<0&&(l=1),s<0&&(s=1),d<0&&(d=(new Date).getFullYear()),u!==w&&(u?12===i&&(i=0):i<12&&(i+=12));var y=new Date(d,s-1,l,i,r);return y.getMonth()===s-1&&y.getFullYear()===d||(y=new Date(d,s,0,i,r)),isNaN(y.getTime())?null:y}},onChange:function(e,t,a){return!0},onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){},isDisabled:function(e,t){return!1},selector:{popup:".ui.popup",input:"input",activator:"input"},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",prev:"prev link",next:"next link",prevIcon:"chevron left icon",nextIcon:"chevron right icon",link:"link",cell:"link",disabledCell:"disabled",adjacentCell:"adjacent",activeCell:"active",rangeCell:"range",focusCell:"focus",todayCell:"today",today:"today link"},metadata:{date:"date",focusDate:"focusDate",startDate:"startDate",endDate:"endDate",minDate:"minDate",maxDate:"maxDate",mode:"mode",monthOffset:"monthOffset",message:"message"}}}(jQuery,window,document);
/*!
* # Semantic UI 2.6.3 - Checkbox
* # Semantic UI 2.6.4 - Checkbox
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Dimmer
* # Semantic UI 2.6.4 - Dimmer
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

@@ -1,1 +0,1 @@

!function(G,J,Z,_){"use strict";J=void 0!==J&&J.Math==Math?J:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),G.fn.dropdown=function(H){var U,j=G(this),N=G(Z),K=j.selector||"",W="ontouchstart"in Z.documentElement,B=(new Date).getTime(),$=[],Q=H,X="string"==typeof Q,Y=[].slice.call(arguments,1);return j.each(function(n){var e,t,i,a,o,s,r,h,m=G.isPlainObject(H)?G.extend(!0,{},G.fn.dropdown.settings,H):G.extend({},G.fn.dropdown.settings),g=m.className,c=m.message,l=m.fields,p=m.keys,b=m.metadata,u=m.namespace,d=m.regExp,w=m.selector,v=m.error,f=m.templates,x="."+u,C="module-"+u,S=G(this),y=G(m.context),A=S.find(w.text),T=S.find(w.search),k=S.find(w.sizer),L=S.find(w.input),I=S.find(w.icon),D=S.find(w.clearIcon),q=0<S.prev().find(w.text).length?S.prev().find(w.text):S.prev(),R=S.children(w.menu),O=R.find(w.item),V=m.hideDividers?O.parent().children(w.divider):G(),E=!1,M=!1,F=!1,P=this,z=S.data(C);h={initialize:function(){h.debug("Initializing dropdown",m),h.is.alreadySetup()?h.setup.reference():(h.setup.layout(),m.values&&h.change.values(m.values),h.refreshData(),h.save.defaults(),h.restore.selected(),h.create.id(),h.bind.events(),h.observeChanges(),h.instantiate())},instantiate:function(){h.verbose("Storing instance of dropdown",h),z=h,S.data(C,h)},destroy:function(){h.verbose("Destroying previous dropdown",S),h.remove.tabbable(),S.off(x).removeData(C),R.off(x),N.off(a),h.disconnect.menuObserver(),h.disconnect.selectObserver()},observeChanges:function(){"MutationObserver"in J&&(s=new MutationObserver(h.event.select.mutation),r=new MutationObserver(h.event.menu.mutation),h.debug("Setting up mutation observer",s,r),h.observe.select(),h.observe.menu())},disconnect:{menuObserver:function(){r&&r.disconnect()},selectObserver:function(){s&&s.disconnect()}},observe:{select:function(){h.has.input()&&s.observe(S[0],{childList:!0,subtree:!0})},menu:function(){h.has.menu()&&r.observe(R[0],{childList:!0,subtree:!0})}},create:{id:function(){o=(Math.random().toString(16)+"000000000").substr(2,8),a="."+o,h.verbose("Creating unique id for element",o)},userChoice:function(e){var n,i,a;return!!(e=e||h.get.userValues())&&(e=G.isArray(e)?e:[e],G.each(e,function(e,t){!1===h.get.item(t)&&(a=m.templates.addition(h.add.variables(c.addResult,t)),i=G("<div />").html(a).attr("data-"+b.value,t).attr("data-"+b.text,t).addClass(g.addition).addClass(g.item),m.hideAdditions&&i.addClass(g.hidden),n=n===_?i:n.add(i),h.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=h.get.userValues();t&&(h.debug("Adding user labels",t),G.each(t,function(e,t){h.verbose("Adding custom user value"),h.add.label(t,t)}))},menu:function(){R=G("<div />").addClass(g.menu).appendTo(S)},sizer:function(){k=G("<span />").addClass(g.sizer).insertAfter(T)}},search:function(e){e=e!==_?e:h.get.query(),h.verbose("Searching for query",e),h.has.minCharacters(e)?h.filter(e):h.hide()},select:{firstUnfiltered:function(){h.verbose("Selecting first non-filtered element"),h.remove.selectedItem(),O.not(w.unselectable).not(w.addition+w.hidden).eq(0).addClass(g.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(w.item).not(w.unselectable).eq(0),n=e.prevAll(w.item).not(w.unselectable).eq(0);0<t.length?(h.verbose("Moving selection to",t),t.addClass(g.selected)):(h.verbose("Moving selection to",n),n.addClass(g.selected))}},setup:{api:function(){var e={debug:m.debug,urlData:{value:h.get.value(),query:h.get.query()},on:!1};h.verbose("First request, initializing API"),S.api(e)},layout:function(){S.is("select")&&(h.setup.select(),h.setup.returnedObject()),h.has.menu()||h.create.menu(),h.is.selection()&&h.is.clearable()&&!h.has.clearItem()&&(h.verbose("Adding clear icon"),D=G("<i />").addClass("remove icon").insertBefore(A)),h.is.search()&&!h.has.search()&&(h.verbose("Adding search input"),T=G("<input />").addClass(g.search).prop("autocomplete","off").insertBefore(A)),h.is.multiple()&&h.is.searchSelection()&&!h.has.sizer()&&h.create.sizer(),m.allowTab&&h.set.tabbable()},select:function(){var e=h.get.selectValues();h.debug("Dropdown initialized on a select",e),S.is("select")&&(L=S),0<L.parent(w.dropdown).length?(h.debug("UI dropdown already exists. Creating dropdown menu only"),S=L.closest(w.dropdown),h.has.menu()||h.create.menu(),R=S.children(w.menu),h.setup.menu(e)):(h.debug("Creating entire dropdown from select"),S=G("<div />").attr("class",L.attr("class")).addClass(g.selection).addClass(g.dropdown).html(f.dropdown(e)).insertBefore(L),L.hasClass(g.multiple)&&!1===L.prop("multiple")&&(h.error(v.missingMultiple),L.prop("multiple",!0)),L.is("[multiple]")&&h.set.multiple(),L.prop("disabled")&&(h.debug("Disabling dropdown"),S.addClass(g.disabled)),L.removeAttr("class").detach().prependTo(S)),h.refresh()},menu:function(e){R.html(f.menu(e,l)),O=R.find(w.item),V=m.hideDividers?O.parent().children(w.divider):G()},reference:function(){h.debug("Dropdown behavior was called on select, replacing with closest dropdown"),S=S.parent(w.dropdown),z=S.data(C),P=S.get(0),h.refresh(),h.setup.returnedObject()},returnedObject:function(){var e=j.slice(0,n),t=j.slice(n+1);j=e.add(S).add(t)}},refresh:function(){h.refreshSelectors(),h.refreshData()},refreshItems:function(){O=R.find(w.item),V=m.hideDividers?O.parent().children(w.divider):G()},refreshSelectors:function(){h.verbose("Refreshing selector cache"),A=S.find(w.text),T=S.find(w.search),L=S.find(w.input),I=S.find(w.icon),q=0<S.prev().find(w.text).length?S.prev().find(w.text):S.prev(),R=S.children(w.menu),O=R.find(w.item),V=m.hideDividers?O.parent().children(w.divider):G()},refreshData:function(){h.verbose("Refreshing cached metadata"),O.removeData(b.text).removeData(b.value)},clearData:function(){h.verbose("Clearing metadata"),O.removeData(b.text).removeData(b.value),S.removeData(b.defaultText).removeData(b.defaultValue).removeData(b.placeholderText)},toggle:function(){h.verbose("Toggling menu visibility"),h.is.active()?h.hide():h.show()},show:function(e){if(e=G.isFunction(e)?e:function(){},!h.can.show()&&h.is.remote()&&(h.debug("No API results retrieved, searching before show"),h.queryRemote(h.get.query(),h.show)),h.can.show()&&!h.is.active()){if(h.debug("Showing dropdown"),!h.has.message()||h.has.maxSelections()||h.has.allResultsFiltered()||h.remove.message(),h.is.allFiltered())return!0;!1!==m.onShow.call(P)&&h.animate.show(function(){h.can.click()&&h.bind.intent(),h.has.search()&&h.focusSearch(),h.set.visible(),e.call(P)})}},hide:function(e){e=G.isFunction(e)?e:function(){},h.is.active()&&!h.is.animatingOutward()&&(h.debug("Hiding dropdown"),!1!==m.onHide.call(P)&&h.animate.hide(function(){h.remove.visible(),h.is.focusedOnSearch()&&T.blur(),e.call(P)}))},hideOthers:function(){h.verbose("Finding other dropdowns to hide"),j.not(S).has(w.menu+"."+g.visible).dropdown("hide")},hideMenu:function(){h.verbose("Hiding menu instantaneously"),h.remove.active(),h.remove.visible(),R.transition("hide")},hideSubMenus:function(){var e=R.children(w.item).find(w.menu);h.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){W&&h.bind.touchEvents(),h.bind.keyboardEvents(),h.bind.inputEvents(),h.bind.mouseEvents()},touchEvents:function(){h.debug("Touch device detected binding additional touch events"),h.is.searchSelection()||h.is.single()&&S.on("touchstart"+x,h.event.test.toggle),R.on("touchstart"+x,w.item,h.event.item.mouseenter)},keyboardEvents:function(){h.verbose("Binding keyboard events"),S.on("keydown"+x,h.event.keydown),h.has.search()&&S.on(h.get.inputEvent()+x,w.search,h.event.input),h.is.multiple()&&N.on("keydown"+a,h.event.document.keydown)},inputEvents:function(){h.verbose("Binding input change events"),S.on("change"+x,w.input,h.event.change)},mouseEvents:function(){h.verbose("Binding mouse events"),h.is.multiple()&&S.on("click"+x,w.label,h.event.label.click).on("click"+x,w.remove,h.event.remove.click),h.is.searchSelection()?(S.on("mousedown"+x,h.event.mousedown).on("mouseup"+x,h.event.mouseup).on("mousedown"+x,w.menu,h.event.menu.mousedown).on("mouseup"+x,w.menu,h.event.menu.mouseup).on("click"+x,w.icon,h.event.icon.click).on("click"+x,w.clearIcon,h.event.clearIcon.click).on("focus"+x,w.search,h.event.search.focus).on("click"+x,w.search,h.event.search.focus).on("blur"+x,w.search,h.event.search.blur).on("click"+x,w.text,h.event.text.focus),h.is.multiple()&&S.on("click"+x,h.event.click)):("click"==m.on?S.on("click"+x,w.icon,h.event.icon.click).on("click"+x,h.event.test.toggle):"hover"==m.on?S.on("mouseenter"+x,h.delay.show).on("mouseleave"+x,h.delay.hide):S.on(m.on+x,h.toggle),S.on("mousedown"+x,h.event.mousedown).on("mouseup"+x,h.event.mouseup).on("focus"+x,h.event.focus).on("click"+x,w.clearIcon,h.event.clearIcon.click),h.has.menuSearch()?S.on("blur"+x,w.search,h.event.search.blur):S.on("blur"+x,h.event.blur)),R.on("mouseenter"+x,w.item,h.event.item.mouseenter).on("mouseleave"+x,w.item,h.event.item.mouseleave).on("click"+x,w.item,h.event.item.click)},intent:function(){h.verbose("Binding hide intent event to document"),W&&N.on("touchstart"+a,h.event.test.touch).on("touchmove"+a,h.event.test.touch),N.on("click"+a,h.event.test.hide)}},unbind:{intent:function(){h.verbose("Removing hide intent event from document"),W&&N.off("touchstart"+a).off("touchmove"+a),N.off("click"+a)}},filter:function(e){var t=e!==_?e:h.get.query(),n=function(){h.is.multiple()&&h.filterActive(),(e||!e&&0==h.get.activeItem().length)&&h.select.firstUnfiltered(),h.has.allResultsFiltered()?m.onNoResults.call(P,t)?m.allowAdditions?m.hideAdditions&&(h.verbose("User addition with no menu, setting empty style"),h.set.empty(),h.hideMenu()):(h.verbose("All items filtered, showing message",t),h.add.message(c.noResults)):(h.verbose("All items filtered, hiding dropdown",t),h.hideMenu()):(h.remove.empty(),h.remove.message()),m.allowAdditions&&h.add.userSuggestion(e),h.is.searchSelection()&&h.can.show()&&h.is.focusedOnSearch()&&h.show()};m.useLabels&&h.has.maxSelections()||(m.apiSettings?h.can.useAPI()?h.queryRemote(t,function(){m.filterRemoteData&&h.filterItems(t),n()}):h.error(v.noAPI):(h.filterItems(t),n()))},queryRemote:function(e,n){var t={errorDuration:!1,cache:"local",throttle:m.throttle,urlData:{query:e},onError:function(){h.add.message(c.serverError),n()},onFailure:function(){h.add.message(c.serverError),n()},onSuccess:function(e){var t=e[l.remoteValues];G.isArray(t)&&0<t.length?(h.remove.message(),h.setup.menu({values:e[l.remoteValues]})):h.add.message(c.noResults),n()}};S.api("get request")||h.setup.api(),t=G.extend(!0,{},t,m.apiSettings),S.api("setting",t).api("query")},filterItems:function(e){var i=e!==_?e:h.get.query(),a=null,t=h.escape.string(i),o=new RegExp("^"+t,"igm");h.has.query()&&(a=[],h.verbose("Searching for matching values",i),O.each(function(){var e,t,n=G(this);if("both"==m.match||"text"==m.match){if(-1!==(e=String(h.get.choiceText(n,!1))).search(o))return a.push(this),!0;if("exact"===m.fullTextSearch&&h.exactSearch(i,e))return a.push(this),!0;if(!0===m.fullTextSearch&&h.fuzzySearch(i,e))return a.push(this),!0}if("both"==m.match||"value"==m.match){if(-1!==(t=String(h.get.choiceValue(n,e))).search(o))return a.push(this),!0;if("exact"===m.fullTextSearch&&h.exactSearch(i,t))return a.push(this),!0;if(!0===m.fullTextSearch&&h.fuzzySearch(i,t))return a.push(this),!0}})),h.debug("Showing only matched items",i),h.remove.filteredItem(),a&&O.not(a).addClass(g.filtered),h.has.query()?!0===m.hideDividers?V.addClass(g.hidden):"empty"===m.hideDividers&&V.removeClass(g.hidden).filter(function(){var e=G(this).nextUntil(w.item);return 0===(e.length?e:G(this)).nextUntil(w.divider).filter(w.item+":not(."+g.filtered+")").length}).addClass(g.hidden):V.removeClass(g.hidden)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=e.toLowerCase(),t=t.toLowerCase(),n<i)return!1;if(i===n)return e===t;e:for(var a=0,o=0;a<i;a++){for(var s=e.charCodeAt(a);o<n;)if(t.charCodeAt(o++)===s)continue e;return!1}return!0},exactSearch:function(e,t){return e=e.toLowerCase(),-1<(t=t.toLowerCase()).indexOf(e)},filterActive:function(){m.useLabels&&O.filter("."+g.active).addClass(g.filtered)},focusSearch:function(e){h.has.search()&&!h.is.focusedOnSearch()&&(e?(S.off("focus"+x,w.search),T.focus(),S.on("focus"+x,w.search,h.event.search.focus)):T.focus())},blurSearch:function(){h.has.search()&&T.blur()},forceSelection:function(){var e=O.not(g.filtered).filter("."+g.selected).eq(0),t=O.not(g.filtered).filter("."+g.active).eq(0),n=0<e.length?e:t;if(0<n.length&&!h.is.multiple())return h.debug("Forcing partial selection to selected item",n),void h.event.item.click.call(n,{},!0);m.allowAdditions&&h.set.selected(h.get.query()),h.remove.searchTerm()},change:{values:function(e){m.allowAdditions||h.clear(),h.debug("Creating dropdown with specified values",e),h.setup.menu({values:e}),G.each(e,function(e,t){if(1==t.selected)return h.debug("Setting initial selection to",t.value),h.set.selected(t.value),!0})}},event:{change:function(){F||(h.debug("Input changed, updating selection"),h.set.selected())},focus:function(){m.showOnFocus&&!E&&h.is.hidden()&&!t&&h.show()},blur:function(e){t=Z.activeElement===this,E||t||(h.remove.activeLabel(),h.hide())},mousedown:function(){h.is.searchSelection()?i=!0:E=!0},mouseup:function(){h.is.searchSelection()?i=!1:E=!1},click:function(e){G(e.target).is(S)&&(h.is.focusedOnSearch()?h.show():h.focusSearch())},search:{focus:function(){E=!0,h.is.multiple()&&h.remove.activeLabel(),m.showOnFocus&&h.search()},blur:function(e){t=Z.activeElement===this,h.is.searchSelection()&&!i&&(M||t||(m.forceSelection&&h.forceSelection(),h.hide())),i=!1}},clearIcon:{click:function(e){h.clear(),h.is.searchSelection()&&h.remove.searchTerm(),h.hide(),e.stopPropagation()}},icon:{click:function(e){h.has.search()?h.is.active()?h.blurSearch():h.focusSearch():h.toggle()}},text:{focus:function(e){E=!0,h.focusSearch()}},input:function(e){(h.is.multiple()||h.is.searchSelection())&&h.set.filtered(),clearTimeout(h.timer),h.timer=setTimeout(h.search,m.delay.search)},label:{click:function(e){var t=G(this),n=S.find(w.label),i=n.filter("."+g.active),a=t.nextAll("."+g.active),o=t.prevAll("."+g.active),s=0<a.length?t.nextUntil(a).add(i).add(t):t.prevUntil(o).add(i).add(t);e.shiftKey?(i.removeClass(g.active),s.addClass(g.active)):e.ctrlKey?t.toggleClass(g.active):(i.removeClass(g.active),t.addClass(g.active)),m.onLabelSelect.apply(this,n.filter("."+g.active))}},remove:{click:function(){var e=G(this).parent();e.hasClass(g.active)?h.remove.activeLabels():h.remove.activeLabels(e)}},test:{toggle:function(e){var t=h.is.multiple()?h.show:h.toggle;h.is.bubbledLabelClick(e)||h.is.bubbledIconClick(e)||h.determine.eventOnElement(e,t)&&e.preventDefault()},touch:function(e){h.determine.eventOnElement(e,function(){"touchstart"==e.type?h.timer=setTimeout(function(){h.hide()},m.delay.touch):"touchmove"==e.type&&clearTimeout(h.timer)}),e.stopPropagation()},hide:function(e){h.determine.eventInModule(e,h.hide)}},select:{mutation:function(e){h.debug("<select> modified, recreating menu"),h.is.selectMutation(e)&&(h.disconnect.selectObserver(),h.refresh(),h.setup.select(),h.set.selected(),h.observe.select())}},menu:{mutation:function(e){var t=e[0],n=t.addedNodes?G(t.addedNodes[0]):G(!1),i=t.removedNodes?G(t.removedNodes[0]):G(!1),a=n.add(i),o=a.is(w.addition)||0<a.closest(w.addition).length,s=a.is(w.message)||0<a.closest(w.message).length;o||s?(h.debug("Updating item selector cache"),h.refreshItems()):(h.debug("Menu modified, updating selector cache"),h.refresh())},mousedown:function(){M=!0},mouseup:function(){M=!1}},item:{mouseenter:function(e){var t=G(e.target),n=G(this),i=n.children(w.menu),a=n.siblings(w.item).children(w.menu),o=0<i.length;!(0<i.find(t).length)&&o&&(clearTimeout(h.itemTimer),h.itemTimer=setTimeout(function(){h.verbose("Showing sub-menu",i),G.each(a,function(){h.animate.hide(!1,G(this))}),h.animate.show(!1,i)},m.delay.show),e.preventDefault())},mouseleave:function(e){var t=G(this).children(w.menu);0<t.length&&(clearTimeout(h.itemTimer),h.itemTimer=setTimeout(function(){h.verbose("Hiding sub-menu",t),h.animate.hide(!1,t)},m.delay.hide))},click:function(e,t){var n=G(this),i=G(e?e.target:""),a=n.find(w.menu),o=h.get.choiceText(n),s=h.get.choiceValue(n,o),r=0<a.length,l=0<a.find(i).length;h.has.menuSearch()&&G(Z.activeElement).blur(),l||r&&!m.allowCategorySelection||(h.is.searchSelection()&&(m.allowAdditions&&h.remove.userAddition(),h.remove.searchTerm(),h.is.focusedOnSearch()||1==t||h.focusSearch(!0)),m.useLabels||(h.remove.filteredItem(),h.set.scrollPosition(n)),h.determine.selectAction.call(this,o,s))}},document:{keydown:function(e){var t=e.which;if(h.is.inObject(t,p)){var n=S.find(w.label),i=n.filter("."+g.active),a=(i.data(b.value),n.index(i)),o=n.length,s=0<i.length,r=1<i.length,l=0===a,c=a+1==o,u=h.is.searchSelection(),d=h.is.focusedOnSearch(),v=h.is.focused(),f=d&&0===h.get.caretPosition();if(u&&!s&&!d)return;t==p.leftArrow?!v&&!f||s?s&&(e.shiftKey?h.verbose("Adding previous label to selection"):(h.verbose("Selecting previous label"),n.removeClass(g.active)),l&&!r?i.addClass(g.active):i.prev(w.siblingLabel).addClass(g.active).end(),e.preventDefault()):(h.verbose("Selecting previous label"),n.last().addClass(g.active)):t==p.rightArrow?(v&&!s&&n.first().addClass(g.active),s&&(e.shiftKey?h.verbose("Adding next label to selection"):(h.verbose("Selecting next label"),n.removeClass(g.active)),c?u?d?n.removeClass(g.active):h.focusSearch():r?i.next(w.siblingLabel).addClass(g.active):i.addClass(g.active):i.next(w.siblingLabel).addClass(g.active),e.preventDefault())):t==p.deleteKey||t==p.backspace?s?(h.verbose("Removing active labels"),c&&u&&!d&&h.focusSearch(),i.last().next(w.siblingLabel).addClass(g.active),h.remove.activeLabels(i),e.preventDefault()):f&&!s&&t==p.backspace&&(h.verbose("Removing last label on input backspace"),i=n.last().addClass(g.active),h.remove.activeLabels(i)):i.removeClass(g.active)}}},keydown:function(e){var t=e.which;if(h.is.inObject(t,p)){var n,i=O.not(w.unselectable).filter("."+g.selected).eq(0),a=R.children("."+g.active).eq(0),o=0<i.length?i:a,s=0<o.length?o.siblings(":not(."+g.filtered+")").addBack():R.children(":not(."+g.filtered+")"),r=o.children(w.menu),l=o.closest(w.menu),c=l.hasClass(g.visible)||l.hasClass(g.animating)||0<l.parent(w.menu).length,u=0<r.length,d=0<o.length,v=0<o.not(w.unselectable).length,f=t==p.delimiter&&m.allowAdditions&&h.is.multiple();if(m.allowAdditions&&m.hideAdditions&&(t==p.enter||f)&&v&&(h.verbose("Selecting item from keyboard shortcut",o),h.event.item.click.call(o,e),h.is.searchSelection()&&h.remove.searchTerm()),h.is.visible()){if((t==p.enter||f)&&(t==p.enter&&d&&u&&!m.allowCategorySelection?(h.verbose("Pressed enter on unselectable category, opening sub menu"),t=p.rightArrow):v&&(h.verbose("Selecting item from keyboard shortcut",o),h.event.item.click.call(o,e),h.is.searchSelection()&&(h.remove.searchTerm(),h.is.multiple()&&T.focus())),e.preventDefault()),d&&(t==p.leftArrow&&l[0]!==R[0]&&(h.verbose("Left key pressed, closing sub-menu"),h.animate.hide(!1,l),o.removeClass(g.selected),l.closest(w.item).addClass(g.selected),e.preventDefault()),t==p.rightArrow&&u&&(h.verbose("Right key pressed, opening sub-menu"),h.animate.show(!1,r),o.removeClass(g.selected),r.find(w.item).eq(0).addClass(g.selected),e.preventDefault())),t==p.upArrow){if(n=d&&c?o.prevAll(w.item+":not("+w.unselectable+")").eq(0):O.eq(0),s.index(n)<0)return h.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();h.verbose("Up key pressed, changing active item"),o.removeClass(g.selected),n.addClass(g.selected),h.set.scrollPosition(n),m.selectOnKeydown&&h.is.single()&&h.set.selectedItem(n),e.preventDefault()}if(t==p.downArrow){if(0===(n=d&&c?n=o.nextAll(w.item+":not("+w.unselectable+")").eq(0):O.eq(0)).length)return h.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();h.verbose("Down key pressed, changing active item"),O.removeClass(g.selected),n.addClass(g.selected),h.set.scrollPosition(n),m.selectOnKeydown&&h.is.single()&&h.set.selectedItem(n),e.preventDefault()}t==p.pageUp&&(h.scrollPage("up"),e.preventDefault()),t==p.pageDown&&(h.scrollPage("down"),e.preventDefault()),t==p.escape&&(h.verbose("Escape key pressed, closing dropdown"),h.hide())}else f&&e.preventDefault(),t!=p.downArrow||h.is.visible()||(h.verbose("Down key pressed, showing dropdown"),h.show(),e.preventDefault())}else h.has.search()||h.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e=Z.createEvent("HTMLEvents"),t=L[0];t&&(h.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){h.verbose("Determining action",m.action),G.isFunction(h.action[m.action])?(h.verbose("Triggering preset action",m.action,e,t),h.action[m.action].call(P,e,t,this)):G.isFunction(m.action)?(h.verbose("Triggering user action",m.action,e,t),m.action.call(P,e,t,this)):h.error(v.action,m.action)},eventInModule:function(e,t){var n=G(e.target),i=0<n.closest(Z.documentElement).length,a=0<n.closest(S).length;return t=G.isFunction(t)?t:function(){},i&&!a?(h.verbose("Triggering event",t),t(),!0):(h.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=G(e.target),i=n.closest(w.siblingLabel),a=Z.body.contains(e.target),o=0===S.find(i).length,s=0===n.closest(R).length;return t=G.isFunction(t)?t:function(){},a&&o&&s?(h.verbose("Triggering event",t),t(),!0):(h.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){if(t=t!==_?t:e,h.can.activate(G(n))){if(h.set.selected(t,G(n)),h.is.multiple()&&!h.is.allFiltered())return;h.hideAndClear()}},select:function(e,t,n){if(t=t!==_?t:e,h.can.activate(G(n))){if(h.set.value(t,e,G(n)),h.is.multiple()&&!h.is.allFiltered())return;h.hideAndClear()}},combo:function(e,t,n){t=t!==_?t:e,h.set.selected(t,G(n)),h.hideAndClear()},hide:function(e,t,n){h.set.value(t,e,G(n)),h.hideAndClear()}},get:{id:function(){return o},defaultText:function(){return S.data(b.defaultText)},defaultValue:function(){return S.data(b.defaultValue)},placeholderText:function(){return"auto"!=m.placeholder&&"string"==typeof m.placeholder?m.placeholder:S.data(b.placeholderText)||""},text:function(){return A.text()},query:function(){return G.trim(T.val())},searchWidth:function(e){return e=e!==_?e:T.val(),k.text(e),Math.ceil(k.width()+1)},selectionCount:function(){var e=h.get.values();return h.is.multiple()?G.isArray(e)?e.length:0:""!==h.get.value()?1:0},transition:function(e){return"auto"==m.transition?h.is.upward(e)?"slide up":"slide down":m.transition},userValues:function(){var e=h.get.values();return!!e&&(e=G.isArray(e)?e:[e],G.grep(e,function(e){return!1===h.get.item(e)}))},uniqueArray:function(n){return G.grep(n,function(e,t){return G.inArray(e,n)===t})},caretPosition:function(){var e,t,n=T.get(0);return"selectionStart"in n?n.selectionStart:Z.selection?(n.focus(),t=(e=Z.selection.createRange()).text.length,e.moveStart("character",-n.value.length),e.text.length-t):void 0},value:function(){var e=0<L.length?L.val():S.data(b.value),t=G.isArray(e)&&1===e.length&&""===e[0];return e===_||t?"":e},values:function(){var e=h.get.value();return""===e?"":!h.has.selectInput()&&h.is.multiple()?"string"==typeof e?e.split(m.delimiter):"":e},remoteValues:function(){var e=h.get.values(),i=!1;return e&&("string"==typeof e&&(e=[e]),G.each(e,function(e,t){var n=h.read.remoteData(t);h.verbose("Restoring value from session data",n,t),n&&(i||(i={}),i[t]=n)})),i},choiceText:function(e,t){if(t=t!==_?t:m.preserveHTML,e)return 0<e.find(w.menu).length&&(h.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(w.menu).remove(),e.find(w.menuIcon).remove()),e.data(b.text)!==_?e.data(b.text):t?G.trim(e.html()):G.trim(e.text())},choiceValue:function(e,t){return t=t||h.get.choiceText(e),!!e&&(e.data(b.value)!==_?String(e.data(b.value)):"string"==typeof t?G.trim(t.toLowerCase()):String(t))},inputEvent:function(){var e=T[0];return!!e&&(e.oninput!==_?"input":e.onpropertychange!==_?"propertychange":"keyup")},selectValues:function(){var a={values:[]};return S.find("option").each(function(){var e=G(this),t=e.html(),n=e.attr("disabled"),i=e.attr("value")!==_?e.attr("value"):t;"auto"===m.placeholder&&""===i?a.placeholder=t:a.values.push({name:t,value:i,disabled:n})}),m.placeholder&&"auto"!==m.placeholder&&(h.debug("Setting placeholder value to",m.placeholder),a.placeholder=m.placeholder),m.sortSelect?(!0===m.sortSelect?a.values.sort(function(e,t){return e.name>t.name?1:-1}):"natural"===m.sortSelect?a.values.sort(function(e,t){return e.name.toLowerCase()>t.name.toLowerCase()?1:-1}):G.isFunction(m.sortSelect)&&a.values.sort(m.sortSelect),h.debug("Retrieved and sorted values from select",a)):h.debug("Retrieved values from select",a),a},activeItem:function(){return O.filter("."+g.active)},selectedItem:function(){var e=O.not(w.unselectable).filter("."+g.selected);return 0<e.length?e:O.eq(0)},itemWithAdditions:function(e){var t=h.get.item(e),n=h.create.userChoice(e);return n&&0<n.length&&(t=0<t.length?t.add(n):n),t},item:function(i,a){var e,o,s=!1;return i=i!==_?i:h.get.values()!==_?h.get.values():h.get.text(),e=o?0<i.length:i!==_&&null!==i,o=h.is.multiple()&&G.isArray(i),a=""===i||0===i||(a||!1),e&&O.each(function(){var e=G(this),t=h.get.choiceText(e),n=h.get.choiceValue(e,t);if(null!==n&&n!==_)if(o)-1!==G.inArray(String(n),i)&&(s=s?s.add(e):e);else if(a){if(h.verbose("Ambiguous dropdown value using strict type check",e,i),n===i)return s=e,!0}else if(String(n)==String(i))return h.verbose("Found select item by value",n,i),s=e,!0}),s}},check:{maxSelections:function(e){return!m.maxSelections||((e=e!==_?e:h.get.selectionCount())>=m.maxSelections?(h.debug("Maximum selection count reached"),m.useLabels&&(O.addClass(g.filtered),h.add.message(c.maxSelections)),!0):(h.verbose("No longer at maximum selection count"),h.remove.message(),h.remove.filteredItem(),h.is.searchSelection()&&h.filterItems(),!1))}},restore:{defaults:function(){h.clear(),h.restore.defaultText(),h.restore.defaultValue()},defaultText:function(){var e=h.get.defaultText();e===h.get.placeholderText?(h.debug("Restoring default placeholder text",e),h.set.placeholderText(e)):(h.debug("Restoring default text",e),h.set.text(e))},placeholderText:function(){h.set.placeholderText()},defaultValue:function(){var e=h.get.defaultValue();e!==_&&(h.debug("Restoring default value",e),""!==e?(h.set.value(e),h.set.selected()):(h.remove.activeItem(),h.remove.selectedItem()))},labels:function(){m.allowAdditions&&(m.useLabels||(h.error(v.labels),m.useLabels=!0),h.debug("Restoring selected values"),h.create.userLabels()),h.check.maxSelections()},selected:function(){h.restore.values(),h.is.multiple()?(h.debug("Restoring previously selected values and labels"),h.restore.labels()):h.debug("Restoring previously selected values")},values:function(){h.set.initialLoad(),m.apiSettings&&m.saveRemoteData&&h.get.remoteValues()?h.restore.remoteValues():h.set.selected(),h.remove.initialLoad()},remoteValues:function(){var e=h.get.remoteValues();h.debug("Recreating selected from session data",e),e&&(h.is.single()?G.each(e,function(e,t){h.set.text(t)}):G.each(e,function(e,t){h.add.label(e,t)}))}},read:{remoteData:function(e){var t;if(J.Storage!==_)return(t=sessionStorage.getItem(e))!==_&&t;h.error(v.noStorage)}},save:{defaults:function(){h.save.defaultText(),h.save.placeholderText(),h.save.defaultValue()},defaultValue:function(){var e=h.get.value();h.verbose("Saving default value as",e),S.data(b.defaultValue,e)},defaultText:function(){var e=h.get.text();h.verbose("Saving default text as",e),S.data(b.defaultText,e)},placeholderText:function(){var e;!1!==m.placeholder&&A.hasClass(g.placeholder)&&(e=h.get.text(),h.verbose("Saving placeholder text as",e),S.data(b.placeholderText,e))},remoteData:function(e,t){J.Storage!==_?(h.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e)):h.error(v.noStorage)}},clear:function(){h.is.multiple()&&m.useLabels?h.remove.labels():(h.remove.activeItem(),h.remove.selectedItem()),h.set.placeholderText(),h.clearValue()},clearValue:function(){h.set.value("")},scrollPage:function(e,t){var n,i,a=t||h.get.selectedItem(),o=a.closest(w.menu),s=o.outerHeight(),r=o.scrollTop(),l=O.eq(0).outerHeight(),c=Math.floor(s/l),u=(o.prop("scrollHeight"),"up"==e?r-l*c:r+l*c),d=O.not(w.unselectable);i="up"==e?d.index(a)-c:d.index(a)+c,0<(n=("up"==e?0<=i:i<d.length)?d.eq(i):"up"==e?d.first():d.last()).length&&(h.debug("Scrolling page",e,n),a.removeClass(g.selected),n.addClass(g.selected),m.selectOnKeydown&&h.is.single()&&h.set.selectedItem(n),o.scrollTop(u))},set:{filtered:function(){var e=h.is.multiple(),t=h.is.searchSelection(),n=e&&t,i=t?h.get.query():"",a="string"==typeof i&&0<i.length,o=h.get.searchWidth(),s=""!==i;e&&a&&(h.verbose("Adjusting input width",o,m.glyphWidth),T.css("width",o)),a||n&&s?(h.verbose("Hiding placeholder text"),A.addClass(g.filtered)):(!e||n&&!s)&&(h.verbose("Showing placeholder text"),A.removeClass(g.filtered))},empty:function(){S.addClass(g.empty)},loading:function(){S.addClass(g.loading)},placeholderText:function(e){e=e||h.get.placeholderText(),h.debug("Setting placeholder text",e),h.set.text(e),A.addClass(g.placeholder)},tabbable:function(){h.is.searchSelection()?(h.debug("Added tabindex to searchable dropdown"),T.val("").attr("tabindex",0),R.attr("tabindex",-1)):(h.debug("Added tabindex to dropdown"),S.attr("tabindex")===_&&(S.attr("tabindex",0),R.attr("tabindex",-1)))},initialLoad:function(){h.verbose("Setting initial load"),e=!0},activeItem:function(e){m.allowAdditions&&0<e.filter(w.addition).length?e.addClass(g.filtered):e.addClass(g.active)},partialSearch:function(e){var t=h.get.query().length;T.val(e.substr(0,t))},scrollPosition:function(e,t){var n,i,a,o,s,r;n=(e=e||h.get.selectedItem()).closest(w.menu),i=e&&0<e.length,t=t!==_&&t,e&&0<n.length&&i&&(e.position().top,n.addClass(g.loading),a=(o=n.scrollTop())-n.offset().top+e.offset().top,t||(r=o+n.height()<a+5,s=a-5<o),h.debug("Scrolling to active item",a),(t||s||r)&&n.scrollTop(a),n.removeClass(g.loading))},text:function(e){"combo"===m.action?(h.debug("Changing combo button text",e,q),m.preserveHTML?q.html(e):q.text(e)):"activate"===m.action&&(e!==h.get.placeholderText()&&A.removeClass(g.placeholder),h.debug("Changing text",e,A),A.removeClass(g.filtered),m.preserveHTML?A.html(e):A.text(e))},selectedItem:function(e){var t=h.get.choiceValue(e),n=h.get.choiceText(e,!1),i=h.get.choiceText(e,!0);h.debug("Setting user selection to item",e),h.remove.activeItem(),h.set.partialSearch(n),h.set.activeItem(e),h.set.selected(t,e),h.set.text(i)},selectedLetter:function(e){var t,n=O.filter("."+g.selected),i=0<n.length&&h.has.firstLetter(n,e),a=!1;i&&(t=n.nextAll(O).eq(0),h.has.firstLetter(t,e)&&(a=t)),a||O.each(function(){if(h.has.firstLetter(G(this),e))return a=G(this),!1}),a&&(h.verbose("Scrolling to next value with letter",e),h.set.scrollPosition(a),n.removeClass(g.selected),a.addClass(g.selected),m.selectOnKeydown&&h.is.single()&&h.set.selectedItem(a))},direction:function(e){"auto"==m.direction?(h.remove.upward(),h.can.openDownward(e)?h.remove.upward(e):h.set.upward(e),h.is.leftward(e)||h.can.openRightward(e)||h.set.leftward(e)):"upward"==m.direction&&h.set.upward(e)},upward:function(e){(e||S).addClass(g.upward)},leftward:function(e){(e||R).addClass(g.leftward)},value:function(e,t,n){var i=h.escape.value(e),a=0<L.length,o=h.get.values(),s=e!==_?String(e):e;if(a){if(!m.allowReselection&&s==o&&(h.verbose("Skipping value update already same value",e,o),!h.is.initialLoad()))return;h.is.single()&&h.has.selectInput()&&h.can.extendSelect()&&(h.debug("Adding user option",e),h.add.optionValue(e)),h.debug("Updating input value",i,o),F=!0,L.val(i),!1===m.fireOnInit&&h.is.initialLoad()?h.debug("Input native change event ignored on initial load"):h.trigger.change(),F=!1}else h.verbose("Storing value in metadata",i,L),i!==o&&S.data(b.value,s);!1===m.fireOnInit&&h.is.initialLoad()?h.verbose("No callback on initial load",m.onChange):m.onChange.call(P,e,t,n)},active:function(){S.addClass(g.active)},multiple:function(){S.addClass(g.multiple)},visible:function(){S.addClass(g.visible)},exactly:function(e,t){h.debug("Setting selected to exact values"),h.clear(),h.set.selected(e,t)},selected:function(e,r){var l=h.is.multiple();(r=m.allowAdditions?r||h.get.itemWithAdditions(e):r||h.get.item(e))&&(h.debug("Setting selected menu item to",r),h.is.multiple()&&h.remove.searchWidth(),h.is.single()?(h.remove.activeItem(),h.remove.selectedItem()):m.useLabels&&h.remove.selectedItem(),r.each(function(){var e=G(this),t=h.get.choiceText(e),n=h.get.choiceValue(e,t),i=e.hasClass(g.filtered),a=e.hasClass(g.active),o=e.hasClass(g.addition),s=l&&1==r.length;l?!a||o?(m.apiSettings&&m.saveRemoteData&&h.save.remoteData(t,n),m.useLabels?(h.add.label(n,t,s),h.add.value(n,t,e),h.set.activeItem(e),h.filterActive(),h.select.nextAvailable(r)):(h.add.value(n,t,e),h.set.text(h.add.variables(c.count)),h.set.activeItem(e))):i||(h.debug("Selected active value, removing label"),h.remove.selected(n)):(m.apiSettings&&m.saveRemoteData&&h.save.remoteData(t,n),h.set.text(t),h.set.value(n,t,e),e.addClass(g.active).addClass(g.selected))}))}},add:{label:function(e,t,n){var i,a=h.is.searchSelection()?T:A,o=h.escape.value(e);m.ignoreCase&&(o=o.toLowerCase()),i=G("<a />").addClass(g.label).attr("data-"+b.value,o).html(f.label(o,t)),i=m.onLabelCreate.call(i,o,t),h.has.label(e)?h.debug("User selection already exists, skipping",o):(m.label.variation&&i.addClass(m.label.variation),!0===n?(h.debug("Animating in label",i),i.addClass(g.hidden).insertBefore(a).transition(m.label.transition,m.label.duration)):(h.debug("Adding selection label",i),i.insertBefore(a)))},message:function(e){var t=R.children(w.message),n=m.templates.message(h.add.variables(e));0<t.length?t.html(n):t=G("<div/>").html(n).addClass(g.message).appendTo(R)},optionValue:function(e){var t=h.escape.value(e);0<L.find('option[value="'+h.escape.string(t)+'"]').length||(h.disconnect.selectObserver(),h.is.single()&&(h.verbose("Removing previous user addition"),L.find("option."+g.addition).remove()),G("<option/>").prop("value",t).addClass(g.addition).html(e).appendTo(L),h.verbose("Adding user addition as an <option>",e),h.observe.select())},userSuggestion:function(e){var t,n=R.children(w.addition),i=h.get.item(e),a=i&&i.not(w.addition).length,o=0<n.length;m.useLabels&&h.has.maxSelections()||(""===e||a?n.remove():(o?(n.data(b.value,e).data(b.text,e).attr("data-"+b.value,e).attr("data-"+b.text,e).removeClass(g.filtered),m.hideAdditions||(t=m.templates.addition(h.add.variables(c.addResult,e)),n.html(t)),h.verbose("Replacing user suggestion with new value",n)):((n=h.create.userChoice(e)).prependTo(R),h.verbose("Adding item choice to menu corresponding with user choice addition",n)),m.hideAdditions&&!h.is.allFiltered()||n.addClass(g.selected).siblings().removeClass(g.selected),h.refreshItems()))},variables:function(e,t){var n,i,a=-1!==e.search("{count}"),o=-1!==e.search("{maxCount}"),s=-1!==e.search("{term}");return h.verbose("Adding templated variables to message",e),a&&(n=h.get.selectionCount(),e=e.replace("{count}",n)),o&&(n=h.get.selectionCount(),e=e.replace("{maxCount}",m.maxSelections)),s&&(i=t||h.get.query(),e=e.replace("{term}",i)),e},value:function(e,t,n){var i,a=h.get.values();h.has.value(e)?h.debug("Value already selected"):""!==e?(i=G.isArray(a)?(i=a.concat([e]),h.get.uniqueArray(i)):[e],h.has.selectInput()?h.can.extendSelect()&&(h.debug("Adding value to select",e,i,L),h.add.optionValue(e)):(i=i.join(m.delimiter),h.debug("Setting hidden input to delimited value",i,L)),!1===m.fireOnInit&&h.is.initialLoad()?h.verbose("Skipping onadd callback on initial load",m.onAdd):m.onAdd.call(P,e,t,n),h.set.value(i,e,t,n),h.check.maxSelections()):h.debug("Cannot select blank values from multiselect")}},remove:{active:function(){S.removeClass(g.active)},activeLabel:function(){S.find(w.label).removeClass(g.active)},empty:function(){S.removeClass(g.empty)},loading:function(){S.removeClass(g.loading)},initialLoad:function(){e=!1},upward:function(e){(e||S).removeClass(g.upward)},leftward:function(e){(e||R).removeClass(g.leftward)},visible:function(){S.removeClass(g.visible)},activeItem:function(){O.removeClass(g.active)},filteredItem:function(){m.useLabels&&h.has.maxSelections()||(m.useLabels&&h.is.multiple()?O.not("."+g.active).removeClass(g.filtered):O.removeClass(g.filtered),m.hideDividers&&V.removeClass(g.hidden),h.remove.empty())},optionValue:function(e){var t=h.escape.value(e),n=L.find('option[value="'+h.escape.string(t)+'"]');0<n.length&&n.hasClass(g.addition)&&(s&&(s.disconnect(),h.verbose("Temporarily disconnecting mutation observer")),n.remove(),h.verbose("Removing user addition as an <option>",t),s&&s.observe(L[0],{childList:!0,subtree:!0}))},message:function(){R.children(w.message).remove()},searchWidth:function(){T.css("width","")},searchTerm:function(){h.verbose("Cleared search term"),T.val(""),h.set.filtered()},userAddition:function(){O.filter(w.addition).remove()},selected:function(e,t){if(!(t=m.allowAdditions?t||h.get.itemWithAdditions(e):t||h.get.item(e)))return!1;t.each(function(){var e=G(this),t=h.get.choiceText(e),n=h.get.choiceValue(e,t);h.is.multiple()?m.useLabels?(h.remove.value(n,t,e),h.remove.label(n)):(h.remove.value(n,t,e),0===h.get.selectionCount()?h.set.placeholderText():h.set.text(h.add.variables(c.count))):h.remove.value(n,t,e),e.removeClass(g.filtered).removeClass(g.active),m.useLabels&&e.removeClass(g.selected)})},selectedItem:function(){O.removeClass(g.selected)},value:function(e,t,n){var i,a=h.get.values();h.has.selectInput()?(h.verbose("Input is <select> removing selected option",e),i=h.remove.arrayValue(e,a),h.remove.optionValue(e)):(h.verbose("Removing from delimited values",e),i=(i=h.remove.arrayValue(e,a)).join(m.delimiter)),!1===m.fireOnInit&&h.is.initialLoad()?h.verbose("No callback on initial load",m.onRemove):m.onRemove.call(P,e,t,n),h.set.value(i,t,n),h.check.maxSelections()},arrayValue:function(t,e){return G.isArray(e)||(e=[e]),e=G.grep(e,function(e){return t!=e}),h.verbose("Removed value from delimited string",t,e),e},label:function(e,t){var n=S.find(w.label).filter("[data-"+b.value+'="'+h.escape.string(e)+'"]');h.verbose("Removing label",n),n.remove()},activeLabels:function(e){e=e||S.find(w.label).filter("."+g.active),h.verbose("Removing active label selections",e),h.remove.labels(e)},labels:function(e){e=e||S.find(w.label),h.verbose("Removing labels",e),e.each(function(){var e=G(this),t=e.data(b.value),n=t!==_?String(t):t,i=h.is.userValue(n);!1!==m.onLabelRemove.call(e,t)?(h.remove.message(),i?(h.remove.value(n),h.remove.label(n)):h.remove.selected(n)):h.debug("Label remove callback cancelled removal")})},tabbable:function(){h.is.searchSelection()?(h.debug("Searchable dropdown initialized"),T.removeAttr("tabindex")):(h.debug("Simple selection dropdown initialized"),S.removeAttr("tabindex")),R.removeAttr("tabindex")}},has:{menuSearch:function(){return h.has.search()&&0<T.closest(R).length},clearItem:function(){return 0<D.length},search:function(){return 0<T.length},sizer:function(){return 0<k.length},selectInput:function(){return L.is("select")},minCharacters:function(e){return!m.minCharacters||(e=e!==_?String(e):String(h.get.query())).length>=m.minCharacters},firstLetter:function(e,t){var n;return!(!e||0===e.length||"string"!=typeof t)&&(n=h.get.choiceText(e,!1),(t=t.toLowerCase())==String(n).charAt(0).toLowerCase())},input:function(){return 0<L.length},items:function(){return 0<O.length},menu:function(){return 0<R.length},message:function(){return 0!==R.children(w.message).length},label:function(e){var t=h.escape.value(e),n=S.find(w.label);return m.ignoreCase&&(t=t.toLowerCase()),0<n.filter("[data-"+b.value+'="'+h.escape.string(t)+'"]').length},maxSelections:function(){return m.maxSelections&&h.get.selectionCount()>=m.maxSelections},allResultsFiltered:function(){var e=O.not(w.addition);return e.filter(w.unselectable).length===e.length},userSuggestion:function(){return 0<R.children(w.addition).length},query:function(){return""!==h.get.query()},value:function(e){return m.ignoreCase?h.has.valueIgnoringCase(e):h.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=h.get.values();return!!(G.isArray(t)?t&&-1!==G.inArray(e,t):t==e)},valueIgnoringCase:function(n){var e=h.get.values(),i=!1;return G.isArray(e)||(e=[e]),G.each(e,function(e,t){if(String(n).toLowerCase()==String(t).toLowerCase())return!(i=!0)}),i}},is:{active:function(){return S.hasClass(g.active)},animatingInward:function(){return R.transition("is inward")},animatingOutward:function(){return R.transition("is outward")},bubbledLabelClick:function(e){return G(e.target).is("select, input")&&0<S.closest("label").length},bubbledIconClick:function(e){return 0<G(e.target).closest(I).length},alreadySetup:function(){return S.is("select")&&S.parent(w.dropdown).data(C)!==_&&0===S.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):R.transition&&R.transition("is animating")},leftward:function(e){return(e||R).hasClass(g.leftward)},clearable:function(){return S.hasClass(g.clearable)||m.clearable},disabled:function(){return S.hasClass(g.disabled)},focused:function(){return Z.activeElement===S[0]},focusedOnSearch:function(){return Z.activeElement===T[0]},allFiltered:function(){return(h.is.multiple()||h.has.search())&&!(0==m.hideAdditions&&h.has.userSuggestion())&&!h.has.message()&&h.has.allResultsFiltered()},hidden:function(e){return!h.is.visible(e)},initialLoad:function(){return e},inObject:function(n,e){var i=!1;return G.each(e,function(e,t){if(t==n)return i=!0}),i},multiple:function(){return S.hasClass(g.multiple)},remote:function(){return m.apiSettings&&h.can.useAPI()},single:function(){return!h.is.multiple()},selectMutation:function(e){var n=!1;return G.each(e,function(e,t){if(G(t.target).is("select")||G(t.addedNodes).is("select"))return!(n=!0)}),n},search:function(){return S.hasClass(g.search)},searchSelection:function(){return h.has.search()&&1===T.parent(w.dropdown).length},selection:function(){return S.hasClass(g.selection)},userValue:function(e){return-1!==G.inArray(e,h.get.userValues())},upward:function(e){return(e||S).hasClass(g.upward)},visible:function(e){return e?e.hasClass(g.visible):R.hasClass(g.visible)},verticallyScrollableContext:function(){var e=y.get(0)!==J&&y.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=y.get(0)!==J&&y.css("overflow-X");return"auto"==e||"scroll"==e}},can:{activate:function(e){return!!m.useLabels||(!h.has.maxSelections()||!(!h.has.maxSelections()||!e.hasClass(g.active)))},openDownward:function(e){var t,n,i=e||R,a=!0;return i.addClass(g.loading),n={context:{offset:y.get(0)===J?{top:0,left:0}:y.offset(),scrollTop:y.scrollTop(),height:y.outerHeight()},menu:{offset:i.offset(),height:i.outerHeight()}},h.is.verticallyScrollableContext()&&(n.menu.offset.top+=n.context.scrollTop),a=(t={above:n.context.scrollTop<=n.menu.offset.top-n.context.offset.top-n.menu.height,below:n.context.scrollTop+n.context.height>=n.menu.offset.top-n.context.offset.top+n.menu.height}).below?(h.verbose("Dropdown can fit in context downward",t),!0):t.below||t.above?(h.verbose("Dropdown cannot fit below, opening upward",t),!1):(h.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),i.removeClass(g.loading),a},openRightward:function(e){var t,n,i=e||R,a=!0;return i.addClass(g.loading),n={context:{offset:y.get(0)===J?{top:0,left:0}:y.offset(),scrollLeft:y.scrollLeft(),width:y.outerWidth()},menu:{offset:i.offset(),width:i.outerWidth()}},h.is.horizontallyScrollableContext()&&(n.menu.offset.left+=n.context.scrollLeft),(t=n.menu.offset.left-n.context.offset.left+n.menu.width>=n.context.scrollLeft+n.context.width)&&(h.verbose("Dropdown cannot fit in context rightward",t),a=!1),i.removeClass(g.loading),a},click:function(){return W||"click"==m.on},extendSelect:function(){return m.allowAdditions||m.apiSettings},show:function(){return!h.is.disabled()&&(h.has.items()||h.has.message())},useAPI:function(){return G.fn.api!==_}},animate:{show:function(e,t){var n,i=t||R,a=t?function(){}:function(){h.hideSubMenus(),h.hideOthers(),h.set.active()};e=G.isFunction(e)?e:function(){},h.verbose("Doing menu show animation",i),h.set.direction(t),n=h.get.transition(t),h.is.selection()&&h.set.scrollPosition(h.get.selectedItem(),!0),(h.is.hidden(i)||h.is.animating(i))&&("none"==n?(a(),i.transition("show"),e.call(P)):G.fn.transition!==_&&S.transition("is supported")?i.transition({animation:n+" in",debug:m.debug,verbose:m.verbose,duration:m.duration,queue:!0,onStart:a,onComplete:function(){e.call(P)}}):h.error(v.noTransition,n))},hide:function(e,t){var n=t||R,i=(t?m.duration:m.duration,t?function(){}:function(){h.can.click()&&h.unbind.intent(),h.remove.active()}),a=h.get.transition(t);e=G.isFunction(e)?e:function(){},(h.is.visible(n)||h.is.animating(n))&&(h.verbose("Doing menu hide animation",n),"none"==a?(i(),n.transition("hide"),e.call(P)):G.fn.transition!==_&&S.transition("is supported")?n.transition({animation:a+" out",duration:m.duration,debug:m.debug,verbose:m.verbose,queue:!1,onStart:i,onComplete:function(){e.call(P)}}):h.error(v.transition))}},hideAndClear:function(){h.remove.searchTerm(),h.has.maxSelections()||(h.has.search()?h.hide(function(){h.remove.filteredItem()}):h.hide())},delay:{show:function(){h.verbose("Delaying show event to ensure user intent"),clearTimeout(h.timer),h.timer=setTimeout(h.show,m.delay.show)},hide:function(){h.verbose("Delaying hide event to ensure user intent"),clearTimeout(h.timer),h.timer=setTimeout(h.hide,m.delay.hide)}},escape:{value:function(e){var t=G.isArray(e),n="string"==typeof e,i=!n&&!t,a=n&&-1!==e.search(d.quote),o=[];return i||!a?e:(h.debug("Encoding quote values for use in select",e),t?(G.each(e,function(e,t){o.push(t.replace(d.quote,"&quot;"))}),o):e.replace(d.quote,"&quot;"))},string:function(e){return(e=String(e)).replace(d.escape,"\\$&")}},setting:function(e,t){if(h.debug("Changing setting",e,t),G.isPlainObject(e))G.extend(!0,m,e);else{if(t===_)return m[e];G.isPlainObject(m[e])?G.extend(!0,m[e],t):m[e]=t}},internal:function(e,t){if(G.isPlainObject(e))G.extend(!0,h,e);else{if(t===_)return h[e];h[e]=t}},debug:function(){!m.silent&&m.debug&&(m.performance?h.performance.log(arguments):(h.debug=Function.prototype.bind.call(console.info,console,m.name+":"),h.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?h.performance.log(arguments):(h.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),h.verbose.apply(console,arguments)))},error:function(){m.silent||(h.error=Function.prototype.bind.call(console.error,console,m.name+":"),h.error.apply(console,arguments))},performance:{log:function(e){var t,n;m.performance&&(n=(t=(new Date).getTime())-(B||t),B=t,$.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:P,"Execution Time":n})),clearTimeout(h.performance.timer),h.performance.timer=setTimeout(h.performance.display,500)},display:function(){var e=m.name+":",n=0;B=!1,clearTimeout(h.performance.timer),G.each($,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",K&&(e+=" '"+K+"'"),(console.group!==_||console.table!==_)&&0<$.length&&(console.groupCollapsed(e),console.table?console.table($):G.each($,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),$=[]}},invoke:function(i,e,t){var a,o,n,s=z;return e=e||Y,t=P||t,"string"==typeof i&&s!==_&&(i=i.split(/[\. ]/),a=i.length-1,G.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(G.isPlainObject(s[n])&&e!=a)s=s[n];else{if(s[n]!==_)return o=s[n],!1;if(!G.isPlainObject(s[t])||e==a)return s[t]!==_?o=s[t]:h.error(v.method,i),!1;s=s[t]}})),G.isFunction(o)?n=o.apply(t,e):o!==_&&(n=o),G.isArray(U)?U.push(n):U!==_?U=[U,n]:n!==_&&(U=n),o}},X?(z===_&&h.initialize(),h.invoke(Q)):(z!==_&&z.invoke("destroy"),h.initialize())}),U!==_?U:j},G.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:J,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,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){},onLabelSelect:function(e){},onLabelCreate:function(e,t){return G(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>"},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",value:"value",text:"text",type:"type"},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:"> input.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered",clearIcon:"> .remove.icon"},className:{active:"active",addition:"addition",animating:"animating",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",upward:"upward",leftward:"left",visible:"visible",clearable:"clearable"}},G.fn.dropdown.settings.templates={dropdown:function(e){var t=e.placeholder||!1,n=(e.values,"");return n+='<i class="dropdown icon"></i>',e.placeholder?n+='<div class="default text">'+t+"</div>":n+='<div class="text"></div>',n+='<div class="menu">',G.each(e.values,function(e,t){n+=t.disabled?'<div class="disabled item" data-value="'+t.value+'">'+t.name+"</div>":'<div class="item" data-value="'+t.value+'">'+t.name+"</div>"}),n+="</div>"},menu:function(e,o){var t=e[o.values]||{},s="";return G.each(t,function(e,t){var n=t[o.type]?t[o.type]:"item";if("item"===n){var i=t[o.text]?'data-text="'+t[o.text]+'"':"",a=t[o.disabled]?"disabled ":"";s+='<div class="'+a+'item" data-value="'+t[o.value]+'"'+i+">",s+=t[o.name],s+="</div>"}else"header"===n&&(s+='<div class="header">',s+=t[o.name],s+="</div>")}),s},label:function(e,t){return t+'<i class="delete icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document);
!function(G,J,Z,_){"use strict";J=void 0!==J&&J.Math==Math?J:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),G.fn.dropdown=function(H){var N,U=G(this),j=G(Z),K=U.selector||"",W="ontouchstart"in Z.documentElement,B=(new Date).getTime(),$=[],Q=H,X="string"==typeof Q,Y=[].slice.call(arguments,1);return U.each(function(n){var e,t,i,a,o,s,r,h,m=G.isPlainObject(H)?G.extend(!0,{},G.fn.dropdown.settings,H):G.extend({},G.fn.dropdown.settings),g=m.className,c=m.message,l=m.fields,p=m.keys,b=m.metadata,u=m.namespace,d=m.regExp,w=m.selector,v=m.error,f=m.templates,x="."+u,C="module-"+u,S=G(this),y=G(m.context),A=S.find(w.text),T=S.find(w.search),k=S.find(w.sizer),I=S.find(w.input),L=S.find(w.icon),D=S.find(w.clearIcon),q=0<S.prev().find(w.text).length?S.prev().find(w.text):S.prev(),R=S.children(w.menu),O=R.find(w.item),V=m.hideDividers?O.parent().children(w.divider):G(),E=!1,M=!1,F=!1,P=this,z=S.data(C);h={initialize:function(){h.debug("Initializing dropdown",m),h.is.alreadySetup()?h.setup.reference():(h.setup.layout(),m.values&&h.change.values(m.values),h.refreshData(),h.save.defaults(),h.restore.selected(),h.create.id(),h.bind.events(),h.observeChanges(),h.instantiate())},instantiate:function(){h.verbose("Storing instance of dropdown",h),z=h,S.data(C,h)},destroy:function(){h.verbose("Destroying previous dropdown",S),h.remove.tabbable(),S.off(x).removeData(C),R.off(x),j.off(a),h.disconnect.menuObserver(),h.disconnect.selectObserver()},observeChanges:function(){"MutationObserver"in J&&(s=new MutationObserver(h.event.select.mutation),r=new MutationObserver(h.event.menu.mutation),h.debug("Setting up mutation observer",s,r),h.observe.select(),h.observe.menu())},disconnect:{menuObserver:function(){r&&r.disconnect()},selectObserver:function(){s&&s.disconnect()}},observe:{select:function(){h.has.input()&&s.observe(S[0],{childList:!0,subtree:!0})},menu:function(){h.has.menu()&&r.observe(R[0],{childList:!0,subtree:!0})}},create:{id:function(){o=(Math.random().toString(16)+"000000000").substr(2,8),a="."+o,h.verbose("Creating unique id for element",o)},userChoice:function(e){var n,i,a;return!!(e=e||h.get.userValues())&&(e=G.isArray(e)?e:[e],G.each(e,function(e,t){!1===h.get.item(t)&&(a=m.templates.addition(h.add.variables(c.addResult,t)),i=G("<div />").html(a).attr("data-"+b.value,t).attr("data-"+b.text,t).addClass(g.addition).addClass(g.item),m.hideAdditions&&i.addClass(g.hidden),n=n===_?i:n.add(i),h.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=h.get.userValues();t&&(h.debug("Adding user labels",t),G.each(t,function(e,t){h.verbose("Adding custom user value"),h.add.label(t,t)}))},menu:function(){R=G("<div />").addClass(g.menu).appendTo(S)},sizer:function(){k=G("<span />").addClass(g.sizer).insertAfter(T)}},search:function(e){e=e!==_?e:h.get.query(),h.verbose("Searching for query",e),h.has.minCharacters(e)?h.filter(e):h.hide()},select:{firstUnfiltered:function(){h.verbose("Selecting first non-filtered element"),h.remove.selectedItem(),O.not(w.unselectable).not(w.addition+w.hidden).eq(0).addClass(g.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(w.item).not(w.unselectable).eq(0),n=e.prevAll(w.item).not(w.unselectable).eq(0);0<t.length?(h.verbose("Moving selection to",t),t.addClass(g.selected)):(h.verbose("Moving selection to",n),n.addClass(g.selected))}},setup:{api:function(){var e={debug:m.debug,urlData:{value:h.get.value(),query:h.get.query()},on:!1};h.verbose("First request, initializing API"),S.api(e)},layout:function(){S.is("select")&&(h.setup.select(),h.setup.returnedObject()),h.has.menu()||h.create.menu(),h.is.selection()&&h.is.clearable()&&!h.has.clearItem()&&(h.verbose("Adding clear icon"),D=G("<i />").addClass("remove icon").insertBefore(A)),h.is.search()&&!h.has.search()&&(h.verbose("Adding search input"),T=G("<input />").addClass(g.search).prop("autocomplete","off").insertBefore(A)),h.is.multiple()&&h.is.searchSelection()&&!h.has.sizer()&&h.create.sizer(),m.allowTab&&h.set.tabbable()},select:function(){var e=h.get.selectValues();h.debug("Dropdown initialized on a select",e),S.is("select")&&(I=S),0<I.parent(w.dropdown).length?(h.debug("UI dropdown already exists. Creating dropdown menu only"),S=I.closest(w.dropdown),h.has.menu()||h.create.menu(),R=S.children(w.menu),h.setup.menu(e)):(h.debug("Creating entire dropdown from select"),S=G("<div />").attr("class",I.attr("class")).addClass(g.selection).addClass(g.dropdown).html(f.dropdown(e)).insertBefore(I),I.hasClass(g.multiple)&&!1===I.prop("multiple")&&(h.error(v.missingMultiple),I.prop("multiple",!0)),I.is("[multiple]")&&h.set.multiple(),I.prop("disabled")&&(h.debug("Disabling dropdown"),S.addClass(g.disabled)),I.removeAttr("class").detach().prependTo(S)),h.refresh()},menu:function(e){R.html(f.menu(e,l)),O=R.find(w.item),V=m.hideDividers?O.parent().children(w.divider):G()},reference:function(){h.debug("Dropdown behavior was called on select, replacing with closest dropdown"),S=S.parent(w.dropdown),z=S.data(C),P=S.get(0),h.refresh(),h.setup.returnedObject()},returnedObject:function(){var e=U.slice(0,n),t=U.slice(n+1);U=e.add(S).add(t)}},refresh:function(){h.refreshSelectors(),h.refreshData()},refreshItems:function(){O=R.find(w.item),V=m.hideDividers?O.parent().children(w.divider):G()},refreshSelectors:function(){h.verbose("Refreshing selector cache"),A=S.find(w.text),T=S.find(w.search),I=S.find(w.input),L=S.find(w.icon),q=0<S.prev().find(w.text).length?S.prev().find(w.text):S.prev(),R=S.children(w.menu),O=R.find(w.item),V=m.hideDividers?O.parent().children(w.divider):G()},refreshData:function(){h.verbose("Refreshing cached metadata"),O.removeData(b.text).removeData(b.value)},clearData:function(){h.verbose("Clearing metadata"),O.removeData(b.text).removeData(b.value),S.removeData(b.defaultText).removeData(b.defaultValue).removeData(b.placeholderText)},toggle:function(){h.verbose("Toggling menu visibility"),h.is.active()?h.hide():h.show()},show:function(e){if(e=G.isFunction(e)?e:function(){},!h.can.show()&&h.is.remote()&&(h.debug("No API results retrieved, searching before show"),h.queryRemote(h.get.query(),h.show)),h.can.show()&&!h.is.active()){if(h.debug("Showing dropdown"),!h.has.message()||h.has.maxSelections()||h.has.allResultsFiltered()||h.remove.message(),h.is.allFiltered())return!0;!1!==m.onShow.call(P)&&h.animate.show(function(){h.can.click()&&h.bind.intent(),h.has.search()&&h.focusSearch(),h.set.visible(),e.call(P)})}},hide:function(e){e=G.isFunction(e)?e:function(){},h.is.active()&&!h.is.animatingOutward()&&(h.debug("Hiding dropdown"),!1!==m.onHide.call(P)&&h.animate.hide(function(){h.remove.visible(),h.is.focusedOnSearch()&&T.blur(),e.call(P)}))},hideOthers:function(){h.verbose("Finding other dropdowns to hide"),U.not(S).has(w.menu+"."+g.visible).dropdown("hide")},hideMenu:function(){h.verbose("Hiding menu instantaneously"),h.remove.active(),h.remove.visible(),R.transition("hide")},hideSubMenus:function(){var e=R.children(w.item).find(w.menu);h.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){W&&h.bind.touchEvents(),h.bind.keyboardEvents(),h.bind.inputEvents(),h.bind.mouseEvents()},touchEvents:function(){h.debug("Touch device detected binding additional touch events"),h.is.searchSelection()||h.is.single()&&S.on("touchstart"+x,h.event.test.toggle),R.on("touchstart"+x,w.item,h.event.item.mouseenter)},keyboardEvents:function(){h.verbose("Binding keyboard events"),S.on("keydown"+x,h.event.keydown),h.has.search()&&S.on(h.get.inputEvent()+x,w.search,h.event.input),h.is.multiple()&&j.on("keydown"+a,h.event.document.keydown)},inputEvents:function(){h.verbose("Binding input change events"),S.on("change"+x,w.input,h.event.change)},mouseEvents:function(){h.verbose("Binding mouse events"),h.is.multiple()&&S.on("click"+x,w.label,h.event.label.click).on("click"+x,w.remove,h.event.remove.click),h.is.searchSelection()?(S.on("mousedown"+x,h.event.mousedown).on("mouseup"+x,h.event.mouseup).on("mousedown"+x,w.menu,h.event.menu.mousedown).on("mouseup"+x,w.menu,h.event.menu.mouseup).on("click"+x,w.icon,h.event.icon.click).on("click"+x,w.clearIcon,h.event.clearIcon.click).on("focus"+x,w.search,h.event.search.focus).on("click"+x,w.search,h.event.search.focus).on("blur"+x,w.search,h.event.search.blur).on("click"+x,w.text,h.event.text.focus),h.is.multiple()&&S.on("click"+x,h.event.click)):("click"==m.on?S.on("click"+x,w.icon,h.event.icon.click).on("click"+x,h.event.test.toggle):"hover"==m.on?S.on("mouseenter"+x,h.delay.show).on("mouseleave"+x,h.delay.hide):S.on(m.on+x,h.toggle),S.on("mousedown"+x,h.event.mousedown).on("mouseup"+x,h.event.mouseup).on("focus"+x,h.event.focus).on("click"+x,w.clearIcon,h.event.clearIcon.click),h.has.menuSearch()?S.on("blur"+x,w.search,h.event.search.blur):S.on("blur"+x,h.event.blur)),R.on("mouseenter"+x,w.item,h.event.item.mouseenter).on("mouseleave"+x,w.item,h.event.item.mouseleave).on("click"+x,w.item,h.event.item.click)},intent:function(){h.verbose("Binding hide intent event to document"),W&&j.on("touchstart"+a,h.event.test.touch).on("touchmove"+a,h.event.test.touch),j.on("click"+a,h.event.test.hide)}},unbind:{intent:function(){h.verbose("Removing hide intent event from document"),W&&j.off("touchstart"+a).off("touchmove"+a),j.off("click"+a)}},filter:function(e){var t=e!==_?e:h.get.query(),n=function(){h.is.multiple()&&h.filterActive(),(e||!e&&0==h.get.activeItem().length)&&h.select.firstUnfiltered(),h.has.allResultsFiltered()?m.onNoResults.call(P,t)?m.allowAdditions?m.hideAdditions&&(h.verbose("User addition with no menu, setting empty style"),h.set.empty(),h.hideMenu()):(h.verbose("All items filtered, showing message",t),h.add.message(c.noResults)):(h.verbose("All items filtered, hiding dropdown",t),h.hideMenu()):(h.remove.empty(),h.remove.message()),m.allowAdditions&&h.add.userSuggestion(e),h.is.searchSelection()&&h.can.show()&&h.is.focusedOnSearch()&&h.show()};m.useLabels&&h.has.maxSelections()||(m.apiSettings?h.can.useAPI()?h.queryRemote(t,function(){m.filterRemoteData&&h.filterItems(t),n()}):h.error(v.noAPI):(h.filterItems(t),n()))},queryRemote:function(e,n){var t={errorDuration:!1,cache:"local",throttle:m.throttle,urlData:{query:e},onError:function(){h.add.message(c.serverError),n()},onFailure:function(){h.add.message(c.serverError),n()},onSuccess:function(e){var t=e[l.remoteValues];G.isArray(t)&&0<t.length?(h.remove.message(),h.setup.menu({values:e[l.remoteValues]})):h.add.message(c.noResults),n()}};S.api("get request")||h.setup.api(),t=G.extend(!0,{},t,m.apiSettings),S.api("setting",t).api("query")},filterItems:function(e){var i=e!==_?e:h.get.query(),a=null,t=h.escape.string(i),o=new RegExp("^"+t,"igm");h.has.query()&&(a=[],h.verbose("Searching for matching values",i),O.each(function(){var e,t,n=G(this);if("both"==m.match||"text"==m.match){if(-1!==(e=String(h.get.choiceText(n,!1))).search(o))return a.push(this),!0;if("exact"===m.fullTextSearch&&h.exactSearch(i,e))return a.push(this),!0;if(!0===m.fullTextSearch&&h.fuzzySearch(i,e))return a.push(this),!0}if("both"==m.match||"value"==m.match){if(-1!==(t=String(h.get.choiceValue(n,e))).search(o))return a.push(this),!0;if("exact"===m.fullTextSearch&&h.exactSearch(i,t))return a.push(this),!0;if(!0===m.fullTextSearch&&h.fuzzySearch(i,t))return a.push(this),!0}})),h.debug("Showing only matched items",i),h.remove.filteredItem(),a&&O.not(a).addClass(g.filtered),h.has.query()?!0===m.hideDividers?V.addClass(g.hidden):"empty"===m.hideDividers&&V.removeClass(g.hidden).filter(function(){var e=G(this).nextUntil(w.item);return 0===(e.length?e:G(this)).nextUntil(w.divider).filter(w.item+":not(."+g.filtered+")").length}).addClass(g.hidden):V.removeClass(g.hidden)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=e.toLowerCase(),t=t.toLowerCase(),n<i)return!1;if(i===n)return e===t;e:for(var a=0,o=0;a<i;a++){for(var s=e.charCodeAt(a);o<n;)if(t.charCodeAt(o++)===s)continue e;return!1}return!0},exactSearch:function(e,t){return e=e.toLowerCase(),-1<(t=t.toLowerCase()).indexOf(e)},filterActive:function(){m.useLabels&&O.filter("."+g.active).addClass(g.filtered)},focusSearch:function(e){h.has.search()&&!h.is.focusedOnSearch()&&(e?(S.off("focus"+x,w.search),T.focus(),S.on("focus"+x,w.search,h.event.search.focus)):T.focus())},blurSearch:function(){h.has.search()&&T.blur()},forceSelection:function(){var e=O.not(g.filtered).filter("."+g.selected).eq(0),t=O.not(g.filtered).filter("."+g.active).eq(0),n=0<e.length?e:t;if(0<n.length&&!h.is.multiple())return h.debug("Forcing partial selection to selected item",n),void h.event.item.click.call(n,{},!0);m.allowAdditions&&h.set.selected(h.get.query()),h.remove.searchTerm()},change:{values:function(e){m.allowAdditions||h.clear(),h.debug("Creating dropdown with specified values",e),h.setup.menu({values:e}),G.each(e,function(e,t){if(1==t.selected)return h.debug("Setting initial selection to",t.value),h.set.selected(t.value),!0})}},event:{change:function(){F||(h.debug("Input changed, updating selection"),h.set.selected())},focus:function(){m.showOnFocus&&!E&&h.is.hidden()&&!t&&h.show()},blur:function(e){t=Z.activeElement===this,E||t||(h.remove.activeLabel(),h.hide())},mousedown:function(){h.is.searchSelection()?i=!0:E=!0},mouseup:function(){h.is.searchSelection()?i=!1:E=!1},click:function(e){G(e.target).is(S)&&(h.is.focusedOnSearch()?h.show():h.focusSearch())},search:{focus:function(){E=!0,h.is.multiple()&&h.remove.activeLabel(),(m.showOnFocus||"focus"!==event.type)&&h.search()},blur:function(e){t=Z.activeElement===this,h.is.searchSelection()&&!i&&(M||t||(m.forceSelection&&h.forceSelection(),h.hide())),i=!1}},clearIcon:{click:function(e){h.clear(),h.is.searchSelection()&&h.remove.searchTerm(),h.hide(),e.stopPropagation()}},icon:{click:function(e){h.has.search()?h.is.active()?h.blurSearch():m.showOnFocus?h.focusSearch():h.toggle():h.toggle()}},text:{focus:function(e){E=!0,h.focusSearch()}},input:function(e){(h.is.multiple()||h.is.searchSelection())&&h.set.filtered(),clearTimeout(h.timer),h.timer=setTimeout(h.search,m.delay.search)},label:{click:function(e){var t=G(this),n=S.find(w.label),i=n.filter("."+g.active),a=t.nextAll("."+g.active),o=t.prevAll("."+g.active),s=0<a.length?t.nextUntil(a).add(i).add(t):t.prevUntil(o).add(i).add(t);e.shiftKey?(i.removeClass(g.active),s.addClass(g.active)):e.ctrlKey?t.toggleClass(g.active):(i.removeClass(g.active),t.addClass(g.active)),m.onLabelSelect.apply(this,n.filter("."+g.active))}},remove:{click:function(){var e=G(this).parent();e.hasClass(g.active)?h.remove.activeLabels():h.remove.activeLabels(e)}},test:{toggle:function(e){var t=h.is.multiple()?h.show:h.toggle;h.is.bubbledLabelClick(e)||h.is.bubbledIconClick(e)||h.determine.eventOnElement(e,t)&&e.preventDefault()},touch:function(e){h.determine.eventOnElement(e,function(){"touchstart"==e.type?h.timer=setTimeout(function(){h.hide()},m.delay.touch):"touchmove"==e.type&&clearTimeout(h.timer)}),e.stopPropagation()},hide:function(e){h.determine.eventInModule(e,h.hide)&&e.preventDefault()}},select:{mutation:function(e){h.debug("<select> modified, recreating menu"),h.is.selectMutation(e)&&(h.disconnect.selectObserver(),h.refresh(),h.setup.select(),h.set.selected(),h.observe.select())}},menu:{mutation:function(e){var t=e[0],n=t.addedNodes?G(t.addedNodes[0]):G(!1),i=t.removedNodes?G(t.removedNodes[0]):G(!1),a=n.add(i),o=a.is(w.addition)||0<a.closest(w.addition).length,s=a.is(w.message)||0<a.closest(w.message).length;o||s?(h.debug("Updating item selector cache"),h.refreshItems()):(h.debug("Menu modified, updating selector cache"),h.refresh())},mousedown:function(){M=!0},mouseup:function(){M=!1}},item:{mouseenter:function(e){var t=G(e.target),n=G(this),i=n.children(w.menu),a=n.siblings(w.item).children(w.menu),o=0<i.length;!(0<i.find(t).length)&&o&&(clearTimeout(h.itemTimer),h.itemTimer=setTimeout(function(){h.verbose("Showing sub-menu",i),G.each(a,function(){h.animate.hide(!1,G(this))}),h.animate.show(!1,i)},m.delay.show),e.preventDefault())},mouseleave:function(e){var t=G(this).children(w.menu);0<t.length&&(clearTimeout(h.itemTimer),h.itemTimer=setTimeout(function(){h.verbose("Hiding sub-menu",t),h.animate.hide(!1,t)},m.delay.hide))},click:function(e,t){var n=G(this),i=G(e?e.target:""),a=n.find(w.menu),o=h.get.choiceText(n),s=h.get.choiceValue(n,o),r=0<a.length,l=0<a.find(i).length;h.has.search()&&Z.activeElement.isEqualNode(T[0])||G(Z.activeElement).blur(),l||r&&!m.allowCategorySelection||(h.is.searchSelection()&&(m.allowAdditions&&h.remove.userAddition(),h.remove.searchTerm(),h.is.focusedOnSearch()||1==t||h.focusSearch(!0)),m.useLabels||(h.remove.filteredItem(),h.set.scrollPosition(n)),h.determine.selectAction.call(this,o,s))}},document:{keydown:function(e){var t=e.which;if(h.is.inObject(t,p)){var n=S.find(w.label),i=n.filter("."+g.active),a=(i.data(b.value),n.index(i)),o=n.length,s=0<i.length,r=1<i.length,l=0===a,c=a+1==o,u=h.is.searchSelection(),d=h.is.focusedOnSearch(),v=h.is.focused(),f=d&&0===h.get.caretPosition();if(u&&!s&&!d)return;t==p.leftArrow?!v&&!f||s?s&&(e.shiftKey?h.verbose("Adding previous label to selection"):(h.verbose("Selecting previous label"),n.removeClass(g.active)),l&&!r?i.addClass(g.active):i.prev(w.siblingLabel).addClass(g.active).end(),e.preventDefault()):(h.verbose("Selecting previous label"),n.last().addClass(g.active)):t==p.rightArrow?(v&&!s&&n.first().addClass(g.active),s&&(e.shiftKey?h.verbose("Adding next label to selection"):(h.verbose("Selecting next label"),n.removeClass(g.active)),c?u?d?n.removeClass(g.active):h.focusSearch():r?i.next(w.siblingLabel).addClass(g.active):i.addClass(g.active):i.next(w.siblingLabel).addClass(g.active),e.preventDefault())):t==p.deleteKey||t==p.backspace?s?(h.verbose("Removing active labels"),c&&u&&!d&&h.focusSearch(),i.last().next(w.siblingLabel).addClass(g.active),h.remove.activeLabels(i),e.preventDefault()):f&&!s&&t==p.backspace&&(h.verbose("Removing last label on input backspace"),i=n.last().addClass(g.active),h.remove.activeLabels(i)):i.removeClass(g.active)}}},keydown:function(e){var t=e.which;if(h.is.inObject(t,p)){var n,i=O.not(w.unselectable).filter("."+g.selected).eq(0),a=R.children("."+g.active).eq(0),o=0<i.length?i:a,s=0<o.length?o.siblings(":not(."+g.filtered+")").addBack():R.children(":not(."+g.filtered+")"),r=o.children(w.menu),l=o.closest(w.menu),c=l.hasClass(g.visible)||l.hasClass(g.animating)||0<l.parent(w.menu).length,u=0<r.length,d=0<o.length,v=0<o.not(w.unselectable).length,f=t==p.delimiter&&m.allowAdditions&&h.is.multiple();if(m.allowAdditions&&m.hideAdditions&&(t==p.enter||f)&&v&&(h.verbose("Selecting item from keyboard shortcut",o),h.event.item.click.call(o,e),h.is.searchSelection()&&h.remove.searchTerm()),h.is.visible()){if((t==p.enter||f)&&(t==p.enter&&d&&u&&!m.allowCategorySelection?(h.verbose("Pressed enter on unselectable category, opening sub menu"),t=p.rightArrow):v&&(h.verbose("Selecting item from keyboard shortcut",o),h.event.item.click.call(o,e),h.is.searchSelection()&&(h.remove.searchTerm(),h.is.multiple()&&T.focus())),e.preventDefault()),d&&(t==p.leftArrow&&l[0]!==R[0]&&(h.verbose("Left key pressed, closing sub-menu"),h.animate.hide(!1,l),o.removeClass(g.selected),l.closest(w.item).addClass(g.selected),e.preventDefault()),t==p.rightArrow&&u&&(h.verbose("Right key pressed, opening sub-menu"),h.animate.show(!1,r),o.removeClass(g.selected),r.find(w.item).eq(0).addClass(g.selected),e.preventDefault())),t==p.upArrow){if(n=d&&c?o.prevAll(w.item+":not("+w.unselectable+")").eq(0):O.eq(0),s.index(n)<0)return h.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();h.verbose("Up key pressed, changing active item"),o.removeClass(g.selected),n.addClass(g.selected),h.set.scrollPosition(n),m.selectOnKeydown&&h.is.single()&&h.set.selectedItem(n),e.preventDefault()}if(t==p.downArrow){if(0===(n=d&&c?n=o.nextAll(w.item+":not("+w.unselectable+")").eq(0):O.eq(0)).length)return h.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();h.verbose("Down key pressed, changing active item"),O.removeClass(g.selected),n.addClass(g.selected),h.set.scrollPosition(n),m.selectOnKeydown&&h.is.single()&&h.set.selectedItem(n),e.preventDefault()}t==p.pageUp&&(h.scrollPage("up"),e.preventDefault()),t==p.pageDown&&(h.scrollPage("down"),e.preventDefault()),t==p.escape&&(h.verbose("Escape key pressed, closing dropdown"),h.hide())}else f&&e.preventDefault(),t!=p.downArrow||h.is.visible()||(h.verbose("Down key pressed, showing dropdown"),h.show(),e.preventDefault())}else h.has.search()||h.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e=Z.createEvent("HTMLEvents"),t=I[0];t&&(h.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){h.verbose("Determining action",m.action),G.isFunction(h.action[m.action])?(h.verbose("Triggering preset action",m.action,e,t),h.action[m.action].call(P,e,t,this)):G.isFunction(m.action)?(h.verbose("Triggering user action",m.action,e,t),m.action.call(P,e,t,this)):h.error(v.action,m.action)},eventInModule:function(e,t){var n=G(e.target),i=0<n.closest(Z.documentElement).length,a=0<n.closest(S).length;return t=G.isFunction(t)?t:function(){},i&&!a?(h.verbose("Triggering event",t),t(),!0):(h.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=G(e.target),i=n.closest(w.siblingLabel),a=Z.body.contains(e.target),o=0===S.find(i).length,s=0===n.closest(R).length;return t=G.isFunction(t)?t:function(){},a&&o&&s?(h.verbose("Triggering event",t),t(),!0):(h.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=t!==_?t:e,h.can.activate(G(n))&&(h.set.selected(t,G(n)),h.is.multiple()||h.hideAndClear())},select:function(e,t,n){t=t!==_?t:e,h.can.activate(G(n))&&(h.set.value(t,e,G(n)),h.is.multiple()||h.hideAndClear())},combo:function(e,t,n){t=t!==_?t:e,h.set.selected(t,G(n)),h.hideAndClear()},hide:function(e,t,n){h.set.value(t,e,G(n)),h.hideAndClear()}},get:{id:function(){return o},defaultText:function(){return S.data(b.defaultText)},defaultValue:function(){return S.data(b.defaultValue)},placeholderText:function(){return"auto"!=m.placeholder&&"string"==typeof m.placeholder?m.placeholder:S.data(b.placeholderText)||""},text:function(){return A.text()},query:function(){return G.trim(T.val())},searchWidth:function(e){return e=e!==_?e:T.val(),k.text(e),Math.ceil(k.width()+1)},selectionCount:function(){var e=h.get.values();return h.is.multiple()?G.isArray(e)?e.length:0:""!==h.get.value()?1:0},transition:function(e){return"auto"==m.transition?h.is.upward(e)?"slide up":"slide down":m.transition},userValues:function(){var e=h.get.values();return!!e&&(e=G.isArray(e)?e:[e],G.grep(e,function(e){return!1===h.get.item(e)}))},uniqueArray:function(n){return G.grep(n,function(e,t){return G.inArray(e,n)===t})},caretPosition:function(){var e,t,n=T.get(0);return"selectionStart"in n?n.selectionStart:Z.selection?(n.focus(),t=(e=Z.selection.createRange()).text.length,e.moveStart("character",-n.value.length),e.text.length-t):void 0},value:function(){var e=0<I.length?I.val():S.data(b.value),t=G.isArray(e)&&1===e.length&&""===e[0];return e===_||t?"":e},values:function(){var e=h.get.value();return""===e?"":!h.has.selectInput()&&h.is.multiple()?"string"==typeof e?e.split(m.delimiter):"":e},remoteValues:function(){var e=h.get.values(),i=!1;return e&&("string"==typeof e&&(e=[e]),G.each(e,function(e,t){var n=h.read.remoteData(t);h.verbose("Restoring value from session data",n,t),n&&(i||(i={}),i[t]=n)})),i},choiceText:function(e,t){if(t=t!==_?t:m.preserveHTML,e)return 0<e.find(w.menu).length&&(h.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(w.menu).remove(),e.find(w.menuIcon).remove()),e.data(b.text)!==_?e.data(b.text):t?G.trim(e.html()):G.trim(e.text())},choiceValue:function(e,t){return t=t||h.get.choiceText(e),!!e&&(e.data(b.value)!==_?String(e.data(b.value)):"string"==typeof t?G.trim(t.toLowerCase()):String(t))},inputEvent:function(){var e=T[0];return!!e&&(e.oninput!==_?"input":e.onpropertychange!==_?"propertychange":"keyup")},selectValues:function(){var a={values:[]};return S.find("option").each(function(){var e=G(this),t=e.html(),n=e.attr("disabled"),i=e.attr("value")!==_?e.attr("value"):t;"auto"===m.placeholder&&""===i?a.placeholder=t:a.values.push({name:t,value:i,disabled:n})}),m.placeholder&&"auto"!==m.placeholder&&(h.debug("Setting placeholder value to",m.placeholder),a.placeholder=m.placeholder),m.sortSelect?(!0===m.sortSelect?a.values.sort(function(e,t){return e.name>t.name?1:-1}):"natural"===m.sortSelect?a.values.sort(function(e,t){return e.name.toLowerCase()>t.name.toLowerCase()?1:-1}):G.isFunction(m.sortSelect)&&a.values.sort(m.sortSelect),h.debug("Retrieved and sorted values from select",a)):h.debug("Retrieved values from select",a),a},activeItem:function(){return O.filter("."+g.active)},selectedItem:function(){var e=O.not(w.unselectable).filter("."+g.selected);return 0<e.length?e:O.eq(0)},itemWithAdditions:function(e){var t=h.get.item(e),n=h.create.userChoice(e);return n&&0<n.length&&(t=0<t.length?t.add(n):n),t},item:function(i,a){var e,o,s=!1;return i=i!==_?i:h.get.values()!==_?h.get.values():h.get.text(),e=o?0<i.length:i!==_&&null!==i,o=h.is.multiple()&&G.isArray(i),a=""===i||0===i||(a||!1),e&&O.each(function(){var e=G(this),t=h.get.choiceText(e),n=h.get.choiceValue(e,t);if(null!==n&&n!==_)if(o)-1!==G.inArray(String(n),i)&&(s=s?s.add(e):e);else if(a){if(h.verbose("Ambiguous dropdown value using strict type check",e,i),n===i)return s=e,!0}else if(String(n)==String(i))return h.verbose("Found select item by value",n,i),s=e,!0}),s}},check:{maxSelections:function(e){return!m.maxSelections||((e=e!==_?e:h.get.selectionCount())>=m.maxSelections?(h.debug("Maximum selection count reached"),m.useLabels&&(O.addClass(g.filtered),h.add.message(c.maxSelections)),!0):(h.verbose("No longer at maximum selection count"),h.remove.message(),h.remove.filteredItem(),h.is.searchSelection()&&h.filterItems(),!1))}},restore:{defaults:function(){h.clear(),h.restore.defaultText(),h.restore.defaultValue()},defaultText:function(){var e=h.get.defaultText();e===h.get.placeholderText?(h.debug("Restoring default placeholder text",e),h.set.placeholderText(e)):(h.debug("Restoring default text",e),h.set.text(e))},placeholderText:function(){h.set.placeholderText()},defaultValue:function(){var e=h.get.defaultValue();e!==_&&(h.debug("Restoring default value",e),""!==e?(h.set.value(e),h.set.selected()):(h.remove.activeItem(),h.remove.selectedItem()))},labels:function(){m.allowAdditions&&(m.useLabels||(h.error(v.labels),m.useLabels=!0),h.debug("Restoring selected values"),h.create.userLabels()),h.check.maxSelections()},selected:function(){h.restore.values(),h.is.multiple()?(h.debug("Restoring previously selected values and labels"),h.restore.labels()):h.debug("Restoring previously selected values")},values:function(){h.set.initialLoad(),m.apiSettings&&m.saveRemoteData&&h.get.remoteValues()?h.restore.remoteValues():h.set.selected(),h.remove.initialLoad()},remoteValues:function(){var e=h.get.remoteValues();h.debug("Recreating selected from session data",e),e&&(h.is.single()?G.each(e,function(e,t){h.set.text(t)}):G.each(e,function(e,t){h.add.label(e,t)}))}},read:{remoteData:function(e){var t;if(J.Storage!==_)return(t=sessionStorage.getItem(e))!==_&&t;h.error(v.noStorage)}},save:{defaults:function(){h.save.defaultText(),h.save.placeholderText(),h.save.defaultValue()},defaultValue:function(){var e=h.get.value();h.verbose("Saving default value as",e),S.data(b.defaultValue,e)},defaultText:function(){var e=h.get.text();h.verbose("Saving default text as",e),S.data(b.defaultText,e)},placeholderText:function(){var e;!1!==m.placeholder&&A.hasClass(g.placeholder)&&(e=h.get.text(),h.verbose("Saving placeholder text as",e),S.data(b.placeholderText,e))},remoteData:function(e,t){J.Storage!==_?(h.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e)):h.error(v.noStorage)}},clear:function(){h.is.multiple()&&m.useLabels?h.remove.labels():(h.remove.activeItem(),h.remove.selectedItem(),h.remove.filteredItem()),h.set.placeholderText(),h.clearValue()},clearValue:function(){h.set.value("")},scrollPage:function(e,t){var n,i,a=t||h.get.selectedItem(),o=a.closest(w.menu),s=o.outerHeight(),r=o.scrollTop(),l=O.eq(0).outerHeight(),c=Math.floor(s/l),u=(o.prop("scrollHeight"),"up"==e?r-l*c:r+l*c),d=O.not(w.unselectable);i="up"==e?d.index(a)-c:d.index(a)+c,0<(n=("up"==e?0<=i:i<d.length)?d.eq(i):"up"==e?d.first():d.last()).length&&(h.debug("Scrolling page",e,n),a.removeClass(g.selected),n.addClass(g.selected),m.selectOnKeydown&&h.is.single()&&h.set.selectedItem(n),o.scrollTop(u))},set:{filtered:function(){var e=h.is.multiple(),t=h.is.searchSelection(),n=e&&t,i=t?h.get.query():"",a="string"==typeof i&&0<i.length,o=h.get.searchWidth(),s=""!==i;e&&a&&(h.verbose("Adjusting input width",o,m.glyphWidth),T.css("width",o)),a||n&&s?(h.verbose("Hiding placeholder text"),A.addClass(g.filtered)):(!e||n&&!s)&&(h.verbose("Showing placeholder text"),A.removeClass(g.filtered))},empty:function(){S.addClass(g.empty)},loading:function(){S.addClass(g.loading)},placeholderText:function(e){e=e||h.get.placeholderText(),h.debug("Setting placeholder text",e),h.set.text(e),A.addClass(g.placeholder)},tabbable:function(){h.is.searchSelection()?(h.debug("Added tabindex to searchable dropdown"),T.val("").attr("tabindex",0),R.attr("tabindex",-1)):(h.debug("Added tabindex to dropdown"),S.attr("tabindex")===_&&(S.attr("tabindex",0),R.attr("tabindex",-1)))},initialLoad:function(){h.verbose("Setting initial load"),e=!0},activeItem:function(e){m.allowAdditions&&0<e.filter(w.addition).length?e.addClass(g.filtered):e.addClass(g.active)},partialSearch:function(e){var t=h.get.query().length;T.val(e.substr(0,t))},scrollPosition:function(e,t){var n,i,a,o,s,r;n=(e=e||h.get.selectedItem()).closest(w.menu),i=e&&0<e.length,t=t!==_&&t,e&&0<n.length&&i&&(e.position().top,n.addClass(g.loading),a=(o=n.scrollTop())-n.offset().top+e.offset().top,t||(r=o+n.height()<a+5,s=a-5<o),h.debug("Scrolling to active item",a),(t||s||r)&&n.scrollTop(a),n.removeClass(g.loading))},text:function(e){"combo"===m.action?(h.debug("Changing combo button text",e,q),m.preserveHTML?q.html(e):q.text(e)):"activate"===m.action&&(e!==h.get.placeholderText()&&A.removeClass(g.placeholder),h.debug("Changing text",e,A),A.removeClass(g.filtered),m.preserveHTML?A.html(e):A.text(e))},selectedItem:function(e){var t=h.get.choiceValue(e),n=h.get.choiceText(e,!1),i=h.get.choiceText(e,!0);h.debug("Setting user selection to item",e),h.remove.activeItem(),h.set.partialSearch(n),h.set.activeItem(e),h.set.selected(t,e),h.set.text(i)},selectedLetter:function(e){var t,n=O.filter("."+g.selected),i=0<n.length&&h.has.firstLetter(n,e),a=!1;i&&(t=n.nextAll(O).eq(0),h.has.firstLetter(t,e)&&(a=t)),a||O.each(function(){if(h.has.firstLetter(G(this),e))return a=G(this),!1}),a&&(h.verbose("Scrolling to next value with letter",e),h.set.scrollPosition(a),n.removeClass(g.selected),a.addClass(g.selected),m.selectOnKeydown&&h.is.single()&&h.set.selectedItem(a))},direction:function(e){"auto"==m.direction?(h.remove.upward(),h.can.openDownward(e)?h.remove.upward(e):h.set.upward(e),h.is.leftward(e)||h.can.openRightward(e)||h.set.leftward(e)):"upward"==m.direction&&h.set.upward(e)},upward:function(e){(e||S).addClass(g.upward)},leftward:function(e){(e||R).addClass(g.leftward)},value:function(e,t,n){var i=h.escape.value(e),a=0<I.length,o=h.get.values(),s=e!==_?String(e):e;if(a){if(!m.allowReselection&&s==o&&(h.verbose("Skipping value update already same value",e,o),!h.is.initialLoad()))return;h.is.single()&&h.has.selectInput()&&h.can.extendSelect()&&(h.debug("Adding user option",e),h.add.optionValue(e)),h.debug("Updating input value",i,o),F=!0,I.val(i),!1===m.fireOnInit&&h.is.initialLoad()?h.debug("Input native change event ignored on initial load"):h.trigger.change(),F=!1}else h.verbose("Storing value in metadata",i,I),i!==o&&S.data(b.value,s);!1===m.fireOnInit&&h.is.initialLoad()?h.verbose("No callback on initial load",m.onChange):m.onChange.call(P,e,t,n)},active:function(){S.addClass(g.active)},multiple:function(){S.addClass(g.multiple)},visible:function(){S.addClass(g.visible)},exactly:function(e,t){h.debug("Setting selected to exact values"),h.clear(),h.set.selected(e,t)},selected:function(e,r){var l=h.is.multiple();(r=m.allowAdditions?r||h.get.itemWithAdditions(e):r||h.get.item(e))&&(h.debug("Setting selected menu item to",r),h.is.multiple()&&h.remove.searchWidth(),h.is.single()?(h.remove.activeItem(),h.remove.selectedItem()):m.useLabels&&h.remove.selectedItem(),r.each(function(){var e=G(this),t=h.get.choiceText(e),n=h.get.choiceValue(e,t),i=e.hasClass(g.filtered),a=e.hasClass(g.active),o=e.hasClass(g.addition),s=l&&1==r.length;l?!a||o?(m.apiSettings&&m.saveRemoteData&&h.save.remoteData(t,n),m.useLabels?(h.add.label(n,t,s),h.add.value(n,t,e),h.set.activeItem(e),h.filterActive(),h.select.nextAvailable(r)):(h.add.value(n,t,e),h.set.text(h.add.variables(c.count)),h.set.activeItem(e))):i||(h.debug("Selected active value, removing label"),h.remove.selected(n)):(m.apiSettings&&m.saveRemoteData&&h.save.remoteData(t,n),h.set.text(t),h.set.value(n,t,e),e.addClass(g.active).addClass(g.selected))}))}},add:{label:function(e,t,n){var i,a=h.is.searchSelection()?T:A,o=h.escape.value(e);m.ignoreCase&&(o=o.toLowerCase()),i=G("<a />").addClass(g.label).attr("data-"+b.value,o).html(f.label(o,t)),i=m.onLabelCreate.call(i,o,t),h.has.label(e)?h.debug("User selection already exists, skipping",o):(m.label.variation&&i.addClass(m.label.variation),!0===n?(h.debug("Animating in label",i),i.addClass(g.hidden).insertBefore(a).transition(m.label.transition,m.label.duration)):(h.debug("Adding selection label",i),i.insertBefore(a)))},message:function(e){var t=R.children(w.message),n=m.templates.message(h.add.variables(e));0<t.length?t.html(n):t=G("<div/>").html(n).addClass(g.message).appendTo(R)},optionValue:function(e){var t=h.escape.value(e);0<I.find('option[value="'+h.escape.string(t)+'"]').length||(h.disconnect.selectObserver(),h.is.single()&&(h.verbose("Removing previous user addition"),I.find("option."+g.addition).remove()),G("<option/>").prop("value",t).addClass(g.addition).html(e).appendTo(I),h.verbose("Adding user addition as an <option>",e),h.observe.select())},userSuggestion:function(e){var t,n=R.children(w.addition),i=h.get.item(e),a=i&&i.not(w.addition).length,o=0<n.length;m.useLabels&&h.has.maxSelections()||(""===e||a?n.remove():(o?(n.data(b.value,e).data(b.text,e).attr("data-"+b.value,e).attr("data-"+b.text,e).removeClass(g.filtered),m.hideAdditions||(t=m.templates.addition(h.add.variables(c.addResult,e)),n.html(t)),h.verbose("Replacing user suggestion with new value",n)):((n=h.create.userChoice(e)).prependTo(R),h.verbose("Adding item choice to menu corresponding with user choice addition",n)),m.hideAdditions&&!h.is.allFiltered()||n.addClass(g.selected).siblings().removeClass(g.selected),h.refreshItems()))},variables:function(e,t){var n,i,a=-1!==e.search("{count}"),o=-1!==e.search("{maxCount}"),s=-1!==e.search("{term}");return h.verbose("Adding templated variables to message",e),a&&(n=h.get.selectionCount(),e=e.replace("{count}",n)),o&&(n=h.get.selectionCount(),e=e.replace("{maxCount}",m.maxSelections)),s&&(i=t||h.get.query(),e=e.replace("{term}",i)),e},value:function(e,t,n){var i,a=h.get.values();h.has.value(e)?h.debug("Value already selected"):""!==e?(i=G.isArray(a)?(i=a.concat([e]),h.get.uniqueArray(i)):[e],h.has.selectInput()?h.can.extendSelect()&&(h.debug("Adding value to select",e,i,I),h.add.optionValue(e)):(i=i.join(m.delimiter),h.debug("Setting hidden input to delimited value",i,I)),!1===m.fireOnInit&&h.is.initialLoad()?h.verbose("Skipping onadd callback on initial load",m.onAdd):m.onAdd.call(P,e,t,n),h.set.value(i,e,t,n),h.check.maxSelections()):h.debug("Cannot select blank values from multiselect")}},remove:{active:function(){S.removeClass(g.active)},activeLabel:function(){S.find(w.label).removeClass(g.active)},empty:function(){S.removeClass(g.empty)},loading:function(){S.removeClass(g.loading)},initialLoad:function(){e=!1},upward:function(e){(e||S).removeClass(g.upward)},leftward:function(e){(e||R).removeClass(g.leftward)},visible:function(){S.removeClass(g.visible)},activeItem:function(){O.removeClass(g.active)},filteredItem:function(){m.useLabels&&h.has.maxSelections()||(m.useLabels&&h.is.multiple()?O.not("."+g.active).removeClass(g.filtered):O.removeClass(g.filtered),m.hideDividers&&V.removeClass(g.hidden),h.remove.empty())},optionValue:function(e){var t=h.escape.value(e),n=I.find('option[value="'+h.escape.string(t)+'"]');0<n.length&&n.hasClass(g.addition)&&(s&&(s.disconnect(),h.verbose("Temporarily disconnecting mutation observer")),n.remove(),h.verbose("Removing user addition as an <option>",t),s&&s.observe(I[0],{childList:!0,subtree:!0}))},message:function(){R.children(w.message).remove()},searchWidth:function(){T.css("width","")},searchTerm:function(){h.verbose("Cleared search term"),T.val(""),h.set.filtered()},userAddition:function(){O.filter(w.addition).remove()},selected:function(e,t){if(!(t=m.allowAdditions?t||h.get.itemWithAdditions(e):t||h.get.item(e)))return!1;t.each(function(){var e=G(this),t=h.get.choiceText(e),n=h.get.choiceValue(e,t);h.is.multiple()?m.useLabels?(h.remove.value(n,t,e),h.remove.label(n)):(h.remove.value(n,t,e),0===h.get.selectionCount()?h.set.placeholderText():h.set.text(h.add.variables(c.count))):h.remove.value(n,t,e),e.removeClass(g.filtered).removeClass(g.active),m.useLabels&&e.removeClass(g.selected)})},selectedItem:function(){O.removeClass(g.selected)},value:function(e,t,n){var i,a=h.get.values();h.has.selectInput()?(h.verbose("Input is <select> removing selected option",e),i=h.remove.arrayValue(e,a),h.remove.optionValue(e)):(h.verbose("Removing from delimited values",e),i=(i=h.remove.arrayValue(e,a)).join(m.delimiter)),!1===m.fireOnInit&&h.is.initialLoad()?h.verbose("No callback on initial load",m.onRemove):m.onRemove.call(P,e,t,n),h.set.value(i,t,n),h.check.maxSelections()},arrayValue:function(t,e){return G.isArray(e)||(e=[e]),e=G.grep(e,function(e){return t!=e}),h.verbose("Removed value from delimited string",t,e),e},label:function(e,t){var n=S.find(w.label).filter("[data-"+b.value+'="'+h.escape.string(e)+'"]');h.verbose("Removing label",n),n.remove()},activeLabels:function(e){e=e||S.find(w.label).filter("."+g.active),h.verbose("Removing active label selections",e),h.remove.labels(e)},labels:function(e){e=e||S.find(w.label),h.verbose("Removing labels",e),e.each(function(){var e=G(this),t=e.data(b.value),n=t!==_?String(t):t,i=h.is.userValue(n);!1!==m.onLabelRemove.call(e,t)?(h.remove.message(),i?(h.remove.value(n),h.remove.label(n)):h.remove.selected(n)):h.debug("Label remove callback cancelled removal")})},tabbable:function(){h.is.searchSelection()?(h.debug("Searchable dropdown initialized"),T.removeAttr("tabindex")):(h.debug("Simple selection dropdown initialized"),S.removeAttr("tabindex")),R.removeAttr("tabindex")}},has:{menuSearch:function(){return h.has.search()&&0<T.closest(R).length},clearItem:function(){return 0<D.length},search:function(){return 0<T.length},sizer:function(){return 0<k.length},selectInput:function(){return I.is("select")},minCharacters:function(e){return!m.minCharacters||(e=e!==_?String(e):String(h.get.query())).length>=m.minCharacters},firstLetter:function(e,t){var n;return!(!e||0===e.length||"string"!=typeof t)&&(n=h.get.choiceText(e,!1),(t=t.toLowerCase())==String(n).charAt(0).toLowerCase())},input:function(){return 0<I.length},items:function(){return 0<O.length},menu:function(){return 0<R.length},message:function(){return 0!==R.children(w.message).length},label:function(e){var t=h.escape.value(e),n=S.find(w.label);return m.ignoreCase&&(t=t.toLowerCase()),0<n.filter("[data-"+b.value+'="'+h.escape.string(t)+'"]').length},maxSelections:function(){return m.maxSelections&&h.get.selectionCount()>=m.maxSelections},allResultsFiltered:function(){var e=O.not(w.addition);return e.filter(w.unselectable).length===e.length},userSuggestion:function(){return 0<R.children(w.addition).length},query:function(){return""!==h.get.query()},value:function(e){return m.ignoreCase?h.has.valueIgnoringCase(e):h.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=h.get.values();return!!(G.isArray(t)?t&&-1!==G.inArray(e,t):t==e)},valueIgnoringCase:function(n){var e=h.get.values(),i=!1;return G.isArray(e)||(e=[e]),G.each(e,function(e,t){if(String(n).toLowerCase()==String(t).toLowerCase())return!(i=!0)}),i}},is:{active:function(){return S.hasClass(g.active)},animatingInward:function(){return R.transition("is inward")},animatingOutward:function(){return R.transition("is outward")},bubbledLabelClick:function(e){return G(e.target).is("select, input")&&0<S.closest("label").length},bubbledIconClick:function(e){return 0<G(e.target).closest(L).length},alreadySetup:function(){return S.is("select")&&S.parent(w.dropdown).data(C)!==_&&0===S.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):R.transition&&R.transition("is animating")},leftward:function(e){return(e||R).hasClass(g.leftward)},clearable:function(){return S.hasClass(g.clearable)||m.clearable},disabled:function(){return S.hasClass(g.disabled)},focused:function(){return Z.activeElement===S[0]},focusedOnSearch:function(){return Z.activeElement===T[0]},allFiltered:function(){return(h.is.multiple()||h.has.search())&&!(0==m.hideAdditions&&h.has.userSuggestion())&&!h.has.message()&&h.has.allResultsFiltered()},hidden:function(e){return!h.is.visible(e)},initialLoad:function(){return e},inObject:function(n,e){var i=!1;return G.each(e,function(e,t){if(t==n)return i=!0}),i},multiple:function(){return S.hasClass(g.multiple)},remote:function(){return m.apiSettings&&h.can.useAPI()},single:function(){return!h.is.multiple()},selectMutation:function(e){var n=!1;return G.each(e,function(e,t){if(G(t.target).is("select")||G(t.addedNodes).is("select"))return!(n=!0)}),n},search:function(){return S.hasClass(g.search)},searchSelection:function(){return h.has.search()&&1===T.parent(w.dropdown).length},selection:function(){return S.hasClass(g.selection)},userValue:function(e){return-1!==G.inArray(e,h.get.userValues())},upward:function(e){return(e||S).hasClass(g.upward)},visible:function(e){return e?e.hasClass(g.visible):R.hasClass(g.visible)},verticallyScrollableContext:function(){var e=y.get(0)!==J&&y.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=y.get(0)!==J&&y.css("overflow-X");return"auto"==e||"scroll"==e}},can:{activate:function(e){return!!m.useLabels||(!h.has.maxSelections()||!(!h.has.maxSelections()||!e.hasClass(g.active)))},openDownward:function(e){var t,n,i=e||R,a=!0;return i.addClass(g.loading),n={context:{offset:y.get(0)===J?{top:0,left:0}:y.offset(),scrollTop:y.scrollTop(),height:y.outerHeight()},menu:{offset:i.offset(),height:i.outerHeight()}},h.is.verticallyScrollableContext()&&(n.menu.offset.top+=n.context.scrollTop),a=(t={above:n.context.scrollTop<=n.menu.offset.top-n.context.offset.top-n.menu.height,below:n.context.scrollTop+n.context.height>=n.menu.offset.top-n.context.offset.top+n.menu.height}).below?(h.verbose("Dropdown can fit in context downward",t),!0):t.below||t.above?(h.verbose("Dropdown cannot fit below, opening upward",t),!1):(h.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),i.removeClass(g.loading),a},openRightward:function(e){var t,n,i=e||R,a=!0;return i.addClass(g.loading),n={context:{offset:y.get(0)===J?{top:0,left:0}:y.offset(),scrollLeft:y.scrollLeft(),width:y.outerWidth()},menu:{offset:i.offset(),width:i.outerWidth()}},h.is.horizontallyScrollableContext()&&(n.menu.offset.left+=n.context.scrollLeft),(t=n.menu.offset.left-n.context.offset.left+n.menu.width>=n.context.scrollLeft+n.context.width)&&(h.verbose("Dropdown cannot fit in context rightward",t),a=!1),i.removeClass(g.loading),a},click:function(){return W||"click"==m.on},extendSelect:function(){return m.allowAdditions||m.apiSettings},show:function(){return!h.is.disabled()&&(h.has.items()||h.has.message())},useAPI:function(){return G.fn.api!==_}},animate:{show:function(e,t){var n,i=t||R,a=t?function(){}:function(){h.hideSubMenus(),h.hideOthers(),h.set.active()};e=G.isFunction(e)?e:function(){},h.verbose("Doing menu show animation",i),h.set.direction(t),n=h.get.transition(t),h.is.selection()&&h.set.scrollPosition(h.get.selectedItem(),!0),(h.is.hidden(i)||h.is.animating(i))&&("none"==n?(a(),i.transition("show"),e.call(P)):G.fn.transition!==_&&S.transition("is supported")?i.transition({animation:n+" in",debug:m.debug,verbose:m.verbose,duration:m.duration,queue:!0,onStart:a,onComplete:function(){e.call(P)}}):h.error(v.noTransition,n))},hide:function(e,t){var n=t||R,i=(t?m.duration:m.duration,t?function(){}:function(){h.can.click()&&h.unbind.intent(),h.remove.active()}),a=h.get.transition(t);e=G.isFunction(e)?e:function(){},(h.is.visible(n)||h.is.animating(n))&&(h.verbose("Doing menu hide animation",n),"none"==a?(i(),n.transition("hide"),e.call(P)):G.fn.transition!==_&&S.transition("is supported")?n.transition({animation:a+" out",duration:m.duration,debug:m.debug,verbose:m.verbose,queue:!1,onStart:i,onComplete:function(){e.call(P)}}):h.error(v.transition))}},hideAndClear:function(){h.remove.searchTerm(),h.has.maxSelections()||(h.has.search()?h.hide(function(){h.remove.filteredItem()}):h.hide())},delay:{show:function(){h.verbose("Delaying show event to ensure user intent"),clearTimeout(h.timer),h.timer=setTimeout(h.show,m.delay.show)},hide:function(){h.verbose("Delaying hide event to ensure user intent"),clearTimeout(h.timer),h.timer=setTimeout(h.hide,m.delay.hide)}},escape:{value:function(e){var t=G.isArray(e),n="string"==typeof e,i=!n&&!t,a=n&&-1!==e.search(d.quote),o=[];return i||!a?e:(h.debug("Encoding quote values for use in select",e),t?(G.each(e,function(e,t){o.push(t.replace(d.quote,"&quot;"))}),o):e.replace(d.quote,"&quot;"))},string:function(e){return(e=String(e)).replace(d.escape,"\\$&")}},setting:function(e,t){if(h.debug("Changing setting",e,t),G.isPlainObject(e))G.extend(!0,m,e);else{if(t===_)return m[e];G.isPlainObject(m[e])?G.extend(!0,m[e],t):m[e]=t}},internal:function(e,t){if(G.isPlainObject(e))G.extend(!0,h,e);else{if(t===_)return h[e];h[e]=t}},debug:function(){!m.silent&&m.debug&&(m.performance?h.performance.log(arguments):(h.debug=Function.prototype.bind.call(console.info,console,m.name+":"),h.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?h.performance.log(arguments):(h.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),h.verbose.apply(console,arguments)))},error:function(){m.silent||(h.error=Function.prototype.bind.call(console.error,console,m.name+":"),h.error.apply(console,arguments))},performance:{log:function(e){var t,n;m.performance&&(n=(t=(new Date).getTime())-(B||t),B=t,$.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:P,"Execution Time":n})),clearTimeout(h.performance.timer),h.performance.timer=setTimeout(h.performance.display,500)},display:function(){var e=m.name+":",n=0;B=!1,clearTimeout(h.performance.timer),G.each($,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",K&&(e+=" '"+K+"'"),(console.group!==_||console.table!==_)&&0<$.length&&(console.groupCollapsed(e),console.table?console.table($):G.each($,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),$=[]}},invoke:function(i,e,t){var a,o,n,s=z;return e=e||Y,t=P||t,"string"==typeof i&&s!==_&&(i=i.split(/[\. ]/),a=i.length-1,G.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(G.isPlainObject(s[n])&&e!=a)s=s[n];else{if(s[n]!==_)return o=s[n],!1;if(!G.isPlainObject(s[t])||e==a)return s[t]!==_?o=s[t]:h.error(v.method,i),!1;s=s[t]}})),G.isFunction(o)?n=o.apply(t,e):o!==_&&(n=o),G.isArray(N)?N.push(n):N!==_?N=[N,n]:n!==_&&(N=n),o}},X?(z===_&&h.initialize(),h.invoke(Q)):(z!==_&&z.invoke("destroy"),h.initialize())}),N!==_?N:U},G.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:J,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,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){},onLabelSelect:function(e){},onLabelCreate:function(e,t){return G(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>"},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",value:"value",text:"text",type:"type"},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:"> input.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered",clearIcon:"> .remove.icon"},className:{active:"active",addition:"addition",animating:"animating",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",upward:"upward",leftward:"left",visible:"visible",clearable:"clearable"}},G.fn.dropdown.settings.templates={dropdown:function(e){var t=e.placeholder||!1,n=(e.values,"");return n+='<i class="dropdown icon"></i>',e.placeholder?n+='<div class="default text">'+t+"</div>":n+='<div class="text"></div>',n+='<div class="menu">',G.each(e.values,function(e,t){n+=t.disabled?'<div class="disabled item" data-value="'+t.value+'">'+t.name+"</div>":'<div class="item" data-value="'+t.value+'">'+t.name+"</div>"}),n+="</div>"},menu:function(e,o){var t=e[o.values]||{},s="";return G.each(t,function(e,t){var n=t[o.type]?t[o.type]:"item";if("item"===n){var i=t[o.text]?'data-text="'+t[o.text]+'"':"",a=t[o.disabled]?"disabled ":"";s+='<div class="'+a+'item" data-value="'+t[o.value]+'"'+i+">",s+=t[o.name],s+="</div>"}else"header"===n&&(s+='<div class="header">',s+=t[o.name],s+="</div>")}),s},label:function(e,t){return t+'<i class="delete icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document);
/*!
* # Semantic UI 2.6.3 - Embed
* # Semantic UI 2.6.4 - Embed
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Form Validation
* # Semantic UI 2.6.4 - Form Validation
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Modal
* # Semantic UI 2.6.4 - Modal
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Nag
* # Semantic UI 2.6.4 - Nag
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Popup
* # Semantic UI 2.6.4 - Popup
* http://github.com/semantic-org/semantic-ui/

@@ -418,3 +418,3 @@ *

svg: function() {
return (typeof SVGGraphicsElement === 'undefined');
return (typeof SVGGraphicsElement !== 'undefined');
}

@@ -421,0 +421,0 @@ },

@@ -1,1 +0,1 @@

!function(N,V,W,M){"use strict";V=void 0!==V&&V.Math==Math?V:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),N.fn.popup=function(x){var k,t=N(this),E=N(W),S=N(V),A=N("body"),F=t.selector||"",O=(new Date).getTime(),D=[],j=x,H="string"==typeof j,R=[].slice.call(arguments,1);return t.each(function(){var u,p,t,e,o,c,d=N.isPlainObject(x)?N.extend(!0,{},N.fn.popup.settings,x):N.extend({},N.fn.popup.settings),i=d.selector,f=d.className,g=d.error,h=d.metadata,n=d.namespace,r="."+d.namespace,a="module-"+n,m=N(this),s=N(d.context),l=N(d.scrollContext),v=N(d.boundary),b=d.target?N(d.target):m,w=0,y=!1,P=!1,C=this,T=m.data(a);c={initialize:function(){c.debug("Initializing",m),c.createID(),c.bind.events(),!c.exists()&&d.preserve&&c.create(),d.observeChanges&&c.observeChanges(),c.instantiate()},instantiate:function(){c.verbose("Storing instance",c),T=c,m.data(a,T)},observeChanges:function(){"MutationObserver"in V&&((t=new MutationObserver(c.event.documentChanged)).observe(W,{childList:!0,subtree:!0}),c.debug("Setting up mutation observer",t))},refresh:function(){d.popup?u=N(d.popup).eq(0):d.inline&&(u=b.nextAll(i.popup).eq(0),d.popup=u),d.popup?(u.addClass(f.loading),p=c.get.offsetParent(),u.removeClass(f.loading),d.movePopup&&c.has.popup()&&c.get.offsetParent(u)[0]!==p[0]&&(c.debug("Moving popup to the same offset parent as target"),u.detach().appendTo(p))):p=d.inline?c.get.offsetParent(b):c.has.popup()?c.get.offsetParent(u):A,p.is("html")&&p[0]!==A[0]&&(c.debug("Setting page as offset parent"),p=A),c.get.variation()&&c.set.variation()},reposition:function(){c.refresh(),c.set.position()},destroy:function(){c.debug("Destroying previous module"),t&&t.disconnect(),u&&!d.preserve&&c.removePopup(),clearTimeout(c.hideTimer),clearTimeout(c.showTimer),c.unbind.close(),c.unbind.events(),m.removeData(a)},event:{start:function(t){var e=N.isPlainObject(d.delay)?d.delay.show:d.delay;clearTimeout(c.hideTimer),P||(c.showTimer=setTimeout(c.show,e))},end:function(){var t=N.isPlainObject(d.delay)?d.delay.hide:d.delay;clearTimeout(c.showTimer),c.hideTimer=setTimeout(c.hide,t)},touchstart:function(t){P=!0,c.show()},resize:function(){c.is.visible()&&c.set.position()},documentChanged:function(t){[].forEach.call(t,function(t){t.removedNodes&&[].forEach.call(t.removedNodes,function(t){(t==C||0<N(t).find(C).length)&&(c.debug("Element removed from DOM, tearing down events"),c.destroy())})})},hideGracefully:function(t){var e=N(t.target),o=N.contains(W.documentElement,t.target),n=0<e.closest(i.popup).length;t&&!n&&o?(c.debug("Click occurred outside popup hiding popup"),c.hide()):c.debug("Click was inside popup, keeping popup open")}},create:function(){var t=c.get.html(),e=c.get.title(),o=c.get.content();t||o||e?(c.debug("Creating pop-up html"),t||(t=d.templates.popup({title:e,content:o})),u=N("<div/>").addClass(f.popup).data(h.activator,m).html(t),d.inline?(c.verbose("Inserting popup element inline",u),u.insertAfter(m)):(c.verbose("Appending popup element to body",u),u.appendTo(s)),c.refresh(),c.set.variation(),d.hoverable&&c.bind.popup(),d.onCreate.call(u,C)):0!==b.next(i.popup).length?(c.verbose("Pre-existing popup found"),d.inline=!0,d.popup=b.next(i.popup).data(h.activator,m),c.refresh(),d.hoverable&&c.bind.popup()):d.popup?(N(d.popup).data(h.activator,m),c.verbose("Used popup specified in settings"),c.refresh(),d.hoverable&&c.bind.popup()):c.debug("No content specified skipping display",C)},createID:function(){o=(Math.random().toString(16)+"000000000").substr(2,8),e="."+o,c.verbose("Creating unique id for element",o)},toggle:function(){c.debug("Toggling pop-up"),c.is.hidden()?(c.debug("Popup is hidden, showing pop-up"),c.unbind.close(),c.show()):(c.debug("Popup is visible, hiding pop-up"),c.hide())},show:function(t){if(t=t||function(){},c.debug("Showing pop-up",d.transition),c.is.hidden()&&(!c.is.active()||!c.is.dropdown())){if(c.exists()||c.create(),!1===d.onShow.call(u,C))return void c.debug("onShow callback returned false, cancelling popup animation");d.preserve||d.popup||c.refresh(),u&&c.set.position()&&(c.save.conditions(),d.exclusive&&c.hideAll(),c.animate.show(t))}},hide:function(t){if(t=t||function(){},c.is.visible()||c.is.animating()){if(!1===d.onHide.call(u,C))return void c.debug("onHide callback returned false, cancelling popup animation");c.remove.visible(),c.unbind.close(),c.restore.conditions(),c.animate.hide(t)}},hideAll:function(){N(i.popup).filter("."+f.popupVisible).each(function(){N(this).data(h.activator).popup("hide")})},exists:function(){return!!u&&(d.inline||d.popup?c.has.popup():1<=u.closest(s).length)},removePopup:function(){c.has.popup()&&!d.popup&&(c.debug("Removing popup",u),u.remove(),u=M,d.onRemove.call(u,C))},save:{conditions:function(){c.cache={title:m.attr("title")},c.cache.title&&m.removeAttr("title"),c.verbose("Saving original attributes",c.cache.title)}},restore:{conditions:function(){return c.cache&&c.cache.title&&(m.attr("title",c.cache.title),c.verbose("Restoring original attributes",c.cache.title)),!0}},supports:{svg:function(){return"undefined"==typeof SVGGraphicsElement}},animate:{show:function(t){t=N.isFunction(t)?t:function(){},d.transition&&N.fn.transition!==M&&m.transition("is supported")?(c.set.visible(),u.transition({animation:d.transition+" in",queue:!1,debug:d.debug,verbose:d.verbose,duration:d.duration,onComplete:function(){c.bind.close(),t.call(u,C),d.onVisible.call(u,C)}})):c.error(g.noTransition)},hide:function(t){t=N.isFunction(t)?t:function(){},c.debug("Hiding pop-up"),!1!==d.onHide.call(u,C)?d.transition&&N.fn.transition!==M&&m.transition("is supported")?u.transition({animation:d.transition+" out",queue:!1,duration:d.duration,debug:d.debug,verbose:d.verbose,onComplete:function(){c.reset(),t.call(u,C),d.onHidden.call(u,C)}}):c.error(g.noTransition):c.debug("onHide callback returned false, cancelling popup animation")}},change:{content:function(t){u.html(t)}},get:{html:function(){return m.removeData(h.html),m.data(h.html)||d.html},title:function(){return m.removeData(h.title),m.data(h.title)||d.title},content:function(){return m.removeData(h.content),m.data(h.content)||d.content||m.attr("title")},variation:function(){return m.removeData(h.variation),m.data(h.variation)||d.variation},popup:function(){return u},popupOffset:function(){return u.offset()},calculations:function(){var t,e=c.get.offsetParent(u),o=b[0],n=v[0]==V,i=d.inline||d.popup&&d.movePopup?b.position():b.offset(),r=n?{top:0,left:0}:v.offset(),a={},s=n?{top:S.scrollTop(),left:S.scrollLeft()}:{top:0,left:0};if(a={target:{element:b[0],width:b.outerWidth(),height:b.outerHeight(),top:i.top,left:i.left,margin:{}},popup:{width:u.outerWidth(),height:u.outerHeight()},parent:{width:p.outerWidth(),height:p.outerHeight()},screen:{top:r.top,left:r.left,scroll:{top:s.top,left:s.left},width:v.width(),height:v.height()}},e.get(0)!==p.get(0)){var l=e.offset();a.target.top-=l.top,a.target.left-=l.left,a.parent.width=e.outerWidth(),a.parent.height=e.outerHeight()}return d.setFluidWidth&&c.is.fluid()&&(a.container={width:u.parent().outerWidth()},a.popup.width=a.container.width),a.target.margin.top=d.inline?parseInt(V.getComputedStyle(o).getPropertyValue("margin-top"),10):0,a.target.margin.left=d.inline?c.is.rtl()?parseInt(V.getComputedStyle(o).getPropertyValue("margin-right"),10):parseInt(V.getComputedStyle(o).getPropertyValue("margin-left"),10):0,t=a.screen,a.boundary={top:t.top+t.scroll.top,bottom:t.top+t.scroll.top+t.height,left:t.left+t.scroll.left,right:t.left+t.scroll.left+t.width},a},id:function(){return o},startEvent:function(){return"hover"==d.on?"mouseenter":"focus"==d.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==d.on?"mouseleave":"focus"==d.on&&"blur"},distanceFromBoundary:function(t,e){var o,n,i={};return o=(e=e||c.get.calculations()).popup,n=e.boundary,t&&(i={top:t.top-n.top,left:t.left-n.left,right:n.right-(t.left+o.width),bottom:n.bottom-(t.top+o.height)},c.verbose("Distance from boundaries determined",t,i)),i},offsetParent:function(t){var e=(t!==M?t[0]:b[0]).parentNode,o=N(e);if(e)for(var n="none"===o.css("transform"),i="static"===o.css("position"),r=o.is("body");e&&!r&&i&&n;)e=e.parentNode,n="none"===(o=N(e)).css("transform"),i="static"===o.css("position"),r=o.is("body");return o&&0<o.length?o:N()},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(t){var e=t.split(" "),o=e[0],n=e[1],i="top"==o||"bottom"==o,r=!1,a=!1,s=!1;return y||(c.verbose("All available positions available"),y=c.get.positions()),c.debug("Recording last position tried",t),y[t]=!0,"opposite"===d.prefer&&(s=(s=[{top:"bottom",bottom:"top",left:"right",right:"left"}[o],n]).join(" "),r=!0===y[s],c.debug("Trying opposite strategy",s)),"adjacent"===d.prefer&&i&&(s=(s=[o,{left:"center",center:"right",right:"left"}[n]]).join(" "),a=!0===y[s],c.debug("Trying adjacent strategy",s)),(a||r)&&(c.debug("Using backup position",s),s={"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"}[t]),s}},set:{position:function(t,e){if(0!==b.length&&0!==u.length){var o,n,i,r,a,s,l,p;if(e=e||c.get.calculations(),t=t||m.data(h.position)||d.position,o=m.data(h.offset)||d.offset,n=d.distanceAway,i=e.target,r=e.popup,a=e.parent,c.should.centerArrow(e)&&(c.verbose("Adjusting offset to center arrow on small target element"),"top left"!=t&&"bottom left"!=t||(o+=i.width/2,o-=d.arrowPixelsFromEdge),"top right"!=t&&"bottom right"!=t||(o-=i.width/2,o+=d.arrowPixelsFromEdge)),0===i.width&&0===i.height&&!c.is.svg(i.element))return c.debug("Popup target is hidden, no action taken"),!1;switch(d.inline&&(c.debug("Adding margin to calculation",i.margin),"left center"==t||"right center"==t?(o+=i.margin.top,n+=-i.margin.left):"top left"==t||"top center"==t||"top right"==t?(o+=i.margin.left,n-=i.margin.top):(o+=i.margin.left,n+=i.margin.top)),c.debug("Determining popup position from calculations",t,e),c.is.rtl()&&(t=t.replace(/left|right/g,function(t){return"left"==t?"right":"left"}),c.debug("RTL: Popup position updated",t)),w==d.maxSearchDepth&&"string"==typeof d.lastResort&&(t=d.lastResort),t){case"top left":s={top:"auto",bottom:a.height-i.top+n,left:i.left+o,right:"auto"};break;case"top center":s={bottom:a.height-i.top+n,left:i.left+i.width/2-r.width/2+o,top:"auto",right:"auto"};break;case"top right":s={bottom:a.height-i.top+n,right:a.width-i.left-i.width-o,top:"auto",left:"auto"};break;case"left center":s={top:i.top+i.height/2-r.height/2+o,right:a.width-i.left+n,left:"auto",bottom:"auto"};break;case"right center":s={top:i.top+i.height/2-r.height/2+o,left:i.left+i.width+n,bottom:"auto",right:"auto"};break;case"bottom left":s={top:i.top+i.height+n,left:i.left+o,bottom:"auto",right:"auto"};break;case"bottom center":s={top:i.top+i.height+n,left:i.left+i.width/2-r.width/2+o,bottom:"auto",right:"auto"};break;case"bottom right":s={top:i.top+i.height+n,right:a.width-i.left-i.width-o,left:"auto",bottom:"auto"}}if(s===M&&c.error(g.invalidPosition,t),c.debug("Calculated popup positioning values",s),u.css(s).removeClass(f.position).addClass(t).addClass(f.loading),l=c.get.popupOffset(),p=c.get.distanceFromBoundary(l,e),c.is.offstage(p,t)){if(c.debug("Position is outside viewport",t),w<d.maxSearchDepth)return w++,t=c.get.nextPosition(t),c.debug("Trying new position",t),!!u&&c.set.position(t,e);if(!d.lastResort)return c.debug("Popup could not find a position to display",u),c.error(g.cannotPlace,C),c.remove.attempts(),c.remove.loading(),c.reset(),d.onUnplaceable.call(u,C),!1;c.debug("No position found, showing with last position")}return c.debug("Position is on stage",t),c.remove.attempts(),c.remove.loading(),d.setFluidWidth&&c.is.fluid()&&c.set.fluidWidth(e),!0}c.error(g.notFound)},fluidWidth:function(t){t=t||c.get.calculations(),c.debug("Automatically setting element width to parent width",t.parent.width),u.css("width",t.container.width)},variation:function(t){(t=t||c.get.variation())&&c.has.popup()&&(c.verbose("Adding variation to popup",t),u.addClass(t))},visible:function(){m.addClass(f.visible)}},remove:{loading:function(){u.removeClass(f.loading)},variation:function(t){(t=t||c.get.variation())&&(c.verbose("Removing variation",t),u.removeClass(t))},visible:function(){m.removeClass(f.visible)},attempts:function(){c.verbose("Resetting all searched positions"),w=0,y=!1}},bind:{events:function(){c.debug("Binding popup events to module"),"click"==d.on&&m.on("click"+r,c.toggle),"hover"==d.on&&m.on("touchstart"+r,c.event.touchstart),c.get.startEvent()&&m.on(c.get.startEvent()+r,c.event.start).on(c.get.endEvent()+r,c.event.end),d.target&&c.debug("Target set to element",b),S.on("resize"+e,c.event.resize)},popup:function(){c.verbose("Allowing hover events on popup to prevent closing"),u&&c.has.popup()&&u.on("mouseenter"+r,c.event.start).on("mouseleave"+r,c.event.end)},close:function(){(!0===d.hideOnScroll||"auto"==d.hideOnScroll&&"click"!=d.on)&&c.bind.closeOnScroll(),c.is.closable()?c.bind.clickaway():"hover"==d.on&&P&&c.bind.touchClose()},closeOnScroll:function(){c.verbose("Binding scroll close event to document"),l.one(c.get.scrollEvent()+e,c.event.hideGracefully)},touchClose:function(){c.verbose("Binding popup touchclose event to document"),E.on("touchstart"+e,function(t){c.verbose("Touched away from popup"),c.event.hideGracefully.call(C,t)})},clickaway:function(){c.verbose("Binding popup close event to document"),E.on("click"+e,function(t){c.verbose("Clicked away from popup"),c.event.hideGracefully.call(C,t)})}},unbind:{events:function(){S.off(e),m.off(r)},close:function(){E.off(e),l.off(e)}},has:{popup:function(){return u&&0<u.length}},should:{centerArrow:function(t){return!c.is.basic()&&t.target.width<=2*d.arrowPixelsFromEdge}},is:{closable:function(){return"auto"==d.closable?"hover"!=d.on:d.closable},offstage:function(t,o){var n=[];return N.each(t,function(t,e){e<-d.jitter&&(c.debug("Position exceeds allowable distance from edge",t,e,o),n.push(t))}),0<n.length},svg:function(t){return c.supports.svg()&&t instanceof SVGGraphicsElement},basic:function(){return m.hasClass(f.basic)},active:function(){return m.hasClass(f.active)},animating:function(){return u!==M&&u.hasClass(f.animating)},fluid:function(){return u!==M&&u.hasClass(f.fluid)},visible:function(){return u!==M&&u.hasClass(f.popupVisible)},dropdown:function(){return m.hasClass(f.dropdown)},hidden:function(){return!c.is.visible()},rtl:function(){return"rtl"==m.css("direction")}},reset:function(){c.remove.visible(),d.preserve?N.fn.transition!==M&&u.transition("remove transition"):c.removePopup()},setting:function(t,e){if(N.isPlainObject(t))N.extend(!0,d,t);else{if(e===M)return d[t];d[t]=e}},internal:function(t,e){if(N.isPlainObject(t))N.extend(!0,c,t);else{if(e===M)return c[t];c[t]=e}},debug:function(){!d.silent&&d.debug&&(d.performance?c.performance.log(arguments):(c.debug=Function.prototype.bind.call(console.info,console,d.name+":"),c.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?c.performance.log(arguments):(c.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),c.verbose.apply(console,arguments)))},error:function(){d.silent||(c.error=Function.prototype.bind.call(console.error,console,d.name+":"),c.error.apply(console,arguments))},performance:{log:function(t){var e,o;d.performance&&(o=(e=(new Date).getTime())-(O||e),O=e,D.push({Name:t[0],Arguments:[].slice.call(t,1)||"",Element:C,"Execution Time":o})),clearTimeout(c.performance.timer),c.performance.timer=setTimeout(c.performance.display,500)},display:function(){var t=d.name+":",o=0;O=!1,clearTimeout(c.performance.timer),N.each(D,function(t,e){o+=e["Execution Time"]}),t+=" "+o+"ms",F&&(t+=" '"+F+"'"),(console.group!==M||console.table!==M)&&0<D.length&&(console.groupCollapsed(t),console.table?console.table(D):N.each(D,function(t,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),D=[]}},invoke:function(n,t,e){var i,r,o,a=T;return t=t||R,e=C||e,"string"==typeof n&&a!==M&&(n=n.split(/[\. ]/),i=n.length-1,N.each(n,function(t,e){var o=t!=i?e+n[t+1].charAt(0).toUpperCase()+n[t+1].slice(1):n;if(N.isPlainObject(a[o])&&t!=i)a=a[o];else{if(a[o]!==M)return r=a[o],!1;if(!N.isPlainObject(a[e])||t==i)return a[e]!==M&&(r=a[e]),!1;a=a[e]}})),N.isFunction(r)?o=r.apply(e,t):r!==M&&(o=r),N.isArray(k)?k.push(o):k!==M?k=[k,o]:o!==M&&(k=o),r}},H?(T===M&&c.initialize(),c.invoke(j)):(T!==M&&T.invoke("destroy"),c.initialize())}),k!==M?k:this},N.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:V,addTouchEvents:!0,position:"top left",variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:V,prefer:"opposite",lastResort:!1,arrowPixelsFromEdge:20,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",basic:"basic",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible",popupVisible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(t){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/[&<>"'`]/.test(t)?t.replace(/[&<>"'`]/g,function(t){return e[t]}):t},popup:function(t){var e="",o=N.fn.popup.settings.templates.escape;return typeof t!==M&&(typeof t.title!==M&&t.title&&(t.title=o(t.title),e+='<div class="header">'+t.title+"</div>"),typeof t.content!==M&&t.content&&(t.content=o(t.content),e+='<div class="content">'+t.content+"</div>")),e}}}}(jQuery,window,document);
!function(N,V,W,M){"use strict";V=void 0!==V&&V.Math==Math?V:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),N.fn.popup=function(x){var k,t=N(this),E=N(W),S=N(V),A=N("body"),F=t.selector||"",O=(new Date).getTime(),D=[],j=x,H="string"==typeof j,R=[].slice.call(arguments,1);return t.each(function(){var u,p,t,e,o,c,d=N.isPlainObject(x)?N.extend(!0,{},N.fn.popup.settings,x):N.extend({},N.fn.popup.settings),i=d.selector,f=d.className,g=d.error,h=d.metadata,n=d.namespace,r="."+d.namespace,a="module-"+n,m=N(this),s=N(d.context),l=N(d.scrollContext),v=N(d.boundary),b=d.target?N(d.target):m,w=0,y=!1,P=!1,C=this,T=m.data(a);c={initialize:function(){c.debug("Initializing",m),c.createID(),c.bind.events(),!c.exists()&&d.preserve&&c.create(),d.observeChanges&&c.observeChanges(),c.instantiate()},instantiate:function(){c.verbose("Storing instance",c),T=c,m.data(a,T)},observeChanges:function(){"MutationObserver"in V&&((t=new MutationObserver(c.event.documentChanged)).observe(W,{childList:!0,subtree:!0}),c.debug("Setting up mutation observer",t))},refresh:function(){d.popup?u=N(d.popup).eq(0):d.inline&&(u=b.nextAll(i.popup).eq(0),d.popup=u),d.popup?(u.addClass(f.loading),p=c.get.offsetParent(),u.removeClass(f.loading),d.movePopup&&c.has.popup()&&c.get.offsetParent(u)[0]!==p[0]&&(c.debug("Moving popup to the same offset parent as target"),u.detach().appendTo(p))):p=d.inline?c.get.offsetParent(b):c.has.popup()?c.get.offsetParent(u):A,p.is("html")&&p[0]!==A[0]&&(c.debug("Setting page as offset parent"),p=A),c.get.variation()&&c.set.variation()},reposition:function(){c.refresh(),c.set.position()},destroy:function(){c.debug("Destroying previous module"),t&&t.disconnect(),u&&!d.preserve&&c.removePopup(),clearTimeout(c.hideTimer),clearTimeout(c.showTimer),c.unbind.close(),c.unbind.events(),m.removeData(a)},event:{start:function(t){var e=N.isPlainObject(d.delay)?d.delay.show:d.delay;clearTimeout(c.hideTimer),P||(c.showTimer=setTimeout(c.show,e))},end:function(){var t=N.isPlainObject(d.delay)?d.delay.hide:d.delay;clearTimeout(c.showTimer),c.hideTimer=setTimeout(c.hide,t)},touchstart:function(t){P=!0,c.show()},resize:function(){c.is.visible()&&c.set.position()},documentChanged:function(t){[].forEach.call(t,function(t){t.removedNodes&&[].forEach.call(t.removedNodes,function(t){(t==C||0<N(t).find(C).length)&&(c.debug("Element removed from DOM, tearing down events"),c.destroy())})})},hideGracefully:function(t){var e=N(t.target),o=N.contains(W.documentElement,t.target),n=0<e.closest(i.popup).length;t&&!n&&o?(c.debug("Click occurred outside popup hiding popup"),c.hide()):c.debug("Click was inside popup, keeping popup open")}},create:function(){var t=c.get.html(),e=c.get.title(),o=c.get.content();t||o||e?(c.debug("Creating pop-up html"),t||(t=d.templates.popup({title:e,content:o})),u=N("<div/>").addClass(f.popup).data(h.activator,m).html(t),d.inline?(c.verbose("Inserting popup element inline",u),u.insertAfter(m)):(c.verbose("Appending popup element to body",u),u.appendTo(s)),c.refresh(),c.set.variation(),d.hoverable&&c.bind.popup(),d.onCreate.call(u,C)):0!==b.next(i.popup).length?(c.verbose("Pre-existing popup found"),d.inline=!0,d.popup=b.next(i.popup).data(h.activator,m),c.refresh(),d.hoverable&&c.bind.popup()):d.popup?(N(d.popup).data(h.activator,m),c.verbose("Used popup specified in settings"),c.refresh(),d.hoverable&&c.bind.popup()):c.debug("No content specified skipping display",C)},createID:function(){o=(Math.random().toString(16)+"000000000").substr(2,8),e="."+o,c.verbose("Creating unique id for element",o)},toggle:function(){c.debug("Toggling pop-up"),c.is.hidden()?(c.debug("Popup is hidden, showing pop-up"),c.unbind.close(),c.show()):(c.debug("Popup is visible, hiding pop-up"),c.hide())},show:function(t){if(t=t||function(){},c.debug("Showing pop-up",d.transition),c.is.hidden()&&(!c.is.active()||!c.is.dropdown())){if(c.exists()||c.create(),!1===d.onShow.call(u,C))return void c.debug("onShow callback returned false, cancelling popup animation");d.preserve||d.popup||c.refresh(),u&&c.set.position()&&(c.save.conditions(),d.exclusive&&c.hideAll(),c.animate.show(t))}},hide:function(t){if(t=t||function(){},c.is.visible()||c.is.animating()){if(!1===d.onHide.call(u,C))return void c.debug("onHide callback returned false, cancelling popup animation");c.remove.visible(),c.unbind.close(),c.restore.conditions(),c.animate.hide(t)}},hideAll:function(){N(i.popup).filter("."+f.popupVisible).each(function(){N(this).data(h.activator).popup("hide")})},exists:function(){return!!u&&(d.inline||d.popup?c.has.popup():1<=u.closest(s).length)},removePopup:function(){c.has.popup()&&!d.popup&&(c.debug("Removing popup",u),u.remove(),u=M,d.onRemove.call(u,C))},save:{conditions:function(){c.cache={title:m.attr("title")},c.cache.title&&m.removeAttr("title"),c.verbose("Saving original attributes",c.cache.title)}},restore:{conditions:function(){return c.cache&&c.cache.title&&(m.attr("title",c.cache.title),c.verbose("Restoring original attributes",c.cache.title)),!0}},supports:{svg:function(){return"undefined"!=typeof SVGGraphicsElement}},animate:{show:function(t){t=N.isFunction(t)?t:function(){},d.transition&&N.fn.transition!==M&&m.transition("is supported")?(c.set.visible(),u.transition({animation:d.transition+" in",queue:!1,debug:d.debug,verbose:d.verbose,duration:d.duration,onComplete:function(){c.bind.close(),t.call(u,C),d.onVisible.call(u,C)}})):c.error(g.noTransition)},hide:function(t){t=N.isFunction(t)?t:function(){},c.debug("Hiding pop-up"),!1!==d.onHide.call(u,C)?d.transition&&N.fn.transition!==M&&m.transition("is supported")?u.transition({animation:d.transition+" out",queue:!1,duration:d.duration,debug:d.debug,verbose:d.verbose,onComplete:function(){c.reset(),t.call(u,C),d.onHidden.call(u,C)}}):c.error(g.noTransition):c.debug("onHide callback returned false, cancelling popup animation")}},change:{content:function(t){u.html(t)}},get:{html:function(){return m.removeData(h.html),m.data(h.html)||d.html},title:function(){return m.removeData(h.title),m.data(h.title)||d.title},content:function(){return m.removeData(h.content),m.data(h.content)||d.content||m.attr("title")},variation:function(){return m.removeData(h.variation),m.data(h.variation)||d.variation},popup:function(){return u},popupOffset:function(){return u.offset()},calculations:function(){var t,e=c.get.offsetParent(u),o=b[0],n=v[0]==V,i=d.inline||d.popup&&d.movePopup?b.position():b.offset(),r=n?{top:0,left:0}:v.offset(),a={},s=n?{top:S.scrollTop(),left:S.scrollLeft()}:{top:0,left:0};if(a={target:{element:b[0],width:b.outerWidth(),height:b.outerHeight(),top:i.top,left:i.left,margin:{}},popup:{width:u.outerWidth(),height:u.outerHeight()},parent:{width:p.outerWidth(),height:p.outerHeight()},screen:{top:r.top,left:r.left,scroll:{top:s.top,left:s.left},width:v.width(),height:v.height()}},e.get(0)!==p.get(0)){var l=e.offset();a.target.top-=l.top,a.target.left-=l.left,a.parent.width=e.outerWidth(),a.parent.height=e.outerHeight()}return d.setFluidWidth&&c.is.fluid()&&(a.container={width:u.parent().outerWidth()},a.popup.width=a.container.width),a.target.margin.top=d.inline?parseInt(V.getComputedStyle(o).getPropertyValue("margin-top"),10):0,a.target.margin.left=d.inline?c.is.rtl()?parseInt(V.getComputedStyle(o).getPropertyValue("margin-right"),10):parseInt(V.getComputedStyle(o).getPropertyValue("margin-left"),10):0,t=a.screen,a.boundary={top:t.top+t.scroll.top,bottom:t.top+t.scroll.top+t.height,left:t.left+t.scroll.left,right:t.left+t.scroll.left+t.width},a},id:function(){return o},startEvent:function(){return"hover"==d.on?"mouseenter":"focus"==d.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==d.on?"mouseleave":"focus"==d.on&&"blur"},distanceFromBoundary:function(t,e){var o,n,i={};return o=(e=e||c.get.calculations()).popup,n=e.boundary,t&&(i={top:t.top-n.top,left:t.left-n.left,right:n.right-(t.left+o.width),bottom:n.bottom-(t.top+o.height)},c.verbose("Distance from boundaries determined",t,i)),i},offsetParent:function(t){var e=(t!==M?t[0]:b[0]).parentNode,o=N(e);if(e)for(var n="none"===o.css("transform"),i="static"===o.css("position"),r=o.is("body");e&&!r&&i&&n;)e=e.parentNode,n="none"===(o=N(e)).css("transform"),i="static"===o.css("position"),r=o.is("body");return o&&0<o.length?o:N()},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(t){var e=t.split(" "),o=e[0],n=e[1],i="top"==o||"bottom"==o,r=!1,a=!1,s=!1;return y||(c.verbose("All available positions available"),y=c.get.positions()),c.debug("Recording last position tried",t),y[t]=!0,"opposite"===d.prefer&&(s=(s=[{top:"bottom",bottom:"top",left:"right",right:"left"}[o],n]).join(" "),r=!0===y[s],c.debug("Trying opposite strategy",s)),"adjacent"===d.prefer&&i&&(s=(s=[o,{left:"center",center:"right",right:"left"}[n]]).join(" "),a=!0===y[s],c.debug("Trying adjacent strategy",s)),(a||r)&&(c.debug("Using backup position",s),s={"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"}[t]),s}},set:{position:function(t,e){if(0!==b.length&&0!==u.length){var o,n,i,r,a,s,l,p;if(e=e||c.get.calculations(),t=t||m.data(h.position)||d.position,o=m.data(h.offset)||d.offset,n=d.distanceAway,i=e.target,r=e.popup,a=e.parent,c.should.centerArrow(e)&&(c.verbose("Adjusting offset to center arrow on small target element"),"top left"!=t&&"bottom left"!=t||(o+=i.width/2,o-=d.arrowPixelsFromEdge),"top right"!=t&&"bottom right"!=t||(o-=i.width/2,o+=d.arrowPixelsFromEdge)),0===i.width&&0===i.height&&!c.is.svg(i.element))return c.debug("Popup target is hidden, no action taken"),!1;switch(d.inline&&(c.debug("Adding margin to calculation",i.margin),"left center"==t||"right center"==t?(o+=i.margin.top,n+=-i.margin.left):"top left"==t||"top center"==t||"top right"==t?(o+=i.margin.left,n-=i.margin.top):(o+=i.margin.left,n+=i.margin.top)),c.debug("Determining popup position from calculations",t,e),c.is.rtl()&&(t=t.replace(/left|right/g,function(t){return"left"==t?"right":"left"}),c.debug("RTL: Popup position updated",t)),w==d.maxSearchDepth&&"string"==typeof d.lastResort&&(t=d.lastResort),t){case"top left":s={top:"auto",bottom:a.height-i.top+n,left:i.left+o,right:"auto"};break;case"top center":s={bottom:a.height-i.top+n,left:i.left+i.width/2-r.width/2+o,top:"auto",right:"auto"};break;case"top right":s={bottom:a.height-i.top+n,right:a.width-i.left-i.width-o,top:"auto",left:"auto"};break;case"left center":s={top:i.top+i.height/2-r.height/2+o,right:a.width-i.left+n,left:"auto",bottom:"auto"};break;case"right center":s={top:i.top+i.height/2-r.height/2+o,left:i.left+i.width+n,bottom:"auto",right:"auto"};break;case"bottom left":s={top:i.top+i.height+n,left:i.left+o,bottom:"auto",right:"auto"};break;case"bottom center":s={top:i.top+i.height+n,left:i.left+i.width/2-r.width/2+o,bottom:"auto",right:"auto"};break;case"bottom right":s={top:i.top+i.height+n,right:a.width-i.left-i.width-o,left:"auto",bottom:"auto"}}if(s===M&&c.error(g.invalidPosition,t),c.debug("Calculated popup positioning values",s),u.css(s).removeClass(f.position).addClass(t).addClass(f.loading),l=c.get.popupOffset(),p=c.get.distanceFromBoundary(l,e),c.is.offstage(p,t)){if(c.debug("Position is outside viewport",t),w<d.maxSearchDepth)return w++,t=c.get.nextPosition(t),c.debug("Trying new position",t),!!u&&c.set.position(t,e);if(!d.lastResort)return c.debug("Popup could not find a position to display",u),c.error(g.cannotPlace,C),c.remove.attempts(),c.remove.loading(),c.reset(),d.onUnplaceable.call(u,C),!1;c.debug("No position found, showing with last position")}return c.debug("Position is on stage",t),c.remove.attempts(),c.remove.loading(),d.setFluidWidth&&c.is.fluid()&&c.set.fluidWidth(e),!0}c.error(g.notFound)},fluidWidth:function(t){t=t||c.get.calculations(),c.debug("Automatically setting element width to parent width",t.parent.width),u.css("width",t.container.width)},variation:function(t){(t=t||c.get.variation())&&c.has.popup()&&(c.verbose("Adding variation to popup",t),u.addClass(t))},visible:function(){m.addClass(f.visible)}},remove:{loading:function(){u.removeClass(f.loading)},variation:function(t){(t=t||c.get.variation())&&(c.verbose("Removing variation",t),u.removeClass(t))},visible:function(){m.removeClass(f.visible)},attempts:function(){c.verbose("Resetting all searched positions"),w=0,y=!1}},bind:{events:function(){c.debug("Binding popup events to module"),"click"==d.on&&m.on("click"+r,c.toggle),"hover"==d.on&&m.on("touchstart"+r,c.event.touchstart),c.get.startEvent()&&m.on(c.get.startEvent()+r,c.event.start).on(c.get.endEvent()+r,c.event.end),d.target&&c.debug("Target set to element",b),S.on("resize"+e,c.event.resize)},popup:function(){c.verbose("Allowing hover events on popup to prevent closing"),u&&c.has.popup()&&u.on("mouseenter"+r,c.event.start).on("mouseleave"+r,c.event.end)},close:function(){(!0===d.hideOnScroll||"auto"==d.hideOnScroll&&"click"!=d.on)&&c.bind.closeOnScroll(),c.is.closable()?c.bind.clickaway():"hover"==d.on&&P&&c.bind.touchClose()},closeOnScroll:function(){c.verbose("Binding scroll close event to document"),l.one(c.get.scrollEvent()+e,c.event.hideGracefully)},touchClose:function(){c.verbose("Binding popup touchclose event to document"),E.on("touchstart"+e,function(t){c.verbose("Touched away from popup"),c.event.hideGracefully.call(C,t)})},clickaway:function(){c.verbose("Binding popup close event to document"),E.on("click"+e,function(t){c.verbose("Clicked away from popup"),c.event.hideGracefully.call(C,t)})}},unbind:{events:function(){S.off(e),m.off(r)},close:function(){E.off(e),l.off(e)}},has:{popup:function(){return u&&0<u.length}},should:{centerArrow:function(t){return!c.is.basic()&&t.target.width<=2*d.arrowPixelsFromEdge}},is:{closable:function(){return"auto"==d.closable?"hover"!=d.on:d.closable},offstage:function(t,o){var n=[];return N.each(t,function(t,e){e<-d.jitter&&(c.debug("Position exceeds allowable distance from edge",t,e,o),n.push(t))}),0<n.length},svg:function(t){return c.supports.svg()&&t instanceof SVGGraphicsElement},basic:function(){return m.hasClass(f.basic)},active:function(){return m.hasClass(f.active)},animating:function(){return u!==M&&u.hasClass(f.animating)},fluid:function(){return u!==M&&u.hasClass(f.fluid)},visible:function(){return u!==M&&u.hasClass(f.popupVisible)},dropdown:function(){return m.hasClass(f.dropdown)},hidden:function(){return!c.is.visible()},rtl:function(){return"rtl"==m.css("direction")}},reset:function(){c.remove.visible(),d.preserve?N.fn.transition!==M&&u.transition("remove transition"):c.removePopup()},setting:function(t,e){if(N.isPlainObject(t))N.extend(!0,d,t);else{if(e===M)return d[t];d[t]=e}},internal:function(t,e){if(N.isPlainObject(t))N.extend(!0,c,t);else{if(e===M)return c[t];c[t]=e}},debug:function(){!d.silent&&d.debug&&(d.performance?c.performance.log(arguments):(c.debug=Function.prototype.bind.call(console.info,console,d.name+":"),c.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?c.performance.log(arguments):(c.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),c.verbose.apply(console,arguments)))},error:function(){d.silent||(c.error=Function.prototype.bind.call(console.error,console,d.name+":"),c.error.apply(console,arguments))},performance:{log:function(t){var e,o;d.performance&&(o=(e=(new Date).getTime())-(O||e),O=e,D.push({Name:t[0],Arguments:[].slice.call(t,1)||"",Element:C,"Execution Time":o})),clearTimeout(c.performance.timer),c.performance.timer=setTimeout(c.performance.display,500)},display:function(){var t=d.name+":",o=0;O=!1,clearTimeout(c.performance.timer),N.each(D,function(t,e){o+=e["Execution Time"]}),t+=" "+o+"ms",F&&(t+=" '"+F+"'"),(console.group!==M||console.table!==M)&&0<D.length&&(console.groupCollapsed(t),console.table?console.table(D):N.each(D,function(t,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),D=[]}},invoke:function(n,t,e){var i,r,o,a=T;return t=t||R,e=C||e,"string"==typeof n&&a!==M&&(n=n.split(/[\. ]/),i=n.length-1,N.each(n,function(t,e){var o=t!=i?e+n[t+1].charAt(0).toUpperCase()+n[t+1].slice(1):n;if(N.isPlainObject(a[o])&&t!=i)a=a[o];else{if(a[o]!==M)return r=a[o],!1;if(!N.isPlainObject(a[e])||t==i)return a[e]!==M&&(r=a[e]),!1;a=a[e]}})),N.isFunction(r)?o=r.apply(e,t):r!==M&&(o=r),N.isArray(k)?k.push(o):k!==M?k=[k,o]:o!==M&&(k=o),r}},H?(T===M&&c.initialize(),c.invoke(j)):(T!==M&&T.invoke("destroy"),c.initialize())}),k!==M?k:this},N.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:V,addTouchEvents:!0,position:"top left",variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:V,prefer:"opposite",lastResort:!1,arrowPixelsFromEdge:20,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",basic:"basic",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible",popupVisible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(t){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/[&<>"'`]/.test(t)?t.replace(/[&<>"'`]/g,function(t){return e[t]}):t},popup:function(t){var e="",o=N.fn.popup.settings.templates.escape;return typeof t!==M&&(typeof t.title!==M&&t.title&&(t.title=o(t.title),e+='<div class="header">'+t.title+"</div>"),typeof t.content!==M&&t.content&&(t.content=o(t.content),e+='<div class="content">'+t.content+"</div>")),e}}}}(jQuery,window,document);
/*!
* # Semantic UI 2.6.3 - Progress
* # Semantic UI 2.6.4 - Progress
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Range
* # Semantic UI 2.6.4 - Range
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Rating
* # Semantic UI 2.6.4 - Rating
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Search
* # Semantic UI 2.6.4 - Search
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Shape
* # Semantic UI 2.6.4 - Shape
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Sidebar
* # Semantic UI 2.6.4 - Sidebar
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Site
* # Semantic UI 2.6.4 - Site
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - State
* # Semantic UI 2.6.4 - State
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Sticky
* # Semantic UI 2.6.4 - Sticky
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Tab
* # Semantic UI 2.6.4 - Tab
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Toast
* # Semantic UI 2.6.4 - Toast
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Transition
* # Semantic UI 2.6.4 - Transition
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

/*!
* # Semantic UI 2.6.3 - Visibility
* # Semantic UI 2.6.4 - Visibility
* http://github.com/semantic-org/semantic-ui/

@@ -4,0 +4,0 @@ *

{
"name": "fomantic-ui-css",
"version": "2.6.3",
"version": "2.6.4",
"title": "Fomantic UI",

@@ -5,0 +5,0 @@ "description": "CSS Only distribution of Fomantic UI",

@@ -0,0 +0,0 @@ # CSS Distribution

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc