jQuery((function(e){const i=e(".tribe-mini-calendar-wrapper").parent();function n(){const i=e(".tribe-mini-calendar-wrapper");if(e(".tribe-mini-calendar-wrapper.layout-wide").length&&e(".tribe-mini-calendar-right").length){const n=e(".tribe-mini-calendar-right"),t=i.height();let a=n.outerHeight();a+=20,a>t?i.css("height",a+"px"):i.css("height","auto")}else e(".tribe-mini-calendar-wrapper.layout-wide").length&&i.css("height","auto")}n();const t=new Date,a=t.getDate().toString(),r=(t.getMonth()+1).toString(),s=t.getFullYear().toString()+"-"+(r[1]?r:"0"+r[0])+"-"+(a[1]?a:"0"+a[0]),c=s.slice(0,7);i.on("click",".tribe-mini-calendar-nav-link",(function(i){i.preventDefault();const t=e(this),a=t.closest(".tribe-mini-calendar"),r=t.closest(".tribe-mini-calendar-wrapper");let l=t.attr("data-month"),o=l.slice(0,7);c==o&&(l=s);const d={action:"tribe-mini-cal",eventDate:l,count:a.data("count"),tax_query:a.data("tax-query"),nonce:a.data("nonce")};a.find(".tribe-mini-calendar-nav div > span").addClass("active").siblings("#ajax-loading-mini").show(),e.post(TribeMiniCalendar.ajaxurl,d,(function(i){if(a.find(".tribe-mini-calendar-list-wrapper").remove(),i.success){const t=e.parseHTML(i.html);a.find(".tribe-mini-calendar-nav div > span").removeClass("active").siblings("#ajax-loading-mini").hide(),r.replaceWith(t),n()}}))})).on("click",".tribe-mini-calendar-day-link",(function(i){i.preventDefault();const t=e(this),a=t.attr("data-day"),r=t.text(),s=t.closest(".tribe-mini-calendar"),c=s.parent().siblings(".tribe-mini-calendar-list-wrapper");var l;e("h2.tribe-mini-calendar-title").text(e("#tribe-mini-calendar-month-name").val()+" "+r+" Events"),(l=t).closest(".tribe-mini-calendar").find(".tribe-events-thismonth,.tribe-events-othermonth").removeClass("tribe-mini-calendar-today"),l.parents(".tribe-events-has-events").addClass("tribe-mini-calendar-today");const o={action:"tribe-mini-cal-day",eventDate:a,count:s.data("count"),tax_query:s.data("tax-query"),nonce:s.data("nonce")};s.find(".tribe-mini-calendar-nav div > span").addClass("active").siblings("#ajax-loading-mini").show(),e.post(TribeMiniCalendar.ajaxurl,o,(function(i){if(i.success){let t="";t="function"==typeof e.fn.parseHTML?e.parseHTML(i.html):i.html,s.find(".tribe-mini-calendar-nav div > span").removeClass("active").siblings("#ajax-loading-mini").hide(),c.replaceWith(t),n()}}))}))})),window.tec=window.tec||{},window.tec.eventsPro=window.tec.eventsPro||{},window.tec.eventsPro.widgetCalendar={};