var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opens = _____WB$wombat$assign$function_____("opens");
webpackJsonp([24],{0:function(v,A,e){e(1556);e(1208);e(1262);e(1261);e(633);e(553);e(632);e(1263);e(1155);e(307)},307:function(v,A){YUI.add("squarespace-widgets-alert",function(e){e.namespace("Squarespace.Widgets");var q=e.Squarespace.Widgets.Alert=e.Base.create("alert",e.Squarespace.Widgets.Confirmation,[],{},{CSS_PREFIX:"sqs-widgets-confirmation",TYPE:e.Squarespace.Widgets.Confirmation.TYPE,ANCHOR:e.Squarespace.Widgets.Confirmation.ANCHOR,show:function(d){return new q(d)},ATTRS:{className:{value:"alert"},
style:{value:e.Squarespace.Widgets.Confirmation.TYPE.CONFIRM_ONLY},"strings.confirm":{value:"Okay"}}})},"1.0",{requires:["base","squarespace-widgets-confirmation"]})},553:function(v,A){YUI.add("datatype-date-format",function(e,q){var d=function(a,f,b){"undefined"===typeof b&&(b=10);for(f+="";parseInt(a,10)<b&&1<b;b/=10)a=f+a;return a.toString()},b={formats:{a:function(a,f){return f.a[a.getDay()]},A:function(a,f){return f.A[a.getDay()]},b:function(a,f){return f.b[a.getMonth()]},B:function(a,f){return f.B[a.getMonth()]},
C:function(a){return d(parseInt(a.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(a){return d(parseInt(b.formats.G(a)%100,10),0)},G:function(a){var f=a.getFullYear(),d=parseInt(b.formats.V(a),10);a=parseInt(b.formats.W(a),10);a>d?f++:0===a&&52<=d&&f--;return f},H:["getHours","0"],I:function(a){a=a.getHours()%12;return d(0===a?12:a,0)},j:function(a){var f=new Date(""+a.getFullYear()+"/1/1 GMT");a=new Date(""+a.getFullYear()+"/"+(a.getMonth()+1)+"/"+a.getDate()+" GMT")-f;a=
parseInt(a/6E4/60/24,10)+1;return d(a,0,100)},k:["getHours"," "],l:function(a){a=a.getHours()%12;return d(0===a?12:a," ")},m:function(a){return d(a.getMonth()+1,0)},M:["getMinutes","0"],p:function(a,f){return f.p[12<=a.getHours()?1:0]},P:function(a,f){return f.P[12<=a.getHours()?1:0]},s:function(a,f){return parseInt(a.getTime()/1E3,10)},S:["getSeconds","0"],u:function(a){a=a.getDay();return 0===a?7:a},U:function(a){var f=parseInt(b.formats.j(a),10);a=6-a.getDay();f=parseInt((f+a)/7,10);return d(f,
0)},V:function(a){var f=parseInt(b.formats.W(a),10),e=(new Date(""+a.getFullYear()+"/1/1")).getDay(),f=f+(4<e||1>=e?0:1);53===f&&4>(new Date(""+a.getFullYear()+"/12/31")).getDay()?f=1:0===f&&(f=b.formats.V(new Date(""+(a.getFullYear()-1)+"/12/31")));return d(f,0)},w:"getDay",W:function(a){var f=parseInt(b.formats.j(a),10);a=7-b.formats.u(a);f=parseInt((f+a)/7,10);return d(f,0,10)},y:function(a){return d(a.getFullYear()%100,0)},Y:"getFullYear",z:function(a){a=a.getTimezoneOffset();var f=d(parseInt(Math.abs(a/
60),10),0),b=d(Math.abs(a%60),0);return(0<a?"-":"+")+f+b},Z:function(a){var f=a.toString().replace(/^.*:\d\d( GMT[+-]\d+)? \(?([A-Za-z ]+)\)?\d*$/,"$2").replace(/[a-z ]/g,"");4<f.length&&(f=b.formats.z(a));return f},"%":function(a){return"%"}},aggregates:{c:"locale",D:"%m/%d/%y",F:"%Y-%m-%d",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"},format:function(a,f){f=f||{};if(!e.Lang.isDate(a))return e.Lang.isValue(a)?a:"";var x,M;x=f.format||"%Y-%m-%d";M=e.Intl.get("datatype-date-format");
for(var n=function(f,a){var d=b.aggregates[a];return"locale"===d?M[a]:d},u=function(f,x){var n=b.formats[x];switch(e.Lang.type(n)){case "string":return a[n]();case "function":return n.call(a,a,M);case "array":if("string"===e.Lang.type(n[0]))return d(a[n[0]](),n[1]);default:return x}};x.match(/%[cDFhnrRtTxX]/);)x=x.replace(/%([cDFhnrRtTxX])/g,n);x=x.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g,u);n=u=void 0;return x}};e.mix(e.namespace("Date"),b);e.namespace("DataType");e.DataType.Date=e.Date},"3.17.2",
{lang:"ar ar-JO ca ca-ES da da-DK de de-AT de-DE el el-GR en en-AU en-CA en-GB en-IE en-IN en-JO en-MY en-NZ en-PH en-SG en-US es es-AR es-BO es-CL es-CO es-EC es-ES es-MX es-PE es-PY es-US es-UY es-VE fi fi-FI fr fr-BE fr-CA fr-FR hi hi-IN hu id id-ID it it-IT ja ja-JP ko ko-KR ms ms-MY nb nb-NO nl nl-BE nl-NL pl pl-PL pt pt-BR ro ro-RO ru ru-RU sv sv-SE th th-TH tr tr-TR vi vi-VN zh-Hans zh-Hans-CN zh-Hant zh-Hant-HK zh-Hant-TW".split(" ")})},632:function(v,A){YUI.add("datatype-date-math",function(e,
q){var d=e.Lang;e.mix(e.namespace("Date"),{isValidDate:function(b){return d.isDate(b)&&isFinite(b)&&"Invalid Date"!=b&&!isNaN(b)&&null!=b?!0:!1},areEqual:function(b,a){return this.isValidDate(b)&&this.isValidDate(a)&&b.getTime()==a.getTime()},isGreater:function(b,a){return this.isValidDate(b)&&this.isValidDate(a)&&b.getTime()>a.getTime()},isGreaterOrEqual:function(b,a){return this.isValidDate(b)&&this.isValidDate(a)&&b.getTime()>=a.getTime()},isInRange:function(b,a,f){return this.isGreaterOrEqual(b,
a)&&this.isGreaterOrEqual(f,b)},addDays:function(b,a){return new Date(b.getTime()+864E5*a)},addMonths:function(b,a){var f=b.getFullYear(),d=b.getMonth()+a,f=Math.floor(f+d/12),d=(d%12+12)%12,e=new Date(b.getTime());e.setFullYear(f);e.setMonth(d);return e},addYears:function(b,a){var f=b.getFullYear()+a,d=new Date(b.getTime());d.setFullYear(f);return d},listOfDatesInMonth:function(b){if(!this.isValidDate(b))return[];var a=this.daysInMonth(b),f=b.getFullYear();b=b.getMonth();for(var d=[],e=1;e<=a;e++)d.push(new Date(f,
b,e,12,0,0));return d},daysInMonth:function(b){if(!this.isValidDate(b))return 0;var a=b.getMonth(),f=[31,28,31,30,31,30,31,31,30,31,30,31];if(1!=a)return f[a];b=b.getFullYear();return 0===b%400?29:0===b%100?28:0===b%4?29:28}});e.namespace("DataType");e.DataType.Date=e.Date},"3.17.2",{requires:["yui-base"]})},633:function(v,A){YUI.add("datatype-date-parse",function(e,q){e.mix(e.namespace("Date"),{parse:function(d){d=new Date(+d||d);return e.Lang.isDate(d)?d:null}});e.namespace("Parsers").date=e.Date.parse;
e.namespace("DataType");e.DataType.Date=e.Date},"3.17.2")},1155:function(v,A){YUI.add("squarespace-calendar-day-template",function(e){var q=e.Handlebars;(function(){var d=q.template;(q.templates=q.templates||{})["calendar-day.html"]=d(function(b,a,f,d,e){function n(f,g){return""}function u(G,g){var a,c,d;a='\n\t<div class="background';if((d=f["if"].call(G,(c=(c=(c=G.events,null==c||!1===c?c:c[0]),null==c||!1===c?c:c.structuredContent),null==c||!1===c?c:c.startDate),{hash:{},inverse:h.noop,fn:h.program(5,
l,g),data:g}))||0===d)a+=d;return a+='">\n\t\t<a href="'+s((c=(c=(c=G.events,null==c||!1===c?c:c[0]),null==c||!1===c?c:c.fullUrl),typeof c===z?c.apply(G):c))+'" class="background-image-link"><img data-src="'+s((c=(c=(c=G.events,null==c||!1===c?c:c[0]),null==c||!1===c?c:c.assetUrl),typeof c===z?c.apply(G):c))+'" data-image-dimensions="'+s((c=(c=(c=G.events,null==c||!1===c?c:c[0]),null==c||!1===c?c:c.originalSize),typeof c===z?c.apply(G):c))+'" data-load="false" class="background-image"></a>\n\t</div>\n\t'}
function l(f,g){return" background--iseventscollection"}function r(f,g){return" itemlist--iseventscollection"}function q(g,a){var d,c,b;d='\n\t<li class="item';if((c=f["if"].call(g,g.isMultiday,{hash:{},inverse:h.noop,fn:h.program(11,m,a),data:a}))||0===c)d+=c;if((c=f["if"].call(g,g.isSubsequentDayOfMultidayEvent,{hash:{},inverse:h.noop,fn:h.program(13,k,a),data:a}))||0===c)d+=c;d+='">\n\t\t<a href="';(c=f.fullUrl)?c=c.call(g,{hash:{},data:a}):(c=g.fullUrl,c=typeof c===z?c.apply(g):c);d+=s(c)+'" class="item-link">\n\t\t\t<span class="item-time item-time--12hr">';
b={hash:{},data:a};d+=s((c=f["calendar-compact-time-format"]||g["calendar-compact-time-format"],c?c.call(g,(c=g.structuredContent,null==c||!1===c?c:c.startDate),b):B.call(g,"calendar-compact-time-format",(c=g.structuredContent,null==c||!1===c?c:c.startDate),b)))+'&nbsp;</span>\n\t\t\t<span class="item-time item-time--24hr">';b={hash:{format:"%H:%M"},data:a};d+=s((c=f["date-format"]||g["date-format"],c?c.call(g,(c=g.structuredContent,null==c||!1===c?c:c.startDate),b):B.call(g,"date-format",(c=g.structuredContent,
null==c||!1===c?c:c.startDate),b)))+'&nbsp;</span>\n\t\t\t<span class="item-title">';(c=f.title)?c=c.call(g,{hash:{},data:a}):(c=g.title,c=typeof c===z?c.apply(g):c);d+=s(c)+"</span>\n\t\t\t";if((c=f["if"].call(g,g.isMultiday,{hash:{},inverse:h.noop,fn:h.program(15,H,a),data:a}))||0===c)d+=c;return d+"\n\t\t</a>\n\t</li>\n\t"}function m(f,g){return" item--multiday"}function k(f,g){return" item--ongoing"}function H(g,a){var d,c;d={hash:{format:"%b %e"},data:a};return d='<span class="item-enddate">&nbsp;'+
(s((c=f["date-format"]||g["date-format"],c?c.call(g,(c=g.structuredContent,null==c||!1===c?c:c.endDate),d):B.call(g,"date-format",(c=g.structuredContent,null==c||!1===c?c:c.endDate),d)))+"</span>")}function w(f,g){return" flyoutitemlist--iseventscollection"}function N(f,g){return" \n\t\tflyoutitemlist--hasmorecontent\n\t"}function t(g,a){var d,c,b;d="\n\t\t";b={hash:{},inverse:h.noop,fn:h.program(22,v,a),data:a};(c=f.events)?c=c.call(g,b):(c=g.events,c=typeof c===z?c.apply(g):c);f.events||(c=O.call(g,
c,b));if(c||0===c)d+=c;return d+"\n\t"}function v(g,a){var d,c;d="\n\t\t\t";if((c=f["if"].call(g,g.excerpt,{hash:{},inverse:h.program(25,D,a),fn:h.program(23,A,a),data:a}))||0===c)d+=c;return d+"\n\t\t"}function A(f,g){return" \n\t\t\t\tflyoutitemlist--hasmorecontent\n\t\t\t"}function D(g,a){var d,c,b;d="\n\t\t\t\t";if((b=f["if"].call(g,(c=g.location,null==c||!1===c?c:c.addressLine1),{hash:{},inverse:h.noop,fn:h.program(26,C,a),data:a}))||0===b)d+=b;return d+"\n\t\t\t"}function C(f,g){return" \n\t\t\t\t\tflyoutitemlist--hasmorecontent\n\t\t\t\t"}
function I(a,d){var b,c,e;b='\n\t<li class="flyoutitem';if((c=f["if"].call(a,a.isMultiday,{hash:{},inverse:h.noop,fn:h.program(29,J,d),data:d}))||0===c)b+=c;if((c=f["if"].call(a,a.isSubsequentDayOfMultidayEvent,{hash:{},inverse:h.noop,fn:h.program(31,K,d),data:d}))||0===c)b+=c;b+='">\n\t\t<h1 class="flyoutitem-title"><a href="';(c=f.fullUrl)?c=c.call(a,{hash:{},data:d}):(c=a.fullUrl,c=typeof c===z?c.apply(a):c);b+=s(c)+'" class="flyoutitem-link">';(c=f.title)?c=c.call(a,{hash:{},data:d}):(c=a.title,
c=typeof c===z?c.apply(a):c);b+=s(c);if((c=f["if"].call(a,a.isMultiday,{hash:{},inverse:h.noop,fn:h.program(33,E,d),data:d}))||0===c)b+=c;b+='&nbsp;<span class="flyoutitem-link-arrow"></span></a></h1>\n\t\t<div class="flyoutitem-datetime flyoutitem-datetime--12hr">\n\t\t\t';if((c=f["if"].call(a,a.isMultiday,{hash:{},inverse:h.program(37,L,d),fn:h.program(35,P,d),data:d}))||0===c)b+=c;b+='\n\t\t</div>\n\t\t<div class="flyoutitem-datetime flyoutitem-datetime--24hr">\n\t\t\t';if((c=f["if"].call(a,a.isMultiday,
{hash:{},inverse:h.program(41,g,d),fn:h.program(39,y,d),data:d}))||0===c)b+=c;b+='\n\t\t</div>\n\t\t<div class="flyoutitem-location">\n\t\t\t';if((e=f["if"].call(a,(c=a.location,null==c||!1===c?c:c.addressTitle),{hash:{},inverse:h.noop,fn:h.program(43,R,d),data:d}))||0===e)b+=e;b+="\n\t\t\t";if((e=f["if"].call(a,(c=a.location,null==c||!1===c?c:c.addressLine1),{hash:{},inverse:h.noop,fn:h.program(45,S,d),data:d}))||0===e)b+=e;b+="\n\t\t\t";if((e=f["if"].call(a,(c=a.location,null==c||!1===c?c:c.addressLine2),
{hash:{},inverse:h.noop,fn:h.program(47,T,d),data:d}))||0===e)b+=e;b+="\n\t\t\t";if((e=f["if"].call(a,(c=a.location,null==c||!1===c?c:c.addressCountry),{hash:{},inverse:h.noop,fn:h.program(49,U,d),data:d}))||0===e)b+=e;b+="\n\t\t</div>\n\t\t";if((e=f["if"].call(a,a.excerpt,{hash:{},inverse:h.noop,fn:h.program(51,V,d),data:d}))||0===e)b+=e;return b+"\n\t</li>\n\t"}function J(f,g){return" flyoutitem--multiday"}function K(f,g){return" flyoutitem--ongoing"}function E(g,a){var d,c;d={hash:{format:"%b %e"},
data:a};return d=' <span class="flyoutitem-enddate">'+(s((c=f["date-format"]||g["date-format"],c?c.call(g,(c=g.structuredContent,null==c||!1===c?c:c.endDate),d):B.call(g,"date-format",(c=g.structuredContent,null==c||!1===c?c:c.endDate),d)))+"</span>")}function P(g,d){var a,c,b;b={hash:{format:"%a, %b %e, %l:%M%P"},data:d};a="\n\t\t\t\t"+(s((c=f["date-format"]||g["date-format"],c?c.call(g,(c=g.structuredContent,null==c||!1===c?c:c.startDate),b):B.call(g,"date-format",(c=g.structuredContent,null==c||
!1===c?c:c.startDate),b)))+" &ndash; ");b={hash:{format:"%a, %b %e, %l:%M%P"},data:d};return a+=s((c=f["date-format"]||g["date-format"],c?c.call(g,(c=g.structuredContent,null==c||!1===c?c:c.endDate),b):B.call(g,"date-format",(c=g.structuredContent,null==c||!1===c?c:c.endDate),b)))+"\n\t\t\t"}function L(g,a){var d,c,b;b={hash:{format:"%l:%M%P"},data:a};d="\n\t\t\t\t"+(s((c=f["date-format"]||g["date-format"],c?c.call(g,(c=g.structuredContent,null==c||!1===c?c:c.startDate),b):B.call(g,"date-format",
(c=g.structuredContent,null==c||!1===c?c:c.startDate),b)))+" &ndash; ");b={hash:{format:"%l:%M%P"},data:a};return d+=s((c=f["date-format"]||g["date-format"],c?c.call(g,(c=g.structuredContent,null==c||!1===c?c:c.endDate),b):B.call(g,"date-format",(c=g.structuredContent,null==c||!1===c?c:c.endDate),b)))+"\n\t\t\t"}function y(g,d){var a,c,b;b={hash:{format:"%a, %b %e, %H:%M"},data:d};a="\n\t\t\t\t"+(s((c=f["date-format"]||g["date-format"],c?c.call(g,(c=g.structuredContent,null==c||!1===c?c:c.startDate),
b):B.call(g,"date-format",(c=g.structuredContent,null==c||!1===c?c:c.startDate),b)))+" &ndash; ");b={hash:{format:"%a, %b %e, %H:%M"},data:d};return a+=s((c=f["date-format"]||g["date-format"],c?c.call(g,(c=g.structuredContent,null==c||!1===c?c:c.endDate),b):B.call(g,"date-format",(c=g.structuredContent,null==c||!1===c?c:c.endDate),b)))+"\n\t\t\t"}function g(g,a){var d,c,b;b={hash:{format:"%H:%M"},data:a};d="\n\t\t\t\t"+(s((c=f["date-format"]||g["date-format"],c?c.call(g,(c=g.structuredContent,null==
c||!1===c?c:c.startDate),b):B.call(g,"date-format",(c=g.structuredContent,null==c||!1===c?c:c.startDate),b)))+" &ndash; ");b={hash:{format:"%H:%M"},data:a};return d+=s((c=f["date-format"]||g["date-format"],c?c.call(g,(c=g.structuredContent,null==c||!1===c?c:c.endDate),b):B.call(g,"date-format",(c=g.structuredContent,null==c||!1===c?c:c.endDate),b)))+"\n\t\t\t"}function R(g,f){var d,c;return d=""+('<div class="flyoutitem-location-addresstitle">'+s((c=(c=g.location,null==c||!1===c?c:c.addressTitle),
typeof c===z?c.apply(g):c))+"</div>")}function S(g,f){var d,c;return d=""+('<div class="flyoutitem-location-address1">'+s((c=(c=g.location,null==c||!1===c?c:c.addressLine1),typeof c===z?c.apply(g):c))+"</div>")}function T(g,f){var d,c;return d=""+('<div class="flyoutitem-location-address2">'+s((c=(c=g.location,null==c||!1===c?c:c.addressLine2),typeof c===z?c.apply(g):c))+"</div>")}function U(g,f){var d,c;return d=""+('<div class="flyoutitem-location-addresscountry">'+s((c=(c=g.location,null==c||!1===
c?c:c.addressCountry),typeof c===z?c.apply(g):c))+"</div>")}function V(g,d){var a,c;a='<div class="flyoutitem-excerpt">';(c=f.excerpt)?c=c.call(g,{hash:{},data:d}):(c=g.excerpt,c=typeof c===z?c.apply(g):c);if(c||0===c)a+=c;return a+"</div>"}this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,b.helpers);e=e||{};b="";var p,h=this,z="function",s=this.escapeExpression,B=f.helperMissing,O=f.blockHelperMissing;if((d=f["if"].call(a,(p=(p=a.events,null==p||!1===p?p:p[0]),null==p||!1===p?p:p.systemDataId),{hash:{},
inverse:h.noop,fn:h.program(1,function(g,d){var a,c,b;a="\n\t";if((b=f["if"].call(g,(c=(c=g.events,null==c||!1===c?c:c[1]),null==c||!1===c?c:c.title),{hash:{},inverse:h.program(4,u,d),fn:h.program(2,n,d),data:d}))||0===b)a+=b;return a+"\n"},e),data:e}))||0===d)b+=d;d={hash:{format:"%a"},data:e};b=b+'\n\n<div class="marker">\n\t<div class="marker-dayname">'+(s((p=f["day-of-month-format"]||a["day-of-month-format"],p?p.call(a,a.date,d):B.call(a,"day-of-month-format",a.date,d)))+'</div>\n\t<div class="marker-daynum">');
d={hash:{format:"%e"},data:e};b+=s((p=f["day-of-month-format"]||a["day-of-month-format"],p?p.call(a,a.date,d):B.call(a,"day-of-month-format",a.date,d)))+"</div>\n</div>\n\n";if((d=f["if"].call(a,a.events,{hash:{},inverse:h.noop,fn:h.program(7,function(g,d){var a,c,b,e;a='\n<ul class="itemlist';if((b=f["if"].call(g,(c=(c=(c=g.events,null==c||!1===c?c:c[0]),null==c||!1===c?c:c.structuredContent),null==c||!1===c?c:c.startDate),{hash:{},inverse:h.noop,fn:h.program(8,r,d),data:d}))||0===b)a+=b;a+='">\n\t';
e={hash:{},inverse:h.noop,fn:h.program(10,q,d),data:d};(b=f.events)?b=b.call(g,e):(b=g.events,b=typeof b===z?b.apply(g):b);f.events||(b=O.call(g,b,e));if(b||0===b)a+=b;a+='\n</ul>\n\n<ul class="\n\tflyoutitemlist\n\t';if((b=f["if"].call(g,(c=(c=(c=g.events,null==c||!1===c?c:c[0]),null==c||!1===c?c:c.structuredContent),null==c||!1===c?c:c.startDate),{hash:{},inverse:h.noop,fn:h.program(17,w,d),data:d}))||0===b)a+=b;a+="\n\t";if((b=f["if"].call(g,(c=(c=g.events,null==c||!1===c?c:c[1]),null==c||!1===
c?c:c.title),{hash:{},inverse:h.program(21,t,d),fn:h.program(19,N,d),data:d}))||0===b)a+=b;a+='\n">\n\t';e={hash:{},inverse:h.noop,fn:h.program(28,I,d),data:d};(b=f.events)?b=b.call(g,e):(b=g.events,b=typeof b===z?b.apply(g):b);f.events||(b=O.call(g,b,e));if(b||0===b)a+=b;return a+='\n</ul>\n\n<div class="itemcount">'+s((c=(c=g.events,null==c||!1===c?c:c.length),typeof c===z?c.apply(g):c))+"</div>\n"},e),data:e}))||0===d)b+=d;return b+="\n"})})();e.Handlebars.registerPartial("calendar-day.html".replace("/",
"."),q.templates["calendar-day.html"])},"1.0",{requires:["handlebars-base"]})},1208:function(v,A,e){var q=e(93);YUI.add("squarespace-calendar-core-renderer",function(d){var b=function(a){return a.recordType===q.EVENT?a.structuredContent.startDate:a.addedOn};d.Squarespace.SquarespaceCalendar=d.Base.create("SquarespaceCalendar",d.Calendar,[],{initializer:function(){this._fetchEvents()},bindUI:function(){d.Calendar.superclass.bindUI.call(this);this.before("dateChange",this._clearEvents,this);this.after("dateChange",
this._fetchEvents,this);this.after("collectionIdChange",this._fetchEvents,this)},_clearEvents:function(){this.set("events",[])},_fetchEvents:function(){var a=this.get("date"),a=d.DataType.Date.format(a,{format:"%B-%Y",locale:"en"});d.Data.get({url:this._getFetchUrl(a),success:this._parseResponse,failure:this._handleResponseError},this)},_parseResponse:function(a){this.set("events",a)},_handleResponseError:function(a){this.fire("fetchEventsFailure");console.error("Failed fetch data: "+a)},_getFetchUrl:function(a){var b=
this.get("collectionId"),e=this.get("pageCollectionId");a="/api/open/GetItemsByMonth?collectionId="+b+"&month="+a;d.Lang.isValue(e)&&(a+="&pageCollectionId="+e);return a}},{ATTRS:{events:{value:[],validator:d.Lang.isArray},collectionId:{value:null,validator:d.Lang.isString},pageCollectionId:{value:null,validator:d.Lang.isString}}});d.Squarespace.CalendarBaseRenderer=d.Base.create("CalendarBaseRenderer",d.Plugin.Base,[],{initializer:function(a){this.host=a.host;this.afterHostEvent("eventsChange",this._onEventsChange,
this)},_onEventsChange:function(a){var b=null;d.Lang.isArray(a.newVal)&&0<a.newVal.length&&(b=d.bind(this._calendarFilterFunction,this));this.host.set("customRenderer",{rules:{all:"events"},filterFunction:b})},_calendarFilterFunction:function(a,b,d){d=this.host.get("events");d=this._getEventsOfDay(d,a);this._sortEvents(d);this._renderDay(a,b,d)},_renderDay:function(a,b,d){0<d.length&&b.setStyle("background","gray")},_sortEvents:function(a){a.sort(function(a,d){var f=b(a);return b(d)-f})},_getEventsOfDay:function(a,
b){var e=d.DataType.Date.format(b,{format:"%Y-%m-%d"});return d.Lang.isArray(a)&&0<a.length?d.Array.filter(a,function(a){return this._isEventPartOfDay(a,e)},this):[]},_isEventPartOfDay:function(a,b){var e,n;n=a.structuredContent;if(a.recordType!==q.EVENT)return e=d.Squarespace.DateUtils.dateFormat(a.addedOn,{format:"%Y-%m-%d"}),e===b;e=d.Squarespace.DateUtils.dateFormat(n.startDate,{format:"%Y-%m-%d"});n=d.Squarespace.DateUtils.dateFormat(n.endDate,{format:"%Y-%m-%d"});return b==e||b==n||new Date(b)>
new Date(e)&&new Date(b)<new Date(n)?!0:!1},_getEventDisplayTime:function(a){a=b(a);return d.Squarespace.DateUtils.dateFormat(a,{format:"%l:%M%P"}).trim()},_isSameDay:function(a,b){if(a.recordType!==q.EVENT)return!0;var e=d.Squarespace.DateUtils.dateFormat(a.structuredContent.startDate,{format:"%Y-%m-%d"}),n=d.DataType.Date.format(b,{format:"%Y-%m-%d"});return e===n}},{NS:"calendarPlugin"});var a=d.namespace("Squarespace").SquarespaceCalendarRenderer=d.Base.create("squarespaceCalendarRenderer",d.Squarespace.CalendarBaseRenderer,
[],{initializer:function(a){this._loadingSpinner=new d.Squarespace.Spinner({color:"dark",size:"extra-large",render:this.host.get("contentBox")});this.onceAfterHostEvent("eventsChange",this._renderCalendar);this.onceAfterHostEvent("fetchEventsFailure",function(){this._loadingSpinner&&this._loadingSpinner.destroy(!0);window.SQUARESPACE_LOGIN&&window.SQUARESPACE_LOGIN.isLoggedIn()&&this.host.get("boundingBox").ancestor().append('<div class="sqs-state-message">Please choose a valid collection for this calendar to display. It is possible that this calendar is pointing to a deleted collection.</div>');
this.host.destroy()},this);this._bindUI()},destructor:function(){this._loadingSpinner&&this._loadingSpinner.destroy(!0);this._resizeEvent.detach()},_bindUI:function(){this._resizeEvent=d.on("resize",this._syncUI,d.config.win,this)},_syncUI:function(){this.host.get("contentBox").getDOMNode()&&(this._fitToContainer(),this._setupCells(),this.host.get("contentBox").hasClass(a.COMPACT_LAYOUT_CLASS)||this._loadImages(),this._setFlyoutHeights())},_onEventsChange:function(a){a=d.bind(this._calendarFilterFunction,
this);this.host.set("customRenderer",{rules:{all:{all:{all:{0:"sunday",1:"monday",2:"tuesday",3:"wednesday",4:"thursday",5:"friday",6:"saturday"}}}},filterFunction:a});this.get("isRendered")&&this._syncUI()},_calendarFilterFunction:function(b,d,e){a.superclass._calendarFilterFunction.apply(this,arguments);0<=e.indexOf("sunday")?d.addClass("sunday"):0<=e.indexOf("monday")?d.addClass("monday"):0<=e.indexOf("friday")?d.addClass("friday"):0<=e.indexOf("saturday")&&d.addClass("saturday")},_fitToContainer:function(){var b=
this.host.get("contentBox");b.toggleClass(a.SMALL_LAYOUT_CLASS,770>=b.get("offsetWidth"));b.toggleClass(a.COMPACT_LAYOUT_CLASS,600>=b.get("offsetWidth"));b.toggleClass(a.TINY_LAYOUT_CLASS,300>=b.get("offsetWidth"))},_setupHeader:function(){this.host.get("contentBox").one(".yui3-calendar-header-label").wrap("<h1></h1>")},_setupCells:function(){var a=this.host.get("contentBox").one("table");a.setStyle("width",null);this.cellSpacing=parseInt(a.getComputedStyle("borderSpacing"),10);var b=7*parseInt((a.get("offsetWidth")-
8*this.cellSpacing)/7,10)+8*this.cellSpacing;a.setStyle("width",b);a.all("td").setStyles({width:parseInt(b/7,10)-this.cellSpacing,height:parseInt(b/7,10)-this.cellSpacing})},_loadImages:function(){this.host.get("contentBox").all("img[data-src]").each(function(a){ImageLoader.load(a,{mode:"fill",load:!0})},this)},_setFlyoutHeights:function(){this.host.get("contentBox").all(".flyoutitemlist--hasmorecontent").each(function(a){var b=a.ancestor("tr"),d=this._getRowHeight(b),b=a.ancestor("tr:nth-child(4)")||
a.ancestor("tr:nth-child(5)")||a.ancestor("tr:nth-child(6)")?this._getRowHeight(b.previous("tr")):this._getRowHeight(b.next("tr"));a.setStyle("height",d+b+this.cellSpacing)},this);this.host.get("contentBox").all("tr").removeAttribute("data-row-height")},_getRowHeight:function(a){if(a.getAttribute("data-row-height"))return parseInt(a.getAttribute("data-row-height"),10);var b=a.get("offsetHeight");a.setAttribute("data-row-height",b);return b},_renderCalendar:function(){this._setupHeader();this._syncUI();
this._loadingSpinner&&this._loadingSpinner.destroy(!0);this.host.get("boundingBox").addClass("loaded");this.set("isRendered",!0)},_renderDay:function(a,b,d){this.setAttrs({date:a,node:b,events:this._groupEvents(d,a)});this._highlightToday();this._highlightDaysWithEvents();a=this._getTemplateInfo().template(this._getHBTemplateContext());b.empty().append(a)},_highlightToday:function(){var b=new Date,b=new Date(b.setMinutes(b.getMinutes()+d.Squarespace.DateUtils.getTimeOffsetToWebsiteTimezone(b)));this.get("date").setHours(0,
0,0,0)===b.setHours(0,0,0,0)&&this.get("node").addClass(a.TODAY_CLASS)},_highlightDaysWithEvents:function(){0<this.get("events").length&&this.get("node").addClass(a.HAS_EVENT_CLASS)},_getTemplateInfo:function(){return{template:d.Squarespace.UITemplates.getCompiledTemplate(a.HANDLEBARS_TEMPLATE)}},_getHBTemplateContext:function(){return{date:this.get("date"),events:this.get("events")}},_groupEvents:function(a,b){var e=[],n=[];d.Array.each(a,function(a){this._isSameDay(a,b)?e.unshift(a):(a.isSubsequentDayOfMultidayEvent=
!0,n.unshift(a));this._isMultidayEvent(a)&&(a.isMultiday=!0)},this);return n.concat(e)},_isMultidayEvent:function(a){if(a.recordType===q.EVENT){var b=a.structuredContent;a=d.Squarespace.DateUtils.dateFormat(b.startDate,{format:"%d%m%Y"});b=d.Squarespace.DateUtils.dateFormat(b.endDate,{format:"%d%m%Y"});return a!==b}}},{NS:"calendarPlugin",TODAY_CLASS:"today",HAS_EVENT_CLASS:"has-event",SMALL_LAYOUT_CLASS:"small-layout",COMPACT_LAYOUT_CLASS:"compact-layout",TINY_LAYOUT_CLASS:"tiny-layout",HANDLEBARS_TEMPLATE:"calendar-day.html"});
d.Handlebars.registerHelper("day-of-month-format",function(a,b){return d.DataType.Date.format(a,{format:b.hash.format||"%B %e, %Y"})});d.Handlebars.registerHelper("date-format",function(a,b){return d.Squarespace.DateUtils.dateFormat(a,{format:b.hash.format||"%B %e, %Y"})});d.Handlebars.registerHelper("calendar-compact-time-format",function(a){var b="PM"==d.Squarespace.DateUtils.dateFormat(a,{format:"%p"})?"p":"a";return 0===(new Date(a)).getMinutes()?d.Squarespace.DateUtils.dateFormat(a,{format:"%l"})+
b:d.Squarespace.DateUtils.dateFormat(a,{format:"%l:%M"})+b})},"1.0",{requires:"calendar node squarespace-attr-validators squarespace-calendar-day-template squarespace-date-utils squarespace-ui-base squarespace-spinner squarespace-widgets-alert".split(" ")})},1261:function(v,A){YUI.add("calendar-base",function(e,q){function d(){d.superclass.constructor.apply(this,arguments)}var b=e.ClassNameManager.getClassName,a=b("calendar","grid"),f=b("calendar","left-grid"),x=b("calendar","right-grid"),v=b("calendar",
"body"),n=b("calendar","header"),u=b("calendar","header-label"),l=b("calendar","weekdayrow"),r=b("calendar","weekday"),F=b("calendar","column-hidden"),m=b("calendar","day-selected"),k=b("calendar","selection-disabled"),H=b("calendar","row"),w=b("calendar","day"),N=b("calendar","prevmonth-day"),t=b("calendar","nextmonth-day"),A=b("calendar","anchor"),Q=b("calendar","pane"),b=b("calendar","status"),D=e.Lang,C=D.sub,I=e.Array.each,J=e.Object.each,K=e.Array.indexOf,E=e.Object.hasKey,P=e.Object.setValue,
L=e.Object.isEmpty,y=e.DataType.Date;e.CalendarBase=e.extend(d,e.Widget,{_paneProperties:{},_paneNumber:1,_calendarId:null,_selectedDates:{},_rules:{},_filterFunction:null,_storedDateCells:{},initializer:function(){this._paneProperties={};this._calendarId=e.guid("calendar");this._selectedDates={};L(this._rules)&&(this._rules={});this._storedDateCells={}},renderUI:function(){this.get("contentBox").appendChild(this._initCalendarHTML(this.get("date")));this.get("showPrevMonth")&&this._afterShowPrevMonthChange();
this.get("showNextMonth")&&this._afterShowNextMonthChange();this._renderCustomRules();this._renderSelectedDates();this.get("boundingBox").setAttribute("aria-labelledby",this._calendarId+"_header")},bindUI:function(){this.after("dateChange",this._afterDateChange);this.after("showPrevMonthChange",this._afterShowPrevMonthChange);this.after("showNextMonthChange",this._afterShowNextMonthChange);this.after("headerRendererChange",this._afterHeaderRendererChange);this.after("customRendererChange",this._afterCustomRendererChange);
this.after("enabledDatesRuleChange",this._afterCustomRendererChange);this.after("disabledDatesRuleChange",this._afterCustomRendererChange);this.after("focusedChange",this._afterFocusedChange);this.after("selectionChange",this._renderSelectedDates);this._bindCalendarEvents()},_getSelectedDatesList:function(){var a=[];J(this._selectedDates,function(b){J(b,function(b){J(b,function(b){a.push(b)},this)},this)},this);return a},_getSelectedDatesInMonth:function(a){var b=a.getFullYear();a=a.getMonth();return E(this._selectedDates,
b)&&E(this._selectedDates[b],a)?e.Object.values(this._selectedDates[b][a]):[]},_isNumInList:function(a,b){if("all"===b)return!0;for(var d=b.split(","),e=d.length,f;e--;)if(f=d[e].split("-"),2===f.length&&a>=parseInt(f[0],10)&&a<=parseInt(f[1],10)||1===f.length&&parseInt(d[e],10)===a)return!0;return!1},_getRulesForDate:function(a){var b=a.getFullYear(),d=a.getMonth(),e=a.getDate();a=a.getDay();var f=this._rules,m=[],p,h,k,w;for(p in f)if(this._isNumInList(b,p))if(D.isString(f[p]))m.push(f[p]);else for(h in f[p])if(this._isNumInList(d,
h))if(D.isString(f[p][h]))m.push(f[p][h]);else for(k in f[p][h])if(this._isNumInList(e,k))if(D.isString(f[p][h][k]))m.push(f[p][h][k]);else for(w in f[p][h][k])this._isNumInList(a,w)&&D.isString(f[p][h][k][w])&&m.push(f[p][h][k][w]);return m},_matchesRule:function(a,b){return 0<=K(this._getRulesForDate(a),b)},_canBeSelected:function(a){var b=this.get("enabledDatesRule"),d=this.get("disabledDatesRule");return b?this._matchesRule(a,b):d?!this._matchesRule(a,d):!0},selectDates:function(a){y.isValidDate(a)?
this._addDateToSelection(a):D.isArray(a)&&this._addDatesToSelection(a);return this},deselectDates:function(a){a?y.isValidDate(a)?this._removeDateFromSelection(a):D.isArray(a)&&this._removeDatesFromSelection(a):this._clearSelection();return this},_addDateToSelection:function(a,b){a=this._normalizeTime(a);if(this._canBeSelected(a)){var d=a.getFullYear(),e=a.getMonth(),f=a.getDate();E(this._selectedDates,d)?E(this._selectedDates[d],e)||(this._selectedDates[d][e]={}):(this._selectedDates[d]={},this._selectedDates[d][e]=
{});this._selectedDates[d][e][f]=a;this._selectedDates=P(this._selectedDates,[d,e,f],a);b||this._fireSelectionChange()}},_addDatesToSelection:function(a){I(a,this._addDateToSelection,this);this._fireSelectionChange()},_addDateRangeToSelection:function(a,b){var d=6E4*(b.getTimezoneOffset()-a.getTimezoneOffset()),e=a.getTime(),f=b.getTime(),m;e>f?(m=e,e=f,f=m+d):f-=d;for(d=e;d<=f;d+=864E5)e=new Date(d),e.setHours(12),this._addDateToSelection(e,d);this._fireSelectionChange()},_removeDateFromSelection:function(a,
b){var d=a.getFullYear(),e=a.getMonth(),f=a.getDate();E(this._selectedDates,d)&&(E(this._selectedDates[d],e)&&E(this._selectedDates[d][e],f))&&(delete this._selectedDates[d][e][f],b||this._fireSelectionChange())},_removeDatesFromSelection:function(a){I(a,this._removeDateFromSelection,this);this._fireSelectionChange()},_removeDateRangeFromSelection:function(a,b){for(var d=a.getTime(),e=b.getTime();d<=e;d+=864E5)this._removeDateFromSelection(new Date(d),d);this._fireSelectionChange()},_clearSelection:function(a){this._selectedDates=
{};this.get("contentBox").all("."+m).removeClass(m).setAttribute("aria-selected",!1);a||this._fireSelectionChange()},_fireSelectionChange:function(){this.fire("selectionChange",{newSelection:this._getSelectedDatesList()})},_restoreModifiedCells:function(){var a=this.get("contentBox"),b;for(b in this._storedDateCells)a.one("#"+b).replace(this._storedDateCells[b]),delete this._storedDateCells[b]},_renderCustomRules:function(){this.get("contentBox").all("."+w+",."+t).removeClass(k).setAttribute("aria-disabled",
!1);if(!L(this._rules)){var a,b;for(a=0;a<this._paneNumber;a++)b=y.addMonths(this.get("date"),a),b=y.listOfDatesInMonth(b),I(b,e.bind(this._renderCustomRulesHelper,this))}},_renderCustomRulesHelper:function(a){var b=this.get("enabledDatesRule"),d=this.get("disabledDatesRule"),e;e=this._getRulesForDate(a);0<e.length?((b&&0>K(e,b)||!b&&d&&0<=K(e,d))&&this._disableDate(a),D.isFunction(this._filterFunction)&&(b=this._dateToNode(a),this._storedDateCells[b.get("id")]=b.cloneNode(!0),this._filterFunction(a,
b,e))):b&&this._disableDate(a)},_renderSelectedDates:function(){this.get("contentBox").all("."+m).removeClass(m).setAttribute("aria-selected",!1);var a,b;for(a=0;a<this._paneNumber;a++)b=y.addMonths(this.get("date"),a),b=this._getSelectedDatesInMonth(b),I(b,e.bind(this._renderSelectedDatesHelper,this))},_renderSelectedDatesHelper:function(a){this._dateToNode(a).addClass(m).setAttribute("aria-selected",!0)},_disableDate:function(a){this._dateToNode(a).addClass(k).setAttribute("aria-disabled",!0)},
_dateToNode:function(a){var b=a.getDate(),d=0,e=b%7;a=(12+a.getMonth()-this.get("date").getMonth())%12;var f=this._paneProperties[this._calendarId+"_pane_"+a].cutoffCol;switch(e){case 0:d=6<=f?12:5;break;case 1:d=6;break;case 2:d=0<f?7:0;break;case 3:d=1<f?8:1;break;case 4:d=2<f?9:2;break;case 5:d=3<f?10:3;break;case 6:d=4<f?11:4}return this.get("contentBox").one("#"+this._calendarId+"_pane_"+a+"_"+d+"_"+b)},_nodeToDate:function(a){a=a.get("id").split("_").reverse();var b=parseInt(a[2],10);a=parseInt(a[0],
10);var d=y.addMonths(this.get("date"),b),b=d.getFullYear(),d=d.getMonth();return new Date(b,d,a,12,0,0,0)},_bindCalendarEvents:function(){},_normalizeDate:function(a){return a?new Date(a.getFullYear(),a.getMonth(),1,12,0,0,0):null},_normalizeTime:function(a){return a?new Date(a.getFullYear(),a.getMonth(),a.getDate(),12,0,0,0):null},_getCutoffColumn:function(a,b){return 6-(this._normalizeDate(a).getDay()-b+7)%7},_turnPrevMonthOn:function(a){var b=a.get("id"),d=y.daysInMonth(y.addMonths(this._paneProperties[b].paneDate,
-1)),e;this._paneProperties[b].hasOwnProperty("daysInPrevMonth")||(this._paneProperties[b].daysInPrevMonth=0);if(d!==this._paneProperties[b].daysInPrevMonth){this._paneProperties[b].daysInPrevMonth=d;for(e=5;0<=e;e--)a.one("#"+b+"_"+e+"_"+(e-5)).set("text",d--)}},_turnPrevMonthOff:function(a){var b=a.get("id"),d;this._paneProperties[b].daysInPrevMonth=0;for(d=5;0<=d;d--)a.one("#"+b+"_"+d+"_"+(d-5)).setContent("&nbsp;")},_cleanUpNextMonthCells:function(a){var b=a.get("id");a.one("#"+b+"_6_29").removeClass(t);
a.one("#"+b+"_7_30").removeClass(t);a.one("#"+b+"_8_31").removeClass(t);a.one("#"+b+"_0_30").removeClass(t);a.one("#"+b+"_1_31").removeClass(t)},_turnNextMonthOn:function(a){var b=1,d=a.get("id"),e=this._paneProperties[d].daysInMonth,f=this._paneProperties[d].cutoffCol,m;for(m=e-22;m<f+7;m++)a.one("#"+d+"_"+m+"_"+(m+23)).set("text",b++).addClass(t);m=f;for(31===e&&1>=f?m=2:30===e&&0===f&&(m=1);m<f+7;m++)a.one("#"+d+"_"+m+"_"+(m+30)).set("text",b++).addClass(t)},_turnNextMonthOff:function(a){var b=
a.get("id"),d=this._paneProperties[b].daysInMonth,e=this._paneProperties[b].cutoffCol,f;for(f=d-22;12>=f;f++)a.one("#"+b+"_"+f+"_"+(f+23)).setContent("&nbsp;").addClass(t);f=0;for(31===d&&1>=e?f=2:30===d&&0===e&&(f=1);12>=f;f++)a.one("#"+b+"_"+f+"_"+(f+30)).setContent("&nbsp;").addClass(t)},_afterShowNextMonthChange:function(){var a=this.get("contentBox").one("#"+this._calendarId+"_pane_"+(this._paneNumber-1));this._cleanUpNextMonthCells(a);this.get("showNextMonth")?this._turnNextMonthOn(a):this._turnNextMonthOff(a)},
_afterShowPrevMonthChange:function(){var a=this.get("contentBox").one("#"+this._calendarId+"_pane_0");this.get("showPrevMonth")?this._turnPrevMonthOn(a):this._turnPrevMonthOff(a)},_afterHeaderRendererChange:function(){this.get("contentBox").one("."+u).setContent(this._updateCalendarHeader(this.get("date")))},_afterCustomRendererChange:function(){this._restoreModifiedCells();this._renderCustomRules()},_afterDateChange:function(){var b=this.get("contentBox"),d=b.one("."+n).one("."+u),e=b.all("."+a),
f=this.get("date"),m=0;b.setStyle("visibility","hidden");d.setContent(this._updateCalendarHeader(f));this._restoreModifiedCells();e.each(function(a){this._rerenderCalendarPane(y.addMonths(f,m++),a)},this);this._afterShowPrevMonthChange();this._afterShowNextMonthChange();this._renderCustomRules();this._renderSelectedDates();b.setStyle("visibility","inherit")},_initCalendarPane:function(a,b){var f=this.get("strings.very_short_weekdays")||"Su Mo Tu We Th Fr Sa".split(" "),m=e.Intl.get("datatype-date-format").A,
k=this.get("strings.first_weekday")||0,H=this._getCutoffColumn(a,k),p=y.daysInMonth(a),h="     ".split(" "),l={},r,n,q;l.weekday_row="";for(r=k;r<=k+6;r++)l.weekday_row+=C(d.WEEKDAY_TEMPLATE,{short_weekdayname:f[r%7],weekdayname:m[r%7]});l.weekday_row_template=C(d.WEEKDAY_ROW_TEMPLATE,l);for(f=0;5>=f;f++)for(m=0;12>=m;m++){k=7*f-5+m;r=b+"_"+m+"_"+k;n=w;1>k?n=N:k>p&&(n=t);if(1>k||k>p)k="&nbsp;";q=m>=H&&m<H+7?"":F;h[f]+=C(d.CALDAY_TEMPLATE,{day_content:k,calendar_col_class:"calendar_col"+m,calendar_col_visibility_class:q,
calendar_day_class:n,calendar_day_id:r})}l.body_template="";I(h,function(a){l.body_template+=C(d.CALDAY_ROW_TEMPLATE,{calday_row:a})});l.calendar_pane_id=b;l.calendar_pane_tabindex=this.get("tabIndex");l.pane_arialabel=y.format(a,{format:"%B %Y"});h=C(C(d.CALENDAR_GRID_TEMPLATE,l),d.CALENDAR_STRINGS);this._paneProperties[b]={cutoffCol:H,daysInMonth:p,paneDate:a};return h},_rerenderCalendarPane:function(a,b){var d=this.get("strings.first_weekday")||0,d=this._getCutoffColumn(a,d),e=y.daysInMonth(a),
f=b.get("id"),m,k;b.setStyle("visibility","hidden");b.setAttribute("aria-label",y.format(a,{format:"%B %Y"}));for(m=0;12>=m;m++)if(k=b.all(".calendar_col"+m),k.removeClass(F),m<d||m>=d+7)k.addClass(F);else switch(m){case 0:k=b.one("#"+f+"_0_30");30<=e?(k.set("text","30"),k.removeClass(t).addClass(w)):(k.setContent("&nbsp;"),k.removeClass(w).addClass(t));break;case 1:k=b.one("#"+f+"_1_31");31<=e?(k.set("text","31"),k.removeClass(t).addClass(w)):(k.setContent("&nbsp;"),k.removeClass(w).addClass(t));
break;case 6:k=b.one("#"+f+"_6_29");29<=e?(k.set("text","29"),k.removeClass(t).addClass(w)):(k.setContent("&nbsp;"),k.removeClass(w).addClass(t));break;case 7:k=b.one("#"+f+"_7_30");30<=e?(k.set("text","30"),k.removeClass(t).addClass(w)):(k.setContent("&nbsp;"),k.removeClass(w).addClass(t));break;case 8:k=b.one("#"+f+"_8_31"),31<=e?(k.set("text","31"),k.removeClass(t).addClass(w)):(k.setContent("&nbsp;"),k.removeClass(w).addClass(t))}this._paneProperties[f].cutoffCol=d;this._paneProperties[f].daysInMonth=
e;this._paneProperties[f].paneDate=a;b.setStyle("visibility","inherit")},_updateCalendarHeader:function(a){var b="",d=this.get("headerRenderer");e.Lang.isString(d)?b=y.format(a,{format:d}):d instanceof Function&&(b=d.call(this,a));return b},_initCalendarHeader:function(a){return C(C(d.HEADER_TEMPLATE,{calheader:this._updateCalendarHeader(a),calendar_id:this._calendarId}),d.CALENDAR_STRINGS)},_initCalendarHTML:function(a){var b={},f=0,m,k;b.header_template=this._initCalendarHeader(a);b.calendar_id=
this._calendarId;b.body_template=C(C(d.CONTENT_TEMPLATE,b),d.CALENDAR_STRINGS);k=b.body_template.replace(/\{calendar_grid_template\}/g,e.bind(function(){m=this._initCalendarPane(y.addMonths(a,f),b.calendar_id+"_pane_"+f);f++;return m},this));this._paneNumber=f;return k}},{CALENDAR_STRINGS:{calendar_grid_class:a,calendar_body_class:v,calendar_hd_class:n,calendar_hd_label_class:u,calendar_weekdayrow_class:l,calendar_weekday_class:r,calendar_row_class:H,calendar_day_class:w,calendar_dayanchor_class:A,
calendar_pane_class:Q,calendar_right_grid_class:x,calendar_left_grid_class:f,calendar_status_class:b},CONTENT_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1">{calendar_grid_template}</div></div>',ONE_PANE_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1">{calendar_grid_template}</div></div>',TWO_PANE_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1-2"><div class = "{calendar_left_grid_class}">{calendar_grid_template}</div></div><div class="yui3-u-1-2"><div class = "{calendar_right_grid_class}">{calendar_grid_template}</div></div></div>',
THREE_PANE_TEMPLATE:'<div class="yui3-g {calendar_pane_class}" id="{calendar_id}">{header_template}<div class="yui3-u-1-3"><div class="{calendar_left_grid_class}">{calendar_grid_template}</div></div><div class="yui3-u-1-3">{calendar_grid_template}</div><div class="yui3-u-1-3"><div class="{calendar_right_grid_class}">{calendar_grid_template}</div></div></div>',CALENDAR_GRID_TEMPLATE:'<table class="{calendar_grid_class}" id="{calendar_pane_id}" role="grid" aria-readonly="true" aria-label="{pane_arialabel}" tabindex="{calendar_pane_tabindex}"><thead>{weekday_row_template}</thead><tbody>{body_template}</tbody></table>',
HEADER_TEMPLATE:'<div class="yui3-g {calendar_hd_class}"><div class="yui3-u {calendar_hd_label_class}" id="{calendar_id}_header" aria-role="heading">{calheader}</div></div>',WEEKDAY_ROW_TEMPLATE:'<tr class="{calendar_weekdayrow_class}" role="row">{weekday_row}</tr>',CALDAY_ROW_TEMPLATE:'<tr class="{calendar_row_class}" role="row">{calday_row}</tr>',WEEKDAY_TEMPLATE:'<th class="{calendar_weekday_class}" role="columnheader" aria-label="{weekdayname}">{short_weekdayname}</th>',CALDAY_TEMPLATE:'<td class="{calendar_col_class} {calendar_day_class} {calendar_col_visibility_class}" id="{calendar_day_id}" role="gridcell" tabindex="-1">{day_content}</td>',
NAME:"calendarBase",ATTRS:{tabIndex:{value:1},date:{value:new Date,setter:function(a){a=this._normalizeDate(a);return y.areEqual(a,this.get("date"))?this.get("date"):a}},showPrevMonth:{value:!1},showNextMonth:{value:!1},strings:{valueFn:function(){return e.Intl.get("calendar-base")}},headerRenderer:{value:"%B %Y"},enabledDatesRule:{value:null},disabledDatesRule:{value:null},selectedDates:{readOnly:!0,getter:function(){return this._getSelectedDatesList()}},customRenderer:{lazyAdd:!1,value:{},setter:function(a){this._rules=
a.rules;this._filterFunction=a.filterFunction}}}})},"3.17.2",{requires:["widget","datatype-date","datatype-date-math","cssgrids"],lang:"de en es es-AR fr hu it ja nb-NO nl pt-BR ru zh-Hans zh-Hans-CN zh-Hant zh-Hant-HK zh-HANT-TW".split(" "),skinnable:!0})},1262:function(v,A){YUI.add("calendar",function(e,q){function d(){d.superclass.constructor.apply(this,arguments)}var b=e.ClassNameManager.getClassName,a=b("calendar","day-selected"),f=b("calendar","day-highlighted"),x=b("calendar","day"),v=b("calendar",
"prevmonth-day"),n=b("calendar","nextmonth-day"),u=b("calendar","grid"),l=e.DataType.Date,r=b("calendar","pane"),F=e.UA.os;e.Calendar=e.extend(d,e.CalendarBase,{_keyEvents:[],_highlightedDateNode:null,_lastSelectedDate:null,initializer:function(){this.plug(e.Plugin.CalendarNavigator);this._keyEvents=[];this._lastSelectedDate=this._highlightedDateNode=null},_bindCalendarEvents:function(){var a=this.get("contentBox").one("."+r);a.on("selectstart",this._preventSelectionStart);a.delegate("click",this._clickCalendar,
"."+x+", ."+v+", ."+n,this);a.delegate("keydown",this._keydownCalendar,"."+u,this);a.delegate("focus",this._focusCalendarGrid,"."+u,this);a.delegate("focus",this._focusCalendarCell,"."+x,this);a.delegate("blur",this._blurCalendarGrid,"."+u+",."+x,this);this.after(["minimumDateChange","maximumDateChange"],this._afterCustomRendererChange)},_preventSelectionStart:function(a){a.preventDefault()},_highlightDateNode:function(a){this._unhighlightCurrentDateNode();a=this._dateToNode(a);a.focus();a.addClass(f)},
_unhighlightCurrentDateNode:function(){var a=this.get("contentBox").all("."+f);a&&a.removeClass(f)},_getGridNumber:function(a){a=a.get("id").split("_").reverse();return parseInt(a[0],10)},_blurCalendarGrid:function(){this._unhighlightCurrentDateNode()},_focusCalendarCell:function(a){this._highlightedDateNode=a.target;a.stopPropagation()},_focusCalendarGrid:function(){this._unhighlightCurrentDateNode();this._highlightedDateNode=null},_keydownCalendar:function(b){var d=this._getGridNumber(b.target),
e=!this._highlightedDateNode?null:this._nodeToDate(this._highlightedDateNode),f=b.keyCode,r=0,n;switch(f){case 40:r=7;break;case 38:r=-7;break;case 37:r=-1;break;case 39:r=1;break;case 32:case 13:if(b.preventDefault(),this._highlightedDateNode)if(n=this.get("selectionMode"),"single"===n&&!this._highlightedDateNode.hasClass(a))this._clearSelection(!0),this._addDateToSelection(e);else if("multiple"===n||"multiple-sticky"===n)this._highlightedDateNode.hasClass(a)?this._removeDateFromSelection(e):this._addDateToSelection(e)}if(40===
f||38===f||37===f||39===f)e||(e=l.addMonths(this.get("date"),d),r=0),b.preventDefault(),b=l.addDays(e,r),d=this.get("date"),e=l.addMonths(this.get("date"),this._paneNumber-1),f=new Date(e),e.setDate(l.daysInMonth(e)),l.isInRange(b,d,e)?this._highlightDateNode(b):l.isGreater(d,b)?l.isGreaterOrEqual(this.get("minimumDate"),d)||(this.set("date",l.addMonths(d,-1)),this._highlightDateNode(b)):l.isGreater(b,e)&&!l.isGreaterOrEqual(f,this.get("maximumDate"))&&(this.set("date",l.addMonths(d,1)),this._highlightDateNode(b))},
_clickCalendar:function(b){var d=b.currentTarget,e=d.hasClass(x)&&!d.hasClass(v)&&!d.hasClass(n),f=d.hasClass(a);switch(this.get("selectionMode")){case "single":e&&!f&&(this._clearSelection(!0),this._addDateToSelection(this._nodeToDate(d)));break;case "multiple-sticky":e&&(f?this._removeDateFromSelection(this._nodeToDate(d)):this._addDateToSelection(this._nodeToDate(d)));break;case "multiple":e&&(!b.metaKey&&!b.ctrlKey&&!b.shiftKey?(this._clearSelection(!0),this._lastSelectedDate=this._nodeToDate(d),
this._addDateToSelection(this._lastSelectedDate)):("macintosh"===F&&b.metaKey||"macintosh"!==F&&b.ctrlKey)&&!b.shiftKey?f?(this._removeDateFromSelection(this._nodeToDate(d)),this._lastSelectedDate=null):(this._lastSelectedDate=this._nodeToDate(d),this._addDateToSelection(this._lastSelectedDate)):("macintosh"===F&&b.metaKey||"macintosh"!==F&&b.ctrlKey)&&b.shiftKey?this._lastSelectedDate?(b=this._nodeToDate(d),this._addDateRangeToSelection(b,this._lastSelectedDate),this._lastSelectedDate=b):(this._lastSelectedDate=
this._nodeToDate(d),this._addDateToSelection(this._lastSelectedDate)):b.shiftKey&&(this._lastSelectedDate?(b=this._nodeToDate(d),this._clearSelection(!0),this._addDateRangeToSelection(b,this._lastSelectedDate),this._lastSelectedDate=b):(this._clearSelection(!0),this._lastSelectedDate=this._nodeToDate(d),this._addDateToSelection(this._lastSelectedDate))))}e?this.fire("dateClick",{cell:d,date:this._nodeToDate(d)}):d.hasClass(v)?this.fire("prevMonthClick"):d.hasClass(n)&&this.fire("nextMonthClick")},
_canBeSelected:function(a){var b=this.get("minimumDate"),e=this.get("maximumDate");return b&&!l.isGreaterOrEqual(a,b)||e&&l.isGreater(a,e)?!1:d.superclass._canBeSelected.call(this,a)},_renderCustomRules:function(){d.superclass._renderCustomRules.call(this);var a=this.get("minimumDate"),b=this.get("maximumDate"),e=[],f,r;if(a||b){for(r=0;r<this._paneNumber;r++)f=l.addMonths(this.get("date"),r),e=e.concat(l.listOfDatesInMonth(f));if(a){f=0;for(r=e.length;f<r&&!l.isGreaterOrEqual(e[f],a);f++)this._disableDate(e[f])}if(b)for(f=
e.length-1;0<=f;f--)if(l.isGreater(e[f],b))this._disableDate(e[f]);else break}},subtractMonth:function(a){this.set("date",l.addMonths(this.get("date"),-1));a&&a.halt();return this},subtractYear:function(a){this.set("date",l.addYears(this.get("date"),-1));a&&a.halt();return this},addMonth:function(a){this.set("date",l.addMonths(this.get("date"),1));a&&a.halt();return this},addYear:function(a){this.set("date",l.addYears(this.get("date"),1));a&&a.halt();return this}},{NAME:"calendar",ATTRS:{selectionMode:{value:"single"},
date:{value:new Date,lazyAdd:!1,setter:function(a){a=this._normalizeDate(a);var b=l.addMonths(a,this._paneNumber-1),d=this.get("minimumDate"),e=this.get("maximumDate");if((!d||l.isGreaterOrEqual(a,d))&&(!e||l.isGreaterOrEqual(e,b)))return a;if(d&&l.isGreater(d,a))return this._normalizeDate(d);if(e&&l.isGreater(b,e))return l.addMonths(this._normalizeDate(e),1-this._paneNumber)}},minimumDate:{value:null,setter:function(a){if(e.Lang.isDate(a)){var b=this.get("date"),d=this._normalizeTime(a);b&&!l.isGreaterOrEqual(b,
d)&&this.set("date",a);return d}return null}},maximumDate:{value:null,setter:function(a){if(e.Lang.isDate(a)){var b=this.get("date");b&&!l.isGreaterOrEqual(a,l.addMonths(b,this._paneNumber-1))&&this.set("date",l.addMonths(this._normalizeDate(a),1-this._paneNumber));return this._normalizeTime(a)}return null}}}})},"3.17.2",{requires:["calendar-base","calendarnavigator"],skinnable:!0})},1263:function(v,A){YUI.add("calendarnavigator",function(e,q){function d(){d.superclass.constructor.apply(this,arguments)}
var b=e.ClassNameManager.getClassName,a=e.Lang.sub,f=e.Node.create,x=b("calendar","header"),v=b("calendarnav","prevmonth"),n=b("calendarnav","nextmonth"),u=b("calendarnav","month-disabled"),l=e.DataType.Date;d.NS="navigator";d.NAME="pluginCalendarNavigator";d.ATTRS={shiftByMonths:{value:1}};d.CALENDARNAV_STRINGS={prev_month_class:v,next_month_class:n};d.PREV_MONTH_CONTROL_TEMPLATE='<a class="yui3-u {prev_month_class}" role="button" aria-label="{prev_month_arialabel}" tabindex="{control_tabindex}" />';
d.NEXT_MONTH_CONTROL_TEMPLATE='<a class="yui3-u {next_month_class}" role="button" aria-label="{next_month_arialabel}" tabindex="{control_tabindex}" />';e.extend(d,e.Plugin.Base,{_eventAttachments:{},_controls:{},initializer:function(){this._controls={};this._eventAttachments={};this.afterHostMethod("renderUI",this._initNavigationControls)},destructor:function(){},_focusNavigation:function(a){a.currentTarget.focus()},_subtractMonths:function(a){if("click"===a.type||"keydown"===a.type&&(13===a.keyCode||
32===a.keyCode)){var b=this.get("host"),d=b.get("date");b.set("date",l.addMonths(d,-1*this.get("shiftByMonths")));a.preventDefault()}},_addMonths:function(a){if("click"===a.type||"keydown"===a.type&&(13===a.keyCode||32===a.keyCode)){var b=this.get("host"),d=b.get("date");b.set("date",l.addMonths(d,this.get("shiftByMonths")));a.preventDefault()}},_updateControlState:function(){var a=this.get("host"),b=a.get("date"),d=l.addMonths(b,a._paneNumber-1),e=a._normalizeDate(a.get("minimumDate")),a=a._normalizeDate(a.get("maximumDate"));
l.areEqual(e,b)?(this._eventAttachments.prevMonth&&(this._eventAttachments.prevMonth.detach(),this._eventAttachments.prevMonth=!1),this._controls.prevMonth.hasClass(u)||this._controls.prevMonth.addClass(u).setAttribute("aria-disabled","true")):(this._eventAttachments.prevMonth||(this._eventAttachments.prevMonth=this._controls.prevMonth.on(["click","keydown"],this._subtractMonths,this)),this._controls.prevMonth.hasClass(u)&&this._controls.prevMonth.removeClass(u).setAttribute("aria-disabled","false"));
l.areEqual(a,d)?(this._eventAttachments.nextMonth&&(this._eventAttachments.nextMonth.detach(),this._eventAttachments.nextMonth=!1),this._controls.nextMonth.hasClass(u)||this._controls.nextMonth.addClass(u).setAttribute("aria-disabled","true")):(this._eventAttachments.nextMonth||(this._eventAttachments.nextMonth=this._controls.nextMonth.on(["click","keydown"],this._addMonths,this)),this._controls.nextMonth.hasClass(u)&&this._controls.nextMonth.removeClass(u).setAttribute("aria-disabled","false"));
this._controls.prevMonth.on(["click","keydown"],this._focusNavigation,this);this._controls.nextMonth.on(["click","keydown"],this._focusNavigation,this)},_renderPrevControls:function(){var b=f(a(d.PREV_MONTH_CONTROL_TEMPLATE,d.CALENDARNAV_STRINGS));b.on("selectstart",this.get("host")._preventSelectionStart);return b},_renderNextControls:function(){var b=f(a(d.NEXT_MONTH_CONTROL_TEMPLATE,d.CALENDARNAV_STRINGS));b.on("selectstart",this.get("host")._preventSelectionStart);return b},_initNavigationControls:function(){var a=
this.get("host"),b=a.get("contentBox").one("."+x);d.CALENDARNAV_STRINGS.control_tabindex=a.get("tabIndex");d.CALENDARNAV_STRINGS.prev_month_arialabel="Go to previous month";d.CALENDARNAV_STRINGS.next_month_arialabel="Go to next month";this._controls.prevMonth=this._renderPrevControls();this._controls.nextMonth=this._renderNextControls();this._updateControlState();a.after(["dateChange","minimumDateChange","maximumDateChange"],this._updateControlState,this);b.prepend(this._controls.prevMonth);b.append(this._controls.nextMonth)}});
e.namespace("Plugin").CalendarNavigator=d},"3.17.2",{requires:["plugin","classnamemanager","datatype-date","node"],skinnable:!0})},1556:function(v,A){YUI.add("squarespace-calendar-block-renderer",function(e){e.namespace("Squarespace");e.Squarespace.CalendarBlockRenderer={};e.Squarespace.CalendarBlockRenderer.renderCalendar=function(d,b,a){if(!e.Lang.isString(b))if(e.Object.hasKey(b,"collectionId"))if(null!==b.collectionId)b=b.collectionId;else{d.empty().setHTML('<div class="sqs-state-message">Please choose a collection for this calendar to display.</div>');
return}else b=e.instanceOf(b,e.Squarespace.Models.ContentCollection)?b.get("id"):CONFIG_PANEL.getPreviewFrameCollection().get("id");b={date:new Date,collectionId:b};e.Lang.isValue(a)&&e.merge(b,{pageCollectionId:a});a=new e.Squarespace.SquarespaceCalendar(b);a.plug(e.Squarespace.SquarespaceCalendarRenderer);a.render(d);return a};var q;e.config.win.Squarespace.onInitialize(e,function(){q=[];var d=e.all(".sqs-block.calendar-block[data-block-json]");d.size()&&d.each(function(b){var a=b.one(".sqs-block-content");
b=e.JSON.parse(b.getAttribute("data-block-json"));q.push(e.Squarespace.CalendarBlockRenderer.renderCalendar(a,b))},this)});e.config.win.Squarespace.onDestroy(e,function(){q.forEach(function(d){d.destroy()});q=null})},"1.0",{requires:["squarespace-calendar-core-renderer"]})}});

}