(()=>{var ct=Object.create;var it=Object.defineProperty;var ft=Object.getOwnPropertyDescriptor;var lt=Object.getOwnPropertyNames;var dt=Object.getPrototypeOf,ht=Object.prototype.hasOwnProperty;var Q=(a,v)=>()=>{try{return v||a((v={exports:{}}).exports,v),v.exports}catch(L){throw v=0,L}};var mt=(a,v,L,W)=>{if(v&&typeof v=="object"||typeof v=="function")for(let D of lt(v))!ht.call(a,D)&&D!==L&&it(a,D,{get:()=>v[D],enumerable:!(W=ft(v,D))||W.enumerable});return a};var G=(a,v,L)=>(L=a!=null?ct(dt(a)):{},mt(v||!a||!a.__esModule?it(L,"default",{value:a,enumerable:!0}):L,a));var at=Q((K,R)=>{(function(a,v){typeof K=="object"&&typeof R<"u"?R.exports=v():typeof define=="function"&&define.amd?define(v):(a=typeof globalThis<"u"?globalThis:a||self).dayjs=v()})(K,(function(){"use strict";var a=1e3,v=6e4,L=36e5,W="millisecond",D="second",x="minute",y="hour",S="day",g="week",f="month",l="quarter",d="year",o="date",e="Invalid Date",r=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(u){var n=["th","st","nd","rd"],t=u%100;return"["+u+(n[(t-20)%10]||n[t]||n[0])+"]"}},p=function(u,n,t){var s=String(u);return!s||s.length>=n?u:""+Array(n+1-s.length).join(t)+u},_={s:p,z:function(u){var n=-u.utcOffset(),t=Math.abs(n),s=Math.floor(t/60),i=t%60;return(n<=0?"+":"-")+p(s,2,"0")+":"+p(i,2,"0")},m:function u(n,t){if(n.date()<t.date())return-u(t,n);var s=12*(t.year()-n.year())+(t.month()-n.month()),i=n.clone().add(s,f),c=t-i<0,m=n.clone().add(s+(c?-1:1),f);return+(-(s+(t-i)/(c?i-m:m-i))||0)},a:function(u){return u<0?Math.ceil(u)||0:Math.floor(u)},p:function(u){return{M:f,y:d,w:g,d:S,D:o,h:y,m:x,s:D,ms:W,Q:l}[u]||String(u||"").toLowerCase().replace(/s$/,"")},u:function(u){return u===void 0}},h="en",k={};k[h]=T;var z="$isDayjsObject",b=function(u){return u instanceof j||!(!u||!u[z])},Y=function u(n,t,s){var i;if(!n)return h;if(typeof n=="string"){var c=n.toLowerCase();k[c]&&(i=c),t&&(k[c]=t,i=c);var m=n.split("-");if(!i&&m.length>1)return u(m[0])}else{var O=n.name;k[O]=n,i=O}return!s&&i&&(h=i),i||!s&&h},M=function(u,n){if(b(u))return u.clone();var t=typeof n=="object"?n:{};return t.date=u,t.args=arguments,new j(t)},$=_;$.l=Y,$.i=b,$.w=function(u,n){return M(u,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var j=(function(){function u(t){this.$L=Y(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[z]=!0}var n=u.prototype;return n.parse=function(t){this.$d=(function(s){var i=s.date,c=s.utc;if(i===null)return new Date(NaN);if($.u(i))return new Date;if(i instanceof Date)return new Date(i);if(typeof i=="string"&&!/Z$/i.test(i)){var m=i.match(r);if(m){var O=m[2]-1||0,C=(m[7]||"0").substring(0,3);return c?new Date(Date.UTC(m[1],O,m[3]||1,m[4]||0,m[5]||0,m[6]||0,C)):new Date(m[1],O,m[3]||1,m[4]||0,m[5]||0,m[6]||0,C)}}return new Date(i)})(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return $},n.isValid=function(){return this.$d.toString()!==e},n.isSame=function(t,s){var i=M(t);return this.startOf(s)<=i&&i<=this.endOf(s)},n.isAfter=function(t,s){return M(t)<this.startOf(s)},n.isBefore=function(t,s){return this.endOf(s)<M(t)},n.$g=function(t,s,i){return $.u(t)?this[s]:this.set(i,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,s){var i=this,c=!!$.u(s)||s,m=$.p(t),O=function(B,N){var Z=$.w(i.$u?Date.UTC(i.$y,N,B):new Date(i.$y,N,B),i);return c?Z:Z.endOf(S)},C=function(B,N){return $.w(i.toDate()[B].apply(i.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(N)),i)},H=this.$W,U=this.$M,I=this.$D,P="set"+(this.$u?"UTC":"");switch(m){case d:return c?O(1,0):O(31,11);case f:return c?O(1,U):O(0,U+1);case g:var F=this.$locale().weekStart||0,J=(H<F?H+7:H)-F;return O(c?I-J:I+(6-J),U);case S:case o:return C(P+"Hours",0);case y:return C(P+"Minutes",1);case x:return C(P+"Seconds",2);case D:return C(P+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,s){var i,c=$.p(t),m="set"+(this.$u?"UTC":""),O=(i={},i[S]=m+"Date",i[o]=m+"Date",i[f]=m+"Month",i[d]=m+"FullYear",i[y]=m+"Hours",i[x]=m+"Minutes",i[D]=m+"Seconds",i[W]=m+"Milliseconds",i)[c],C=c===S?this.$D+(s-this.$W):s;if(c===f||c===d){var H=this.clone().set(o,1);H.$d[O](C),H.init(),this.$d=H.set(o,Math.min(this.$D,H.daysInMonth())).$d}else O&&this.$d[O](C);return this.init(),this},n.set=function(t,s){return this.clone().$set(t,s)},n.get=function(t){return this[$.p(t)]()},n.add=function(t,s){var i,c=this;t=Number(t);var m=$.p(s),O=function(U){var I=M(c);return $.w(I.date(I.date()+Math.round(U*t)),c)};if(m===f)return this.set(f,this.$M+t);if(m===d)return this.set(d,this.$y+t);if(m===S)return O(1);if(m===g)return O(7);var C=(i={},i[x]=v,i[y]=L,i[D]=a,i)[m]||1,H=this.$d.getTime()+t*C;return $.w(H,this)},n.subtract=function(t,s){return this.add(-1*t,s)},n.format=function(t){var s=this,i=this.$locale();if(!this.isValid())return i.invalidDate||e;var c=t||"YYYY-MM-DDTHH:mm:ssZ",m=$.z(this),O=this.$H,C=this.$m,H=this.$M,U=i.weekdays,I=i.months,P=i.meridiem,F=function(N,Z,E,V){return N&&(N[Z]||N(s,c))||E[Z].slice(0,V)},J=function(N){return $.s(O%12||12,N,"0")},B=P||function(N,Z,E){var V=N<12?"AM":"PM";return E?V.toLowerCase():V};return c.replace(w,(function(N,Z){return Z||(function(E){switch(E){case"YY":return String(s.$y).slice(-2);case"YYYY":return $.s(s.$y,4,"0");case"M":return H+1;case"MM":return $.s(H+1,2,"0");case"MMM":return F(i.monthsShort,H,I,3);case"MMMM":return F(I,H);case"D":return s.$D;case"DD":return $.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return F(i.weekdaysMin,s.$W,U,2);case"ddd":return F(i.weekdaysShort,s.$W,U,3);case"dddd":return U[s.$W];case"H":return String(O);case"HH":return $.s(O,2,"0");case"h":return J(1);case"hh":return J(2);case"a":return B(O,C,!0);case"A":return B(O,C,!1);case"m":return String(C);case"mm":return $.s(C,2,"0");case"s":return String(s.$s);case"ss":return $.s(s.$s,2,"0");case"SSS":return $.s(s.$ms,3,"0");case"Z":return m}return null})(N)||m.replace(":","")}))},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,s,i){var c,m=this,O=$.p(s),C=M(t),H=(C.utcOffset()-this.utcOffset())*v,U=this-C,I=function(){return $.m(m,C)};switch(O){case d:c=I()/12;break;case f:c=I();break;case l:c=I()/3;break;case g:c=(U-H)/6048e5;break;case S:c=(U-H)/864e5;break;case y:c=U/L;break;case x:c=U/v;break;case D:c=U/a;break;default:c=U}return i?c:$.a(c)},n.daysInMonth=function(){return this.endOf(f).$D},n.$locale=function(){return k[this.$L]},n.locale=function(t,s){if(!t)return this.$L;var i=this.clone(),c=Y(t,s,!0);return c&&(i.$L=c),i},n.clone=function(){return $.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},u})(),A=j.prototype;return M.prototype=A,[["$ms",W],["$s",D],["$m",x],["$H",y],["$W",S],["$M",f],["$y",d],["$D",o]].forEach((function(u){A[u[1]]=function(n){return this.$g(n,u[0],u[1])}})),M.extend=function(u,n){return u.$i||(u(n,j,M),u.$i=!0),M},M.locale=Y,M.isDayjs=b,M.unix=function(u){return M(1e3*u)},M.en=k[h],M.Ls=k,M.p={},M}))});var st=Q((X,tt)=>{(function(a,v){typeof X=="object"&&typeof tt<"u"?tt.exports=v():typeof define=="function"&&define.amd?define(v):(a=typeof globalThis<"u"?globalThis:a||self).dayjs_plugin_utc=v()})(X,(function(){"use strict";var a="minute",v=/[+-]\d\d(?::?\d\d)?/g,L=/([+-]|\d\d)/g;return function(W,D,x){var y=D.prototype;x.utc=function(e){var r={date:e,utc:!0,args:arguments};return new D(r)},y.utc=function(e){var r=x(this.toDate(),{locale:this.$L,utc:!0});return e?r.add(this.utcOffset(),a):r},y.local=function(){return x(this.toDate(),{locale:this.$L,utc:!1})};var S=y.parse;y.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),S.call(this,e)};var g=y.init;y.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else g.call(this)};var f=y.utcOffset;y.utcOffset=function(e,r){var w=this.$utils().u;if(w(e))return this.$u?0:w(this.$offset)?f.call(this):this.$offset;if(typeof e=="string"&&(e=(function(h){h===void 0&&(h="");var k=h.match(v);if(!k)return null;var z=(""+k[0]).match(L)||["-",0,0],b=z[0],Y=60*+z[1]+ +z[2];return Y===0?0:b==="+"?Y:-Y})(e),e===null))return this;var T=Math.abs(e)<=16?60*e:e;if(T===0)return this.utc(r);var p=this.clone();if(r)return p.$offset=T,p.$u=!1,p;var _=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(p=this.local().add(T+_,a)).$offset=T,p.$x.$localOffset=_,p};var l=y.format;y.format=function(e){var r=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,r)},y.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},y.isUTC=function(){return!!this.$u},y.toISOString=function(){return this.toDate().toISOString()},y.toString=function(){return this.toDate().toUTCString()};var d=y.toDate;y.toDate=function(e){return e==="s"&&this.$offset?x(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var o=y.diff;y.diff=function(e,r,w){if(e&&this.$u===e.$u)return o.call(this,e,r,w);var T=this.local(),p=x(e).local();return o.call(T,p,r,w)}}}))});var rt=Q((et,nt)=>{(function(a,v){typeof et=="object"&&typeof nt<"u"?nt.exports=v():typeof define=="function"&&define.amd?define(v):(a=typeof globalThis<"u"?globalThis:a||self).dayjs_plugin_timezone=v()})(et,(function(){"use strict";var a={year:0,month:1,day:2,hour:3,minute:4,second:5},v={};return function(L,W,D){var x,y=function(l,d,o){o===void 0&&(o={});var e=new Date(l),r=(function(w,T){T===void 0&&(T={});var p=T.timeZoneName||"short",_=w+"|"+p,h=v[_];return h||(h=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:w,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:p}),v[_]=h),h})(d,o);return r.formatToParts(e)},S=function(l,d){for(var o=y(l,d),e=[],r=0;r<o.length;r+=1){var w=o[r],T=w.type,p=w.value,_=a[T];_>=0&&(e[_]=parseInt(p,10))}var h=e[3],k=h===24?0:h,z=e[0]+"-"+e[1]+"-"+e[2]+" "+k+":"+e[4]+":"+e[5]+":000",b=+l;return(D.utc(z).valueOf()-(b-=b%1e3))/6e4},g=W.prototype;g.tz=function(l,d){l===void 0&&(l=x);var o,e=this.utcOffset(),r=this.toDate(),w=r.toLocaleString("en-US",{timeZone:l}),T=Math.round((r-new Date(w))/1e3/60),p=15*-Math.round(r.getTimezoneOffset()/15)-T;if(!Number(p))o=this.utcOffset(0,d);else if(o=D(w,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(p,!0),d){var _=o.utcOffset();o=o.add(e-_,"minute")}return o.$x.$timezone=l,o},g.offsetName=function(l){var d=this.$x.$timezone||D.tz.guess(),o=y(this.valueOf(),d,{timeZoneName:l}).find((function(e){return e.type.toLowerCase()==="timezonename"}));return o&&o.value};var f=g.startOf;g.startOf=function(l,d){if(!this.$x||!this.$x.$timezone)return f.call(this,l,d);var o=D(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(o,l,d).tz(this.$x.$timezone,!0)},D.tz=function(l,d,o){var e=o&&d,r=o||d||x,w=S(+D(),r);if(typeof l!="string")return D(l).tz(r);var T=(function(k,z,b){var Y=k-60*z*1e3,M=S(Y,b);if(z===M)return[Y,z];var $=S(Y-=60*(M-z)*1e3,b);return M===$?[Y,M]:[k-60*Math.min(M,$)*1e3,Math.max(M,$)]})(D.utc(l,e).valueOf(),w,r),p=T[0],_=T[1],h=D(p).utcOffset(_);return h.$x.$timezone=r,h},D.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},D.tz.setDefault=function(l){x=l}}}))});var q=G(at()),ot=G(st()),ut=G(rt());q.default.extend(ot.default);q.default.extend(ut.default);jQuery(function(a){a(".simcal-default-calendar").each(function(S,g){var f=a(g),l=f.data("calendar-id"),d=f.data("offset"),o=f.data("events-first"),e=f.data("calendar-end"),r=f.find(".simcal-calendar-head"),w=r.find(".simcal-nav-button"),T=f.find(".simcal-ajax-loader"),p=r.find(".simcal-current"),_=p.data("calendar-current"),h=p.find("span.simcal-current-month"),k=p.find("span.simcal-current-year"),z=(0,q.default)(_*1e3).tz(f.data("timezone")),b,Y;f.hasClass("simcal-default-calendar-grid")?(Y="simcal_default_calendar_draw_grid",b=new Date(z.year(),z.month()),v(w,b.getTime()/1e3,o,e)):(Y="simcal_default_calendar_draw_list",L(w,f,o,e,!1,_),W(f)),w.on("click",function(){var M=a(this).hasClass("simcal-next")?"next":"prev";if(Y=="simcal_default_calendar_draw_grid"){var $=f.find(".simcal-month"),j,A,u;M=="prev"?j=new Date(b.setMonth(b.getMonth()-1,1)):(j=new Date(b.setMonth(b.getMonth()+2,1)),j.setDate(0),j.setHours(23),j.setMinutes(59),j.setSeconds(59)),A=j.getMonth(),u=j.getFullYear(),a.ajax({url:simcal_default_calendar.ajax_url,type:"POST",dataType:"json",cache:!1,data:{action:Y,month:A+1,year:u,id:l},beforeSend:function(){T.fadeToggle()},success:function(c){h.text(simcal_default_calendar.months.full[A]),k.text(u),p.attr("data-calendar-current",j.getTime()/1e3+d+1),v(w,j.getTime()/1e3,o,e),T.fadeToggle(),b=j,$.replaceWith(c.data),x(f,n),y()},error:function(c){console.log(c)}})}else{var n=f.find(".simcal-events-list-container"),t=n.data("prev"),s=n.data("next"),i=M=="prev"?t:s;a.ajax({url:simcal_default_calendar.ajax_url,type:"POST",dataType:"json",cache:!1,data:{action:Y,ts:i,id:l},beforeSend:function(){T.fadeToggle()},success:function(c){n.replaceWith(c.data),p.attr("data-calendar-current",i),W(f),L(w,f,o,e,M,i),T.fadeToggle(),y()},error:function(c){console.log(c)}})}})});function v(S,g,f,l){S.each(function(d,o){var e=a(o),r=new Date(g*1e3);e.hasClass("simcal-prev")?(r=new Date(r.setMonth(r.getMonth(),1)),r.setDate(0),r.getTime()/1e3<=f?e.attr("disabled","disabled"):e.removeAttr("disabled")):(r=new Date(r.setMonth(r.getMonth()+1,1)),r.setDate(0),r.setHours(23),r.setMinutes(59),r.setSeconds(59),r.getTime()/1e3>=l?e.attr("disabled","disabled"):e.removeAttr("disabled"))})}function L(S,g,f,l,d,o){var e=g.find(".simcal-events-list-container"),r=e.data("prev"),w=e.data("next"),T=e.find("li.simcal-event:last").data("start");S.each(function(p,_){var h=a(_);d?h.hasClass("simcal-prev")?d=="prev"?r<=f&&o<=f&&h.attr("disabled","disabled"):h.removeAttr("disabled"):h.hasClass("simcal-next")&&(d=="next"?(w>=l&&o>=l||T>=l)&&h.attr("disabled","disabled"):h.removeAttr("disabled")):h.hasClass("simcal-prev")?r<=f&&o<=f&&h.attr("disabled","disabled"):h.hasClass("simcal-next")&&(w>=l&&o>=l||T>=l)&&h.attr("disabled","disabled")})}function W(S){var g=a(S).find(".simcal-current"),f=a(S).find(".simcal-events-list-container"),l=f.data("heading-small"),d=f.data("heading-large"),o=a("<h3 />");S.width()<400?o.text(l):o.text(d),g.html(o)}var D=a(".simcal-default-calendar-grid");function x(S){var g=a(S).find("> table"),f=g.find("thead"),l=f.find("th.simcal-week-day"),d=g.find("td.simcal-day > div"),o=g.find("ul.simcal-events"),e=o.find("> li > .simcal-event-title"),r=g.find(".simcal-events-toggle"),w=g.find("span.simcal-events-dots"),T=g.find(".simcal-tooltip-content"),p=g.find(".simcal-event-toggled"),_=g.data("event-bubble-trigger"),h=d.first().width();if(h<60){l.each(function(z,b){a(b).text(a(b).data("screen-small"))}),o.hide(),e.hide(),r!="undefined"&&(r.hide(),p!="undefined"&&p.show()),w.show(),_="click";var k=h-10+"px";d.css("min-height",k),g.find("span.simcal-events-dots:not(:empty)").css("min-height",k)}else h<=240?l.each(function(z,b){a(b).text(a(b).data("screen-medium"))}):l.each(function(z,b){a(b).text(a(b).data("screen-large"))}),o.show(),e.show(),r!="undefined"&&(r.show(),p!="undefined"&&p.hide()),w.hide(),d.css("min-height",h+"px");d.each(function(z,b){var Y=a(b).find("span.simcal-events-dots"),M=a(b).find(".simcal-tooltip"),$,j,A;h<60?(T.show(),$=Y):(T.hide(),$=M),$.each(function(u,n){a(n).qtip({content:{text:function(){return(h<60?a(b).find("ul.simcal-events").clone(!0,!0).css({display:"block"})[0]:a(n).find("> .simcal-tooltip-content").clone(!0,!0).css({display:"block"})[0])||"No event info available"}},position:{my:"top center",at:"bottom center",target:a(n),viewport:h<60?a(window):!0,adjust:{method:"shift",scroll:!1}},style:{def:!1,classes:"simcal-default-calendar simcal-event-bubble"},show:{solo:!0,effect:!1,event:_=="hover"?"mouseenter":"click"},hide:{fixed:!0,effect:!1,event:_=="click"?"unfocus":"mouseleave",delay:100},events:{render:function(t,s){setTimeout(()=>{s.reposition()},10)},show:function(t,s){A&&A.id&&A.id!==s.id&&A.hide(),A=s}},overwrite:!1})})})}D.each(function(S,g){x(g),a(g).on("change",function(){x(this)})}),window.onresize=function(){D.each(function(S,g){x(g)})},a("#print-calendar-button").on("click",function(){var S=a(".simcal-calendar").clone(!0);a("body").children().hide(),a("body").append(S),a("body").addClass("simcal-print-calendar"),window.print(),a("body > .simcal-calendar").remove(),a("body").children().not("script").show(),a("body").removeClass("simcal-print-calendar")});function y(){a(".simcal-events-toggle").each(function(S,g){var f=a(g).prev(".simcal-events"),l=f.find(".simcal-event-toggled"),d=a(g).find("i");a(g).on("click",function(){d.toggleClass("simcal-icon-rotate-180"),l.slideToggle()})})}y()});})();