/*
* # Fomantic UI - 2.9.0-beta.298+8d87844
* https://github.com/fomantic/Fomantic-UI
* http://fomantic-ui.com/
*
* Copyright 2022 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
!function(re,T,k,oe){"use strict";re.isFunction=re.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},T=void 0!==T&&T.Math==Math?T:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),re.fn.calendar=function(g){var D,e=re(this),y=e.selector||"",v=(new Date).getTime(),b=[],C=g,w="string"==typeof C,M=[].slice.call(arguments,1),x={5:{row:4,column:3},10:{row:3,column:2},15:{row:2,column:2},20:{row:3,column:1},30:{row:2,column:1}},ne=["","one","two","three","four","five","six","seven","eight"];return e.each(function(){var c,e,$=re.isPlainObject(g)?re.extend(!0,{},re.fn.calendar.settings,g):re.extend({},re.fn.calendar.settings),Q=$.className,t=$.namespace,n=$.selector,Z=$.formatter,a=$.parser,X=$.metadata,_=x[$.minTimeGap],s=$.error,r="."+t,o="module-"+t,i=re(this),l=i.find(n.input),ee=i.find(n.popup),d=i.find(n.activator),u=this,p=i.data(o),f=!1,te=i.hasClass(Q.inverted),m=!1,h=!1,ae={initialize:function(){ae.debug("Initializing calendar for",u,i),c=ae.get.isTouch(),ae.setup.config(),ae.setup.popup(),ae.setup.inline(),ae.setup.input(),ae.setup.date(),ae.create.calendar(),ae.bind.events(),ae.observeChanges(),ae.instantiate()},instantiate:function(){ae.verbose("Storing instance of calendar"),p=ae,i.data(o,p)},destroy:function(){ae.verbose("Destroying previous calendar for",u),i.removeData(o),ae.unbind.events(),ae.disconnect.classObserver()},setup:{config:function(){null!==ae.get.minDate()&&ae.set.minDate(i.data(X.minDate)),null!==ae.get.maxDate()&&ae.set.maxDate(i.data(X.maxDate)),ae.setting("type",ae.get.type()),ae.setting("on",$.on||(l.length?"focus":"click"))},popup:function(){var e,t,a;$.inline||(d.length||(d=i.children().first()).length)&&(re.fn.popup===oe?ae.error(s.popup):(ee.length||(e=0!==(t=d.parent()).closest(n.append).length?"appendTo":"prependTo",ee=re("
").addClass(Q.popup)[e](t)),ee.addClass(Q.calendar),te&&ee.addClass(Q.inverted),e=function(){return ae.refreshTooltips(),$.onVisible.apply(ee,arguments)},t=$.onHidden,l.length||(ee.attr("tabindex","0"),e=function(){return ae.refreshTooltips(),ae.focus(),$.onVisible.apply(ee,arguments)},t=function(){return ae.blur(),$.onHidden.apply(ee,arguments)}),a=ae.setting("on"),a=re.extend({},$.popupOptions,{popup:ee,on:a,hoverable:"hover"===a,closable:"click"===a,onShow:function(){return ae.set.focusDate(ae.get.date()),ae.set.mode(ae.get.validatedMode($.startMode)),$.onShow.apply(ee,arguments)},onVisible:e,onHide:$.onHide,onHidden:t}),ae.popup(a)))},inline:function(){d.length&&!$.inline||($.inline=!0,ee=re("").addClass(Q.calendar).appendTo(i),l.length||ee.attr("tabindex","0"))},input:function(){$.touchReadonly&&l.length&&c&&l.prop("readonly",!0),ae.check.disabled()},date:function(){var e;$.initialDate?e=a.date($.initialDate,$):i.data(X.date)!==oe?e=a.date(i.data(X.date),$):l.length&&(e=a.date(l.val(),$)),ae.set.date(e,$.formatInput,!1),ae.set.mode(ae.get.mode(),!1)}},trigger:{change:function(){var e,t=l[0];t&&(e=k.createEvent("HTMLEvents"),ae.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{calendar:function(){var e,t,S,a=ae.get.mode(),n=new Date,q=ae.get.date(),r=ae.get.focusDate(),o=ae.helper.dateInRange(r||q||$.initialDate||n),i=(r||ae.set.focusDate(r=o,!1,!1),"year"===a),s="month"===a,l="day"===a,d="hour"===a,u="minute"===a,W="time"===$.type,R=Math.max($.multiMonth,1),V=l?ae.get.monthOffset():0,c=o.getMinutes(),p=o.getHours(),f=o.getDate(),G=o.getMonth()+V,m=o.getFullYear(),h=l?$.showWeekNumbers?8:7:d?4:_.column,P=l||d?6:_.row,g=l?R:1,B=(D=ee).hasClass("left")?"right center":"left center";for(D.empty(),1").addClass(Q.grid).appendTo(D)),t=0;t").addClass(Q.column).appendTo(S));var D,y=G+t,K=(new Date(m,y,1).getDay()-$.firstDayOfWeek%7+7)%7,v=(!$.constantHeight&&l&&(v=new Date(m,y+1,0).getDate()+K,P=Math.ceil(v/7)),i?10:s?1:0),b=l?1:0,C=d||u?1:0,w=d||u?f:1,M=new Date(m-v,y-b,w-C,p),b=new Date(m+v,y+b,w+C,p),w=i?new Date(10*Math.ceil(m/10)-9,0,0):s?new Date(m,0,0):l?new Date(m,y,0):new Date(m,y,f,-1),C=i?new Date(10*Math.ceil(m/10)+1,0,1):s?new Date(m+1,0,1):l?new Date(m,y+1,1):new Date(m,y,f+1),x=a,x=(l&&$.showWeekNumbers&&(x+=" andweek"),re("").addClass(Q.table).addClass(x).addClass(ne[h]+" column").appendTo(D)),T=(te&&x.addClass(Q.inverted),h);if(!W){var U=re("").appendTo(x),k=re("
").appendTo(U),O=re(" | ").attr("colspan",""+h).appendTo(k),F=i||s?new Date(m,0,1):l?new Date(m,y,1):new Date(m,y,f,p,c),N=re("").addClass(Q.link).appendTo(O),F=(N.text(Z.header(F,a,$)),s?$.disableYear?"day":"year":l?$.disableMonth?"year":"month":"day");if(N.data(X.mode,F),0===t&&((N=re("").addClass(Q.prev).appendTo(O)).data(X.focusDate,M),N.toggleClass(Q.disabledCell,!ae.helper.isDateInRange(w,a)),re("").addClass(Q.prevIcon).appendTo(N)),t===g-1&&((F=re("").addClass(Q.next).appendTo(O)).data(X.focusDate,b),F.toggleClass(Q.disabledCell,!ae.helper.isDateInRange(C,a)),re("").addClass(Q.nextIcon).appendTo(F)),l)for(k=re("
").appendTo(U),$.showWeekNumbers&&((O=re(" | ").appendTo(k)).text($.text.weekNo),O.addClass(Q.weekCell),T--),A=0;A").appendTo(k)).text(Z.dayColumnHeader((A+$.firstDayOfWeek)%7,$))}for(var J=re("").appendTo(x),A=i?10*Math.ceil(m/10)-9:l?1-K:0,z=0;z").appendTo(J),l&&$.showWeekNumbers&&((O=re(" | ").appendTo(k)).text(ae.get.weekOfYear(m,y,A+1-$.firstDayOfWeek)),O.addClass(Q.weekCell)),e=0;e").addClass(Q.cell).appendTo(k)).text(Y),O.data(X.date,H),l&&H.getMonth()!==(y+12)%12),I=!$.selectAdjacentDays&&Y||!ae.helper.isDateInRange(H,a)||$.isDisabled(H,a)||ae.helper.isDisabled(H,a)||!ae.helper.isEnabled(H,a),j=(I?null!==(j=ae.helper.findDayAsObject(H,a,$.disabledDates))&&j[X.message]&&(O.attr("data-tooltip",j[X.message]),O.attr("data-position",j[X.position]||B),(j[X.inverted]||te&&j[X.inverted]===oe)&&O.attr("data-inverted",""),j[X.variation]&&O.attr("data-variation",j[X.variation])):null!==(E=ae.helper.findDayAsObject(H,a,$.eventDates))&&(O.addClass(E[X.class]||$.eventClass),E[X.message]&&(O.attr("data-tooltip",E[X.message]),O.attr("data-position",E[X.position]||B),(E[X.inverted]||te&&E[X.inverted]===oe)&&O.attr("data-inverted",""),E[X.variation]&&O.attr("data-variation",E[X.variation]))),ae.helper.dateEqual(H,q,a)),L=ae.helper.dateEqual(H,n,a),Y=(O.toggleClass(Q.adjacentCell,Y&&!E),O.toggleClass(Q.disabledCell,I),O.toggleClass(Q.activeCell,j&&!(Y&&I)),d||u||O.toggleClass(Q.todayCell,!Y&&L),{mode:a,adjacent:Y,disabled:I,active:j,today:L});Z.cell(O,H,Y),ae.helper.dateEqual(H,r,a)&&ae.set.focusDate(H,!1,!1)}$.today&&(M=re("
").appendTo(J),(w=re(" | ").attr("colspan",""+h).addClass(Q.today).appendTo(M)).text(Z.today($)),w.data(X.date,n)),ae.update.focus(!1,x),$.inline&&ae.refreshTooltips()}}},update:{focus:function(e,t){t=t||ee;var i=ae.get.mode(),a=ae.get.date(),s=ae.get.focusDate(),l=ae.get.startDate(),d=ae.get.endDate(),u=(e?s:null)||a||(c?null:s);t.find("td").each(function(){var e,t,a,n,r=re(this),o=r.data(X.date);o&&(e=r.hasClass(Q.disabledCell),t=r.hasClass(Q.activeCell),a=r.hasClass(Q.adjacentCell),n=ae.helper.dateEqual(o,s,i),o=!!u&&(!!l&&ae.helper.isDateInRange(o,i,l,u)||!!d&&ae.helper.isDateInRange(o,i,u,d)),r.toggleClass(Q.focusCell,n&&(!c||f)&&(!a||$.selectAdjacentDays&&a)&&!e),ae.helper.isTodayButton(r)||r.toggleClass(Q.rangeCell,o&&!t&&!e))})}},refresh:function(){ae.create.calendar()},refreshTooltips:function(){var n=re(T).width();ee.find("td[data-position]").each(function(){var e=re(this),t=T.getComputedStyle(e[0],":after").width.replace(/[^0-9\.]/g,""),a=e.attr("data-position"),t=n-e.width()-(parseInt(t,10)||250)>e.offset().left?"right":"left";-1===a.indexOf(t)&&e.attr("data-position",a.replace(/(left|right)/,t))})},bind:{events:function(){ae.debug("Binding events"),ee.on("mousedown"+r,ae.event.mousedown),ee.on("touchstart"+r,ae.event.mousedown),ee.on("mouseup"+r,ae.event.mouseup),ee.on("touchend"+r,ae.event.mouseup),ee.on("mouseover"+r,ae.event.mouseover),l.length?(l.on("input"+r,ae.event.inputChange),l.on("focus"+r,ae.event.inputFocus),l.on("blur"+r,ae.event.inputBlur),l.on("keydown"+r,ae.event.keydown)):ee.on("keydown"+r,ae.event.keydown)}},unbind:{events:function(){ae.debug("Unbinding events"),ee.off(r),l.length&&l.off(r)}},event:{mouseover:function(e){var t=re(e.target).data(X.date),e=1===e.buttons;t&&ae.set.focusDate(t,!1,!0,e)},mousedown:function(e){l.length&&e.preventDefault(),f=0<=e.type.indexOf("touch");e=re(e.target).data(X.date);e&&ae.set.focusDate(e,!1,!0,!0)},mouseup:function(e){ae.focus(),e.preventDefault(),e.stopPropagation(),f=!1;var t,a,n,e=re(e.target);e.hasClass("disabled")||(t=(e=(t=e.parent()).data(X.date)||t.data(X.focusDate)||t.data(X.mode)?t:e).data(X.date),a=e.data(X.focusDate),n=e.data(X.mode),t&&!1!==$.onSelect.call(u,t,ae.get.mode())?(e=e.hasClass(Q.today),ae.selectDate(t,e)):a?ae.set.focusDate(a):n&&ae.set.mode(n))},keydown:function(e){var t,a,n,r,o,i,s,l=e.which;27!==l&&9!==l||ae.popup("hide"),ae.popup("is visible")&&(37===l||38===l||39===l||40===l?(r="day"===(i=ae.get.mode())?7:"hour"===i?4:"minute"===i?_.column:3,r=37===l?-1:38===l?-r:39==l?1:r,r*="minute"===i?$.minTimeGap:1,o=(t=ae.get.focusDate()||ae.get.date()||new Date).getFullYear()+("year"===i?r:0),s=t.getMonth()+("month"===i?r:0),a=t.getDate()+("day"===i?r:0),n=t.getHours()+("hour"===i?r:0),r=t.getMinutes()+("minute"===i?r:0),o=new Date(o,s,a,n,r),"time"===$.type&&(o=ae.helper.mergeDateTime(t,o)),ae.helper.isDateInRange(o,i)&&ae.set.focusDate(o)):13===l&&(i=ae.get.mode(),(s=ae.get.focusDate())&&!$.isDisabled(s,i)&&!ae.helper.isDisabled(s,i)&&ae.helper.isEnabled(s,i)&&ae.selectDate(s),e.preventDefault(),e.stopPropagation())),38!==l&&40!==l||(e.preventDefault(),ae.popup("show"))},inputChange:function(){var e=l.val(),e=a.date(e,$);ae.set.date(e,!1)},inputFocus:function(){ee.addClass(Q.active)},inputBlur:function(){var e;ee.removeClass(Q.active),$.formatInput&&(e=ae.get.date(),e=Z.datetime(e,$),l.val(e)),h&&(ae.trigger.change(),h=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ae.check.disabled()})}}},observeChanges:function(){"MutationObserver"in T&&(e=new MutationObserver(ae.event.class.mutation),ae.debug("Setting up mutation observer",e),ae.observe.class())},disconnect:{classObserver:function(){l.length&&e&&e.disconnect()}},observe:{class:function(){l.length&&e&&e.observe(i[0],{attributes:!0})}},is:{disabled:function(){return i.hasClass(Q.disabled)}},check:{disabled:function(){l.attr("tabindex",ae.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,a){return e=Date.UTC(e,t,a+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 ae.helper.sanitiseDate(i.data(X.date))||null},inputDate:function(){return l.val()},focusDate:function(){return i.data(X.focusDate)||null},startDate:function(){var e=ae.get.calendarModule($.startCalendar);return(e?e.get.date():i.data(X.startDate))||null},endDate:function(){var e=ae.get.calendarModule($.endCalendar);return(e?e.get.date():i.data(X.endDate))||null},minDate:function(){return i.data(X.minDate)||null},maxDate:function(){return i.data(X.maxDate)||null},monthOffset:function(){return i.data(X.monthOffset)||0},mode:function(){var e=i.data(X.mode)||$.startMode;return ae.get.validatedMode(e)},validatedMode:function(e){var t=ae.get.validModes();return 0<=re.inArray(e,t)?e:"time"===$.type?"hour":"month"===$.type?"month":"year"===$.type?"year":"day"},type:function(){return i.data(X.type)||$.type},validModes:function(){var e=[];return"time"!==$.type&&($.disableYear&&"year"!==$.type||e.push("year"),($.disableMonth||"year"===$.type)&&"month"!==$.type||e.push("month"),0<=$.type.indexOf("date")&&e.push("day")),0<=$.type.indexOf("time")&&(e.push("hour"),$.disableMinute||e.push("minute")),e},isTouch:function(){try{return k.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e=e instanceof re?e:re(e).first()).data(o):null}},set:{date:function(e,t,a){t=!1!==t,a=!1!==a,e=ae.helper.sanitiseDate(e),e=ae.helper.dateInRange(e);var n=ae.get.mode(),r=Z.datetime(e,$);if(a&&!1===$.onBeforeChange.call(u,e,r,n))return!1;if(ae.set.focusDate(e),$.isDisabled(e,n))return!1;var o=ae.get.endDate();o&&e&&o=e?ae.verbose("Unable to set maxDate variable lower that minDate variable",e,$.minDate):(ae.setting("maxDate",e),ae.set.dataKeyValue(X.maxDate,e))},monthOffset:function(e,t){var a=Math.max($.multiMonth,1);e=Math.max(1-a,Math.min(0,e)),ae.set.dataKeyValue(X.monthOffset,e,t)},mode:function(e,t){ae.set.dataKeyValue(X.mode,e,t)},dataKeyValue:function(e,t,a){var n=i.data(e),n=n===t||n<=t&&t<=n;return t?i.data(e,t):i.removeData(e),(a=!1!==a&&!n)&&ae.refresh(),!n}},selectDate:function(e,t){ae.verbose("New date selection",e);var a=ae.get.mode();t||"minute"===a||$.disableMinute&&"hour"===a||"date"===$.type&&"day"===a||"month"===$.type&&"month"===a||"year"===$.type&&"year"===a?!1!==ae.set.date(e)&&(h=!0,$.closable&&(ae.popup("hide"),(t=ae.get.calendarModule($.endCalendar))&&("focus"!==t.setting("on")&&t.popup("show"),t.focus()))):(t="year"===a?$.disableMonth?"day":"month":"month"===a?"day":"day"===a?"hour":"minute",ae.set.mode(t),"hour"===a||"day"===a&&ae.get.date()?ae.set.date(e,!0,!1):ae.set.focusDate(e))},changeDate:function(e){ae.set.date(e)},clear:function(){ae.set.date(oe)},popup:function(){return d.popup.apply(d,arguments)},focus:function(){(l.length?l:ee).focus()},blur:function(){(l.length?l:ee).blur()},helper:{isDisabled:function(a,n){return("day"===n||"month"===n||"year"===n)&&("day"===n&&-1!==$.disabledDaysOfWeek.indexOf(a.getDay())||$.disabledDates.some(function(e){return(e="string"==typeof e?ae.helper.sanitiseDate(e):e)instanceof Date?ae.helper.dateEqual(a,e,n):null!==e&&"object"==typeof e?e[X.year]?"number"==typeof e[X.year]?a.getFullYear()==e[X.year]:Array.isArray(e[X.year])?-1=t.centuryBreak&&a===D.length-1){n<=99&&(n+=t.currentCentury-100),f=n,D.splice(a,1);break}if(p<0)for(a=0;a