1!function(e){"use strict";const t=(new window.StecHelper).lang;var n,a=new window.StecDB,i=window.moment;i.locale("en"),e.stecExtend=function(e,t){void 0===window.stachethemes_ec_extend&&(window.stachethemes_ec_extend=[]),t?(void 0===window.stachethemes_ec_extend[t]&&(window.stachethemes_ec_extend[t]=[]),window.stachethemes_ec_extend[t].push(e)):window.stachethemes_ec_extend.push(e)},function(){var t={};function n(){this.$instance=null,this.glob=[],this.init=function(e,t){this.glob=e,this.$instance=t,this.Controller(),this.mediaTrigger()}}n.prototype.mediaTrigger=function(){var t=this.$instance.width(),n=e("body").width(),a=e("#stec-layout-event-inner-"+this.glob.options.id);this.glob.options.general_settings.views.length>=7&&t<1015&&t>600?this.$instance.$top.addClass("stec-media-med"):this.$instance.$top.removeClass("stec-media-med"),t<=620?(this.$instance.removeClass("stec-media-med"),this.$instance.addClass("stec-media-small")):t<=870?(this.$instance.removeClass("stec-media-small"),this.$instance.addClass("stec-media-med")):this.$instance.removeClass("stec-media-med stec-media-small"),a.length>0&&(n>=870?a.addClass("stec-media-med").removeClass("stec-media-small"):a.addClass("stec-media-small").removeClass("stec-media-med"))},n.prototype.Controller=function(){var t=this;e(window).on("resize stec-trigger-resize",(function(){t.mediaTrigger()}))},e.stecExtend((function(e){if(!0!==t[e.glob.options.id]){(new n).init(e.glob,e.$instance),t[e.glob.options.id]=!0}}),"onLayoutSet")}(),window.StecAnimate=function(){var t=270;this.eventHolder={open:function(n,a,i){if(n.show(),i)return n.find(".stec-layout-event-preview").addClass("stec-layout-event-preview-animate-complete"),void("function"==typeof a&&a());n.find(".stec-layout-event").addClass("stec-layout-event-perspective stec-layout-event-animate-queue"),n.find(".stec-layout-event-preview").each((function(n){var a=e(this);setTimeout((function(){a.parent().removeClass("stec-layout-event-animate-queue"),a.addClass("stec-layout-event-preview-animate"),setTimeout((function(){a.removeClass("stec-layout-event-preview-animate"),a.addClass("stec-layout-event-preview-animate-complete")}),t)}),n*t)})),setTimeout((function(){n.find(".stec-layout-event").removeClass("stec-layout-event-perspective"),"function"==typeof a&&a()}),n.find(".stec-layout-event-preview").length*t)}},this.agenda={openSingle:function(e,n,a){var i=null;if(a)return(i=e.find(".stec-layout-event-preview")).addClass("stec-layout-event-preview-animate-complete"),void("function"==typeof n&&n());e.addClass("stec-layout-event-perspective"),(i=e.find(".stec-layout-event-preview")).addClass("stec-layout-event-preview-animate"),setTimeout((function(){i.removeClass("stec-layout-event-preview-animate"),i.addClass("stec-layout-event-preview-animate-complete")}),t),setTimeout((function(){e.removeClass("stec-layout-event-perspective"),"function"==typeof n&&n()}),t)},fillList:function(n,a,i){var s=n.find(".stec-layout-agenda-events-all").find(".stec-layout-event-preview").not(".stec-layout-event-preview-animate-complete");if(i)return s.addClass("stec-layout-event-preview-animate-complete"),void("function"==typeof a&&a());s.each((function(n){var a=e(this);a.parent().addClass("stec-layout-event-perspective stec-layout-event-animate-queue"),setTimeout((function(){a.addClass("stec-layout-event-preview-animate"),a.parent().removeClass("stec-layout-event-animate-queue"),setTimeout((function(){a.removeClass("stec-layout-event-preview-animate"),a.addClass("stec-layout-event-preview-animate-complete")}),t)}),n*t)})),setTimeout((function(){s.removeClass("stec-layout-event-perspective"),"function"==typeof a&&a()}),s.length*t)}},this.tooltip={t:null,clear:function(){clearTimeout(this.t)},show:function(e,t){e.show().addClass("stec-tooltip-show"),this.t=setTimeout((function(){"function"==typeof t&&t()}),250)},hide:function(e,t){e.removeClass("stec-tooltip-show"),this.t=setTimeout((function(){"function"==typeof t&&t()}),250)}}},e(document).on("onEventToggleOpen",(function(t,n){var s,o,r,l,c,d,u,p,f,h,v,m,g=0;if(!(n.event.attendance.length<=0||(s=n.helper,o=n.glob,r=n.$container,l=r.find(".stec-layout-event-inner-attendance"),c=n.event,d=i(n.event.start_date).add(n.repeatOffset,"seconds").format("YYYY-MM-DD"),l.length<=0||!0===l.data("loaded")))){if(l.data("loaded",!0),u=e("#stec-layout-event-inner-attendance-attendee-template").html(),m=s.attendanceHasFreeSlots(c,d),c.attendance.length>0&&e(c.attendance).each((function(t){var n,a=this;n=e(u).html((function(e,t){var n="";switch(parseInt(a.status[d],10)){case 1:n="fa fa-check";break;case 2:n="fa fa-times";break;default:n="fa fa-question"}return t.replace(/stec_replace_people/g,a.people).replace(/stec_replace_name/g,a.name).replace(/#stec_replace_avatar/g,a.avatar).replace(/stec_replace_userid/g,a.userid?a.userid:"").replace(/stec_replace_status/g,'<li class=""><i class="'+n+'"></i></li>')})).appendTo(l.find(".stec-layout-event-inner-attendance-attendees")),1===parseInt(a.status[d],10)&&n.find(".stec-layout-event-inner-attendance-attendee-persons").show()})),p=!1,isNaN(o.options.userid)||e(c.attendance).each((function(){if(this.userid===o.options.userid)return p=!0,!1})),!0===p)switch(e(c.attendance).each((function(){if(this.userid===o.options.userid&&this.status[d])return g=parseInt(this.status[d],10),!1})),f=l.find(".stec-layout-event-inner-attendance-attendee-avatar").filter('[data-userid="'+o.options.userid+'"]'),9999===m&&l.find(".stec-layout-event-inner-attendance-invited").find(".stec-layout-event-inner-attendance-invited-slots-count").parent().hide(),l.find(".stec-layout-event-inner-attendance-invited").find(".stec-layout-event-inner-attendance-invited-slots-count").text(m),g){case 1:l.find(".stec-layout-event-inner-attendance-invited-buttons-accept").addClass("active"),l.find(".stec-layout-event-inner-attendance-invited-buttons-decline").removeClass("active"),f.find("li i").attr("class","fa fa-check");break;case 2:l.find(".stec-layout-event-inner-attendance-invited-buttons-accept").removeClass("active"),l.find(".stec-layout-event-inner-attendance-invited-buttons-decline").addClass("active"),f.find("li i").attr("class","fa fa-times")}else l.find(".stec-layout-event-inner-attendance-invited").remove();l.find(".stec-layout-event-inner-attendance-invited-buttons-accept").on(s.clickHandle(),(function(t){var a=n.glob.rsvp;t.preventDefault(),e(this).hasClass("active")?y(0):(a.settings.id=n.event.id,a.settings.offset=n.repeatOffset,a.settings.event=n.event,a.settings.date=i.tz(n.event.start_date,n.event.timezone).add(n.repeatOffset,"seconds").format("YYYY-MM-DD"),a.settings.update=!0,a.popOpen())})),l.find(".stec-layout-event-inner-attendance-invited-buttons-decline").on(s.clickHandle(),(function(t){t.preventDefault(),y(e(this).hasClass("active")?0:2)})),l.find(".stec-layout-event-inner-attendance-invited-buttons-unlist").on(s.clickHandle(),(function(e){e.preventDefault(),y(3)})),(h=i())>=(v=i.tz(c.start_date,c.timezone).add(n.repeatOffset,"seconds"))&&l.find(".stec-layout-event-inner-intro-attendance").hide(),h>=v&&l.find(".stec-layout-event-inner-attendance-invited").hide()}function y(t){var i=a.newRequest();i.setData({action:"stec_public_ajax_action",task:"set_user_event_attendance",event_id:c.id,date:d,status:t}),i.setBefore((function(){l.find(".stec-layout-event-inner-attendance-invited-buttons").hide(),e(o.template.preloader).appendTo(l.find(".stec-layout-event-inner-attendance-invited"))})),i.setCallback((function(t){var a,i,s=parseInt(t.status,10),u=null;switch(r.find(".stec-layout-event-inner-intro-attendance li").removeClass("active"),l.find(".stec-layout-event-inner-attendance-invited-buttons li").removeClass("active"),i=(a=l.find(".stec-layout-event-inner-attendance-attendee-avatar").filter('[data-userid="'+o.options.userid+'"]')).parent(),s){case 1:r.find(".stec-layout-event-inner-intro-attendance-attend").addClass("active"),l.find(".stec-layout-event-inner-attendance-invited-buttons-accept").addClass("active"),a.find("li i").attr("class","fa fa-check"),i.find(".stec-layout-event-inner-attendance-attendee-persons").show();break;case 2:r.find(".stec-layout-event-inner-intro-attendance-decline").addClass("active"),l.find(".stec-layout-event-inner-attendance-invited-buttons-decline").addClass("active"),a.find("li i").attr("class","fa fa-times"),i.find(".stec-layout-event-inner-attendance-attendee-persons").hide();break;case 3:return u=[],e(c.attendance).each((function(){if(this.userid===o.options.userid)return!0;u.push(this)})),c.attendance=u,n.glob.rsvp.settings.update=!1,void n.helper.layout.set("layout");default:a.find("li i").attr("class","fa fa-question"),i.find(".stec-layout-event-inner-attendance-attendee-persons").hide()}e(c.attendance).each((function(){if(this.userid===o.options.userid)return this.status[d]=s,!1})),l.find(".stec-layout-event-inner-attendance-invited-buttons").css("display","flex"),l.find(".stec-layout-event-inner-attendance-invited").find(".stec-preloader").remove(),l.find(".stec-layout-event-inner-attendance-invited").find(".stec-layout-event-inner-attendance-invited-slots-count").text(t.slots_left)})),a.query(i)}}
1)),e.stecExtend((function(t){var n,a=t.helper,i=t.glob,s=function(a){var i,s,o,r,l,c=e(n);c.find("#disqus_thread").remove(),e('<div id="disqus_thread"></div>').appendTo(a),i=c.data("event-id"),s=parseInt(c.data("repeat-time-offset"),10),o=t.calData.getEventById(i).permalink+(s||""),r=t.glob.options.general_settings.disqus_shortname,l=a.parents(".stec-layout-event").find(".stec-layout-event-preview-left-text-title").text(),window.disqus_url=o,window.disqus_identifier="stecEventID"+i,window.disqus_title=l,void 0===window.DISQUS?e.ajax({type:"GET",url:"//"+r+".disqus.com/embed.js",dataType:"script",cache:!0}):window.DISQUS.reset({reload:!0})},o=function(a){var i=e(n),s=i.data("event-id"),o=parseInt(i.data("repeat-time-offset"),10),r=t.calData.getEventById(s).permalink+(o||"");e("#fb-root").length<=0&&e('<div id="fb-root"></div>').appendTo("body"),e('<div class="stec-fb-comments fb-comments" data-width="100%" data-href="'+r+'" data-numposts="5"></div>').appendTo(a),window.FB.XFBML.parse()};function r(e){switch(i.options.general_settings.comments_form){case"facebook":if(e.find(".stec-layout-event-inner-comments").find(".stec-fb-comments").length<=0){o(e.find(".stec-layout-event-inner-comments"));break}break;case"disqus":if(e.find(".stec-layout-event-inner-comments").find("#disqus_thread").length<=0){s(e.find(".stec-layout-event-inner-comments"));break}}}function l(e){e.find(".stec-layout-event-inner-top-tabs").children('.active[data-tab="stec-layout-event-inner-comments"]').length>0&&r(e)}n="modal"===t.glob.options.general_settings.open_event_in?"#stec-layout-event-inner-"+t.glob.options.id:t.instance+" .stec-layout-event.active .stec-layout-event-inner",e(document).on(a.clickHandle(),n+' .stec-layout-event-inner-top-tabs li[data-tab="stec-layout-event-inner-comments"]',(function(){r(e(n))})),e(document).on(a.clickHandle(),n+" .stec-layout-event-preview-right-event-toggle",(function(t){t.preventDefault(),t.stopPropagation(),l(e(n))})),e(document).on(a.clickHandle(),n+" .stec-layout-event",(function(t){t.preventDefault(),l(e(n))}))})),e.stecExtend((function(t){var n;0!==parseInt(t.glob.options.general_settings.show_create_event_form,10)&&(t.$instance.find(".stec-event-create-form").remove(),"agenda"===t.glob.options.view&&(n=e(t.glob.template.eventCreateForm).prependTo(t.$instance.$agenda.find(".stec-layout-events-form")),(new window.stecEventSubmissionForm).init({id:n.find(".stec-event-submission-form").attr("id"),master:t,create_event_form_allow_expired:t.glob.options.general_settings.create_event_form_allow_expired,create_event_form_allow_location_type:t.glob.options.general_settings.create_event_form_allow_location_type,display_privacy_agreement:t.glob.options.general_settings.display_privacy_agreement,captcha:t.glob.options.captcha,date_format:t.glob.options.general_settings.date_format,useremail:t.glob.options.useremail}),!1!==t.helper.animate&&setTimeout((function(){t.helper.animate.agenda.openSingle(t.$instance.$agenda.find(".stec-event-create-form"))}),0)))}),"onLayoutSet"),e.stecExtend((function(t){var n;0!==parseInt(t.glob.options.general_settings.show_create_event_form,10)&&-1!==e.inArray(t.glob.options.view,["month","week","day"])&&t.$instance["$"+t.glob.options.view].find(".stec-event-create-form").length<=0&&(n=e(t.glob.template.eventCreateForm).prependTo(t.$instance["$"+t.glob.options.view].find(".stec-layout-events")),(new window.stecEventSubmissionForm).init({id:n.find(".stec-event-submission-form").attr("id"),master:t,create_event_form_allow_expired:t.glob.options.general_settings.create_event_form_allow_expired,create_event_form_allow_location_type:t.glob.options.general_settings.create_event_form_allow_location_type,display_privacy_agreement:t.glob.options.general_settings.display_privacy_agreement,captcha:t.glob.options.captcha,date_format:t.glob.options.general_settings.date_format,useremail:t.glob.options.useremail}))}),"onEventHolderOpen"),e.stecExtend((function(t){0!==parseInt(t.glob.options.general_settings.show_create_event_form,10)&&(e(document).on(t.helper.clickHandle(),t.$instance.$agenda.path+" .stec-layout-event-create-form-inner",(function(e){e.stopPropagation()})),e(document).on(t.helper.clickHandle(),t.instance+" .stec-event-create-form,"+t.instance+" .stec-layout-event-create-form-preview-right-event-toggle",(function(t){var n;t.preventDefault(),t.stopPropagation(),(n=e(this).hasClass("stec-event-create-form")?e(this):e(this).parents(".stec-event-create-form")).toggleClass("active"),n.find(".stec-layout-event-create-form-preview-right-event-toggle").toggleClass("active")})))}
1)),e(document).on("onBeforeEventWeatherDataAjax",(function(t,n){var a,i,s=n.glob;a="modal"===n.glob.options.general_settings.open_event_in?"#stec-layout-event-inner-"+n.glob.options.id:"#"+n.glob.options.id+" .stec-layout-event.active .stec-layout-event-inner",(i=e(a).find(".stec-layout-event-inner-forecast")).wrapInner('<div class="stec-layout-event-inner-preload-wrap" />'),e(s.template.preloader).appendTo(i)})),e(document).on("onEventToggleOpen",(function(n,s){var o,r,l,c,d,u,p,f,h,v;function m(e,t){var n;return t||(t=4),n=Math.pow(10,t),(parseInt(e*n)/n).toFixed(t)}function g(e,t){switch(e){case"01d":return'<div class="stec-forecast-icon-clear-day"></div>';case"01n":return t?'<div class="stec-forecast-icon-clear-day"></div>':'<div class="stec-forecast-icon-clear-night"></div>';case"02d":case"04d":return'<div class="stec-forecast-icon-cloudy-day"></div>';case"02n":case"04n":return t?'<div class="stec-forecast-icon-cloudy-day"></div>':'<div class="stec-forecast-icon-cloudy-night"></div>';case"03d":case"03n":return'<div class="stec-forecast-icon-cloudy"></div>';case"50d":case"50n":return'<div class="stec-forecast-icon-mist"></div>';case"11d":case"11n":case"10d":case"10n":case"09d":case"09n":return'<div class="stec-forecast-icon-rain"></div>';case"sleet":return'<div class="stec-forecast-icon-sleet"></div>';case"13d":case"13n":return'<div class="stec-forecast-icon-snow"></div>'}}s.event.location.coordinates&&s.glob.options.general_settings.weather_api_key&&(o=s.glob,r=s.$instance,l=s.helper,c=s.$container,!0!==(d=c.find(".stec-layout-event-inner-forecast")).data("loaded")&&(p=function(){var e,t;s.event.forecast?s.event.forecast.error?v():f():(e=s.event.location.coordinates,(t=a.newRequest()).setData({action:"stec_public_ajax_action",task:"get_weather_data",location:function(){return(e=e.split(","))[0]=m(e[0]),e[1]=m(e[1]),e=e.join(",")}}),t.setBefore((function(){r.trigger("onBeforeEventWeatherDataAjax",{$instance:r,glob:o})})),t.setCallback((function(e){if(e){if(s.event.forecast||(s.event.forecast=e),s.event.forecast.error||!s.event.forecast)return void v();f()}else v();d.find(".stec-layout-event-inner-preload-wrap").children().first().unwrap(),d.find(".stec-layout-event-inner-preload-wrap").remove(),d.find(".stec-preloader").remove()})),a.query(t))},f=function(){var n,a=[],c=s.event.forecast;e(c.daily).each((function(t){var n,r,c,d;t>5||(r=g((n=this).weather[0].icon,!0),c=i.unix(n.dt).tz(s.event.timezone),d=l.beautifyTimespan(c,c,1),a[t]=e(u).html((function(e,t){var a=Math.round(n.temp.min),i=Math.round(5*(a-32)/9),s=Math.round(n.temp.max),l=Math.round(5*(s-32)/9);return t.replace(/\bstec_replace_date\b/g,d).replace(/\bstec_replace_min\b/g,"C"===o.options.general_settings.temp_units?i:a).replace(/\bstec_replace_max\b/g,"C"===o.options.general_settings.temp_units?l:s).replace(/\bstec_replace_temp_units\b/g,"C"===o.options.general_settings.temp_units?"C":"F").replace(/\bstec_replace_icon_div\b/g,r)}))[0].outerHTML)})),a=a.join(""),d.html((function(e,n){var r,d=g(c.current.weather[0].icon),u=
1Math.round(c.current.temp),p=Math.round(5*(u-32)/9),f=Math.round(c.current.feels_like),h=Math.round(5*(u-32)/9),v=Math.round(c.current.wind_speed),m=Math.round(1.609344*v),y=i.unix(c.current.dt).tz(s.event.timezone);return r=l.beautifyTimespan(y,y,1),n.replace(/\bstec_replace_current_summary_text\b/g,function(e){switch(e){case"01d":case"01n":return t("clear_sky");case"02d":case"02n":return t("partly_cloudy");case"03d":case"03n":case"04d":case"04n":return t("cloudy");case"09d":case"09n":case"10d":case"10n":return t("rain");case"11d":case"11n":return t("thunderstorm");case"13d":case"13n":return t("snow");case"50d":case"50n":return t("mist")}}(c.current.weather[0].icon)).replace(/\bstec_replace_today_date\b/g,r).replace(/\bstec_replace_location\b/g,l.capitalizeFirstLetter(s.event.location.full_address)).replace(/\bstec_replace_current_temp\b/g,"C"===o.options.general_settings.temp_units?p:u).replace(/\bstec_replace_current_feels_like\b/g,"C"===o.options.general_settings.temp_units?h:f).replace(/\bstec_replace_current_humidity\b/g,c.current.humidity).replace(/\bstec_replace_current_temp_units/g,"C"===o.options.general_settings.temp_units?"C":"F").replace(/\bstec_replace_current_wind\b/g,"MPH"===o.options.general_settings.wind_units?v:m).replace(/\bstec_replace_current_wind_units\b/g,"MPH"===o.options.general_settings.wind_units?"MPH":"KPH").replace(/\bstec_replace_current_wind_direction\b/g,function(e){for(var n;e<0;)e+=360;for(;e>=360;)e-=360;return n=Math.round((e-11.25)/22.5),[t("N"),t("NNE"),t("NE"),t("ENE"),t("E"),t("ESE"),t("SE"),t("SSE"),t("S"),t("SSW"),t("SW"),t("WSW"),t("W"),t("WNW"),t("NW"),t("NNW")][Math.abs(n)]}(c.current.wind_deg)).replace(/\bstec_replace_today_icon_div\b/g,d).replace(/\bstec_replace_5days\b/g,a)})),setTimeout((function(){var e,a,u,p,f,v,m=[],g=[],y=[],_=[],b=-1,w=[];for(a=0;a<8;a++)b++,e=c.hourly[b],u=Math.round(e.temp),p=Math.round(5*(u-32)/9),g[a]=p,y[a]=u,m[a]=e.humidity,_[a]=e.clouds,f="HH:mm",12===parseInt(o.options.general_settings.time_format,10)&&(f="hh:mma"),v=i.unix(e.dt).tz(s.event.timezone),w.push(v.format(f));(n=new h).setCanvas(d.find(".stec-layout-event-inner-forecast-details-chart canvas")),n.setChartData({labels:w,datasets:[{yAxisID:"mainYAxis",label:t("temperature")+" °"+("C"===o.options.general_settings.temp_units?"C":"F"),data:"C"===o.options.general_settings.temp_units?g:y,backgroundColor:"rgba(255, 196, 79,0.3)",borderColor:"rgba(255, 196, 79,1)",pointBackgroun
1dColor:"rgba(252,183,85,1)",fill:!0,lineTension:.3,pointHoverRadius:5,pointHitRadius:10,borderWidth:1},{yAxisID:"mainYAxis",label:t("humidity_percents"),data:m,backgroundColor:"rgba(202, 212, 224,0.1)",borderColor:"rgba(202, 212, 224,1)",pointBackgroundColor:"rgba(202, 212, 224,1)",fill:!0,lineTension:.3,pointHoverRadius:5,pointHitRadius:10,borderWidth:1},{yAxisID:"mainYAxis",label:t("cloudness"),data:_,backgroundColor:"rgba(141, 152, 166,0.1)",borderColor:"rgba(141, 152, 166,1)",pointBackgroundColor:"rgba(141, 152, 166,1)",fill:!0,lineTension:.3,pointHoverRadius:5,pointHitRadius:10,borderWidth:1}]}),n.build(),l.onResizeEnd((function(){r.hasClass("stec-media-small")?n.chart.options.legend.display=!1:n.chart.options.legend.display=!0,n.chart.update()}),50,"stec-unbind-window-resize-on-event-close-"+o.options.id)}),0)},h=function(){this.ctx=null,this.chartData=null,this.chart=null,this.setCanvas=function(e){var t=e.get(0),n=parseInt(d.find(".stec-layout-event-inner-forecast-details-chart").width(),10),a=parseInt(d.find(".stec-layout-event-inner-forecast-details-chart").height(),10);t.width=n,t.height=a,this.ctx=e.get(0).getContext("2d")},this.setChartData=function(e){this.chartData=e},this.destroy=function(){this.chart.destroy()},this.build=function(){var e,t,n;this.chart&&this.destroy(),e=d.find(".stec-layout-event-inner-forecast-details-left-forecast-top p").css("color"),t=d.find(".stec-layout-event-inner-forecast-details-left-forecast-top p").css("font-family"),n=!0,r.hasClass("stec-media-small")&&(n=!1),this.chart=new window.Chart(this.ctx,{type:"line",data:this.chartData,options:{maintainAspectRatio:!1,responsive:!0,defaultFontFamily:t,defaultFontColor:e,legend:{display:n,labels:{fontFamily:t,fontColor:e,fontSize:12}},scales:{xAxes:[{ticks:{fontFamily:t,fontSize:11,fontColor:e},gridLines:{color:"rgba(0,0,0,0.1)",zeroLineColor:"rgba(0,0,0,0)"}}],yAxes:[{id:"mainYAxis",position:"right",ticks:{beginAtZero:!0,fontFamily:t,fontSize:11,fontColor:e},gridLines:{color:"rgba(0, 0, 0,0.1)",zeroLineColor:"rgba(0,0,0,0)"}}]},tooltips:{titleFontColor:"#fff",titleFontStyle:t,bodyFontFamily:t,bodyFontColor:"#fff"}}})}},v=function(){d.find(".stec-layout-event-inner-preload-wrap").children().first().unwrap(),d.find(".stec-layout-event-inner-forecast-content").remove(),d.find(".stec-preloader").remove(),d.find(".errorna").show()},e(window).on("stec-tab-click-"+o.options.id,(function(){!0!==d.data("loaded")&&(u=e("#stec-layout-event-inner-forecast-details-left-forecast-day-template").html(),p(),d.data("loaded",!0))})),d.hasClass("active")&&p()))})),e(document).on("onEventToggleOpen",(function(t,n){var a,i,s,o;n.event.guests.length<=0||(a=n.$container,i=a.find(".stec-layout-event-inner-guests"),s=n.event,i.length<=0||!0===i.data("loaded")||(i.data("loaded",!0),o=e("#stec-layout-event-inner-guests-guest-template").html(),s.guests.length>0&&e(s.guests).each((function(t){var n,a=this;e(o).html((function(i,s){var o=[];return e(a.links).each((function(e){var t=this.link,n="_blank";"fas fa-envelope"===this.ico&&(t="mailto:"+t,n="_self"),"fas fa-phone"===this.ico&&(t="tel:"+t,n="_self"),o[e]='<li class="stec-layout-event-inner-guests-guest-left-avatar-icon-position-'+e+'"><a target="'+n+'" href="'+t+'"><i class="'+this.ico+'"></i></a></li>'})),n=a.photo_full?'<img src="'+a.photo_full+'" alt="stec_replace_name" >':'<div class="stec-layout-event-inner-guests-guest-left-avatar-default"></div>',s.replace(/stec_replace_ico_position/g,t).replace(/stec_replace_avatar/g,n).replace(/stec_replace_social/g,o.join("")).replace(/stec_replace_name/g,a.name).replace(/stec_replace_about/g,a.about)})).appendTo(i)})),i.find(".stec-layout-event-inner-preload-wrap").children().first().unwrap(),i.find(".stec-layout-event-inner-preload-wrap").remove(),i.find(".stec-preloader").remove()))})),function(){var n=window.moment;n.locale("en"),e(document).on("onEventToggleOpen",(function(a,i){var s,o,r,l,c,d,u,p,f,h,v,m,g,y,_,b,w=i.glob,C=i.$instance,D=i.$container,k=D.find(".stec-layout-event-inner-intro"),x=[];if(!(k.length<=0||!1===k.data("loaded"))){if(k.data("loaded",!1),s=i.helper,o=i.event,p=parseInt(i.repeatOffset,10),r=new window.StecDB,l=n.tz(i.event.start_date,i.event.timezone).add(i.repeatOffset,"seconds").format("YYYY-MM-DD"),c=s.getPermalink(o.permalink,i.repeatOffset),s.dbDateOffset(o.start_date,i.repeatOffset),s.dbDateOffset(o.end_date,i.repeatOffset),f=s.eventToGoogleCalImportLink(o.id,i.repeatOffset),o.category.length>0&&1===parseInt(w.options.general_settings.show_event_tags,10)?(o.category.sort((function(e,t){return e.title.localeCompare(t.title,void 0,{numeric:!0,sensitivity:"base"})})),e.each(o.category,(function(){x.push('<span class="stec-layout-event-inner-intro-tag" style="background-color: '+this.color+'">'+this.title+"</span>")}))):i.$container.find(".stec-layout-event-inner-intro-tags").remove(),k.html((function(e,n){return n.replace(/stec_replace_summary/g,o.title).replace(/stec_replace_tags/g,x.join("")).replace(/stec_replace_description/g,o.description).replace(/#stec_replace_link_url/g,o.link&&o.link.url?o.link.url:o.link).replace(/stec_replace_link_text/g,o.link&&o.link.text?o.link.text:t("Visit Website")).replace(/#stec_replace_googlecal_import/g,f).replace(/stec_replace_event_id/g,o.id
1).replace(/stec_replace_calendar_id/g,o.calid).replace(/#stec_replace_event_single_url/g,c).replace(/stec_replace_event_single_url/g,c)})),o.edit_link||k.find(".stec-layout-event-inner-intro-edit-link").remove(),h={cslide:0,offset:0,total:0,blockAction:!1,visCount:0,visCountSmall:3,visCountBig:4,imagesArray:[],init:function(){var t=this;if(this.imagesArray=[],!o.images_meta||o.images_meta.length<=0)return k.find(".stec-layout-event-inner-intro-media").remove(),k.find(".stec-layout-event-inner-preload-wrap").children().first().unwrap(),k.find(".stec-layout-event-inner-preload-wrap").remove(),void k.find(".stec-preloader").remove();1===o.images_meta.length?k.find(".stec-layout-event-inner-intro-media-controls").remove():(o.images_meta.length<this.visCountBig&&(this.visCountBig=o.images_meta.length),o.images_meta.length<this.visCountSmall&&(this.visCountSmall=o.images_meta.length)),this.html(),e.each(o.images_meta,(function(){t.imagesArray.push(this.src)})),s.preloadContentImages(t.imagesArray).then((function(){k.find(".stec-layout-event-inner-preload-wrap").children().first().unwrap(),k.find(".stec-layout-event-inner-preload-wrap").remove(),k.find(".stec-preloader").remove(),setTimeout((function(){t.controlsDimensions(),t.showImage(),k.find(".stec-layout-event-inner-intro-media").fadeTo(1e3,1)}),100)})),this.bindControls()},bindControls:function(){var t=this;e(document).on("stec-tab-click-"+w.options.id,(function(){t.controlsDimensions()})),s.onResizeEnd((function(){t.controlsDimensions()}),100,"stec-unbind-window-resize-on-event-close-"+w.options.id),k.find(".stec-layout-event-inner-intro-media-controls-next").on(s.clickHandle(),(function(e){e.preventDefault(),t.slideNext()})),k.find(".stec-layout-event-inner-intro-media-controls-prev").on(s.clickHandle(),(function(e){e.preventDefault(),t.slidePrev()})),k.find(".stec-layout-event-inner-intro-media-controls li").on(s.clickHandle(),(function(n){n.preventDefault(),t.cslide!==e(this).index()&&(t.cslide=e(this).index(),t.showImage())}))},html:function(){var t=[];e(o.images_meta).each((function(){t.push('<div style="background-image:url('+this.src+');">'),""===this.caption&&""===this.description||(t.push(" <div>"),""!==this.caption&&t.push(" <p>"+this.caption+"</p>"),""!==this.description&&t.push(" <span>"+this.description+"</span>"),t.push(" </div>")),t.push("</div>")})),e(t.join("")).appendTo(k.find(".stec-layout-event-inner-intro-media-content")),t=[],e(o.images_meta).each((function(){t.push('<li style="background-image:url('+this.thumb+')">'),t.push("</li>")})),e(t.join("")).appendTo(k.find(".stec-layout-event-inner-intro-media-controls-list"))},controlsDimensions:function(){var e,t,n,a,i,o=this;k.is(":visible")&&(C.hasClass("stec-media-small")?o.visCount=o.visCountSmall:o.visCount=o.visCountBig,k.find(".stec-layout-event-inner-intro-media-controls-list li").length===o.visCount?k.find(".stec-layout-event-inner-intro-media-controls").addClass("no-side-controls"):k.find(".stec-layout-event-inner-intro-media-controls").removeClass("no-side-controls"),e=k.find(".stec-layout-event-inner-intro-media-controls-list-wrap").width(),t=k.find(".stec-layout-event-inner-intro-media-controls-list li"),k.find(".stec-layout-event-inner-intro-media-content").height(Math.min(400,s.getImageHeight(o.imagesArray[0]))),n=(e-10*(this.visCount-1))/this.visCount,a=t.length*n+10*t.length-10,k.find(".stec-layout-event-inner-intro-media-controls-list").width(a),t.width(n),this.offset=0,i=-1*(t.first().width()*this.offset+10*this.offset),k.find(".stec-layout-event-inner-intro-media-controls-list").stop().css({left:i}))},showImage:function(){var e,t,n,a;k.find(".stec-layout-event-inner-intro-media-controls-list .active-thumb").removeClass("active-thumb"),k.find(".stec-layout-event-inner-intro-media-controls-list li").eq(this.cslide).addClass("active-thumb"),e=k.find(".stec-layout-event-inner-intro-media-content .active-image"),t=k.find(".stec-layout-event-inner-intro-media-content > div").eq(this.cslide),(n=t.find("div")).length>0?k.find(".stec-layout-event-inner-intro-media-content-subs div").fadeTo(250,0,(function(){var e=n.find("p").text(),t=n.find("span").text();k.find(".stec-layout-event-inner-intro-media-content-subs p").text(e),k.find(".stec-layout-event-inner-intro-media-content-subs span").text(t),(a=k.find(".stec-layout-event-inner-intro-media-content-subs p").height()+k.find(".stec-layout-event-inner-intro-media-content-subs span").height())>0&&(a+=40),k.find(".stec-layout-event-inner-intro-media-content-subs").stop().animate({height:a},{duration:400,easing:"easeInOutExpo",complete:function(){k.find(".stec-layout-event-inner-intro-media-content-subs div").fadeTo(250,1)}})})):k.find(".stec-layout-event-inner-intro-media-content-subs div").fadeTo(250,0,(function(){k.find(".stec-layout-event-inner-intro-media-content-subs").stop().animate({height:0},{duration:400,easing:"easeInOutExpo"})})),t.addClass("fade-in"),setTimeout((function(){e.removeClass("active-image"),t.removeClass("fade-in").addClass("active-image")}),250)},slideNext:function(){var e,t=k.find(".stec-layout-event-inner-intro-media-controls-list li");this.offset+this.visCount>=t.length?this.offset=0:(this.offset=this.offset+this.visCount,this.offset>t.length-this.visCount&&(this.offset=t.length-this.visCount)),e=-1*(t.first().width()*this.offset+10*this.offset),k.find(".stec-layout-event-inner-intro-media-controls-list").stop().animate({left:e},{duration:750,easing:"easeInOutExpo"})},slidePrev:function(){var e,t=k.find(".stec-layout-event-inner-intro-media-controls-list li");this.offset<=0?this.offset=t.length-this.visCount:(this.offset=this.offset-this.visCount,this.offset<0&&(this.offset=0)),e=-1*(t.first().width()*this.offset+10*this.offset),k.find(".stec-layout-event-inner-intro-media-controls-list").stop().animate({left:e},{duration:750,easing:"easeInOutExpo"})}},h.init(),o.organizers.length>0?(v=e("#stec-layout-event-inner-intro-organizers-organizer-template").html(),e.each(o.organizers,(function(){var t=this,n="",a=t.photo_src?'style="background-image: url('+t.photo_src+')"':"";t.social.length>0&&e.each(t.social,(function(){var e=this.link,t="_blank";
1"fas fa-envelope"===this.ico&&(e="mailto:"+e,t="_self"),"fas fa-phone"===this.ico&&(e="tel:"+e,t="_self"),n+='<a target="'+t+'" href="'+e+'"><i class="'+this.ico+'"></i></a>'})),e(v).html((function(e,i){var s=t.name;return t.permalink&&(s='<a href="'+t.permalink+'">'+t.name+"</a>"),i.replace(/stec_replace_title/g,s).replace(/stec_replace_event/g,o.title).replace(/stec_replace_about/g,t.details).replace(/stec_replace_social/g,n).replace(/stec_replace_image/g,a)})).appendTo(k.find(".stec-layout-event-inner-intro-organizers"))}))):k.find(".stec-layout-event-inner-intro-organizers").remove(),m={days:0,hours:0,minutes:0,seconds:0,daysLabel:"",hoursLabel:"",minutesLabel:"",secondsLabel:"",interval:"",init:function(){var e,t,a;if(1!==parseInt(o.counter,10))return k.find(".stec-layout-event-inner-intro-event-status").hide(),void k.find(".stec-layout-event-inner-intro-counter").hide();e=n(),t=n.tz(o.start_date,o.timezone).add(p,"seconds"),a=Math.floor(t.unix()-e.unix()),this.days=Math.floor(a/86400),this.hours=Math.floor(a%86400/3600),this.minutes=Math.floor(a%86400%3600/60),this.seconds=Math.floor(a%86400%3600%60),k.find(".stec-layout-event-inner-intro-counter-num").eq(0).text(this.days),k.find(".stec-layout-event-inner-intro-counter-num").eq(1).text(this.hours),k.find(".stec-layout-event-inner-intro-counter-num").eq(2).text(this.minutes),k.find(".stec-layout-event-inner-intro-counter-num").eq(3).text(this.seconds),this.daysLabel=k.find(".stec-layout-event-inner-intro-counter-label").eq(0),this.hoursLabel=k.find(".stec-layout-event-inner-intro-counter-label").eq(1),this.minutesLabel=k.find(".stec-layout-event-inner-intro-counter-label").eq(2),this.secondsLabel=k.find(".stec-layout-event-inner-intro-counter-label").eq(3),this.daysLabel.text(1===this.days?this.daysLabel.attr("data-singular-label"):this.daysLabel.attr("data-plural-label")),this.hoursLabel.text(1===this.hours?this.hoursLabel.attr("data-singular-label"):this.hoursLabel.attr("data-plural-label")),this.minutesLabel.text(1===this.minutes?this.minutesLabel.attr("data-singular-label"):this.minutesLabel.attr("data-plural-label")),this.secondsLabel.text(1===this.seconds?this.secondsLabel.attr("data-singular-label"):this.secondsLabel.attr("data-plural-label")),a<0?this.complete():(k.find(".stec-layout-event-inner-intro-event-status-text").removeClass("active"),k.find(".stec-layout-event-inner-intro-event-status-text.event-startsin").addClass("active"),this.count())},count:function(){var e=this;e.interval&&clearInterval(e.interval),e.interval=setInterval((function(){e.seconds--,e.seconds<0&&(e.seconds=59,e.minutes--,e.minutes<0&&(e.minutes=59,e.hours--,e.hours<0&&(e.hours=23,e.days>0&&e.days--,k.find(".stec-layout-event-inner-intro-counter-num").eq(0).text(e.days),e.daysLabel.text(1===e.days?e.daysLabel.attr("data-singular-label"):e.daysLabel.attr("data-plural-label"))),k.find(".stec-layout-event-inner-intro-counter-num").eq(1).text(e.hours),e.hoursLabel.text(1===e.hours?e.hoursLabel.attr("data-singular-label"):e.hoursLabel.attr("data-plural-label"))),k.find(".stec-layout-event-inner-intro-counter-num").eq(2).text(e.minutes),e.minutesLabel.text(1===e.minutes?e.minutesLabel.attr("data-singular-label"):e.minutesLabel.attr("data-plural-label"))),k.find(".stec-layout-event-inner-intro-counter-num").eq(3).text(e.seconds),e.secondsLabel.text(1===e.seconds?e.secondsLabel.attr("data-singular-label"):e.secondsLabel.attr("data-plural-label")),0===e.days&&0===e.hours&&0===e.minutes&&0===e.seconds&&e.complete()}),1e3)},complete:function(){var e,t;if(clearInterval(this.interval),k.find(".stec-layout-event-inner-intro-counter-num").eq(0).text(0),k.find(".stec-layout-event-inner-intro-counter-num").eq(1).text(0),k.find(".stec-layout-event-inner-intro-counter-num").eq(2).text(0),k.find(".stec-layout-event-inner-intro-counter-num").eq(3).text(0),this.daysLabel.text(1===this.days?this.daysLabel.attr("data-singular-label"):this.daysLabel.attr("data-plural-label")),this.hoursLabel.text(1===this.hours?this.hoursLabel.attr("data-singular-label"):this.hoursLabel.attr("data-plural-label")),this.minutesLabel.text(1===this.minutes?this.minutesLabel.attr("data-singular-label"):this.minutesLabel.attr("data-plural-label")),this.secondsLabel.text(1===this.seconds?this.secondsLabel.attr("data-singular-label"):this.secondsLabel.attr("data-plural-label")),e=n(),t=n.tz(o.end_date,o.timezone).add(p,"seconds"),1===i.event.all_day&&(t=t.endOf("day")),e>=t)k.find(".stec-layout-event-inner-intro-event-status-text").removeClass("active"),k.find(".stec-layout-event-inner-intro-event-status-text.event-expired").addClass("active");else{let n=Math.floor(t.unix()-e.unix());this.days=Math.floor(n/86400),this.hours=Math.floor(n%86400/3600),this.minutes=Math.floor(n%86400%3600/60),this.seconds=Math.floor(n%86400%3600%60),k.find(".stec-layout-event-inner-intro-counter-num").eq(0).text(this.days),k.find(".stec-layout-event-inner-intro-counter-num").eq(1).text(this.hours),k.find(".stec-layout-event-inner-intro-counter-num").eq(2).text(this.minutes),k.find(".stec-layout-event-inner-intro-counter-num").eq(3).text(this.seconds),this.daysLabel.text(1===this.days?this.daysLabel.attr("data-singular-label"):this.daysLabel.attr("data-plural-label")),this.hoursLabel.text(1===this.hours?this.hoursLabel.attr("data-singular-label"):this.hoursLabel.attr("data-plural-label")),this.minutesLabel.text(1===this.minutes?this.minutesLabel.attr("data-singular-label"):this.minutesLabel.attr("data-plural-label")),this.secondsLabel.text(1===this.seconds?this.secondsLabel.attr("data-singular-label"):this.secondsLabel.attr("data-plural-label")),this.count(),k.find(".stec-layout-event-inner-intro-event-status-text").removeClass("active"),k.find(".stec-layout-event-inner-intro-event-status-text.event-inprogress").addClass("active")}}}
1,m.init(),k.find(".stec-layout-event-inner-intro-attendance-attend").on(s.clickHandle(),(function(t){var a=i.glob.rsvp;t.preventDefault(),e(this).hasClass("active")?$(0):(a.settings.id=i.event.id,a.settings.offset=i.repeatOffset,a.settings.event=i.event,a.settings.date=n.tz(i.event.start_date,i.event.timezone).add(i.repeatOffset,"seconds").format("YYYY-MM-DD"),a.settings.update=!0,a.popOpen())})),k.find(".stec-layout-event-inner-intro-attendance-decline").on(s.clickHandle(),(function(t){t.preventDefault(),$(e(this).hasClass("active")?0:2)})),k.find(".stec-layout-event-inner-intro-attendance-unlist").on(s.clickHandle(),(function(e){e.preventDefault(),$(3)})),g=!1,_=s.attendanceHasFreeSlots(o,l),isNaN(w.options.userid)||e(o.attendance).each((function(){if(this.userid===w.options.userid)return g=!0,!1})),!1!==g)switch(y=0,e(o.attendance).each((function(){if(this.userid===w.options.userid&&this.status[l])return y=parseInt(this.status[l],10),!1})),_<=0&&1!==y&&k.find(".stec-layout-event-inner-intro-attendance").hide(),y){case 1:k.find(".stec-layout-event-inner-intro-attendance-attend").addClass("active"),k.find(".stec-layout-event-inner-intro-attendance-decline").removeClass("active");break;case 2:k.find(".stec-layout-event-inner-intro-attendance-attend").removeClass("active"),k.find(".stec-layout-event-inner-intro-attendance-decline").addClass("active")}else k.find(".stec-layout-event-inner-intro-attendance").hide();d=n(),u=n.tz(o.start_date,o.timezone).add(p,"seconds"),(!0===g||1!==parseInt(o.rsvp,10)||d>=u)&&k.find(".stec-layout-event-inner-intro-rsvp").hide(),o.bookable_products.length<=0||d>=u?k.find('button[data-action="open-tickets"]').remove():k.find('button[data-action="open-tickets"]').data({event:o,offset:i.repeatOffset}),Array.isArray(o.link)?o.link.length>0&&k.find(".stec-layout-event-inner-intro-external-link").show():""!==o.link&&k.find(".stec-layout-event-inner-intro-external-link").show(),!o.link&&k.find(".stec-layout-event-inner-intro-rsvp").length<=0&&k.find(".stec-layout-event-inner-intro-external-link").parent().remove(),d>=u&&k.find(".stec-layout-event-inner-intro-attendance").hide(),o.attachments.length>0?(b=e("#stec-layout-event-inner-intro-attachment-template").html(),e(o.attachments).each((function(){var t=this;e(b).html((function(e,n){return n.replace(/stec_replace_filename/g,t.filename).replace(/stec_replace_desc/g,t.description).replace(/\#stec_replace_url/g,t.link).replace(/stec_replace_size/g,t.size)})).appendTo(k.find(".stec-layout-event-inner-intro-attachments-list"))})),k.find(".stec-layout-event-inner-intro-attachments-toggle").on(s.clickHandle(),(function(t){t.preventDefault(),e(this).toggleClass("active"),k.find(".stec-layout-event-inner-intro-attachments-list").toggleClass("active")}))):k.find(".stec-layout-event-inner-intro-attachments").remove(),k.find(".stec-layout-event-inner-intro-exports-toggle").on(s.clickHandle(),(function(t){t.preventDefault(),e(this).toggleClass("active"),k.find(".stec-layout-event-inner-intro-exports-options").toggleClass("active")})),k.on(s.clickHandle(),".fa-link",(function(t){var n=i.$container.data("event-id"),a=i.$container.data("repeat-time-offset"),o=e(this).parent().attr("href"),r=new window.stecSharer(C,w,s,o,n,a);t.stopPropagation(),t.preventDefault(),r.init()})),k.find(".stec-layout-event-inner-intro-share-and-export").on(s.clickHandle(),".fa-envelope",(function(t){var n=e(this).parents(".stec-layout-event").attr("data-id"),a=e(this).parents(".stec-layout-event").attr("data-repeat-time-offset"),i=e(this).parent().attr("href"),o=new window.stecEmailEvent(C,w,s,i,n,a);t.stopPropagation(),t.preventDefault(),o.init()}))}function $(t){var n=r.newRequest();n.setData({action:"stec_public_ajax_action",task:"set_user_event_attendance",event_id:o.id,date:l,status:t}),n.setBefore((function(){k.find(".stec-layout-event-inner-intro-attendance").children().hide(),e("<li>"+w.template.preloader+"</li>").addClass("intro-attendance").appendTo(k.find(".stec-layout-event-inner-intro-attendance"))})),n.setCallback((function(t){var n,a,s,r=parseInt(t.status,10);switch(k.find(".stec-layout-event-inner-intro-attendance li").removeClass("active"),D.find(".stec-layout-event-inner-attendance-invited-buttons li").removeClass("active"),a=(n=D.find(".stec-layout-event-inner-attendance-attendee-avatar").filter('[data-userid="'+w.options.userid+'"]')).parent(),r){case 1:k.find(".stec-layout-event-inner-intro-attendance-attend").addClass("active"),D.find(".stec-layout-event-inner-attendance-invited-buttons-accept").addClass("active"),n.find("li i").attr("class","fa fa-check");break;case 2:k.find(".stec-layout-event-inner-intro-attendance-decline").addClass("active"),D.find(".stec-layout-event-inner-attendance-invited-buttons-decline").addClass("active"),n.find("li i").attr("class","fa fa-times"),a.find(".stec-layout-event-inner-attendance-attendee-persons").hide();break;case 3:return s=[],e(o.attendance).each((function(){if(this.userid===w.options.userid)return!0;s.push(this)})),o.attendance=s,i.glob.rsvp.settings.update=!1,void i.helper.layout.set("layout");default:n.find("li i").attr("class","fa fa-question"),a.find(".stec-layout-event-inner-attendance-attendee-persons").hide()}e(o.attendance).each((function(){if(this.userid===w.options.userid)return this.status[l]=r,!1})),k.find(".stec-layout-event-inner-intro-attendance").children().show(),k.find(".stec-layout-event-inner-intro-attendance").children().last(
1).remove(),_=t.slots_left,D.find(".stec-layout-event-inner-attendance-invited-slots-count").text(_)})),r.query(n)}}))}(),e(document).on("onEventToggleOpen",(function(n,a){"virtual"===a.event.location.type?function(n){var a,i,s,o;n.event.location.full_address&&(n.glob,a=n.helper,i=n.event,s=n.$container,(o=s.find(".stec-layout-event-inner-location")).data("stec-tab-loaded")||(o.find(".stec-layout-event-inner-location-physical").remove(),o.data("stec-tab-loaded",!0),o.html((function(e,t){return t.replace(/\bstec_replace_location\b/g,(function(){return i.location.title?[i.location.title,i.location.full_address].join(", "):i.location.full_address})).replace(/#stec_replace_virtual_location_href/g,i.location.address?i.location.address:"").replace(/#stec_replace_virtual_event_qr_code_href/g,i.location.qrcode?i.location.qrcode:"").replace(/stec_replace_details/g,i.location.details?i.location.details:"")})),""===o.find(".stec-layout-event-inner-location-details").text().trim()&&o.find(".stec-layout-event-inner-location-optional-details").hide(),o.find('[data-action="stec-copy-link"]').on(a.clickHandle(),(function(n){var i=e(this).attr("href"),s=e("<input>");n.preventDefault(),e("body").append(s),s.val(i).select(),document.execCommand("copy"),s.remove(),a.toast(t("copiedToClipboard"),o)}))))}(a):function(t){var n,a,i,s,o;function r(e){n.options.myLocation?e.val(n.options.myLocation):navigator.geolocation&&navigator.geolocation&&navigator.geolocation.getCurrentPosition((function(t){var a=[t.coords.latitude,t.coords.longitude];n.options.myLocation=a.join(", "),e.val(n.options.myLocation)}),(function(e,t,n){console.log("Navigator Geolocation Error")}))}function l(){this.$tabCont="",this.directionsService="",this.directionsDisplay="",this.map="",this.geocoder="",this.mapDiv="",this.marker="",this.address="",this.initNoMap=function(e){var n,a,i=this;i.$tabCont=e.parents(".stec-layout-event-inner-location"),i.address=t.event.location.full_address,n=i.$tabCont.find('input[name="start"]'),""===(a=i.$tabCont.find('input[name="end"]')).val().trim()&&a.val(i.$tabCont.find(".stec-layout-event-inner-location-address").text()),""===n.val().trim()&&r(n),i.$tabCont.find(".stec-layout-event-inner-location-directions-buttons .stec-layout-event-inner-location-left-button").remove(),i.bindControls(),o.find(".stec-layout-event-inner-preload-wrap").children().first().unwrap(),o.find(".stec-layout-event-inner-preload-wrap").remove(),o.find(".stec-preloader").remove()},this.init=function(e){var s,l,c=this;window.google&&window.google.maps?(c.$tabCont=e.parents(".stec-layout-event-inner-location"),c.address=t.event.location.full_address,c.mapDiv=e.get(0),c.map=new window.google.maps.Map(c.mapDiv,{zoom:n.options.gmap_zoom?parseInt(n.options.gmap_zoom,10):15}),c.geocoder=new window.google.maps.Geocoder,c.directionsService=new window.google.maps.DirectionsService,c.directionsDisplay=new window.google.maps.DirectionsRenderer,c.directionsDisplay.setMap(c.map),c.setLocation(c.address),n.options.gmap_theme&&"standard"!==n.options.gmap_theme&&(c.map.mapTypes.set("Custom_Style",a.getMapStyles(n.options.gmap_theme)),c.map.setMapTypeId("Custom_Style")),s=c.$tabCont.find('input[name="start"]'),""===(l=c.$tabCont.find('input[name="end"]')).val().trim()&&l.val(i.location.full_address),""===s.val().trim()&&r(s),this.bindControls(),o.find(".stec-layout-event-inner-preload-wrap").children().first().unwrap(),o.find(".stec-layout-event-inner-preload-wrap").remove(),o.find(".stec-preloader").remove()):this.initNoMap(e)},this.bindControls=function(){var t=this;a.onResizeEnd((function(){t.refresh()}),150,"stec-unbind-window-resize-on-event-close-"+n.options.id),t.$tabCont.parents(".stec-layout-event-inner").find('[data-tab="stec-layout-event-inner-location"]').on(a.clickHandle(),(function(e){t.refresh(!1)})),t.$tabCont.find(".stec-layout-event-inner-location-open-map").on(a.clickHandle(),(function(t){var n,a,s=e(this).parents(".stec-layout-event-inner-location"),o=s.find('input[name="start"]'),r=s.find('input[name="end"]').val();i.location.coordinates?(n=i.location.coordinates.split(","),r={lat:parseFloat(n[0].trim()),lng:parseFloat(n[1].trim())},a="https://www.google.com/maps/dir/?api=1&origin="+o.val()+"&destination="+r.lat+","+r.lng+"&travelmode=driving",e(this).attr("href",a)):t.preventDefault()})),t.$tabCont.find(".stec-layout-event-inner-location-left-button").on(a.clickHandle(),(function(n){var a,s=e(this).parents(".stec-layout-event-inner-location"),o=s.find('input[name="start"]'),r=s.find('input[name="end"]').val();i.location.coordinates&&(a=i.location.coordinates.split(","),r={lat:parseFloat(a[0].trim()),lng:parseFloat(a[1].trim())}),o.val()&&r&&(n.preventDefault(),t.getDirection(o.val(),r))}))},this.refresh=function(e){var t=this;setTimeout((function(){window.google.maps.event.trigger(t.mapDiv,"resize"),!0===e&&t.setLocation(t.address)}),10)},this.setLocation=function(e){var t,n,a=this;i.location.coordinates?(t=i.location.coordinates.split(","),n={lat:parseFloat(t[0].trim()),lng:parseFloat(t[1].trim())},a.map.setCenter(n),a.marker=new window.google.maps.Marker({map:a.map,position:n,title:e})):a.geocoder.geocode({address:e},(function(t,n){n===window.google.maps.GeocoderStatus.OK?(a.map.setCenter(t[0].geometry.location),a.marker=new window.google.maps.Marker({map:a.map,position:t[0].geometry.location,title:e})):console.log("Geocoder error: "+n)})),a.refresh()},this.getDirection=function(e,t){var n=this;n.directionsService.route({origin:e,destination:t||n.marker.position,travelMode:window.google.maps.TravelMode.DRIVING},(function(e,t){t===window.google.maps.DirectionsStatus.OK?n.directionsDisplay.setDirections(e):(console.log("Direction Service Error"),o.find(".stec-layout-event-inner-location-direction-error").stop().fadeTo(250,1,(function(){setTimeout((function(){o.find(".stec-layout-event-inner-location-direction-error").fadeTo(250,0)}),3e3)})))}))}}function c(){this.$tabCont="",this.map="",this.mapDiv="",this.address="",this.initNoMap=function(e){var n,a,i=this;i.$tabCont=e.parents(".stec-layout-event-inner-location"),i.address=t.event.location.full_address,n=i.$tabCont.find('input[name="start"]'),""===(a=i.$tabCont.find('input[name="end"]')).val().trim()&&a.val(i.$tabCont.find(".stec-layout-event-inner-location-address").text()),""===n.val().trim()&&r(n),i.bindControl
1s(),o.find(".stec-layout-event-inner-preload-wrap").children().first().unwrap(),o.find(".stec-layout-event-inner-preload-wrap").remove(),o.find(".stec-preloader").remove()},this.init=function(e){var t,n,s=this;s.$tabCont=e.parents(".stec-layout-event-inner-location"),s.$tabCont.find(".stec-layout-event-inner-location-open-map").remove(),window.L?(s.mapDiv=e.get(0),s.map=a.osm(s.mapDiv),s.setLocation(),t=s.$tabCont.find('input[name="start"]'),""===(n=s.$tabCont.find('input[name="end"]')).val().trim()&&n.val(i.location.full_address),""===t.val().trim()&&r(t),this.bindControls(),o.find(".stec-layout-event-inner-preload-wrap").children().first().unwrap(),o.find(".stec-layout-event-inner-preload-wrap").remove(),o.find(".stec-preloader").remove()):this.initNoMap(e)},this.setLocation=function(){var e=this;e.address=i.location.full_address,a.promiseCoordinates(i).then((function(t){let n=t.split(","),a={lat:parseFloat(n[0].trim()),lng:parseFloat(n[1].trim())};e.map.setView(a,15),window.L.marker(a).addTo(e.map)})).catch((function(){e.map.setView({lat:0,lng:0},1)}))},this.bindControls=function(){this.$tabCont.find(".stec-layout-event-inner-location-left-button").on(a.clickHandle(),(function(t){var n=e(this).parents(".stec-layout-event-inner-location").find('input[name="start"]');t.preventDefault(),i.location&&new Promise((function(e){var t=n.val(),s={start:t,end:i.location.coordinates};if(null===s.start.match(/[aA-zZ]+/))return e(s);a.promiseGetAddressCoordinates(t).then((function(t){return s.start=t,e(s)}))})).then((function(e){window.open("//www.openstreetmap.org/directions?engine=fossgis_osrm_car&route="+e.start+";"+e.end,"_blank")}))}))}}function d(){var e;o.is(":visible")&&(e=("modal"===n.options.general_settings.open_event_in?o.parents(".stec-layout-event-inner"):o.parents(".stec-layout-event")).find(".stec-layout-event-inner-location-right-map")).children().length<=0&&("osm"===n.options.general_settings.map_type?(new c).init(e):(new l).init(e))}t.event.location.full_address&&(n=t.glob,a=t.helper,i=t.event,s=t.$container,(o=s.find(".stec-layout-event-inner-location")).find(".stec-layout-event-inner-location-virtual").remove(),o.find(".stec-layout-event-inner-location-right-map").children().length>0||(o.html((function(e,t){return t.replace(/stec_replace_location/g,(function(){return i.location.title?[i.location.title,i.location.full_address].join(", "):i.location.full_address})).replace(/stec_replace_details/g,i.location.details?i.location.details:"")})),""===o.find(".stec-layout-event-inner-location-details").text().trim()&&o.find(".stec-layout-event-inner-location-optional-details").hide(),e(document).on("stec-tab-click-"+n.options.id,(function(){d()})),d()))}(a)})),e(document).on("onEventToggleOpen",(function(t,n){var a,s,o,r;n.event.schedule.length<=0||(o=n.helper,a=n.$container,(s=a.find(".stec-layout-event-inner-schedule")).length<=0||!0===s.data("loaded")||(s.data("loaded",!0),r=e("#stec-layout-event-inner-schedule-tab-template").html(),e(n.event.schedule).each((function(){var t=this,a=[];""===t.details&&a.push("stec-layout-event-inner-schedule-tab-no-desc "),""!==t.icon&&"fa"!==t.icon||a.push("stec-layout-event-inner-schedule-tab-no-icon "),e(r).addClass(a.join(" ")).html((function(e,a){var s=o.dbDateTimeToDate(o.dbDateOffset(t.start_date,n.repeatOffset));return n.event.start_date_timestamp_tz&&(s=new i(t.start_date).add(n.repeatOffset,"seconds").utcOffset(n.event.timezone_utc_offset/60,!0).utcOffset(i().utcOffset())),a.replace(/stec_replace_date/g,o.beautifyScheduleTimespan(s)).replace(/stec_replace_time/g,"").replace(/stec_replace_icon/g,t.icon).replace(/stec_replace_color/g,'style="color:'+t.icon_color+'"').replace(/stec_replace_title/g,t.title).replace(/stec_replace_desc/g,t.details)})).appendTo(s)})),s.find(".stec-layout-event-inner-schedule-isempty").remove(),s.find(".stec-layout-event-inner-schedule-tab").first().addClass("open"),s.find(".stec-layout-event-inner-schedule-tab-preview").off(o.clickHandle("open")).on(o.clickHandle("open"),(function(t){t.preventDefault(),t.stopPropagation(),e(this).parents(".stec-layout-event-inner-schedule-tab").not(".stec-layout-event-inner-schedule-tab-no-desc").toggleClass("open")}))))})),e.stecExtend((function(n){var a,s=n.helper,o=n.glob,r=n.instance,l=n.$instance,c=n.calData,d=0;
1({init:function(){1===parseInt(o.options.general_settings.tooltip_display,10)&&!0!==s.isMobile()&&(this.iconImageSlider(),this.bindControls())},bindControls:function(){var t=this,i=[];i.push(r+" .stec-layout-month-daycell-event"),i.push(r+" .stec-layout-week-daycell-event"),1===parseInt(n.glob.options.agenda_tooltip,10)&&i.push(r+" .stec-layout-agenda-daycell-event"),i=i.join(","),e(document).on("mouseenter",i,(function(n){var i=this;e("#tooltip-"+o.options.id).remove(),!1!==s.animate&&s.animate.tooltip.clear(),e(o.template.tooltip).attr("id","tooltip-"+o.options.id).appendTo("body"),a=c.getEventById(e(i).data("id")),d=e(i).data("repeatTimeOffset"),t.fillHTML(a),t.position(i),!1!==s.animate?s.animate.tooltip.show(e("#tooltip-"+o.options.id)):e("#tooltip-"+o.options.id).fadeTo(0,1)})),e(document).on("mouseleave",r+i,(function(n){!1!==s.animate?s.animate.tooltip.hide(e("#tooltip-"+o.options.id),(function(){e("#tooltip-"+o.options.id).remove()})):e("#tooltip-"+o.options.id).fadeTo(0,0),t.clock.clear()}))},iconImageSlider:function(){setInterval((function(){e("#tooltip-"+o.options.id).find(".stec-layout-event-preview-left-icon-images").filter(":visible").each((function(){var t,n;e(this).children().length<=1||(t=e(this).children().filter(".active"),0===(n=t.next()).length&&(n=e(this).children().first()),n.addClass("transition"),setTimeout((function(){t.removeClass("active"),n.removeClass("transition").addClass("active")}),1e3))}))}),6e3)},position:function(t){var n="",a=e("#tooltip-"+o.options.id);a.css({left:function(){var i=0;return e(t).hasClass("stec-layout-agenda-daycell-event")?i=e(t).width()+e(t).offset().left+15:e(t).parents("td").first().index()>3?(i=e(t).offset().left-a.width()-5,n+=" stec-tooltip-pos-left"):i=e(t).width()+e(t).offset().left+5,i},top:function(){var i=0;return e(t).hasClass("stec-layout-agenda-daycell-event")?i=e(t).offset().top-23:e(t).parents("tr").first().index()>3?(n+=" stec-tooltip-pos-top",i=l.hasClass("stec-media-small")?e(t).offset().top-a.height()+29:e(t).offset().top-a.height()+40):i=l.hasClass("stec-media-small")?e(t).offset().top-27:e(t).offset().top-15,i}}),a.addClass(n)},fillHTML:function(n){var a,r,l,c,u,p,f,h=e("#tooltip-"+o.options.id),v="",m=s.getEventState(n,d);switch(n.icon_type){case"image":n.icon_images.length>0?(v+='<div class="stec-layout-event-preview-left-icon-images">',e.each(n.icon_images_meta,(function(e){v+='<div class="stec-layout-event-preview-left-icon-image '+(0===e?"active":"")+'" style="background-image: url('+this.src+')"></div>'})),v+="</div>"):v='<i class="'+n.icon+'"></i>';break;case"date":a=i.tz(n.start_date,n.timezone).add(d,"seconds"),v='<span class="stec-layout-event-preview-left-icon-date"><span class="stec-layout-event-preview-left-icon-date-number">'+a.format("D")+'</span><span class="stec-layout-event-preview-left-icon-date-month">'+t(a.format("MMM").toLowerCase())+"</span></span>";break;default:v='<i class="'+n.icon+'"></i>'}switch(n.event_status){case"EventCancelled":f='<p class="stec-tooltip-event-status"><span class="cancelled">'+t("Cancelled")+"</span></p>";break;case"EventMovedOnline":f='<p class="stec-tooltip-event-status"><span class="moved-online">'+t("Moved Online")+"</span></p>";break;case"EventPostponed":f='<p class="stec-tooltip-event-status"><span class="postponed">'+t("Postponed")+"</span></p>";break;case"EventRescheduled":f='<p class="stec-tooltip-event-status"><span class="rescheduled">'+t("Rescheduled")+"</span></p>";break;default:f=""}r='<div class="stec-tooltip-icon" style="background:'+n.color+' ">'+v+"</div>",l=i.tz(n.start_date,n.timezone).add(d,"seconds"),c=i.tz(n.end_date,n.timezone).add(d,"seconds"),u=s.beautifyTimespan(l,1!==parseInt(n.hide_end,10)&&c,n.all_day),p="",n.images_meta&&n.images_meta.length>0&&(p='<div style="background-image: url('+n.images_meta[0].src+');" ></div>'),h.html((function(e,a){return a.replace(/stec_replace_event_status/g,f).replace(/stec_replace_image/g,p).replace(/stec_replace_summary/g,n.title).replace(/stec_replace_desc_short/g,n.description_short).replace(/stec_replace_icon/g,r).replace(/stec_replace_location/g,(function(){return"virtual"===n.location.type?t("Online Event"):n.location.title?n.location.title:n.location.full_address})).replace(/stec_replace_timespan/g,u)}
1)),n.location.full_address||h.find(".stec-tooltip-location").hide(),""===p&&(h.find(".stec-tooltip-image").hide(),h.find(".stec-tooltip-icon").css({top:0,position:"static",marginTop:20})),-1===e.inArray(["EventCancelled","EventPostponed"],n.event_status)&&(2===m&&h.find(".stec-tooltip-expired").css("display","inline-block"),1===m&&h.find(".stec-tooltip-progress").css("display","inline-block"),0!==parseInt(n.counter,10)&&0===m&&(h.find(".stec-tooltip-counter").css("display","inline-block"),this.clock.init(l))),s.extendBind("stachethemes_ec_extend","filterTooltipHtml",{event:n,repeat_offset:d,tooltip:h})},clock:{days:0,hours:0,minutes:0,seconds:0,daysLabel:t("DaysAbbr"),hoursLabel:t("HoursAbbr"),minutesLabel:t("MinutesAbbr"),secondsLabel:t("SecondsAbbr"),interval:"",init:function(e){var t,n;this.clear(),t=i(),n=Math.floor(e.unix()-t.unix()),this.days=Math.floor(n/86400),this.hours=Math.floor(n%86400/3600),this.minutes=Math.floor(n%86400%3600/60),this.seconds=Math.floor(n%86400%3600%60),n<0?this.complete():this.count()},setTimer:function(){var t=e("#tooltip-"+o.options.id),n=this.days+this.daysLabel+" "+this.hours+this.hoursLabel+" "+this.minutes+this.minutesLabel+" "+this.seconds+this.secondsLabel;t.find(".stec-tooltip-counter span").text(n)},count:function(){var e=this;e.setTimer(),e.interval=setInterval((function(){e.seconds--,e.seconds<0&&(e.seconds=59,e.minutes--,e.minutes<0&&(e.minutes=59,e.hours--,e.hours<0&&(e.hours=23,e.days>0&&e.days--))),e.setTimer(),0===e.days&&0===e.hours&&0===e.minutes&&0===e.seconds&&(e.clear(),e.complete())}),1e3)},complete:function(){this.clear()},clear:function(){clearInterval(this.interval)}}}).init()})),function(){function n(t){return e.grep(t,(function(n,a){return a===e.inArray(n,t)}))}e.stecExtend((function(t,n){var a=[];e(t.calData.filterGetEvents).each((function(){var n,i,s,o,r,l=parseInt(this.featured,10);if(1===parseInt(t.glob.options.featured_only,10)&&l<=0)return!0;switch(t.calData.featuredFilter){case 1:if(l<=0)return!0;break;case-1:if(l>0)return!0}if(-1===e.inArray(parseInt(this.calid,10),t.calData.calendarFilter))return!0;if(t.calData.categoriesPool.length>0&&(n=!1,this.category.length>0?e.each(this.category,(function(){if(-1!==e.inArray(parseInt(this.id,10),t.calData.categoriesFilter))return n=!0,!1})):n=-1!==e.inArray(parseInt(0,10),t.calData.categoriesFilter),!1===n))return!0;if(t.calData.organizersPool.length>0&&(i=!1,this.organizers.length>0?e.each(this.organizers,(function(){if(-1!==e.inArray(this.id,t.calData.organizersFilter))return i=!0,!1})):-1!==e.inArray("none",t.calData.organizersFilter)&&(i=!0),!1===i))return!0;if(t.glob.options.filter_location){for(r in s=t.glob.options.filter_location.toLowerCase(),o=!1,this.location)if(this.location.hasOwnProperty(r)){if("id"===r)continue;if(this.location[r].toString().toLowerCase()===s){o=!0;break}}if(!1===o)return!0}else if("virtual"===this.location.type&&-1!==e.inArray("stec-virtual",t.calData.locationsFilter));else if(this.location.full_address){if(-1===e.inArray(this.location.full_address,t.calData.locationsFilter)&&-1===e.inArray(this.location.country,t.calData.locationsFilter)&&-1===e.inArray(this.location.city,t.calData.locationsFilter))return!0}else if(-1===e.inArray("none",t.calData.locationsFilter))return!0;a.push(this)})),t.calData.filterGetEvents=a}),"beforeProccessGetEvents"),e.stecExtend((function(a,i){var s=[],o=[],r=[],l=[],c=parseInt(a.glob.options.general_settings.use_cat_color,10),d=[];function u(n){e('<div class="stec-top-menu-quick-search-wrap"><input class="stec-top-menu-quick-search" type="text" placeholder="'+t("Search")+'" /></div>').insertBefore(n.find(".stec-scrollable"))}i.length<=0?a.$instance.$top.find(".stec-top-menu-filter").hide():(e(i).each((function(){var t=this,n=!1,a=!1;e(s).each((function(){this.id===t.calid&&(n=!0)})),!1===n&&s.push({id:t.calid,title:t.calendar.title,color:t.calendar.color}),t.location.full_address&&(e(r).each((function(){this.id===t.location.id&&(a=!0)})),!1===a&&r.push(t.location)),t.category.length>0&&(1===c&&(t.color=t.category[0].color),e.each(t.category,(function(){var t=this,n=!1;e.each(o,(function(){this.id===t.id&&(n=!0)})),!1===n&&o.push({id:this.id,title:this.title,color:this.color})}))),t.organizers.length>0&&e.each(t.organizers,(function(){var t=this,n=!1;e.each(l,(function(){this.id===t.id&&(n=!0)})),!1===n&&l.push({id:this.id,name:this.name})}))})),r.sort((function(e,t){return e.full_address.localeCompare(t.full_address,void 0,{numeric:!0,sensitivity:"base"})})),o.sort((function(e,t){return e.title.localeCompare(t.title,void 0,{numeric:!0,sensitivity:"base"})})),a.calData.calendarsPool=s,a.calData.organizersPool=l,a.calData.categoriesPool=o,a.calData.locationsPool=a.glob.options.filter_location?[]:r,a.calData.calendarsPool.length>1&&d.push('<li data-exclude-qsf="1" class="stec-select-all active"><span><i class="fas fa-check-double"></i>'+t("select_all")+"</span></li>"),e(a.calData.calendarsPool).each((function(){a.calData.calendarFilter.push(parseInt(this.id,10)),a.calData.calendarFilter=n(a.calData.calendarFilter),d.push('<li class="active" data-calid="'+this.id+'"><span><i class="fas fa-check-square"></i>'+this.title+"</span></li>")})),a.$instance.$top.find(".stec-top-menu-filter-by-calendar").find("ul").children("li").remove(),e(d.join("")).appendTo(a.$instance.$top.find(".stec-top-menu-filter-by-calendar").find("ul")),d=[],a.calData.categoriesPool.length>1&&d.push('<li data-exclude-qsf="1" class="stec-select-all active"><span><i class="fas fa-check-double"></i>'+t("select_all")+"</span></li>"),d.push('<li class="active" data-catid="0"><span><i class="fas fa-check-square"></i>'+t("uncategorized")+"</span></li>"),e(a.calData.categoriesPool).each((function(){a.calData.categoriesFilter.push(parseInt(this.id,10)),a.calData.categoriesFilter=n(a.calData.categoriesFilter),d.push('<li class="active" data-catid="'+this.id+'"><span><i class="fas fa-check-square"></i>'+this.title+"</span></li>")})),a.$instance.$top.find(".stec-top-menu-filter-by-category").find("ul").children("li").remove(),e(d.join("")).appendTo(a.$instance.$top.find(".stec-top-menu-filter-by-category").find("ul")),d=[],a.calData.organizersPool.length>1&&d.push('<li data-exclude-qsf="1" class="stec-select-all active"><span><i class="fas fa-check-double"></i>'+t("select_all")+"</span></li>"),d.push('<li class="active" data-organizer="none"><span><i class="fas fa-check-square"></i>'+t("noorganizer")+"</span></li>"),e(a.calData.organizersPool).each((function(){a.calData.organizersFilter.push(this.id),a.calData.organizersFilter=n(a.calData.organizersFilter),d.push('<li class="active" data-organizer="'+this.id+'"><span><i class="fas fa-check-square"></i>'+this.name+"</span></li>")})),a.$instance.$top.find(".stec-top-menu-filter-by-organizer").find("ul").children("li").remove(),e(d.join("")).appendTo(a.$instance.$top.find(".stec-top-menu-filter-by-organizer").find("ul")),d=[],a.calData.locationsPool.length>1&&d.push('<li data-exclude-qsf="1" class="stec-select-all active"><span><i class="fas fa-check-double"></i>'+t("select_all")+"</span></li>"),d.push('<li class="active" data-location="none"><span><i class="fas fa-check-square"></i>'+t("nolocation")+"</span></li>"),d.push('<li class="active" data-location="stec-virtual"><span><i class="fas fa-check-square"></i>'+t("Online Events")+"</span></li>"),e(a.calData.locationsPool).each((function(){if("virtual"===this.type)return!0;this.country&&a.calData.locationsFilter.push(this.country),this.city&&a.calData.locationsFilter.push(this.city),this.full_address&&this.full_address!==[this.city,this.country].join(", ")&&a.calData.locationsFilter.push(this.full_address),a.calData.locationsFilter=n(a.calData.locationsFilter)})),d.push(function(t){var n,a,i,s=[],o=[];for(n in o.other=[],o.other.other=[],e.each(t,(function(){if(!this.country)return!0;0==this.country in o&&(o[this.country]=[],o[this.country].other=[])})),e.each(t,(function(){if(!this.city)return!0;o[this.country?this.country:"other"][this.city]||(o[this.country?this.country:"other"][this.city]=[])})),e.each(t,(function(){var e;return"virtual"===this.type||(e=this.title?this.title:this.address,!this.address||(o[this.country?this.country:"other"][this.city?this.city:"other"]||(o[this.country?this.country:"other"][this.city?this.city:"other"]=[]),void(o[this.country?this.country:"other"][this.city?this.city:"other"][e]=this.full_address)))})),o)if("other"===n){for(a in o[n])if(o[n].hasOwnProperty(a))if("other"===a)for(i in o[n][a])o[n][a].hasOwnProperty(i)&&s.push('<li class="active" data-location="'+o[n][a][i]+'"><span><i class="fas fa-check-square"></i>'+i+"</span></li>");else{for(i in s.push('<li class="active" data-location="'+a+'"><span><i class="fas fa-check-square"></i>'+a+"</span>"),s.push("<ul>"),o[n][a])o[n][a].hasOwnProperty(i)&&s.push('<li class="active" data-location="'+o[n][a][i]+'"><span><i class="fas fa-check-square"></i>'+i+"</span></li>");s.push("</ul>"),s.push("</li>")}}else{for(a in s.push('<li class="active" data-location="'+n+'"><span><i class="fas fa-check-square"></i>'+n+"</span>"),s.push("<ul>"),o[n])if("other"===a)for(i in o[n][a])o[n][a].hasOwnProperty(i)&&s.push('<li class="active" data-location="'+o[n][a][i]+'"><span><i class="fas fa-check-square"></i>'+i+"</span></li>");else{for(i in s.push('<li class="active" data-location="'+a+'"><span><i class="fas fa-check-square"></i>'+a+"</span>"),s.push("<ul>"),o[n][a])o[n][a].hasOwnProperty(i)&&s.push('<li class="active" data-location="'+o[n][a][i]+'"><span><i class="fas fa-check-square"></i>'+i+"</span></li>");s.push("</ul>"),s.push("</li>")}s.push("</ul>"),s.push("</li>")}return s.join("")}(a.calData.locationsPool)),a.$instance.$top.find(".stec-top-menu-filter-by-location").find("ul").children("li").remove(),e(d.join("")).appendTo(a.$instance.$top.find(".stec-top-menu-filter-by-location").find("ul")),0===a.calData.categoriesPool.length&&a.$instance.$top.find(".stec-top-menu-filter-by-category").hide(),0===a.calData.locationsPool.length&&a.$instance.$top.find(".stec-top-menu-filter-by-location").hide(),a.calData.calendarsPool.length<=1&&a.$instance.$top.find(".stec-top-menu-filter-by-calendar").hide(),a.calData.organizersPool.length<=0&&a.$instance.$top.find(".stec-top-menu-filter-by-organizer").hide(),a.calData.categoriesPool.length>8&&u(a.$instance.$top.find(".stec-top-menu-filter-by-category")),a.calData.organizersPool.length>8&&u(a.$instance.$top.find(".stec-top-menu-filter-by-organizer")),a.calData.locationsPool.length>8&&u(a.$instance.$top.find(".stec-top-menu-filter-by-location")),a.calData.calendarsPool.length>8&&u(a.$instance.$top.find(".stec-top-menu-filter-by-calendar")))}),"onAddToEventsPool"),e.stecExtend((function(t){var a=t.$instance,i=t.helper,s=null;function o(e){a.find(".stec-top-menu-filter-dropdown").children(".stec-style-flexbox").children().not(e).removeClass("active"),a.find(".stec-top-menu-filter-dropdown .stec-top-menu-filter-by").not(e).find(" > div > i:last-child").removeClass("fa-chevron-down").addClass("fa-chevron-right")}e(document).on(i.clickHandle(),a.$top.path+" .stec-top-menu-search",(function(e){a.find(".stec-top-menu-filter").removeClass("active"),a.find(".stec-top-menu-filter-dropdown:not(.static)").removeClass("active"),o()})),e(document).on(i.clickHandle(),a.$top.path+" .stec-top-menu-filter",(function(e){e.preventDefault(),e.stopPropagation(),a.find(".stec-top-menu-filter").toggleClass("active"),a.find(".stec-top-menu-filter-dropdown").toggleClass("active"),a.find(".stec-top-menu-filter").hasClass("active")||o(),a.find(".stec-top-menu-search").removeClass("active"),i.isMobile()&&a.$top.find(".stec-top-dropmenu-layouts").children("li").removeClass("mobile-hover")})),e(document).on(i.clickHandle(),a.$top.path+" .stec-top-menu-filter-dropdown .stec-top-menu-filter-by",(function(t){var n;t.preventDefault(),t.stopPropagation(),e(this).toggleClass("active"),e(this).children("div").children("i").last().toggleClass("fa-chevron-right fa-chevron-down"),o(this),e(this).find(".stec-scrollable").data("stec-scroll")||((n=new window.StecScroll).create(e(this).find(".stec-scrollable")),e(this).find(".stec-scrollable").data("stec-scroll",n))})),e(document).on(i.clickHandle(),a.$top.path+" .stec-top-menu-filter-by-calendar ul li:not('.stec-select-all')",(function(i){var s,o=!0;i.preventDefault(),i.stopPropagation(),e(this).toggleClass("active"),e(this).find("i").toggleClass("fas fa-check-square far fa-square"),e(this).hasClass("active")?t.calData.calendarFilter.push(parseInt(e(this).attr("data-calid"),10)):!1!==t.calData.calendarFilter&&(s=t.calData.calendarFilter.indexOf(parseInt(e(this).attr("data-calid"),10)))>-1&&t.calData.calendarFilter.splice(s,1),t.calData.calendarFilter=n(t.calData.calendarFilter),a.$top.find(".stec-top-menu-filter-by-calendar ul li:not('.stec-select-all')").each((function(){if(!e(this).hasClass("active"))return o=!1,!1})),o?a.$top.find(".stec-top-menu-filter-by-calendar ul li.stec-select-all").addClass("active"):a.$top.find(".stec-top-menu-filter-by-calendar ul li.stec-select-all").removeClass("active"),t.layout.set()})),e(document).on(i.clickHandle(),a.$top.path+" .stec-top-menu-filter-by-calendar ul li.stec-select-all",(function(i){var s;i.preventDefault(),i.stopPropagation(),e(this).toggleClass("active"),e(this).hasClass("active")?a.$top.find(".stec-top-menu-filter-by-calendar ul li:not('.stec-select-all')").filter(":visible").each((function(){e(this).addClass("active"),e(this).find("i").removeClass("far fa-square"),e(this).find("i").addClass("fas fa-check-square"),t.calData.calendarFilter.push(parseInt(e(this).attr("data-calid"),10))})):a.$top.find(".stec-top-menu-filter-by-calendar ul li:not('.stec-select-all')").filter(":visible").each((function(){e(this).removeClass("active"),e(this).find("i").removeClass("fas fa-check-square"),e(this).find("i").addClass("far fa-square"),!1!==t.calData.calendarFilter&&(s=t.calData.calendarFilter.indexOf(parseInt(e(this).attr("data-calid"),10)))>-1&&t.calData.calendarFilter.splice(s,1)})),t.calData.calendarFilter=n(t.calData.calendarFilter),t.layout.set()})),e(document).on(i.clickHandle(),a.$top.path+" .stec-top-menu-filter-by-category ul li:not('.stec-select-all')",(function(i){var s,o=!0;i.preventDefault(),i.stopPropagation(),e(this).toggleClass("active"),e(this).find("i").toggleClass("fas fa-check-square far fa-square"),e(this).hasClass("active")?t.calData.categoriesFilter.push(parseInt(e(this).attr("data-catid"),10)):!1!==t.calData.categoriesFilter&&(s=t.calData.categoriesFilter.indexOf(parseInt(e(this).attr("data-catid"),10)))>-1&&t.calData.categoriesFilter.splice(s,1),t.calData.categoriesFilter=n(t.calData.categoriesFilter),o=!0,a.$top.find(".stec-top-menu-filter-by-category ul li:not('.stec-select-all')").each((function(){if(!e(this).hasClass("active"))return o=!1,!1})),o?a.$top.find(".stec-top-menu-filter-by-category ul li.stec-select-all").addClass("active"):a.$top.find(".stec-top-menu-filter-by-category ul li.stec-select-all").removeClass("active"),t.layout.set()})),e(document).on(i.clickHandle(),a.$top.path+" .stec-top-menu-filter-by-category ul li.stec-select-all",(function(i){i.preventDefault(),i.stopPropagation(),e(this).toggleClass("active"),e(this).hasClass("active")?a.$top.find(".stec-top-menu-filter-by-category ul li:not(.stec-select-all)").filter(":visible").each((function(){e(this).addClass("active"),e(this).find("i").removeClass("far fa-square"),e(this).find("i").addClass("fas fa-check-square"),t.calData.categoriesFilter.push(parseInt(e(this).attr("data-catid"),10))})):a.$top.find(".stec-top-menu-filter-by-category ul li:not(.stec-select-all)").filter(":visible").each((function(){e(this).removeClass("active"),e(this).find("i").removeClass("fas fa-check-square"),e(this).find("i").addClass("far fa-square"),t.calData.categoriesFilter=[]})),t.calData.categoriesFilter=n(t.calData.categoriesFilter),t.layout.set()})),e(document).on(i.clickHandle(),a.$top.path+" .stec-top-menu-filter-by-organizer ul li:not('.stec-select-all')",(function(i){var s,o=!0;i.preventDefault(),i.stopPropagation(),e(this).toggleClass("active"),e(this).find("i").toggleClass("fas fa-check-square far fa-square"),e(this).hasClass("active")?t.calData.organizersFilter.push(parseInt(e(this).attr("data-organizer"),10)):!1!==t.calData.organizersFilter&&(s=t.calData.organizersFilter.indexOf(parseInt(e(this).attr("dat
1a-organizer"),10)))>-1&&t.calData.organizersFilter.splice(s,1),t.calData.organizersFilter=n(t.calData.organizersFilter),o=!0,a.$top.find(".stec-top-menu-filter-by-organizer ul li:not('.stec-select-all')").each((function(){if(!e(this).hasClass("active"))return o=!1,!1})),o?a.$top.find(".stec-top-menu-filter-by-organizer ul li.stec-select-all").addClass("active"):a.$top.find(".stec-top-menu-filter-by-organizer ul li.stec-select-all").removeClass("active"),t.layout.set()})),e(document).on(i.clickHandle(),a.$top.path+" .stec-top-menu-filter-by-organizer ul li.stec-select-all",(function(i){var s;i.preventDefault(),i.stopPropagation(),e(this).toggleClass("active"),e(this).hasClass("active")?a.$top.find(".stec-top-menu-filter-by-organizer ul li:not('.stec-select-all')").filter(":visible").each((function(){e(this).addClass("active"),e(this).find("i").removeClass("far fa-square"),e(this).find("i").addClass("fas fa-check-square"),t.calData.organizersFilter.push(parseInt(e(this).attr("data-organizer"),10))})):a.$top.find(".stec-top-menu-filter-by-organizer ul li:not('.stec-select-all')").filter(":visible").each((function(){e(this).removeClass("active"),e(this).find("i").removeClass("fas fa-check-square"),e(this).find("i").addClass("far fa-square"),!1!==t.calData.organizersFilter&&(s=t.calData.organizersFilter.indexOf(parseInt(e(this).attr("data-organizer"),10)))>-1&&t.calData.organizersFilter.splice(s,1)})),t.calData.organizersFilter=n(t.calData.organizersFilter),t.layout.set()})),e(document).on(i.clickHandle(),a.$top.path+" .stec-top-menu-filter-by-location ul li:not('.stec-select-all')",(function(i){var s,o=!0;i.preventDefault(),i.stopPropagation(),e(this).toggleClass("active"),e(this).find("> span i").toggleClass("fas fa-check-square far fa-square"),e(this).hasClass("active")?(t.calData.locationsFilter.push(e(this).attr("data-location")),e.each(e(this).find("li"),(function(){e(this).addClass("active"),t.calData.locationsFilter.push(e(this).attr("data-location")),e(this).find("> span i").removeClass("far fa-square"),e(this).find("> span i").addClass("fas fa-check-square")}))):(s=[e(this).attr("data-location")],e.each(e(this).find("li"),(function(){e(this).removeClass("active"),e(this).find("> span i").addClass("far fa-square"),e(this).find("> span i").removeClass("fas fa-check-square"),s.push(e(this).attr("data-location"))})),!1!==t.calData.locationsFilter&&e.each(s,(function(){var e=t.calData.locationsFilter.indexOf(this.toString());e>-1&&t.calData.locationsFilter.splice(e,1)}))),t.calData.locationsFilter=n(t.calData.locationsFilter),o=!0,a.$top.find(".stec-top-menu-filter-by-location ul li:not('.stec-select-all')").each((function(){if(!e(this).hasClass("active"))return o=!1,!1})),o?a.$top.find(".stec-top-menu-filter-by-location ul li.stec-select-all").addClass("active"):a.$top.find(".stec-top-menu-filter-by-location ul li.stec-select-all").removeClass("active"),t.layout.set()})),e(document).on(i.clickHandle(),a.$top.path+" .stec-top-menu-filter-by-location ul li.stec-select-all",(function(i){var s;i.preventDefault(),i.stopPropagation(),e(this).toggleClass("active"),e(this).hasClass("active")?a.$top.find(".stec-top-menu-filter-by-location ul li:not('.stec-select-all')").filter(":visible").each((function(){e(this).addClass("active"),e(this).find("i").removeClass("far fa-square"),e(this).find("i").addClass("fas fa-check-square"),t.calData.locationsFilter.push(e(this).attr("data-location"))})):a.$top.find(".stec-top-menu-filter-by-location ul li:not('.stec-select-all')").filter(":visible").each((function(){e(this).removeClass("active"),e(this).find("i").removeClass("fas fa-check-square"),e(this).find("i").addClass("far fa-square"),!1!==t.calData.locationsFilter&&(s=t.calData.locationsFilter.indexOf(e(this).attr("data-location")))>-1&&t.calData.locationsFilter.splice(s,1)})),t.calData.locationsFilter=n(t.calData.locationsFilter),t.layout.set()})),e(document).on(i.clickHandle(),a.$top.path+" .stec-top-menu-filter-by-featured ul li",(function(n){n.preventDefault(),n.stopPropagation(),e(this).addClass("active"),e(this).find("i").removeClass("far fa-square").addClass("fas fa-check-square"),e(this).hasClass("active")&&(t.calData.featuredFilter=parseInt(e(this).attr("data-featured"),10)),e(this).siblings().removeClass("active"),e(this).siblings().find("i").removeClass("fas fa-check-square").addClass("far fa-square"),t.layout.set()})),e(document).on(i.clickHandle(),a.$top.path+" .stec-top-menu-quick-search",(function(e){e.stopPropagation()})),e(document).on("input",a.$top.path+" .stec-top-menu-quick-search",(function(t){var n=this;t.preventDefault(),t.stopPropagation(),s&&clearTimeout(s),s=setTimeout((function(){var t=e(n),a=t.parents(".stec-top-menu-filter-by").first(),i=a.find(".stec-top-menu-filter-contents"),s=t.val().toLowerCase().trim(),o=a.find(".stec-scrollable").data("stec-scroll");s?i.children("li").each((function(){let t,n;if(t=e(this),t.attr("data-exclude-qsf"))return!0;n=t.find("span").text().toLowerCase(),-1!==n.indexOf(s)?e(this).show():e(this).hide()})):i.children("li").show(),null!==o.originalStyle&&o.reset()}),350)}))}))}(),e.stecExtend((function(t){var n=t.$instance,a=t.helper,i=t.glob,
1s=t.layout,o=t.calData;({init:function(){this.bindControls()},bindControls:function(){var t,i=this;n.$top.find(".stec-top-search-dropdown").on("keyup",(function(e){var a,s,o;switch(clearTimeout(t),a=n.$top.find(".stec-top-search-form input").val(),s=n.$top.find(".stec-top-search-results li"),e.which){case 27:i.closeSearch();break;case 13:if(s.filter(".active").length<=0)return void i.getResults(a);void 0!==(o=s.filter(".active")).attr("data-jumpdate")&&(i.jumpToDate(o),i.closeSearch());break;case 38:s.filter(".active").length>0?s.filter(".active").removeClass("active").prev().addClass("active"):s.filter(":last").addClass("active");break;case 40:s.filter(".active").length>0?s.filter(".active").removeClass("active").next().addClass("active"):s.first().addClass("active");break;default:t=setTimeout((function(){i.getResults(a)}),250)}})),e(document).on(a.clickHandle(),n.$top.path+" .stec-top-search-results li",(function(t){var a,s=n.$top.find(".stec-top-search-results li");s.removeClass("active"),e(this).addClass("active"),void 0===(a=s.filter(".active")).attr("data-jumpsingle")&&t.preventDefault(),void 0!==a.attr("data-jumpdate")&&(i.jumpToDate(a),i.closeSearch())})),n.$top.find(".stec-top-search-form a").on(a.clickHandle(),(function(e){var t;e.preventDefault(),t=n.$top.find("input").val(),i.getResults(t)})),e(document).on(a.clickHandle(),n.$top.path+" .stec-top-menu-search",(function(t){t.preventDefault(),t.stopPropagation(),e(this).find(".stec-top-search-dropdown").css({left:-1*Math.round(e(this).position().left)}),e(this).toggleClass("active")})),e(document).on(a.clickHandle(),n.$top.path+" .stec-top-search-dropdown",(function(e){e.stopPropagation()}))},jumpToDate:function(e){var t=a.getDateFromData(e.attr("data-jumpdate"));i.options.year=t.getFullYear(),i.options.month=t.getMonth(),i.options.day=t.getDate(),s.set()},closeSearch:function(){this.resetResults(),n.$top.find(".stec-top-menu-search").removeClass("active")},resetResults:function(){n.$top.find(".stec-top-search-dropdown-noresult").hide(),n.$top.find(".stec-top-search-results").empty()},escapeHtml:function(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(e).replace(/[&<>"'\/]/g,(function(e){return t[e]}))},getResults:function(t){var s,r,l,c,d,u,p,f,h=this;h.resetResults(),""!==(t=t.trim())&&(s=t.split(" "),r={generic:!1,date:{year:!1,month:!1,day:!1}},s=e.grep(s,(function(t,n){return n===e.inArray(t,s)})),e(s).each((function(){var t,n=!0;h.isYear(this)&&(r.date.year=this,n=!1),h.isMonthString(this)&&(t=this,e(i.options.monthLabels).each((function(e){this.toLowerCase()===t.toLowerCase()&&(r.date.month=e,n=!1)})),!1===r.date.month&&e(i.options.monthLabelsShort).each((function(e){this.toLowerCase()===t.toLowerCase()&&(r.date.month=e,n=!1)}))),h.isDay(this)&&(r.date.day=this,n=!1),!0===n&&(r.generic=!0)})),l="",!1===r.generic?!1===r.date.year&&!1===r.date.month&&!1===r.date.day||(!1===r.date.year&&(r.date.year=i.options.year),!1===r.date.month&&(r.date.month=i.options.month),!1===r.date.day&&(r.date.day=i.options.day),c=r.date.year+"-"+r.date.month+"-"+r.date.day,d=new Date(r.date.year,r.date.month,r.date.day),u=a.beautifyTimespan(d,d,1),e(l='<li data-jumpDate="'+c+'"><i class="fas fa-calendar-check"></i> <p>'+u+"</p></li>").appendTo(n.$top.find(".stec-top-search-results"))):(f=[],e(s).each((function(){var t,n=this;if(n.length<=2)return!0;n=n.toLowerCase(),t=o.eventsPool,e(t).each((function(){var t,s,r,l=[];-1!==o.calendarFilter.indexOf(parseInt(this.calid,10))&&(t=this.title.toLowerCase(),s=this.location.full_address?this.location.full_address.toLowerCase():"",(this.keywords.toLowerCase().indexOf(n)>-1||t.indexOf(n)>-1||s.indexOf(n)>-1)&&(this.rrule?(r=o.repeaterGetClosest(this),l.push(r[0])):l.push(this),l.length>0&&e.each(l,(function(){var e=a.getEventState(this);return 0!==e&&1===parseInt(i.options.upcoming_only,10)||0===e&&1===parseInt(i.options.expired_only,10)||void f.push(this)}))))}))})),f.length>0?(l=[],p=[],e.each(f,(function(){var t=this,n=!1;e.each(p,(function(){if(t.id===this.id)return n=!0,!1})),!1===n&&p.push(t)})),e(f=p).each((function(){var e=a.getPermalink(this.permalink,this.repeat_time_offset);l.push('<li data-jumpsingle><a href="'+e+'"><i class="'+this.icon+'"></i><p>'+this.title+"</p></a></li>")})),e(l.join("")).appendTo(n.$top.find(".stec-top-search-results"))):n.$top.find(".stec-top-search-dropdown-noresult").show()))},isMonthString:function(t){var n=!1;return isNaN(t)&&(-1!==e.inArray(t.toLowerCase(),i.options.monthLabels)&&(n=!0),-1!==e.inArray(t.toLowerCase(),i.options.monthLabelsShort)&&(n=!0)),n},isDay:function(e){var t=!1;return isNaN(e)||e.length<=2&&e<=31&&e>0&&(t=!0),t},isYear:function(e){var t=!1;return isNaN(e)||4===e.length&&e>=1800&&e<=2200&&(t=!0),t}}).init()})),window.StecCalData=function(){this.page=0,this.perPage=500,this.featuredFilter=0,this.calendarFilter=[],this.calendarsPool=[],this.categoriesPool=[0],this.categoriesFilter=[0],this.locationsPool=["none","stec-v
1irtual"],this.locationsFilter=["none","stec-virtual"],this.organizersPool=["none"],this.organizersFilter=["none"],this.helper="",this.glob="",this.DB="",this.eventsPool=[],this.eventsWorker=[]},(n=window.StecCalData.prototype).set=function(e,t){return void 0!==this[e]&&(this[e]=t),this},n.getEventById=function(t,n){var a=[];return e(this.eventsPool).each((function(){if(parseInt(this.id,10)===parseInt(t,10))return a=this,n&&n>0&&((a=JSON.parse(JSON.stringify(a))).start_date_timestamp=a.start_date_timestamp+n,a.end_date_timestamp=a.end_date_timestamp+n,a.start_date=i.tz(a.start_date,a.timezone).add(n,"seconds").format("YYYY-MM-DD HH:mm:ss"),a.end_date=i.tz(a.end_date,a.timezone).add(n,"seconds").format("YYYY-MM-DD HH:mm:ss"),a.repeat_time_offset=n),!1})),a},n.sortByFeatured=function(e,t){return 0},n.sortByTimestamp=function(e,t){return e.start_date_timestamp<t.start_date_timestamp?-1:e.start_date_timestamp>t.start_date_timestamp?1:0},n.removeFromEventsPool=function(t){var n=[];e(this.eventsPool).each((function(){this.id!==t&&n.push(this)})),this.eventsPool=n},n.addToEventsPool=function(t){e.each(t,(function(){this.start_date_timestamp=i.tz(this.start_date,this.timezone).unix(),this.end_date_timestamp=i.tz(this.end_date,this.timezone).unix()})),this.eventsPool=this.eventsPool.concat(t),this.helper.extendBind("stachethemes_ec_extend","onAddToEventsPool",this.eventsPool)},n.addDataToEvent=function(t){e(this.eventsPool).each((function(){parseInt(this.id,10),parseInt(t.general.id),this.data=t}))},n.getFutureEvents=function(e){var t=new Date(this.glob.options.year,this.glob.options.month,this.glob.options.day),n=new Date(t),a=parseInt(this.glob.options.future_months_ahead,10);return this.glob.options.future_months_ahead=isNaN(a)?12:a,n.setMonth(n.getMonth()+this.glob.options.future_months_ahead),this.getEvents(t,n,e)},n.repeaterGetNearest=function(e,t,n){var a,s,o,r,l,c,d,u,p=i.utc(e.start_date),f=i.unix(t).utc(),h=(i.unix(n).utc(),e.rrule+";DTSTART="+this.helper.dateToRFC(p)),v=[];if(e.exdate){for(o=e.exdate.split(","),r=[],l=0;l<o.length;l++)8===o[l].length?(d=i.tz(e.start_date,e.timezone),c=i.tz(o[l],e.timezone),r.push(c.hours(d.hours()).minutes(d.minutes()).seconds(0).format("YYYYMMDDTHHmmss")+"Z")):r.push(o[l]);h+="\nEXDATE:"+r.join(",")}return(s=(a=window.rrule.rrulestr(h,{forceset:!0})).after(f.toDate(),!0))||(s=a.before(f.toDate(),!0)),s&&(u=this.getREvent(e,s)).end_date_timestamp>t&&v.push(u),v},n.getNearestDateEvents=function(t,n,a){var s,o,r,l=this,c=[],d=i().unix();return a||(a=!1),s=this.getRangeUnix(t),o=this.getRangeUnix(n||t,!0),(r=this.getOverridesInRange(s,o)).length>0&&(l.filterGetEvents=[],l.filterGetEvents=r,r=l.filterGetEvents,e.merge(c,l.filterGetEvents)),l.filterGetEvents=[],l.filterGetEvents=e.grep(this.eventsPool,(function(e){return!e.recurrence_id})),this.helper.extendBind("stachethemes_ec_extend","beforeProccessGetEvents"),e(l.filterGetEvents).each((function(){var t=this;if(!0!==a&&0===parseInt(this.approved,10))return!0;if(this.rrule&&""!==this.rrule)try{t=l.repeaterGetNearest(this,s,o)}catch(e){console.log(e),console.error("Error processing repeater for event "+this.id,"with RRULE String: "+this.rrule)}e(t).each((function(){var e,t;return!!(r.length>0&&l.isOverriden(this))||(e=this.start_date_timestamp,t=this.end_date_timestamp,1===parseInt(l.glob.options.expired_only,10)&&t>d||1===parseInt(l.glob.options.upcoming_only,10)&&e<d||void(o>e&&t>=s&&c.push(this)))}))})),l.filterGetEvents=c.sort(l.sortByTimestamp),"agenda"!==this.glob.options.view&&"grid"!==this.glob.options.view&&"boxgrid"!==this.glob.options.view&&l.filterGetEvents.sort(this.sortByFeatured),this.helper.extendBind("stachethemes_ec_extend","beforeReturnGetEvents"),l.filterGetEvents},n.getRangeUnix=function(e,t){var n,a=null;return e?1==e instanceof Date?a=[e.getFullYear(),e.getMonth(),e.getDate()]:"string"==typeof e?a=[(e=i.utc(e).toDate()).getFullYear(),e.getMonth(),e.getDate()]:console.log("Unsupported dateOrString"):a=[this.glob.options.year,this.glob.options.month,this.glob.options.day],(n=window.moment.tz("UTC")).set({year:a[0],month:a[1],date:a[2],hour:0,minute:0,second:0,millisecond:0}),t&&n.add(24,"hours"),n.unix()},n.getEvents=function(t,n,a){var s,o,r,l=this,c=[],d=i().unix();return a||(a=!1),l.filterGetEvents=[],s=this.getRangeUnix(t),o=this.getRangeUnix(n||t,!0),(r=this.getOverridesInRange(s,o)).length>0&&(l.filterGetEvents=r,r=l.filterGetEvents,e.merge(c,l.filterGetEvents)),l.filterGetEvents=e.grep(this.eventsPool,(function(e){return!e.recurrence_id})),this.helper.extendBind("stachethemes_ec_extend","beforeProccessGetEvents"),e(l.filterGetEvents).each((function(){var t=this;if(!0!==a&&0===parseInt(t.approved,10))return!0;
1if(t.rrule&&""!==t.rrule)try{t=l.repeaterGet(t,s,o)}catch(e){console.log(e),console.error("Error processing repeater for event "+this.id,"with RRULE String: "+this.rrule)}e(t).each((function(){var e,t;return!!(r.length>0&&l.isOverriden(this))||(e=i.tz(this.start_date,"UTC").unix(),t=i.tz(this.end_date,"UTC").unix(),1===parseInt(l.glob.options.expired_only,10)&&t>d||1===parseInt(l.glob.options.upcoming_only,10)&&e<d||void(o>e&&t>=s&&c.push(this)))}))})),l.filterGetEvents=c.sort(l.sortByTimestamp),"agenda"!==this.glob.options.view&&"grid"!==this.glob.options.view&&"boxgrid"!==this.glob.options.view&&l.filterGetEvents.sort(this.sortByFeatured),this.helper.extendBind("stachethemes_ec_extend","beforeReturnGetEvents"),l.filterGetEvents},n.isOverriden=function(e){var t=i.tz(e.start_date,e.timezone).format("YMMDDTHmss");return this.getOverrides(e.uid,t).length>0},n.getOverridesInRange=function(t,n,a){var i=a||this.eventsPool;return e.grep(i,(function(e){return!!e.recurrence_id&&n>e.start_date_timestamp&&e.end_date_timestamp>=t}))},n.getOverrides=function(t,n){return e.grep(this.eventsPool,(function(e){var a,s=0;return!!e.recurrence_id&&(-1!==e.recurrence_id.indexOf("Z")?(s=(a=new i.tz(e.recurrence_id,"UTC")).isDST()?(e.timezone_utc_offset-3600)/3600*-1:e.timezone_utc_offset/3600*-1,a.utcOffset(s),e.recurrence_id=a.format("YYYYMMDDTHHmmss")):8===e.recurrence_id.length&&(n=n.substr(0,8)),t===e.uid&&e.recurrence_id===n)}))},n.repeaterGet=function(t,n,a){var s,o,r,l=this,c=i.utc(t.start_date),d=i.unix(n).utc(),u=i.unix(a).utc(),p=t.rrule+";DTSTART="+this.helper.dateToRFC(c),f=[];return c.isBefore(d)&&(d=c),t.exdate&&(o=t.exdate.split(","),r=[],e.each(o,(function(){var e,n;8===this.length?(n=i.tz(t.start_date,t.timezone),e=i.tz(this,t.timezone),r.push(e.hours(n.hours()).minutes(n.minutes()).seconds(0).format("YYYYMMDDTHHmmss")+"Z")):r.push(this)})),p+="\nEXDATE:"+r.join(",")),s=window.rrule.rrulestr(p,{forceset:!0}).between(d.toDate(),u.toDate(),!0),e.each(s,(function(){var e=l.getREvent(t,this);if(e.end_date_timestamp<n)return!0;f.push(e)})),f},n.getREvent=function(e,t){var n,a,s=i.tz(e.start_date,e.timezone),o=i.tz(e.end_date,e.timezone),r=i.tz(t,e.timezone);return r.subtract(r.utcOffset(),"minutes"),a=r.diff(s,"seconds"),(n=JSON.parse(JSON.stringify(e))).start_date_timestamp=s.unix()+a,n.end_date_timestamp=o.unix()+a,n.start_date=s.add(a,"seconds").format("YYYY-MM-DD HH:mm:ss"),n.end_date=o.add(a,"seconds").format("YYYY-MM-DD HH:mm:ss"),n.repeat_time_offset=a,n},n.repeaterGetClosest=function(t,n){var a,s,o,r,l=this,c=i.utc(t.start_date),d=t.rrule+";DTSTART="+this.helper.dateToRFC(c),u=[];return n||(n=i.utc().toDate()),t.exdate&&(a=t.exdate.split(","),s=[],e.each(a,(function(){var e;8===this.length?(e=i(this),s.push(e.hours(c.toDate().getHours()).minutes(c.toDate().getMinutes()).seconds(0).utc().format("YYYYMMDDTHHmmss")+"Z")):s.push(this)})),d+="\nEXDATE:"+s.join(",")),(!(r=(o=window.rrule.rrulestr(d,{forceset:!0})).after(n,!0))||r.length<=0)&&(r=o.before(n,!0)),!r||r.length<=0?[]:(e(r).each((function(){var e=l.getREvent(t,this);u.push(e)})),u)},n.queryEventsStep=function(e){var t,n=this.DB,a=this.glob;(t=n.newRequest()).setData({action:"stec_public_ajax_action",cal:a.options.cal?a.options.cal:"",cat:a.options.cat?a.options.cat:"",organizer_id:a.options.organizer_id?a.options.organizer_id:"",min_date:a.options.min_date?a.options.min_date:null,max_date:a.options.max_date?a.options.max_date:null,page:this.page,per_page:this.perPage,task:"get_events"}),t.setCallback((function(t){e(t)})),t.setOnError((function(t,n,a){console.error("Stachethemes Event Calendar encountered an error ("+n+") during get_events ajax request",{status:t.status,response:t.responseText}),e(!1)})),n.query(t)},n.queryEvents=function(e,t){var n=this;this.glob.options.general_settings.events_per_request&&(this.perPage=parseInt(this.glob.options.general_settings.events_per_request,10)),this.queryEventsStep((function(a){a&&a.length>0?(n.addToEventsPool(a),n.page++,"function"==typeof t&&t(),a.length<=0?e():n.queryEvents(e,t)):e()}))},n.getFutureEventsThread=function(e,t){var n=this;return new Promise((function(a){var i,s,o;if("undefined"==typeof Worker)return a(n.getFutureEvents(e));i=new Date(n.glob.options.year,n.glob.options.month,n.glob.options.day),s=new Date(i),o=parseInt(n.glob.options.future_months_ahead,10),n.glob.options.future_months_ahead=isNaN(o)?12:o,s.setMonth(s.getMonth()+n.glob.options.future_months_ahead),n.getEventsThread(i,s,e,t).then((function(e){return a(e)}))}))},n.getEventsThread=function(e,t,n,a){var i=this;return new Promise((function(s){if("undefined"==typeof Worker)return s(i.getEvents(e,t,n
1));1==i.eventsWorker[a]instanceof Worker&&i.eventsWorker[a].terminate(),i.eventsWorker[a]=new Worker(window.stecPluginPath.url+"assets/js/background/worker/events.min.js"),i.filterGetEvents=i.eventsPool,i.helper.extendBind("stachethemes_ec_extend","beforeProccessGetEvents"),i.eventsWorker[a].postMessage({eventsPool:i.filterGetEvents,task:"getEvents",params:{from:e,to:t,incAapproval:!!n,upcomingOnly:1===parseInt(i.glob.options.upcoming_only,10),expiredOnly:1===parseInt(i.glob.options.expired_only,10),view:i.glob.options.view}}),i.eventsWorker[a].onmessage=function(e){i.eventsWorker[a].terminate(),i.filterGetEvents=e.data,i.helper.extendBind("stachethemes_ec_extend","beforeReturnGetEvents"),s(i.filterGetEvents)}}))},n.getNearestDateEventsThread=function(e,t,n,a){var i=this;return new Promise((function(s){if("undefined"==typeof Worker)return s(i.getNearestDateEvents(e,t,n));1==i.eventsWorker[a]instanceof Worker&&i.eventsWorker[a].terminate(),i.eventsWorker[a]=new Worker(window.stecPluginPath.url+"assets/js/background/worker/events.min.js"),i.filterGetEvents=i.eventsPool,i.helper.extendBind("stachethemes_ec_extend","beforeProccessGetEvents"),i.eventsWorker[a].postMessage({eventsPool:i.filterGetEvents,task:"getNearestEvents",params:{from:e,to:t,incAapproval:!!n,upcomingOnly:1===parseInt(i.glob.options.upcoming_only,10),expiredOnly:1===parseInt(i.glob.options.expired_only,10),view:i.glob.options.view}}),i.eventsWorker[a].onmessage=function(e){i.eventsWorker[a].terminate(),i.filterGetEvents=e.data,i.helper.extendBind("stachethemes_ec_extend","beforeReturnGetEvents"),s(i.filterGetEvents)}}))}}(window.jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.