Google
Edit File: calendar-block-renderer-1f243fc025a8bcdaeaaf-min.en-US.js
webpackJsonp([35],{112:function(e,t){e.exports={TEXT:1,IMAGE:2,QUOTE:4,LINK:5,CHAT:6,AUDIO:7,VIDEO:8,VIDEO_DEPRECATED:9,REVIEW:10,STORE_ITEM:11,EVENT:12,THREAD:13,GALLERY:14,BINARY:15,CSSASSET:16,TWEAKASSET:17,DIGITALGOOD:18,ATTACHMENT:19,EXPORT_WORDPRESS:20,EXPORT_INTERNAL:21,TWEET:50,RSS:51,CHECKIN:52,DELICIOUS:53,KBARTICLE:54}},144:function(e,t,a){"use strict";var n={mm:"mm",h:"h",A:"A",D:"D",ddd:"ddd",M:"M",MMM:"MMM",YYYY:"YYYY","h:mm a":"h:mm a",LT:"LT",L:"L",ll:"ll",LL:"LL",lll:"lll","DD-MMM HH:mm:ss Z":"DD-MMM HH:mm:ss Z","MMMM D, YYYY [at] h:mm a":"MMMM D, YYYY [at] h:mm a",date:"date","MMMM-YYYY":"MMMM-YYYY","YYYY-MM-DD":"YYYY-MM-DD","h:mma":"h:mma",ha:"ha","MMM D":"MMM D",DDMMYYYY:"DDMMYYYY","MMM DD [at] h:mm A":"MMM DD [at] h:mm A","MMMM D, YYYY, h:mma":"MMMM D, YYYY, h:mma","MMMM YYYY":"MMMM YYYY","ddd, MMM DD [at] h:mm A":"ddd, MMM DD [at] h:mm A","ddd, MMM DD YYYY [at] hh:mmA":"ddd, MMM DD YYYY [at] hh:mmA","MMM DD, YYYY":"MMM DD, YYYY","L hh:mma":"L hh:mma","hh:mmA":"hh:mmA","L LTS":"L LTS",LTS:"LTS","dddd, MMMM DD, YYYY":"dddd, MMMM DD, YYYY","YYYYMMDDTHHMMSS[Z]":"YYYYMMDDTHHMMSS[Z]","MM/YY":"MM/YY","MMMM D, YYYY":"MMMM D, YYYY","MMMM D, YYYY hh:mmA Z":"MMMM D, YYYY hh:mmA Z","HH:mm":"HH:mm"},r={mm:n.mm,minute:n.mm,minutes:n.mm,h:n.h,hour:n.h,hours:n.h,A:n.A,D:n.D,day:n.D,M:n.M,month:n.M,months:n.M,MMM:n.MMM,shortMonth:n.MMM,YYYY:n.YYYY,year:n.YYYY,years:n.YYYY,LT:n.LT,time:n["h:mm a"],L:n.L,abbreviatedDate:n.L,ll:n.ll,shortDate:n.ll,LL:n.LL,longDate:n.LL,lll:n.lll,shortDateTime:n.lll,"MMMM D, YYYY [at] h:mm a":n["MMMM D, YYYY [at] h:mm a"],longDateTime:n["MMMM D, YYYY [at] h:mm a"],date:n.date};e.exports={formatAliases:r,ALIAS_KEYS:n}},193:function(e,t,a){"use strict";var n=a(58).formatDateTime,r=a(457);e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"longDate";if(e)if((e instanceof Date||"number"!=typeof e)&&"string"!=typeof e){if(isNaN(e.getTime()))return"Invalid Date"}else e=new Date(e);else e=new Date;return e=r(e),n(e,t)}},237:function(e,t,a){var n=a(114);e.exports=function(e){return"function"==typeof e?e:n}},238:function(e,t,a){"use strict";var n=a(48),r=a(180).checkCookie,s=a(144).formatAliases,i=function(){return r("i18nShowLocalizedComponents")};e.exports={formatDateTime:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.shortDate,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return n.formatDateTime(e,t,a,i())},formatRelativeDateTime:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n.formatRelativeTime(e,t,a,i())},formatAliases:s}},2430:function(e,t){YUI.add("datatype-date-format",function(e,t){var a=function(e,t,a){for(void 0===a&&(a=10),t+="";parseInt(e,10)<a&&a>1;a/=10)e=t+e;return e.toString()},n={formats:{a:function(e,t){return t.a[e.getDay()]},A:function(e,t){return t.A[e.getDay()]},b:function(e,t){return t.b[e.getMonth()]},B:function(e,t){return t.B[e.getMonth()]},C:function(e){return a(parseInt(e.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(e){return a(parseInt(n.formats.G(e)%100,10),0)},G:function(e){var t=e.getFullYear(),a=parseInt(n.formats.V(e),10),r=parseInt(n.formats.W(e),10);return r>a?t++:0===r&&a>=52&&t--,t},H:["getHours","0"],I:function(e){var t=e.getHours()%12;return a(0===t?12:t,0)},j:function(e){var t=new Date(e.getFullYear()+"/1/1 GMT"),n=new Date(e.getFullYear()+"/"+(e.getMonth()+1)+"/"+e.getDate()+" GMT")-t,r=parseInt(n/6e4/60/24,10)+1;return a(r,0,100)},k:["getHours"," "],l:function(e){var t=e.getHours()%12;return a(0===t?12:t," ")},m:function(e){return a(e.getMonth()+1,0)},M:["getMinutes","0"],p:function(e,t){return t.p[e.getHours()>=12?1:0]},P:function(e,t){return t.P[e.getHours()>=12?1:0]},s:function(e,t){return parseInt(e.getTime()/1e3,10)},S:["getSeconds","0"],u:function(e){var t=e.getDay();return 0===t?7:t},U:function(e){var t=parseInt(n.formats.j(e),10),r=6-e.getDay(),s=parseInt((t+r)/7,10);return a(s,0)},V:function(e){var t=parseInt(n.formats.W(e),10),r=new Date(e.getFullYear()+"/1/1").getDay(),s=t+(r>4||r<=1?0:1);return 53===s&&new Date(e.getFullYear()+"/12/31").getDay()<4?s=1:0===s&&(s=n.formats.V(new Date(e.getFullYear()-1+"/12/31"))),a(s,0)},w:"getDay",W:function(e){var t=parseInt(n.formats.j(e),10),r=7-n.formats.u(e),s=parseInt((t+r)/7,10);return a(s,0,10)},y:function(e){return a(e.getFullYear()%100,0)},Y:"getFullYear",z:function(e){var t=e.getTimezoneOffset(),n=a(parseInt(Math.abs(t/60),10),0),r=a(Math.abs(t%60),0);return(t>0?"-":"+")+n+r},Z:function(e){var t=e.toString().replace(/^.*:\d\d( GMT[+-]\d+)? \(?([A-Za-z ]+)\)?\d*$/,"$2").replace(/[a-z ]/g,"");return t.length>4&&(t=n.formats.z(e)),t},"%":function(e){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(t,r){if(r=r||{},!e.Lang.isDate(t))return e.Lang.isValue(t)?t:"";var s,i;s=r.format||"%Y-%m-%d",i=e.Intl.get("datatype-date-format");for(var o=function(e,t){var a=n.aggregates[t];return"locale"===a?i[t]:a},l=function(r,s){var o=n.formats[s];switch(e.Lang.type(o)){case"string":return t[o]();case"function":return o.call(t,t,i);case"array":if("string"===e.Lang.type(o[0]))return a(t[o[0]](),o[1]);default:return s}};s.match(/%[cDFhnrRtTxX]/);)s=s.replace(/%([cDFhnrRtTxX])/g,o);var d=s.replace(/%([aAbBCdegGHIjklmMpPsSuUVwWyYzZ%])/g,l);return o=l=void 0,d}};e.mix(e.namespace("Date"),n),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"]})},2436:function(e,t){YUI.add("datatype-date-math",function(e,t){var a=e.Lang;e.mix(e.namespace("Date"),{isValidDate:function(e){return!(!a.isDate(e)||!isFinite(e)||"Invalid Date"==e||isNaN(e)||null==e)},areEqual:function(e,t){return this.isValidDate(e)&&this.isValidDate(t)&&e.getTime()==t.getTime()},isGreater:function(e,t){return this.isValidDate(e)&&this.isValidDate(t)&&e.getTime()>t.getTime()},isGreaterOrEqual:function(e,t){return this.isValidDate(e)&&this.isValidDate(t)&&e.getTime()>=t.getTime()},isInRange:function(e,t,a){return this.isGreaterOrEqual(e,t)&&this.isGreaterOrEqual(a,e)},addDays:function(e,t){return new Date(e.getTime()+864e5*t)},addMonths:function(e,t){var a=e.getFullYear(),n=e.getMonth()+t;a=Math.floor(a+n/12),n=(n%12+12)%12;var r=new Date(e.getTime());return r.setFullYear(a),r.setMonth(n),r},addYears:function(e,t){var a=e.getFullYear()+t,n=new Date(e.getTime());return n.setFullYear(a),n},listOfDatesInMonth:function(e){if(!this.isValidDate(e))return[];for(var t=this.daysInMonth(e),a=e.getFullYear(),n=e.getMonth(),r=[],s=1;s<=t;s++)r.push(new Date(a,n,s,12,0,0));return r},daysInMonth:function(e){if(!this.isValidDate(e))return 0;var t=e.getMonth();if(1!=t)return[31,28,31,30,31,30,31,31,30,31,30,31][t];var a=e.getFullYear();return a%400==0?29:a%100==0?28:a%4==0?29:28}}),e.namespace("DataType"),e.DataType.Date=e.Date},"3.17.2",{requires:["yui-base"]})},2439:function(e,t){YUI.add("lang/datatype-date-format_en",function(e){e.Intl.add("datatype-date-format","en",{a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a, %b %d, %Y %l:%M:%S %p %Z",p:["AM","PM"],P:["am","pm"],x:"%m/%d/%y",X:"%l:%M:%S %p"})},"3.17.2")},3141:function(e,t,a){var n=a(58).formatDateTime,r=a(193),s=a(457),i=a(112),o=a(50);YUI.add("squarespace-calendar-core-renderer",function(e){var t=function(e){return e.recordType===i.EVENT?e.structuredContent.startDate:e.addedOn};e.Squarespace.SquarespaceCalendar=e.Base.create("SquarespaceCalendar",e.Calendar,[],{initializer:function(){this._fetchEvents()},bindUI:function(){e.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 t=this.get("date"),a=o(t).locale("en").format("MMMM-YYYY");e.Data.get({url:this._getFetchUrl(a),success:this._parseResponse,failure:this._handleResponseError},this)},_parseResponse:function(e){this.set("events",e)},_handleResponseError:function(e){this.fire("fetchEventsFailure")},_getFetchUrl:function(e){return"/api/open/GetItemsByMonth"+this._buildQueryString(e)},_buildQueryString:function(e){var t=this.get("collectionId"),a=this.get("pageCollectionId"),n=this.get("category"),r=this.get("tag"),s=this.get("author"),i="?month="+e;return t&&(i+="&collectionId="+t),a&&(i+="&pageCollectionId="+a),i+(n?"&category="+n:"")+(r?"&tag="+r:"")+(s?"&author="+s:"")}},{ATTRS:{events:{value:[],validator:e.Lang.isArray},collectionId:{value:null,validator:e.Lang.isString},pageCollectionId:{value:null,validator:e.Lang.isString},category:{value:"",validator:e.Lang.isString},tag:{value:"",validator:e.Lang.isString},author:{value:"",validator:e.Lang.isString}}}),e.Squarespace.CalendarBaseRenderer=e.Base.create("CalendarBaseRenderer",e.Plugin.Base,[],{initializer:function(e){this.host=e.host,this.afterHostEvent("eventsChange",this._onEventsChange,this)},_onEventsChange:function(t){var a=null;e.Lang.isArray(t.newVal)&&t.newVal.length>0&&(a=e.bind(this._calendarFilterFunction,this)),this.host.set("customRenderer",{rules:{all:"events"},filterFunction:a})},_calendarFilterFunction:function(e,t,a){var n=this.host.get("events"),r=this._getEventsOfDay(n,e);this._sortEvents(r),this._renderDay(e,t,r)},_renderDay:function(e,t,a){a.length>0&&t.setStyle("background","gray")},_sortEvents:function(e){e.sort(function(e,a){var n=t(e);return t(a)-n})},_getEventsOfDay:function(t,a){var r=n(a,"YYYY-MM-DD");return e.Lang.isArray(t)&&t.length>0?e.Array.filter(t,function(e){return this._isEventPartOfDay(e,r)},this):[]},_isEventPartOfDay:function(e,t){var a,n,s=e.structuredContent;return e.recordType!==i.EVENT?(a=r(e.addedOn,"YYYY-MM-DD"))===t:(a=r(s.startDate,"YYYY-MM-DD"),n=r(s.endDate,"YYYY-MM-DD"),t===a||t===n||new Date(t)>new Date(a)&&new Date(t)<new Date(n))},_getEventDisplayTime:function(e){var a=t(e);return r(a,"h:mma").trim()},_isSameDay:function(e,t){return e.recordType!==i.EVENT||r(e.structuredContent.startDate,"YYYY-MM-DD")===n(t,"YYYY-MM-DD")}},{NS:"calendarPlugin"});var a=e.namespace("Squarespace").SquarespaceCalendarRenderer=e.Base.create("squarespaceCalendarRenderer",e.Squarespace.CalendarBaseRenderer,[],{initializer:function(t){this.host.set("headerRenderer",e.bind(this._renderHeader,this)),this._loadingSpinner=new e.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),this.host.destroy()},this),this._bindUI()},destructor:function(){this._loadingSpinner&&this._loadingSpinner.destroy(!0),this._resizeEvent.detach()},_bindUI:function(){this._resizeEvent=e.on("resize",this._syncUI,e.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(t){var a=e.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(e,t,n){a.superclass._calendarFilterFunction.apply(this,arguments),n.indexOf("sunday")>=0?t.addClass("sunday"):n.indexOf("monday")>=0?t.addClass("monday"):n.indexOf("friday")>=0?t.addClass("friday"):n.indexOf("saturday")>=0&&t.addClass("saturday")},_fitToContainer:function(){var e=this.host.get("contentBox");e.toggleClass(a.SMALL_LAYOUT_CLASS,e.get("offsetWidth")<=770),e.toggleClass(a.COMPACT_LAYOUT_CLASS,e.get("offsetWidth")<=600),e.toggleClass(a.TINY_LAYOUT_CLASS,e.get("offsetWidth")<=300)},_setupHeader:function(){this.host.get("contentBox").one(".yui3-calendar-header-label").wrap("<h1></h1>")},_setupCells:function(){var e=this.host.get("contentBox").one("table");e.setStyle("width",null),this.cellSpacing=parseInt(e.getComputedStyle("borderSpacing"),10);var t=7*parseInt((e.get("offsetWidth")-8*this.cellSpacing)/7,10)+8*this.cellSpacing;e.setStyle("width",t),e.all("td").setStyles({width:parseInt(t/7,10)-this.cellSpacing,height:parseInt(t/7,10)-this.cellSpacing})},_loadImages:function(){this.host.get("contentBox").all("img[data-src]").each(function(e){ImageLoader.load(e,{mode:"fill",load:!0})},this)},_setFlyoutHeights:function(){this.host.get("contentBox").all(".flyoutitemlist--hasmorecontent").each(function(e){var t,a=e.ancestor("tr"),n=this._getRowHeight(a);t=e.ancestor("tr:nth-child(4)")||e.ancestor("tr:nth-child(5)")||e.ancestor("tr:nth-child(6)")?this._getRowHeight(a.previous("tr")):this._getRowHeight(a.next("tr")),e.setStyle("height",n+t+this.cellSpacing)},this),this.host.get("contentBox").all("tr").removeAttribute("data-row-height")},_getRowHeight:function(e){if(e.getAttribute("data-row-height"))return parseInt(e.getAttribute("data-row-height"),10);var t=e.get("offsetHeight");return e.setAttribute("data-row-height",t),t},_renderCalendar:function(){this._setupHeader(),this._syncUI(),this._loadingSpinner&&this._loadingSpinner.destroy(!0),this.host.get("boundingBox").addClass("loaded"),this.set("isRendered",!0)},_renderHeader:function(e){return n(e,"MMMM YYYY")},_renderDay:function(e,t,a){this.setAttrs({date:e,node:t,events:this._groupEvents(a,e)}),this._highlightToday(),this._highlightDaysWithEvents();var n=this._getTemplateInfo().template(this._getHBTemplateContext());t.empty().append(n)},_highlightToday:function(){var e=new Date,t=s(e);this.get("date").setHours(0,0,0,0)===t.setHours(0,0,0,0)&&this.get("node").addClass(a.TODAY_CLASS)},_highlightDaysWithEvents:function(){this.get("events").length>0&&this.get("node").addClass(a.HAS_EVENT_CLASS)},_getTemplateInfo:function(){return{template:e.Squarespace.UITemplates.getCompiledTemplate(a.HANDLEBARS_TEMPLATE)}},_getHBTemplateContext:function(){return{date:this.get("date"),events:this.get("events")}},_groupEvents:function(t,a){var n=[],r=[];return e.Array.each(t,function(e){this._isSameDay(e,a)?n.unshift(e):(e.isSubsequentDayOfMultidayEvent=!0,r.unshift(e)),this._isMultidayEvent(e)&&(e.isMultiday=!0)},this),r.concat(n)},_isMultidayEvent:function(e){if(e.recordType===i.EVENT){var t=e.structuredContent;return r(t.startDate,"DDMMYYYY")!==r(t.endDate,"DDMMYYYY")}}},{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"});e.Handlebars.registerHelper("day-of-month-format",function(e,t){return n(e,t.hash.format||"longDate")}),e.Handlebars.registerHelper("date-format",function(e,t){return r(e,t.hash.format||"longDate")}),e.Handlebars.registerHelper("calendar-compact-time-format",function(e){var t="PM"===r(e,"A")?"p":"a";return 0===new Date(e).getMinutes()?r(e,"h")+t:r(e,"h:mm")+t})},"1.0",{requires:["base","calendar","intl","lang/datatype-date-format_en","node","squarespace-attr-validators","squarespace-calendar-day-template","squarespace-spinner","squarespace-ui-base","squarespace-ui-templates","squarespace-widgets-alert"]})},3142:function(e,t){YUI.add("calendar",function(e,t){function a(){a.superclass.constructor.apply(this,arguments)}var n=e.ClassNameManager.getClassName,r=n("calendar","day-selected"),s=n("calendar","day-highlighted"),i=n("calendar","day"),o=n("calendar","prevmonth-day"),l=n("calendar","nextmonth-day"),d=n("calendar","grid"),u=e.DataType.Date,h=n("calendar","pane"),c=e.UA.os;e.Calendar=e.extend(a,e.CalendarBase,{_keyEvents:[],_highlightedDateNode:null,_lastSelectedDate:null,initializer:function(){this.plug(e.Plugin.CalendarNavigator),this._keyEvents=[],this._highlightedDateNode=null,this._lastSelectedDate=null},_bindCalendarEvents:function(){var e=this.get("contentBox").one("."+h);e.on("selectstart",this._preventSelectionStart),e.delegate("click",this._clickCalendar,"."+i+", ."+o+", ."+l,this),e.delegate("keydown",this._keydownCalendar,"."+d,this),e.delegate("focus",this._focusCalendarGrid,"."+d,this),e.delegate("focus",this._focusCalendarCell,"."+i,this),e.delegate("blur",this._blurCalendarGrid,"."+d+",."+i,this),this.after(["minimumDateChange","maximumDateChange"],this._afterCustomRendererChange)},_preventSelectionStart:function(e){e.preventDefault()},_highlightDateNode:function(e){this._unhighlightCurrentDateNode();var t=this._dateToNode(e);t.focus(),t.addClass(s)},_unhighlightCurrentDateNode:function(){var e=this.get("contentBox").all("."+s);e&&e.removeClass(s)},_getGridNumber:function(e){var t=e.get("id").split("_").reverse();return parseInt(t[0],10)},_blurCalendarGrid:function(){this._unhighlightCurrentDateNode()},_focusCalendarCell:function(e){this._highlightedDateNode=e.target,e.stopPropagation()},_focusCalendarGrid:function(){this._unhighlightCurrentDateNode(),this._highlightedDateNode=null},_keydownCalendar:function(e){var t,a,n,s,i,o=this._getGridNumber(e.target),l=this._highlightedDateNode?this._nodeToDate(this._highlightedDateNode):null,d=e.keyCode,h=0;switch(d){case 40:h=7,"s";break;case 38:h=-7,"n";break;case 37:h=-1,"w";break;case 39:h=1,"e";break;case 32:case 13:e.preventDefault(),this._highlightedDateNode&&("single"!==(t=this.get("selectionMode"))||this._highlightedDateNode.hasClass(r)?"multiple"!==t&&"multiple-sticky"!==t||(this._highlightedDateNode.hasClass(r)?this._removeDateFromSelection(l):this._addDateToSelection(l)):(this._clearSelection(!0),this._addDateToSelection(l)))}40!==d&&38!==d&&37!==d&&39!==d||(l||(l=u.addMonths(this.get("date"),o),h=0),e.preventDefault(),a=u.addDays(l,h),n=this.get("date"),s=u.addMonths(this.get("date"),this._paneNumber-1),i=new Date(s),s.setDate(u.daysInMonth(s)),u.isInRange(a,n,s)?this._highlightDateNode(a):u.isGreater(n,a)?u.isGreaterOrEqual(this.get("minimumDate"),n)||(this.set("date",u.addMonths(n,-1)),this._highlightDateNode(a)):u.isGreater(a,s)&&(u.isGreaterOrEqual(i,this.get("maximumDate"))||(this.set("date",u.addMonths(n,1)),this._highlightDateNode(a))))},_clickCalendar:function(e){var t,a=e.currentTarget,n=a.hasClass(i)&&!a.hasClass(o)&&!a.hasClass(l),s=a.hasClass(r);switch(this.get("selectionMode")){case"single":n&&(s||(this._clearSelection(!0),this._addDateToSelection(this._nodeToDate(a))));break;case"multiple-sticky":n&&(s?this._removeDateFromSelection(this._nodeToDate(a)):this._addDateToSelection(this._nodeToDate(a)));break;case"multiple":n&&(e.metaKey||e.ctrlKey||e.shiftKey?("macintosh"===c&&e.metaKey||"macintosh"!==c&&e.ctrlKey)&&!e.shiftKey?s?(this._removeDateFromSelection(this._nodeToDate(a)),this._lastSelectedDate=null):(this._lastSelectedDate=this._nodeToDate(a),this._addDateToSelection(this._lastSelectedDate)):("macintosh"===c&&e.metaKey||"macintosh"!==c&&e.ctrlKey)&&e.shiftKey?this._lastSelectedDate?(t=this._nodeToDate(a),this._addDateRangeToSelection(t,this._lastSelectedDate),this._lastSelectedDate=t):(this._lastSelectedDate=this._nodeToDate(a),this._addDateToSelection(this._lastSelectedDate)):e.shiftKey&&(this._lastSelectedDate?(t=this._nodeToDate(a),this._clearSelection(!0),this._addDateRangeToSelection(t,this._lastSelectedDate),this._lastSelectedDate=t):(this._clearSelection(!0),this._lastSelectedDate=this._nodeToDate(a),this._addDateToSelection(this._lastSelectedDate))):(this._clearSelection(!0),this._lastSelectedDate=this._nodeToDate(a),this._addDateToSelection(this._lastSelectedDate)))}n?this.fire("dateClick",{cell:a,date:this._nodeToDate(a)}):a.hasClass(o)?this.fire("prevMonthClick"):a.hasClass(l)&&this.fire("nextMonthClick")},_canBeSelected:function(e){var t=this.get("minimumDate"),n=this.get("maximumDate");return!(t&&!u.isGreaterOrEqual(e,t)||n&&u.isGreater(e,n))&&a.superclass._canBeSelected.call(this,e)},_renderCustomRules:function(){a.superclass._renderCustomRules.call(this);var e,t,n,r,s=this.get("minimumDate"),i=this.get("maximumDate"),o=[];if(s||i){for(r=0;r<this._paneNumber;r++)n=u.addMonths(this.get("date"),r),o=o.concat(u.listOfDatesInMonth(n));if(s)for(e=0,t=o.length;e<t&&!u.isGreaterOrEqual(o[e],s);e++)this._disableDate(o[e]);if(i)for(e=o.length-1;e>=0&&u.isGreater(o[e],i);e--)this._disableDate(o[e])}},subtractMonth:function(e){return this.set("date",u.addMonths(this.get("date"),-1)),e&&e.halt(),this},subtractYear:function(e){return this.set("date",u.addYears(this.get("date"),-1)),e&&e.halt(),this},addMonth:function(e){return this.set("date",u.addMonths(this.get("date"),1)),e&&e.halt(),this},addYear:function(e){return this.set("date",u.addYears(this.get("date"),1)),e&&e.halt(),this}},{NAME:"calendar",ATTRS:{selectionMode:{value:"single"},date:{value:new Date,lazyAdd:!1,setter:function(e){var t=this._normalizeDate(e),a=u.addMonths(t,this._paneNumber-1),n=this.get("minimumDate"),r=this.get("maximumDate");return n&&!u.isGreaterOrEqual(t,n)||r&&!u.isGreaterOrEqual(r,a)?n&&u.isGreater(n,t)?this._normalizeDate(n):r&&u.isGreater(a,r)?u.addMonths(this._normalizeDate(r),1-this._paneNumber):void 0:t}},minimumDate:{value:null,setter:function(t){if(e.Lang.isDate(t)){var a=this.get("date"),n=this._normalizeTime(t);return a&&!u.isGreaterOrEqual(a,n)&&this.set("date",t),n}return null}},maximumDate:{value:null,setter:function(t){if(e.Lang.isDate(t)){var a=this.get("date");return a&&!u.isGreaterOrEqual(t,u.addMonths(a,this._paneNumber-1))&&this.set("date",u.addMonths(this._normalizeDate(t),1-this._paneNumber)),this._normalizeTime(t)}return null}}}})},"3.17.2",{requires:["calendar-base","calendarnavigator"],skinnable:!0})},3143:function(e,t){YUI.add("calendar-base",function(e,t){function a(){a.superclass.constructor.apply(this,arguments)}var n=e.ClassNameManager.getClassName,r="calendar",s=n(r,"grid"),i=n(r,"left-grid"),o=n(r,"right-grid"),l=n(r,"body"),d=n(r,"header"),u=n(r,"header-label"),h=n(r,"weekdayrow"),c=n(r,"weekday"),f=n(r,"column-hidden"),m=n(r,"day-selected"),g=n(r,"selection-disabled"),_=n(r,"row"),p=n(r,"day"),v=n(r,"prevmonth-day"),D=n(r,"nextmonth-day"),M=n(r,"anchor"),y=n(r,"pane"),C=n(r,"status"),T=e.Lang,S=T.sub,b=e.Array.each,Y=e.Object.each,E=e.Array.indexOf,A=e.Object.hasKey,w=e.Object.setValue,I=e.Object.isEmpty,N=e.DataType.Date;e.CalendarBase=e.extend(a,e.Widget,{_paneProperties:{},_paneNumber:1,_calendarId:null,_selectedDates:{},_rules:{},_filterFunction:null,_storedDateCells:{},initializer:function(){this._paneProperties={},this._calendarId=e.guid("calendar"),this._selectedDates={},I(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 e=[];return Y(this._selectedDates,function(t){Y(t,function(t){Y(t,function(t){e.push(t)},this)},this)},this),e},_getSelectedDatesInMonth:function(t){var a=t.getFullYear(),n=t.getMonth();return A(this._selectedDates,a)&&A(this._selectedDates[a],n)?e.Object.values(this._selectedDates[a][n]):[]},_isNumInList:function(e,t){if("all"===t)return!0;for(var a,n=t.split(","),r=n.length;r--;){if(2===(a=n[r].split("-")).length&&e>=parseInt(a[0],10)&&e<=parseInt(a[1],10))return!0;if(1===a.length&&parseInt(n[r],10)===e)return!0}return!1},_getRulesForDate:function(e){var t,a,n,r,s=e.getFullYear(),i=e.getMonth(),o=e.getDate(),l=e.getDay(),d=this._rules,u=[];for(t in d)if(this._isNumInList(s,t))if(T.isString(d[t]))u.push(d[t]);else for(a in d[t])if(this._isNumInList(i,a))if(T.isString(d[t][a]))u.push(d[t][a]);else for(n in d[t][a])if(this._isNumInList(o,n))if(T.isString(d[t][a][n]))u.push(d[t][a][n]);else for(r in d[t][a][n])this._isNumInList(l,r)&&T.isString(d[t][a][n][r])&&u.push(d[t][a][n][r]);return u},_matchesRule:function(e,t){return E(this._getRulesForDate(e),t)>=0},_canBeSelected:function(e){var t=this.get("enabledDatesRule"),a=this.get("disabledDatesRule");return t?this._matchesRule(e,t):!a||!this._matchesRule(e,a)},selectDates:function(e){return N.isValidDate(e)?this._addDateToSelection(e):T.isArray(e)&&this._addDatesToSelection(e),this},deselectDates:function(e){return e?N.isValidDate(e)?this._removeDateFromSelection(e):T.isArray(e)&&this._removeDatesFromSelection(e):this._clearSelection(),this},_addDateToSelection:function(e,t){if(e=this._normalizeTime(e),this._canBeSelected(e)){var a=e.getFullYear(),n=e.getMonth(),r=e.getDate();A(this._selectedDates,a)?A(this._selectedDates[a],n)?this._selectedDates[a][n][r]=e:(this._selectedDates[a][n]={},this._selectedDates[a][n][r]=e):(this._selectedDates[a]={},this._selectedDates[a][n]={},this._selectedDates[a][n][r]=e),this._selectedDates=w(this._selectedDates,[a,n,r],e),t||this._fireSelectionChange()}},_addDatesToSelection:function(e){b(e,this._addDateToSelection,this),this._fireSelectionChange()},_addDateRangeToSelection:function(e,t){var a,n,r,s=6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()),i=e.getTime(),o=t.getTime();for(i>o?(a=i,i=o,o=a+s):o-=s,n=i;n<=o;n+=864e5)(r=new Date(n)).setHours(12),this._addDateToSelection(r,n);this._fireSelectionChange()},_removeDateFromSelection:function(e,t){var a=e.getFullYear(),n=e.getMonth(),r=e.getDate();A(this._selectedDates,a)&&A(this._selectedDates[a],n)&&A(this._selectedDates[a][n],r)&&(delete this._selectedDates[a][n][r],t||this._fireSelectionChange())},_removeDatesFromSelection:function(e){b(e,this._removeDateFromSelection,this),this._fireSelectionChange()},_removeDateRangeFromSelection:function(e,t){var a,n=e.getTime(),r=t.getTime();for(a=n;a<=r;a+=864e5)this._removeDateFromSelection(new Date(a),a);this._fireSelectionChange()},_clearSelection:function(e){this._selectedDates={},this.get("contentBox").all("."+m).removeClass(m).setAttribute("aria-selected",!1),e||this._fireSelectionChange()},_fireSelectionChange:function(){this.fire("selectionChange",{newSelection:this._getSelectedDatesList()})},_restoreModifiedCells:function(){var e,t=this.get("contentBox");for(e in this._storedDateCells)t.one("#"+e).replace(this._storedDateCells[e]),delete this._storedDateCells[e]},_renderCustomRules:function(){if(this.get("contentBox").all("."+p+",."+D).removeClass(g).setAttribute("aria-disabled",!1),!I(this._rules)){var t,a,n;for(t=0;t<this._paneNumber;t++)a=N.addMonths(this.get("date"),t),n=N.listOfDatesInMonth(a),b(n,e.bind(this._renderCustomRulesHelper,this))}},_renderCustomRulesHelper:function(e){var t,a,n=this.get("enabledDatesRule"),r=this.get("disabledDatesRule");(t=this._getRulesForDate(e)).length>0?((n&&E(t,n)<0||!n&&r&&E(t,r)>=0)&&this._disableDate(e),T.isFunction(this._filterFunction)&&(a=this._dateToNode(e),this._storedDateCells[a.get("id")]=a.cloneNode(!0),this._filterFunction(e,a,t))):n&&this._disableDate(e)},_renderSelectedDates:function(){this.get("contentBox").all("."+m).removeClass(m).setAttribute("aria-selected",!1);var t,a,n;for(t=0;t<this._paneNumber;t++)a=N.addMonths(this.get("date"),t),n=this._getSelectedDatesInMonth(a),b(n,e.bind(this._renderSelectedDatesHelper,this))},_renderSelectedDatesHelper:function(e){this._dateToNode(e).addClass(m).setAttribute("aria-selected",!0)},_disableDate:function(e){this._dateToNode(e).addClass(g).setAttribute("aria-disabled",!0)},_dateToNode:function(e){var t=e.getDate(),a=0,n=t%7,r=(12+e.getMonth()-this.get("date").getMonth())%12,s=this._calendarId+"_pane_"+r,i=this._paneProperties[s].cutoffCol;switch(n){case 0:a=i>=6?12:5;break;case 1:a=6;break;case 2:a=i>0?7:0;break;case 3:a=i>1?8:1;break;case 4:a=i>2?9:2;break;case 5:a=i>3?10:3;break;case 6:a=i>4?11:4}return this.get("contentBox").one("#"+this._calendarId+"_pane_"+r+"_"+a+"_"+t)},_nodeToDate:function(e){var t=e.get("id").split("_").reverse(),a=parseInt(t[2],10),n=parseInt(t[0],10),r=N.addMonths(this.get("date"),a),s=r.getFullYear(),i=r.getMonth();return new Date(s,i,n,12,0,0,0)},_bindCalendarEvents:function(){},_normalizeDate:function(e){return e?new Date(e.getFullYear(),e.getMonth(),1,12,0,0,0):null},_normalizeTime:function(e){return e?new Date(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0,0):null},_getCutoffColumn:function(e,t){return 6-(this._normalizeDate(e).getDay()-t+7)%7},_turnPrevMonthOn:function(e){var t,a=e.get("id"),n=this._paneProperties[a].paneDate,r=N.daysInMonth(N.addMonths(n,-1));if(this._paneProperties[a].hasOwnProperty("daysInPrevMonth")||(this._paneProperties[a].daysInPrevMonth=0),r!==this._paneProperties[a].daysInPrevMonth)for(this._paneProperties[a].daysInPrevMonth=r,t=5;t>=0;t--)e.one("#"+a+"_"+t+"_"+(t-5)).set("text",r--)},_turnPrevMonthOff:function(e){var t,a=e.get("id");for(this._paneProperties[a].daysInPrevMonth=0,t=5;t>=0;t--)e.one("#"+a+"_"+t+"_"+(t-5)).setContent(" ")},_cleanUpNextMonthCells:function(e){var t=e.get("id");e.one("#"+t+"_6_29").removeClass(D),e.one("#"+t+"_7_30").removeClass(D),e.one("#"+t+"_8_31").removeClass(D),e.one("#"+t+"_0_30").removeClass(D),e.one("#"+t+"_1_31").removeClass(D)},_turnNextMonthOn:function(e){var t,a,n=1,r=e.get("id"),s=this._paneProperties[r].daysInMonth,i=this._paneProperties[r].cutoffCol;for(t=s-22;t<i+7;t++)e.one("#"+r+"_"+t+"_"+(t+23)).set("text",n++).addClass(D);for(a=i,31===s&&i<=1?a=2:30===s&&0===i&&(a=1),t=a;t<i+7;t++)e.one("#"+r+"_"+t+"_"+(t+30)).set("text",n++).addClass(D)},_turnNextMonthOff:function(e){var t,a,n=e.get("id"),r=this._paneProperties[n].daysInMonth,s=this._paneProperties[n].cutoffCol;for(t=r-22;t<=12;t++)e.one("#"+n+"_"+t+"_"+(t+23)).setContent(" ").addClass(D);for(a=0,31===r&&s<=1?a=2:30===r&&0===s&&(a=1),t=a;t<=12;t++)e.one("#"+n+"_"+t+"_"+(t+30)).setContent(" ").addClass(D)},_afterShowNextMonthChange:function(){var e=this.get("contentBox").one("#"+this._calendarId+"_pane_"+(this._paneNumber-1));this._cleanUpNextMonthCells(e),this.get("showNextMonth")?this._turnNextMonthOn(e):this._turnNextMonthOff(e)},_afterShowPrevMonthChange:function(){var e=this.get("contentBox").one("#"+this._calendarId+"_pane_0");this.get("showPrevMonth")?this._turnPrevMonthOn(e):this._turnPrevMonthOff(e)},_afterHeaderRendererChange:function(){this.get("contentBox").one("."+u).setContent(this._updateCalendarHeader(this.get("date")))},_afterCustomRendererChange:function(){this._restoreModifiedCells(),this._renderCustomRules()},_afterDateChange:function(){var e=this.get("contentBox"),t=e.one("."+d).one("."+u),a=e.all("."+s),n=this.get("date"),r=0;e.setStyle("visibility","hidden"),t.setContent(this._updateCalendarHeader(n)),this._restoreModifiedCells(),a.each(function(e){this._rerenderCalendarPane(N.addMonths(n,r++),e)},this),this._afterShowPrevMonthChange(),this._afterShowNextMonthChange(),this._renderCustomRules(),this._renderSelectedDates(),e.setStyle("visibility","inherit")},_initCalendarPane:function(t,n){var r,s,i,o,l,d,u,h,c=this.get("strings.very_short_weekdays")||["Su","Mo","Tu","We","Th","Fr","Sa"],m=e.Intl.get("datatype-date-format").A,g=this.get("strings.first_weekday")||0,_=this._getCutoffColumn(t,g),M=N.daysInMonth(t),y=["","","","","",""],C={};for(C.weekday_row="",r=g;r<=g+6;r++)C.weekday_row+=S(a.WEEKDAY_TEMPLATE,{short_weekdayname:c[r%7],weekdayname:m[r%7]});for(C.weekday_row_template=S(a.WEEKDAY_ROW_TEMPLATE,C),s=0;s<=5;s++)for(i=0;i<=12;i++)l=n+"_"+i+"_"+(o=7*s-5+i),d=p,o<1?d=v:o>M&&(d=D),(o<1||o>M)&&(o=" "),u=i>=_&&i<_+7?"":f,y[s]+=S(a.CALDAY_TEMPLATE,{day_content:o,calendar_col_class:"calendar_col"+i,calendar_col_visibility_class:u,calendar_day_class:d,calendar_day_id:l});return C.body_template="",b(y,function(e){C.body_template+=S(a.CALDAY_ROW_TEMPLATE,{calday_row:e})}),C.calendar_pane_id=n,C.calendar_pane_tabindex=this.get("tabIndex"),C.pane_arialabel=N.format(t,{format:"%B %Y"}),h=S(S(a.CALENDAR_GRID_TEMPLATE,C),a.CALENDAR_STRINGS),this._paneProperties[n]={cutoffCol:_,daysInMonth:M,paneDate:t},h},_rerenderCalendarPane:function(e,t){var a,n,r,s=this.get("strings.first_weekday")||0,i=this._getCutoffColumn(e,s),o=N.daysInMonth(e),l=t.get("id");for(t.setStyle("visibility","hidden"),t.setAttribute("aria-label",N.format(e,{format:"%B %Y"})),a=0;a<=12;a++)if((n=t.all(".calendar_col"+a)).removeClass(f),a<i||a>=i+7)n.addClass(f);else switch(a){case 0:r=t.one("#"+l+"_0_30"),o>=30?(r.set("text","30"),r.removeClass(D).addClass(p)):(r.setContent(" "),r.removeClass(p).addClass(D));break;case 1:r=t.one("#"+l+"_1_31"),o>=31?(r.set("text","31"),r.removeClass(D).addClass(p)):(r.setContent(" "),r.removeClass(p).addClass(D));break;case 6:r=t.one("#"+l+"_6_29"),o>=29?(r.set("text","29"),r.removeClass(D).addClass(p)):(r.setContent(" "),r.removeClass(p).addClass(D));break;case 7:r=t.one("#"+l+"_7_30"),o>=30?(r.set("text","30"),r.removeClass(D).addClass(p)):(r.setContent(" "),r.removeClass(p).addClass(D));break;case 8:r=t.one("#"+l+"_8_31"),o>=31?(r.set("text","31"),r.removeClass(D).addClass(p)):(r.setContent(" "),r.removeClass(p).addClass(D))}this._paneProperties[l].cutoffCol=i,this._paneProperties[l].daysInMonth=o,this._paneProperties[l].paneDate=e,t.setStyle("visibility","inherit")},_updateCalendarHeader:function(t){var a="",n=this.get("headerRenderer");return e.Lang.isString(n)?a=N.format(t,{format:n}):e.Lang.isFunction(n)&&(a=n.call(this,t)),a},_initCalendarHeader:function(e){return S(S(a.HEADER_TEMPLATE,{calheader:this._updateCalendarHeader(e),calendar_id:this._calendarId}),a.CALENDAR_STRINGS)},_initCalendarHTML:function(t){var n,r,s={},i=0;return s.header_template=this._initCalendarHeader(t),s.calendar_id=this._calendarId,s.body_template=S(S(a.CONTENT_TEMPLATE,s),a.CALENDAR_STRINGS),r=s.body_template.replace(/\{calendar_grid_template\}/g,e.bind(function(){return n=this._initCalendarPane(N.addMonths(t,i),s.calendar_id+"_pane_"+i),i++,n},this)),this._paneNumber=i,r}},{CALENDAR_STRINGS:{calendar_grid_class:s,calendar_body_class:l,calendar_hd_class:d,calendar_hd_label_class:u,calendar_weekdayrow_class:h,calendar_weekday_class:c,calendar_row_class:_,calendar_day_class:p,calendar_dayanchor_class:M,calendar_pane_class:y,calendar_right_grid_class:o,calendar_left_grid_class:i,calendar_status_class:C},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(e){var t=this._normalizeDate(e);return N.areEqual(t,this.get("date"))?this.get("date"):t}},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(e){this._rules=e.rules,this._filterFunction=e.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"],skinnable:!0})},3144:function(e,t){YUI.add("datatype-date-parse",function(e,t){e.mix(e.namespace("Date"),{parse:function(t){var a=new Date(+t||t);return e.Lang.isDate(a)?a:null}}),e.namespace("Parsers").date=e.Date.parse,e.namespace("DataType"),e.DataType.Date=e.Date},"3.17.2")},3145:function(e,t){YUI.add("calendarnavigator",function(e,t){function a(){a.superclass.constructor.apply(this,arguments)}var n=e.ClassNameManager.getClassName,r=e.Lang.sub,s=e.Node.create,i=n("calendar","header"),o=n("calendarnav","prevmonth"),l=n("calendarnav","nextmonth"),d=n("calendarnav","month-disabled"),u=e.DataType.Date;a.NS="navigator",a.NAME="pluginCalendarNavigator",a.ATTRS={shiftByMonths:{value:1}},a.CALENDARNAV_STRINGS={prev_month_class:o,next_month_class:l},a.PREV_MONTH_CONTROL_TEMPLATE='<a class="yui3-u {prev_month_class}" role="button" aria-label="{prev_month_arialabel}" tabindex="{control_tabindex}" />',a.NEXT_MONTH_CONTROL_TEMPLATE='<a class="yui3-u {next_month_class}" role="button" aria-label="{next_month_arialabel}" tabindex="{control_tabindex}" />',e.extend(a,e.Plugin.Base,{_eventAttachments:{},_controls:{},initializer:function(){this._controls={},this._eventAttachments={},this.afterHostMethod("renderUI",this._initNavigationControls)},destructor:function(){},_focusNavigation:function(e){e.currentTarget.focus()},_subtractMonths:function(e){if("click"===e.type||"keydown"===e.type&&(13===e.keyCode||32===e.keyCode)){var t=this.get("host"),a=t.get("date");t.set("date",u.addMonths(a,-1*this.get("shiftByMonths"))),e.preventDefault()}},_addMonths:function(e){if("click"===e.type||"keydown"===e.type&&(13===e.keyCode||32===e.keyCode)){var t=this.get("host"),a=t.get("date");t.set("date",u.addMonths(a,this.get("shiftByMonths"))),e.preventDefault()}},_updateControlState:function(){var e=this.get("host"),t=e.get("date"),a=u.addMonths(t,e._paneNumber-1),n=e._normalizeDate(e.get("minimumDate")),r=e._normalizeDate(e.get("maximumDate"));u.areEqual(n,t)?(this._eventAttachments.prevMonth&&(this._eventAttachments.prevMonth.detach(),this._eventAttachments.prevMonth=!1),this._controls.prevMonth.hasClass(d)||this._controls.prevMonth.addClass(d).setAttribute("aria-disabled","true")):(this._eventAttachments.prevMonth||(this._eventAttachments.prevMonth=this._controls.prevMonth.on(["click","keydown"],this._subtractMonths,this)),this._controls.prevMonth.hasClass(d)&&this._controls.prevMonth.removeClass(d).setAttribute("aria-disabled","false")),u.areEqual(r,a)?(this._eventAttachments.nextMonth&&(this._eventAttachments.nextMonth.detach(),this._eventAttachments.nextMonth=!1),this._controls.nextMonth.hasClass(d)||this._controls.nextMonth.addClass(d).setAttribute("aria-disabled","true")):(this._eventAttachments.nextMonth||(this._eventAttachments.nextMonth=this._controls.nextMonth.on(["click","keydown"],this._addMonths,this)),this._controls.nextMonth.hasClass(d)&&this._controls.nextMonth.removeClass(d).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 e=s(r(a.PREV_MONTH_CONTROL_TEMPLATE,a.CALENDARNAV_STRINGS));return e.on("selectstart",this.get("host")._preventSelectionStart),e},_renderNextControls:function(){var e=s(r(a.NEXT_MONTH_CONTROL_TEMPLATE,a.CALENDARNAV_STRINGS));return e.on("selectstart",this.get("host")._preventSelectionStart),e},_initNavigationControls:function(){var e=this.get("host"),t=e.get("contentBox").one("."+i);a.CALENDARNAV_STRINGS.control_tabindex=e.get("tabIndex"),a.CALENDARNAV_STRINGS.prev_month_arialabel="Go to previous month",a.CALENDARNAV_STRINGS.next_month_arialabel="Go to next month",this._controls.prevMonth=this._renderPrevControls(),this._controls.nextMonth=this._renderNextControls(),this._updateControlState(),e.after(["dateChange","minimumDateChange","maximumDateChange"],this._updateControlState,this),t.prepend(this._controls.prevMonth),t.append(this._controls.nextMonth)}}),e.namespace("Plugin").CalendarNavigator=a},"3.17.2",{requires:["plugin","classnamemanager","datatype-date","node"],skinnable:!0})},3146:function(e,t){YUI.add("squarespace-calendar-day-template",function(e){var t=e.Handlebars;!function(){var e=t.template;(t.templates=t.templates||{})["calendar-day.html"]=e(function(e,t,a,n,r){function s(e,t){return""}function i(e,t){var n,r,s="";return s+='\n\t<div class="background',((r=a.if.call(e,null==(n=null==(n=null==(n=e.events)||!1===n?n:n[0])||!1===n?n:n.structuredContent)||!1===n?n:n.startDate,{hash:{},inverse:H.noop,fn:H.program(5,o,t),data:t}))||0===r)&&(s+=r),s+='">\n\t\t<a href="'+F(typeof(n=null==(n=null==(n=e.events)||!1===n?n:n[0])||!1===n?n:n.fullUrl)===P?n.apply(e):n)+'" class="background-image-link"><img data-src="'+F(typeof(n=null==(n=null==(n=e.events)||!1===n?n:n[0])||!1===n?n:n.assetUrl)===P?n.apply(e):n)+'" data-image-dimensions="'+F(typeof(n=null==(n=null==(n=e.events)||!1===n?n:n[0])||!1===n?n:n.originalSize)===P?n.apply(e):n)+'" data-load="false" class="background-image"></a>\n\t</div>\n\t'}function o(e,t){return" background--iseventscollection"}function l(e,t){return" itemlist--iseventscollection"}function d(e,t){var n,r,s,i="";return i+='\n\t<li class="item',((n=a.if.call(e,e.isMultiday,{hash:{},inverse:H.noop,fn:H.program(11,u,t),data:t}))||0===n)&&(i+=n),((n=a.if.call(e,e.isSubsequentDayOfMultidayEvent,{hash:{},inverse:H.noop,fn:H.program(13,h,t),data:t}))||0===n)&&(i+=n),i+='">\n\t\t<a href="',n=(n=a.fullUrl)?n.call(e,{hash:{},data:t}):typeof(n=e.fullUrl)===P?n.apply(e):n,i+=F(n)+'" class="item-link">\n\t\t\t<span class="item-time item-time--12hr">',s={hash:{},data:t},i+=F((n=a["calendar-compact-time-format"]||e["calendar-compact-time-format"])?n.call(e,null==(n=e.structuredContent)||!1===n?n:n.startDate,s):U.call(e,"calendar-compact-time-format",null==(n=e.structuredContent)||!1===n?n:n.startDate,s))+' </span>\n\t\t\t<span class="item-time item-time--24hr">',s={hash:{format:"H:mm"},data:t},i+=F((n=a["date-format"]||e["date-format"])?n.call(e,null==(n=e.structuredContent)||!1===n?n:n.startDate,s):U.call(e,"date-format",null==(n=e.structuredContent)||!1===n?n:n.startDate,s))+' </span>\n\t\t\t<span class="item-title">',r=(r=a.title)?r.call(e,{hash:{},data:t}):typeof(r=e.title)===P?r.apply(e):r,i+=F(r)+"</span>\n\t\t\t",((r=a.if.call(e,e.isMultiday,{hash:{},inverse:H.noop,fn:H.program(15,c,t),data:t}))||0===r)&&(i+=r),i+="\n\t\t</a>\n\t</li>\n\t"}function u(e,t){return" item--multiday"}function h(e,t){return" item--ongoing"}function c(e,t){var n,r,s="";return s+='<span class="item-enddate"> ',r={hash:{format:"MMM D"},data:t},s+=F((n=a["date-format"]||e["date-format"])?n.call(e,null==(n=e.structuredContent)||!1===n?n:n.endDate,r):U.call(e,"date-format",null==(n=e.structuredContent)||!1===n?n:n.endDate,r))+"</span>"}function f(e,t){return" flyoutitemlist--iseventscollection"}function m(e,t){return"\n\t\tflyoutitemlist--hasmorecontent\n\t"}function g(e,t){var n,r,s="";return s+="\n\t\t",r={hash:{},inverse:H.noop,fn:H.program(22,_,t),data:t},n=(n=a.events)?n.call(e,r):typeof(n=e.events)===P?n.apply(e):n,a.events||(n=B.call(e,n,r)),(n||0===n)&&(s+=n),s+="\n\t"}function _(e,t){var n,r="";return r+="\n\t\t\t",((n=a.if.call(e,e.excerpt,{hash:{},inverse:H.program(25,v,t),fn:H.program(23,p,t),data:t}))||0===n)&&(r+=n),r+="\n\t\t"}function p(e,t){return"\n\t\t\t\tflyoutitemlist--hasmorecontent\n\t\t\t"}function v(e,t){var n,r,s="";return s+="\n\t\t\t\t",((r=a.if.call(e,null==(n=e.location)||!1===n?n:n.addressLine1,{hash:{},inverse:H.noop,fn:H.program(26,D,t),data:t}))||0===r)&&(s+=r),s+="\n\t\t\t"}function D(e,t){return"\n\t\t\t\t\tflyoutitemlist--hasmorecontent\n\t\t\t\t"}function M(e,t){var n,r,s="";return s+='\n\t<li class="flyoutitem',((n=a.if.call(e,e.isMultiday,{hash:{},inverse:H.noop,fn:H.program(29,y,t),data:t}))||0===n)&&(s+=n),((n=a.if.call(e,e.isSubsequentDayOfMultidayEvent,{hash:{},inverse:H.noop,fn:H.program(31,C,t),data:t}))||0===n)&&(s+=n),s+='">\n\t\t<h1 class="flyoutitem-title"><a href="',n=(n=a.fullUrl)?n.call(e,{hash:{},data:t}):typeof(n=e.fullUrl)===P?n.apply(e):n,s+=F(n)+'" class="flyoutitem-link">',n=(n=a.title)?n.call(e,{hash:{},data:t}):typeof(n=e.title)===P?n.apply(e):n,s+=F(n),((n=a.if.call(e,e.isMultiday,{hash:{},inverse:H.noop,fn:H.program(33,T,t),data:t}))||0===n)&&(s+=n),s+=' <span class="flyoutitem-link-arrow"></span></a></h1>\n\t\t<div class="flyoutitem-datetime flyoutitem-datetime--12hr">\n\t\t\t',((n=a.if.call(e,e.isMultiday,{hash:{},inverse:H.program(37,b,t),fn:H.program(35,S,t),data:t}))||0===n)&&(s+=n),s+='\n\t\t</div>\n\t\t<div class="flyoutitem-datetime flyoutitem-datetime--24hr">\n\t\t\t',((n=a.if.call(e,e.isMultiday,{hash:{},inverse:H.program(41,E,t),fn:H.program(39,Y,t),data:t}))||0===n)&&(s+=n),s+='\n\t\t</div>\n\t\t<div class="flyoutitem-location">\n\t\t\t',((r=a.if.call(e,null==(n=e.location)||!1===n?n:n.addressTitle,{hash:{},inverse:H.noop,fn:H.program(43,A,t),data:t}))||0===r)&&(s+=r),s+="\n\t\t\t",((r=a.if.call(e,null==(n=e.location)||!1===n?n:n.addressLine1,{hash:{},inverse:H.noop,fn:H.program(45,w,t),data:t}))||0===r)&&(s+=r),s+="\n\t\t\t",((r=a.if.call(e,null==(n=e.location)||!1===n?n:n.addressLine2,{hash:{},inverse:H.noop,fn:H.program(47,I,t),data:t}))||0===r)&&(s+=r),s+="\n\t\t\t",((r=a.if.call(e,null==(n=e.location)||!1===n?n:n.addressCountry,{hash:{},inverse:H.noop,fn:H.program(49,N,t),data:t}))||0===r)&&(s+=r),s+="\n\t\t</div>\n\t\t",((r=a.if.call(e,e.excerpt,{hash:{},inverse:H.noop,fn:H.program(51,R,t),data:t}))||0===r)&&(s+=r),s+="\n\t</li>\n\t"}function y(e,t){return" flyoutitem--multiday"}function C(e,t){return" flyoutitem--ongoing"}function T(e,t){var n,r,s="";return s+=' <span class="flyoutitem-enddate">',r={hash:{format:"MMM D"},data:t},s+=F((n=a["date-format"]||e["date-format"])?n.call(e,null==(n=e.structuredContent)||!1===n?n:n.endDate,r):U.call(e,"date-format",null==(n=e.structuredContent)||!1===n?n:n.endDate,r))+"</span>"}function S(e,t){var n,r,s="";return s+="\n\t\t\t\t",r={hash:{format:"ddd, MMM D, h:mma"},data:t},s+=F((n=a["date-format"]||e["date-format"])?n.call(e,null==(n=e.structuredContent)||!1===n?n:n.startDate,r):U.call(e,"date-format",null==(n=e.structuredContent)||!1===n?n:n.startDate,r))+" – ",r={hash:{format:"ddd, MMM D, h:mma"},data:t},s+=F((n=a["date-format"]||e["date-format"])?n.call(e,null==(n=e.structuredContent)||!1===n?n:n.endDate,r):U.call(e,"date-format",null==(n=e.structuredContent)||!1===n?n:n.endDate,r))+"\n\t\t\t"}function b(e,t){var n,r,s="";return s+="\n\t\t\t\t",r={hash:{format:"h:mma"},data:t},s+=F((n=a["date-format"]||e["date-format"])?n.call(e,null==(n=e.structuredContent)||!1===n?n:n.startDate,r):U.call(e,"date-format",null==(n=e.structuredContent)||!1===n?n:n.startDate,r))+" – ",r={hash:{format:"h:mma"},data:t},s+=F((n=a["date-format"]||e["date-format"])?n.call(e,null==(n=e.structuredContent)||!1===n?n:n.endDate,r):U.call(e,"date-format",null==(n=e.structuredContent)||!1===n?n:n.endDate,r))+"\n\t\t\t"}function Y(e,t){var n,r,s="";return s+="\n\t\t\t\t",r={hash:{format:"ddd, MMM D, H:mm"},data:t},s+=F((n=a["date-format"]||e["date-format"])?n.call(e,null==(n=e.structuredContent)||!1===n?n:n.startDate,r):U.call(e,"date-format",null==(n=e.structuredContent)||!1===n?n:n.startDate,r))+" – ",r={hash:{format:"ddd, MMM D, H:mm"},data:t},s+=F((n=a["date-format"]||e["date-format"])?n.call(e,null==(n=e.structuredContent)||!1===n?n:n.endDate,r):U.call(e,"date-format",null==(n=e.structuredContent)||!1===n?n:n.endDate,r))+"\n\t\t\t"}function E(e,t){var n,r,s="";return s+="\n\t\t\t\t",r={hash:{format:"H:mm"},data:t},s+=F((n=a["date-format"]||e["date-format"])?n.call(e,null==(n=e.structuredContent)||!1===n?n:n.startDate,r):U.call(e,"date-format",null==(n=e.structuredContent)||!1===n?n:n.startDate,r))+" – ",r={hash:{format:"H:mm"},data:t},s+=F((n=a["date-format"]||e["date-format"])?n.call(e,null==(n=e.structuredContent)||!1===n?n:n.endDate,r):U.call(e,"date-format",null==(n=e.structuredContent)||!1===n?n:n.endDate,r))+"\n\t\t\t"}function A(e,t){var a,n="";return n+='<div class="flyoutitem-location-addresstitle">'+F(typeof(a=null==(a=e.location)||!1===a?a:a.addressTitle)===P?a.apply(e):a)+"</div>"}function w(e,t){var a,n="";return n+='<div class="flyoutitem-location-address1">'+F(typeof(a=null==(a=e.location)||!1===a?a:a.addressLine1)===P?a.apply(e):a)+"</div>"}function I(e,t){var a,n="";return n+='<div class="flyoutitem-location-address2">'+F(typeof(a=null==(a=e.location)||!1===a?a:a.addressLine2)===P?a.apply(e):a)+"</div>"}function N(e,t){var a,n="";return n+='<div class="flyoutitem-location-addresscountry">'+F(typeof(a=null==(a=e.location)||!1===a?a:a.addressCountry)===P?a.apply(e):a)+"</div>"}function R(e,t){var n,r="";return r+='<div class="flyoutitem-excerpt">',((n=(n=a.excerpt)?n.call(e,{hash:{},data:t}):typeof(n=e.excerpt)===P?n.apply(e):n)||0===n)&&(r+=n),r+="</div>"}this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),r=r||{};var x,L,O,k="",H=this,P="function",F=this.escapeExpression,U=a.helperMissing,B=a.blockHelperMissing;return((L=a.if.call(t,null==(x=null==(x=t.events)||!1===x?x:x[0])||!1===x?x:x.systemDataId,{hash:{},inverse:H.noop,fn:H.program(1,function(e,t){var n,r,o="";return o+="\n\t",((r=a.if.call(e,null==(n=null==(n=e.events)||!1===n?n:n[1])||!1===n?n:n.title,{hash:{},inverse:H.program(4,i,t),fn:H.program(2,s,t),data:t}))||0===r)&&(o+=r),o+="\n"},r),data:r}))||0===L)&&(k+=L),k+='\n\n<div class="marker">\n\t<div class="marker-dayname">',O={hash:{format:"ddd"},data:r},k+=F((x=a["day-of-month-format"]||t["day-of-month-format"])?x.call(t,t.date,O):U.call(t,"day-of-month-format",t.date,O))+'</div>\n\t<div class="marker-daynum">',O={hash:{format:"D"},data:r},k+=F((x=a["day-of-month-format"]||t["day-of-month-format"])?x.call(t,t.date,O):U.call(t,"day-of-month-format",t.date,O))+"</div>\n</div>\n\n",((L=a.if.call(t,t.events,{hash:{},inverse:H.noop,fn:H.program(7,function(e,t){var n,r,s,i="";return i+='\n<ul class="itemlist',((r=a.if.call(e,null==(n=null==(n=null==(n=e.events)||!1===n?n:n[0])||!1===n?n:n.structuredContent)||!1===n?n:n.startDate,{hash:{},inverse:H.noop,fn:H.program(8,l,t),data:t}))||0===r)&&(i+=r),i+='">\n\t',s={hash:{},inverse:H.noop,fn:H.program(10,d,t),data:t},r=(r=a.events)?r.call(e,s):typeof(r=e.events)===P?r.apply(e):r,a.events||(r=B.call(e,r,s)),(r||0===r)&&(i+=r),i+='\n</ul>\n\n<ul class="\n\tflyoutitemlist\n\t',((r=a.if.call(e,null==(n=null==(n=null==(n=e.events)||!1===n?n:n[0])||!1===n?n:n.structuredContent)||!1===n?n:n.startDate,{hash:{},inverse:H.noop,fn:H.program(17,f,t),data:t}))||0===r)&&(i+=r),i+="\n\t",((r=a.if.call(e,null==(n=null==(n=e.events)||!1===n?n:n[1])||!1===n?n:n.title,{hash:{},inverse:H.program(21,g,t),fn:H.program(19,m,t),data:t}))||0===r)&&(i+=r),i+='\n">\n\t',s={hash:{},inverse:H.noop,fn:H.program(28,M,t),data:t},r=(r=a.events)?r.call(e,s):typeof(r=e.events)===P?r.apply(e):r,a.events||(r=B.call(e,r,s)),(r||0===r)&&(i+=r),i+='\n</ul>\n\n<div class="itemcount">'+F(typeof(n=null==(n=e.events)||!1===n?n:n.length)===P?n.apply(e):n)+"</div>\n"},r),data:r}))||0===L)&&(k+=L),k+="\n"})}();e.Handlebars.registerPartial("calendar-day.html".replace("/","."),t.templates["calendar-day.html"])},"1.0",{requires:["handlebars-base"]})},3984:function(e,t){YUI.add("squarespace-calendar-block-renderer",function(e){e.namespace("Squarespace"),e.Squarespace.CalendarBlockRenderer={},e.Squarespace.CalendarBlockRenderer.renderCalendar=function(t,a,n){var r;e.Lang.isString(a)?r=a:e.Object.hasKey(a,"collectionId")?r=a.collectionId:e.instanceOf(a,e.Squarespace.Models.ContentCollection)&&(r=a.get("id"));var s={date:new Date,collectionId:r};e.Lang.isValue(n)&&e.merge(s,{pageCollectionId:n});var i=new e.Squarespace.SquarespaceCalendar(s);return i.plug(e.Squarespace.SquarespaceCalendarRenderer),i.render(t),i};var t;e.config.win.Squarespace.onInitialize(e,function(){t=[];var a=e.all(".sqs-block.calendar-block[data-block-json]");a.size()&&a.each(function(a){var n=a.one(".sqs-block-content"),r=e.JSON.parse(a.getAttribute("data-block-json"));t.push(e.Squarespace.CalendarBlockRenderer.renderCalendar(n,r))},this)}),e.config.win.Squarespace.onDestroy(e,function(){t.forEach(function(e){e.destroy()}),t=null})},"1.0",{requires:["squarespace-calendar-core-renderer"]})},457:function(e,t,a){"use strict";var n=a(70),r=a(606);e.exports=function(e){if(!e)return null;if(!n(window.Static,"SQUARESPACE_CONTEXT.tzData"))return new Date(e);var t=new Date(e),a=r(t);return t.setMinutes(t.getMinutes()+a),t}},512:function(e,t,a){"use strict";var n=a(607),r=a(70),s=a(143),i=a(513),o=a(628),l=function(e){var t={zones:[],rules:{}};return t.zones=e.zones.map(function(e){return i(["off","rules","format","until"],e)}),n(e.rules,function(e,a){var n=e.map(function(e){return i(["from","to","type","in","on","at","save","letter"],e)});t.rules[a]=n}),t},d=null,u=function(){var e=r(window.Static,"SQUARESPACE_CONTEXT.tzData");if(e){var t=l(e),a=t.zones,n=t.rules;a&&n&&(d=new o(a,n))}};u();var h=s(function(e){return d||u(),d?d.getInfo(e):(console.warn("No timezone data loaded"),o.getFallbackInfo(e))});e.exports=h},513:function(e,t,a){var n=a(270),r=a(627);e.exports=function(e,t){return r(e||[],t||[],n)}},572:function(e,t){e.exports=function(e,t,a){return e==e&&(void 0!==a&&(e=e<=a?e:a),void 0!==t&&(e=e>=t?e:t)),e}},58:function(e,t,a){"use strict";var n=a(238),r=n.formatDateTime,s=n.formatRelativeDateTime,i=a(144).formatAliases;e.exports={formatDateTime:r,formatRelativeDateTime:s,formatAliases:i}},606:function(e,t,a){"use strict";var n=a(143),r=a(512);e.exports=n(function(e){if(e instanceof Date)e=e.getTime();else if("number"!=typeof e)throw new Error("Invalid argument");var t=new Date(e).getTimezoneOffset();return r(e).utcOffset+t})},607:function(e,t,a){var n=a(413),r=a(237),s=a(243);e.exports=function(e,t){return null==e?e:n(e,r(t),s)}},627:function(e,t){e.exports=function(e,t,a){for(var n=-1,r=e.length,s=t.length,i={};++n<r;){var o=n<s?t[n]:void 0;a(i,e[n],o)}return i}},628:function(e,t,a){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var r=n(a(0)),s=n(a(1)),i=a(629),o={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},l={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6},d=function(e){var t=e.search(/[sguzw]/),a=e.split(":"),n=a[0]?parseInt(a[0],10):0,r=a[1]?parseInt(a[1],10):0;return{hour:n,min:r,totalMins:60*n+r,type:-1===t?"w":e.substr(-1,1)}},u=function(){function e(t,a){(0,r.default)(this,e),this.allZones=t,this.allRules=a}return(0,s.default)(e,[{key:"getInfo",value:function(e){e instanceof Date&&(e=e.getTime());var t=this.findActiveZone(e),a=this.findActiveRule(t,e),n=t.off,r=void 0;return{standardUTCOffset:n,utcOffset:n+(r=a?d(a.save).totalMins:0),abbreviation:this.findAbbr(t,a,r)}}},{key:"findActiveZone",value:function(e){var t=this.allZones.find(function(t){return!t.until||1e3*t.until>=e});if(null!==t)return t;throw new Error("All the zones loaded ended before this time. This should not happen - check that zones were loaded.")}},{key:"findActiveRule",value:function(e,t){var a=this;if(!e)return null;if(!e.rules)return null;var n=new Date(t),r=n.getUTCFullYear(),s=this.allRules[e.rules],o=this.findRulesForYear(r,s);if((o=this.filterRulesRough(e,o,n)).length>0){o.sort(this.getRuleComparator(r,e));var l=this.getRuleExactStartTime(e,r,o[o.length-1]);if(n.getTime()>l+864e5)return o[o.length-1]}var d=new Array(o.length);if(i(d,r),o.length<2){var u=this.findRulesForYear(r-1,s);u.sort(this.getRuleComparator(r-1,e));var h=new Array(u.length);i(h,r-1),o=u.concat(o),d=h.concat(d)}return 0===(o=o.filter(function(t,r,s){return 0===r||a.getRuleExactStartTime(e,d[r],t,s[r-1])<=n.getTime()})).length?null:o[o.length-1]}},{key:"findRulesForYear",value:function(e,t){return t.filter(function(t){if(t.from>e)return!1;if("number"==typeof t.to)return t.to>=e;if("string"==typeof t.to){if("max"===t.to)return!0;if("only"===t.to&&t.from===e)return!0}return!1})}},{key:"filterRulesRough",value:function(e,t,a){var n=this;return t.filter(function(t,r,s){return!(a.getUTCMonth()-o[t.in]<-1)&&n.getRuleExactStartTime(e,a.getUTCFullYear(),t)-864e5<=a.getTime()})}},{key:"compareRules",value:function(e,t,a,n){var r=o[e.in]-o[t.in];return 0!==r?r:this.getRuleExactStartTime(n,a,e,null)-this.getRuleExactStartTime(n,a,t)}},{key:"getRuleComparator",value:function(e,t){var a=this;return function(n,r){return a.compareRules(n,r,e,t)}}},{key:"getRuleExactStartTime",value:function(e,t,a,n){var r=d(a.at),s=this.getClockOffset(r.type,e,n);return"number"==typeof a.on?this.getDateRuleStartTime(t,a)-s:"last"===a.on.substr(0,4)?this.getLastDayRuleStartTime(t,a)-s:this.getBeforeAfterDateRuleStartTime(t,a)-s}},{key:"getDateRuleStartTime",value:function(e,t){var a=d(t.at);return new Date(Date.UTC(e,o[t.in],t.on,a.hour,a.min)).getTime()}},{key:"getLastDayRuleStartTime",value:function(e,t){var a=d(t.at),n=l[t.on.substr(4,3)],r=o[t.in],s=new Date(Date.UTC(e,r+1,1,a.hour-24,a.min)),i=s.getUTCDate();return s.getUTCDay()<n&&(i-=7),i-=s.getUTCDay()-n,(s=new Date(Date.UTC(e,r,i,a.hour,a.min))).getTime()}},{key:"getBeforeAfterDateRuleStartTime",value:function(e,t){var a=d(t.at),n=t.on.substr(3,2),r=l[t.on.substr(0,3)],s=parseInt(t.on.substr(5,2),10),i=o[t.in],u=new Date(Date.UTC(e,i,s,a.hour,a.min));if("<="===n)u.getUTCDay()<r&&(s-=7),s-=u.getUTCDay()-r,u=new Date(Date.UTC(e,i,s,a.hour,a.min));else{if(">="!==n)throw t.on+" did not match a valid on string";s+=r-u.getUTCDay(),u.getUTCDay()>r&&(s+=7),u=new Date(Date.UTC(e,i,s,a.hour,a.min))}return u.getTime()}},{key:"getClockOffset",value:function(e,t,a){var n=void 0;if("u"===e||"g"===e||"z"===e)n=0;else if("s"===e)n=t.off;else{if("w"!==e&&e)throw"Unknown clock type "+e;n=a?t.off+d(a.save).totalMins:t.off}return 60*n*1e3}},{key:"findAbbr",value:function(e,t,a){if(!e.format)return null;if(-1!==e.format.indexOf("/")){var n=e.format.split("/");return 0===a?n[0]:n[1]}return t&&t.letter?e.format.replace("%s",t.letter):e.format}}],[{key:"getFallbackInfo",value:function(e){var t=-new Date(e).getTimezoneOffset();return{standardUTCOffset:t,utcOffset:t,abbreviation:null}}}]),e}();e.exports=u},629:function(e,t,a){var n=a(630),r=a(236);e.exports=function(e,t,a,s){var i=null==e?0:e.length;return i?(a&&"number"!=typeof a&&r(e,t,a)&&(a=0,s=i),n(e,t,a,s)):[]}},630:function(e,t,a){var n=a(110),r=a(631);e.exports=function(e,t,a,s){var i=e.length;for((a=n(a))<0&&(a=-a>i?0:i+a),(s=void 0===s||s>i?i:n(s))<0&&(s+=i),s=a>s?0:r(s);a<s;)e[a++]=t;return e}},631:function(e,t,a){var n=a(572),r=a(110),s=4294967295;e.exports=function(e){return e?n(r(e),0,s):0}},775:function(e,t){YUI.add("handlebars-base",function(e,t){var a=e.namespace("Handlebars");a.VERSION="1.0.0",a.COMPILER_REVISION=4,a.REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"},a.helpers={},a.partials={};var n=Object.prototype.toString;a.registerHelper=function(e,t,r){if("[object Object]"===n.call(e)){if(r||t)throw new a.Exception("Arg not supported with multiple helpers");a.Utils.extend(this.helpers,e)}else r&&(t.not=r),this.helpers[e]=t},a.registerPartial=function(e,t){"[object Object]"===n.call(e)?a.Utils.extend(this.partials,e):this.partials[e]=t},a.registerHelper("helperMissing",function(e){if(2!==arguments.length)throw new Error("Missing helper: '"+e+"'")}),a.registerHelper("blockHelperMissing",function(e,t){var r=t.inverse||function(){},s=t.fn,i=n.call(e);return"[object Function]"===i&&(e=e.call(this)),!0===e?s(this):!1===e||null==e?r(this):"[object Array]"===i?e.length>0?a.helpers.each(e,t):r(this):s(e)}),a.K=function(){},a.createFrame=Object.create||function(e){a.K.prototype=e;var t=new a.K;return a.K.prototype=null,t},a.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,methodMap:{0:"debug",1:"info",2:"warn",3:"error"},log:function(e,t){if(a.logger.level<=e){var n=a.logger.methodMap[e];"undefined"!=typeof console&&console[n]&&console[n].call(console,t)}}},a.log=function(e,t){a.logger.log(e,t)},a.registerHelper("each",function(e,t){var r,s=t.fn,i=t.inverse,o=0,l="";if("[object Function]"===n.call(e)&&(e=e.call(this)),t.data&&(r=a.createFrame(t.data)),e&&"object"==typeof e)if(e instanceof Array)for(var d=e.length;o<d;o++)r&&(r.index=o),l+=s(e[o],{data:r});else for(var u in e)e.hasOwnProperty(u)&&(r&&(r.key=u),l+=s(e[u],{data:r}),o++);return 0===o&&(l=i(this)),l}),a.registerHelper("if",function(e,t){return"[object Function]"===n.call(e)&&(e=e.call(this)),!e||a.Utils.isEmpty(e)?t.inverse(this):t.fn(this)}),a.registerHelper("unless",function(e,t){return a.helpers.if.call(this,e,{fn:t.inverse,inverse:t.fn})}),a.registerHelper("with",function(e,t){if("[object Function]"===n.call(e)&&(e=e.call(this)),!a.Utils.isEmpty(e))return t.fn(e)}),a.registerHelper("log",function(e,t){var n=t.data&&null!=t.data.level?parseInt(t.data.level,10):1;a.log(n,e)});var r=["description","fileName","lineNumber","message","name","number","stack"];a.Exception=function(e){for(var t=Error.prototype.constructor.apply(this,arguments),a=0;a<r.length;a++)this[r[a]]=t[r[a]]},a.Exception.prototype=new Error,a.SafeString=function(e){this.string=e},a.SafeString.prototype.toString=function(){return this.string.toString()};var s={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},i=/[&<>"'`]/g,o=/[&<>"'`]/,l=function(e){return s[e]||"&"};a.Utils={extend:function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])},escapeExpression:function(e){return e instanceof a.SafeString?e.toString():null==e||!1===e?"":(e=e.toString(),o.test(e)?e.replace(i,l):e)},isEmpty:function(e){return!e&&0!==e||"[object Array]"===n.call(e)&&0===e.length}},a.VM={template:function(e){var t={escapeExpression:a.Utils.escapeExpression,invokePartial:a.VM.invokePartial,programs:[],program:function(e,t,n){var r=this.programs[e];return n?r=a.VM.program(e,t,n):r||(r=this.programs[e]=a.VM.program(e,t)),r},merge:function(e,t){var n=e||t;return e&&t&&(n={},a.Utils.extend(n,t),a.Utils.extend(n,e)),n},programWithDepth:a.VM.programWithDepth,noop:a.VM.noop,compilerInfo:null};return function(n,r){r=r||{};var s=e.call(t,a,n,r.helpers,r.partials,r.data),i=t.compilerInfo||[],o=i[0]||1,l=a.COMPILER_REVISION;if(o!==l)throw o<l?"Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+a.REVISION_CHANGES[l]+") or downgrade your runtime to an older version ("+a.REVISION_CHANGES[o]+").":"Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+i[1]+").";return s}},programWithDepth:function(e,t,a){var n=Array.prototype.slice.call(arguments,3),r=function(e,r){return r=r||{},t.apply(this,[e,r.data||a].concat(n))};return r.program=e,r.depth=n.length,r},program:function(e,t,a){var n=function(e,n){return n=n||{},t(e,n.data||a)};return n.program=e,n.depth=0,n},noop:function(){return""},invokePartial:function(e,t,n,r,s,i){var o={helpers:r,partials:s,data:i};if(void 0===e)throw new a.Exception("The partial "+t+" could not be found");if(e instanceof Function)return e(n,o);if(a.compile)return s[t]=a.compile(e,{data:void 0!==i}),s[t](n,o);throw new a.Exception("The partial "+t+" could not be compiled when running in runtime-only mode")}},a.template=a.VM.template,a.VERSION+="-yui",a.revive=a.template,e.namespace("Template").Handlebars=a},"3.17.2",{requires:[]})},776:function(e,t){YUI.add("squarespace-ui-templates",function(e){var t=e.Base.create("UITemplates",e.Base,[],{render:function(e,t){var a=this.getCompiledTemplate(e);if(!a)throw new Error(this.name+": Could not find UITemplate by the name of: "+e+". Recompile templates?");return a(t||{})},renderAsNodeOrDocFrag:function(t,a){return e.Node.create(this.render(t,a))},getCompiledTemplate:function(e){var t=this.get("compiledTemplates")[e];if(!t)throw new Error(this.name+": A template by the name "+e+" does not exist.");return t}},{ATTRS:{compiledTemplates:{readOnly:!0,getter:function(){var t=e.Handlebars.templates;if(!e.Lang.isObject(t))throw new Error(this.name+": No templates are available. Have you loaded your template module?");return t}}}});e.namespace("Squarespace").UITemplates=new t},"1.0",{requires:["base","handlebars-base"]})},8907:function(e,t,a){a(3984),a(3141),a(3142),a(3143),a(3144),a(2430),a(2436),a(3145),a(2439),a(3146),a(775),a(776)}},[8907]);