tribe.events=tribe.events||{},tribe.events.views=tribe.events.views||{},tribe.events.views.weekDaySelector={},function(e,t){"use strict";var i=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.openDay=function(e,i){e.attr("aria-controls")&&tribe.events.views.accordion.openAccordion(e,i),e.addClass(t.selectors.daySelectorDayActiveClass.className())},t.closeDay=function(e,i){e.attr("aria-controls")&&tribe.events.views.accordion.closeAccordion(e,i),e.removeClass(t.selectors.daySelectorDayActiveClass.className()),i.removeClass(t.selectors.mobileEventsDayActiveClass.className())},t.closeAllDays=function(i){i.find(t.selectors.daySelectorDay).each((function(n,o){var a=e(o),c=a.attr("aria-controls"),s=e("");c&&(s=i.find("#"+c),tribe.events.views.accordion.closeAccordion(a,s)),t.closeDay(a,s)}))},t.handleClick=function(i){var n=i.data.container,o=e(i.data.target),a=o.attr("aria-controls"),c=e("");a&&(c=n.find("#"+a)),t.closeAllDays(n),t.openDay(o,c)},t.deinitDaySelector=function(i){i.find(t.selectors.daySelector).find(t.selectors.daySelectorDay).each((function(i,n){e(n).off("click",t.handleClick)}))},t.initDaySelector=function(i){i.find(t.selectors.daySelectorDay).each((function(n,o){e(o).on("click",{target:o,container:i},t.handleClick)}))},t.deinit=function(e,i,n){var o=e.data.container;t.deinitDaySelector(o),o.off("beforeAjaxSuccess.tribeEvents",t.deinit)},t.init=function(e,i,n,o){"week"!==o.slug&&"widget-week"!==o.slug||(t.initDaySelector(n),n.on("beforeAjaxSuccess.tribeEvents",{container:n},t.deinit))},t.ready=function(){i.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={};