tribe.events=tribe.events||{},tribe.events.views=tribe.events.views||{},tribe.events.views.weekDaySelector={},function(e,t){"use strict";var a=e(document);t.selectors={daySelectorDay:'[data-js="tribe-events-pro-week-day-selector-day"]',daySelectorDayActiveClass:".tribe-events-pro-week-day-selector__day--active",mobileEventsDayActiveClass:".tribe-events-pro-week-mobile-events__day--active"},t.setOpenTabA11yAttrs=function(e,t){e.attr("aria-selected","true"),t.attr("aria-hidden","false")},t.setCloseTabA11yAttrs=function(e,t){e.attr("aria-selected","false"),t.attr("aria-hidden","true")},t.openDay=function(e,a){e.attr("aria-controls")&&(t.setOpenTabA11yAttrs(e,a),a.css("display","block")),e.addClass(t.selectors.daySelectorDayActiveClass.className()),a.addClass(t.selectors.mobileEventsDayActiveClass.className())},t.closeDay=function(e,a){e.attr("aria-controls")&&(t.setCloseTabA11yAttrs(e,a),a.css("display","")),e.removeClass(t.selectors.daySelectorDayActiveClass.className()),a.removeClass(t.selectors.mobileEventsDayActiveClass.className())},t.closeAllDays=function(a){a.find(t.selectors.daySelectorDay).each((function(s,i){var n=e(i),c=n.attr("aria-controls"),r=e("");c&&(r=a.find("#"+c)),t.closeDay(n,r)}))},t.handleClick=function(a){var s=a.data.container,i=e(a.data.target),n=i.attr("aria-controls"),c=e("");n&&(c=s.find("#"+n)),t.closeAllDays(s),t.openDay(i,c)},t.deinitDaySelector=function(a){a.find(t.selectors.daySelector).find(t.selectors.daySelectorDay).each((function(a,s){e(s).off("click",t.handleClick)}))},t.initDaySelector=function(a){a.find(t.selectors.daySelectorDay).each((function(s,i){e(i).on("click",{target:i,container:a},t.handleClick)}))},t.deinit=function(e,a,s){var i=e.data.container;t.deinitDaySelector(i),i.off("beforeAjaxSuccess.tribeEvents",t.deinit)},t.init=function(e,a,s,i){"week"!==i.slug&&"widget-week"!==i.slug||(t.initDaySelector(s),s.on("beforeAjaxSuccess.tribeEvents",{container:s},t.deinit))},t.ready=function(){a.on("afterSetup.tribeEvents",tribe.events.views.manager.selectors.container,t.init)},e(t.ready)}(jQuery,tribe.events.views.weekDaySelector),window.tec=window.tec||{},window.tec.eventsPro=window.tec.eventsPro||{},window.tec.eventsPro.views=window.tec.eventsPro.views||{},window.tec.eventsPro.views.weekDaySelector={};