/*
* # Fomantic UI - 2.8.8
* https://github.com/fomantic/Fomantic-UI
* http://fomantic-ui.com/
*
* Copyright 2022 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
!function(g,h,v,b){g.isFunction=g.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},g.site=g.fn.site=function(e){var s,i=(new Date).getTime(),o=[],t=e,n="string"==typeof t,l=[].slice.call(arguments,1),r=g.isPlainObject(e)?g.extend(!0,{},g.site.settings,e):g.extend({},g.site.settings),a=r.namespace,c=r.error,u="module-"+a,d=g(v),f=this,m=d.data(u),p={initialize:function(){p.instantiate()},instantiate:function(){p.verbose("Storing instance of site",p),m=p,d.data(u,p)},normalize:function(){p.fix.console(),p.fix.requestAnimationFrame()},fix:{console:function(){p.debug("Normalizing window.console"),console!==b&&console.log!==b||(p.verbose("Console not available, normalizing events"),p.disable.console()),void 0!==console.group&&void 0!==console.groupEnd&&void 0!==console.groupCollapsed||(p.verbose("Console group not available, normalizing events"),h.console.group=function(){},h.console.groupEnd=function(){},h.console.groupCollapsed=function(){}),void 0===console.markTimeline&&(p.verbose("Mark timeline not available, normalizing events"),h.console.markTimeline=function(){})},consoleClear:function(){p.debug("Disabling programmatic console clearing"),h.console.clear=function(){}},requestAnimationFrame:function(){p.debug("Normalizing requestAnimationFrame"),h.requestAnimationFrame===b&&(p.debug("RequestAnimationFrame not available, normalizing event"),h.requestAnimationFrame=h.requestAnimationFrame||h.mozRequestAnimationFrame||h.webkitRequestAnimationFrame||h.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(e){return g.fn[e]!==b&&g.fn[e].settings!==b},enabled:{modules:function(e){var n=[];return e=e||r.modules,g.each(e,function(e,t){p.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(e){var n=[];return e=e||r.modules,g.each(e,function(e,t){p.moduleExists(t)||n.push(t)}),n}},change:{setting:function(i,o,e,a){e="string"==typeof e?"all"===e?r.modules:[e]:e||r.modules,a=a===b||a,g.each(e,function(e,t){var n=!p.moduleExists(t)||(g.fn[t].settings.namespace||!1);p.moduleExists(t)&&(p.verbose("Changing default setting",i,o,t),g.fn[t].settings[i]=o,a&&n&&0<(n=g(":data(module-"+n+")")).length&&(p.verbose("Modifying existing settings",n),n[t]("setting",i,o)))})},settings:function(i,e,o){e="string"==typeof e?[e]:e||r.modules,o=o===b||o,g.each(e,function(e,t){var n;p.moduleExists(t)&&(p.verbose("Changing default setting",i,t),g.extend(!0,g.fn[t].settings,i),o&&a&&0<(n=g(":data(module-"+a+")")).length&&(p.verbose("Modifying existing settings",n),n[t]("setting",i)))})}},enable:{console:function(){p.console(!0)},debug:function(e,t){e=e||r.modules,p.debug("Enabling debug for modules",e),p.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||r.modules,p.debug("Enabling verbose debug for modules",e),p.change.setting("verbose",!0,e,t)}},disable:{console:function(){p.console(!1)},debug:function(e,t){e=e||r.modules,p.debug("Disabling debug for modules",e),p.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||r.modules,p.debug("Disabling verbose debug for modules",e),p.change.setting("verbose",!1,e,t)}},console:function(e){e?m.cache.console===b?p.error(c.console):(p.debug("Restoring console function"),h.console=m.cache.console):(p.debug("Disabling console function"),m.cache.console=h.console,h.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}})},destroy:function(){p.verbose("Destroying previous site for",d),d.removeData(u)},cache:{},setting:function(e,t){if(g.isPlainObject(e))g.extend(!0,r,e);else{if(t===b)return r[e];r[e]=t}},internal:function(e,t){if(g.isPlainObject(e))g.extend(!0,p,e);else{if(t===b)return p[e];p[e]=t}},debug:function(){r.debug&&(r.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,r.name+":"),p.debug.apply(console,arguments)))},verbose:function(){r.verbose&&r.debug&&(r.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),p.verbose.apply(console,arguments)))},error:function(){p.error=Function.prototype.bind.call(console.error,console,r.name+":"),p.error.apply(console,arguments)},performance:{log:function(e){var t,n;r.performance&&(n=(t=(new Date).getTime())-(i||t),i=t,o.push({Element:f,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var e=r.name+":",n=0;i=!1,clearTimeout(p.performance.timer),g.each(o,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",(console.group!==b||console.table!==b)&&0").addClass(K.popup)[e](t)),ee.addClass(K.calendar),te&&ee.addClass(K.inverted),e=function(){return ne.refreshTooltips(),X.onVisible.apply(ee,arguments)},t=X.onHidden,l.length||(ee.attr("tabindex","0"),e=function(){return ne.refreshTooltips(),ne.focus(),X.onVisible.apply(ee,arguments)},t=function(){return ne.blur(),X.onHidden.apply(ee,arguments)}),n=ne.setting("on"),n=oe.extend({},X.popupOptions,{popup:ee,on:n,hoverable:"hover"===n,closable:"click"===n,onShow:function(){return ne.set.focusDate(ne.get.date()),ne.set.mode(ne.get.validatedMode(X.startMode)),X.onShow.apply(ee,arguments)},onVisible:e,onHide:X.onHide,onHidden:t}),ne.popup(n)))},inline:function(){c.length&&!X.inline||(X.inline=!0,ee=oe("
").addClass(K.calendar).appendTo(r),l.length||ee.attr("tabindex","0"))},input:function(){X.touchReadonly&&l.length&&d&&l.prop("readonly",!0),ne.check.disabled()},date:function(){var e;X.initialDate?e=n.date(X.initialDate,X):r.data(Z.date)!==ae?e=n.date(r.data(Z.date),X):l.length&&(e=n.date(l.val(),X)),ne.set.date(e,X.formatInput,!1),ne.set.mode(ne.get.mode(),!1)}},trigger:{change:function(){var e,t=l[0];t&&(e=k.createEvent("HTMLEvents"),ne.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{calendar:function(){var e,t,L,n=ne.get.mode(),i=new Date,j=ne.get.date(),o=ne.get.focusDate(),a=ne.helper.dateInRange(o||j||X.initialDate||i),r=(o||ne.set.focusDate(o=a,!1,!1),"year"===n),s="month"===n,l="day"===n,c="hour"===n,u="minute"===n,N="time"===X.type,H=Math.max(X.multiMonth,1),V=l?ne.get.monthOffset():0,d=a.getMinutes(),f=a.getHours(),m=a.getDate(),z=a.getMonth()+V,p=a.getFullYear(),g=l?X.showWeekNumbers?8:7:c?4:_.column,U=l||c?6:_.row,h=l?H:1,W=(v=ee).hasClass("left")?"right center":"left center";for(v.empty(),1").addClass(K.grid).appendTo(v)),t=0;t").addClass(K.column).appendTo(L));var v,b=z+t,B=(new Date(p,b,1).getDay()-X.firstDayOfWeek%7+7)%7,y=(!X.constantHeight&&l&&(y=new Date(p,b+1,0).getDate()+B,U=Math.ceil(y/7)),r?10:s?1:0),w=l?1:0,x=c||u?1:0,C=c||u?m:1,T=new Date(p-y,b-w,C-x,f),w=new Date(p+y,b+w,C+x,f),C=r?new Date(10*Math.ceil(p/10)-9,0,0):s?new Date(p,0,0):l?new Date(p,b,0):new Date(p,b,m,-1),x=r?new Date(10*Math.ceil(p/10)+1,0,1):s?new Date(p+1,0,1):l?new Date(p,b+1,1):new Date(p,b,m+1),S=n,S=(l&&X.showWeekNumbers&&(S+=" andweek"),oe("").addClass(K.table).addClass(S).addClass(ie[g]+" column").appendTo(v)),D=(te&&S.addClass(K.inverted),g);if(!N){var Y=oe("").appendTo(S),k=oe("
").appendTo(Y),A=oe(" | ").attr("colspan",""+g).appendTo(k),E=r||s?new Date(p,0,1):l?new Date(p,b,1):new Date(p,b,m,f,d),F=oe("").addClass(K.link).appendTo(A),E=(F.text(J.header(E,n,X)),s?X.disableYear?"day":"year":l?X.disableMonth?"year":"month":"day");if(F.data(Z.mode,E),0===t&&((F=oe("").addClass(K.prev).appendTo(A)).data(Z.focusDate,T),F.toggleClass(K.disabledCell,!ne.helper.isDateInRange(C,n)),oe("").addClass(K.prevIcon).appendTo(F)),t===h-1&&((E=oe("").addClass(K.next).appendTo(A)).data(Z.focusDate,w),E.toggleClass(K.disabledCell,!ne.helper.isDateInRange(x,n)),oe("").addClass(K.nextIcon).appendTo(E)),l)for(k=oe("
").appendTo(Y),X.showWeekNumbers&&((A=oe(" | ").appendTo(k)).text(X.text.weekNo),A.addClass(K.weekCell),D--),O=0;O").appendTo(k)).text(J.dayColumnHeader((O+X.firstDayOfWeek)%7,X))}for(var $=oe("").appendTo(S),O=r?10*Math.ceil(p/10)-9:l?1-B:0,Q=0;Q").appendTo($),l&&X.showWeekNumbers&&((A=oe(" | ").appendTo(k)).text(ne.get.weekOfYear(p,b,O+1-X.firstDayOfWeek)),A.addClass(K.weekCell)),e=0;e").addClass(K.cell).appendTo(k)).text(R),A.data(Z.date,P),l&&P.getMonth()!==(b+12)%12),I=!X.selectAdjacentDays&&R||!ne.helper.isDateInRange(P,n)||X.isDisabled(P,n)||ne.helper.isDisabled(P,n)||!ne.helper.isEnabled(P,n),q=(I?null!==(q=ne.helper.findDayAsObject(P,n,X.disabledDates))&&q[Z.message]&&(A.attr("data-tooltip",q[Z.message]),A.attr("data-position",q[Z.position]||W),(q[Z.inverted]||te&&q[Z.inverted]===ae)&&A.attr("data-inverted",""),q[Z.variation]&&A.attr("data-variation",q[Z.variation])):null!==(M=ne.helper.findDayAsObject(P,n,X.eventDates))&&(A.addClass(M[Z.class]||X.eventClass),M[Z.message]&&(A.attr("data-tooltip",M[Z.message]),A.attr("data-position",M[Z.position]||W),(M[Z.inverted]||te&&M[Z.inverted]===ae)&&A.attr("data-inverted",""),M[Z.variation]&&A.attr("data-variation",M[Z.variation]))),ne.helper.dateEqual(P,j,n)),G=ne.helper.dateEqual(P,i,n),R=(A.toggleClass(K.adjacentCell,R&&!M),A.toggleClass(K.disabledCell,I),A.toggleClass(K.activeCell,q&&!(R&&I)),c||u||A.toggleClass(K.todayCell,!R&&G),{mode:n,adjacent:R,disabled:I,active:q,today:G});J.cell(A,P,R),ne.helper.dateEqual(P,o,n)&&ne.set.focusDate(P,!1,!1)}X.today&&(T=oe("
").appendTo($),(C=oe(" | ").attr("colspan",""+g).addClass(K.today).appendTo(T)).text(J.today(X)),C.data(Z.date,i)),ne.update.focus(!1,S),X.inline&&ne.refreshTooltips()}}},update:{focus:function(e,t){t=t||ee;var r=ne.get.mode(),n=ne.get.date(),s=ne.get.focusDate(),l=ne.get.startDate(),c=ne.get.endDate(),u=(e?s:null)||n||(d?null:s);t.find("td").each(function(){var e,t,n,i,o=oe(this),a=o.data(Z.date);a&&(e=o.hasClass(K.disabledCell),t=o.hasClass(K.activeCell),n=o.hasClass(K.adjacentCell),i=ne.helper.dateEqual(a,s,r),a=!!u&&(!!l&&ne.helper.isDateInRange(a,r,l,u)||!!c&&ne.helper.isDateInRange(a,r,u,c)),o.toggleClass(K.focusCell,i&&(!d||m)&&(!n||X.selectAdjacentDays&&n)&&!e),ne.helper.isTodayButton(o)||o.toggleClass(K.rangeCell,a&&!t&&!e))})}},refresh:function(){ne.create.calendar()},refreshTooltips:function(){var i=oe(D).width();ee.find("td[data-position]").each(function(){var e=oe(this),t=D.getComputedStyle(e[0],":after").width.replace(/[^0-9\.]/g,""),n=e.attr("data-position"),t=i-e.width()-(parseInt(t,10)||250)>e.offset().left?"right":"left";-1===n.indexOf(t)&&e.attr("data-position",n.replace(/(left|right)/,t))})},bind:{events:function(){ne.debug("Binding events"),ee.on("mousedown"+o,ne.event.mousedown),ee.on("touchstart"+o,ne.event.mousedown),ee.on("mouseup"+o,ne.event.mouseup),ee.on("touchend"+o,ne.event.mouseup),ee.on("mouseover"+o,ne.event.mouseover),l.length?(l.on("input"+o,ne.event.inputChange),l.on("focus"+o,ne.event.inputFocus),l.on("blur"+o,ne.event.inputBlur),l.on("keydown"+o,ne.event.keydown)):ee.on("keydown"+o,ne.event.keydown)}},unbind:{events:function(){ne.debug("Unbinding events"),ee.off(o),l.length&&l.off(o)}},event:{mouseover:function(e){var t=oe(e.target).data(Z.date),e=1===e.buttons;t&&ne.set.focusDate(t,!1,!0,e)},mousedown:function(e){l.length&&e.preventDefault(),m=0<=e.type.indexOf("touch");e=oe(e.target).data(Z.date);e&&ne.set.focusDate(e,!1,!0,!0)},mouseup:function(e){ne.focus(),e.preventDefault(),e.stopPropagation(),m=!1;var t,n,i,e=oe(e.target);e.hasClass("disabled")||(t=(e=(t=e.parent()).data(Z.date)||t.data(Z.focusDate)||t.data(Z.mode)?t:e).data(Z.date),n=e.data(Z.focusDate),i=e.data(Z.mode),t&&!1!==X.onSelect.call(u,t,ne.get.mode())?(e=e.hasClass(K.today),ne.selectDate(t,e)):n?ne.set.focusDate(n):i&&ne.set.mode(i))},keydown:function(e){var t,n,i,o,a,r,s,l=e.which;27!==l&&9!==l||ne.popup("hide"),ne.popup("is visible")&&(37===l||38===l||39===l||40===l?(o="day"===(r=ne.get.mode())?7:"hour"===r?4:"minute"===r?_.column:3,o=37===l?-1:38===l?-o:39==l?1:o,o*="minute"===r?X.minTimeGap:1,a=(t=ne.get.focusDate()||ne.get.date()||new Date).getFullYear()+("year"===r?o:0),s=t.getMonth()+("month"===r?o:0),n=t.getDate()+("day"===r?o:0),i=t.getHours()+("hour"===r?o:0),o=t.getMinutes()+("minute"===r?o:0),a=new Date(a,s,n,i,o),"time"===X.type&&(a=ne.helper.mergeDateTime(t,a)),ne.helper.isDateInRange(a,r)&&ne.set.focusDate(a)):13===l&&(r=ne.get.mode(),(s=ne.get.focusDate())&&!X.isDisabled(s,r)&&!ne.helper.isDisabled(s,r)&&ne.helper.isEnabled(s,r)&&ne.selectDate(s),e.preventDefault(),e.stopPropagation())),38!==l&&40!==l||(e.preventDefault(),ne.popup("show"))},inputChange:function(){var e=l.val(),e=n.date(e,X);ne.set.date(e,!1)},inputFocus:function(){ee.addClass(K.active)},inputBlur:function(){var e;ee.removeClass(K.active),X.formatInput&&(e=ne.get.date(),e=J.datetime(e,X),l.val(e)),g&&(ne.trigger.change(),g=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ne.check.disabled()})}}},observeChanges:function(){"MutationObserver"in D&&(e=new MutationObserver(ne.event.class.mutation),ne.debug("Setting up mutation observer",e),ne.observe.class())},disconnect:{classObserver:function(){l.length&&e&&e.disconnect()}},observe:{class:function(){l.length&&e&&e.observe(r[0],{attributes:!0})}},is:{disabled:function(){return r.hasClass(K.disabled)}},check:{disabled:function(){l.attr("tabindex",ne.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,n){return e=Date.UTC(e,t,n+3)/864e5,e=Math.floor(e/7),t=new Date(6048e5*e).getUTCFullYear(),e-Math.floor(Date.UTC(t,0,7)/6048e5)+1},date:function(){return ne.helper.sanitiseDate(r.data(Z.date))||null},inputDate:function(){return l.val()},focusDate:function(){return r.data(Z.focusDate)||null},startDate:function(){var e=ne.get.calendarModule(X.startCalendar);return(e?e.get.date():r.data(Z.startDate))||null},endDate:function(){var e=ne.get.calendarModule(X.endCalendar);return(e?e.get.date():r.data(Z.endDate))||null},minDate:function(){return r.data(Z.minDate)||null},maxDate:function(){return r.data(Z.maxDate)||null},monthOffset:function(){return r.data(Z.monthOffset)||0},mode:function(){var e=r.data(Z.mode)||X.startMode;return ne.get.validatedMode(e)},validatedMode:function(e){var t=ne.get.validModes();return 0<=oe.inArray(e,t)?e:"time"===X.type?"hour":"month"===X.type?"month":"year"===X.type?"year":"day"},type:function(){return r.data(Z.type)||X.type},validModes:function(){var e=[];return"time"!==X.type&&(X.disableYear&&"year"!==X.type||e.push("year"),(X.disableMonth||"year"===X.type)&&"month"!==X.type||e.push("month"),0<=X.type.indexOf("date")&&e.push("day")),0<=X.type.indexOf("time")&&(e.push("hour"),X.disableMinute||e.push("minute")),e},isTouch:function(){try{return k.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e=e instanceof oe?e:oe(e).first()).data(a):null}},set:{date:function(e,t,n){t=!1!==t,n=!1!==n,e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var i=ne.get.mode(),o=J.datetime(e,X);if(n&&!1===X.onBeforeChange.call(u,e,o,i))return!1;if(ne.set.focusDate(e),X.isDisabled(e,i))return!1;var a=ne.get.endDate();a&&e&&a=e?ne.verbose("Unable to set maxDate variable lower that minDate variable",e,X.minDate):(ne.setting("maxDate",e),ne.set.dataKeyValue(Z.maxDate,e))},monthOffset:function(e,t){var n=Math.max(X.multiMonth,1);e=Math.max(1-n,Math.min(0,e)),ne.set.dataKeyValue(Z.monthOffset,e,t)},mode:function(e,t){ne.set.dataKeyValue(Z.mode,e,t)},dataKeyValue:function(e,t,n){var i=r.data(e),i=i===t||i<=t&&t<=i;return t?r.data(e,t):r.removeData(e),(n=!1!==n&&!i)&&ne.refresh(),!i}},selectDate:function(e,t){ne.verbose("New date selection",e);var n=ne.get.mode();t||"minute"===n||X.disableMinute&&"hour"===n||"date"===X.type&&"day"===n||"month"===X.type&&"month"===n||"year"===X.type&&"year"===n?!1!==ne.set.date(e)&&(g=!0,X.closable&&(ne.popup("hide"),(t=ne.get.calendarModule(X.endCalendar))&&("focus"!==t.setting("on")&&t.popup("show"),t.focus()))):(t="year"===n?X.disableMonth?"day":"month":"month"===n?"day":"day"===n?"hour":"minute",ne.set.mode(t),"hour"===n||"day"===n&&ne.get.date()?ne.set.date(e,!0,!1):ne.set.focusDate(e))},changeDate:function(e){ne.set.date(e)},clear:function(){ne.set.date(ae)},popup:function(){return c.popup.apply(c,arguments)},focus:function(){(l.length?l:ee).focus()},blur:function(){(l.length?l:ee).blur()},helper:{isDisabled:function(n,i){return("day"===i||"month"===i||"year"===i)&&("day"===i&&-1!==X.disabledDaysOfWeek.indexOf(n.getDay())||X.disabledDates.some(function(e){return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?ne.helper.dateEqual(n,e,i):null!==e&&"object"==typeof e?e[Z.year]?"number"==typeof e[Z.year]?n.getFullYear()==e[Z.year]:Array.isArray(e[Z.year])?-1=t.centuryBreak&&n===v.length-1){i<=99&&(i+=t.currentCentury-100),m=i,v.splice(n,1);break}if(f<0)for(n=0;n .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(e){var t,n=T("").addClass("ui dimmer");return e.displayLoader&&(t=T("").addClass(e.className.loader).addClass(e.loaderVariation),e.loaderText&&(t.text(e.loaderText),t.addClass("text")),n.append(t)),n}}}}(jQuery,window,document),function(te,ne,ie,oe){"use strict";te.isFunction=te.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ne=void 0!==ne&&ne.Math==Math?ne:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),te.fn.dropdown=function(W){var B,Y=te(this),$=te(ie),Q=Y.selector||"",G="ontouchstart"in ie.documentElement,X=G?"touchstart":"click",K=(new Date).getTime(),J=[],Z=W,_="string"==typeof Z,ee=[].slice.call(arguments,1);return Y.each(function(L){var d,e,t,n,i,o,a,r,s,f=te.isPlainObject(W)?te.extend(!0,{},te.fn.dropdown.settings,W):te.extend({},te.fn.dropdown.settings),m=f.className,p=f.message,l=f.fields,g=f.keys,h=f.metadata,j=f.namespace,c=f.regExp,v=f.selector,u=f.error,N=f.templates,b="."+j,y="module-"+j,w=te(this),x=te(f.context),C=w.find(v.text),T=w.find(v.search),S=w.find(v.sizer),D=w.find(v.input),H=w.find(v.icon),V=w.find(v.clearIcon),k=0").html(i).attr("data-"+h.value,t).attr("data-"+h.text,t).addClass(m.addition).addClass(m.item),f.hideAdditions&&i.addClass(m.hidden),n=n===oe?i:n.add(i),q.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=q.get.userValues();t&&(q.debug("Adding user labels",t),te.each(t,function(e,t){q.verbose("Adding custom user value"),q.add.label(t,t)}))},menu:function(){A=te("").addClass(m.menu).appendTo(w)},sizer:function(){S=te("").addClass(m.sizer).insertAfter(T)}},search:function(e){e=e!==oe?e:q.get.query(),q.verbose("Searching for query",e),!1===f.fireOnInit&&q.is.initialLoad()?q.verbose("Skipping callback on initial load",f.onSearch):q.has.minCharacters(e)&&!1!==f.onSearch.call(P,e)?q.filter(e):q.hide(null,!0)},select:{firstUnfiltered:function(){q.verbose("Selecting first non-filtered element"),q.remove.selectedItem(),E.not(v.unselectable).not(v.addition+v.hidden).eq(0).addClass(m.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(v.item).not(v.unselectable).eq(0),e=e.prevAll(v.item).not(v.unselectable).eq(0);0").addClass("remove icon").insertBefore(C)),q.is.search()&&!q.has.search()&&(q.verbose("Adding search input"),T=te("").addClass(m.search).prop("autocomplete",q.is.chrome()?"fomantic-search":"off").insertBefore(C)),q.is.multiple()&&q.is.searchSelection()&&!q.has.sizer()&&q.create.sizer(),f.allowTab&&q.set.tabbable()},select:function(){var e=q.get.selectValues();q.debug("Dropdown initialized on a select",e),0<(D=w.is("select")?w:D).parent(v.dropdown).length?(q.debug("UI dropdown already exists. Creating dropdown menu only"),w=D.closest(v.dropdown),q.has.menu()||q.create.menu(),A=w.children(v.menu),q.setup.menu(e)):(q.debug("Creating entire dropdown from select"),w=te("").attr("class",D.attr("class")).addClass(m.selection).addClass(m.dropdown).html(N.dropdown(e,l,f.preserveHTML,f.className)).insertBefore(D),D.hasClass(m.multiple)&&!1===D.prop("multiple")&&(q.error(u.missingMultiple),D.prop("multiple",!0)),D.is("[multiple]")&&q.set.multiple(),D.prop("disabled")&&(q.debug("Disabling dropdown"),w.addClass(m.disabled)),D.removeAttr("required").removeAttr("class").detach().prependTo(w)),q.refresh()},menu:function(e){A.html(N.menu(e,l,f.preserveHTML,f.className)),E=A.find(v.item),F=f.hideDividers?E.parent().children(v.divider):te()},reference:function(){q.debug("Dropdown behavior was called on select, replacing with closest dropdown"),w=w.parent(v.dropdown),I=w.data(y),P=w.get(0),q.refresh(),q.setup.returnedObject()},returnedObject:function(){var e=Y.slice(0,L),t=Y.slice(L+1);Y=e.add(w).add(t)}},refresh:function(){q.refreshSelectors(),q.refreshData()},refreshItems:function(){E=A.find(v.item),F=f.hideDividers?E.parent().children(v.divider):te()},refreshSelectors:function(){q.verbose("Refreshing selector cache"),C=w.find(v.text),T=w.find(v.search),D=w.find(v.input),H=w.find(v.icon),k=0"),te.each(e,function(e,t){var n=f.templates.deQuote(t[l.value]),t=f.templates.escape(t[l.name]||"",f.preserveHTML);D.append('")}),q.observe.select())}},event:{change:function(){U||(q.debug("Input changed, updating selection"),q.set.selected())},focus:function(){f.showOnFocus&&!O&&q.is.hidden()&&!t&&(R=!0,q.show())},blur:function(e){t=ie.activeElement===this,O||t||(q.remove.activeLabel(),q.hide())},mousedown:function(){q.is.searchSelection()?n=!0:O=!0},mouseup:function(){q.is.searchSelection()?n=!1:O=!1},click:function(e){te(e.target).is(w)&&(q.is.focusedOnSearch()?q.show():q.focusSearch())},search:{focus:function(e){O=!0,q.is.multiple()&&q.remove.activeLabel(),R||q.is.active()||!(f.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||(R=!0,q.search())},blur:function(e){t=ie.activeElement===this,!q.is.searchSelection()||n||z||t||(f.forceSelection?q.forceSelection():f.allowAdditions||q.remove.searchTerm(),q.hide()),n=!1}},clearIcon:{click:function(e){q.clear(),q.is.searchSelection()&&q.remove.searchTerm(),q.hide(),e.stopPropagation()}},icon:{click:function(e){M=!0,q.has.search()?q.is.active()?q.blurSearch():f.showOnFocus?q.focusSearch():q.toggle():q.toggle(),e.stopPropagation()}},text:{focus:function(e){O=!0,q.focusSearch()}},input:function(e){(q.is.multiple()||q.is.searchSelection())&&q.set.filtered(),clearTimeout(q.timer),q.timer=setTimeout(q.search,f.delay.search)},label:{click:function(e){var t=te(this),n=w.find(v.label),i=n.filter("."+m.active),o=t.nextAll("."+m.active),a=t.prevAll("."+m.active),o=(0 modified, recreating menu"),q.is.selectMutation(e)&&(q.disconnect.selectObserver(),q.refresh(),q.setup.select(),q.set.selected(),q.observe.select())}},menu:{mutation:function(e){var e=e[0],t=e.addedNodes?te(e.addedNodes[0]):te(!1),e=e.removedNodes?te(e.removedNodes[0]):te(!1),t=t.add(e),e=t.is(v.addition)||0=f.maxSelections?(q.debug("Maximum selection count reached"),f.useLabels&&(E.addClass(m.filtered),q.add.message(p.maxSelections)),!0):(q.verbose("No longer at maximum selection count"),q.remove.message(),q.remove.filteredItem(),q.is.searchSelection()&&q.filterItems(),!1))},disabled:function(){T.attr("tabindex",q.is.disabled()?-1:0)}},restore:{defaults:function(e){q.clear(e),q.restore.defaultText(),q.restore.defaultValue()},defaultText:function(){var e=q.get.defaultText();e===q.get.placeholderText?(q.debug("Restoring default placeholder text",e),q.set.placeholderText(e)):(q.debug("Restoring default text",e),q.set.text(e))},placeholderText:function(){q.set.placeholderText()},defaultValue:function(){var e=q.get.defaultValue();e!==oe&&(q.debug("Restoring default value",e),""!==e?(q.set.value(e),q.set.selected()):(q.remove.activeItem(),q.remove.selectedItem()))},labels:function(){f.allowAdditions&&(f.useLabels||(q.error(u.labels),f.useLabels=!0),q.debug("Restoring selected values"),q.create.userLabels()),q.check.maxSelections()},selected:function(){q.restore.values(),q.is.multiple()?(q.debug("Restoring previously selected values and labels"),q.restore.labels()):q.debug("Restoring previously selected values")},values:function(){q.set.initialLoad(),f.apiSettings&&f.saveRemoteData&&q.get.remoteValues()?q.restore.remoteValues():q.set.selected();var e=q.get.value();!e||""===e||Array.isArray(e)&&0===e.length?D.addClass(m.noselection):D.removeClass(m.noselection),q.remove.initialLoad()},remoteValues:function(){var e=q.get.remoteValues();q.debug("Recreating selected from session data",e),e&&(q.is.single()?te.each(e,function(e,t){q.set.text(t)}):te.each(e,function(e,t){q.add.label(e,t)}))}},read:{remoteData:function(e){if(ne.Storage!==oe)return(e=sessionStorage.getItem(e))!==oe&&e;q.error(u.noStorage)}},save:{defaults:function(){q.save.defaultText(),q.save.placeholderText(),q.save.defaultValue()},defaultValue:function(){var e=q.get.value();q.verbose("Saving default value as",e),w.data(h.defaultValue,e)},defaultText:function(){var e=q.get.text();q.verbose("Saving default text as",e),w.data(h.defaultText,e)},placeholderText:function(){var e;!1!==f.placeholder&&C.hasClass(m.placeholder)&&(e=q.get.text(),q.verbose("Saving placeholder text as",e),w.data(h.placeholderText,e))},remoteData:function(e,t){ne.Storage===oe?q.error(u.noStorage):(q.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e))}},clear:function(e){q.is.multiple()&&f.useLabels?q.remove.labels(w.find(v.label),e):(q.remove.activeItem(),q.remove.selectedItem(),q.remove.filteredItem()),q.set.placeholderText(),q.clearValue(e)},clearValue:function(e){q.set.value("",null,null,e)},scrollPage:function(e,t){var t=t||q.get.selectedItem(),n=t.closest(v.menu),i=n.outerHeight(),o=n.scrollTop(),a=E.eq(0).outerHeight(),i=Math.floor(i/a),o=(n.prop("scrollHeight"),"up"==e?o-a*i:o+a*i),a=E.not(v.unselectable),i="up"==e?a.index(t)-i:a.index(t)+i,i=("up"==e?0<=i:i").addClass(m.label).attr("data-"+h.value,a).html(N.label(a,t,f.preserveHTML,f.className)),i=f.onLabelCreate.call(i,a,t),q.has.label(e)?q.debug("User selection already exists, skipping",a):(f.label.variation&&i.addClass(f.label.variation),!0===n?(q.debug("Animating in label",i),i.addClass(m.hidden).insertBefore(o).transition({animation:f.label.transition,debug:f.debug,verbose:f.verbose,duration:f.label.duration})):(q.debug("Adding selection label",i),i.insertBefore(o)))},message:function(e){var t=A.children(v.message),e=f.templates.message(q.add.variables(e));0").html(e).addClass(m.message).appendTo(A)},optionValue:function(e){var t=q.escape.value(e);0").prop("value",t).addClass(m.addition).html(e).appendTo(D),q.verbose("Adding user addition as an