{"version":3,"sources":["webpack://Library/webpack/universalModuleDefinition","webpack://Library/webpack/runtime/chunk loaded","webpack://Library/./node_modules/lodash/_DataView.js","webpack://Library/./node_modules/lodash/_Hash.js","webpack://Library/./node_modules/lodash/_ListCache.js","webpack://Library/./node_modules/lodash/_Map.js","webpack://Library/./node_modules/lodash/_MapCache.js","webpack://Library/./node_modules/lodash/_Promise.js","webpack://Library/./node_modules/lodash/_Set.js","webpack://Library/./node_modules/lodash/_SetCache.js","webpack://Library/./node_modules/lodash/_Stack.js","webpack://Library/./node_modules/lodash/_Symbol.js","webpack://Library/./node_modules/lodash/_Uint8Array.js","webpack://Library/./node_modules/lodash/_WeakMap.js","webpack://Library/./node_modules/lodash/_arrayAggregator.js","webpack://Library/./node_modules/lodash/_arrayFilter.js","webpack://Library/./node_modules/lodash/_arrayLikeKeys.js","webpack://Library/./node_modules/lodash/_arrayMap.js","webpack://Library/./node_modules/lodash/_arrayPush.js","webpack://Library/./node_modules/lodash/_arraySome.js","webpack://Library/./node_modules/lodash/_assocIndexOf.js","webpack://Library/./node_modules/lodash/_baseAggregator.js","webpack://Library/./node_modules/lodash/_baseAssignValue.js","webpack://Library/./node_modules/lodash/_baseEach.js","webpack://Library/./node_modules/lodash/_baseFor.js","webpack://Library/./node_modules/lodash/_baseForOwn.js","webpack://Library/./node_modules/lodash/_baseGet.js","webpack://Library/./node_modules/lodash/_baseGetAllKeys.js","webpack://Library/./node_modules/lodash/_baseGetTag.js","webpack://Library/./node_modules/lodash/_baseHasIn.js","webpack://Library/./node_modules/lodash/_baseIsArguments.js","webpack://Library/./node_modules/lodash/_baseIsEqual.js","webpack://Library/./node_modules/lodash/_baseIsEqualDeep.js","webpack://Library/./node_modules/lodash/_baseIsMatch.js","webpack://Library/./node_modules/lodash/_baseIsNative.js","webpack://Library/./node_modules/lodash/_baseIsTypedArray.js","webpack://Library/./node_modules/lodash/_baseIteratee.js","webpack://Library/./node_modules/lodash/_baseKeys.js","webpack://Library/./node_modules/lodash/_baseMatches.js","webpack://Library/./node_modules/lodash/_baseMatchesProperty.js","webpack://Library/./node_modules/lodash/_baseProperty.js","webpack://Library/./node_modules/lodash/_basePropertyDeep.js","webpack://Library/./node_modules/lodash/_baseTimes.js","webpack://Library/./node_modules/lodash/_baseToString.js","webpack://Library/./node_modules/lodash/_baseUnary.js","webpack://Library/./node_modules/lodash/_cacheHas.js","webpack://Library/./node_modules/lodash/_castPath.js","webpack://Library/./node_modules/lodash/_coreJsData.js","webpack://Library/./node_modules/lodash/_createAggregator.js","webpack://Library/./node_modules/lodash/_createBaseEach.js","webpack://Library/./node_modules/lodash/_createBaseFor.js","webpack://Library/./node_modules/lodash/_defineProperty.js","webpack://Library/./node_modules/lodash/_equalArrays.js","webpack://Library/./node_modules/lodash/_equalByTag.js","webpack://Library/./node_modules/lodash/_equalObjects.js","webpack://Library/./node_modules/lodash/_freeGlobal.js","webpack://Library/./node_modules/lodash/_getAllKeys.js","webpack://Library/./node_modules/lodash/_getMapData.js","webpack://Library/./node_modules/lodash/_getMatchData.js","webpack://Library/./node_modules/lodash/_getNative.js","webpack://Library/./node_modules/lodash/_getRawTag.js","webpack://Library/./node_modules/lodash/_getSymbols.js","webpack://Library/./node_modules/lodash/_getTag.js","webpack://Library/./node_modules/lodash/_getValue.js","webpack://Library/./node_modules/lodash/_hasPath.js","webpack://Library/./node_modules/lodash/_hashClear.js","webpack://Library/./node_modules/lodash/_hashDelete.js","webpack://Library/./node_modules/lodash/_hashGet.js","webpack://Library/./node_modules/lodash/_hashHas.js","webpack://Library/./node_modules/lodash/_hashSet.js","webpack://Library/./node_modules/lodash/_isIndex.js","webpack://Library/./node_modules/lodash/_isKey.js","webpack://Library/./node_modules/lodash/_isKeyable.js","webpack://Library/./node_modules/lodash/_isMasked.js","webpack://Library/./node_modules/lodash/_isPrototype.js","webpack://Library/./node_modules/lodash/_isStrictComparable.js","webpack://Library/./node_modules/lodash/_listCacheClear.js","webpack://Library/./node_modules/lodash/_listCacheDelete.js","webpack://Library/./node_modules/lodash/_listCacheGet.js","webpack://Library/./node_modules/lodash/_listCacheHas.js","webpack://Library/./node_modules/lodash/_listCacheSet.js","webpack://Library/./node_modules/lodash/_mapCacheClear.js","webpack://Library/./node_modules/lodash/_mapCacheDelete.js","webpack://Library/./node_modules/lodash/_mapCacheGet.js","webpack://Library/./node_modules/lodash/_mapCacheHas.js","webpack://Library/./node_modules/lodash/_mapCacheSet.js","webpack://Library/./node_modules/lodash/_mapToArray.js","webpack://Library/./node_modules/lodash/_matchesStrictComparable.js","webpack://Library/./node_modules/lodash/_memoizeCapped.js","webpack://Library/./node_modules/lodash/_nativeCreate.js","webpack://Library/./node_modules/lodash/_nativeKeys.js","webpack://Library/./node_modules/lodash/_nodeUtil.js","webpack://Library/./node_modules/lodash/_objectToString.js","webpack://Library/./node_modules/lodash/_overArg.js","webpack://Library/./node_modules/lodash/_root.js","webpack://Library/./node_modules/lodash/_setCacheAdd.js","webpack://Library/./node_modules/lodash/_setCacheHas.js","webpack://Library/./node_modules/lodash/_setToArray.js","webpack://Library/./node_modules/lodash/_stackClear.js","webpack://Library/./node_modules/lodash/_stackDelete.js","webpack://Library/./node_modules/lodash/_stackGet.js","webpack://Library/./node_modules/lodash/_stackHas.js","webpack://Library/./node_modules/lodash/_stackSet.js","webpack://Library/./node_modules/lodash/_stringToPath.js","webpack://Library/./node_modules/lodash/_toKey.js","webpack://Library/./node_modules/lodash/_toSource.js","webpack://Library/./node_modules/lodash/eq.js","webpack://Library/./node_modules/lodash/get.js","webpack://Library/./node_modules/lodash/groupBy.js","webpack://Library/./node_modules/lodash/hasIn.js","webpack://Library/./node_modules/lodash/identity.js","webpack://Library/./node_modules/lodash/isArguments.js","webpack://Library/./node_modules/lodash/isArray.js","webpack://Library/./node_modules/lodash/isArrayLike.js","webpack://Library/./node_modules/lodash/isBuffer.js","webpack://Library/./node_modules/lodash/isFunction.js","webpack://Library/./node_modules/lodash/isLength.js","webpack://Library/./node_modules/lodash/isObject.js","webpack://Library/./node_modules/lodash/isObjectLike.js","webpack://Library/./node_modules/lodash/isSymbol.js","webpack://Library/./node_modules/lodash/isTypedArray.js","webpack://Library/./node_modules/lodash/keys.js","webpack://Library/./node_modules/lodash/memoize.js","webpack://Library/./node_modules/lodash/property.js","webpack://Library/./node_modules/lodash/stubArray.js","webpack://Library/./node_modules/lodash/stubFalse.js","webpack://Library/./node_modules/lodash/toString.js","webpack://Library/./calendar/classes/action-type.ts","webpack://Library/./calendar/classes/filter-state.ts","webpack://Library/./calendar/common/calendar-api.ts","webpack://Library/./calendar/common/time-zone-helper.ts","webpack://Library/./calendar/components/app.tsx","webpack://Library/./calendar/components/calendar-container.tsx","webpack://Library/./calendar/components/calendar-container.view.tsx","webpack://Library/./calendar/components/calendar-event-toggle .tsx","webpack://Library/./calendar/components/calendar-event-toggle.view.tsx","webpack://Library/./calendar/components/calendar-view-toggle.tsx","webpack://Library/./calendar/components/calendar-view-toggle.view.tsx","webpack://Library/./calendar/components/filters-ace/container.tsx","webpack://Library/./calendar/components/filters-ace/filter.tsx","webpack://Library/./calendar/components/filters-ace/filter.view.tsx","webpack://Library/./calendar/components/filters-ace/filters-container.view.tsx","webpack://Library/./calendar/components/grid/container.tsx","webpack://Library/./calendar/components/grid/day.tsx","webpack://Library/./calendar/components/grid/event.tsx","webpack://Library/./calendar/components/grid/grid-day.view.tsx","webpack://Library/./calendar/components/grid/grid-event.view.tsx","webpack://Library/./calendar/components/grid/grid-month-container.view.tsx","webpack://Library/./calendar/components/grid/grid-month.view.tsx","webpack://Library/./calendar/components/grid/grid-months.view.tsx","webpack://Library/./calendar/components/grid/month.tsx","webpack://Library/./calendar/components/grid/months.tsx","webpack://Library/./calendar/components/list/container.tsx","webpack://Library/./calendar/components/list/container.view.tsx","webpack://Library/./calendar/components/list/event.view.tsx","webpack://Library/./calendar/components/list/month.view.tsx","webpack://Library/./calendar/components/list/production.view.tsx","webpack://Library/./calendar/components/load-more.tsx","webpack://Library/./calendar/components/loader.tsx","webpack://Library/./calendar/components/mini-calendar/container.tsx","webpack://Library/./calendar/components/mini-calendar/container.view.tsx","webpack://Library/./calendar/components/mini-calendar/controls.view.tsx","webpack://Library/./calendar/components/mini-calendar/grid-item.view.tsx","webpack://Library/./calendar/components/mini-calendar/grid.view.tsx","webpack://Library/./calendar/components/modal-helper.tsx","webpack://Library/./calendar/components/month-selection/dropdown.tsx","webpack://Library/./calendar/components/month-selection/load-more.tsx","webpack://Library/./calendar/components/month-selection/month-selection-dropdown.view.tsx","webpack://Library/./calendar/components/month-selection/month-selection-load-more.view.tsx","webpack://Library/./calendar/components/navigation/scroll-to-top.tsx","webpack://Library/./calendar/components/navigation/sticky-nav.tsx","webpack://Library/./calendar/components/promo-code-helper.tsx","webpack://Library/./calendar/components/responsive/index.tsx","webpack://Library/./calendar/contexts/calendar-text.tsx","webpack://Library/./calendar/helpers/active-filter-options.ts","webpack://Library/./calendar/helpers/compose-filter-function.ts","webpack://Library/./calendar/helpers/cookie-helper.ts","webpack://Library/./calendar/helpers/filter-by-query.ts","webpack://Library/./calendar/helpers/filter-events.ts","webpack://Library/./calendar/helpers/focus-trap.ts","webpack://Library/./calendar/helpers/format-date-time.ts","webpack://Library/./calendar/helpers/get-height-of-hidden.ts","webpack://Library/./calendar/helpers/hash-filters.ts","webpack://Library/./calendar/helpers/hash-value.ts","webpack://Library/./calendar/helpers/is-external-url.ts","webpack://Library/./calendar/helpers/query-string-map.ts","webpack://Library/./calendar/helpers/scroll-position.ts","webpack://Library/./calendar/helpers/scroll-to-heading.ts","webpack://Library/./calendar/helpers/scroll-to-month.ts","webpack://Library/./calendar/index.tsx","webpack://Library/./calendar/redux-state/actions/calendar-settings.actions.ts","webpack://Library/./calendar/redux-state/actions/calendar-text.actions.ts","webpack://Library/./calendar/redux-state/actions/calendar.actions.ts","webpack://Library/./calendar/redux-state/index.ts","webpack://Library/./calendar/redux-state/interfaces/calendar-app-text.state.ts","webpack://Library/./calendar/redux-state/interfaces/calendar-filter.state.ts","webpack://Library/./calendar/redux-state/interfaces/calendar-settings.ts","webpack://Library/./calendar/redux-state/interfaces/calendar.state.ts","webpack://Library/./calendar/redux-state/interfaces/lazy-load.state.ts","webpack://Library/./calendar/redux-state/interfaces/startup.state.ts","webpack://Library/./calendar/redux-state/reducers/calendar-settings.reducer.ts","webpack://Library/./calendar/redux-state/reducers/calendar-text.reducer.ts","webpack://Library/./calendar/redux-state/reducers/calendar.reducer.ts","webpack://Library/./calendar/redux-state/reducers/lazy-load.reducer.ts","webpack://Library/external \"_\"","webpack://Library/external {\"root\":\"React\",\"commonjs2\":\"react\",\"commonjs\":\"react\",\"amd\":\"react\",\"umd\":\"react\"}","webpack://Library/external {\"root\":\"ReactDOM\",\"commonjs2\":\"react-dom\",\"commonjs\":\"react-dom\",\"amd\":\"react-dom\",\"umd\":\"react-dom\"}","webpack://Library/webpack/bootstrap","webpack://Library/webpack/runtime/compat get default export","webpack://Library/webpack/runtime/define property getters","webpack://Library/webpack/runtime/global","webpack://Library/webpack/runtime/harmony module decorator","webpack://Library/webpack/runtime/hasOwnProperty shorthand","webpack://Library/webpack/runtime/make namespace object","webpack://Library/webpack/runtime/node module decorator","webpack://Library/webpack/runtime/jsonp chunk loading","webpack://Library/webpack/startup"],"names":["root","factory","exports","module","require","define","amd","self","__WEBPACK_EXTERNAL_MODULE__8383__","__WEBPACK_EXTERNAL_MODULE__3949__","__WEBPACK_EXTERNAL_MODULE__6215__","deferred","DataView","getNative","hashClear","hashDelete","hashGet","hashHas","hashSet","Hash","entries","index","length","this","clear","entry","set","prototype","get","has","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","ListCache","Map","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","Promise","Set","setCacheAdd","setCacheHas","SetCache","values","__data__","add","push","stackClear","stackDelete","stackGet","stackHas","stackSet","Stack","data","size","Symbol","Uint8Array","WeakMap","array","setter","iteratee","accumulator","value","predicate","resIndex","result","baseTimes","isArguments","isArray","isBuffer","isIndex","isTypedArray","hasOwnProperty","Object","inherited","isArr","isArg","isBuff","isType","skipIndexes","String","key","call","Array","offset","eq","baseEach","collection","defineProperty","object","baseForOwn","createBaseEach","baseFor","createBaseFor","keys","castPath","toKey","path","undefined","arrayPush","keysFunc","symbolsFunc","getRawTag","objectToString","symToStringTag","toStringTag","baseGetTag","isObjectLike","baseIsEqualDeep","baseIsEqual","other","bitmask","customizer","stack","equalArrays","equalByTag","equalObjects","getTag","argsTag","arrayTag","objectTag","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","source","matchData","noCustomizer","objValue","srcValue","COMPARE_PARTIAL_FLAG","isFunction","isMasked","isObject","toSource","reIsHostCtor","funcProto","Function","objectProto","funcToString","toString","reIsNative","RegExp","replace","test","isLength","typedArrayTags","baseMatches","baseMatchesProperty","identity","property","isPrototype","nativeKeys","baseIsMatch","getMatchData","matchesStrictComparable","hasIn","isKey","isStrictComparable","baseGet","n","arrayMap","isSymbol","symbolProto","symbolToString","baseToString","func","cache","stringToPath","coreJsData","arrayAggregator","baseAggregator","baseIteratee","initializer","isArrayLike","eachFunc","fromRight","iterable","props","e","arraySome","cacheHas","isPartial","arrLength","othLength","arrStacked","othStacked","seen","arrValue","othValue","compared","othIndex","mapToArray","setToArray","symbolValueOf","valueOf","tag","byteLength","byteOffset","buffer","name","message","convert","stacked","getAllKeys","objProps","objLength","objStacked","skipCtor","objCtor","constructor","othCtor","freeGlobal","g","baseGetAllKeys","getSymbols","isKeyable","map","baseIsNative","getValue","nativeObjectToString","isOwn","unmasked","arrayFilter","stubArray","propertyIsEnumerable","nativeGetSymbols","getOwnPropertySymbols","symbol","mapTag","promiseTag","setTag","weakMapTag","dataViewTag","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","ArrayBuffer","resolve","Ctor","ctorString","hasFunc","nativeCreate","reIsUint","type","reIsDeepProp","reIsPlainProp","uid","maskSrcKey","exec","IE_PROTO","assocIndexOf","splice","pop","getMapData","forEach","memoize","overArg","freeExports","nodeType","freeModule","freeProcess","process","nodeUtil","types","binding","transform","arg","freeSelf","pairs","LARGE_ARRAY_SIZE","memoizeCapped","rePropName","reEscapeChar","string","charCodeAt","match","number","quote","subString","defaultValue","baseAssignValue","createAggregator","groupBy","baseHasIn","hasPath","baseIsArguments","arguments","stubFalse","Buffer","baseIsTypedArray","baseUnary","nodeIsTypedArray","arrayLikeKeys","baseKeys","resolver","TypeError","memoized","args","apply","Cache","baseProperty","basePropertyDeep","ActionType","propertyToFilter","multiselect","options","selectedOptions","loaded","filter","bind","event","i","j","toLowerCase","update","oldSelectedOptions","option","some","o","commit","selection","FilterState","weekdays","dayName","getFiltersApi","startDate","endDate","culture","requestString","aceCalendarAPIRoute","withCredentials","then","response","getFiltersFor","startDateFormatted","format","apiDateFormat","endDateFormatted","getFirstOccurenceForFilterApi","currentFilters","startOf","filterRequest","calendarFilters","arr","filterName","filterValue","post","method","cancelToken","filtersSource","token","getFirstOccurenceForFilters","filters","getMonth","month","filterFunction","monthMoment","getMonthEventsCache","monthEvents","events","days","getDatesFromApiResponse","productions","getProductionsFromApiResponse","allDays","getMonthEvents","clone","apiEvents","eventDate","Date","now","evt","isSameOrAfter","sort","e1","e2","datesInMonth","dates","daysInMonth","day","date","toDate","setDate","getDateLocalTime","datesBefore","firstIndex","indexOf","daysFromLastMonthInSameWeek","concat","productionGrouped","productionSeasonId","prodEvents","production","id","conductor","composerInfo","priceInfo","firstPerformanceDate","productionStartDateString","lastPerformanceDate","productionEndDateString","eventType","CancelToken","CalendarApi","shiftedDateString","toLocaleString","timeZone","getDate","render","filterState","venueFilter","availabilityFilter","genreFilter","Provider","text","className","React","Component","AppComponent","connect","state","ownProps","calendarText","calendar","currentDate","dispatch","openFiltersDialog","trigger","clearAllFilters","removeAllEventFilters","openMiniCalDialog","componentDidUpdate","prevProps","superParent","document","documentElement","isLoading","setAttribute","CalendarContainerBase","calendarViewMode","calendarSettings","calendarDeviceMode","updating","component","CalendarViewMode","LIST","fromApi","waitingForApi","componentDidMount","setState","catch","err","console","error","prevState","setTimeout","removeLoader","lastLoadedMonth","isSame","calculateOptions","eventMonths","uniq","firstOccurance","eventProperty","CalendarEventToggleBase","eventFilterDefault","split","availableEventTypes","loadedMonths","monthsOnCalendar","endOf","selectedEventType","eventFilter","ef","selectedValue","lastMonthToLoad","isUpdating","selectFilterType","generateEventFilter","upsertEventFilter","removeEventFilter","getFirstOccurenceDateForFilters","firstOccuranceDate","setCurrentMonth","getMonthElement","scrollInterval","setInterval","scrollToMonth","clearInterval","disableEventButton","li","disabled","onClick","getEventValue","CalendarDeviceMode","DESKTOP","jumpToMonth","window","CalendarViewToggleBase","calendarMode","startMonth","setToGrid","setToList","GRID","focusable","xmlnsXlink","xlinkHref","gridViewModeButtonText","listViewModeButtonText","useModal","initializeModal","dialog","create","element","findDOMNode","A11yDialog","destroyModal","destroy","handleResize","addEventListener","debounce","desktopToMobileTransitionWidth","innerWidth","filtersDialogOpen","closeFiltersDialog","componentWillUnmount","showModal","show","hideModal","hide","isModal","FiltersContainerBase","parseInt","openFilterDialog","location","search","GetFilterFromQuery","selectFilter","goToMonth","FiltersBase","matchedFilter","hasFilters","shouldUpdateQuery","collapsedFilterName","onChange","currentTarget","selectEl","selectedOption","selectedIndex","updatedFilters","noSelectionText","FiltersListView","Consumer","productionFilterLabelText","productionSelectAllDropdownOption","GridMonthContainerBase","currentMoment","GridDayBase","GridEventBase","dateMoment","isToday","role","pluralEventsText","singleEventText","backgroundStyle","backgroundImage","thumbnail","fallbackThumbnailImageSrc","highlightProductions","nodeListToArray","querySelectorAll","classList","toggle","onMouseEnter","onMouseLeave","style","href","viewDetailCtaUrl","eventTimeString","buyTicketDisabled","buyTicketCtaText","buyTicketCtaUrl","daysOfTheWeek","hasEvents","monthData","eventsToDisplay","moment","isSameOrBefore","toDateString","dangerouslySetInnerHTML","__html","emptyMonthMessage","gridViewHeading","monthsData","year","nextmonthsData","GridMonthBase","GridMonthsBase","filteredEvents","filteredNextMonthEvents","loadingMore","datePositions","onScroll","updateDatePositions","throttledScroll","throttle","debouncedResize","loadMoreSideEffect","populateAndOpenSmartSeatModal","removeEventListener","dateString","getDateFromScrollPosition","currentScrolledDate","updateScrolledDate","scrollPos","scrollPosition","adjustedOffset","offsetTop","height","shouldComponentUpdate","nextProps","newFilteredMonth","haseventFilter","selectedFromMiniCalendar","dateSelectedFromMiniCalendar","eventCount","filterHash","oldProps","scrollToHeading","slice","dateItem","getAttribute","offsetHeight","preventDefault","reserveUrl","target","intermediaryLink","querySelector","click","log","startupState","miniCalendarDateSelected","miniCalendarDate","to","ListContainerBase","listViewHeading","PureComponent","ListContainerView","eventDetails","eventIsOnSale","currentMosOnSaleDate","currentMosOnSaleEndDate","soldOut","onSale","isVolunteer","volunteerPurchase","hideAvailability","availabilityOverrideText","dateX","eventDateString","performanceNote","isExternalUrl","tabIndex","allowTabbing","volunteerbuyTicketCtaText","ListEventView","formatDateTime","accessibleMonthFormat","a","b","isBefore","prod","openProdList","ev","ListMonthView","loadMore","loadMorePerformances","lastPerformanceLoadedIndex","panelHeight","initialPanelHeight","getHeightOfHidden","panelRef","current","morePerformancesPanelRef","toggleShowingTicketPanel","ticketPanelOpen","openTogglepanelHeight","createRef","openTogglepanelRef","resizeListener","morePerformancesPanelHeight","componentWillReceiveProps","filterPerformanceByDateSelectionPrevProps","prevDateSelection","filterPerformanceByDateSelection","openToggleState","isSinglePerformance","src","alt","synopsis","singlePerformanceCta","multiPerformanceList","defaultToggleOpenList","performanceToggle","ref","showLessDatesButtonText","viewMoreDatesButtonText","trim","notOnSaleText","emptyDayMessage","ListProductionView","loadMoreEventsButtonText","LoadMore","nextMonth","loading","monthToLoad","monthsLoaded","loadFromApi","removeAttribute","saveLoadedEvents","currentViewState","nextmonthMoment","saveNextLoadedEvents","calendarLoadingLabel","calendarDoneLoadingLabel","loaderImageUrl","LoaderBase","loadedMonth","updateEvents","updateNextMonthEvents","KeyCode","today","handlePreviousMonthClick","handleTodayClick","handleTodayTab","handleGridKeyEvent","handleFooterShiftTab","initialState","cookieDate","getCookie","dateCookieName","trap","focusTrap","firstRef","footerRef","miniCalDialogOpen","controlsProps","gridProps","footerProps","handleKeyDown","closeMiniCalDialog","currentMonth","calendarEvents","haystack","activeDate","shiftFocus","stateChanges","gridDates","firstGridIndexWhere","firstIndexByPredicate","sameMonth","shiftFocusToFirstOfMonth","previousMonthWasClicked","focusRef","nextMonthRef","dateWasClicked","todayWasClicked","focus","focusActiveDate","active","buttonRef","handleFocusShift","firstValidDate","shiftKey","keyCode","up","left","setPreviousMonth","down","right","setNextMonth","tab","todayRef","subtract","handleMonthChange","selectedMonth","datesMemo","endOfMonth","moments","allEvents","reduce","old","curr","todayEvents","eventDay","handleKeyEvent","isCurrentDate","previousMonthRef","shiftFocusToActiveDate","handleNextMonthClick","displayPreviousMonth","validMonths","eventMonth","newDate","previousMonth","MiniCalendar","onKeyDown","MiniCalendarControlsView","MiniCalendarGridView","monthFormat","skipToEventsButtonText","miniCalendarHiddenHeading","keyboardInstructions","htmlFor","monthDropdownDescriptionText","MiniCalendarGridItemView","liClassName","weekday","substr","bindEscKey","body","which","ModalHelperBase","MonthSelectionDropdownBase","currDate","lastDate","LoadMoreBase","goToNextMonth","momentFormat","mmt","focusDestinationMonth","showButton","boundScroll","checkScroll","pageYOffset","appearanceOffset","nextState","scrollToTopAppearanceOffset","ScrollToTopBase","filtersBackgroundColor","StickyNavBase","calendarFiltersBackground","getElementById","localStorage","setItem","JSON","stringify","localStorageState","dateRangeFromQueryString","typeFilter","activeFilterOptions","PromoCodeHelper","WindowSize","mediaWidth","currentDeviceMode","setToDesktop","MOBILE","setToMobile","ResponsiveBase","Number","CalendarText","createContext","defaultText","f","functionCache","range","filterHashKey","hashFilters","restricted","cachedFunction","filterCache","cachedResult","isBetween","minutes","expires","utc","cookie","nameSubstring","allCookies","c","charAt","substring","eventFilters","join","urlSearchParams","URLSearchParams","queryString","fromEntries","encodeURI","newurl","protocol","host","pathname","history","pushState","filterOptions","filterToGet","selectFiltersFunction","goToMonthFunction","matchedQuery","decodeURI","q","isAfter","propertyValue","item","eventDays","interpolateDays","start","end","d","addEvents","groupedEvents","composeFilterFunction","filteredMonth","eventsForSpecificMonth","filteredDay","lastRef","shouldTrap","formatString","el","parentStyles","parentElement","selfStyles","elementHeight","rangeRestricted","activeOptions","hashValue","hash","url","StringMap","results","decodeURIComponent","getParameterByName","delete","newMap","k","deleted","supportPageOffset","isCSS1Compat","compatMode","scrollTop","headingId","heading","getMonthElementFromMoment","mmtId","destinationMonth","store","appStore","newSettings","UpdateSettings","SetToMobile","SetToDesktop","SetToGrid","SetToList","ReceiveText","NextMonth","PreviousMonth","UpdateScrolledDate","SelectedDate","SetCurrentMonth","SetEventType","GoToMonth","UpdateGridEvents","UpdateEvents","UpdateNextMonthEvents","CheckIfUpdating","CheckIfNewMonth","UpdateEventFilter","function","filterKey","RemoveEventFilter","RemoveAllEventFilters","selectedTypeOption","selectedGenreOptions","selectedVenueOptions","selectedAvailabilityOptions","OpenFiltersDialog","CloseFiltersDialog","OpenMiniCalDialog","CloseMiniCalDialog","SaveTypeFilterOptions","SaveGenreFilterOptions","SavePartnerFilterOptions","SaveVenueFilterOptions","SaveAvailabilityFilterOptions","lastDateMoment","appReducer","combineReducers","lazyLoad","defaultCalendarSettings","createStore","applyMiddleware","receiveText","pageData","defaultToListViewString","calendarEntry","mobileWidth","calendarAppHeading","applyPromoCodeButtonText","defaultToListView","noEventsString","noEventsThroughFiltersString","promoCodeDescriptionText","apiError","todayText","dateFormat","timeFormat","timeFormatNoMinutes","calendarFiltersHeading","filterOpenButtonText","filterOpenButtonLabel","filterTriggerButtonText","filterTriggerButtonLabel","filterCloseButtonText","filterCloseButtonLabel","typeFilterTitleText","typeAllSelectionText","venueSelectAllDropdownOption","accessibilityFilterTitleText","accessibilityAllSelectionText","dateAndTimeFilterTitleText","discountFilterTitleText","discountAllSelectionText","nothingSelectedText","clearAllButtonText","clearAllButtonLabel","previousMonthButtonText","nextMonthButtonText","dateAvailabilityDescription","noAvailabilityDescription","limitedAvailabilityDescription","audioDescribedTooltip","audioDescribedLabel","openCaptionedTooltip","openCaptionedLabel","sensoryFriendlyTooltip","sensoryFriendlyLabel","signInterpretedTooltip","signInterpretedLabel","cuedSpeechTooltip","cuedSpeechLabel","bravoLabel","myTixLabel","studentRushLabel","notOnSale","emptyMonthMessaging","defaultCalendarFiltersState","CalendarEventMode","loadWrappingMonthDates","saveHistory","defaultStartupState","thisMonth","defaultCalendarState","openModalTrigger","firstMonthEvents","allEventTypes","defaultLazyLoadState","imageHasLoaded","parse","getItem","removeItem","queryStringArgs","getQueryStringMap","action","requesting","calendarReducer","rangeRestriction","filterEvents","checkIfUpdating","checkIfNewMonth","SetDate","newMonth","setCookie","newStart","newEnd","mustUpdate","fil","every","AddFilterToQuery","flatMap","p","WaitForImage","imagesDictionary","ImageHasLoaded","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","m","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","getter","__esModule","definition","enumerable","globalThis","hmd","children","Error","obj","prop","r","nmd","paths","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,SAAUA,QAAQ,aAAcA,QAAQ,MAChD,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,QAAS,YAAa,KAAMJ,GACV,iBAAZC,QACdA,QAAiB,QAAID,EAAQG,QAAQ,SAAUA,QAAQ,aAAcA,QAAQ,MAE7EJ,EAAc,QAAIC,EAAQD,EAAY,MAAGA,EAAe,SAAGA,EAAQ,EACpE,CATD,CASGO,MAAM,SAASC,EAAmCC,EAAmCC,GACxF,O,eCVIC,E,wBCAJ,IAIIC,EAJY,EA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,EAC9B,EAEIsiC,EAAqBrmC,KAA0B,oBAAIA,KAA0B,qBAAK,GACtFqmC,EAAmB91B,QAAQ01B,EAAqBnyB,KAAK,KAAM,IAC3DuyB,EAAmBzjC,KAAOqjC,EAAqBnyB,KAAK,KAAMuyB,EAAmBzjC,KAAKkR,KAAKuyB,G,IC7CvF,IAAIC,EAAsBhC,EAAoBK,OAAE3+B,EAAW,CAAC,MAAM,WAAa,OAAOs+B,EAAoB,KAAO,I,OAC3FA,EAAoBK,EAAE2B,E","file":"calendar-bundle.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"), require(\"_\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\", \"_\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Library\"] = factory(require(\"react\"), require(\"react-dom\"), require(\"_\"));\n\telse\n\t\troot[\"Library\"] = factory(root[\"React\"], root[\"ReactDOM\"], root[\"_\"]);\n})(self, function(__WEBPACK_EXTERNAL_MODULE__8383__, __WEBPACK_EXTERNAL_MODULE__3949__, __WEBPACK_EXTERNAL_MODULE__6215__) {\nreturn ","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tresult = fn();\n\t\t}\n\t}\n\treturn result;\n};","var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var hashClear = require('./_hashClear'),\n    hashDelete = require('./_hashDelete'),\n    hashGet = require('./_hashGet'),\n    hashHas = require('./_hashHas'),\n    hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var listCacheClear = require('./_listCacheClear'),\n    listCacheDelete = require('./_listCacheDelete'),\n    listCacheGet = require('./_listCacheGet'),\n    listCacheHas = require('./_listCacheHas'),\n    listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n    mapCacheDelete = require('./_mapCacheDelete'),\n    mapCacheGet = require('./_mapCacheGet'),\n    mapCacheHas = require('./_mapCacheHas'),\n    mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n  var index = -1,\n      length = entries == null ? 0 : entries.length;\n\n  this.clear();\n  while (++index < length) {\n    var entry = entries[index];\n    this.set(entry[0], entry[1]);\n  }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var MapCache = require('./_MapCache'),\n    setCacheAdd = require('./_setCacheAdd'),\n    setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n  var index = -1,\n      length = values == null ? 0 : values.length;\n\n  this.__data__ = new MapCache;\n  while (++index < length) {\n    this.add(values[index]);\n  }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","var ListCache = require('./_ListCache'),\n    stackClear = require('./_stackClear'),\n    stackDelete = require('./_stackDelete'),\n    stackGet = require('./_stackGet'),\n    stackHas = require('./_stackHas'),\n    stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n  var data = this.__data__ = new ListCache(entries);\n  this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n    root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    var value = array[index];\n    setter(accumulator, value, iteratee(value), array);\n  }\n  return accumulator;\n}\n\nmodule.exports = arrayAggregator;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      resIndex = 0,\n      result = [];\n\n  while (++index < length) {\n    var value = array[index];\n    if (predicate(value, index, array)) {\n      result[resIndex++] = value;\n    }\n  }\n  return result;\n}\n\nmodule.exports = arrayFilter;\n","var baseTimes = require('./_baseTimes'),\n    isArguments = require('./isArguments'),\n    isArray = require('./isArray'),\n    isBuffer = require('./isBuffer'),\n    isIndex = require('./_isIndex'),\n    isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n  var isArr = isArray(value),\n      isArg = !isArr && isArguments(value),\n      isBuff = !isArr && !isArg && isBuffer(value),\n      isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n      skipIndexes = isArr || isArg || isBuff || isType,\n      result = skipIndexes ? baseTimes(value.length, String) : [],\n      length = result.length;\n\n  for (var key in value) {\n    if ((inherited || hasOwnProperty.call(value, key)) &&\n        !(skipIndexes && (\n           // Safari 9 has enumerable `arguments.length` in strict mode.\n           key == 'length' ||\n           // Node.js 0.10 has enumerable non-index properties on buffers.\n           (isBuff && (key == 'offset' || key == 'parent')) ||\n           // PhantomJS 2 has enumerable non-index properties on typed arrays.\n           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n           // Skip index properties.\n           isIndex(key, length)\n        ))) {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n  var index = -1,\n      length = array == null ? 0 : array.length,\n      result = Array(length);\n\n  while (++index < length) {\n    result[index] = iteratee(array[index], index, array);\n  }\n  return result;\n}\n\nmodule.exports = arrayMap;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n  var index = -1,\n      length = values.length,\n      offset = array.length;\n\n  while (++index < length) {\n    array[offset + index] = values[index];\n  }\n  return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n *  else `false`.\n */\nfunction arraySome(array, predicate) {\n  var index = -1,\n      length = array == null ? 0 : array.length;\n\n  while (++index < length) {\n    if (predicate(array[index], index, array)) {\n      return true;\n    }\n  }\n  return false;\n}\n\nmodule.exports = arraySome;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n  var length = array.length;\n  while (length--) {\n    if (eq(array[length][0], key)) {\n      return length;\n    }\n  }\n  return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var baseEach = require('./_baseEach');\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n  baseEach(collection, function(value, key, collection) {\n    setter(accumulator, value, iteratee(value), collection);\n  });\n  return accumulator;\n}\n\nmodule.exports = baseAggregator;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n  if (key == '__proto__' && defineProperty) {\n    defineProperty(object, key, {\n      'configurable': true,\n      'enumerable': true,\n      'value': value,\n      'writable': true\n    });\n  } else {\n    object[key] = value;\n  }\n}\n\nmodule.exports = baseAssignValue;\n","var baseForOwn = require('./_baseForOwn'),\n    createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","var baseFor = require('./_baseFor'),\n    keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n  return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","var castPath = require('./_castPath'),\n    toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n  path = castPath(path, object);\n\n  var index = 0,\n      length = path.length;\n\n  while (object != null && index < length) {\n    object = object[toKey(path[index++])];\n  }\n  return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var arrayPush = require('./_arrayPush'),\n    isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n  var result = keysFunc(object);\n  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","var Symbol = require('./_Symbol'),\n    getRawTag = require('./_getRawTag'),\n    objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n  return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var baseGetTag = require('./_baseGetTag'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n  return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n    isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n *  1 - Unordered comparison\n *  2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n  if (value === other) {\n    return true;\n  }\n  if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n    return value !== value && other !== other;\n  }\n  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var Stack = require('./_Stack'),\n    equalArrays = require('./_equalArrays'),\n    equalByTag = require('./_equalByTag'),\n    equalObjects = require('./_equalObjects'),\n    getTag = require('./_getTag'),\n    isArray = require('./isArray'),\n    isBuffer = require('./isBuffer'),\n    isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n  var objIsArr = isArray(object),\n      othIsArr = isArray(other),\n      objTag = objIsArr ? arrayTag : getTag(object),\n      othTag = othIsArr ? arrayTag : getTag(other);\n\n  objTag = objTag == argsTag ? objectTag : objTag;\n  othTag = othTag == argsTag ? objectTag : othTag;\n\n  var objIsObj = objTag == objectTag,\n      othIsObj = othTag == objectTag,\n      isSameTag = objTag == othTag;\n\n  if (isSameTag && isBuffer(object)) {\n    if (!isBuffer(other)) {\n      return false;\n    }\n    objIsArr = true;\n    objIsObj = false;\n  }\n  if (isSameTag && !objIsObj) {\n    stack || (stack = new Stack);\n    return (objIsArr || isTypedArray(object))\n      ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n      : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n  }\n  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n        othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n    if (objIsWrapped || othIsWrapped) {\n      var objUnwrapped = objIsWrapped ? object.value() : object,\n          othUnwrapped = othIsWrapped ? other.value() : other;\n\n      stack || (stack = new Stack);\n      return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n    }\n  }\n  if (!isSameTag) {\n    return false;\n  }\n  stack || (stack = new Stack);\n  return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var Stack = require('./_Stack'),\n    baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n  var index = matchData.length,\n      length = index,\n      noCustomizer = !customizer;\n\n  if (object == null) {\n    return !length;\n  }\n  object = Object(object);\n  while (index--) {\n    var data = matchData[index];\n    if ((noCustomizer && data[2])\n          ? data[1] !== object[data[0]]\n          : !(data[0] in object)\n        ) {\n      return false;\n    }\n  }\n  while (++index < length) {\n    data = matchData[index];\n    var key = data[0],\n        objValue = object[key],\n        srcValue = data[1];\n\n    if (noCustomizer && data[2]) {\n      if (objValue === undefined && !(key in object)) {\n        return false;\n      }\n    } else {\n      var stack = new Stack;\n      if (customizer) {\n        var result = customizer(objValue, srcValue, key, object, source, stack);\n      }\n      if (!(result === undefined\n            ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n            : result\n          )) {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\nmodule.exports = baseIsMatch;\n","var isFunction = require('./isFunction'),\n    isMasked = require('./_isMasked'),\n    isObject = require('./isObject'),\n    toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n    objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n  .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n *  else `false`.\n */\nfunction baseIsNative(value) {\n  if (!isObject(value) || isMasked(value)) {\n    return false;\n  }\n  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n  return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var baseGetTag = require('./_baseGetTag'),\n    isLength = require('./isLength'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n    arrayTag = '[object Array]',\n    boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    funcTag = '[object Function]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    objectTag = '[object Object]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]',\n    float32Tag = '[object Float32Array]',\n    float64Tag = '[object Float64Array]',\n    int8Tag = '[object Int8Array]',\n    int16Tag = '[object Int16Array]',\n    int32Tag = '[object Int32Array]',\n    uint8Tag = '[object Uint8Array]',\n    uint8ClampedTag = '[object Uint8ClampedArray]',\n    uint16Tag = '[object Uint16Array]',\n    uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n  return isObjectLike(value) &&\n    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var baseMatches = require('./_baseMatches'),\n    baseMatchesProperty = require('./_baseMatchesProperty'),\n    identity = require('./identity'),\n    isArray = require('./isArray'),\n    property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n  // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n  // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n  if (typeof value == 'function') {\n    return value;\n  }\n  if (value == null) {\n    return identity;\n  }\n  if (typeof value == 'object') {\n    return isArray(value)\n      ? baseMatchesProperty(value[0], value[1])\n      : baseMatches(value);\n  }\n  return property(value);\n}\n\nmodule.exports = baseIteratee;\n","var isPrototype = require('./_isPrototype'),\n    nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n  if (!isPrototype(object)) {\n    return nativeKeys(object);\n  }\n  var result = [];\n  for (var key in Object(object)) {\n    if (hasOwnProperty.call(object, key) && key != 'constructor') {\n      result.push(key);\n    }\n  }\n  return result;\n}\n\nmodule.exports = baseKeys;\n","var baseIsMatch = require('./_baseIsMatch'),\n    getMatchData = require('./_getMatchData'),\n    matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n  var matchData = getMatchData(source);\n  if (matchData.length == 1 && matchData[0][2]) {\n    return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n  }\n  return function(object) {\n    return object === source || baseIsMatch(object, source, matchData);\n  };\n}\n\nmodule.exports = baseMatches;\n","var baseIsEqual = require('./_baseIsEqual'),\n    get = require('./get'),\n    hasIn = require('./hasIn'),\n    isKey = require('./_isKey'),\n    isStrictComparable = require('./_isStrictComparable'),\n    matchesStrictComparable = require('./_matchesStrictComparable'),\n    toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n  if (isKey(path) && isStrictComparable(srcValue)) {\n    return matchesStrictComparable(toKey(path), srcValue);\n  }\n  return function(object) {\n    var objValue = get(object, path);\n    return (objValue === undefined && objValue === srcValue)\n      ? hasIn(object, path)\n      : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n  };\n}\n\nmodule.exports = baseMatchesProperty;\n","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n  return function(object) {\n    return object == null ? undefined : object[key];\n  };\n}\n\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n  return function(object) {\n    return baseGet(object, path);\n  };\n}\n\nmodule.exports = basePropertyDeep;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n  var index = -1,\n      result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n  return result;\n}\n\nmodule.exports = baseTimes;\n","var Symbol = require('./_Symbol'),\n    arrayMap = require('./_arrayMap'),\n    isArray = require('./isArray'),\n    isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n  // Exit early for strings to avoid a performance hit in some environments.\n  if (typeof value == 'string') {\n    return value;\n  }\n  if (isArray(value)) {\n    // Recursively convert values (susceptible to call stack limits).\n    return arrayMap(value, baseToString) + '';\n  }\n  if (isSymbol(value)) {\n    return symbolToString ? symbolToString.call(value) : '';\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n  return function(value) {\n    return func(value);\n  };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n  return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var isArray = require('./isArray'),\n    isKey = require('./_isKey'),\n    stringToPath = require('./_stringToPath'),\n    toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n  if (isArray(value)) {\n    return value;\n  }\n  return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var arrayAggregator = require('./_arrayAggregator'),\n    baseAggregator = require('./_baseAggregator'),\n    baseIteratee = require('./_baseIteratee'),\n    isArray = require('./isArray');\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n  return function(collection, iteratee) {\n    var func = isArray(collection) ? arrayAggregator : baseAggregator,\n        accumulator = initializer ? initializer() : {};\n\n    return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n  };\n}\n\nmodule.exports = createAggregator;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n  return function(collection, iteratee) {\n    if (collection == null) {\n      return collection;\n    }\n    if (!isArrayLike(collection)) {\n      return eachFunc(collection, iteratee);\n    }\n    var length = collection.length,\n        index = fromRight ? length : -1,\n        iterable = Object(collection);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (iteratee(iterable[index], index, iterable) === false) {\n        break;\n      }\n    }\n    return collection;\n  };\n}\n\nmodule.exports = createBaseEach;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n  return function(object, iteratee, keysFunc) {\n    var index = -1,\n        iterable = Object(object),\n        props = keysFunc(object),\n        length = props.length;\n\n    while (length--) {\n      var key = props[fromRight ? length : ++index];\n      if (iteratee(iterable[key], key, iterable) === false) {\n        break;\n      }\n    }\n    return object;\n  };\n}\n\nmodule.exports = createBaseFor;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n  try {\n    var func = getNative(Object, 'defineProperty');\n    func({}, '', {});\n    return func;\n  } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var SetCache = require('./_SetCache'),\n    arraySome = require('./_arraySome'),\n    cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n      arrLength = array.length,\n      othLength = other.length;\n\n  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n    return false;\n  }\n  // Check that cyclic values are equal.\n  var arrStacked = stack.get(array);\n  var othStacked = stack.get(other);\n  if (arrStacked && othStacked) {\n    return arrStacked == other && othStacked == array;\n  }\n  var index = -1,\n      result = true,\n      seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n  stack.set(array, other);\n  stack.set(other, array);\n\n  // Ignore non-index properties.\n  while (++index < arrLength) {\n    var arrValue = array[index],\n        othValue = other[index];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, arrValue, index, other, array, stack)\n        : customizer(arrValue, othValue, index, array, other, stack);\n    }\n    if (compared !== undefined) {\n      if (compared) {\n        continue;\n      }\n      result = false;\n      break;\n    }\n    // Recursively compare arrays (susceptible to call stack limits).\n    if (seen) {\n      if (!arraySome(other, function(othValue, othIndex) {\n            if (!cacheHas(seen, othIndex) &&\n                (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n              return seen.push(othIndex);\n            }\n          })) {\n        result = false;\n        break;\n      }\n    } else if (!(\n          arrValue === othValue ||\n            equalFunc(arrValue, othValue, bitmask, customizer, stack)\n        )) {\n      result = false;\n      break;\n    }\n  }\n  stack['delete'](array);\n  stack['delete'](other);\n  return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol'),\n    Uint8Array = require('./_Uint8Array'),\n    eq = require('./eq'),\n    equalArrays = require('./_equalArrays'),\n    mapToArray = require('./_mapToArray'),\n    setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n    COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n    dateTag = '[object Date]',\n    errorTag = '[object Error]',\n    mapTag = '[object Map]',\n    numberTag = '[object Number]',\n    regexpTag = '[object RegExp]',\n    setTag = '[object Set]',\n    stringTag = '[object String]',\n    symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n    dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n  switch (tag) {\n    case dataViewTag:\n      if ((object.byteLength != other.byteLength) ||\n          (object.byteOffset != other.byteOffset)) {\n        return false;\n      }\n      object = object.buffer;\n      other = other.buffer;\n\n    case arrayBufferTag:\n      if ((object.byteLength != other.byteLength) ||\n          !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n        return false;\n      }\n      return true;\n\n    case boolTag:\n    case dateTag:\n    case numberTag:\n      // Coerce booleans to `1` or `0` and dates to milliseconds.\n      // Invalid dates are coerced to `NaN`.\n      return eq(+object, +other);\n\n    case errorTag:\n      return object.name == other.name && object.message == other.message;\n\n    case regexpTag:\n    case stringTag:\n      // Coerce regexes to strings and treat strings, primitives and objects,\n      // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n      // for more details.\n      return object == (other + '');\n\n    case mapTag:\n      var convert = mapToArray;\n\n    case setTag:\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n      convert || (convert = setToArray);\n\n      if (object.size != other.size && !isPartial) {\n        return false;\n      }\n      // Assume cyclic values are equal.\n      var stacked = stack.get(object);\n      if (stacked) {\n        return stacked == other;\n      }\n      bitmask |= COMPARE_UNORDERED_FLAG;\n\n      // Recursively compare objects (susceptible to call stack limits).\n      stack.set(object, other);\n      var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n      stack['delete'](object);\n      return result;\n\n    case symbolTag:\n      if (symbolValueOf) {\n        return symbolValueOf.call(object) == symbolValueOf.call(other);\n      }\n  }\n  return false;\n}\n\nmodule.exports = equalByTag;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n      objProps = getAllKeys(object),\n      objLength = objProps.length,\n      othProps = getAllKeys(other),\n      othLength = othProps.length;\n\n  if (objLength != othLength && !isPartial) {\n    return false;\n  }\n  var index = objLength;\n  while (index--) {\n    var key = objProps[index];\n    if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n      return false;\n    }\n  }\n  // Check that cyclic values are equal.\n  var objStacked = stack.get(object);\n  var othStacked = stack.get(other);\n  if (objStacked && othStacked) {\n    return objStacked == other && othStacked == object;\n  }\n  var result = true;\n  stack.set(object, other);\n  stack.set(other, object);\n\n  var skipCtor = isPartial;\n  while (++index < objLength) {\n    key = objProps[index];\n    var objValue = object[key],\n        othValue = other[key];\n\n    if (customizer) {\n      var compared = isPartial\n        ? customizer(othValue, objValue, key, other, object, stack)\n        : customizer(objValue, othValue, key, object, other, stack);\n    }\n    // Recursively compare objects (susceptible to call stack limits).\n    if (!(compared === undefined\n          ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n          : compared\n        )) {\n      result = false;\n      break;\n    }\n    skipCtor || (skipCtor = key == 'constructor');\n  }\n  if (result && !skipCtor) {\n    var objCtor = object.constructor,\n        othCtor = other.constructor;\n\n    // Non `Object` object instances with different constructors are not equal.\n    if (objCtor != othCtor &&\n        ('constructor' in object && 'constructor' in other) &&\n        !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n          typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n      result = false;\n    }\n  }\n  stack['delete'](object);\n  stack['delete'](other);\n  return result;\n}\n\nmodule.exports = equalObjects;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n    getSymbols = require('./_getSymbols'),\n    keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n  return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n  var data = map.__data__;\n  return isKeyable(key)\n    ? data[typeof key == 'string' ? 'string' : 'hash']\n    : data.map;\n}\n\nmodule.exports = getMapData;\n","var isStrictComparable = require('./_isStrictComparable'),\n    keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n  var result = keys(object),\n      length = result.length;\n\n  while (length--) {\n    var key = result[length],\n        value = object[key];\n\n    result[length] = [key, value, isStrictComparable(value)];\n  }\n  return result;\n}\n\nmodule.exports = getMatchData;\n","var baseIsNative = require('./_baseIsNative'),\n    getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n  var value = getValue(object, key);\n  return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n    stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n  if (object == null) {\n    return [];\n  }\n  object = Object(object);\n  return arrayFilter(nativeGetSymbols(object), function(symbol) {\n    return propertyIsEnumerable.call(object, symbol);\n  });\n};\n\nmodule.exports = getSymbols;\n","var DataView = require('./_DataView'),\n    Map = require('./_Map'),\n    Promise = require('./_Promise'),\n    Set = require('./_Set'),\n    WeakMap = require('./_WeakMap'),\n    baseGetTag = require('./_baseGetTag'),\n    toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n    objectTag = '[object Object]',\n    promiseTag = '[object Promise]',\n    setTag = '[object Set]',\n    weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n    mapCtorString = toSource(Map),\n    promiseCtorString = toSource(Promise),\n    setCtorString = toSource(Set),\n    weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n    (Map && getTag(new Map) != mapTag) ||\n    (Promise && getTag(Promise.resolve()) != promiseTag) ||\n    (Set && getTag(new Set) != setTag) ||\n    (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n  getTag = function(value) {\n    var result = baseGetTag(value),\n        Ctor = result == objectTag ? value.constructor : undefined,\n        ctorString = Ctor ? toSource(Ctor) : '';\n\n    if (ctorString) {\n      switch (ctorString) {\n        case dataViewCtorString: return dataViewTag;\n        case mapCtorString: return mapTag;\n        case promiseCtorString: return promiseTag;\n        case setCtorString: return setTag;\n        case weakMapCtorString: return weakMapTag;\n      }\n    }\n    return result;\n  };\n}\n\nmodule.exports = getTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n  return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var castPath = require('./_castPath'),\n    isArguments = require('./isArguments'),\n    isArray = require('./isArray'),\n    isIndex = require('./_isIndex'),\n    isLength = require('./isLength'),\n    toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n  path = castPath(path, object);\n\n  var index = -1,\n      length = path.length,\n      result = false;\n\n  while (++index < length) {\n    var key = toKey(path[index]);\n    if (!(result = object != null && hasFunc(object, key))) {\n      break;\n    }\n    object = object[key];\n  }\n  if (result || ++index != length) {\n    return result;\n  }\n  length = object == null ? 0 : object.length;\n  return !!length && isLength(length) && isIndex(key, length) &&\n    (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n  this.__data__ = nativeCreate ? nativeCreate(null) : {};\n  this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n  var result = this.has(key) && delete this.__data__[key];\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n  var data = this.__data__;\n  if (nativeCreate) {\n    var result = data[key];\n    return result === HASH_UNDEFINED ? undefined : result;\n  }\n  return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n  var data = this.__data__;\n  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n  var data = this.__data__;\n  this.size += this.has(key) ? 0 : 1;\n  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n  return this;\n}\n\nmodule.exports = hashSet;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n  var type = typeof value;\n  length = length == null ? MAX_SAFE_INTEGER : length;\n\n  return !!length &&\n    (type == 'number' ||\n      (type != 'symbol' && reIsUint.test(value))) &&\n        (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var isArray = require('./isArray'),\n    isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n    reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n  if (isArray(value)) {\n    return false;\n  }\n  var type = typeof value;\n  if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n      value == null || isSymbol(value)) {\n    return true;\n  }\n  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n    (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n  var type = typeof value;\n  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n    ? (value !== '__proto__')\n    : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n  return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n  return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n  var Ctor = value && value.constructor,\n      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n  return value === proto;\n}\n\nmodule.exports = isPrototype;\n","var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n *  equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n  return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n  this.__data__ = [];\n  this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    return false;\n  }\n  var lastIndex = data.length - 1;\n  if (index == lastIndex) {\n    data.pop();\n  } else {\n    splice.call(data, index, 1);\n  }\n  --this.size;\n  return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n  return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n  var data = this.__data__,\n      index = assocIndexOf(data, key);\n\n  if (index < 0) {\n    ++this.size;\n    data.push([key, value]);\n  } else {\n    data[index][1] = value;\n  }\n  return this;\n}\n\nmodule.exports = listCacheSet;\n","var Hash = require('./_Hash'),\n    ListCache = require('./_ListCache'),\n    Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n  this.size = 0;\n  this.__data__ = {\n    'hash': new Hash,\n    'map': new (Map || ListCache),\n    'string': new Hash\n  };\n}\n\nmodule.exports = mapCacheClear;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n  var result = getMapData(this, key)['delete'](key);\n  this.size -= result ? 1 : 0;\n  return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n  return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n  return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n  var data = getMapData(this, key),\n      size = data.size;\n\n  data.set(key, value);\n  this.size += data.size == size ? 0 : 1;\n  return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n  var index = -1,\n      result = Array(map.size);\n\n  map.forEach(function(value, key) {\n    result[++index] = [key, value];\n  });\n  return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n  return function(object) {\n    if (object == null) {\n      return false;\n    }\n    return object[key] === srcValue &&\n      (srcValue !== undefined || (key in Object(object)));\n  };\n}\n\nmodule.exports = matchesStrictComparable;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n  var result = memoize(func, function(key) {\n    if (cache.size === MAX_MEMOIZE_SIZE) {\n      cache.clear();\n    }\n    return key;\n  });\n\n  var cache = result.cache;\n  return result;\n}\n\nmodule.exports = memoizeCapped;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n  try {\n    // Use `util.types` for Node.js 10+.\n    var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n    if (types) {\n      return types;\n    }\n\n    // Legacy `process.binding('util')` for Node.js < 10.\n    return freeProcess && freeProcess.binding && freeProcess.binding('util');\n  } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n  return function(arg) {\n    return func(transform(arg));\n  };\n}\n\nmodule.exports = overArg;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n  this.__data__.set(value, HASH_UNDEFINED);\n  return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n  return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n  var index = -1,\n      result = Array(set.size);\n\n  set.forEach(function(value) {\n    result[++index] = value;\n  });\n  return result;\n}\n\nmodule.exports = setToArray;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n  this.__data__ = new ListCache;\n  this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n  var data = this.__data__,\n      result = data['delete'](key);\n\n  this.size = data.size;\n  return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n  return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n  return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n    Map = require('./_Map'),\n    MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n  var data = this.__data__;\n  if (data instanceof ListCache) {\n    var pairs = data.__data__;\n    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n      pairs.push([key, value]);\n      this.size = ++data.size;\n      return this;\n    }\n    data = this.__data__ = new MapCache(pairs);\n  }\n  data.set(key, value);\n  this.size = data.size;\n  return this;\n}\n\nmodule.exports = stackSet;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n  var result = [];\n  if (string.charCodeAt(0) === 46 /* . */) {\n    result.push('');\n  }\n  string.replace(rePropName, function(match, number, quote, subString) {\n    result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n  });\n  return result;\n});\n\nmodule.exports = stringToPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n  if (typeof value == 'string' || isSymbol(value)) {\n    return value;\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n  if (func != null) {\n    try {\n      return funcToString.call(func);\n    } catch (e) {}\n    try {\n      return (func + '');\n    } catch (e) {}\n  }\n  return '';\n}\n\nmodule.exports = toSource;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n  return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n  var result = object == null ? undefined : baseGet(object, path);\n  return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","var baseAssignValue = require('./_baseAssignValue'),\n    createAggregator = require('./_createAggregator');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The order of grouped values\n * is determined by the order they occur in `collection`. The corresponding\n * value of each key is an array of elements responsible for generating the\n * key. The iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': [4.2], '6': [6.1, 6.3] }\n *\n * // The `_.property` iteratee shorthand.\n * _.groupBy(['one', 'two', 'three'], 'length');\n * // => { '3': ['one', 'two'], '5': ['three'] }\n */\nvar groupBy = createAggregator(function(result, value, key) {\n  if (hasOwnProperty.call(result, key)) {\n    result[key].push(value);\n  } else {\n    baseAssignValue(result, key, [value]);\n  }\n});\n\nmodule.exports = groupBy;\n","var baseHasIn = require('./_baseHasIn'),\n    hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n  return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n  return value;\n}\n\nmodule.exports = identity;\n","var baseIsArguments = require('./_baseIsArguments'),\n    isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n *  else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n    !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n    isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n  return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n    stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseGetTag = require('./_baseGetTag'),\n    isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n    funcTag = '[object Function]',\n    genTag = '[object GeneratorFunction]',\n    proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n  if (!isObject(value)) {\n    return false;\n  }\n  // The use of `Object#toString` avoids issues with the `typeof` operator\n  // in Safari 9 which returns 'object' for typed arrays and other constructors.\n  var tag = baseGetTag(value);\n  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n  return typeof value == 'number' &&\n    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n    baseUnary = require('./_baseUnary'),\n    nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n    baseKeys = require('./_baseKeys'),\n    isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n *   this.a = 1;\n *   this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n  if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  var memoized = function() {\n    var args = arguments,\n        key = resolver ? resolver.apply(this, args) : args[0],\n        cache = memoized.cache;\n\n    if (cache.has(key)) {\n      return cache.get(key);\n    }\n    var result = func.apply(this, args);\n    memoized.cache = cache.set(key, result) || cache;\n    return result;\n  };\n  memoized.cache = new (memoize.Cache || MapCache);\n  return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var baseProperty = require('./_baseProperty'),\n    basePropertyDeep = require('./_basePropertyDeep'),\n    isKey = require('./_isKey'),\n    toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n *   { 'a': { 'b': 2 } },\n *   { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n  return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n  return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n  return false;\n}\n\nmodule.exports = stubFalse;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n  return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","\r\n/**\r\n * Represents all of the actions that a user can perform on the calendar.\r\n */\r\nexport class ActionType {\r\n\r\n    /**\r\n     * Update the Mini-Calendar to show the next month of dates.\r\n     * \r\n     * Loads the next month if it's not already loaded.\r\n     */\r\n    static get NextMonth() {\r\n        return \"NextMonth\";\r\n    }\r\n\r\n    /**\r\n     * Update the Mini-Calendar to show the previous month of dates.\r\n     */\r\n    static get PreviousMonth() {\r\n        return \"PreviousMonth\";\r\n    }\r\n\r\n    /**\r\n     * Update the Sticky-Nav's displayed month based on current scroll position.\r\n     */\r\n    static get UpdateScrolledDate() {\r\n        return \"UpdateScrolledDate\";\r\n    }\r\n\r\n    static get SelectedDate() {\r\n        return \"SelectedDate\";\r\n    }\r\n\r\n    /**\r\n     * Set the CurrentDate property in the store\r\n     */\r\n    static get SetDate() {\r\n        return \"SetDate\";\r\n    }\r\n\r\n    static get SetCurrentMonth() {\r\n        return \"SetCurrentMonth\";\r\n    }\r\n\r\n    /**\r\n     * Load more dates (removes the restricted range if one is applied)\r\n     */\r\n    static get LoadMore() {\r\n        return \"LoadMore\";\r\n    }\r\n\r\n    static get SetEventType() {\r\n        return \"SetEventType\";\r\n    }\r\n    static get GoToMonth() {\r\n        return \"GoToMonth\";\r\n    }\r\n    /**\r\n     * Updates the selected options for a filter\r\n     */\r\n    static get UpdateEventFilter() {\r\n        return \"UpdateEventFilter\";\r\n    }\r\n\r\n    /**\r\n     * Updates the selected options for a filter\r\n     */\r\n    static get RemoveEventFilter() {\r\n        return \"RemoveEventFilter\";\r\n    }\r\n\r\n    /**\r\n     * Update the Type Filter with new options\r\n     */\r\n    static get SaveTypeFilterOptions() {\r\n        return \"SaveTypeFilterOptions\";\r\n    }\r\n\r\n    /**\r\n     * Update the Genre Filter with new options\r\n     */\r\n    static get SaveGenreFilterOptions() {\r\n        return \"SaveGenreFilterOptions\";\r\n    }\r\n\r\n    /**\r\n     * Update the Partner Filter with new options\r\n     */\r\n    static get SavePartnerFilterOptions() {\r\n        return \"SavePartnerFilterOptions\";\r\n    }\r\n\r\n    /**\r\n     * Update the Accessibility Filter with new options\r\n     */\r\n    static get SaveVenueFilterOptions() {\r\n        return \"SaveVenueFilterOptions\";\r\n    }\r\n\r\n    /**\r\n     * Update the Discount Filter with new options\r\n     */\r\n    static get SaveAvailabilityFilterOptions() {\r\n        return \"SaveAvailabilityFilterOptions\";\r\n    }\r\n\r\n    /**\r\n     * Open the filters modal\r\n     */\r\n    static get OpenFiltersDialog() {\r\n        return \"OpenFiltersDialog\";\r\n    }\r\n\r\n    /**\r\n     * Close the filters modal\r\n     */\r\n    static get CloseFiltersDialog() {\r\n        return \"CloseFiltersDialog\";\r\n    }\r\n\r\n    /**\r\n     * Open the mini-calendar modal (only works on mobile)\r\n     */\r\n    static get OpenMiniCalDialog() {\r\n        return \"OpenMiniCalDialog\";\r\n    }\r\n\r\n    /**\r\n     * Close the mini-calendar modal (called automatically if the screen resizes to larger than mobile)\r\n     */\r\n    static get CloseMiniCalDialog() {\r\n        return \"CloseMiniCalDialog\";\r\n    }\r\n\r\n    /**\r\n     * Reset all filters' `selectedOptions` properties to []\r\n     */\r\n    static get RemoveAllEventFilters() {\r\n        return \"RemoveAllEventFilters\";\r\n    }\r\n\r\n    /**\r\n     * Save additional API events (after `LoadMore` / `NextMonth` are called)\r\n     */\r\n    static get UpdateGridEvents() {\r\n        return \"UpdateGridEvents\";\r\n    }\r\n    static get UpdateNextMonthEvents() {\r\n        return \"UpdateNextMonthEvents\";\r\n\r\n    }\r\n    static get UpdateEvents() {\r\n        return \"UpdateEvents\";\r\n    }\r\n\r\n    /**\r\n     * Called after `LoadMore` / `NextMonth`, used to check whether additional dates need to be loaded\r\n     */\r\n    static get CheckIfNewMonth() {\r\n        return \"CheckIfNewMonth\";\r\n    }\r\n\r\n    /**\r\n     * Single action to modify the `updating` property based on the new state\r\n     */\r\n    static get CheckIfUpdating() {\r\n        return \"CheckIfUpdating\";\r\n    }\r\n\r\n    /**\r\n     * Updates the calendar settings (NOT CURRENTLY IN USE)\r\n     */\r\n    static get UpdateSettings() {\r\n        return \"UpdateSettings\";\r\n    }\r\n\r\n    /**\r\n     * Update the calendar's text\r\n     */\r\n    static get ReceiveText() {\r\n        return \"ReceiveText\";\r\n    }\r\n\r\n    /**\r\n     * Wait for an image to load, called from the LazyLoad component\r\n     */\r\n    static get WaitForImage() {\r\n        return \"WaitForImage\";\r\n    }\r\n\r\n    /**\r\n     * Mark an image as `loaded` in the store\r\n     */\r\n    static get ImageHasLoaded() {\r\n        return \"ImageHasLoaded\";\r\n    }\r\n\r\n    static get SetToMobile() {\r\n        return \"SetToMobile\";\r\n    }\r\n    static get SetToDesktop() {\r\n        return \"SetToDesktop\";\r\n    }\r\n    static get SetToGrid() {\r\n        return \"SetToGrid\";\r\n    }\r\n    static get SetToList() {\r\n        return \"SetToList\";\r\n    }\r\n}","import { IEvent, IOption, IFilterState } from \"../interfaces\";\r\n\r\n/**\r\n * Defines the stateful behavior of a filter.\r\n */\r\nexport class FilterState<T extends IEvent> implements IFilterState<T> {\r\n    constructor(\r\n        public propertyToFilter: keyof T,\r\n        public multiselect: boolean = false,\r\n        public options: IOption[] = [],\r\n        public selectedOptions: number[] = [],\r\n        public loaded: boolean = false\r\n    ) {\r\n        this.filter = this.filter.bind(this);\r\n    }\r\n\r\n    /**\r\n     * The filter's individual filter function, compatible with Array.prototype.filter()\r\n     * \r\n     * @param event The event to be checked\r\n     */\r\n    public filter(event: T): boolean {\r\n\r\n        // No selected options: event always passes\r\n        if (this.selectedOptions.length === 0) {\r\n            return true;\r\n        }\r\n\r\n        // get the value of the filtered property on this event\r\n        const value = event[this.propertyToFilter];\r\n\r\n\r\n        if (this.multiselect) {\r\n            // different behavior for multiselect (checkboxes)...\r\n            switch (typeof value) {\r\n                // different behavior for arrays..\r\n                case 'object':\r\n                    if ('length' in value) {\r\n                        for (let i = 0; i < (value as any).length; i++) {\r\n                            for (let j = 0; j < this.selectedOptions.length; j++) {\r\n\r\n                                // iterate through all possible options\r\n                                if (value[i].toString() === this.options[this.selectedOptions[j]].value) {\r\n\r\n                                    // if this event's values match a selected option\r\n                                    return true;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                    break;\r\n                // ...and strings\r\n                case 'string':\r\n                    for (let i = 0; i < this.selectedOptions.length; i++) {\r\n                        if (value.toString() === this.options[this.selectedOptions[i]].value) {\r\n\r\n                            // if this event's value matches a selected option\r\n                            return true;\r\n                        }\r\n                    }\r\n                    break;\r\n            }\r\n        } else {\r\n            // ...and single-option (radios)\r\n            switch (typeof value) {\r\n                // different behavior for arrays..\r\n                case 'object':\r\n                    if ('length' in value) {\r\n                        for (let i = 0; i < (value as any).length; i++) {\r\n\r\n                            // iterate through all possible options\r\n                            if (value[i].toString().toLowerCase() === this.options[this.selectedOptions[0]].value.toLowerCase()) {\r\n\r\n                                // if this event's values match the selected option\r\n                                return true;\r\n                            }\r\n                        }\r\n                    }\r\n                    break;\r\n                // ...and strings\r\n                case 'string':\r\n                    // if this event's value matches the selected option\r\n                    return value.toString().toLowerCase() === this.options[this.selectedOptions[0]].value.toLowerCase();\r\n            }\r\n        }\r\n        // undefined behavior, returns false\r\n        return false;\r\n    }\r\n\r\n    /**\r\n     * Update the filter's options (if the date range changes).\r\n     * Preserves state by maintaining already-selected options.\r\n     * \r\n     * @param options additional options loaded from the Calendar API\r\n     */\r\n    public update(options: IOption[]) {\r\n\r\n        // create a collection of references to the previously-selected options\r\n        const oldSelectedOptions = [...this.options.filter((option, index) => this.selectedOptions.some(i => i === index))];\r\n\r\n        // commit the new options to the filter\r\n        this.options = [...options];\r\n        // reset selections\r\n        const selectedOptions: number[] = [];\r\n\r\n        // apply previously-selected options to the new (possibly modified) order\r\n        this.options.forEach((option, index) => {\r\n            if (oldSelectedOptions.some(o => o.value === option.value)) {\r\n                selectedOptions.push(index);\r\n            }\r\n        });\r\n\r\n        // commit the selected options to the filter\r\n        this.commit(selectedOptions);\r\n    }\r\n\r\n    /**\r\n     * Applies a new selection to the state of the filter.\r\n     * \r\n     * @param selection the updated state to commit\r\n     */\r\n    public commit(selection: number[]) {\r\n        this.selectedOptions = [...selection];\r\n    }\r\n}\r\n","import axios from 'axios';\r\nimport moment from 'moment';\r\n\r\nimport memoize = require('lodash/memoize');\r\nimport groupBy = require('lodash/groupBy');\r\nimport chain = require('lodash/chain');\r\n\r\nimport { IEvent, IOption, IMonth, IDay, IProduction } from '../interfaces';\r\nimport { ICalendarFilterRequest } from '../classes/calendar-request';\r\nimport { getDateLocalTime } from './time-zone-helper';\r\nconst weekdays = moment.weekdays().map(dayName => dayName.toLowerCase());\r\n\r\nexport class CalendarApi {\r\n    private static apiDateFormat = \"YYYY-MM-DD\";\r\n    private static aceCalendarAPIRoute = \"ace-api/events\";\r\n    private static filtersSource = axios.CancelToken.source();\r\n\r\n    /**\r\n     * Private method to construct and process Filters API calls\r\n     * @param filter \r\n     * @param startDate \r\n     * @param endDate \r\n     * @param culture \r\n     */\r\n    private static getFiltersApi(filter: string, startDate: string, endDate: string, culture: string): Promise<IOption[]> {\r\n        var requestString: string = '/';\r\n\r\n        if (culture.length > 0)\r\n            requestString += culture + '/';\r\n        requestString = `${requestString}${this.aceCalendarAPIRoute}/filter?name=${filter}&start=${startDate}&end=${endDate}`;\r\n\r\n        return axios.get<IOption[]>(requestString, {\r\n            withCredentials: true\r\n        }).then(response => response.data);\r\n    }\r\n\r\n    /**\r\n     * Call the API to receive a more specific set of filters.\r\n     * @param filter\r\n     * @param culture\r\n     */\r\n    public static getFiltersFor(filter: string, startDate: moment.Moment, endDate: moment.Moment, culture = \"\"): Promise<IOption[]> {\r\n        const startDateFormatted = startDate.format(this.apiDateFormat);\r\n        const endDateFormatted = endDate.format(this.apiDateFormat);\r\n\r\n        return this.getFiltersApi(filter, startDateFormatted, endDateFormatted, culture);\r\n    }\r\n\r\n    private static getFirstOccurenceForFilterApi(currentFilters: Map<string, string>, endDate: string, culture: string): Promise<string> {\r\n        const startDate = moment().startOf(\"month\").format(this.apiDateFormat);\r\n\r\n        var requestString: string = '/';\r\n\r\n        if (culture.length > 0) {\r\n            requestString += culture + '/';\r\n        }\r\n\r\n        requestString = `${requestString}${this.aceCalendarAPIRoute}/firstOccurrence`;\r\n\r\n        //var calendarFilters = [];\r\n        //(Array.from(currentFilters)).forEach((val, key) => {\r\n        //    calendarFilters.push({ filterName: key, filterValue: val });\r\n        //});\r\n\r\n        const calendarFilters = (Object as any).entries(currentFilters)\r\n            .map(arr => { return { filterName: arr[0], filterValue: arr[1] } })\r\n\r\n        const filterRequest: ICalendarFilterRequest = {\r\n            startDate: startDate,\r\n            endDate: endDate,\r\n            calendarFilters: calendarFilters\r\n\r\n        }\r\n        return axios.post(requestString,\r\n            filterRequest,\r\n            {\r\n                method: \"POST\",\r\n                withCredentials: true,\r\n                cancelToken: this.filtersSource.token\r\n            }\r\n        ).then(response => response.data);\r\n    }\r\n\r\n    /**\r\n    * Call the API to receive a more specific set of filters.\r\n    * @param filter\r\n    * @param culture\r\n    */\r\n    public static getFirstOccurenceForFilters(filters: Map<string, string>, endDate: moment.Moment, culture = \"\"): Promise<string> {\r\n        const endDateFormatted = endDate.format(this.apiDateFormat);\r\n\r\n        return this.getFirstOccurenceForFilterApi(filters, endDateFormatted, culture);\r\n\r\n        // This is the memoized variant. Since the request is cancelable, memoize would need to be tweaked to be properly utilized.\r\n        //return this.filtersCache(filter, culture);\r\n    }\r\n\r\n    public static getMonth(month: string, filterFunction: (event) => boolean): Promise<IMonth<IEvent>> {\r\n\r\n        const monthMoment = moment(month).startOf('month');\r\n\r\n        return this.getMonthEventsCache(monthMoment.format(this.apiDateFormat)).then(monthEvents => {\r\n\r\n            // convert response into IMonth<IEvent> object\r\n            //const filteredEvents = monthEvents.filter(filterFunction);\r\n            return {\r\n                monthMoment,\r\n                events: {\r\n                    days: this.getDatesFromApiResponse(monthEvents, monthMoment),\r\n                    productions: this.getProductionsFromApiResponse(monthEvents, monthMoment),\r\n                    allDays: []\r\n                }\r\n            };\r\n        })\r\n    }\r\n\r\n    public static getMonthEventsCache = memoize(CalendarApi.getMonthEvents,\r\n        (month: string) => `${month}`);\r\n\r\n    /**\r\n     * Load events for a specific month.\r\n     * @param month\r\n     */\r\n    private static getMonthEvents(month: string): Promise<Array<any>> {\r\n        var requestString: string = '/';\r\n\r\n        const monthMoment = moment(month).startOf('month');\r\n        const endDate = monthMoment.clone().add(1, 'month');\r\n\r\n        requestString = requestString + this.aceCalendarAPIRoute + \"?startDate=\" + monthMoment.format(this.apiDateFormat) + \"&endDate=\" + endDate.format(this.apiDateFormat);\r\n\r\n        // GET events\r\n        return axios.get<IEvent[]>(requestString, {\r\n            withCredentials: true\r\n        }).then(response => {\r\n\r\n            return response.data;\r\n        });\r\n    }\r\n\r\n    private static getDatesFromApiResponse(apiEvents: IEvent[], monthMoment: moment.Moment): IDay<IEvent>[] {\r\n        // clean data\r\n        apiEvents.forEach(event => {\r\n            event.eventDate = new Date(event.eventDate);\r\n        });\r\n        const now = moment();\r\n        // filter and sort\r\n        apiEvents = apiEvents.filter(evt =>\r\n            moment(evt.eventDate as Date).isSameOrAfter(monthMoment)\r\n            && moment(evt.eventDate as Date).isSameOrAfter(now));\r\n        apiEvents = apiEvents.sort((e1, e2) => (e1.eventDate as any) - (e2.eventDate as any)) as IEvent[];\r\n\r\n        // format dates\r\n        const datesInMonth = (() => {\r\n           \r\n\r\n         \r\n            const dates: number[] = [];\r\n            const daysInMonth = monthMoment.daysInMonth();\r\n            for (let i = 1; i <= daysInMonth; i++) {\r\n                dates.push(i);\r\n            }\r\n            return dates;\r\n        })();\r\n\r\n        // compile into array of IDay<IEvent> objects\r\n        const days: IDay<IEvent>[] = datesInMonth.map(day => {\r\n            const date = monthMoment.toDate();\r\n            date.setDate(day);\r\n            const events = apiEvents.filter(event => getDateLocalTime(event.eventDate) === day);\r\n            return {\r\n                date,\r\n                events\r\n            };\r\n        });\r\n        const datesBefore: number[] = [];\r\n        const firstIndex = weekdays.indexOf(monthMoment.format('dddd').toLowerCase());\r\n        let day = monthMoment.clone().add(-firstIndex, 'days');\r\n        for (let i = 0; i < firstIndex; i++) {\r\n            const date = day.clone().add(i, 'd');\r\n            datesBefore.push(date.date());\r\n        }\r\n        const daysFromLastMonthInSameWeek: IDay<IEvent>[] = datesBefore.map(day => {\r\n            const date = monthMoment.clone().add(-1,'M').toDate();\r\n            date.setDate(day);\r\n            const events = [];\r\n            return {\r\n                date,\r\n                events\r\n            };\r\n        });\r\n        let result = daysFromLastMonthInSameWeek.concat(days);\r\n    \r\n        return result;\r\n    }\r\n\r\n    private static getProductionsFromApiResponse(apiEvents: IEvent[], monthMoment: moment.Moment): IProduction<IEvent>[] {\r\n        // clean data\r\n        apiEvents.forEach(event => {\r\n            event.eventDate = new Date(event.eventDate);\r\n        });\r\n        const now = moment();\r\n        // filter and sort\r\n        apiEvents = apiEvents.filter(evt =>\r\n            moment(evt.eventDate as Date).isSameOrAfter(monthMoment)\r\n            && moment(evt.eventDate as Date).isSameOrAfter(now));\r\n        apiEvents = apiEvents.sort((e1, e2) => (e1.eventDate as any) - (e2.eventDate as any)) as IEvent[];\r\n\r\n        var productionGrouped = groupBy(apiEvents, (evt) => {\r\n            return evt.productionSeasonId;\r\n        });\r\n\r\n        // compile into array of IProduction<IEvent> objects\r\n        let productions: IProduction<IEvent>[] = [];\r\n        for (var key in productionGrouped) {\r\n            if (productionGrouped.hasOwnProperty(key)) {\r\n                var prodEvents = productionGrouped[key];\r\n                var production: IProduction<IEvent> = {\r\n                    ...prodEvents[0],\r\n                    id: prodEvents[0].productionSeasonId.toString(),\r\n                    conductor: prodEvents[0].composerInfo,\r\n                    priceInfo: prodEvents[0].priceInfo,\r\n                    firstPerformanceDate: prodEvents[0].productionStartDateString,\r\n                    lastPerformanceDate: prodEvents[0].productionEndDateString,\r\n                    events: prodEvents,\r\n                    eventType: prodEvents[0].eventType\r\n                };\r\n\r\n                productions.push(\r\n                    production\r\n                );\r\n            }\r\n        }\r\n\r\n        return productions;\r\n    }\r\n}","const localTimeZone = 'America/Los_Angeles'; //standardized TZ name for eastern US time\r\n\r\n//Get the day standardized to Eastern US time (UTC -4)\r\nexport function getDateLocalTime(date: Date): number {\r\n    let shiftedDateString = date.toLocaleString('en-US', { timeZone: localTimeZone });\r\n    let shiftedDate = new Date(shiftedDateString);\r\n\r\n    return shiftedDate.getDate();\r\n}\r\n","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { connect, Dispatch } from 'react-redux';\r\n\r\nimport ModalHelper from './modal-helper';\r\nimport PromoCodeHelper from './promo-code-helper';\r\nimport { ICalendarAppState } from '../redux-state';\r\nimport { openFiltersDialog, removeAllEventFilters, openMiniCalDialog } from '../redux-state/actions/calendar.actions';\r\nimport { IEvent } from '../interfaces';\r\nimport Responsive from './responsive';\r\n\r\nimport CalendarText from '../contexts/calendar-text';\r\nimport StickyNav from './navigation/sticky-nav';\r\nimport MiniCalendarContainer from './mini-calendar/container';\r\nimport ListContainer from './list/container';\r\nimport ScrollToTop from './navigation/scroll-to-top';\r\nimport Loader from './loader';\r\nimport { ICalendarFilterState } from '../redux-state/interfaces/calendar-filter.state';\r\nimport { CalendarAppText } from '../redux-state/interfaces/calendar-app-text.state';\r\n\r\nimport CalendarViewToggle from './calendar-view-toggle'\r\nimport CalendarContainer from './calendar-container'\r\nimport CalendarEventToggleBase from './calendar-event-toggle ';\r\nimport  MonthSelectionDropdownBase  from './month-selection/dropdown';\r\ninterface AppExternalProps {\r\n\r\n}\r\n\r\ninterface StateToProps {\r\n    text: CalendarAppText;\r\n    filterState: ICalendarFilterState<IEvent>;\r\n    currentDate: moment.Moment;\r\n    startDate: moment.Moment;\r\n    endDate: moment.Moment;\r\n}\r\n\r\ninterface DispatchToProps {\r\n    openFiltersDialog: (trigger: HTMLButtonElement) => void;\r\n    openMiniCalDialog: (trigger: HTMLButtonElement) => void;\r\n    clearAllFilters: () => void;\r\n}\r\n\r\nexport type AppProps = AppExternalProps & StateToProps & DispatchToProps;\r\n\r\n/**\r\n * Wrapper for the entire Calendar app.\r\n *\r\n * Provides CalendarText context, and\r\n */\r\nexport class AppComponent extends React.Component<AppProps> {\r\n    constructor(props: AppProps) {\r\n        super(props);\r\n    }\r\n\r\n    render() {\r\n\r\n        // count the number of active filter conditions\r\n        const activeFilters =\r\n            this.props.filterState.venueFilter.selectedOptions.length +\r\n            this.props.filterState.availabilityFilter.selectedOptions.length +\r\n            this.props.filterState.genreFilter.selectedOptions.length;\r\n\r\n        return (\r\n            <CalendarText.Provider value={this.props.text}>\r\n\r\n                <section className=\"ace-cal ace-page-gray\">\r\n                  \r\n                    <StickyNav />\r\n                    <CalendarEventToggleBase />\r\n                    <div className=\"ace-cal-main\">\r\n                        <section className=\"grid-container ace-cal-results\">\r\n                            \r\n                            <Loader />\r\n                        </section>\r\n                    </div>\r\n                    <div aria-live=\"polite\">\r\n                        <Responsive />\r\n                        <CalendarContainer />\r\n                    </div>\r\n                    <ScrollToTop />\r\n                </section>\r\n                <ModalHelper />\r\n                <PromoCodeHelper />\r\n            </CalendarText.Provider>\r\n        );\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState, ownProps: AppExternalProps): StateToProps {\r\n    return {\r\n        text: state.calendarText,\r\n        filterState: {\r\n            ...state.calendar\r\n        } as ICalendarFilterState<IEvent>,\r\n        currentDate: state.calendar.currentDate,\r\n        startDate: state.calendar.startDate,\r\n        endDate: state.calendar.endDate\r\n    }\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch: Dispatch): DispatchToProps {\r\n    return {\r\n        openFiltersDialog: (trigger: HTMLButtonElement) => { dispatch(openFiltersDialog(trigger)); },\r\n        clearAllFilters: () => { dispatch(removeAllEventFilters()); },\r\n        openMiniCalDialog: (trigger: HTMLButtonElement) => { dispatch(openMiniCalDialog(trigger)); }\r\n    }\r\n}\r\n\r\nexport default connect<StateToProps, DispatchToProps>(mapStateToProps, mapDispatchToProps)(AppComponent);\r\n","import * as React from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { ICalendarState, IMonth, } from '../classes/calendar';\r\nimport { connect } from 'react-redux';\r\n\r\nimport { ICalendarAppState } from '../redux-state';\r\nimport { CalendarDeviceMode, CalendarViewMode } from '../redux-state/interfaces/calendar-settings';\r\nimport CalendarContainerView from './calendar-container.view';\r\n\r\ninterface ICalendarContainerExternalProps {\r\n\r\n}\r\n\r\ninterface StateToProps {\r\n    calendarViewMode: CalendarViewMode;\r\n    calendarDeviceMode: CalendarDeviceMode;\r\n    isLoading: boolean;\r\n}\r\n\r\nexport type CalendarContainerProps = ICalendarContainerExternalProps & StateToProps;\r\n\r\nexport class CalendarContainerBase extends React.Component<CalendarContainerProps, any> {\r\n\r\n    componentDidUpdate(prevProps: CalendarContainerProps) {\r\n        const superParent = document.documentElement;\r\n\r\n        if (this.props.isLoading) {\r\n            // attribute removal happens in the views of the components that trigger loading states.\r\n            // removal should happen after all other callback functionality.\r\n            superParent.setAttribute(\"data-calendar-loading\", \"true\");\r\n        }\r\n    }\r\n\r\n    render() {\r\n        return (\r\n            <CalendarContainerView {...this.props} />\r\n        )\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState, ownProps: ICalendarContainerExternalProps): StateToProps {\r\n    return {\r\n        calendarViewMode: state.calendarSettings.calendarViewMode,\r\n        calendarDeviceMode: state.calendarSettings.calendarDeviceMode,\r\n        isLoading: state.calendar.updating\r\n    }\r\n}\r\n\r\nexport default connect<StateToProps>(mapStateToProps)(CalendarContainerBase);","import * as React from 'react';\r\nimport { CalendarViewMode } from '../redux-state/interfaces/calendar-settings';\r\nimport { CalendarContainerProps } from './calendar-container';\r\nimport LoaderView from './loader';\r\nimport ListMonthContainer from './list/container';\r\nimport GridMonthContainer from './grid/container';\r\nimport MiniCalendarContainer from './mini-calendar/container';\r\nimport Responsive from './responsive/index'\r\nconst CalendarContainerView: React.StatelessComponent<CalendarContainerProps> = props => {\r\n    let component: JSX.Element = null;\r\n\r\n    if (props.calendarViewMode === CalendarViewMode.LIST) {\r\n        component = <div className=\"ace-cal-main block-inner\">\r\n            <section className=\"grid-container ace-cal-results \">\r\n                <MiniCalendarContainer />\r\n                <ListMonthContainer />\r\n                <LoaderView />\r\n            </section>\r\n        </div>\r\n    } else {\r\n        component = <GridMonthContainer />;\r\n    }\r\n     \r\n    return (\r\n        <>\r\n            <LoaderView />\r\n            {component}\r\n        </>\r\n    )\r\n}\r\n\r\nexport default CalendarContainerView;","import * as React from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { ICalendarState, IEventFilter } from '../classes/calendar';\r\nimport { connect } from 'react-redux';\r\nimport { ICalendarAppState } from '../redux-state';\r\nimport { ICalendarAppText } from '../redux-state/interfaces/text/calendar-app.text';\r\nimport { CalendarDeviceMode, CalendarViewMode } from '../redux-state/interfaces/calendar-settings';\r\nimport { setToGrid, setToList } from '../redux-state/actions/calendar-settings.actions';\r\nimport CalendarEventToggleView from './calendar-event-toggle.view';\r\nimport { CalendarApi } from '../common/calendar-api';\r\nimport { IEvent, IOption } from '../interfaces';\r\nimport { removeEventFilter, setCurrentMonth, setEventType, upsertEventFilter } from '../redux-state/actions/calendar.actions';\r\nimport { generateEventFilter } from '../helpers/filter-by-query';\r\nimport { getMonthElement, removeLoader, scrollToMonth } from '../helpers/scroll-to-month';\r\nimport { uniq } from 'lodash';\r\nimport { IMonth } from '../interfaces/month';\r\n\r\ninterface ICalendarEventTogglePropsExternalProps {\r\n\r\n}\r\n\r\ninterface StateToProps {\r\n    text: ICalendarAppText;\r\n    selectedEventType: string;\r\n    startDate: moment.Moment;\r\n    endDate: moment.Moment;\r\n    /**\r\n     * The furthermost month that has been loaded onto the calendar.\r\n     */\r\n    lastLoadedMonth: moment.Moment;\r\n    /**\r\n     * The last month that can be loaded onto the calendar.\r\n     */\r\n    lastMonthToLoad: moment.Moment;\r\n    currentFilters: Map<string, string>;\r\n    eventMonths: IMonth<IEvent>[];\r\n    isUpdating: boolean;\r\n}\r\n\r\ninterface DispatchToProps {\r\n    selectFilterType: (eventType: string) => void;\r\n    getFirstOccurenceDateForFilters: (filters: any, lastMonthToLoad: moment.Moment, lastLoadedMonth: moment.Moment) => void;\r\n\r\n}\r\n\r\ninterface EventFilterState {\r\n    fromApi: boolean;\r\n    waitingForApi: boolean;\r\n    options: IOption[];\r\n}\r\n\r\nexport type CalendarEventToggleProps = ICalendarEventTogglePropsExternalProps  & StateToProps & DispatchToProps;\r\nexport type CalendarEventToggleViewProps = CalendarEventToggleProps & EventFilterState;\r\nexport class CalendarEventToggleBase extends React.Component<CalendarEventToggleProps, EventFilterState> {\r\n    constructor(props: CalendarEventToggleProps) {\r\n        super(props);\r\n\r\n        this.state = {\r\n            fromApi: false,\r\n            waitingForApi: true,\r\n            options: []\r\n        };\r\n    }\r\n\r\n    componentDidMount() {\r\n        CalendarApi.getFiltersFor(\"eventType\", this.props.startDate, this.props.endDate).then(response => {\r\n            this.setState({\r\n                fromApi: true,\r\n                waitingForApi: false,\r\n                options: response\r\n            });\r\n        }).catch(err => {\r\n            console.error(err);\r\n        });\r\n    }\r\n\r\n    componentDidUpdate(prevProps: CalendarEventToggleProps, prevState: EventFilterState) {\r\n        if ((prevProps.currentFilters.has(\"eventType\") || this.props.currentFilters.has(\"eventType\")) && prevProps.currentFilters.get(\"eventType\") !== this.props.currentFilters.get(\"eventType\") && this.props) {\r\n            setTimeout(() => removeLoader(), 1000);\r\n        }\r\n        if (!this.state.fromApi && !this.state.waitingForApi && !prevProps.lastLoadedMonth.isSame(this.props.lastLoadedMonth)) {\r\n            this.setState({\r\n                options: this.calculateOptions(this.props)\r\n            });\r\n        }\r\n    }\r\n\r\n\r\n    private calculateOptions(props: CalendarEventToggleProps): IOption[] {\r\n        // flatten events twice because month -> day -> events\r\n        var propertyToFilter = \"eventType\";\r\n        const events = ([] as IEvent[]).concat(...props.eventMonths.map(month => ([] as IEvent[]).concat(...month.events.days.map(day => day.events))));\r\n\r\n        if (events.length > 0) {\r\n            if (Array.isArray(events[0][\"eventType\"])) {\r\n                // These are all casted as any because it's not specifically known what kind of objects this is expected to support.\r\n                const allOptions = uniq(([] as any[]).concat(...events.map(event => (event[propertyToFilter] as any[]))));\r\n\r\n                return allOptions.map(option => {\r\n                    return {\r\n                        text: option.toString(),\r\n                        value: option.toString(),\r\n                        firstOccurance: \"\"\r\n                    }\r\n                });\r\n            }\r\n            else {\r\n                const mappedProperty = uniq(events.map(event => event[propertyToFilter]));\r\n\r\n                return mappedProperty.map(eventProperty => {\r\n                    return {\r\n                        text: eventProperty.toString(),\r\n                        value: eventProperty.toString(),\r\n                        firstOccurance: \"\"\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        // If empty\r\n        return [];\r\n    }\r\n\r\n    render() {\r\n        return (\r\n            <>\r\n                <CalendarEventToggleView {...this.props} {...this.state} />\r\n            </>\r\n        )\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState, ownProps: ICalendarEventTogglePropsExternalProps): StateToProps {\r\n    var updatedEventList = state.calendarText.eventFilterDefault.split(\",\").concat(state.calendar.availableEventTypes);\r\n    const startDate = moment(state.calendar.loadedMonths[0]).startOf('day');\r\n    const endDate = moment(state.calendarSettings.monthsOnCalendar[state.calendarSettings.monthsOnCalendar.length - 1]).endOf('month');\r\n\r\n\r\n    var selectedEventType = \"\";\r\n    if (state.calendar.eventFilter && state.calendar.eventFilter.length > 0 && state.calendar.eventFilter.filter(ef => ef.key == \"eventType\").length > 0) {\r\n        selectedEventType = state.calendar.eventFilter.filter(ef => ef.key == \"eventType\")[0].selectedValue; \r\n    }\r\n    return {\r\n        text: state.calendarText,\r\n        lastLoadedMonth: state.calendar.endDate,\r\n        lastMonthToLoad: state.calendarSettings.monthsOnCalendar[state.calendarSettings.monthsOnCalendar.length - 1],\r\n        selectedEventType: selectedEventType,\r\n        eventMonths: state.calendar.events,\r\n        currentFilters: new Map(state.calendar.eventFilter.map(filter => [filter.key, filter.selectedValue]) as any),\r\n        isUpdating: state.calendar.updating,\r\n        startDate, endDate\r\n    }\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch): DispatchToProps {\r\n    return {\r\n        selectFilterType: (selectedValue: string) => {\r\n            // If the selected value is null or empty string, remove that filter.\r\n            if (!selectedValue || selectedValue === \"\") {\r\n                dispatch(removeEventFilter(\"eventType\"));\r\n                setTimeout(() => removeLoader(), 500);\r\n            } else {\r\n\r\n                const filter: IEventFilter = {\r\n                    key: \"eventType\",\r\n                    selectedValue: selectedValue,\r\n                    filter: generateEventFilter(\"eventType\", selectedValue)\r\n                }\r\n                dispatch(upsertEventFilter(filter, false));\r\n                //setTimeout(() => removeLoader(), 500);\r\n            }\r\n        },\r\n        getFirstOccurenceDateForFilters: (filters, lastMonthToLoad, lastLoadedMonth) => {\r\n            CalendarApi.getFirstOccurenceForFilters(filters, lastMonthToLoad).then(firstOccuranceDate => {\r\n\r\n                // If a month is \r\n                if (firstOccuranceDate != null) {\r\n                    const toMonth = moment(firstOccuranceDate);\r\n\r\n                    // Only change months if it's in the future.\r\n                   \r\n                        dispatch(setCurrentMonth(toMonth))\r\n                    \r\n\r\n\r\n                    const monthElement = getMonthElement(toMonth);\r\n\r\n\r\n                    // If the month has already loaded, apply filter and remove the loader.\r\n                    // We need a timeout because even though the data is cached, a Promise object is created.\r\n                 \r\n                    var scrollInterval = setInterval(() => {\r\n\r\n                        \r\n\r\n                        if (monthElement) {\r\n                            removeLoader();\r\n                            if (scrollToMonth(toMonth)) {\r\n                                clearInterval(scrollInterval);\r\n                            }\r\n                        }\r\n                    }, 500);\r\n\r\n                } else {\r\n                    // If the month has already loaded, apply filter and remove the loader.\r\n                    // We need a timeout because even though the data is cached, a Promise object is created.\r\n                    setTimeout(() => removeLoader(), 500);\r\n                }\r\n            }).catch(err => {\r\n                console.error(err);\r\n            });\r\n        }\r\n    }\r\n}\r\n\r\nexport default connect<StateToProps, DispatchToProps>(mapStateToProps, mapDispatchToProps)(CalendarEventToggleBase);","import * as React from 'react';\r\nimport { CalendarViewMode } from '../redux-state/interfaces/calendar-settings';\r\nimport { CalendarEventToggleProps, CalendarEventToggleViewProps } from './calendar-event-toggle ';\r\n\r\n\r\nconst CalendarEventToggleView: React.StatelessComponent<CalendarEventToggleViewProps> = props => {\r\n\r\n\r\n    function onChange(value: string) {\r\n        var updatedFilters = props.currentFilters.set(\"eventType\", value);\r\n\r\n        var name = \"\";\r\n        if (updatedFilters.get('name')) {\r\n            name = updatedFilters.get('name');\r\n        }\r\n\r\n        var location = \"\";\r\n        if (updatedFilters.get('location')) {\r\n            location = updatedFilters.get('location');\r\n        }\r\n\r\n        var category = \"\";\r\n        if (updatedFilters.get('categories')) {\r\n            category = updatedFilters.get('categories');\r\n        }\r\n\r\n        let filters = {};\r\n\r\n        updatedFilters.forEach(function (value, key) {\r\n            filters[key] = value\r\n        });\r\n\r\n        props.getFirstOccurenceDateForFilters(filters, props.lastMonthToLoad, props.lastLoadedMonth);\r\n        props.selectFilterType(value);\r\n    }\r\n    function getEventValue(index: number, value: string): string {\r\n        if (index != 0)\r\n            return value;\r\n        return \"\";\r\n    }\r\n\r\n    function disableEventButton(index: number, selectedEventType: string, value: string): boolean {\r\n        if (index == 0 && (!selectedEventType || selectedEventType === \"\"))\r\n            return true;\r\n        if (selectedEventType === value)\r\n            return true;\r\n        return false;\r\n    }\r\n    return (\r\n        <div className=\"block-inner ace-cal-event-nav\">\r\n            <div className=\"ace-cal-toggles ace-cal-subnav-item\">\r\n                {\r\n                    props.options.length > 0 ?\r\n                        props.options.map((li, index) => <button className=\"btn-pill-checkmark ace-cal-filters-pill\" type=\"button\" disabled={disableEventButton(index, props.selectedEventType, li.value)} onClick={() => props.selectFilterType(getEventValue(index, li.value))}>{li.text}</button>)\r\n                        : null\r\n                }\r\n\r\n            </div>\r\n        </div>\r\n    );\r\n}\r\n\r\nexport default CalendarEventToggleView;","import * as React from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { ICalendarState, IMonth } from '../classes/calendar';\r\n\r\nimport { connect } from 'react-redux';\r\n\r\nimport { ICalendarAppState } from '../redux-state';\r\n\r\nimport { scrollToMonth } from '../../calendar/helpers/scroll-to-month';\r\nimport { ICalendarAppText } from '../redux-state/interfaces/text/calendar-app.text';\r\nimport { CalendarDeviceMode, CalendarViewMode } from '../redux-state/interfaces/calendar-settings';\r\nimport { setToGrid, setToList } from '../redux-state/actions/calendar-settings.actions';\r\nimport CalendarModeToggleView from './calendar-view-toggle.view';\r\n\r\ninterface ICalendarViewTogglePropsExternalProps {\r\n\r\n}\r\n\r\ninterface StateToProps {\r\n    text: ICalendarAppText\r\n    calendarMode: CalendarViewMode;\r\n    calendarDeviceMode: CalendarDeviceMode;\r\n    currentDate: moment.Moment;\r\n    startMonth: moment.Moment;\r\n}\r\n\r\ninterface DispatchToProps {\r\n    setToGrid: (currentDate?: moment.Moment, startDate?: moment.Moment) => void;\r\n    setToList: (currentDate?: moment.Moment, startDate?: moment.Moment) => void;\r\n}\r\n\r\nexport type CalendarViewToggleProps = ICalendarViewTogglePropsExternalProps & StateToProps & DispatchToProps;\r\n\r\nexport class CalendarViewToggleBase extends React.Component<CalendarViewToggleProps, any> {\r\n    render() {\r\n        return (\r\n            <>\r\n                {\r\n                    this.props.calendarDeviceMode === CalendarDeviceMode.DESKTOP ? <CalendarModeToggleView {...this.props} /> : null\r\n                }\r\n            </>\r\n        )\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState, ownProps: ICalendarViewTogglePropsExternalProps): StateToProps {\r\n    return {\r\n        text: state.calendarText,\r\n        calendarMode: state.calendarSettings.calendarViewMode,\r\n        calendarDeviceMode: state.calendarSettings.calendarDeviceMode,\r\n        currentDate: state.calendar.currentDate,\r\n        startMonth: state.calendar.startDate\r\n    }\r\n}\r\n\r\nfunction jumpToMonth(currentDate: moment.Moment, startDate: moment.Moment) {\r\n    // Don't scroll if loaded month and the start month of Calendar are same\r\n    if (currentDate.month() != startDate.month()) {\r\n        let updateMonth = window.setInterval(() => {\r\n            if (scrollToMonth(currentDate))\r\n                window.clearInterval(updateMonth);\r\n        }, 500);\r\n    }\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch): DispatchToProps {\r\n    return {\r\n        setToGrid: (currentDate?: moment.Moment, startDate?: moment.Moment) => {\r\n            dispatch(setToGrid())\r\n            if (currentDate != undefined)\r\n                jumpToMonth(currentDate, startDate)\r\n        },\r\n        setToList: (currentDate?: moment.Moment, startDate?: moment.Moment) => {\r\n            dispatch(setToList())\r\n            if (currentDate != undefined)\r\n                jumpToMonth(currentDate, startDate)\r\n        }\r\n    }\r\n}\r\n\r\nexport default connect<StateToProps, DispatchToProps>(mapStateToProps, mapDispatchToProps)(CalendarViewToggleBase);","import * as React from 'react';\r\nimport { CalendarViewMode } from '../redux-state/interfaces/calendar-settings';\r\nimport { CalendarViewToggleProps } from './calendar-view-toggle';\r\n\r\n\r\nconst CalendarModeToggleView: React.StatelessComponent<CalendarViewToggleProps> = props => {\r\n    return (\r\n        <div className=\"ace-cal-toggles ace-cal-subnav-item\">\r\n            <button type=\"button\" className=\"btn-pill ace-cal-filters-pill ace-cal-filters-toggle\" disabled={props.calendarMode === CalendarViewMode.GRID} onClick={() => props.setToGrid(props.currentDate, props.startMonth)}>\r\n                <svg className=\"svg-icon\" aria-hidden=\"true\" focusable=\"false\">\r\n                    <use xmlnsXlink=\"http://www.w3.org/1999/xlink\" xlinkHref={`#icon-grid-view`} />\r\n                </svg>\r\n                {props.text.gridViewModeButtonText}\r\n            </button>\r\n            <button type=\"button\" className=\"btn-pill ace-cal-filters-pill  ace-cal-filters-toggle\" disabled={props.calendarMode === CalendarViewMode.LIST} onClick={() => props.setToList(props.currentDate, props.startMonth)}>\r\n                <svg className=\"svg-icon\" aria-hidden=\"true\" focusable=\"false\">\r\n                    <use xmlnsXlink=\"http://www.w3.org/1999/xlink\" xlinkHref={`#icon-list-view`} />\r\n                </svg>\r\n                {props.text.listViewModeButtonText}\r\n            </button>\r\n        </div>\r\n    );\r\n}\r\n\r\nexport default CalendarModeToggleView;","import * as React from 'react';\r\nimport { debounce } from 'lodash';\r\n\r\nimport FiltersContainerView from './filters-container.view';\r\n\r\nimport { openFiltersDialog, closeFiltersDialog } from '../../redux-state/actions/calendar.actions';\r\n\r\nimport { ICalendarAppState } from '../../redux-state';\r\nimport { connect, Dispatch } from 'react-redux';\r\nimport { findDOMNode } from 'react-dom';\r\n\r\nimport A11yDialog = require('a11y-dialog');\r\n\r\ninterface StateToProps {\r\n    desktopToMobileTransitionWidth: number;\r\n    filtersDialogOpen: boolean;\r\n}\r\n\r\n/**\r\n * Dispatch methods coming from Redux\r\n */\r\ninterface DispatchToProps {\r\n    openFilterDialog: (trigger: HTMLButtonElement) => void;\r\n    closeFiltersDialog: () => void;\r\n}\r\n\r\ninterface ModalControlMethods {\r\n    showModal: () => void;\r\n    hideModal: () => void;\r\n}\r\n\r\ninterface FiltersContainerViewExternalProps {\r\n    isModal: boolean;\r\n}\r\n\r\n/**\r\n * Filter internal state\r\n */\r\nexport interface FilterState {\r\n    useModal: boolean;\r\n}\r\n\r\nexport interface IFilterContainer {\r\n    isMobile?: true;\r\n}\r\n\r\n\r\nexport type FiltersContainerProps = IFilterContainer & StateToProps & DispatchToProps;\r\nexport type FiltersContainerViewProps = FiltersContainerProps & FiltersContainerViewExternalProps & ModalControlMethods;\r\n\r\nexport class FiltersContainerBase extends React.Component<FiltersContainerProps, FilterState> implements ModalControlMethods {\r\n    private dialog;\r\n\r\n    constructor(props: FiltersContainerProps) {\r\n        super(props);\r\n        this.state = { useModal: false }\r\n    }\r\n\r\n    initializeModal() {\r\n\r\n        if (this.dialog) {\r\n            this.dialog.create();\r\n        } else {\r\n            const element = findDOMNode(this);\r\n            this.dialog = new A11yDialog(element);\r\n        }\r\n    }\r\n\r\n    destroyModal() {\r\n        if (this.dialog) {\r\n            // Hide the dialog, then unbind all listeners and finally set to null.\r\n            this.dialog.destroy();\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Shift filters in and out of modal based on screen size\r\n     */\r\n    componentDidMount() {\r\n        this.handleResize(this.props);\r\n        window.addEventListener('resize', debounce(()=>this.handleResize(this.props), 50));\r\n    }\r\n    handleResize(props: FiltersContainerProps) {\r\n        const useModal = this.props.desktopToMobileTransitionWidth >= window.innerWidth;\r\n        if (useModal != this.state.useModal) {\r\n            this.setState({\r\n                useModal\r\n            });\r\n        }\r\n        if (this.props.filtersDialogOpen && !useModal) {\r\n            this.props.closeFiltersDialog();\r\n        }\r\n    }\r\n\r\n    componentDidUpdate(prevProps: FiltersContainerProps) {\r\n        this.handleResize(prevProps);\r\n    }\r\n\r\n    componentWillUnmount() {\r\n        this.destroyModal();\r\n    }\r\n\r\n    showModal() {\r\n        if (this.dialog) {\r\n            this.dialog.show();\r\n        }\r\n    }\r\n\r\n    hideModal() {\r\n        if (this.dialog) {\r\n            this.dialog.hide();\r\n        }\r\n    }\r\n\r\n    render() {\r\n        return <FiltersContainerView {...this.props} isModal={this.state.useModal} showModal={this.showModal.bind(this)} hideModal={this.hideModal.bind(this)} />;\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState): StateToProps {\r\n    return {\r\n        filtersDialogOpen: state.calendar.filtersDialogOpen,\r\n        desktopToMobileTransitionWidth: parseInt(state.calendarSettings.desktopToMobileTransitionWidth),\r\n    }\r\n}\r\n\r\n/**\r\n * Map global dispatchers to dispatch-half of MiniCalendarProps\r\n */\r\nfunction mapDispatchToProps(dispatch: Dispatch): DispatchToProps {\r\n    return {\r\n        openFilterDialog: (trigger: HTMLButtonElement) => dispatch(openFiltersDialog(trigger)),\r\n        closeFiltersDialog: () => dispatch(closeFiltersDialog())\r\n    }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(FiltersContainerBase);","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { uniq } from 'lodash';\r\n\r\nimport FilterView from './filter.view';\r\nimport { IEventFilter } from '../../classes/calendar';\r\nimport { IEvent } from '../../interfaces/event';\r\nimport { upsertEventFilter, removeEventFilter, setCurrentMonth } from '../../redux-state/actions/calendar.actions';\r\nimport { ICalendarAppState } from '../../redux-state';\r\nimport { CalendarApi } from '../../common/calendar-api';\r\nimport { connect } from 'react-redux';\r\nimport { generateEventFilter, GetFilterFromQuery } from '../../helpers/filter-by-query'\r\nimport { scrollToMonth, removeLoader, getMonthElement } from '../../helpers/scroll-to-month';\r\nimport { IOption } from '../../interfaces/option';\r\nimport { IMonth } from '../../interfaces/month';\r\n\r\ninterface IFilterExternalProps {\r\n    /**\r\n     * The property to filter the calendar events by.\r\n     */\r\n    propertyToFilter: keyof IEvent;\r\n    /**\r\n     * Text to represent the option for no selection. ie All Venues, All Production\r\n     */\r\n    noSelectionText: string;\r\n    /**\r\n     * Name of the filter to be labeled on the app\r\n     */\r\n    filterName: string;\r\n}\r\n\r\ninterface StateToProps {\r\n    hasFilters: boolean;\r\n    eventMonths: IMonth<IEvent>[];\r\n    selectedValue: string;\r\n    /**\r\n     * The furthermost month that has been loaded onto the calendar.\r\n     */\r\n    lastLoadedMonth: moment.Moment;\r\n    /**\r\n     * The last month that can be loaded onto the calendar.\r\n     */\r\n    lastMonthToLoad: moment.Moment;\r\n    currentFilters: Map<string, string>;\r\n    startDate: moment.Moment;\r\n    endDate: moment.Moment;\r\n}\r\n\r\ninterface DispatchToProps {\r\n    selectFilter: (selectedValue: string, shouldUpdateQuery: boolean) => void;\r\n    goToMonth: (date: moment.Moment) => void;\r\n    getFirstOccurenceDateForFilters: (filters: any, lastMonthToLoad: moment.Moment, lastLoadedMonth: moment.Moment) => void;\r\n}\r\n\r\nexport type FilterProps = IFilterExternalProps & StateToProps & DispatchToProps;\r\n\r\ninterface FilterState {\r\n    fromApi: boolean;\r\n    waitingForApi: boolean;\r\n    options: IOption[];\r\n}\r\n\r\nexport type CombinedFilterViewProps = FilterProps & FilterState;\r\n\r\nexport class FiltersBase extends React.Component<FilterProps, FilterState> {\r\n    constructor(props: FilterProps) {\r\n        super(props);\r\n\r\n        this.state = {\r\n            fromApi: false,\r\n            waitingForApi: true,\r\n            options: []\r\n        };\r\n    }\r\n\r\n    componentDidMount() {\r\n        CalendarApi.getFiltersFor(this.props.propertyToFilter, this.props.startDate, this.props.endDate).then(response => {\r\n            this.setState({\r\n                fromApi: true,\r\n                waitingForApi: false,\r\n                options: response\r\n            });\r\n\r\n            if (window.location.search.length > 1) {\r\n                GetFilterFromQuery(window.location.search, response, this.props.propertyToFilter,\r\n                    this.props.lastLoadedMonth, this.props.selectFilter, this.props.goToMonth);\r\n            }\r\n        }).catch(err => {\r\n            console.error(err);\r\n        });\r\n    }\r\n\r\n    componentDidUpdate(prevProps: FilterProps, prevState: FilterState) {\r\n        if (!this.state.fromApi && !this.state.waitingForApi && !prevProps.lastLoadedMonth.isSame(this.props.lastLoadedMonth)) {\r\n            this.setState({\r\n                options: this.calculateOptions(this.props)\r\n            });\r\n        }\r\n    }\r\n\r\n\r\n    private calculateOptions(props: FilterProps): IOption[] {\r\n        // flatten events twice because month -> day -> events\r\n        const events = ([] as IEvent[]).concat(...props.eventMonths.map(month => ([] as IEvent[]).concat(...month.events.days.map(day => day.events))));\r\n\r\n        if (events.length > 0) {\r\n            if (Array.isArray(events[0][props.propertyToFilter])) {\r\n                // These are all casted as any because it's not specifically known what kind of objects this is expected to support.\r\n                const allOptions = uniq(([] as any[]).concat(...events.map(event => (event[props.propertyToFilter] as any[]))));\r\n\r\n                return allOptions.map(option => {\r\n                    return {\r\n                        text: option.toString(),\r\n                        value: option.toString(),\r\n                        firstOccurance: \"\"\r\n                    }\r\n                });\r\n            }\r\n            else {\r\n                const mappedProperty = uniq(events.map(event => event[props.propertyToFilter]));\r\n\r\n                return mappedProperty.map(eventProperty => {\r\n                    return {\r\n                        text: eventProperty.toString(),\r\n                        value: eventProperty.toString(),\r\n                        firstOccurance: \"\"\r\n                    }\r\n                });\r\n            }\r\n        }\r\n\r\n        // If empty\r\n        return [];\r\n    }\r\n\r\n    render() {\r\n        return <FilterView {...this.props} {...this.state} />;\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState, ownProps: IFilterExternalProps): StateToProps {\r\n    // Find the matched filter to extract the selected value.\r\n    let matchedFilter: IEventFilter = null;\r\n\r\n    for (let i = 0; i < state.calendar.eventFilter.length; ++i) {\r\n        if (state.calendar.eventFilter[i].key === ownProps.propertyToFilter) {\r\n            matchedFilter = state.calendar.eventFilter[i];\r\n            break;\r\n        }\r\n    }\r\n\r\n    const startDate = moment(state.calendar.loadedMonths[0]).startOf('day');\r\n    const endDate = moment(state.calendarSettings.monthsOnCalendar[state.calendarSettings.monthsOnCalendar.length - 1]).endOf('month');\r\n\r\n    return {\r\n        hasFilters: state.calendar.eventFilter.length > 0,\r\n        eventMonths: state.calendar.events,\r\n        selectedValue: matchedFilter ? matchedFilter.selectedValue : \"\",\r\n        lastLoadedMonth: state.calendar.endDate,\r\n        lastMonthToLoad: state.calendarSettings.monthsOnCalendar[state.calendarSettings.monthsOnCalendar.length - 1],\r\n        currentFilters: new Map(state.calendar.eventFilter.map(filter => [filter.key, filter.selectedValue]) as any),\r\n        startDate,\r\n        endDate\r\n    }\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch, ownProps: FilterProps): DispatchToProps {\r\n    return {\r\n        selectFilter: (selectedValue: string, shouldUpdateQuery: boolean) => {\r\n            // If the selected value is null or empty string, remove that filter.\r\n            if (!selectedValue || selectedValue === \"\") {\r\n                dispatch(removeEventFilter(ownProps.propertyToFilter));\r\n            } else {\r\n\r\n                const filter: IEventFilter = {\r\n                    key: ownProps.propertyToFilter,\r\n                    selectedValue: selectedValue,\r\n                    filter: generateEventFilter(ownProps.propertyToFilter, selectedValue)\r\n                }\r\n                dispatch(upsertEventFilter(filter, shouldUpdateQuery));\r\n            }\r\n        },\r\n        goToMonth: (date: moment.Moment) => dispatch(setCurrentMonth(date)),\r\n        getFirstOccurenceDateForFilters: (filters, lastMonthToLoad, lastLoadedMonth) => {\r\n            CalendarApi.getFirstOccurenceForFilters(filters, lastMonthToLoad).then(firstOccuranceDate => {\r\n\r\n                // If a month is \r\n                if (firstOccuranceDate != null) {\r\n                    const toMonth = moment(firstOccuranceDate);\r\n\r\n                    // Only change months if it's in the future.\r\n                    dispatch(setCurrentMonth(toMonth))\r\n                    \r\n                    const monthElement = getMonthElement(toMonth);\r\n\r\n                    // If the month has already loaded, apply filter and remove the loader.\r\n                    // We need a timeout because even though the data is cached, a Promise object is created.\r\n                 \r\n                    var scrollInterval = setInterval(() => {\r\n                        \r\n\r\n                        if (monthElement) {\r\n                            removeLoader();\r\n                            if (scrollToMonth(toMonth)) {\r\n                                clearInterval(scrollInterval);\r\n                            }\r\n                        }\r\n                    }, 500);\r\n\r\n                } else {\r\n                    // If the month has already loaded, apply filter and remove the loader.\r\n                    // We need a timeout because even though the data is cached, a Promise object is created.\r\n                    setTimeout(() => removeLoader(), 500);\r\n                }\r\n            }).catch(err => {\r\n                console.error(err);\r\n            });\r\n        }\r\n    }\r\n}\r\n\r\nexport default connect<StateToProps, DispatchToProps>(mapStateToProps, mapDispatchToProps)(FiltersBase);","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { CombinedFilterViewProps } from '../../components/filters-ace/filter';\r\nimport { scrollToMonth, removeLoader, getMonthElement } from '../../helpers/scroll-to-month';\r\n\r\nconst FilterView: React.StatelessComponent<CombinedFilterViewProps> = props => {\r\n    function onChange(evt: React.ChangeEvent<HTMLSelectElement>) {\r\n        // Grab the selected option's data-first-occurance attribute.\r\n        const selectedValue = evt.currentTarget.value;\r\n        const selectEl = evt.currentTarget;\r\n        const selectedOption = selectEl.options[selectEl.selectedIndex];\r\n\r\n        var updatedFilters = props.currentFilters.set(props.propertyToFilter, selectedOption.value);\r\n\r\n        var name = \"\";\r\n        if (updatedFilters.get('name')) {\r\n            name = updatedFilters.get('name');\r\n        }\r\n\r\n        var location = \"\";\r\n        if (updatedFilters.get('location')) {\r\n            location = updatedFilters.get('location');\r\n        }\r\n\r\n        var category = \"\";\r\n        if (updatedFilters.get('categories')) {\r\n            category = updatedFilters.get('categories');\r\n        }\r\n\r\n        let filters = {};\r\n\r\n        updatedFilters.forEach(function (value, key) {\r\n            filters[key] = value\r\n        });\r\n\r\n        props.getFirstOccurenceDateForFilters(filters, props.lastMonthToLoad, props.lastLoadedMonth);\r\n        props.selectFilter(selectedValue, true);\r\n\r\n    }\r\n\r\n    const collapsedFilterName = props.filterName.replace(/[^\\w]|_/g, \"\");\r\n\r\n    return (\r\n        <li className=\"ace-cal-filter\">\r\n            {/*Hiding Label*/}\r\n            {/*<label htmlFor={`Filter-${collapsedFilterName}`}>{props.filterName}</label>*/}\r\n            <select value={props.selectedValue} onChange={onChange} id={`Filter-${collapsedFilterName}`}>\r\n                <option value=\"\">{props.noSelectionText}</option>\r\n                {\r\n                    props.options.map(option => <option key={`${option.value}${option.text}`} value={option.value} data-first-occurance={option.firstOccurance} > {option.text}</option>)\r\n                }\r\n            </select>\r\n        </li>\r\n    );\r\n}\r\n\r\nexport default FilterView;","import * as React from 'react';\r\n\r\nimport Filter from '../../components/filters-ace/filter';\r\nimport ClearAll from '../../components/filters-ace/clear-all';\r\nimport CalendarText from '../../contexts/calendar-text';\r\n\r\n\r\nimport { FiltersContainerViewProps } from '../../components/filters-ace/container';\r\n\r\nconst FiltersListView: React.StatelessComponent<FiltersContainerViewProps> = props => {\r\n    return (\r\n        <CalendarText.Consumer>\r\n            {\r\n                text => (\r\n                    <ul className=\"ace-cal-filters-list\">\r\n                        <Filter propertyToFilter=\"name\" filterName={text.productionFilterLabelText} noSelectionText={text.productionSelectAllDropdownOption} />\r\n                    </ul>\r\n                )}\r\n        </CalendarText.Consumer>\r\n    )\r\n}\r\n\r\nconst FiltersContainerView: React.StatelessComponent<FiltersContainerViewProps> = props => {\r\n    return (\r\n        <CalendarText.Consumer>\r\n            {\r\n                text => (\r\n                            <div className=\"ace-cal-filters-container\" aria-hidden=\"false\">\r\n                                <FiltersListView {...props}></FiltersListView>\r\n                            </div> \r\n                )}\r\n        </CalendarText.Consumer>\r\n    );\r\n}\r\n\r\nexport default FiltersContainerView;","import * as React from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { connect } from 'react-redux';\r\n\r\nimport { ICalendarAppState } from '../../redux-state';\r\nimport GridMonthContainerView from './grid-month-container.view';\r\nimport { CalendarDeviceMode, CalendarViewMode } from '../../redux-state/interfaces/calendar-settings';\r\n\r\ninterface IGridMonthContainerExternalProps {\r\n\r\n}\r\n\r\ninterface StateToProps {\r\n    currentMoment: moment.Moment;\r\n    calendarViewMode: CalendarViewMode;\r\n    calendarDeviceMode: CalendarDeviceMode;\r\n}\r\n\r\nexport type GridMonthContainerProps = IGridMonthContainerExternalProps & StateToProps;\r\n\r\nexport class GridMonthContainerBase extends React.Component<GridMonthContainerProps, any> {\r\n    render() {\r\n        return (\r\n            <GridMonthContainerView {...this.props} />\r\n        )\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState, ownProps: IGridMonthContainerExternalProps): StateToProps {\r\n    return {\r\n        currentMoment: state.calendar.currentDate,\r\n        calendarViewMode: state.calendarSettings.calendarViewMode,\r\n        calendarDeviceMode: state.calendarSettings.calendarDeviceMode\r\n    }\r\n}\r\n\r\nexport default connect<StateToProps>(mapStateToProps)(GridMonthContainerBase);\r\n\r\n","import * as React from 'react';\r\nimport { ICalendarState, IMonth, IDay } from '../../classes/calendar';\r\n\r\nimport { connect } from 'react-redux';\r\nimport moment from 'moment';\r\nimport { ICalendarAppState } from '../../redux-state';\r\nimport { IEvent } from '../../interfaces';\r\nimport { ICalendarAppText } from '../../redux-state/interfaces/text/calendar-app.text';\r\nimport GridDayView from './grid-day.view';\r\n\r\ninterface IGridDayExternalProps {\r\n    day: IDay<IEvent>;\r\n}\r\n\r\ninterface StateToProps {\r\n    text: ICalendarAppText;\r\n}\r\n\r\nexport type GridDayProps = IGridDayExternalProps & StateToProps;\r\n\r\nexport const GridDayBase: React.StatelessComponent<GridDayProps> = props => {\r\n    return (\r\n        <GridDayView {...props} />\r\n    )\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState): StateToProps {\r\n    return {\r\n        text: state.calendarText\r\n    }\r\n}\r\n\r\nexport default connect(mapStateToProps)(GridDayBase);","import * as React from 'react';\r\nimport { ICalendarState, IMonth, IDay } from '../../classes/calendar';\r\n\r\nimport { connect } from 'react-redux';\r\n\r\nimport { ICalendarAppState } from '../../redux-state';\r\nimport { IEvent } from '../../interfaces';\r\nimport { ICalendarAppText } from '../../redux-state/interfaces/text/calendar-app.text';\r\nimport GridEventView from './grid-event.view';\r\n\r\ninterface IGridEventExternalProps {\r\n    event: IEvent;\r\n}\r\n\r\ninterface StateToProps {\r\n    text: ICalendarAppText;\r\n}\r\n\r\nexport type GridEventProps = IGridEventExternalProps & StateToProps;\r\n\r\nexport const GridEventBase: React.StatelessComponent<GridEventProps> = props => {\r\n    return (\r\n        <GridEventView {...props} />\r\n    )\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState): StateToProps {\r\n    return {\r\n        text: state.calendarText\r\n    }\r\n}\r\n\r\nexport default connect(mapStateToProps)(GridEventBase);","import * as React from 'react';\r\nimport { GridDayProps } from '../../components/grid/day';\r\n\r\nimport moment from 'moment';\r\nimport GridEventView from '../../components/grid/event';\r\n\r\nconst GridDayView: React.StatelessComponent<GridDayProps> = props => {\r\n    let dateMoment = moment(props.day.date) as any;\r\n    let now = moment().toDate();\r\n    const isToday = moment().format(\"MMM Do YY\") == dateMoment.format(\"MMM Do YY\") ? \"ace-cal-grid-day-today\" : \"\";\r\n\r\n    return (\r\n        <li className={`ace-cal-grid-day ${isToday} ${props.day.events.length > 0 ? \"ace-cal-grid-day-has-events\" : \"\"}`} aria-labelledby={`Day-${dateMoment.format(\"X\")}`}>\r\n            {\r\n                props.day.events.length > 0 ?\r\n                    <div className=\"ace-cal-grid-day-wrapper\">\r\n                        <article className=\"ace-cal-grid-day-content\">\r\n                            <span aria-hidden=\"true\" role=\"presentation\" className=\"ace-cal-grid-day-date\">{dateMoment.format(\"D\")}</span>\r\n                            <h4 id={`Day-${dateMoment.format(\"X\")}`} className=\"visually-hidden\">\r\n                                {\r\n                                    <span role=\"text\">\r\n                                        {`${dateMoment.format(\"dddd, MMMM\")} ${dateMoment.format(\"D\")}`}\r\n                                        <span>{`: ${props.day.events.length} ${props.day.events.length > 2 ? props.text.pluralEventsText : props.text.singleEventText}`}</span>\r\n                                    </span>\r\n                                }\r\n                            </h4>\r\n                           \r\n                            <ul className=\"ace-cal-grid-day-content\">\r\n                                {props.day.events.map(event => {\r\n                                    var isEventSameDay = dateMoment.format(\"MMM Do YY\") == moment(event.eventDate).format(\"MMM Do YY\")\r\n                                    return (\r\n                                        isEventSameDay ?\r\n                                        <GridEventView key={event.id} event={event} />\r\n                                        : null);\r\n                                })}\r\n                            </ul>\r\n                 \r\n\r\n                        </article>\r\n                    </div>\r\n                    :\r\n                    <div className=\"ace-cal-grid-day-wrapper\">\r\n                        <div className=\"ace-cal-grid-day-content\">\r\n                            <span className=\"ace-cal-grid-day-date\" id={`Day-${dateMoment.format(\"X\")}`} role=\"text\"><span className=\"visually-hidden\">{`${dateMoment.format(\"dddd, MMMM\")} `}</span>{dateMoment.format(\"D\")}</span>\r\n                        </div>\r\n                      \r\n                    </div>\r\n            }\r\n\r\n        </li>\r\n    );\r\n}\r\n\r\nexport default GridDayView;","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { nodeListToArray } from '../../../../Static/javascript/Content/helpers/nodeListToArray';\r\n\r\nimport { GridEventProps } from '../../components/grid/event';\r\n\r\nconst GridEventView: React.StatelessComponent<GridEventProps> = props => {\r\n    const eventMoment = moment(props.event.eventDate);\r\n    const backgroundStyle = {\r\n        backgroundImage: `url(${props.event.thumbnail ? props.event.thumbnail : props.text.fallbackThumbnailImageSrc})`\r\n    };\r\n\r\n    function highlightProductions(e) {\r\n        let productionsToActivate = nodeListToArray(document.querySelectorAll(`[data-event=\"${e}\"]`));\r\n        productionsToActivate.forEach((production) => {\r\n            production.classList.toggle('highlighted');\r\n        })\r\n    }\r\n\r\n    return (\r\n        <li className=\"ace-cal-grid-event\" data-event={props.event.productionSeasonId}\r\n            onMouseEnter={() => highlightProductions(props.event.productionSeasonId)}\r\n            onMouseLeave={() => highlightProductions(props.event.productionSeasonId)}>\r\n            <span className=\"ace-cal-grid-event-bg\" role=\"presentation\" style={backgroundStyle} ></span>\r\n            <article className=\"ace-cal-grid-event-content\">\r\n                <p className=\"ace-cal-grid-event-name\"><a href={props.event.viewDetailCtaUrl}>{props.event.name}</a></p>\r\n                <p className=\"label\">{props.event.eventTimeString}</p>\r\n\r\n                <p className=\"ace-cal-grid-event-cta\">\r\n                    {\r\n                        !props.event.buyTicketDisabled ? \r\n                            <a href={props.event.buyTicketCtaUrl} className=\"btn\">{props.event.buyTicketCtaText ? props.event.buyTicketCtaText : null}</a>\r\n                            :\r\n                            <button  disabled className=\"btn\">{props.event.buyTicketCtaText ? props.event.buyTicketCtaText : null}</button>\r\n                    }\r\n                    \r\n                </p>\r\n            </article>\r\n        </li>\r\n    );\r\n}\r\n\r\nexport default GridEventView;","import * as React from 'react';\r\nimport moment from 'moment';\r\n\r\nimport GridMonths from '../../components/grid/months';\r\nimport { GridMonthContainerProps } from '../../components/grid/container';\r\n\r\n\r\nconst GridMonthContainerView: React.StatelessComponent<GridMonthContainerProps> = props => {\r\n    const daysOfTheWeek = moment.weekdays(true);\r\n    return (\r\n        <div className=\"ace-cal-grid-container block-inner\">\r\n            <ul className=\"ace-cal-grid-weekdays\" aria-hidden=\"true\">\r\n                {\r\n                    daysOfTheWeek.map(day => <li className=\"ace-cal-grid-weekday\" key={day}>{day}</li>)\r\n                }\r\n                </ul>\r\n\r\n            <GridMonths />\r\n        </div>\r\n    );\r\n}\r\n\r\nexport default GridMonthContainerView;","import * as React from 'react';\r\n\r\nimport { GridMonthProps } from '../../components/grid/month';\r\nimport GridDay from '../../components/grid/day';\r\nimport moment = require('moment');\r\n\r\nconst GridMonthView: React.StatelessComponent<GridMonthProps> = props => {\r\n    const hasEvents = props.monthData.events.days.some(day => day.events.length > 0);\r\n    const eventsToDisplay = props.monthData.events.days.filter(day => day != null && moment().startOf('week').isSameOrBefore(day.date))\r\n    if (hasEvents) {\r\n        return (\r\n            <li className=\"ace-cal-grid-month\">\r\n                <section>\r\n                    <h3 className=\"ace-cal-grid-month-name h2-style\" id={`Month-${props.monthData.monthMoment.format(\"X\")}`}>{props.monthData.monthMoment.format(\"MMMM YYYY\")}</h3>\r\n                    <ul className=\"ace-cal-grid-days\" aria-labelledby={`Month-${props.monthData.monthMoment.format(\"X\")}`}>\r\n                        {\r\n                            eventsToDisplay.map(day => props.monthData.monthMoment.month() === day.date.getMonth() ? <GridDay key={day.date.toDateString()} day={day} /> : <li key={day.date.toDateString()} className=\"ace-cal-grid-day-empty\" aria-hidden=\"true\"></li>)\r\n                        }\r\n                    </ul>\r\n                </section>\r\n            </li>\r\n        );\r\n    } else {\r\n        return (\r\n            <li className=\"ace-cal-grid-month\">\r\n                <section>\r\n                    <h3 className=\"ace-cal-grid-month-name h2-style\" id={`Month-${props.monthData.monthMoment.format(\"X\")}`}>{props.monthData.monthMoment.format(\"MMMM YYYY\")}</h3>\r\n                    <div className=\"ace-cal-grid-days-empty\" dangerouslySetInnerHTML={{ __html: props.text.emptyMonthMessage }} aria-labelledby={`Month-${props.monthData.monthMoment.format(\"X\")}`}></div>\r\n                </section>\r\n            </li>\r\n        )\r\n    }\r\n}\r\n\r\nexport default GridMonthView;","import * as React from 'react';\r\n\r\nimport { GridMonthsProps } from '../../components/grid/months';\r\nimport GridMonth from '../../components/grid/month';\r\nimport LoadMoreBase from '../month-selection/load-more';\r\n\r\nconst GridMonthsView: React.StatelessComponent<GridMonthsProps> = props => {\r\n    return (\r\n        <section className=\"ace-cal-grid\">\r\n            <h2 className=\"visually-hidden\">{props.text.gridViewHeading}</h2>\r\n            <ul className=\"ace-cal-grid-months test1\">\r\n                {\r\n                    props.monthsData.map(monthData => <GridMonth key={`${monthData.monthMoment.month()}${monthData.monthMoment.year()}`} monthData={monthData} />)\r\n                }\r\n            </ul>\r\n            <ul className=\"ace-cal-grid-months test2\">\r\n                {\r\n                    props.nextmonthsData != null && props.nextmonthsData.length > 0 ?\r\n                        props.nextmonthsData.map(monthData => <GridMonth key={`${monthData.monthMoment.month()}${monthData.monthMoment.year()}`} monthData={monthData} />)\r\n                        : null\r\n                }\r\n            </ul>\r\n            <LoadMoreBase />\r\n        </section>\r\n    )\r\n}\r\n\r\nexport default GridMonthsView;","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { ICalendarState, IDay } from '../../classes/calendar';\r\nimport { connect } from 'react-redux';\r\n\r\nimport { ICalendarAppState } from '../../redux-state';\r\nimport { ICalendarAppText } from '../../redux-state/interfaces/text/calendar-app.text';\r\nimport { IEvent, IMonth } from '../../interfaces';\r\nimport GridMonthView from './grid-month.view';\r\n\r\n\r\ninterface IGridMonthExternalProps {\r\n    monthData: IMonth<IEvent>;\r\n}\r\n\r\ninterface StateToProps {\r\n    text: ICalendarAppText;\r\n}\r\n\r\nexport type GridMonthProps = IGridMonthExternalProps & StateToProps;\r\n\r\nexport class GridMonthBase extends React.Component<GridMonthProps, any> {\r\n    render() {\r\n        return (\r\n            <GridMonthView {...this.props} />\r\n        )\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState, ownProps: IGridMonthExternalProps): StateToProps {\r\n    return {\r\n        text: state.calendarText\r\n    }\r\n}\r\n\r\nexport default connect<StateToProps>(mapStateToProps)(GridMonthBase);","import * as React from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { ICalendarState, IDay } from '../../classes/calendar';\r\nimport { connect } from 'react-redux';\r\n\r\nimport { ICalendarAppState } from '../../redux-state';\r\nimport { ICalendarAppText } from '../../redux-state/interfaces/text/calendar-app.text';\r\nimport GridMonthsView from './grid-months.view';\r\nimport { IEvent } from '../../interfaces/event';\r\nimport { IMonth } from '../../interfaces';\r\n\r\ninterface IGridMonthsExternalProps {\r\n}\r\n\r\ninterface StateToProps {\r\n    monthsData: IMonth<IEvent>[];\r\n    nextmonthsData: IMonth<IEvent>[];\r\n    text: ICalendarAppText;\r\n}\r\n\r\nexport type GridMonthsProps = IGridMonthsExternalProps & StateToProps;\r\n\r\nexport class GridMonthsBase extends React.Component<GridMonthsProps, any> {\r\n    render() {\r\n        return (\r\n            <GridMonthsView {...this.props} />\r\n        )\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState, ownProps: IGridMonthsExternalProps): StateToProps {\r\n\r\n    return {\r\n        monthsData: state.calendar.filteredEvents,\r\n        text: state.calendarText,\r\n        nextmonthsData: state.calendar.filteredNextMonthEvents\r\n    }\r\n}\r\n\r\nexport default connect<StateToProps>(mapStateToProps)(GridMonthsBase);","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { debounce } from 'lodash';\r\nimport { throttle } from 'lodash';\r\nimport { connect, Dispatch } from 'react-redux';\r\n\r\nimport { ICalendarAppState } from '../../redux-state';\r\nimport { IMonth, IEvent } from '../../interfaces';\r\nimport { scrollPosition } from '../../helpers/scroll-position';\r\nimport { scrollToHeading } from '../../helpers/scroll-to-heading';\r\nimport { updateScrolledDate, openMiniCalDialog } from '../../redux-state/actions/calendar.actions';\r\n\r\nimport ListContainerView from './container.view';\r\nimport { IDatePosition } from '../../interfaces/date-position';\r\n\r\ninterface IListContainerExternalProps {\r\n\r\n}\r\n\r\ninterface StateToProps {\r\n    updating: boolean;\r\n    haseventFilter: boolean;\r\n    eventCount: number;\r\n    filterHash: number;\r\n    filteredEvents: IMonth<IEvent>[];\r\n    currentDate: moment.Moment;\r\n    currentScrolledDate: moment.Moment;\r\n    startDate?: moment.Moment;\r\n    selectedFromMiniCalendar: boolean;\r\n    dateSelectedFromMiniCalendar: moment.Moment;\r\n}\r\n\r\ninterface DispatchToProps {\r\n    updateScrolledDate: (to: moment.Moment) => void;\r\n    openMiniCalDialog: (trigger: HTMLButtonElement) => void;\r\n}\r\n\r\ninterface IListContainerState {\r\n    loadingMore: boolean;\r\n    datePositions: IDatePosition[];\r\n}\r\n\r\nexport type ListContainerProps = IListContainerExternalProps & StateToProps & DispatchToProps;\r\n\r\n/**\r\n * Wrapper for the list view of the calendar.\r\n */\r\nclass ListContainerBase extends React.Component<ListContainerProps, IListContainerState> {\r\n    private throttledScroll: any;\r\n    private debouncedResize: any;\r\n    constructor(props: ListContainerProps) {\r\n        super(props);\r\n        this.state = {\r\n            loadingMore: false,\r\n            datePositions: []\r\n        };\r\n\r\n        // scroll and resize handlers\r\n        this.onScroll = this.onScroll.bind(this);\r\n        this.updateDatePositions = this.updateDatePositions.bind(this);\r\n        this.throttledScroll = throttle(this.onScroll, 250);\r\n        this.debouncedResize = debounce(this.updateDatePositions, 250);\r\n\r\n        // handle focus if LoadMore is clicked\r\n        this.loadMoreSideEffect = this.loadMoreSideEffect.bind(this);\r\n        this.populateAndOpenSmartSeatModal = this.populateAndOpenSmartSeatModal.bind(this);\r\n    }\r\n\r\n    /**\r\n     * Bind scroll/resize listeners on mount\r\n     */\r\n    componentDidMount() {\r\n        document.addEventListener('scroll', this.throttledScroll);\r\n        window.addEventListener('resize', this.debouncedResize);\r\n    }\r\n\r\n    /**\r\n     * Unbind scroll/resize listeners on unmount\r\n     */\r\n    componentWillUnmount() {\r\n        document.removeEventListener('scroll', this.throttledScroll);\r\n        window.removeEventListener('resize', this.debouncedResize);\r\n    }\r\n\r\n    /**\r\n     * Listen to scroll events to update sticky-nav\r\n     */\r\n    onScroll() {\r\n        const dateString = this.getDateFromScrollPosition();\r\n        if (dateString !== this.props.currentScrolledDate.format()) {\r\n            this.props.updateScrolledDate(moment(dateString));\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Get the month (as `YYYY-MM` representation) based on scroll position\r\n     */\r\n    getDateFromScrollPosition(): string {\r\n        const scrollPos = scrollPosition();\r\n        for (let i = 0; i < this.state.datePositions.length; i++) {\r\n            const date = this.state.datePositions[i];\r\n            const adjustedOffset = date.offsetTop - 144;\r\n            if (adjustedOffset < scrollPos && scrollPos <= adjustedOffset + date.height) {\r\n                return date.dateString;\r\n            }\r\n        }\r\n        return this.props.currentScrolledDate.format();\r\n    }\r\n\r\n    /**\r\n     * Only re-render when the number of events changes or filters change.\r\n     * \r\n     * Handles scrollToDate when mini-cal date is clicked.\r\n     */\r\n    shouldComponentUpdate(nextProps: ListContainerProps) {\r\n        const newFilteredMonth = (!!this.props.filteredEvents && this.props.filteredEvents.length > 0) ? !this.props.filteredEvents[0].monthMoment.isSame(nextProps.filteredEvents[0].monthMoment) : false;\r\n\r\n        if (!newFilteredMonth && !this.props.haseventFilter && this.props.selectedFromMiniCalendar != nextProps.selectedFromMiniCalendar && this.props.dateSelectedFromMiniCalendar\r\n            != nextProps.dateSelectedFromMiniCalendar)\r\n            return true;\r\n\r\n\r\n        return !nextProps.currentDate.isSame(this.props.currentDate) ||\r\n            this.props.eventCount !== nextProps.eventCount ||\r\n            this.props.filterHash !== nextProps.filterHash ||\r\n            this.props.currentScrolledDate !== nextProps.currentScrolledDate ||\r\n            newFilteredMonth;\r\n    }\r\n\r\n    /**\r\n     * Handle DOM-changes after re-render\r\n     */\r\n    componentDidUpdate(oldProps: ListContainerProps) {\r\n        this.updateDatePositions();\r\n        this.props.updateScrolledDate(this.props.currentDate);\r\n\r\n        if (this.state.loadingMore) {\r\n            this.setState({\r\n                loadingMore: false\r\n            }, () => { });\r\n\r\n        } else {\r\n            scrollToHeading(this.props.currentDate, (this.props.currentDate.isSameOrBefore(this.props.currentDate.clone().startOf('month'))));\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Update the state's references of month positions\r\n     */\r\n    updateDatePositions() {\r\n\r\n        // compile position information into an array\r\n        const datePositions: IDatePosition[] = [];\r\n        const dateItems = Array.prototype.slice.call(document.querySelectorAll('[aria-labelledby*=\"List-Day-\"]')) as HTMLLIElement[];\r\n        dateItems.forEach(dateItem => {\r\n            datePositions.push({\r\n                dateString: dateItem.getAttribute('data-date-moment'),\r\n                offsetTop: dateItem.offsetTop,\r\n                height: dateItem.offsetHeight\r\n            });\r\n        });\r\n\r\n        // update the state\r\n        this.setState({\r\n            datePositions\r\n        }, () => {\r\n            // update sticky-nav if scrolled month changed\r\n            this.onScroll();\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Internal state to account for `LoadMore`-specific focus behavior\r\n     */\r\n    loadMoreSideEffect() {\r\n        this.setState({\r\n            loadingMore: true\r\n        });\r\n    }\r\n\r\n    populateAndOpenSmartSeatModal(event: React.MouseEvent<HTMLButtonElement>) {\r\n        event.preventDefault();\r\n        const reserveUrl = (event.target as HTMLButtonElement).getAttribute('data-href');\r\n        if (reserveUrl) {\r\n            const intermediaryLink = document.querySelector('#SmartSeatModal_trigger') as HTMLButtonElement;\r\n            intermediaryLink.setAttribute('data-href', reserveUrl);\r\n            intermediaryLink.click();\r\n        }\r\n    }\r\n\r\n    render() {\r\n        return (\r\n            <ListContainerView {...this.props} loadMoreSideEffect={this.loadMoreSideEffect} />\r\n        )\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState, ownProps: IListContainerExternalProps): StateToProps {\r\n    let eventCount = 0;\r\n\r\n    state.calendar.filteredEvents.forEach(month => {\r\n        month.events.days.forEach(day => {\r\n            eventCount += day.events.length;\r\n        });\r\n    });\r\n    console.log(\"--------------------------\")\r\n    console.log(state.calendar.filteredEvents)\r\n    console.log(\"--------------------------\")\r\n\r\n    return  {\r\n        updating: state.calendar.updating,\r\n        eventCount,\r\n        filterHash: state.calendar.filterHash,\r\n        currentDate: state.calendar.currentDate,\r\n        startDate: moment(state.calendar.startupState.startDate).clone().startOf('day'),\r\n        filteredEvents: state.calendar.filteredEvents,\r\n        currentScrolledDate: state.calendar.currentScrolledDate,\r\n        selectedFromMiniCalendar: state.calendar.miniCalendarDateSelected,\r\n        haseventFilter: state.calendar.eventFilter.length > 0,\r\n        dateSelectedFromMiniCalendar: state.calendar.miniCalendarDate\r\n    }\r\n    \r\n}\r\n\r\nfunction mapDispatchToProps(dispatch: Dispatch): DispatchToProps {\r\n    return {\r\n        updateScrolledDate: (to: moment.Moment) => { dispatch(updateScrolledDate(to)); },\r\n        openMiniCalDialog: (trigger: HTMLButtonElement) => { dispatch(openMiniCalDialog(trigger)); }\r\n    }\r\n}\r\n\r\nexport default connect<StateToProps, DispatchToProps>(mapStateToProps, mapDispatchToProps)(ListContainerBase);\r\n","import * as React from 'react';\r\n\r\nimport { ListContainerProps } from './container';\r\n\r\nimport CalendarText from '../../contexts/calendar-text';\r\nimport { IEvent, IMonth } from '../../interfaces';\r\n\r\nimport LoadMore from '../load-more';\r\nimport ListMonthView from './month.view';\r\n\r\ninterface IListContainerViewProps {\r\n    filteredEvents: IMonth<IEvent>[];\r\n    loadMoreSideEffect: () => void;\r\n}\r\n\r\n/**\r\n * Wrapper HTML for the list view. Renders each month.\r\n */\r\nclass ListContainerView extends React.PureComponent<ListContainerProps & IListContainerViewProps> {\r\n    render(): React.ReactNode {\r\n        return (\r\n            <CalendarText.Consumer>\r\n                {text => (\r\n                    <div className=\"ace-cal-list-container grid-col\">\r\n                        <section className=\"ace-cal-list\">\r\n                            <div className=\"ace-cal-list-details\">\r\n                                <p className=\"ace-cal-list-events-indicator h6-style visually-hidden\" id=\"Events_Header\">{`${this.props.eventCount} ${this.props.eventCount === 1 ? text.singleEventText : text.pluralEventsText}`}</p>\r\n                            </div>\r\n                            <h2 className=\"visually-hidden\">{text.listViewHeading}</h2>\r\n                            <ul className=\"stack-lg\">\r\n                                {\r\n                                    !!this.props.filteredEvents ? this.props.filteredEvents.map(month => <ListMonthView key={`${month.monthMoment.month()}_${month.monthMoment.year()}`} monthData={month} selectedFromMiniCalendar={this.props.selectedFromMiniCalendar} dateSelectedFromMiniCalendar={this.props.dateSelectedFromMiniCalendar} currentScrolledDate={this.props.currentScrolledDate} />) : null\r\n                                }\r\n                            </ul>\r\n                            <LoadMore loadMoreSideEffect={this.props.loadMoreSideEffect} />\r\n                        </section>\r\n                    </div>\r\n                )}\r\n            </CalendarText.Consumer>\r\n        )\r\n    }\r\n}\r\n\r\nexport default ListContainerView;\r\n","import * as React from 'react';\r\nimport moment from 'moment';\r\n\r\nimport CalendarText from '../../contexts/calendar-text';\r\nimport LazyImage from '../lazy-image';\r\nimport { isExternalUrl } from '../../helpers/is-external-url';\r\n\r\nimport ListEventTagsView from './event-tags.view';\r\nimport { IEvent } from '../../interfaces';\r\n\r\nexport interface IListEventViewProps {\r\n    event: IEvent;\r\n    allowTabbing: boolean;\r\n}\r\n\r\n/**\r\n * The view for an individual calendar event.\r\n */\r\nclass ListEventView extends React.PureComponent<IListEventViewProps> {\r\n    render(): React.ReactNode {\r\n        const eventMoment = moment(this.props.event.eventDate);\r\n        //const ctaButton = () => {\r\n\r\n        //}\r\n\r\n       return (\r\n            <CalendarText.Consumer>\r\n                {text => (\r\n                    <li className=\"ace-date-row\">\r\n                        {this.eventDetails()}\r\n                    </li>\r\n                )}\r\n            </CalendarText.Consumer>\r\n        );\r\n    }\r\n\r\n    eventDetails() {\r\n        const eventIsOnSale = this.props.event.buyTicketDisabled === false && ((this.props.event.currentMosOnSaleDate\r\n            && this.props.event.currentMosOnSaleDate < new Date()\r\n            && this.props.event.currentMosOnSaleEndDate > new Date()\r\n            && this.props.event.soldOut === false)\r\n            || this.props.event.onSale === true);\r\n            \r\n\r\n        const isVolunteer = this.props.event.volunteerPurchase;\r\n        \r\n        if (this.props.event.hideAvailability) {\r\n            this.props.event.availabilityOverrideText = \"\";\r\n        }\r\n\r\n        const dateX = moment(this.props.event.eventDate).startOf('day').format(\"X\");\r\n\r\n        return (\r\n            <>\r\n                <div className=\"ace-date-row-info\" id={`List-Day-${dateX}`}>\r\n                    <p className=\"bold\">{this.props.event.eventDateString}</p>\r\n                    <p className=\"light-weight\">{this.props.event.eventTimeString}</p>\r\n                    <p>{this.props.event.performanceNote}</p>\r\n                  \r\n                </div>\r\n                <div className=\"ace-date-row-supplementary\">\r\n                    {\r\n                        eventIsOnSale ?\r\n                            <a href={this.props.event.buyTicketCtaUrl} className={!this.props.event.buyTicketDisabled ? \"btn\" : \"btn disabled\"} target={isExternalUrl(this.props.event.buyTicketCtaUrl) ? \"_blank\" : null} tabIndex={this.props.allowTabbing ? 0 : -1}>\r\n                                {\r\n                                    isVolunteer ? this.props.event.volunteerbuyTicketCtaText : this.props.event.buyTicketCtaText\r\n                                }\r\n                            </a>\r\n                            :\r\n                            <button className={!this.props.event.buyTicketDisabled ? \"btn\" : \"btn disabled\"} disabled tabIndex={this.props.allowTabbing ? 0 : -1}>\r\n                                {this.props.event.buyTicketCtaText}\r\n                            </button>\r\n                    }\r\n                </div>\r\n            </>\r\n        );\r\n    }\r\n}\r\n\r\nexport default ListEventView;\r\n","import moment = require('moment');\r\nimport * as React from 'react';\r\n\r\nimport CalendarText from '../../contexts/calendar-text';\r\nimport { formatDateTime } from '../../helpers/format-date-time';\r\nimport { IMonth, IEvent } from '../../interfaces';\r\nimport ListDayView from './day.view';\r\nimport ListProductionView from './production.view';\r\n\r\ninterface IListMonthViewProps {\r\n    monthData: IMonth<IEvent>;\r\n    currentScrolledDate: moment.Moment;\r\n    selectedFromMiniCalendar: boolean;\r\n    dateSelectedFromMiniCalendar: moment.Moment;\r\n}\r\n\r\n/**\r\n * Container for a month, slightly different view based on whether or not there are events.\r\n */\r\nclass ListMonthView extends React.PureComponent<IListMonthViewProps> {\r\n    render(): React.ReactNode {\r\n        const hasEvents = this.props.monthData.events.days.some(day => day.events.length > 0);\r\n        return (\r\n            <CalendarText.Consumer>\r\n                {text => (\r\n                    hasEvents\r\n                        ? (\r\n                            <li className=\"ace-cal-list-month\" data-monthmoment={this.props.monthData.monthMoment.format('YYYY-MM')}>\r\n                                <h3 id={`Month-List-${this.props.monthData.monthMoment.format(\"X\")}`} className=\"ace-cal-list-month-name h2-style\">{formatDateTime(this.props.monthData.monthMoment, text.accessibleMonthFormat)}</h3>\r\n                                <article className=\"stack\">\r\n                                    <ul className=\"stack-sm\" aria-labelledby={`Month-List-${this.props.monthData.monthMoment.format(\"X\")}`}>\r\n                                        {\r\n                                            this.props.monthData.events.productions\r\n                                                .sort((a, b) => {\r\n                                                    if (a.events.length == 0) {\r\n                                                        return -1;\r\n                                                    }\r\n\r\n                                                    if (b.events.length == 0) {\r\n                                                        return 1;\r\n                                                    }\r\n                                                    return moment(a.events[0].eventDate).isBefore(b.events[0].eventDate) ? -1 : 1;\r\n                                                }).map(prod => <ListProductionView key={prod.id} production={prod} selectedFromMiniCalendar={this.props.selectedFromMiniCalendar} dateSelectedFromMiniCalendar={this.props.dateSelectedFromMiniCalendar} openProdList={prod.events.filter(ev => moment(ev.eventDate).startOf('day').format('X') === this.props.currentScrolledDate.format('X')).length > 0} />)\r\n                                        }\r\n                                    </ul>\r\n                                </article>\r\n                            </li>\r\n                        ) : (\r\n                            <li className=\"ace-cal-list-month ace-cal-list-month-empty\" data-monthmoment={this.props.monthData.monthMoment.format('YYYY-MM')}>\r\n                                <article>\r\n                                    <h3 id={`Month-List-${this.props.monthData.monthMoment.format(\"X\")}`} className=\"ace-cal-list-month-name h2-style\">{formatDateTime(this.props.monthData.monthMoment, text.accessibleMonthFormat)}</h3>\r\n                                    <div className=\"ace-cal-list-days-empty\" dangerouslySetInnerHTML={{ __html: text.emptyMonthMessage }} aria-labelledby={`Month-List-${this.props.monthData.monthMoment.format(\"X\")}`}></div>\r\n                                </article>\r\n                            </li>\r\n                        )\r\n                )}\r\n            </CalendarText.Consumer>\r\n        );\r\n    }\r\n}\r\n\r\nexport default ListMonthView;","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { debounce } from 'lodash';\r\n\r\nimport CalendarText from '../../contexts/calendar-text';\r\nimport LazyImage from '../lazy-image';\r\nimport { isExternalUrl } from '../../helpers/is-external-url';\r\nimport { getHeightOfHidden } from '../../helpers/get-height-of-hidden';\r\n\r\nimport ListEventTagsView from './event-tags.view';\r\nimport { IEvent, IProduction } from '../../interfaces';\r\nimport ListEventView from './event.view';\r\nimport { CalendarAppText } from '../../redux-state/interfaces/calendar-app-text.state';\r\n\r\nexport interface IListProductionViewProps {\r\n    production: IProduction<IEvent>;\r\n    openProdList: boolean;\r\n    selectedFromMiniCalendar: boolean;\r\n    dateSelectedFromMiniCalendar: moment.Moment;\r\n}\r\n\r\nexport interface IListProductionViewState {\r\n    ticketPanelOpen: boolean;\r\n    resizeListener: EventListener;\r\n    panelRef: React.RefObject<HTMLDivElement>;\r\n    openTogglepanelRef: React.RefObject<HTMLDivElement>;\r\n    openTogglepanelHeight: number;\r\n    panelHeight: number;\r\n    initialPanelHeight: number;\r\n    lastPerformanceLoadedIndex: number;\r\n    loadMorePerformances: boolean;\r\n    morePerformancesPanelRef: React.RefObject<HTMLDivElement>;\r\n    morePerformancesPanelHeight: number;\r\n}\r\n\r\n/**\r\n * The view for an individual calendar event.\r\n */\r\nclass ListProductionView extends React.Component<IListProductionViewProps, IListProductionViewState> {\r\n    constructor(props: IListProductionViewProps) {\r\n        super(props);\r\n\r\n        this.state = {\r\n            ticketPanelOpen: false,\r\n            panelHeight: null,\r\n            openTogglepanelHeight: null,\r\n            initialPanelHeight: null,\r\n            panelRef: React.createRef<HTMLDivElement>(),\r\n            openTogglepanelRef: React.createRef<HTMLDivElement>(),\r\n            morePerformancesPanelRef: React.createRef<HTMLDivElement>(),\r\n            resizeListener: debounce(() => {\r\n                this.setState({\r\n                    panelHeight: getHeightOfHidden(this.state.panelRef.current),\r\n                    openTogglepanelHeight: getHeightOfHidden(this.state.openTogglepanelRef.current),\r\n                    initialPanelHeight: getHeightOfHidden(this.state.panelRef.current),\r\n                    morePerformancesPanelHeight: getHeightOfHidden(this.state.morePerformancesPanelRef.current)\r\n                });\r\n            }, 50),\r\n            lastPerformanceLoadedIndex: 8,\r\n            loadMorePerformances: false,\r\n            morePerformancesPanelHeight: null\r\n        }\r\n    }\r\n\r\n    loadMore = () => {\r\n        this.setState({\r\n            loadMorePerformances: !this.state.loadMorePerformances,\r\n            lastPerformanceLoadedIndex: this.state.lastPerformanceLoadedIndex,\r\n            panelHeight: (!this.state.loadMorePerformances ? getHeightOfHidden(this.state.panelRef.current) + getHeightOfHidden(this.state.morePerformancesPanelRef.current) : this.state.initialPanelHeight)\r\n        });\r\n    }\r\n\r\n    componentDidMount() {\r\n        if (this.props.production.events.length > 1) {\r\n            this.setState({\r\n                panelHeight: getHeightOfHidden(this.state.panelRef.current),\r\n                initialPanelHeight: getHeightOfHidden(this.state.panelRef.current),\r\n                morePerformancesPanelHeight: getHeightOfHidden(this.state.morePerformancesPanelRef.current)\r\n            });\r\n            window.addEventListener('resize', this.state.resizeListener);\r\n        }\r\n\r\n    }\r\n\r\n    componentDidUpdate(prevProps) {\r\n        if (this.props.dateSelectedFromMiniCalendar != prevProps.dateSelectedFromMiniCalendar && this.props.production.events.length > 1 && this.state.openTogglepanelRef.current != null) {\r\n            this.setState({\r\n                openTogglepanelHeight: getHeightOfHidden(this.state.openTogglepanelRef.current)\r\n            });\r\n        }\r\n    }\r\n\r\n    componentWillReceiveProps(nextProps, props) {\r\n        if (nextProps.openProdList && !props.openProdList) {\r\n            this.setState({ ticketPanelOpen: true });\r\n        }\r\n    }\r\n\r\n    componentWillUnmount() {\r\n        if (this.props.production.events.length > 1) {\r\n            window.removeEventListener('resize', this.state.resizeListener)\r\n        }\r\n    }\r\n\r\n    filterPerformanceByDateSelectionPrevProps(events: IEvent[], prevDateSelection: moment.Moment): IEvent[] {\r\n        return events.filter(li => moment(li.eventDate).isSame(prevDateSelection, 'day'));\r\n    }\r\n    filterPerformanceByDateSelection(events: IEvent[]): IEvent[] {\r\n        if (this.props.dateSelectedFromMiniCalendar != null && this.props.selectedFromMiniCalendar) {\r\n            return events.filter(li => moment(li.eventDate).isSame(this.props.dateSelectedFromMiniCalendar, 'day'));\r\n        }\r\n        return events;\r\n    }\r\n\r\n\r\n    render(): React.ReactNode {\r\n        if (this.props.production.events.length == 0)\r\n            return null;\r\n\r\n        if (this.props.dateSelectedFromMiniCalendar != null && this.props.selectedFromMiniCalendar && this.props.production.events.filter(li => moment(li.eventDate).isSame(this.props.dateSelectedFromMiniCalendar, 'day')).length == 0) {\r\n            return null;\r\n        }\r\n\r\n\r\n        let openToggleState = this.props.dateSelectedFromMiniCalendar != null && this.props.selectedFromMiniCalendar;\r\n\r\n        const isSinglePerformance = this.props.production.events.length == 1;\r\n\r\n        const dateMoment = moment(this.props.production.events[0].eventDate);\r\n        const dateX = dateMoment.startOf('day').format(\"X\");\r\n\r\n\r\n        return (\r\n            <CalendarText.Consumer>\r\n                {text => (\r\n                    <li className=\"production-card-card\">\r\n                        <div className=\"production-card\">\r\n                            <div className=\"production-card-item\">\r\n                                {!isSinglePerformance ?\r\n                                    <div className=\"production-card-date\">\r\n\r\n                                        <p className=\"h4-style\">\r\n                                            {this.props.production.firstPerformanceDate}\r\n                                        </p>\r\n                                        <span className=\"production-card-date-decorator\"> </span>\r\n                                        <p className=\"h4-style\">\r\n                                            {this.props.production.lastPerformanceDate}\r\n                                        </p>\r\n                                    </div>\r\n                                    :\r\n                                    <div className=\"production-card-date\">\r\n                                     <p className=\"h3-style\"> {this.props.production.events[0].eventDateString}</p>\r\n                                    </div>\r\n                                 }\r\n\r\n                            <div className=\"production-card-image\">\r\n\r\n                                    <a href={this.props.production.viewDetailCtaUrl}>\r\n                                        <div className=\"production-card-image-container\">\r\n                                           {/* TODO: Create Alt Text Property*/}\r\n                                            <img src={this.props.production.thumbnail} alt={this.props.production.name} />\r\n                                    </div>\r\n                                </a>\r\n                            </div>\r\n                        </div>\r\n\r\n                        <div className=\"production-card-item\">\r\n                            <div className=\"stack flex-column-between\">\r\n                                <div className=\"flex-between production-card-content\">\r\n                                    <div className=\"production-card-details\">\r\n\r\n                                        <p className=\"label\">\r\n                                            {this.props.production.conductor}\r\n                                        </p>\r\n\r\n                                            <a className=\"production-card-event-name\" href={this.props.production.viewDetailCtaUrl} target={isExternalUrl(this.props.production.viewDetailCtaUrl) ? \"_blank\" : null}>\r\n                                            <h3 className=\"ace-cal-list-event-name \"\r\n                                                id={isSinglePerformance ? `List-Day-${dateX}` : null}>\r\n                                                {\r\n                                                    <span dangerouslySetInnerHTML={{ __html: this.props.production.name }} />\r\n                                                }\r\n                                            </h3>\r\n                                        </a>\r\n                                        <p className=\"production-card-details-description\">\r\n                                            {this.props.production.synopsis}\r\n                                        </p>\r\n                                    </div>\r\n                                    <p className=\"production-card-price\">\r\n                                        {this.props.production.priceInfo}\r\n                                    </p>\r\n                                </div>\r\n                                <div className=\"production-card-ctas\">\r\n                                    {\r\n                                        isSinglePerformance ?\r\n                                            this.singlePerformanceCta() :\r\n                                            this.multiPerformanceList(text)\r\n                                    }\r\n                                </div>\r\n                            </div>\r\n\r\n\r\n\r\n\r\n\r\n\r\n                        </div>\r\n                        {\r\n                            isSinglePerformance ? null :\r\n                                <div className=\"production-card-panel panel-container\">\r\n                                    {\r\n                                        openToggleState ?\r\n                                            this.defaultToggleOpenList(text)\r\n                                            :\r\n                                            this.performanceToggle(text)\r\n                                    }\r\n                                </div>\r\n                        }\r\n                        </div>\r\n                    </li>\r\n        )\r\n    }\r\n            </CalendarText.Consumer>\r\n        );\r\n    }\r\n    private defaultToggleOpenList(text: CalendarAppText) {\r\n    return <div className=\"reveal-panel\" aria-hidden={false} id={`Tickets_${this.props.production.id}`} ref={this.state.openTogglepanelRef} style={{ height: `${this.state.openTogglepanelHeight}px` }}>\r\n        <div>\r\n            <ul className=\"ace-date-rows\">\r\n                {\r\n                    this.filterPerformanceByDateSelection(this.props.production.events).slice(0, this.state.lastPerformanceLoadedIndex).map(event => <ListEventView key={event.id} event={event} allowTabbing={this.state.ticketPanelOpen} />)}\r\n            </ul>\r\n        </div>\r\n    </div>;\r\n}\r\n    private performanceToggle(text: CalendarAppText) {\r\n    return <div className=\"reveal-panel\" aria-hidden={!this.state.ticketPanelOpen} id={`Tickets_${this.props.production.id}`} ref={this.state.panelRef} style={{ height: `${this.state.panelHeight}px` }}>\r\n        <div>\r\n            <ul className=\"ace-date-rows\">\r\n                {this.props.production.events.slice(0, this.state.lastPerformanceLoadedIndex).map(event => <ListEventView key={event.id} event={event} allowTabbing={this.state.ticketPanelOpen} />)}\r\n            </ul>\r\n            <div className=\"reveal-panel\" style={{ height: `${this.state.morePerformancesPanelHeight}px` }} aria-hidden={!this.state.loadMorePerformances} ref={this.state.morePerformancesPanelRef}>\r\n                <ul className=\"ace-date-rows\">\r\n                    {this.props.production.events.slice(this.state.lastPerformanceLoadedIndex, this.props.production.events.length).map(event => <ListEventView key={event.id} event={event} allowTabbing={this.state.ticketPanelOpen} />)}\r\n                </ul>\r\n            </div>\r\n            {this.props.production.events.length > this.state.lastPerformanceLoadedIndex ?\r\n                <button type=\"button\" className=\"btn\" onClick={this.loadMore}>\r\n                    {this.state.loadMorePerformances ?\r\n                        text.showLessDatesButtonText\r\n                        : text.viewMoreDatesButtonText}\r\n                </button> : null}\r\n        </div>\r\n    </div>;\r\n}\r\n\r\nsinglePerformanceCta() {\r\n    const event = this.props.production.events[0];\r\n    const eventIsOnSale = ((event.currentMosOnSaleDate\r\n        && event.currentMosOnSaleDate < new Date()\r\n        && event.currentMosOnSaleEndDate > new Date()\r\n        && event.soldOut === false)\r\n        || event.onSale === true);\r\n    const isVolunteer = this.props.production.events[0].volunteerPurchase;\r\n    return (\r\n        <div className=\"production-card-footer\">\r\n            {\r\n                eventIsOnSale ?\r\n                    <div className=\"production-card-footer-item\">\r\n\r\n                        <a href={event.buyTicketCtaUrl} className=\"btn-primary\" target={isExternalUrl(event.buyTicketCtaUrl) ? \"_blank\" : null}>\r\n                            {\r\n                                isVolunteer ? event.volunteerbuyTicketCtaText : event.buyTicketCtaText\r\n                            }\r\n\r\n                        </a>\r\n                    </div>\r\n                    :\r\n                    (event.buyTicketCtaText.trim() == \"\" ? null :\r\n                        <div className=\"production-card-footer-item transparent theme-dark\">\r\n                            <p className=\"btn-outline\">\r\n                                {event.notOnSaleText}\r\n                            </p>\r\n                        </div>\r\n                    )\r\n            }\r\n        </div>\r\n    );\r\n}\r\n\r\n\r\nmultiPerformanceList(text: CalendarAppText) {\r\n    return (this.props.production.events.length > 0\r\n        ? (\r\n            <>\r\n                <div className=\"production-card-footer\">\r\n                    <div className=\"production-card-footer-item\">\r\n                        <button type=\"button\" className={this.state.ticketPanelOpen ? \"btn-outline btn-dropdown\" : \"btn-primary btn-dropdown\"} aria-expanded={this.state.ticketPanelOpen} onClick={this.toggleShowingTicketPanel}>\r\n                            {this.state.ticketPanelOpen ? \"Collapse\" : \"View Dates\"}\r\n                        </button>\r\n                    </div>\r\n                </div>\r\n\r\n                {\r\n                    this.props.production.events.length > 8 && this.props.production.viewDetailCtaUrl.length > 0 ?\r\n                        <div className=\"production-card-footer\">\r\n                            <div className=\"production-card-footer-item theme-dark\">\r\n                                <a href={this.props.production.viewDetailCtaUrl} className=\"btn-outline\">\r\n                                    <span dangerouslySetInnerHTML={{ __html: text.viewMoreDatesButtonText }} />\r\n                                </a>\r\n                            </div>\r\n                        </div>\r\n\r\n                        : null\r\n                }\r\n            </>\r\n\r\n        ) : <div className=\"ace-cal-list-day-empty\" dangerouslySetInnerHTML={{ __html: text.emptyDayMessage }}\r\n            aria-labelledby={this.props.production.name}></div>\r\n    );\r\n}\r\n\r\ntoggleShowingTicketPanel = () => {\r\n    this.setState({\r\n        ticketPanelOpen: !this.state.ticketPanelOpen,\r\n        loadMorePerformances: false\r\n    });\r\n    if (this.state.ticketPanelOpen) {\r\n        this.setState({\r\n            loadMorePerformances: false,\r\n            lastPerformanceLoadedIndex: 8\r\n        });\r\n    }\r\n}\r\n}\r\n\r\nexport default ListProductionView;\r\n","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { connect, Dispatch } from 'react-redux';\r\n\r\nimport { ICalendarAppState } from '../redux-state';\r\nimport { nextMonth } from '../redux-state/actions/calendar.actions';\r\nimport CalendarText from '../contexts/calendar-text';\r\n\r\ninterface ILoadMoreExternalProps {\r\n    loadMoreSideEffect: () => void;\r\n}\r\n\r\ninterface StateToProps {\r\n    updating: boolean;\r\n}\r\n\r\ninterface DispatchToProps {\r\n    loadMore: () => void;\r\n}\r\n\r\nexport type LoadMoreProps = StateToProps & DispatchToProps & ILoadMoreExternalProps;\r\n\r\n/**\r\n * Trigger to load more dates. Loads the next month if no queryString date-range is applied, clears the date-range if there is one.\r\n */\r\nexport class LoadMore extends React.Component<LoadMoreProps, any> {\r\n    constructor(props: LoadMoreProps) {\r\n        super(props);\r\n        this.onClick = this.onClick.bind(this);\r\n    }\r\n\r\n    onClick() {\r\n        if (!this.props.updating) {\r\n            this.props.loadMoreSideEffect();\r\n            this.props.loadMore();\r\n           \r\n        }\r\n    }\r\n\r\n    render() {\r\n        return (\r\n            <CalendarText.Consumer>\r\n                {text => (\r\n                    <button type=\"button\" className=\"ace-cal-list-load-more btn-outline space-top-lg\" onClick={this.onClick}>\r\n                        {text.loadMoreEventsButtonText}\r\n                    </button>\r\n                )}\r\n            </CalendarText.Consumer>\r\n        )\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState): StateToProps {\r\n    return {\r\n        updating: state.calendar.updating\r\n    }\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch: Dispatch): DispatchToProps {\r\n    return {\r\n        loadMore: () => { dispatch(nextMonth()); }\r\n    }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(LoadMore);","import * as React from 'react';\r\n\r\nimport { connect, Dispatch } from 'react-redux';\r\nimport { ICalendarAppState } from '../redux-state';\r\nimport { CalendarApi } from '../common/calendar-api';\r\nimport { IEvent, IMonth } from '../interfaces';\r\nimport { updateEvents, updateNextMonthEvents } from '../redux-state/actions/calendar.actions';\r\nimport CalendarText from '../contexts/calendar-text';\r\nimport { CalendarViewMode } from '../redux-state/interfaces/calendar-settings';\r\nimport moment = require('moment');\r\n\r\ninterface IExternalProps {\r\n}\r\n\r\ninterface StateToProps {\r\n    monthToLoad: string;\r\n    updating: boolean;\r\n    filterFunction: (event) => boolean;\r\n    currentViewState: CalendarViewMode;\r\n}\r\n\r\ninterface DispatchToProps {\r\n    saveLoadedEvents: (loadedMonth: string, events: IMonth<IEvent>) => void;\r\n    saveNextLoadedEvents: (loadedMonth: string, events: IMonth<IEvent>) => void;\r\n}\r\n\r\nexport type LoaderProps = IExternalProps & StateToProps & DispatchToProps;\r\n\r\nexport interface LoaderState {\r\n    loading: boolean;\r\n    monthsLoaded: Array<string>;\r\n}\r\n\r\n/**\r\n * Utility class to load additional events.\r\n * \r\n * Also displays a loader animation to prevent users from interacting with the app while data is changing.\r\n */\r\nexport class LoaderBase extends React.Component<LoaderProps, LoaderState> {\r\n    constructor(props: LoaderProps) {\r\n        super(props);\r\n        this.state = {\r\n            loading: this.props.monthToLoad.length > 0,\r\n            monthsLoaded: this.props.monthToLoad.length > 0 ? [this.props.monthToLoad] : []\r\n        };\r\n    }\r\n    componentDidMount() {\r\n        if (this.state.loading) {\r\n            this.loadFromApi();\r\n        }\r\n    }\r\n    componentDidUpdate() {\r\n        if (!this.state.loading || this.state.monthsLoaded.indexOf(this.props.monthToLoad) < 0) {\r\n            if (this.props.monthToLoad.length > 0) {\r\n                this.loadFromApi();\r\n            }\r\n        }\r\n        const superParent = document.documentElement;\r\n\r\n        if (this.props.updating) {\r\n            // attribute removal happens in the views of the components that trigger loading states.\r\n            // removal should happen after all other callback functionality.\r\n            superParent.setAttribute(\"data-calendar-loading\", \"true\");\r\n        } else {\r\n            superParent.removeAttribute(\"data-calendar-loading\");\r\n        }\r\n\r\n    }\r\n    loadFromApi() {\r\n        this.setState({\r\n            loading: true,\r\n            monthsLoaded: this.state.monthsLoaded.indexOf(this.props.monthToLoad) < 0\r\n                ? this.state.monthsLoaded.concat([this.props.monthToLoad]) : this.state.monthsLoaded\r\n        }, () => {\r\n            const startDate = this.props.monthToLoad;\r\n            CalendarApi.getMonth(startDate, this.props.filterFunction).then(month => {\r\n                this.props.saveLoadedEvents(this.props.monthToLoad, month);\r\n                if (this.props.currentViewState != CalendarViewMode.GRID) {\r\n                    this.setState({\r\n                        loading: false\r\n                    });\r\n                }\r\n            });\r\n            const nextmonthMoment = moment(this.props.monthToLoad).add(1, 'month').format(\"YYYY-MM-DD\");\r\n            CalendarApi.getMonth(nextmonthMoment, this.props.filterFunction).then(month => {\r\n                this.props.saveNextLoadedEvents(nextmonthMoment, month);\r\n                this.setState({\r\n                    loading: false\r\n                });\r\n            });\r\n        });\r\n    }\r\n    render() {\r\n        return (\r\n            <CalendarText.Consumer>\r\n                {text => (\r\n                    <div className=\"ace-cal-loading\">\r\n                        <p className=\"visually-hidden\" aria-live=\"polite\">\r\n                            {this.props.updating ? text.calendarLoadingLabel : text.calendarDoneLoadingLabel}\r\n                        </p>\r\n                        {\r\n                            text.loaderImageUrl != \"\" ?\r\n                                <div>\r\n                                    <img src={text.loaderImageUrl}/>\r\n                                </div>\r\n                                :\r\n                                <div className=\"ace-cal-loader-container\" role=\"presentation\">\r\n                                    <div className=\"ace-cal-loader\"></div>\r\n                                </div>\r\n                        }\r\n                    </div>\r\n                )}\r\n            </CalendarText.Consumer>\r\n        );\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState, ownProps: IExternalProps): StateToProps {\r\n    return {\r\n        monthToLoad: state.calendar.monthToLoad,\r\n        updating: state.calendar.updating,\r\n        filterFunction: state.calendar.filterFunction,\r\n        currentViewState: state.calendarSettings.calendarViewMode\r\n    }\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch: Dispatch): DispatchToProps {\r\n    return {\r\n        saveLoadedEvents: (loadedMonth: string, events: IMonth<IEvent>) => { dispatch(updateEvents(loadedMonth, events)) },\r\n        saveNextLoadedEvents: (loadedMonth: string, events: IMonth<IEvent>) => { dispatch(updateNextMonthEvents(loadedMonth, events)) }\r\n    }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(LoaderBase);\r\n","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { debounce } from 'lodash';\r\nimport { scrollToHeading } from '../../helpers/scroll-to-heading';\r\n\r\nimport { connect, Dispatch } from 'react-redux';\r\nimport { ICalendarAppState } from '../../redux-state';\r\nimport { setDate, nextMonth, previousMonth, openMiniCalDialog, closeMiniCalDialog, setCurrentMonth, upsertEventFilter } from '../../redux-state/actions/calendar.actions';\r\nimport { MiniCalendarFooterViewProps } from './footer.view';\r\nimport { MiniCalendarGridItemViewProps } from './grid-item.view';\r\nimport { MiniCalendarControlsViewProps } from './controls.view';\r\nimport { MiniCalendarGridViewProps } from './grid.view';\r\nimport MiniCalendarContainerView from './container.view';\r\nimport { focusTrap } from '../../helpers/focus-trap';\r\nimport { IEvent, IDay } from '../../interfaces';\r\nimport { ICalendar } from '../../interfaces';\r\nimport { getCookie, dateCookieName } from '../../helpers/cookie-helper';\r\nimport { IEventFilter } from '../../classes/calendar';\r\n\r\nconst weekdays = moment.weekdays().map(dayName => dayName.toLowerCase());\r\nconst today = () => moment().clone().startOf('day');\r\n\r\n/** INTERFACES AND TYPES **/\r\n\r\n/**\r\n * Props coming from Store\r\n */\r\ninterface StateToProps {\r\n    currentDate: moment.Moment;\r\n    currentMonth: moment.Moment;\r\n    miniCalDialogOpen: boolean;\r\n    desktopToMobileTransitionWidth: number;\r\n    validMonths: moment.Moment[];\r\n    calendarEvents: ICalendar<IEvent>[];\r\n    currentScrolledDate: moment.Moment;\r\n}\r\n\r\n/**\r\n * Dispatch methods coming from Redux\r\n */\r\ninterface DispatchToProps {\r\n    setDate: (newDate: moment.Moment) => void;\r\n    setCurrentMonth: (newDate: moment.Moment) => void;\r\n    setNextMonth: () => void;\r\n    setPreviousMonth: () => void;\r\n    openMiniCalDialog: (trigger: HTMLButtonElement) => void;\r\n    closeMiniCalDialog: () => void;\r\n}\r\n\r\n/**\r\n * Store and Dispatch props as a single type\r\n */\r\nexport type MiniCalendarProps = StateToProps & DispatchToProps;\r\n\r\n/**\r\n * Mini Calendar internal state\r\n */\r\nexport interface MiniCalendarState {\r\n    nextMonthRef: React.RefObject<HTMLButtonElement>;\r\n    previousMonthRef: React.RefObject<HTMLButtonElement>;\r\n    todayRef: React.RefObject<HTMLButtonElement>;\r\n    footerRef: React.RefObject<HTMLDivElement>;\r\n    gridDates: MiniCalendarGridItemViewProps[];\r\n    activeDate: number;\r\n    dateWasClicked: boolean;\r\n    todayWasClicked: boolean;\r\n    previousMonthWasClicked: boolean;\r\n    shiftFocusToActiveDate: boolean;\r\n    shiftFocusToFirstOfMonth: boolean;\r\n    useModal: boolean;\r\n    firstRef: React.RefObject<HTMLDivElement>;\r\n    currentScrolledDate: moment.Moment;\r\n}\r\n\r\nenum KeyCode {\r\n    tab = 9,\r\n    left = 37,\r\n    up = 38,\r\n    right = 39,\r\n    down = 40\r\n}\r\n\r\n\r\nclass MiniCalendar extends React.Component<MiniCalendarProps, MiniCalendarState> {\r\n    private datesMemo: {};\r\n    constructor(props: any) {\r\n        super(props);\r\n\r\n        this.handlePreviousMonthClick = this.handlePreviousMonthClick.bind(this);\r\n        this.handleTodayClick = this.handleTodayClick.bind(this);\r\n        this.handleTodayTab = this.handleTodayTab.bind(this);\r\n        this.handleGridKeyEvent = this.handleGridKeyEvent.bind(this);\r\n        this.handleFooterShiftTab = this.handleFooterShiftTab.bind(this);\r\n        this.handleResize = this.handleResize.bind(this);\r\n\r\n        this.state = this.initialState;\r\n\r\n        let cookieDate = getCookie(dateCookieName);\r\n        if (cookieDate) {\r\n            this.props.setCurrentMonth(moment(cookieDate));\r\n        }\r\n\r\n    }\r\n\r\n    /** LIFECYCLE METHODS **/\r\n\r\n    /**\r\n     * Return JSX to render mini-calendar\r\n     */\r\n    render() {\r\n        const trap = focusTrap(this.state.firstRef, this.state.footerRef, () => this.state.useModal && this.props.miniCalDialogOpen);\r\n        return <MiniCalendarContainerView {...this.props} {...this.state} controlsProps={this.controlsProps} gridProps={this.gridProps} footerProps={this.footerProps} handleKeyDown={trap} />\r\n    }\r\n\r\n    /**\r\n     * Shift mini-calendar in and out of modal based on screen size\r\n     */\r\n    componentDidMount() {\r\n        this.handleResize();\r\n        window.addEventListener('resize', debounce(this.handleResize, 50));\r\n    }\r\n    handleResize() {\r\n        const useModal = this.props.desktopToMobileTransitionWidth >= window.innerWidth;\r\n        if (useModal != this.state.useModal) {\r\n            this.setState({\r\n                useModal\r\n            });\r\n        }\r\n        if (this.props.miniCalDialogOpen && !useModal) {\r\n            this.props.closeMiniCalDialog();\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Checks whether or not to re-render this component's children\r\n     */\r\n    shouldComponentUpdate(nextProps: MiniCalendarProps) {\r\n        return this.props.miniCalDialogOpen !== nextProps.miniCalDialogOpen ||\r\n            this.props.currentDate.toDate() !== nextProps.currentDate.toDate() ||\r\n            this.props.currentMonth.toDate() !== nextProps.currentMonth.toDate() ||\r\n            this.props.calendarEvents !== nextProps.calendarEvents ||\r\n            !this.props.currentScrolledDate.isSame(nextProps.currentScrolledDate);\r\n    }\r\n\r\n    /**\r\n     * Handle update scenarios\r\n     */\r\n    componentDidUpdate(oldProps: MiniCalendarProps) {\r\n        this.handleResize();\r\n        const now = today();\r\n\r\n        // track whether we should be shifting focus\r\n        let shiftFocus = false;\r\n\r\n        // collect any state changes\r\n        const stateChanges: any = {};\r\n\r\n        // get a reference to the grid dates for current month\r\n        const gridDates = this.gridDates(this.props.currentMonth);\r\n        const firstGridIndexWhere = firstIndexFinder(gridDates);\r\n\r\n        // if currentMonth changed\r\n        if (this.props.currentMonth != oldProps.currentMonth || this.props.calendarEvents !== oldProps.calendarEvents) {\r\n            // update gridDates\r\n            stateChanges.gridDates = gridDates;\r\n\r\n            // update activeDate to first of month\r\n            const activeDate = firstGridIndexWhere(date => date.sameMonth && !!date.click);\r\n            if (activeDate >= 0) {\r\n                stateChanges.activeDate = activeDate;\r\n\r\n                // if month was changed via key-command\r\n                if (this.state.shiftFocusToFirstOfMonth) {\r\n                    stateChanges.shiftFocusToFirstOfMonth = false;\r\n                    if (activeDate >= 0) {\r\n                        shiftFocus = true;\r\n                    }\r\n                }\r\n            }\r\n\r\n            // check if focus should be shifted to \"Next Month\" button\r\n            if (this.state.previousMonthWasClicked) {\r\n                stateChanges.previousMonthWasClicked = false;\r\n\r\n                // if new currentMonth is same as today.startOf('month')\r\n                if (this.props.currentMonth.isSame(now.startOf('month'))) {\r\n                    const activeDate = firstGridIndexWhere(date => !!date.click && date.sameMonth);\r\n                    if (activeDate >= 0) {\r\n                        stateChanges.activeDate = activeDate;\r\n                        shiftFocus = false;\r\n                    }\r\n                    // manually shift focus\r\n                    this.focusRef(this.state.nextMonthRef);\r\n                }\r\n            }\r\n        }\r\n\r\n        // if currentDate changed\r\n        if (!this.props.currentDate.isSame(oldProps.currentDate)) {\r\n            const activeDate = firstGridIndexWhere(date => this.props.currentDate.isSame(date.moment));\r\n            if (activeDate >= 0) {\r\n                stateChanges.activeDate = activeDate;\r\n                if (this.state.dateWasClicked) {\r\n                    stateChanges.dateWasClicked = false;\r\n                }\r\n            }\r\n        }\r\n\r\n        // if \"today\" button was clicked\r\n        if (this.state.todayWasClicked) {\r\n            const activeDate = firstGridIndexWhere(date => now.isSame(date.moment));\r\n            if (activeDate >= 0) {\r\n                stateChanges.todayWasClicked = false;\r\n\r\n                // update activeDate\r\n                stateChanges.activeDate = activeDate;\r\n\r\n                // and shift focus\r\n                shiftFocus = true;\r\n            }\r\n        }\r\n\r\n        if (this.props.miniCalDialogOpen && !oldProps.miniCalDialogOpen) {\r\n            this.state.firstRef.current.focus();\r\n        }\r\n\r\n        // commit any changes\r\n        this.commit(stateChanges, shiftFocus);\r\n    }\r\n\r\n    /**\r\n     * \r\n     * @param stateChanges An object which, if it contains any keys matching the state object, will be merged into the new state\r\n     * @param shiftFocus A flag which indicates whether focus should be shifted to the active date after state updates\r\n     */\r\n    commit(stateChanges: any, shiftFocus?: boolean) {\r\n        if (Object.keys(stateChanges).some(key => key in this.state)) {\r\n            this.setState(stateChanges, () => {\r\n                if (shiftFocus) {\r\n                    this.focusActiveDate();\r\n                }\r\n            });\r\n        }\r\n    }\r\n\r\n    /** FOCUS CONTROL **/\r\n\r\n    /**\r\n     * Shift focus to a RefObject\r\n     */\r\n    focusRef(ref: any) {\r\n        ref.current.focus();\r\n    }\r\n\r\n    /**\r\n     * Shift focus to the active date\r\n     */\r\n    focusActiveDate() {\r\n        if (this.state.gridDates) {\r\n            const active = this.state.gridDates[this.state.activeDate];\r\n            if (active.buttonRef.current) {\r\n                this.focusRef(active.buttonRef);\r\n            }\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Handle activeDate changes from arrow key events\r\n     */\r\n    handleFocusShift(days: number) {\r\n        if ((days > 0 && this.state.activeDate + days < this.state.gridDates.length) || (days < 0 && this.state.activeDate + days >= this.firstValidDate)) {\r\n            this.setState({\r\n                activeDate: this.state.activeDate + days\r\n            }, this.focusActiveDate);\r\n        }\r\n    }\r\n\r\n    /** EVENT HANDLERS **/\r\n\r\n    /**\r\n     * Handle key events targeting grid dates\r\n     */\r\n    handleGridKeyEvent(e: React.KeyboardEvent<HTMLButtonElement>) {\r\n        if (e.shiftKey) {\r\n            if (e.keyCode === KeyCode.up || e.keyCode === KeyCode.left) {\r\n                // Shift + Up/Left\r\n                e.preventDefault();\r\n                this.setState({\r\n                    shiftFocusToFirstOfMonth: true\r\n                }, this.props.setPreviousMonth);\r\n            } else if (e.keyCode === KeyCode.down || e.keyCode === KeyCode.right) {\r\n                // Shift + Down/Right\r\n                e.preventDefault();\r\n                this.setState({\r\n                    shiftFocusToFirstOfMonth: true\r\n                }, this.props.setNextMonth);\r\n            } else if (e.keyCode === KeyCode.tab) {\r\n                // Shift + Tab\r\n                e.preventDefault();\r\n                this.focusRef(this.state.todayRef);\r\n            }\r\n        } else {\r\n            if (e.keyCode === KeyCode.up) {\r\n                // Up\r\n                e.preventDefault();\r\n                this.handleFocusShift(-7);\r\n            } else if (e.keyCode === KeyCode.left) {\r\n                // Left\r\n                e.preventDefault();\r\n                this.handleFocusShift(-1);\r\n            } else if (e.keyCode === KeyCode.down) {\r\n                // Down\r\n                e.preventDefault();\r\n                this.handleFocusShift(7);\r\n            } else if (e.keyCode === KeyCode.right) {\r\n                // Right\r\n                e.preventDefault();\r\n                this.handleFocusShift(1);\r\n            } else if (e.keyCode === KeyCode.tab) {\r\n                // Tab\r\n                e.preventDefault();\r\n                this.focusRef(this.state.footerRef);\r\n            }\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Focus on the active Next Month button\r\n     */\r\n    handlePreviousMonthClick() {\r\n        this.setState({\r\n            previousMonthWasClicked: true\r\n        }, () => {\r\n            this.props.setPreviousMonth();\r\n            scrollToHeading(moment(this.props.currentMonth.clone().subtract(1, 'month').startOf('month')), true);\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Update the date then \r\n     */\r\n    handleTodayClick() {\r\n        this.setState({\r\n            todayWasClicked: true\r\n        }, () => this.props.setDate(today()));\r\n    }\r\n\r\n    handleMonthChange(evt: React.ChangeEvent<HTMLSelectElement>) {\r\n        const selectedMonth = moment(evt.target.value, \"X\");\r\n        this.setState({\r\n            todayWasClicked: false\r\n        }, () => {\r\n            this.props.setCurrentMonth(selectedMonth.clone().startOf('month'));\r\n        })\r\n    }\r\n\r\n    /**\r\n     * Focus on the active Grid Date if key event is `tab`\r\n     */\r\n    handleTodayTab(e: React.KeyboardEvent<HTMLButtonElement>) {\r\n        if (!e.shiftKey && e.keyCode === KeyCode.tab) {\r\n            e.preventDefault();\r\n            this.focusActiveDate();\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Focus on the active Grid Date if key event is `shift + tab`\r\n     */\r\n    handleFooterShiftTab(e: React.KeyboardEvent<HTMLDivElement>) {\r\n        if (e.shiftKey && e.keyCode === KeyCode.tab) {\r\n            e.preventDefault();\r\n            this.focusActiveDate();\r\n        }\r\n    }\r\n\r\n    /** FACTORIES / ACCESSORS **/\r\n\r\n    /**\r\n     * Returns array of props for Mini Calendar Grid Item Views\r\n     */\r\n    gridDates(month: moment.Moment): MiniCalendarGridItemViewProps[] {\r\n        if (!this.datesMemo) {\r\n            // initialize caching\r\n            this.datesMemo = {};\r\n        }\r\n        const memoDates = this.datesMemo[month.toString()];\r\n        //if (!!memoDates) {\r\n        //    // return cached if available\r\n        //    return memoDates;\r\n        //} else {\r\n        const now = today();\r\n\r\n        // find first-of-month offset\r\n        const firstIndex = weekdays.indexOf(month.format('dddd').toLowerCase());\r\n\r\n        // fill moments list\r\n        let day = month.clone().add(-firstIndex, 'days');\r\n        const endOfMonth = month.clone().endOf('month');\r\n        const moments: moment.Moment[] = [];\r\n        while (day <= endOfMonth) {\r\n            moments.push(day);\r\n            day = day.clone();\r\n            day.add(1, 'day');\r\n        }\r\n\r\n        const allEvents: IDay<IEvent>[] = this.props.calendarEvents ? this.props.calendarEvents.reduce((old, curr) => {\r\n            return old.concat(curr.days);\r\n        }, []) : null;\r\n\r\n        // fill days list\r\n        const days: MiniCalendarGridItemViewProps[] = moments.map(day => {\r\n            const todayEvents = allEvents ? allEvents.filter(eventDay => {\r\n                return moment(eventDay.date).clone().startOf(\"day\").isSame(day.clone().startOf(\"day\"))\r\n            }) : null;\r\n\r\n            const hasEvents = todayEvents && todayEvents.length > 0 ? todayEvents[0].events.length > 0 : false;\r\n\r\n            return {\r\n                click: day < now\r\n                    ? undefined\r\n                    : () => {\r\n                        this.setState({\r\n                            dateWasClicked: true\r\n                        }, () => {\r\n                            if (this.props.miniCalDialogOpen) {\r\n                                this.props.closeMiniCalDialog();\r\n                            }\r\n                            this.props.setDate(day);\r\n                        });\r\n                    },\r\n                handleKeyEvent: this.handleGridKeyEvent,\r\n                moment: day,\r\n                day: day.date(),\r\n                buttonRef: React.createRef<HTMLButtonElement>(),\r\n                sameMonth: !(day < month),\r\n                today: day.isSame(now),\r\n                hasEvents: hasEvents,\r\n                isCurrentDate: this.props.currentScrolledDate.isSame(day)\r\n            }\r\n        });\r\n\r\n        // cache results\r\n        this.datesMemo[month.toString()] = days;\r\n\r\n        return days;\r\n        //}\r\n    }\r\n\r\n    /**\r\n     * Return the index of the first clickable date\r\n     */\r\n    get firstValidDate(): number {\r\n        return firstIndexByPredicate(this.state.gridDates, date => !!date.click);\r\n    }\r\n\r\n    /**\r\n     * Returns initial state for the Mini Calendar\r\n     */\r\n    get initialState(): MiniCalendarState {\r\n        const currentMonth = this.props.currentMonth;\r\n\r\n        // initialize state props\r\n        const nextMonthRef = React.createRef<HTMLButtonElement>();\r\n        const previousMonthRef = React.createRef<HTMLButtonElement>();\r\n        const todayRef = React.createRef<HTMLButtonElement>();\r\n        const footerRef = React.createRef<HTMLDivElement>();\r\n        const gridDates = this.gridDates(currentMonth);\r\n        const activeDate = firstIndexByPredicate(gridDates, date => date.moment.clone().startOf('day').isSame(today()));\r\n        const dateWasClicked = false;\r\n        const todayWasClicked = false;\r\n        const previousMonthWasClicked = false;\r\n        const shiftFocusToActiveDate = false;\r\n        const shiftFocusToFirstOfMonth = false;\r\n        const useModal = false;\r\n        const firstRef = React.createRef<HTMLDivElement>();\r\n        const currentScrolledDate = this.props.currentDate;\r\n\r\n        // return state object\r\n        return {\r\n            nextMonthRef,\r\n            previousMonthRef,\r\n            todayRef,\r\n            footerRef,\r\n            gridDates,\r\n            activeDate,\r\n            todayWasClicked,\r\n            dateWasClicked,\r\n            previousMonthWasClicked,\r\n            shiftFocusToActiveDate,\r\n            shiftFocusToFirstOfMonth,\r\n            useModal,\r\n            firstRef,\r\n            currentScrolledDate\r\n        };\r\n    }\r\n\r\n    /**\r\n     * Returns props for the Mini Calendar Controls View\r\n     */\r\n    private get controlsProps(): MiniCalendarControlsViewProps {\r\n        return {\r\n            currentMonth: this.props.currentMonth,\r\n            handleNextMonthClick: this.props.setNextMonth,\r\n            handlePreviousMonthClick: this.handlePreviousMonthClick,\r\n            handleTodayClick: this.handleTodayClick,\r\n            handleMonthChange: this.handleMonthChange.bind(this),\r\n            nextMonthRef: this.state.nextMonthRef,\r\n            previousMonthRef: this.state.previousMonthRef,\r\n            todayRef: this.state.todayRef,\r\n            handleTodayTab: this.handleTodayTab,\r\n            displayPreviousMonth: this.props.currentMonth > today().startOf('month'),\r\n            validMonths: this.props.validMonths\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Returns props for the Mini Calendar Grid View\r\n     */\r\n    private get gridProps(): MiniCalendarGridViewProps {\r\n        return {\r\n            gridDates: this.state.gridDates\r\n        };\r\n    }\r\n\r\n    /**\r\n     * Returns props for the Mini Calendar Footer View\r\n     */\r\n    private get footerProps(): MiniCalendarFooterViewProps {\r\n        return {\r\n            footerRef: this.state.footerRef,\r\n            handleKeyDown: this.handleFooterShiftTab\r\n        }\r\n    }\r\n}\r\n\r\n/** REDUX SETUP **/\r\n\r\n/**\r\n * Map global store to state-half of MiniCalendarProps\r\n */\r\nfunction mapStateToProps(state: ICalendarAppState): StateToProps {\r\n    const monthEvents = (state.calendar.filteredEvents.filter(eventMonth => {\r\n        return state.calendar.currentMonth.clone().startOf(\"month\").isSame(eventMonth.monthMoment.clone().startOf(\"month\")) ||\r\n            state.calendar.currentMonth.clone().startOf(\"month\").isSame(eventMonth.monthMoment.clone().add(1, \"month\"))\r\n    })).map(month => month.events);\r\n\r\n    return {\r\n        currentDate: state.calendar.currentDate,\r\n        currentMonth: state.calendar.currentMonth,\r\n        miniCalDialogOpen: state.calendar.miniCalDialogOpen,\r\n        desktopToMobileTransitionWidth: parseInt(state.calendarSettings.desktopToMobileTransitionWidth),\r\n        validMonths: state.calendarSettings.monthsOnCalendar,\r\n        calendarEvents: monthEvents ? monthEvents : null,\r\n        currentScrolledDate: state.calendar.currentScrolledDate\r\n    }\r\n}\r\n\r\n/**\r\n * Map global dispatchers to dispatch-half of MiniCalendarProps\r\n */\r\nfunction mapDispatchToProps(dispatch: Dispatch): DispatchToProps {\r\n    return {\r\n        setDate: (newDate: moment.Moment) => {\r\n           dispatch(setDate(newDate));\r\n        },\r\n        setCurrentMonth: (newDate: moment.Moment) => dispatch(setCurrentMonth(newDate)),\r\n        setNextMonth: () => dispatch(nextMonth()),\r\n        setPreviousMonth: () => dispatch(previousMonth()),\r\n        openMiniCalDialog: (trigger: HTMLButtonElement) => dispatch(openMiniCalDialog(trigger)),\r\n        closeMiniCalDialog: () => dispatch(closeMiniCalDialog())\r\n    }\r\n}\r\n\r\nexport default connect<StateToProps, DispatchToProps>(mapStateToProps, mapDispatchToProps)(MiniCalendar);\r\n\r\n/** UTILITIES **/\r\n\r\n/**\r\n * Higher-order function to curry the index finder\r\n * @param haystack \r\n */\r\nfunction firstIndexFinder<T>(haystack: T[]) {\r\n    return function find(predicate: (date: T) => boolean) {\r\n        return firstIndexByPredicate(haystack, predicate);\r\n    }\r\n}\r\n\r\n/**\r\n * Finds the index of the first entry satisfying the predicate function\r\n * \r\n * @param haystack the array of grid item view props to search\r\n * @param predicate the function to match\r\n */\r\nfunction firstIndexByPredicate<T>(haystack: T[], predicate: (date: T) => boolean): number {\r\n    for (let i = 0; i < haystack.length; i++) {\r\n        if (predicate(haystack[i])) {\r\n            return i;\r\n        }\r\n    }\r\n    return -1;\r\n}","import * as React from 'react';\r\n\r\nimport { MiniCalendarState, MiniCalendarProps } from './container';\r\nimport { MiniCalendarControlsView, MiniCalendarControlsViewProps } from './controls.view';\r\nimport { MiniCalendarGridView, MiniCalendarGridViewProps } from './grid.view';\r\nimport { MiniCalendarFooterView, MiniCalendarFooterViewProps } from './footer.view';\r\n\r\nexport interface MiniCalendarContainerViewProps extends MiniCalendarProps, MiniCalendarState {\r\n    controlsProps: MiniCalendarControlsViewProps;\r\n    gridProps: MiniCalendarGridViewProps;\r\n    footerProps: MiniCalendarFooterViewProps;\r\n\r\n    firstRef: React.RefObject<HTMLDivElement>;\r\n\r\n    closeMiniCalDialog: () => void;\r\n    handleKeyDown: (e: React.KeyboardEvent) => void;\r\n}\r\n\r\n/**\r\n * Displays the mini-calendar in different contexts depending on window size.\r\n */\r\nconst MiniCalendarContainerView: React.FunctionComponent<MiniCalendarContainerViewProps> = props => {\r\n\r\n    return (\r\n        <div className=\"mini-cal-column grid-col\">\r\n            {\r\n                props.useModal\r\n                    ? <div className=\"modal-wrapper mini-cal-modal\" onKeyDown={props.handleKeyDown}>\r\n                        <div data-modal className=\"modal-container\" aria-hidden={!props.miniCalDialogOpen}>\r\n                            <div tabIndex={-1} data-a11y-dialog-hide ref={props.firstRef} className=\"modal-overlay\" onClick={props.closeMiniCalDialog} />\r\n                            <div role=\"dialog\" aria-labelledby=\"calModalTitle\" className=\"modal-dialog\">\r\n                                <div className=\"modal-inner\">\r\n                                    <div className=\"modal-header\">\r\n                                        <h1 className=\"h3-style\" id=\"calModalTitle\">Jump to Month</h1>\r\n                                        <button type=\"button\" data-a11y-dialog-hide aria-label=\"Close this dialog\" className=\"modal-close x-btn\" onClick={props.closeMiniCalDialog}></button>\r\n                                    </div>\r\n\r\n                                    <div className=\"mini-cal-nav\">\r\n                                        <nav className=\"mini-cal-modal-inner\" aria-labelledby=\"MiniCal_Heading\">\r\n                                            <MiniCalendarControlsView {...props.controlsProps} />\r\n                                            <MiniCalendarGridView {...props.gridProps} />\r\n                                            {/*<MiniCalendarFooterView {...props.footerProps} />*/}\r\n                                        </nav>\r\n\r\n                                        <button type=\"button\" data-a11y-dialog-hide aria-label=\"Close this dialog\" className=\"modal-close btn\" onClick={props.closeMiniCalDialog}>Done</button>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    :\r\n                    <div className=\"mini-cal-nav\">\r\n                        <nav className=\"mini-cal-container\" aria-labelledby=\"MiniCal_Heading\">\r\n                            <MiniCalendarControlsView {...props.controlsProps} />\r\n                            <MiniCalendarGridView {...props.gridProps} />\r\n                            {/*<MiniCalendarFooterView {...props.footerProps} />*/}\r\n                        </nav>\r\n                    </div>\r\n            }\r\n        </div>\r\n    )\r\n}\r\n\r\nexport default MiniCalendarContainerView;","import * as React from 'react';\r\nimport CalendarText from '../../contexts/calendar-text';\r\nimport moment = require('moment');\r\nimport { formatDateTime } from '../../helpers/format-date-time';\r\n\r\nconst monthFormat = \"MMMM YYYY\";\r\n\r\nexport interface MiniCalendarControlsViewProps {\r\n    currentMonth: moment.Moment;\r\n    handleNextMonthClick: () => void;\r\n    handlePreviousMonthClick: () => void;\r\n    handleMonthChange: (evt: React.ChangeEvent<HTMLSelectElement>) => void;\r\n    handleTodayClick: () => void;\r\n    handleTodayTab: (e: React.KeyboardEvent<HTMLButtonElement>) => void;\r\n    nextMonthRef: React.RefObject<HTMLButtonElement>;\r\n    previousMonthRef: React.RefObject<HTMLButtonElement>;\r\n    todayRef: React.RefObject<HTMLButtonElement>;\r\n    displayPreviousMonth: boolean;\r\n    validMonths: moment.Moment[];\r\n}\r\n\r\n/**\r\n * The controls interface for navigating between months, includes helpful instructions for keyboard / SR users.\r\n */\r\nexport const MiniCalendarControlsView: React.FunctionComponent<MiniCalendarControlsViewProps> = (props) => {\r\n    return (\r\n        <CalendarText.Consumer>\r\n            {text => (\r\n                <>\r\n                    <a href=\"#Events_Header\" className=\"mini-cal-skip-link\">{text.skipToEventsButtonText}</a>\r\n                    <h2 className=\"visually-hidden\" id=\"MiniCal_Heading\">{text.miniCalendarHiddenHeading}</h2>\r\n                    <p className=\"mini-cal-nav-instructions mini-cal-skip-link\" tabIndex={0}>\r\n                        {text.keyboardInstructions}\r\n                    </p>\r\n                    <div className=\"mini-cal-month\">\r\n                        <h3 className=\"visually-hidden\">{formatDateTime(props.currentMonth, monthFormat)}</h3>\r\n                        <div className=\"stack-xs mini-cal-month-header\">\r\n                            <label htmlFor=\"MonthDropdown\">{text.monthDropdownDescriptionText}</label>\r\n                            <select value={props.currentMonth.format(\"X\")} id=\"MonthDropdown\" onChange={props.handleMonthChange}>\r\n                                {\r\n                                    props.validMonths.map(month => <option key={month.format(\"X\")} value={month.format(\"X\")}>{month.format(monthFormat)}</option>)\r\n                                }\r\n                            </select>\r\n                        </div>\r\n                    </div>\r\n                </>\r\n            )}\r\n        </CalendarText.Consumer>\r\n    )\r\n}\r\n","import * as React from 'react';\r\nimport moment from 'moment';\r\n\r\nexport interface MiniCalendarGridItemViewProps {\r\n    click?: () => void;\r\n    handleKeyEvent: (e: React.KeyboardEvent<HTMLButtonElement>) => void;\r\n    day: number;\r\n    moment: moment.Moment;\r\n    buttonRef: React.RefObject<HTMLButtonElement>;\r\n    sameMonth: boolean;\r\n    hasEvents: boolean;\r\n    today: boolean;\r\n    isCurrentDate: boolean;\r\n}\r\n\r\n\r\n\r\n/**\r\n * A grid-item in the mini-calendar. Has various classNames based on the props.\r\n */\r\nexport const MiniCalendarGridItemView: React.FunctionComponent<MiniCalendarGridItemViewProps> = props => {\r\n    let liClassName = !props.sameMonth\r\n        ? \"mini-cal-day-inactive\"\r\n        : \"mini-cal-day\";\r\n    liClassName += (props.sameMonth && !props.click) || (props.sameMonth && !props.hasEvents)\r\n        ? \" mini-cal-day-disabled\"\r\n        : \"\";\r\n    if (props.today) {\r\n        liClassName += \" mini-cal-day-today\";\r\n    }\r\n    if (props.click && props.sameMonth) {\r\n        return (\r\n            <li className={liClassName}>\r\n                <button className=\"mini-cal-day-btn\" disabled={!props.hasEvents} type=\"button\" ref={props.buttonRef} onKeyDown={props.handleKeyEvent} onClick={props.click} data-currentdate={props.isCurrentDate}>\r\n                    <span className=\"visually-hidden\">\r\n                        {`${props.moment.format('dddd, MMMM')} `}\r\n                    </span>\r\n                    {props.day}\r\n                </button>\r\n            </li>\r\n        );\r\n    } else {\r\n        return (\r\n            <li className={liClassName}>\r\n             <button className=\"mini-cal-day-btn\" disabled={!props.hasEvents} type=\"button\" ref={props.buttonRef} onKeyDown={props.handleKeyEvent} onClick={props.click} data-currentdate={props.isCurrentDate}>\r\n                    <span className=\"visually-hidden\">\r\n                        {`${props.moment.format('dddd, MMMM')} `}\r\n                    </span>\r\n                 \r\n                    {props.day}\r\n                </button>\r\n            </li>\r\n        );\r\n    }\r\n}\r\n","import * as React from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { MiniCalendarGridItemViewProps, MiniCalendarGridItemView } from './grid-item.view';\r\n\r\nexport interface MiniCalendarGridViewProps {\r\n    gridDates: MiniCalendarGridItemViewProps[];\r\n}\r\n\r\nconst weekdays = moment.weekdays(true).map((weekday, index) => (\r\n    <li key={index} className=\"mini-cal-weekday\">{weekday.substr(0, 2)}</li>\r\n));\r\n\r\n/**\r\n * Renders all of the weekdays and grid items.\r\n */\r\nexport const MiniCalendarGridView: React.FunctionComponent<MiniCalendarGridViewProps> = (props) => {\r\n    return (\r\n        <>\r\n            <ul className=\"mini-cal-weekdays\">\r\n                {weekdays}\r\n            </ul>\r\n            <ul className=\"mini-cal-days\">\r\n                {props.gridDates.map((props, index) => (\r\n                    <MiniCalendarGridItemView key={index} {...props} />\r\n                ))}\r\n            </ul>\r\n        </>\r\n    )\r\n}","import * as React from 'react';\r\nimport { connect, Dispatch } from 'react-redux';\r\nimport { ICalendarAppState } from '../redux-state';\r\nimport { closeFiltersDialog, closeMiniCalDialog } from '../redux-state/actions/calendar.actions';\r\n\r\ninterface StateToProps {\r\n    filtersDialogOpen: boolean;\r\n    miniCalDialogOpen: boolean;\r\n}\r\n\r\ninterface DispatchToProps {\r\n    closeFiltersDialog: () => void;\r\n    closeMiniCalDialog: () => void;\r\n}\r\n\r\nexport type ModalHelperProps = StateToProps & DispatchToProps;\r\n\r\n/**\r\n * Utility class to bind the escape key to close modals.\r\n */\r\nexport class ModalHelperBase extends React.Component<ModalHelperProps> {\r\n    constructor(props: ModalHelperProps) {\r\n        super(props);\r\n\r\n        this.bindEscKey = this.bindEscKey.bind(this);\r\n        this.bindEscKey();\r\n    }\r\n\r\n    bindEscKey() {\r\n        document.body.addEventListener('keydown', (e: KeyboardEvent) => {\r\n            if (e.which === 27) {\r\n                if (this.props.filtersDialogOpen) {\r\n                    this.props.closeFiltersDialog();\r\n                } else if (this.props.miniCalDialogOpen) {\r\n                    this.props.closeMiniCalDialog();\r\n                }\r\n            }\r\n        });\r\n    }\r\n\r\n    render() {\r\n        return null;\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState): StateToProps {\r\n    return {\r\n        filtersDialogOpen: state.calendar.filtersDialogOpen,\r\n        miniCalDialogOpen: state.calendar.miniCalDialogOpen\r\n    }\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch: Dispatch): DispatchToProps {\r\n    return {\r\n        closeFiltersDialog: () => { dispatch(closeFiltersDialog()); },\r\n        closeMiniCalDialog: () => { dispatch(closeMiniCalDialog()); }\r\n    }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ModalHelperBase);\r\n","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { connect, Dispatch } from 'react-redux';\r\n\r\nimport { ICalendarAppState } from '../../redux-state';\r\nimport { ICalendarAppText } from '../../redux-state/interfaces/text/calendar-app.text';\r\nimport MonthSelectionDropdownView from './month-selection-dropdown.view';\r\nimport { goToMonth } from '../../redux-state/actions/calendar.actions';\r\nimport { removeLoader } from '../../helpers/scroll-to-month';\r\n\r\n\r\ninterface IMonthSelectionDropdownExternalProps {\r\n}\r\n\r\ninterface StateToProps {\r\n    text: ICalendarAppText;\r\n    currentMonth: moment.Moment;\r\n    validMonths: moment.Moment[];\r\n}\r\n\r\ninterface DispatchToProps {\r\n    goToMonth: (date: moment.Moment) => void;\r\n}\r\n\r\nexport type MonthSelectionDropdownProps = IMonthSelectionDropdownExternalProps & StateToProps & DispatchToProps;\r\n\r\nexport class MonthSelectionDropdownBase extends React.Component<MonthSelectionDropdownProps, any> {\r\n    render() {\r\n        return (\r\n            <MonthSelectionDropdownView {...this.props} />\r\n        )\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState, ownProps: IMonthSelectionDropdownExternalProps): StateToProps {\r\n    return {\r\n        text: state.calendarText,\r\n        currentMonth: state.calendar.currentDate,\r\n        validMonths: state.calendarSettings.monthsOnCalendar\r\n    }\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch: Dispatch): DispatchToProps {\r\n    return {\r\n        goToMonth: (date: moment.Moment) => {\r\n            dispatch(goToMonth(date))\r\n            setTimeout(() => removeLoader(), 2000);\r\n        }\r\n    }\r\n}\r\n\r\nexport default connect<StateToProps, DispatchToProps>(mapStateToProps, mapDispatchToProps)(MonthSelectionDropdownBase);","import * as React from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { ICalendarState, IMonth, IDay } from '../../classes/calendar';\r\nimport { connect, Dispatch } from 'react-redux';\r\nimport { ICalendarAppState } from '../../redux-state';\r\nimport { nextMonth } from '../../redux-state/actions/calendar.actions';\r\nimport { ICalendarAppText } from '../../redux-state/interfaces/text/calendar-app.text';\r\nimport NextMonthView from './month-selection-load-more.view';\r\n\r\ninterface ILoadMoreExternalProps {\r\n}\r\n\r\ninterface StateToProps {\r\n    text: ICalendarAppText;\r\n    currDate: moment.Moment;\r\n    lastDate: moment.Moment;\r\n}\r\n\r\ninterface DispatchToProps {\r\n    goToNextMonth: () => void;\r\n}\r\n\r\nexport type LoadMoreProps = ILoadMoreExternalProps & StateToProps & DispatchToProps;\r\n\r\nexport class LoadMoreBase extends React.Component<LoadMoreProps, any> {\r\n    render() {\r\n        return (\r\n            <>\r\n                {\r\n                    this.props.currDate.clone().endOf(\"month\").isSameOrBefore(this.props.lastDate) ? <NextMonthView {...this.props} /> : null\r\n                }\r\n            </>\r\n        )\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState, ownProps: ILoadMoreExternalProps): StateToProps {\r\n    return {\r\n        text: state.calendarText,\r\n        currDate: state.calendar.currentDate,\r\n        lastDate: state.calendarSettings.monthsOnCalendar[state.calendarSettings.monthsOnCalendar.length - 1] || moment()\r\n    }\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch: Dispatch): DispatchToProps {\r\n    return {\r\n        goToNextMonth: () => dispatch(nextMonth())\r\n    }\r\n}\r\n\r\nexport default connect<StateToProps, DispatchToProps>(mapStateToProps, mapDispatchToProps)(LoadMoreBase);","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { MonthSelectionDropdownProps } from '../../components/month-selection/dropdown';\r\nimport { scrollToMonth } from '../../helpers/scroll-to-month';\r\n\r\nconst momentFormat = 'YYYY-MM';\r\n\r\nconst MonthSelectionDropdownView: React.StatelessComponent<MonthSelectionDropdownProps> = props => {\r\n    function goToMonthChange(evt: React.ChangeEvent<HTMLSelectElement>) {\r\n        const mmt = moment(evt.currentTarget.value, momentFormat);\r\n\r\n        props.goToMonth(mmt);\r\n\r\n        var focusDestinationMonth = setInterval(() => {\r\n            if (scrollToMonth(mmt)) {\r\n                clearInterval(focusDestinationMonth);\r\n            }\r\n        }, 500);\r\n    }\r\n\r\n    return (\r\n        <div className=\"ace-cal-month-dropdown ace-cal-subnav-item\">\r\n            <label htmlFor=\"MonthDropdown\" className=\"visually-hidden\">{props.text.monthDropdownDescriptionText}</label>\r\n            <select value={props.currentMonth.format(momentFormat)} onChange={goToMonthChange} id=\"MonthDropdown\" className=\"h3-style\">\r\n                {\r\n                    props.validMonths.map(month => <option key={month.format(momentFormat)} value={month.format(momentFormat)}>{month.format(\"MMMM YYYY\")}</option>)\r\n                }\r\n            </select>\r\n        </div>\r\n    );\r\n}\r\n\r\nexport default MonthSelectionDropdownView;","import * as React from 'react';\r\nimport { GridDayProps } from '../../components/grid/day';\r\nimport moment from 'moment';\r\nimport { LoadMoreProps } from '../../components/month-selection/load-more';\r\nimport { scrollToMonth } from '../../helpers/scroll-to-month';\r\n\r\nconst NextMonthView: React.StatelessComponent<LoadMoreProps> = props => {\r\n    function onClick(evt: React.MouseEvent<HTMLButtonElement>) {\r\n        evt.preventDefault();\r\n\r\n        props.goToNextMonth();\r\n        const nextMonth = props.currDate.clone().add(1, \"month\").startOf(\"month\");\r\n\r\n        var focusDestinationMonth = setInterval(() => {\r\n            if (scrollToMonth(nextMonth)) {\r\n                clearInterval(focusDestinationMonth);\r\n            }\r\n        }, 500);\r\n\r\n    }\r\n\r\n    return (\r\n        <button className=\"ace-cal-list-load-more btn-outline space-top-lg\" type=\"button\" onClick={onClick}>\r\n            {props.text.loadMoreEventsButtonText}\r\n        </button>\r\n    );\r\n}\r\n\r\nexport default NextMonthView;","import * as React from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { connect } from 'react-redux';\r\n\r\nimport { ICalendarAppState } from '../../redux-state';\r\n\r\nimport { throttle } from 'lodash';\r\n\r\ninterface IExternalProps {\r\n}\r\n\r\ninterface StateToProps {\r\n    appearanceOffset: number;\r\n}\r\n\r\ninterface IScrollToTopState {\r\n    showButton: boolean;\r\n}\r\n\r\ntype ScrollToTopProps = IExternalProps & StateToProps;\r\n\r\n/**\r\n * Displays below a configured scroll position.\r\n * \r\n * Clicking the button triggers a scroll to the top of the calendar.\r\n */\r\nclass ScrollToTopBase extends React.Component<ScrollToTopProps, IScrollToTopState> {\r\n    public showButton = false;\r\n\r\n    constructor(props) {\r\n        super(props);\r\n        this.state = {\r\n            showButton: false\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Update state to check whether this component should show (based on scroll position)\r\n     */\r\n    checkScroll() {\r\n        this.setState({\r\n            showButton: window.pageYOffset > this.props.appearanceOffset\r\n        })\r\n    }\r\n\r\n    private boundScroll = throttle(this.checkScroll.bind(this), 50);\r\n\r\n    componentWillUnmount() {\r\n        window.removeEventListener('scroll', this.boundScroll.bind(this));\r\n    }\r\n\r\n    componentDidMount() {\r\n        this.checkScroll();\r\n        window.addEventListener('scroll', this.boundScroll);\r\n    }\r\n\r\n    shouldComponentUpdate(nextProps: ScrollToTopProps, nextState: IScrollToTopState) {\r\n        return this.state.showButton !== nextState.showButton;\r\n    }\r\n\r\n    render() {\r\n        return (\r\n            <a href=\"#main\" className=\"ace-cal-back-to-top icon-btn\" data-show-button={this.state.showButton}>\r\n                <p className=\"visually-hidden\">\r\n                    Top\r\n                </p>\r\n                <span className=\"footer-top-btn-icon\">\r\n                    <svg className=\"svg-icon\" aria-hidden=\"true\" focusable=\"false\">\r\n                        <use xmlnsXlink=\"http://www.w3.org/1999/xlink\" xlinkHref=\"#icon-arrow-up\" />\r\n                    </svg>\r\n                </span>\r\n            </a>\r\n        )\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState): StateToProps {\r\n    return {\r\n        appearanceOffset: state.calendarSettings.scrollToTopAppearanceOffset\r\n    }\r\n}\r\n\r\nexport default connect(mapStateToProps)(ScrollToTopBase);","\r\nimport * as React from 'react';\r\nimport moment from 'moment';\r\n\r\nimport { connect, Dispatch } from 'react-redux';\r\nimport { openMiniCalDialog, openFiltersDialog, removeAllEventFilters } from '../../redux-state/actions/calendar.actions';\r\nimport { ICalendarAppState } from '../../redux-state';\r\nimport FiltersContainer from '../filters-ace/container';\r\nimport ClearAll from '../filters-ace/clear-all';\r\nimport CalendarText from '../../contexts/calendar-text';\r\nimport { ICalendarFilterState } from '../../redux-state/interfaces/calendar-filter.state';\r\nimport { IEvent } from '../../interfaces';\r\nimport MonthSelectionDropdownBase from '../month-selection/dropdown';\r\nimport CalendarViewToggle from './../../components/calendar-view-toggle';\r\n\r\ninterface StateToProps {\r\n    currentScrolledDate: moment.Moment;\r\n    filterState: ICalendarFilterState<IEvent>;\r\n    filtersBackgroundColor: string;\r\n}\r\n\r\ninterface DispatchToProps {\r\n    openMiniCalDialog: (trigger: HTMLButtonElement) => void;\r\n    openFiltersDialog: (trigger: HTMLButtonElement) => void;\r\n    clearAllFilters: () => void;\r\n}\r\n\r\nexport type StickyNavProps = StateToProps & DispatchToProps;\r\n\r\n/**\r\n * Displays the currently-scrolled month and a button to open the filters dialog.\r\n *\r\n * On mobile, also displays a button to open the mini-calendar dialog.\r\n */\r\nexport class StickyNavBase extends React.Component<StickyNavProps> {\r\n    constructor(props: StickyNavProps) {\r\n        super(props);\r\n    }\r\n    render() {\r\n        const activeFilters =\r\n            this.props.filterState.venueFilter.selectedOptions.length +\r\n            this.props.filterState.availabilityFilter.selectedOptions.length +\r\n            this.props.filterState.genreFilter.selectedOptions.length;\r\n\r\n        return (\r\n            <CalendarText.Consumer>\r\n                {text => (\r\n                    <>\r\n                        <nav className={`bg-` + this.props.filtersBackgroundColor + ` sub-nav sub-nav-all-screens ace-cal-sub-nav` } aria-hidden=\"true\" aria-label=\"Access Dates and Filters\">\r\n                            <div className=\"sub-nav-inner block-inner \">\r\n                  \r\n                                <header className=\"ace-cal-nav grid-container\">\r\n                                    <div className=\"ace-cal-filters\">\r\n                                        \r\n                                        {this.props.openFiltersDialog}\r\n                                        <MonthSelectionDropdownBase />\r\n                                        <FiltersContainer />\r\n                                    </div>\r\n                                    <CalendarViewToggle />\r\n                                </header>\r\n                            </div>\r\n                        </nav>\r\n                    </>\r\n                )}\r\n            </CalendarText.Consumer>\r\n        );\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState): StateToProps {\r\n    return {\r\n        filtersBackgroundColor: state.calendarText.calendarFiltersBackground,\r\n        currentScrolledDate: state.calendar.currentScrolledDate,\r\n        filterState: {\r\n            ...state.calendar\r\n        } as ICalendarFilterState<IEvent>\r\n    };\r\n}\r\n\r\nfunction mapDispatchToProps(dispatch: Dispatch): DispatchToProps {\r\n    return {\r\n        openMiniCalDialog: (trigger: HTMLButtonElement) => { dispatch(openMiniCalDialog(trigger)); },\r\n        openFiltersDialog: (trigger: HTMLButtonElement) => { dispatch(openFiltersDialog(trigger)); },\r\n        clearAllFilters: () => { dispatch(removeAllEventFilters()); },\r\n    };\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(StickyNavBase);\r\n","import * as React from 'react';\r\nimport moment from 'moment';\r\nimport { connect } from 'react-redux';\r\n\r\nimport { ICalendarAppState } from '../redux-state';\r\nimport { IStartupState } from '../redux-state/interfaces/startup.state';\r\n\r\nimport { activeFilterOptions } from '../helpers/active-filter-options';\r\n\r\ninterface StateToProps {\r\n    localStorageState: IStartupState;\r\n}\r\n\r\n/**\r\n * Utility class to save filter / date-range state to `localStorage` when a promo-code is applied or removed.\r\n */\r\nclass PromoCodeHelper extends React.Component<StateToProps> {\r\n    componentDidMount() {\r\n        const promoFormContainer = document.getElementById('promoCodeBlock');\r\n        const promoForm = promoFormContainer.querySelector('form') as HTMLFormElement;\r\n        promoForm.addEventListener('submit', () => {\r\n            localStorage.setItem('calendarState', JSON.stringify(this.props.localStorageState));\r\n        });\r\n    }\r\n    render() {\r\n        return null;\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState): StateToProps {\r\n\r\n    const startDate = state.calendar.dateRangeFromQueryString ?\r\n        state.calendar.startupState.startDate :\r\n        moment().format('YYYY-MM-DD');\r\n\r\n    const endDate = state.calendar.dateRangeFromQueryString ?\r\n        state.calendar.startupState.endDate :\r\n        moment(state.calendar.loadedMonths[state.calendar.loadedMonths.length - 1]).endOf('month').format('YYYY-MM-DD');\r\n\r\n    const currentDate = state.calendar.currentDate.format('YYYY-MM-DD');\r\n    const dateRangeFromQueryString = state.calendar.dateRangeFromQueryString;\r\n    const typeFilter = activeFilterOptions(state.calendar.typeFilter);\r\n    const genreFilter = activeFilterOptions(state.calendar.genreFilter);\r\n    const venueFilter = activeFilterOptions(state.calendar.venueFilter);\r\n    const availabilityFilter = activeFilterOptions(state.calendar.availabilityFilter);\r\n\r\n    return {\r\n        localStorageState: {\r\n            currentDate,\r\n            startDate,\r\n            endDate,\r\n            dateRangeFromQueryString,\r\n            typeFilter,\r\n            genreFilter,\r\n            venueFilter,\r\n            availabilityFilter\r\n        }\r\n    };\r\n}\r\n\r\nexport default connect(mapStateToProps)(PromoCodeHelper);","import * as React from 'react';\r\n\r\n\r\n\r\nimport MobileResponsive from './mobile';\r\nimport DesktopResponsive from './desktop';\r\nimport { connect } from 'react-redux';\r\nimport { IAddressAppState } from '../../../address/redux-state';\r\nimport { ICalendarAppState } from '../../redux-state';\r\nimport { CalendarDeviceMode, CalendarViewMode } from '../../redux-state/interfaces/calendar-settings';\r\nimport { setToDesktop, setToMobile } from '../../redux-state/actions/calendar-settings.actions';\r\n\r\ninterface StateToProps {\r\n    mediaWidth: number;\r\n    currentDeviceMode: CalendarDeviceMode;\r\n\r\n}\r\n\r\ninterface DispatchToProps {\r\n    setToDesktop: () => void;\r\n    setToMobile: () => void;\r\n}\r\n\r\ninterface ResponsiveBaseState {\r\n    WindowSize: number;\r\n}\r\n\r\ntype ResponsiveProps = StateToProps & DispatchToProps;\r\n\r\nexport class ResponsiveBase extends React.Component<ResponsiveProps, any> {\r\n\r\n    constructor(props: ResponsiveProps) {\r\n        super(props);\r\n        this.state = {\r\n            WindowSize: window.innerWidth\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        window.addEventListener(\"resize\", this.handleResize.bind(this));\r\n    }\r\n    componentWillUnmount() {\r\n        window.addEventListener(\"resize\", null);\r\n    }\r\n\r\n    handleResize(WindowSize, event) : void {\r\n        this.setState({ WindowSize: window.innerWidth })\r\n        if (this.state.WindowSize > this.props.mediaWidth && this.props.currentDeviceMode != CalendarDeviceMode.DESKTOP) {\r\n            this.props.setToDesktop();\r\n        }\r\n        else if (this.state.WindowSize < this.props.mediaWidth && this.props.currentDeviceMode != CalendarDeviceMode.MOBILE) {\r\n            this.props.setToMobile();\r\n        }\r\n    }\r\n\r\n    render() {\r\n        return (\r\n            <>\r\n                \r\n            </>\r\n        )\r\n    }\r\n}\r\n\r\nfunction mapStateToProps(state: ICalendarAppState): StateToProps {\r\n    return {\r\n        mediaWidth: Number(state.calendarSettings.desktopToMobileTransitionWidth),\r\n        currentDeviceMode: state.calendarSettings.calendarDeviceMode\r\n    }\r\n}\r\nfunction mapDispatchToProps(dispatch): DispatchToProps {\r\n    return {\r\n        setToDesktop: () => dispatch(setToDesktop()),\r\n        setToMobile: () => dispatch(setToMobile())\r\n    }\r\n}\r\n\r\nexport default connect<StateToProps, DispatchToProps>(mapStateToProps, mapDispatchToProps)(ResponsiveBase);","import * as React from 'react';\r\nimport { CalendarAppText, defaultText } from '../redux-state/interfaces/calendar-app-text.state';\r\n\r\nconst CalendarText = React.createContext<CalendarAppText>(defaultText);\r\n\r\nexport default CalendarText;","import { IFilterState, IEvent } from \"../interfaces\";\r\n\r\n/**\r\n * Accepts a FilterState object and returns an array of applied filter options.\r\n */\r\nexport function activeFilterOptions(filter: IFilterState<IEvent>): string[] {\r\n    return filter.options.filter((f, i) => filter.selectedOptions.some(o => o === i)).map(o => o.value);\r\n}","\r\nimport moment = require(\"moment\");\r\nimport { FilterState } from \"../classes/filter-state\";\r\nimport { IEvent, FilterFunction } from \"../interfaces\";\r\nimport { hashFilters } from \"./hash-filters\";\r\n\r\nexport interface IRestrictedRange {\r\n    restricted: boolean;\r\n    startDate?: moment.Moment;\r\n    endDate?: moment.Moment;\r\n}\r\n\r\nconst functionCache = {};\r\n/**\r\n * Returns a function compatible with the `Array.prototype.filter` API to filter events.\r\n * \r\n * Relies heavily on caching to prevent re-checking events.\r\n */\r\nexport function composeFilterFunction(range: IRestrictedRange, ...filters: FilterState<IEvent>[]): [FilterFunction, number] {\r\n\r\n    // hash the applied filters and get a key\r\n    const filterHashKey = hashFilters(range.restricted, ...filters);\r\n\r\n    // check for a cached function based on the key\r\n    let cachedFunction: FilterFunction = functionCache[filterHashKey];\r\n    if (cachedFunction) {\r\n        // return the found function\r\n        return [cachedFunction, filterHashKey];\r\n    }\r\n\r\n    // create a new function if this is an uncached filter state\r\n    const filterCache = {};\r\n    cachedFunction = (events: IEvent[]) => {\r\n        return events.filter(event => {\r\n\r\n            // leverage caching based on eventId to boost filter speed in the future\r\n            let cachedResult: boolean = filterCache[event.id]\r\n            if (cachedResult !== undefined) {\r\n                // return the cached result (true or false)\r\n                return cachedResult;\r\n            }\r\n\r\n            // check whether or not the event passes the filter\r\n            cachedResult = !range.restricted || (range.restricted && moment(event.eventDate).isBetween(range.startDate, range.endDate.endOf('day')));\r\n            for (let i = 0; i < filters.length; i++) {\r\n                cachedResult = cachedResult && filters[i].filter(event)\r\n            }\r\n\r\n            // cache and return the result\r\n            filterCache[event.id] = cachedResult;\r\n            return cachedResult;\r\n        });\r\n    };\r\n\r\n    // cache and return the filter\r\n    functionCache[filterHashKey] = cachedFunction;\r\n    return [cachedFunction, filterHashKey];\r\n}\r\n","import moment from 'moment';\r\n\r\nexport const dateCookieName = 'ArshtCalendarDate';\r\n\r\n//Set the value of a cookie, optionally pass the cookie duration in minutes\r\nexport function setCookie(name: string, value: string, minutes: number = undefined): void {\r\n    var expires = \"\";\r\n    if (minutes) {\r\n        var expiration = moment().add(minutes, 'm').utc().format();\r\n        expires = \"; expires=\" + expiration;\r\n    }\r\n    document.cookie = name + \"=\" + (value || \"\") + expires + \"; path=/\";\r\n}\r\n\r\n//Get the value of a cookie, returns null if the cookie is not found\r\nexport function getCookie(name: string): string {\r\n    var nameSubstring = name + \"=\";\r\n    var allCookies = document.cookie.split(';');\r\n    for (var i = 0; i < allCookies.length; i++) {\r\n        var c = allCookies[i];\r\n        while (c.charAt(0) == ' ') c = c.substring(1, c.length);\r\n        if (c.indexOf(nameSubstring) == 0) return c.substring(nameSubstring.length, c.length);\r\n    }\r\n    return null;\r\n}","import moment from 'moment';\r\nimport { IEventFilter, ICalendarState } from '../classes/calendar';\r\nimport filter from '../components/filters-ace/filter';\r\nimport { upsertEventFilter } from '../redux-state/actions/calendar.actions';\r\nimport { Store, Dispatch } from 'redux';\r\nimport { getMonthElement, scrollToMonth, removeLoader } from './scroll-to-month';\r\nimport { IOption } from '../interfaces/option';\r\nimport { IEvent } from '../interfaces/event';\r\nimport { forEach } from 'lodash';\r\n\r\n\r\nexport function AddFilterToQuery(eventFilters: Array<IEventFilter>): void {\r\n    const serialized = serializeProps(eventFilters);\r\n\r\n    const urlSearchParams = new URLSearchParams(window.location.search);\r\n    const params = Object.fromEntries(urlSearchParams.entries());\r\n    let queryString :string[] = [];\r\n    for (var event of eventFilters) {\r\n        queryString.push(encodeURI(event.key + \"=\" + event.selectedValue));\r\n    }\r\n    let newurl = window.location.protocol + \"//\" + window.location.host + window.location.pathname + \"?\"+queryString.join(\"&\");\r\n    if (window.location.href.split(\"#\").length > 1) {\r\n        newurl+= \"#\"+window.location.href.split(\"#\")[1];\r\n    }\r\n    window.history.pushState({ path: newurl }, '', newurl);\r\n\r\n}\r\n\r\nexport function GetFilterFromQuery(search: string, filterOptions: Array<IOption>,\r\n    filterToGet: string, lastLoadedMonth: moment.Moment, selectFiltersFunction: (filter, shouldUpdateQuery) => any, goToMonthFunction: (toMonth) => any): void {\r\n    // Remove hash added for Month scrolling\r\n    if (search.substr(1).length > 0) {\r\n        let queries = decodeURI(search.substr(1)).split('&');\r\n\r\n        let matchedQuery = queries.filter(q => q.indexOf(filterToGet) == 0)[0];\r\n\r\n        if (matchedQuery) {\r\n            let value = matchedQuery.split('=')[1];\r\n\r\n            selectFiltersFunction(value, false);\r\n\r\n            const matchedFilter = filterOptions.filter(o => o.value === value)[0];\r\n\r\n            if (matchedFilter) {\r\n                const firstOccuranceDate = matchedFilter.firstOccurance;\r\n\r\n                // If a month is \r\n                if (firstOccuranceDate) {\r\n                    const toMonth = moment(firstOccuranceDate);\r\n\r\n                    // Only change months if it's in the future.\r\n                    if (toMonth.isAfter(lastLoadedMonth)) {\r\n                        goToMonthFunction(toMonth);\r\n                        let scrollInterval = setInterval(() => {\r\n                            const monthElement = getMonthElement(toMonth);\r\n\r\n                            if (monthElement) {\r\n                                removeLoader();\r\n                                if (scrollToMonth(toMonth)) {\r\n                                    clearInterval(scrollInterval);\r\n                                }\r\n                            }\r\n                        }, 500);\r\n                    } else {\r\n                        // If the month has already loaded, apply filter and remove the loader.\r\n                        // We need a timeout because even though the data is cached, a Promise object is created.\r\n                        //setTimeout(() => removeLoader(), 500);\r\n                        let scrollInterval = setInterval(() => {\r\n                            const monthElement = getMonthElement(toMonth);\r\n\r\n                            if (monthElement) {\r\n                                removeLoader();\r\n                                if (scrollToMonth(toMonth)) {\r\n                                    clearInterval(scrollInterval);\r\n                                }\r\n                            }\r\n                        }, 500);\r\n                    }\r\n\r\n                } else {\r\n                    // If the month has already loaded, apply filter and remove the loader.\r\n                    // We need a timeout because even though the data is cached, a Promise object is created.\r\n                    setTimeout(() => removeLoader(), 500);\r\n                }\r\n            }\r\n        }\r\n\r\n    }\r\n}\r\n\r\nfunction serializeProps(eventFilter: Array<IEventFilter>): string {\r\n    if (eventFilter.length < 1)\r\n        return \"\";\r\n\r\n    return \"?\" + eventFilter.map(filter => filter.key + \"=\" + filter.selectedValue).join(\"&\");\r\n}\r\n\r\n\r\nexport function generateEventFilter(propertyToFilter: string, selectedValue: string) {\r\n    return (event: IEvent) => {\r\n        const propertyValue = event[propertyToFilter];\r\n        // If it's an array, check if the value exists inside\r\n        if (propertyValue.constructor === Array) {\r\n            return (propertyValue as any[]).some(item => item === selectedValue);\r\n        } else {\r\n            return event[propertyToFilter] === selectedValue\r\n        }\r\n    }\r\n}\r\n","import { IMonth, IEvent, IDay, IProduction } from \"../interfaces\";\r\nimport { IRestrictedRange, composeFilterFunction } from \"./compose-filter-function\";\r\nimport { FilterState } from \"../classes/filter-state\";\r\nimport { ICalendarOptions, IDateRange } from \"../classes/calendar\";\r\nimport moment = require(\"moment\");\r\nimport { groupBy } from \"lodash\";\r\n\r\n/**\r\n * Compose a filter function based on filter state, and return a filtered array of events.\r\n */\r\nexport function filterEvents(events: IMonth<IEvent>[], range: IRestrictedRange, filterFunction: (event) => boolean, ...filters: FilterState<IEvent>[]): [IMonth<IEvent>[], number] {\r\n\r\n    // This code is terrible. DO NOT COPY TO ANOTHER SITE. This is a terrible mix of two working filter systems\r\n    const [filter, filterHash] = composeFilterFunction(range, ...filters);\r\n    const filteredEvents: IMonth<IEvent>[] = [];\r\n\r\n    events.forEach(month => {\r\n        const filteredMonth: IMonth<IEvent> = {\r\n            monthMoment: month.monthMoment,\r\n            events: {\r\n                days: [],\r\n                productions: [],\r\n                allDays: []\r\n            }\r\n        };\r\n\r\n        filteredMonth.events.productions = month.events.productions.filter(filterFunction);\r\n        let eventsForSpecificMonth = [];\r\n        month.events.days.forEach(day => {\r\n            const filteredDay: IDay<IEvent> = {\r\n                date: day.date,\r\n                events: day.events.filter(filterFunction) || []\r\n            };\r\n            if (filteredDay.events && filteredDay.events.length > 0)\r\n                eventsForSpecificMonth.push(...filteredDay.events)\r\n            filteredMonth.events.days.push(filteredDay);\r\n        });\r\n        filteredMonth.events.allDays = eventDays(filteredMonth.events.days, eventsForSpecificMonth);\r\n        filteredEvents.push(filteredMonth);\r\n    });\r\n\r\n    return [filteredEvents, filterHash];\r\n}\r\n\r\nexport function eventDays<T extends IEvent>(days: Array<IDay<T>>, events?: Array<T>): Array<IDay<T>> {\r\n    if (events.length > 0) {\r\n        let range = { start: moment(events[0].eventDate).toDate(), end: moment(events[events.length - 1].eventDate).toDate() };\r\n        let days = interpolateDays(range).map((d) => { return { date: d } });\r\n\r\n        if (events) {\r\n            return addEvents<T>(days, events);\r\n        }\r\n        return days;\r\n    } else {\r\n        return [];\r\n    }\r\n}\r\nexport function addEvents<T extends IEvent>(days: Array<IDay<T>>, events: Array<T>): Array<IDay<T>> {\r\n    const groupedEvents = groupBy(events, e => moment(e.eventDate).startOf('day').format('YYYYMMDD'));\r\n\r\n    return days.map(d => {\r\n        const date = moment(d.date).startOf('day').format('YYYYMMDD');\r\n        const events = groupedEvents[date];\r\n\r\n        d.events = events ? events : [];\r\n        return d;\r\n    })\r\n}\r\n\r\nexport function interpolateDays(range: IDateRange): Array<Date> {\r\n    let dates = [];\r\n    let current = moment(range.start).startOf('day');\r\n    let end = moment(range.end).startOf('day');\r\n\r\n    if (end < current) {\r\n        return [];\r\n    }\r\n\r\n    while (current <= end) {\r\n        dates.push(current.clone().toDate());\r\n        current.add(1, 'days');\r\n    }\r\n\r\n    return dates;\r\n}\r\n","\r\n/**\r\n * Encapsulate the logic for creating a focus trap.\r\n * \r\n * `shouldTrap` is a callback function which checks whether the trap should be applied\r\n */\r\nexport function focusTrap(firstRef: React.RefObject<HTMLElement>, lastRef: React.RefObject<HTMLElement>, shouldTrap: () => boolean) {\r\n    return (e: React.KeyboardEvent) => {\r\n        if (shouldTrap()) {\r\n            const keyCode = e.keyCode || e.which;\r\n            if (keyCode === 9) {\r\n                if (e.shiftKey && e.target === firstRef.current) {\r\n                    e.preventDefault();\r\n                    lastRef.current.focus();\r\n                } else if (!e.shiftKey && e.target === lastRef.current) {\r\n                    e.preventDefault();\r\n                    firstRef.current.focus();\r\n                }\r\n            }\r\n        }\r\n    }\r\n}","import moment from 'moment';\r\n\r\n/**\r\n * Format an event date/time based on the Kennedy Center's branding guidelines\r\n */\r\nexport function formatDateTime(moment: moment.Moment, formatString: string): string {\r\n    return moment.format(formatString).replace('am', 'a.m.').replace('pm', 'p.m.').replace('May.', 'May');\r\n}","export function getHeightOfHidden(element) {\r\n    if (!element) return 0;\r\n\r\n    const el = element as HTMLElement;\r\n    const parentStyles = el.parentElement?.getAttribute('style');\r\n    const selfStyles = el.getAttribute('style');\r\n    el.parentElement?.setAttribute('style', 'position: relative !important; width: 100% !important;');\r\n    el.setAttribute('style', 'opacity: 0 !important; height: auto !important; position: absolute !important;');\r\n\r\n    const elementHeight = element.offsetHeight;\r\n    if (selfStyles) {\r\n        el.setAttribute('style', selfStyles);\r\n    }\r\n    else {\r\n        el.removeAttribute('style');\r\n    }\r\n    if (parentStyles) {\r\n        el.parentElement?.setAttribute('style', parentStyles);\r\n    }\r\n    else {\r\n        el.parentElement?.removeAttribute('style');\r\n    }\r\n    return elementHeight;\r\n}","import { IFilterState, IEvent } from \"../interfaces\";\r\nimport { hashValue } from \"./hash-value\";\r\nimport { activeFilterOptions } from \"./active-filter-options\";\r\n\r\n/**\r\n * Hash the current filter state and return a key (number).\r\n * \r\n * This is used to compare filter states inside components during `shouldComponentUpdate`.\r\n */\r\nexport function hashFilters(...filters: (boolean | IFilterState<IEvent>)[]): number {\r\n    const rangeRestricted: boolean = filters.some(filter => typeof filter === 'boolean') ? filters.filter(filter => typeof filter === 'boolean')[0] as boolean : false;\r\n    const activeOptions: string[][] = (filters.filter(filter => typeof filter !== 'boolean') as IFilterState<IEvent>[]).map(filter => activeFilterOptions(filter));\r\n    return hashValue({\r\n        rangeRestricted,\r\n        activeOptions\r\n    });\r\n}","/**\r\n * Taken from: https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript\r\n * \r\n * Slightly modified to suit our purposes.\r\n */\r\nexport function hashValue(value: any): number {\r\n    let hash = 0, i, chr;\r\n    value = JSON.stringify(value);\r\n    if (value.length === 0)\r\n        return hash;\r\n    for (i = 0; i < value.length; i++) {\r\n        chr = value.charCodeAt(i);\r\n        hash = ((hash << 5) - hash) + chr;\r\n        hash |= 0; // Convert to 32bit integer\r\n    }\r\n    return hash;\r\n}","export function isExternalUrl(url: string): boolean {\r\n    var match = url.match(/^([^:\\/?#]+:)?(?:\\/\\/([^\\/?#]*))?([^?#]+)?(\\?[^#]*)?(#.*)?/);\r\n    if (typeof match[1] === \"string\" && match[1].length > 0 && match[1].toLowerCase() !== location.protocol) return true;\r\n    if (typeof match[2] === \"string\" && match[2].length > 0 && match[2].replace(new RegExp(\":(\" + { \"http:\": 80, \"https:\": 443 }[location.protocol] + \")?$\"), \"\") !== location.host) return true;\r\n    return false;\r\n}","\r\n/**\r\n * Accepts a list of query strings and returns a StringMap with found arguments.\r\n */\r\nexport function getQueryStringMap(keys: string[]): StringMap {\r\n    const map = new StringMap();\r\n    keys.forEach(key => {\r\n        const args = getParameterByName(key);\r\n        if (args !== null) {\r\n            map.set(key, args);\r\n        }\r\n    });\r\n    return map;\r\n}\r\n\r\n/**\r\n * Borrowed from here: https://stackoverflow.com/questions/45790423/how-to-get-parameter-name\r\n */\r\nfunction getParameterByName(name: string, url?: string) {\r\n    if (!url) url = window.location.href;\r\n    name = name.replace(/[\\[\\]]/g, '\\\\$&');\r\n    var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),\r\n        results = regex.exec(url);\r\n    if (!results) return null;\r\n    if (!results[2]) return '';\r\n    return decodeURIComponent(results[2].replace(/\\+/g, ' '));\r\n}\r\n\r\n/**\r\n * Class to encapsulate the concept of a String>String 1-to-1 Map.\r\n */\r\nexport class StringMap {\r\n    private map = {};\r\n    public has(key: string): boolean {\r\n        return key in this.map;\r\n    }\r\n    public get(key: string): string | undefined {\r\n        return this.map[key];\r\n    }\r\n    public set(key: string, value: string) {\r\n        this.map[key.toString()] = value;\r\n    }\r\n    public delete(key: string): string {\r\n        const newMap = {};\r\n        Object.keys(this.map).forEach(k => {\r\n            if (k !== key.toString()) {\r\n                newMap[k] = this.map[k];\r\n            }\r\n        });\r\n        const deleted = this.map[key];\r\n        this.map = newMap;\r\n        return deleted;\r\n    }\r\n}","\r\n/**\r\n * Returns the current scroll position.\r\n */\r\nexport function scrollPosition() {\r\n    const supportPageOffset = window.pageYOffset !== undefined;\r\n    const isCSS1Compat = ((document.compatMode || \"\") === \"CSS1Compat\");\r\n\r\n    return supportPageOffset ? window.pageYOffset : isCSS1Compat ? document.documentElement.scrollTop : document.body.scrollTop;\r\n}","import moment from 'moment';\r\n\r\n/**\r\n* Locates and scrolls to the heading matching the provided moment\r\n*/\r\nexport function scrollToHeading(date: moment.Moment, month?: boolean) {\r\n    const prefix = month ? `Month-List` : `List-Day`;\r\n\r\n    var headingId = `${prefix}-${date.startOf('day').format('X')}`;\r\n    const heading = document.getElementById(headingId) as HTMLHeadingElement;\r\n\r\n    /* We want to prevent the page from jumping on initial load here.\r\n    In most browsers, we can test if the current activeElement is not the body\r\n    but in all Mac OS, desktop + iOS, and all browsers, when you click a <button>,\r\n    the focus is put back on the <body>. So there's 'data-untouched' on the entry\r\n    now, and it gets removed after scrollToHeading has its first touch.\r\n    So this is a quick hack but there's a reason! */\r\n    const entry = document.querySelector('[data-untouched]');\r\n    if (heading && entry) {\r\n        const testTouched = entry.getAttribute('data-untouched');\r\n        if (testTouched != \"true\") {\r\n            heading.setAttribute('tabindex', '0');\r\n            const blur = () => {\r\n                heading.removeAttribute('tabindex');\r\n                heading.removeEventListener('blur', blur);\r\n            }\r\n            heading.addEventListener('blur', blur);\r\n            heading.focus();\r\n            //window.scrollTo(0, heading.offsetTop);\r\n        }\r\n        else {\r\n            entry.setAttribute('data-untouched', 'false');\r\n        }\r\n    }\r\n}","import moment from 'moment';\r\n\r\n/**\r\n * Scroll to the month and set focus. This will also remove the loader.\r\n * @param month\r\n * @param viewMode\r\n */\r\nexport function scrollToMonth(month: moment.Moment): boolean {\r\n    const mmtId = getMonthElementFromMoment(month);\r\n\r\n    const destinationMonth = getMonthElement(month);\r\n    if (destinationMonth) {\r\n        if (destinationMonth.id.indexOf(\"Month-List-\") > -1) {\r\n            window.location.hash = `Month-List-${mmtId}`;\r\n        } else {\r\n            window.location.hash = `Month-${mmtId}`;\r\n        }\r\n\r\n        removeLoader();\r\n\r\n        return true;\r\n    }\r\n\r\n    return false;\r\n}\r\n\r\nfunction getMonthElementFromMoment(month: moment.Moment): string {\r\n    return month.startOf(\"month\").format(\"X\");\r\n}\r\n\r\nexport function getMonthElement(month: moment.Moment): HTMLElement {\r\n    const key = getMonthElementFromMoment(month);\r\n    return document.getElementById(`Month-${key}`) || document.getElementById(`Month-List-${key}`);\r\n}\r\n\r\n/**\r\n * Call this function to remove the loader. Note this isn't tied into redux or anything because of the scroll-to-month requiring\r\n * the month to load first and the hash set before disappearing.\r\n */\r\nexport function removeLoader() {\r\n    // attribute is added in the calendar-container component when loading state is triggered\r\n    document.documentElement.removeAttribute(\"data-calendar-loading\");\r\n}","import * as React from 'react';\r\nimport { render } from 'react-dom';\r\nimport { Provider } from 'react-redux';\r\nimport { appStore } from './redux-state';\r\nimport App from './components/app';\r\n//if (process.env.NODE_ENV !== 'production') {\r\n//    const { whyDidYouUpdate } = require('why-did-you-update');\r\n//    whyDidYouUpdate(React);\r\n//}\r\n\r\ndeclare const document;\r\n\r\nrender(\r\n    <Provider store={appStore}>\r\n        <App />\r\n    </Provider>\r\n    , document.getElementById(\"calendar-entry-js\"));","import { ActionType } from \"../../classes/action-type\";\r\nimport { ICalendarSettings } from \"../interfaces/calendar-settings\";\r\n\r\nexport function updateCalendarSettings(newSettings: ICalendarSettings) {\r\n    return {\r\n        type: ActionType.UpdateSettings,\r\n        value: newSettings\r\n    }\r\n}\r\n\r\n\r\n/**\r\n * Dispatch this to set the application state to MOBILE mode.\r\n */\r\nexport function setToMobile() {\r\n    return {\r\n        type: ActionType.SetToMobile\r\n    }\r\n}\r\n\r\n/**\r\n * Dispatch this to set the application state to DESKTOP mode.\r\n */\r\nexport function setToDesktop() {\r\n    return {\r\n        type: ActionType.SetToDesktop\r\n    }\r\n}\r\n\r\nexport function setToGrid() {\r\n    return {\r\n        type: ActionType.SetToGrid\r\n    }\r\n}\r\n\r\nexport function setToList() {\r\n    return {\r\n        type: ActionType.SetToList\r\n    }\r\n}\r\n\r\n","import { ActionType } from \"../../classes/action-type\";\r\nimport { CalendarAppText } from \"../interfaces/calendar-app-text.state\";\r\n\r\nexport function receiveText(text: CalendarAppText) {\r\n    return {\r\n        type: ActionType.ReceiveText,\r\n        value: text\r\n    }\r\n}\r\n","import moment from 'moment';\r\n\r\nimport { ActionType } from '../../classes/action-type';\r\nimport { IEventFilter } from '../../classes/calendar';\r\nimport { IEvent, IMonth, IOption } from '../../interfaces';\r\n\r\n/**\r\n * Update the Mini-Calendar to show the next month of dates.\r\n * \r\n * Loads the next month if it's not already loaded.\r\n */\r\nexport function nextMonth() {\r\n    return {\r\n        type: ActionType.NextMonth\r\n    }\r\n}\r\n\r\n/**\r\n * Update the Mini-Calendar to show the previous month of dates.\r\n */\r\nexport function previousMonth() {\r\n    return {\r\n        type: ActionType.PreviousMonth\r\n    }\r\n}\r\n\r\n/**\r\n * Update the Sticky-Nav's displayed month based on current scroll position.\r\n */\r\nexport function updateScrolledDate(to: moment.Moment) {\r\n    return {\r\n        type: ActionType.UpdateScrolledDate,\r\n        value: to\r\n    };\r\n}\r\n\r\n/**\r\n * Update mini-calendar and list's current date\r\n */\r\nexport function setDate(newDate: moment.Moment) {\r\n    return {\r\n        type: ActionType.SelectedDate,\r\n        value: newDate\r\n    }\r\n}\r\n\r\nexport function setCurrentMonth(newDate: moment.Moment) {\r\n    return {\r\n        type: ActionType.SetCurrentMonth,\r\n        value: newDate\r\n    }\r\n}\r\n\r\n/**\r\n * Load more dates (removes the restricted range if one is applied)\r\n */\r\nexport function loadMore() {\r\n    return {\r\n        type: ActionType.LoadMore\r\n    }\r\n}\r\n\r\nexport function setEventType(eventType: string) {\r\n    return {\r\n        type: ActionType.SetEventType,\r\n        value: event\r\n    }\r\n}\r\n\r\nexport function goToMonth(month: moment.Moment) {\r\n    return {\r\n        type: ActionType.GoToMonth,\r\n        value: month\r\n    }\r\n}\r\n\r\n\r\nexport function updateGridEvents(events: IMonth<IEvent>[]) {\r\n    return {\r\n        type: ActionType.UpdateGridEvents,\r\n        value: events\r\n    }\r\n}\r\n/**\r\n * Save events from API into the store\r\n */\r\nexport function updateEvents(loadedMonth: string, month: IMonth<IEvent>) {\r\n    return {\r\n        type: ActionType.UpdateEvents,\r\n        value: {\r\n            loadedMonth,\r\n            month\r\n        }\r\n    }\r\n}\r\n\r\nexport function updateNextMonthEvents(loadedMonth: string, month: IMonth<IEvent>) {\r\n    return {\r\n        type: ActionType.UpdateNextMonthEvents,\r\n        value: {\r\n            loadedMonth,\r\n            month\r\n        }\r\n    }\r\n}\r\n\r\n/**\r\n * Single action to modify the `updating` property based on the new state\r\n */\r\nexport function checkIfUpdating() {\r\n    return {\r\n        type: ActionType.CheckIfUpdating\r\n    }\r\n}\r\n\r\n/**\r\n * Called after `LoadMore` / `NextMonth`, used to check whether additional dates need to be loaded\r\n */\r\nexport function checkIfNewMonth() {\r\n    return {\r\n        type: ActionType.CheckIfNewMonth\r\n    }\r\n}\r\n\r\nexport function upsertEventFilter(filterFunction: IEventFilter, shouldUpdateQuery: boolean) {\r\n    return {\r\n        type: ActionType.UpdateEventFilter,\r\n        value: {\r\n            function:\r\n                filterFunction,\r\n            shouldUpdateQuery: shouldUpdateQuery\r\n        }\r\n    }\r\n}\r\n\r\nexport function removeEventFilter(filterKey: string) {\r\n    return {\r\n        type: ActionType.RemoveEventFilter,\r\n        value: filterKey\r\n    }\r\n}\r\n\r\n/**\r\n * Reset all filters' `selectedOptions` properties to []\r\n */\r\nexport function removeAllEventFilters() {\r\n    return {\r\n        type: ActionType.RemoveAllEventFilters\r\n    }\r\n}\r\n\r\n/// MAY NOT BE NEEDED ANYMORE\r\n\r\n/**\r\n * Update the Type Filter's selected option\r\n */\r\nexport function updateTypeFilter(selectedTypeOption: number) {\r\n    return {\r\n        type: ActionType.UpdateEventFilter,\r\n        value: selectedTypeOption\r\n    };\r\n}\r\n\r\n/**\r\n * Update the Checkbox-based filters' selected options\r\n */\r\nexport function updateEventFilter(selectedGenreOptions: number[], selectedVenueOptions: number[], selectedAvailabilityOptions: number[]) {\r\n    return {\r\n        type: ActionType.UpdateEventFilter,\r\n        value: {\r\n            selectedGenreOptions,\r\n            selectedVenueOptions,\r\n            selectedAvailabilityOptions\r\n        }\r\n    }\r\n}\r\n\r\n\r\n\r\n/**\r\n * Open the filters modal\r\n */\r\nexport function openFiltersDialog(trigger: HTMLButtonElement) {\r\n    return {\r\n        type: ActionType.OpenFiltersDialog,\r\n        value: trigger\r\n    }\r\n}\r\n\r\n/**\r\n * Close the filters modal\r\n */\r\nexport function closeFiltersDialog() {\r\n    return {\r\n        type: ActionType.CloseFiltersDialog\r\n    }\r\n}\r\n\r\n/**\r\n * Open the mini-calendar modal (only works on mobile)\r\n */\r\nexport function openMiniCalDialog(trigger: HTMLButtonElement) {\r\n    return {\r\n        type: ActionType.OpenMiniCalDialog,\r\n        value: trigger\r\n    }\r\n}\r\n\r\n/**\r\n * Close the mini-calendar modal (called automatically if the screen resizes to larger than mobile)\r\n */\r\nexport function closeMiniCalDialog() {\r\n    return {\r\n        type: ActionType.CloseMiniCalDialog\r\n    }\r\n}\r\n\r\n/**\r\n * Update the Type Filter with new options\r\n */\r\nexport function saveTypeFilterOptions(options: IOption[]) {\r\n    return {\r\n        type: ActionType.SaveTypeFilterOptions,\r\n        value: options\r\n    }\r\n}\r\n\r\n/**\r\n * Update the Genre Filter with new options\r\n */\r\nexport function saveGenreFilterOptions(options: IOption[]) {\r\n    return {\r\n        type: ActionType.SaveGenreFilterOptions,\r\n        value: options\r\n    }\r\n}\r\n\r\n/**\r\n * Update the Partner Filter with new options\r\n */\r\nexport function savePartnerFilterOptions(options: IOption[]) {\r\n    return {\r\n        type: ActionType.SavePartnerFilterOptions,\r\n        value: options\r\n    }\r\n}\r\n\r\n/**\r\n * Update the Accessibility Filter with new options\r\n */\r\nexport function saveVenueFilterOptions(options: IOption[]) {\r\n    return {\r\n        type: ActionType.SaveVenueFilterOptions,\r\n        value: options\r\n    }\r\n}\r\n\r\n/**\r\n * Update the Discount Filter with new options\r\n */\r\nexport function saveAvailabilityFilterOptions(options: IOption[]) {\r\n    return {\r\n        type: ActionType.SaveAvailabilityFilterOptions,\r\n        value: options\r\n    }\r\n}\r\n","import { combineReducers, createStore, applyMiddleware } from 'redux';\r\nimport thunk from 'redux-thunk';\r\nimport moment from 'moment';\r\n\r\nimport calendarReducer from './reducers/calendar.reducer';\r\nimport { IEvent } from '../interfaces';\r\nimport { CalendarAppText } from './interfaces/calendar-app-text.state';\r\nimport calendarSettingsReducer from './reducers/calendar-settings.reducer';\r\nimport calendarTextReducer from './reducers/calendar-text.reducer';\r\nimport { receiveText } from './actions/calendar-text.actions';\r\nimport lazyLoadReducer from './reducers/lazy-load.reducer';\r\nimport { ILazyLoadState } from './interfaces/lazy-load.state';\r\nimport { ICalendarState } from './interfaces/calendar.state';\r\nimport { ICalendarSettings, defaultCalendarSettings } from './interfaces/calendar-settings';\r\nimport { setToGrid, setToList, updateCalendarSettings } from './actions/calendar-settings.actions';\r\n\r\ndeclare const lastDate: string;\r\ndeclare const pageData: string;\r\ndeclare const promoCode: string;\r\nconst lastDateMoment = moment(lastDate);\r\n\r\nexport interface ICalendarAppState {\r\n    calendar: ICalendarState<IEvent>;\r\n    calendarSettings: ICalendarSettings;\r\n    calendarText: CalendarAppText;\r\n    lazyLoad: ILazyLoadState;\r\n}\r\n\r\nconst appReducer = combineReducers({\r\n    calendar: calendarReducer,\r\n    calendarSettings: calendarSettingsReducer,\r\n    calendarText: calendarTextReducer,\r\n    lazyLoad: lazyLoadReducer\r\n});\r\n\r\n// Calculate the months that are valid on the calendar.\r\nlet monthsOnCalendar: moment.Moment[] = [];\r\n\r\nfor (let i = moment().clone().startOf(\"month\"); i.isSameOrBefore(lastDateMoment.endOf(\"month\")); i.add(1, \"month\")) {\r\n    monthsOnCalendar.push(i.clone());\r\n}\r\n\r\nlet calendarSettings = {\r\n    ...defaultCalendarSettings,\r\n    monthsOnCalendar: monthsOnCalendar\r\n};\r\n\r\nconst appStore = createStore(appReducer, {\r\n    calendarSettings: calendarSettings as any\r\n}, applyMiddleware(thunk));\r\n\r\n// redux-thunk messes with redux typings.\r\nappStore.dispatch(receiveText(pageData as any));\r\nconsole.log((pageData as any).defaultToListViewString);\r\n\r\nconst calendarEntry = document.getElementById(\"calendar-entry-js\");\r\nlet mobileWidth = calendarEntry ? calendarEntry.getAttribute(\"data-calendar-breakpoint\") : \"48em\";\r\n\r\nif ((pageData as any) != null && (((pageData as any).defaultToListViewString == \"True\" || (pageData as any).defaultToListViewString == \"true\") || window.innerWidth < Number(mobileWidth)))\r\n    appStore.dispatch(setToList());\r\nelse\r\n    appStore.dispatch(setToGrid());\r\n\r\n\r\n/*appStore.dispatch(updateCalendarSettings(JSON.parse(promoCode)) as any);*/\r\n\r\nexport { appStore };","import { CalendarViewMode } from \"./calendar-settings\";\r\nimport { ICalendarAppText } from \"./text/calendar-app.text\";\r\nimport { IFilterText } from \"./text/calendar-filter.text\";\r\nimport { IMiniCalendarText } from \"./text/mini-calendar.text\";\r\nimport { ITaggingText } from \"./text/tagging.text\";\r\n\r\n/**\r\n * Combined type containing all the CMS text needed throughout the Calendar app.\r\n */\r\nexport type CalendarAppText = ICalendarAppText & IFilterText & IMiniCalendarText & ITaggingText;\r\n\r\nexport const defaultText: CalendarAppText = {\r\n    // ICalendarAppText\r\n    calendarAppHeading: \"Calendar\",\r\n    listViewHeading: \"Calendar Events List\",\r\n    emptyMonthMessage: 'There are no events',\r\n    emptyDayMessage: 'There are no events',\r\n    loadMoreEventsButtonText: 'Load More',\r\n    applyPromoCodeButtonText: 'Apply Code',\r\n    defaultToListView: false,\r\n    noEventsString: \"No events.\",\r\n    noEventsThroughFiltersString: \"No events based on your preferences.\",\r\n    singleEventText: \"event\",\r\n    pluralEventsText: \"events\",\r\n    fallbackThumbnailImageSrc: \"\",\r\n    promoCodeDescriptionText: \"Enter promo code\",\r\n    apiError: null,\r\n    calendarLoadingLabel: \"Calendar is loading\",\r\n    calendarDoneLoadingLabel: \"Calendar has loaded\",\r\n    todayText: \"Today\",\r\n    dateFormat: \"ddd. MMM. D, YYYY\",\r\n    timeFormat: \"ha\",\r\n    timeFormatNoMinutes: \"h:mma\",\r\n    accessibleMonthFormat: \"MMMM YYYY\",\r\n    monthDropdownDescriptionText: \"Select Month\",\r\n    viewMoreDatesButtonText: \"View More\",\r\n    showLessDatesButtonText: \"Show Less\",\r\n    eventFilterDefault:\"All\",\r\n    // IFilterText\r\n    productionFilterLabelText: \"\",\r\n    productionSelectAllDropdownOption: \"All Productions\",\r\n    calendarFiltersHeading: \"Calendar Filters\",\r\n    calendarFiltersBackground: \"default\",\r\n    filterOpenButtonText: \"Filters\",\r\n    filterOpenButtonLabel: \"Open the filters dialog\",\r\n    filterTriggerButtonText: \"Done\",\r\n    filterTriggerButtonLabel: \"Apply the selected filters and close the filters dialog\",\r\n    filterCloseButtonText: \"Cancel\",\r\n    filterCloseButtonLabel: \"Close the filter dialog without applying changes to the filters\",\r\n    typeFilterTitleText: \"Type\",\r\n    typeAllSelectionText: \"All\",\r\n    venueSelectAllDropdownOption: \"All Venues\",\r\n    accessibilityFilterTitleText: \"Accessibility\",\r\n    accessibilityAllSelectionText: \"All\",\r\n    dateAndTimeFilterTitleText: \"Date & Time\",\r\n    discountFilterTitleText: \"Discount\",\r\n    discountAllSelectionText: \"All\",\r\n    nothingSelectedText: \"Nothing selected.\",\r\n    clearAllButtonText: \"Clear All\",\r\n    clearAllButtonLabel: \"Remove all applied filters\",\r\n    //IMiniCalendarText\r\n    miniCalendarHiddenHeading: \"Calendar Date Navigation\",\r\n    skipToEventsButtonText: \"Skip to events list\",\r\n    keyboardInstructions: \"Use the arrow keys to navigate between days of the month. Use shift + up/down arrows to navigate between months.\",\r\n    previousMonthButtonText: \"Previous month\",\r\n    nextMonthButtonText: \"Next month\",\r\n    dateAvailabilityDescription: \"{COUNT} {DESCRIPTION}\",\r\n    noAvailabilityDescription: \"No events found\",\r\n    limitedAvailabilityDescription: \"Selected filters may limit date availability.\",\r\n    monthFormat: \"MMM. YYYY\",\r\n    audioDescribedTooltip: \"Audio Described\",\r\n    audioDescribedLabel: \"Audio Described\",\r\n    openCaptionedTooltip: \"Open Captioning\",\r\n    openCaptionedLabel: \"Open Captioning\",\r\n    sensoryFriendlyTooltip: \"Sensory Friendly\",\r\n    sensoryFriendlyLabel: \"Sensory Friendly\",\r\n    signInterpretedTooltip: \"Sign Interpreted\",\r\n    signInterpretedLabel: \"Sign Interpreted\",\r\n    cuedSpeechTooltip: \"Cued Speech\",\r\n    cuedSpeechLabel: \"Cued Speech\",\r\n    bravoLabel: \"Bravo\",\r\n    myTixLabel: \"MyTix\",\r\n    studentRushLabel: \"Student Rush\",\r\n    notOnSale: \"Not On Sale\",\r\n    loaderImageUrl: \"\",\r\n    gridViewHeading: \"Calendar Grid\",\r\n    gridViewModeButtonText: 'Grid View',\r\n    listViewModeButtonText: 'List View',\r\n    emptyMonthMessaging:\"\"\r\n}","import { FilterState } from \"../../classes/filter-state\";\r\nimport { IEvent } from \"../../interfaces\";\r\nimport { hashFilters } from \"../../helpers/hash-filters\";\r\n\r\n/**\r\n * Interface to define the Filter state of the calendar.\r\n */\r\nexport interface ICalendarFilterState<T extends IEvent> {\r\n    filterHash: number;\r\n    filtersDialogOpen: boolean;\r\n    venueFilter: FilterState<T>;\r\n    availabilityFilter: FilterState<T>;\r\n    genreFilter: FilterState<T>;\r\n    typeFilter: FilterState<T>;\r\n}\r\n\r\nconst venueFilter = new FilterState<IEvent>('location', true);\r\nconst availabilityFilter = new FilterState<IEvent>('discountTags', true);\r\nconst genreFilter = new FilterState<IEvent>('categories', true);\r\nconst typeFilter = new FilterState<IEvent>('type');\r\n\r\nconst filterHash = hashFilters(venueFilter, availabilityFilter, genreFilter, typeFilter);\r\n\r\nexport const defaultCalendarFiltersState: ICalendarFilterState<IEvent> = {\r\n    filterHash,\r\n    filtersDialogOpen: false,\r\n    venueFilter,\r\n    availabilityFilter,\r\n    genreFilter,\r\n    typeFilter\r\n}\r\n","import moment from 'moment';\r\n\r\n/**\r\n * Interface to define external configuration settings for the Calendar app.\r\n */\r\nexport enum CalendarViewMode {\r\n    GRID,\r\n    LIST\r\n}\r\n\r\nexport enum CalendarEventMode {\r\n    All,\r\n    PERFORMANCES,\r\n    DIGITAL,\r\n    EVENTS\r\n}\r\n\r\nexport enum CalendarDeviceMode {\r\n    DESKTOP,\r\n    MOBILE\r\n}\r\n\r\n\r\nexport interface ICalendarSettings {\r\n    loadWrappingMonthDates: boolean;\r\n    saveHistory: boolean;\r\n    monthsOnCalendar: moment.Moment[];\r\n    desktopToMobileTransitionWidth: string;\r\n    scrollToTopAppearanceOffset: number;\r\n    calendarDeviceMode: CalendarDeviceMode;\r\n    calendarViewMode: CalendarViewMode;\r\n}\r\n\r\nconst calendarEntry = document.getElementById(\"calendar-entry-js\");\r\n\r\nexport const defaultCalendarSettings: ICalendarSettings = {\r\n    loadWrappingMonthDates: false,\r\n    saveHistory: false,\r\n    calendarDeviceMode: CalendarDeviceMode.DESKTOP,\r\n    calendarViewMode: CalendarViewMode.GRID,\r\n    monthsOnCalendar: [],\r\n    desktopToMobileTransitionWidth: calendarEntry ? calendarEntry.getAttribute(\"data-calendar-breakpoint\") : \"48em\",\r\n    scrollToTopAppearanceOffset: parseInt(calendarEntry ? calendarEntry.getAttribute(\"data-scroll-to-top-offset\") : \"500\")\r\n}","import moment = require(\"moment\");\r\n\r\nimport { IEvent, IMonth } from \"../../interfaces\";\r\nimport { ICalendarFilterState, defaultCalendarFiltersState } from \"./calendar-filter.state\";\r\nimport { IStartupState, defaultStartupState } from \"./startup.state\";\r\nimport { IMiniCalendarState } from \"./mini-calendar.state\";\r\nimport { IEventFilter } from '../../classes/calendar';\r\n\r\n/**\r\n * Combine various types into a global Calendar State object.\r\n */\r\nexport interface ICalendarState<T extends IEvent> extends ICalendarFilterState<T>, IMiniCalendarState {\r\n    openModalTrigger: HTMLButtonElement | undefined;\r\n    updating: boolean;\r\n    currentScrolledDate: moment.Moment;\r\n    currentDate: moment.Moment;\r\n    miniCalendarDateSelected: boolean;\r\n    miniCalendarDate: moment.Moment;\r\n    startDate: moment.Moment;\r\n    endDate: moment.Moment;\r\n    dateRangeFromQueryString: boolean;\r\n    events: IMonth<T>[];\r\n    firstMonthEvents: IMonth<T>[];\r\n    filteredEvents: IMonth<T>[];\r\n    filteredNextMonthEvents: IMonth<T>[];\r\n    loadedMonths: string[];\r\n    allEventTypes: string[];\r\n    availableEventTypes: string[];\r\n    selectedEventType: string;\r\n    monthToLoad: string;\r\n    apiError: any;\r\n    startupState: IStartupState | null;\r\n    eventFilter: IEventFilter[];\r\n    filterFunction: (event: IEvent) => boolean;\r\n\r\n}\r\n\r\n// Check startup state when initially constructing the defaultCalendarState\r\nconst startDate = moment(defaultStartupState.startDate);\r\nconst endDate = moment(defaultStartupState.endDate);\r\nconst dateRangeFromQueryString = defaultStartupState.dateRangeFromQueryString;\r\nconst thisMonth = moment(defaultStartupState.currentDate).startOf('month');\r\n\r\n//const monthsToLoad: string[] = (() => {\r\n//    const monthsToLoad: string[] = [thisMonth.format('YYYY-MM-DD')];\r\n//    if (endDate.clone().startOf('month').isAfter(thisMonth)) {\r\n//        const yearDiff = endDate.year() - thisMonth.year();\r\n//        const monthDiff = yearDiff * 12 + endDate.month() - thisMonth.month();\r\n//        for (let i = 1; i <= monthDiff; i++) {\r\n//            monthsToLoad.push(thisMonth.clone().add(i, 'months').format('YYYY-MM-DD'));\r\n//        }\r\n//    }\r\n//    return monthsToLoad;\r\n//})();\r\n\r\nconst currentDate: moment.Moment = !!defaultStartupState && defaultStartupState.currentDate !== null ? moment(defaultStartupState.currentDate) : startDate.clone();\r\n\r\nexport const defaultCalendarState: ICalendarState<IEvent> = {\r\n    ...defaultCalendarFiltersState,\r\n    openModalTrigger: undefined,\r\n    updating: true,\r\n    currentDate,\r\n    currentScrolledDate: currentDate.clone().startOf('month'),\r\n    eventFilter: [],\r\n    events: [],\r\n    firstMonthEvents:[],\r\n    allEventTypes: [],\r\n    availableEventTypes: [],\r\n    selectedEventType: '',\r\n    miniCalendarDateSelected: false,\r\n    filteredNextMonthEvents: [],\r\n    miniCalendarDate: null,\r\n    filteredEvents: [],\r\n    loadedMonths: [],\r\n    monthToLoad: thisMonth.format('YYYY-MM-DD'),\r\n    apiError: null,\r\n    startDate: startDate.clone(),\r\n    endDate: endDate.clone(),\r\n    dateRangeFromQueryString,\r\n    currentMonth: startDate.clone().startOf('month'),\r\n    miniCalDialogOpen: false,\r\n    startupState: defaultStartupState,\r\n    filterFunction: () => { return true; },\r\n};","\r\n/**\r\n * Interface for storing lazy-load state.\r\n */\r\nexport interface ILazyLoadState {\r\n    imageHasLoaded: { [key: string]: boolean };\r\n}\r\n\r\nexport const defaultLazyLoadState: ILazyLoadState = {\r\n    imageHasLoaded: {}\r\n};\r\n","import { getQueryStringMap } from \"../../helpers/query-string-map\";\r\nimport moment = require(\"moment\");\r\nimport { AdaTag, DiscountTag } from '../../enums';\r\n\r\n/**\r\n * Interface to define startup-state (state from queryString arguments or localStorage).\r\n */\r\nexport interface IStartupState {\r\n    currentDate: string;\r\n    startDate: string;\r\n    endDate: string;\r\n    dateRangeFromQueryString: boolean;\r\n    typeFilter: string[];\r\n    genreFilter: string[];\r\n    venueFilter: string[];\r\n    availabilityFilter: string[];\r\n}\r\n\r\nlet startupState = JSON.parse(localStorage.getItem('calendarState')) as IStartupState;\r\n\r\nif (startupState !== null) {\r\n    localStorage.removeItem('calendarState');\r\n} else {\r\n    const queryStringArgs = getQueryStringMap(['startDate', 'endDate', 'type', 'genre', 'accessibility', 'discount', 'presenter']);\r\n\r\n    startupState = {\r\n        currentDate: queryStringArgs.has('startDate') ? queryStringArgs.get('startDate') : moment().clone().format('YYYY-MM-DD'),\r\n        startDate: queryStringArgs.has('startDate') ? queryStringArgs.get('startDate') : moment().clone().format('YYYY-MM-DD'),\r\n        endDate: queryStringArgs.has('endDate') ? queryStringArgs.get('endDate') : undefined,\r\n        dateRangeFromQueryString: queryStringArgs.has('endDate'),\r\n        typeFilter: queryStringArgs.has('type') ? queryStringArgs.get('type').split(',') : [],\r\n        genreFilter: queryStringArgs.has('genre') ? queryStringArgs.get('genre').split(',') : [],\r\n        venueFilter: queryStringArgs.has('location') ? queryStringArgs.get('location').split(',') : [],\r\n        availabilityFilter: queryStringArgs.has('availability') ? queryStringArgs.get('availability').split(',') : []\r\n    }\r\n}\r\n\r\n\r\n//function discountSwitch(input: string): string {\r\n//    switch (input) {\r\n//        case \"bravo\":\r\n//            return String(DiscountTag.Bravo);\r\n//        case \"myTix\":\r\n//            return String(DiscountTag.MyTix);\r\n//        case \"studentRush\":\r\n//            return String(DiscountTag.StudentRush);\r\n//        default:\r\n//            return \"\";\r\n//    }\r\n//}\r\n\r\nexport const defaultStartupState: IStartupState = startupState;\r\n\r\n\r\n","import { ActionType } from '../../classes/action-type';\r\nimport { ICalendarStateAction } from '../interfaces/calendar-state.action';\r\nimport { ICalendarSettings, defaultCalendarSettings, CalendarDeviceMode, CalendarViewMode } from '../interfaces/calendar-settings';\r\n\r\n/**\r\n * Simple reducer to update the calendar settings.\r\n * \r\n * NOT CURRENTLY IN USE\r\n */\r\nexport default function calendarSettingsReducer(state: ICalendarSettings = defaultCalendarSettings, action: ICalendarStateAction) {\r\n    switch (action.type) {\r\n        case ActionType.UpdateSettings: {\r\n            return { ...state, ...action.value } as ICalendarSettings;\r\n        }\r\n        case ActionType.SetToDesktop: {\r\n            return { ...state, calendarDeviceMode: CalendarDeviceMode.DESKTOP } as ICalendarSettings;\r\n        }\r\n        case ActionType.SetToMobile: {\r\n            return { ...state, calendarDeviceMode: CalendarDeviceMode.MOBILE, calendarViewMode: CalendarViewMode.LIST } as ICalendarSettings;\r\n        }\r\n        case ActionType.SetToGrid: {\r\n            return { ...state, calendarViewMode: CalendarViewMode.GRID } as ICalendarSettings;\r\n        }\r\n        case ActionType.SetToList: {\r\n            return { ...state, calendarViewMode: CalendarViewMode.LIST } as ICalendarSettings;\r\n        }\r\n        default:\r\n            return state;\r\n    }\r\n}\r\n","import { ActionType } from '../../classes/action-type';\r\nimport { CalendarAppText, defaultText } from '../interfaces/calendar-app-text.state';\r\nimport { ICalendarStateAction } from '../interfaces/calendar-state.action';\r\n\r\n/**\r\n * Returns the new search state given a particular action. This where all of the application\r\n * logic resides.\r\n */\r\nexport default function calendarTextReducer(state: CalendarAppText = defaultText, action: ICalendarStateAction) {\r\n    switch (action.type) {\r\n        case ActionType.ReceiveText: {\r\n            return { ...state, ...action.value, requesting: false, apiError: null } as CalendarAppText;\r\n        }\r\n        default:\r\n            return state;\r\n    }\r\n}\r\n","import moment from 'moment';\r\n\r\nimport { IEvent, IMonth } from '../../interfaces';\r\nimport { ActionType } from '../../classes/action-type';\r\nimport { checkIfUpdating, checkIfNewMonth } from '../actions/calendar.actions';\r\n\r\nimport { ICalendarStateAction } from '../interfaces/calendar-state.action';\r\nimport { ICalendarState, defaultCalendarState } from '../interfaces/calendar.state';\r\n\r\nimport { filterEvents } from '../../helpers/filter-events';\r\nimport { sortStrings } from '../../helpers/sort-strings';\r\nimport { IEventFilter } from '../../classes/calendar';\r\nimport { AddFilterToQuery } from '../../helpers/filter-by-query';\r\nimport { setCookie, dateCookieName } from '../../helpers/cookie-helper';\r\n\r\n/**\r\n * Returns the new search state given a particular action. This where all of the application\r\n * logic resides.\r\n */\r\nexport default function calendarReducer(state: ICalendarState<IEvent> = defaultCalendarState, action: ICalendarStateAction): ICalendarState<IEvent> {\r\n    switch (action.type) {\r\n\r\n        /**\r\n         * Checks various states to update global `updating` property.\r\n         */\r\n        case ActionType.CheckIfUpdating: {\r\n            const updating = state.monthToLoad.length > 0\r\n\r\n            return {\r\n                ...state,\r\n                updating\r\n            };\r\n        }\r\n\r\n        /**\r\n         * Checks if `currentDate` or `currentMonth` are outside the range of `loadedMonths`.\r\n         * \r\n         * Checks if the `updating` state needs to change before returning the updated state.\r\n         */\r\n        case ActionType.CheckIfNewMonth: {\r\n            let { loadedMonths, monthToLoad, currentMonth, venueFilter, availabilityFilter, genreFilter, typeFilter, filterFunction } = state;\r\n\r\n            // check if the currentMonth is outside the range of loaded/loading months\r\n            if (!loadedMonths.some(month => month === currentMonth.format('YYYY-MM-DD'))) {\r\n                monthToLoad = currentMonth.format('YYYY-MM-DD');\r\n            }\r\n\r\n            // handle restricted ranges\r\n            if (state.dateRangeFromQueryString) {\r\n                // remove date-range restriction and display all loaded events\r\n                const { genreFilter, venueFilter, availabilityFilter, typeFilter } = state;\r\n                const rangeRestriction = { restricted: false };\r\n\r\n                // update filtered events\r\n                const [filteredEvents, filterHash] = filterEvents(state.events, rangeRestriction, filterFunction, venueFilter, availabilityFilter, genreFilter, typeFilter);\r\n\r\n                return {\r\n                    ...state,\r\n                    dateRangeFromQueryString: false,\r\n                    filteredEvents,\r\n                    filterHash,\r\n                    monthToLoad\r\n                };\r\n            } else {\r\n\r\n                // if loading more dates, indicate filters should update\r\n                //if (monthToLoad.length > 0) {\r\n                //    adaFilter.loaded = false;\r\n                //    discountFilter.loaded = false;\r\n                //    genreFilter.loaded = false;\r\n                //    typeFilter.loaded = false;\r\n                //}\r\n\r\n                return calendarReducer({\r\n                    ...state,\r\n                    monthToLoad,\r\n                    venueFilter,\r\n                    availabilityFilter,\r\n                    genreFilter,\r\n                    typeFilter,\r\n                    filterFunction\r\n                }, checkIfUpdating());\r\n            }\r\n        }\r\n\r\n        /**\r\n         * Update the MiniCalendar to display the next month.\r\n         * \r\n         * Checks if a new month needs to be loaded before returning the updated state.\r\n         */\r\n        case ActionType.NextMonth: {\r\n            const currentMonth = state.currentMonth.clone().add(1, 'month');\r\n            const newDate = currentMonth.clone().startOf('month');\r\n\r\n            return calendarReducer({\r\n                ...state,\r\n                currentDate: newDate,\r\n                currentMonth\r\n            }, checkIfNewMonth());\r\n        }\r\n\r\n        /**\r\n         * Update the MiniCalendar to display the previous month.\r\n         */\r\n        case ActionType.PreviousMonth: {\r\n            const previousMonth = state.currentMonth.clone().add(-1, 'month').startOf('month');\r\n            const newDate = previousMonth.clone().startOf('month');\r\n\r\n            if (previousMonth.isSameOrAfter(moment().startOf('month'))) {\r\n                return calendarReducer({\r\n                    ...state,\r\n                    currentDate: newDate,\r\n                    currentMonth: previousMonth\r\n                }, checkIfNewMonth());\r\n            } else {\r\n                return state;\r\n            }\r\n        }\r\n\r\n        /**\r\n         * Update the displayed month in the sticky nav based on scroll position.\r\n         */\r\n        case ActionType.UpdateScrolledDate: {\r\n            return {\r\n                ...state,\r\n                currentScrolledDate: action.value,\r\n                currentDate: action.value\r\n            };\r\n        }\r\n\r\n        case ActionType.SelectedDate: {\r\n            return {\r\n                ...state,\r\n                currentDate: action.value,\r\n                miniCalendarDateSelected: true,\r\n                miniCalendarDate: action.value\r\n            };\r\n        }\r\n\r\n        /**\r\n         * Set the MiniCalendar's `currentDate` to a specific `moment`.\r\n         * \r\n         * Checks if a new month needs to be loaded before returning the updated state.\r\n         */\r\n        case ActionType.SetDate: {\r\n            const newDate = (action.value as moment.Moment).clone();\r\n            const newMonth = newDate.clone().startOf('month');\r\n\r\n            setCookie(dateCookieName, newDate.format(), 10);\r\n\r\n            return calendarReducer({\r\n                ...state,\r\n                currentDate: newDate,\r\n                currentMonth: newMonth\r\n            }, checkIfNewMonth());\r\n        }\r\n\r\n        case ActionType.SetCurrentMonth: {\r\n            const currentMonth = (action.value as moment.Moment).clone();\r\n            const newDate = currentMonth.clone().startOf('month');\r\n\r\n            setCookie(dateCookieName, newDate.format(), 10);\r\n\r\n            return calendarReducer({\r\n                ...state,\r\n                currentDate: currentMonth,\r\n                currentMonth: newDate\r\n            }, checkIfNewMonth());\r\n        }\r\n\r\n        case ActionType.GoToMonth: {\r\n            const setDate = action.value.clone() as moment.Moment;\r\n\r\n            const newDate = setDate.clone().startOf('month');\r\n            let newStart: moment.Moment;\r\n            let newEnd: moment.Moment;\r\n\r\n            let mustUpdate = false;\r\n\r\n            if (setDate.isBefore(state.startDate)) {\r\n                newStart = setDate.clone().startOf(\"month\");\r\n                mustUpdate = true;\r\n            } else {\r\n                newStart = state.startDate.clone();\r\n            }\r\n\r\n            if (setDate.isAfter(state.endDate)) {\r\n                newEnd = setDate.clone().endOf(\"month\");\r\n                mustUpdate = true;\r\n            } else {\r\n                newEnd = state.endDate.clone();\r\n            }\r\n\r\n            return calendarReducer({\r\n                ...state,\r\n                updating: mustUpdate,\r\n                currentDate: action.value.clone(),\r\n                startDate: newStart,\r\n                currentMonth: newDate,\r\n                endDate: newEnd\r\n            }, checkIfNewMonth());\r\n        }\r\n\r\n\r\n        case ActionType.UpdateEventFilter: {\r\n            const updating = true;\r\n            const addedFilterFunction = action.value.function;\r\n\r\n            var eventFilter: IEventFilter[] = null;\r\n            if (state.eventFilter.some(filter => { return filter.key === addedFilterFunction.key })) {\r\n                eventFilter = state.eventFilter.filter(filter => !(filter.key === addedFilterFunction.key)).concat([addedFilterFunction]);\r\n            } else {\r\n                eventFilter = state.eventFilter.concat([addedFilterFunction])\r\n            }\r\n            const filterFunction = (event) => eventFilter.map(fil => { return fil.filter; }).every(f => f(event));\r\n\r\n            if (action.value.shouldUpdateQuery) {\r\n                AddFilterToQuery(eventFilter);\r\n            }\r\n\r\n            const { loadedMonths, monthToLoad, typeFilter, genreFilter, venueFilter, availabilityFilter } = state;\r\n            const rangeRestriction = { restricted: false };\r\n            const [filteredEvents, filterHash] = filterEvents(state.events, rangeRestriction, filterFunction, venueFilter, availabilityFilter, genreFilter, typeFilter);\r\n\r\n\r\n            return { ...state, eventFilter, filterFunction, filteredEvents, updating, miniCalendarDateSelected: false, miniCalendarDate: null } as ICalendarState<IEvent>;\r\n        }\r\n\r\n        case ActionType.RemoveEventFilter: {\r\n            const { loadedMonths, monthToLoad, typeFilter, genreFilter, venueFilter, availabilityFilter } = state;\r\n            const rangeRestriction = { restricted: false };\r\n\r\n            const eventFilter = state.eventFilter.filter(filter => filter.key !== action.value);\r\n            const filterFunction = (event: IEvent) => eventFilter.map(filter => filter.filter).every(func => func(event));\r\n\r\n            AddFilterToQuery(eventFilter);\r\n            const [filteredEvents, filterHash] = filterEvents(state.events, rangeRestriction, filterFunction, venueFilter, availabilityFilter, genreFilter, typeFilter);\r\n\r\n\r\n            return { ...state, eventFilter, filterFunction, filteredEvents, updating: true, miniCalendarDateSelected: false, miniCalendarDate: null } as ICalendarState<IEvent>;\r\n        }\r\n\r\n        case ActionType.RemoveAllEventFilters: {\r\n            const { loadedMonths, monthToLoad, typeFilter, genreFilter, venueFilter, availabilityFilter } = state;\r\n            const rangeRestriction = { restricted: false };\r\n\r\n            let filterFunction = (event: IEvent) => true;\r\n            AddFilterToQuery([]);\r\n            const [filteredEvents, filterHash] = filterEvents(state.events, rangeRestriction, filterFunction, venueFilter, availabilityFilter, genreFilter, typeFilter);\r\n\r\n            return {\r\n                ...state, eventFilter: [], filterFunction: filterFunction,\r\n                filteredEvents: state.events,\r\n                updating: true,\r\n                miniCalendarDateSelected: false,\r\n                miniCalendarDate: null,\r\n                currentScrolledDate: moment(),\r\n                currentDate: moment(),\r\n            } as ICalendarState<IEvent>;\r\n        }\r\n\r\n        /**\r\n         * Open the MiniCalendar modal and store a reference to the button element which was clicked to open the modal.\r\n         */\r\n        case ActionType.OpenMiniCalDialog: {\r\n            return {\r\n                ...state,\r\n                miniCalDialogOpen: true,\r\n                openModalTrigger: action.value\r\n            }\r\n        }\r\n\r\n        /**\r\n         * Close the MiniCalendar modal and focus the reference to the button element which was clicked to open the modal.\r\n         */\r\n        case ActionType.CloseMiniCalDialog: {\r\n            state.openModalTrigger.focus();\r\n            return {\r\n                ...state,\r\n                miniCalDialogOpen: false,\r\n                openModalTrigger: undefined\r\n            }\r\n        }\r\n\r\n        /**\r\n         * Open the Filters modal and store a reference to the button element which was clicked to open the modal.\r\n         */\r\n        case ActionType.OpenFiltersDialog: {\r\n            return {\r\n                ...state,\r\n                filtersDialogOpen: true,\r\n                openModalTrigger: action.value\r\n            };\r\n        }\r\n\r\n        /**\r\n         * Close the Filters modal and focus the reference to the button element which was clicked to open the modal.\r\n         */\r\n        case ActionType.CloseFiltersDialog: {\r\n            state.openModalTrigger.focus();\r\n            return {\r\n                ...state,\r\n                filtersDialogOpen: false,\r\n                openModalTrigger: undefined\r\n            };\r\n        }\r\n\r\n\r\n        //case ActionType.SetEventType: {\r\n        //    var selectedEvent = action.value as string;\r\n        //    return {\r\n        //        ...state,\r\n        //        selectedEventType: \r\n        //    };\r\n        //}\r\n\r\n        /**\r\n         * Handle a click on the Load More button.\r\n         * \r\n         * Either removes the restricted range (display all loaded events) or\r\n         * triggers the app to load additional dates / filter options.\r\n         */\r\n        case ActionType.LoadMore: {\r\n            const { loadedMonths, monthToLoad, typeFilter, genreFilter, venueFilter, availabilityFilter, filterFunction } = state;\r\n\r\n            // remove a restricted range\r\n            if (state.dateRangeFromQueryString) {\r\n\r\n                // update filtered events\r\n                const rangeRestriction = { restricted: false };\r\n                const [filteredEvents, filterHash] = filterEvents(state.events, rangeRestriction, filterFunction, venueFilter, availabilityFilter, genreFilter, typeFilter);\r\n\r\n                return {\r\n                    ...state,\r\n                    dateRangeFromQueryString: false,\r\n                    filteredEvents,\r\n                    filterHash\r\n                };\r\n            }\r\n\r\n            // find the most recently loaded month\r\n            //const allMonths = [...loadedMonths, ...monthToLoad].sort(sortStrings);\r\n            //const lastLoaded = allMonths[loadedMonths.length - 1];\r\n\r\n            // update currentMonth and monthsToLoad\r\n            const currentMonth = moment(monthToLoad).clone().add(1, 'month');\r\n            //monthsToLoad.push(currentMonth.format('YYYY-MM-DD'));\r\n\r\n            // indicate that filters should load additional options\r\n            //typeFilter.loaded = false;\r\n            //genreFilter.loaded = false;\r\n            //adaFilter.loaded = false;\r\n            //discountFilter.loaded = false;\r\n\r\n            return calendarReducer({\r\n                ...state,\r\n                currentMonth,\r\n                monthToLoad: currentMonth.format('YYYY-MM-DD'),\r\n                typeFilter,\r\n                genreFilter,\r\n                venueFilter,\r\n                availabilityFilter,\r\n                filterFunction\r\n            }, checkIfUpdating());\r\n        }\r\n        case ActionType.UpdateGridEvents: {\r\n            const events = action.value as Array<IMonth<any>>;\r\n\r\n            return { ...state, updating: false, events: events } as ICalendarState<IEvent>;\r\n        }\r\n\r\n        case ActionType.UpdateNextMonthEvents: {\r\n            const { venueFilter, availabilityFilter, genreFilter, typeFilter, filterFunction } = state;\r\n            let { events } = state;\r\n            let { monthToLoad } = state;\r\n            // make sure we aren't adding duplicates\r\n            const loadedMonth = action.value.loadedMonth as string;\r\n            const month = action.value.month as IMonth<IEvent>;\r\n\r\n            // save the events to the store\r\n            events = [month];\r\n            //loadedMonths = [...loadedMonth];\r\n            monthToLoad = \"\";\r\n            //monthsToLoad.splice(monthsToLoad.indexOf(loadedMonth), 1);\r\n\r\n\r\n\r\n            // update filtered events\r\n            const rangeRestriction = { restricted: state.dateRangeFromQueryString, startDate: state.startDate, endDate: state.endDate };\r\n            const [filteredNextMonthEvents, filterHash] = monthToLoad.length === 0 ? filterEvents(events, rangeRestriction, filterFunction, venueFilter, availabilityFilter, genreFilter, typeFilter) : [state.filteredEvents, state.filterHash];\r\n            let allEventTypes = [...new Set(events.flatMap(e => e.events.productions).flatMap(p => p.eventType).filter(e => e != \"\"))];\r\n            let availableEventTypes = [...new Set(filteredNextMonthEvents.flatMap(e => e.events.productions).flatMap(p => p.eventType).filter(e => e != \"\"))];\r\n            return calendarReducer({\r\n                ...state,\r\n                events: state.firstMonthEvents,\r\n                loadedMonths: [...loadedMonth],\r\n                monthToLoad,\r\n                filteredEvents: state.filteredEvents,\r\n                filteredNextMonthEvents,\r\n                filterHash,\r\n                allEventTypes: allEventTypes,\r\n                availableEventTypes: availableEventTypes,\r\n                miniCalendarDate: null, miniCalendarDateSelected: false,\r\n            }, checkIfUpdating());\r\n        }\r\n    \r\n        /**\r\n         * Update the store with additional events from the API.\r\n         */\r\n\r\n        case ActionType.UpdateEvents: {\r\n            const { venueFilter, availabilityFilter, genreFilter, typeFilter, filterFunction } = state;\r\n            let { events } = state;\r\n            let { monthToLoad } = state;\r\n            // make sure we aren't adding duplicates\r\n            const loadedMonth = action.value.loadedMonth as string;\r\n            const month = action.value.month as IMonth<IEvent>;\r\n\r\n            // save the events to the store\r\n            events = [month];\r\n            //loadedMonths = [...loadedMonth];\r\n            monthToLoad = \"\";\r\n            //monthsToLoad.splice(monthsToLoad.indexOf(loadedMonth), 1);\r\n\r\n\r\n\r\n            // update filtered events\r\n            const rangeRestriction = { restricted: state.dateRangeFromQueryString, startDate: state.startDate, endDate: state.endDate };\r\n            const [filteredEvents, filterHash] = monthToLoad.length === 0 ? filterEvents(events, rangeRestriction, filterFunction, venueFilter, availabilityFilter, genreFilter, typeFilter) : [state.filteredEvents, state.filterHash];\r\n            let allEventTypes = [...new Set(events.flatMap(e => e.events.productions).flatMap(p => p.eventType).filter(e => e != \"\"))];\r\n            let availableEventTypes = [...new Set(filteredEvents.flatMap(e => e.events.productions).flatMap(p => p.eventType).filter(e => e != \"\"))];\r\n            return calendarReducer({\r\n                ...state,\r\n                events,\r\n                firstMonthEvents: events,\r\n                loadedMonths: [...loadedMonth],\r\n                monthToLoad,\r\n                filteredEvents,\r\n                filterHash,\r\n                allEventTypes: allEventTypes,\r\n                availableEventTypes: availableEventTypes,\r\n                miniCalendarDate: null, miniCalendarDateSelected: false,\r\n            }, checkIfUpdating());\r\n        }\r\n        default:\r\n            return state;\r\n    }\r\n}\r\n","import { ActionType } from '../../classes/action-type';\r\nimport { ICalendarStateAction } from '../interfaces/calendar-state.action';\r\nimport { ILazyLoadState, defaultLazyLoadState } from '../interfaces/lazy-load.state';\r\n\r\n/**\r\n * Returns the new search state given a particular action. This where all of the application\r\n * logic resides.\r\n */\r\nexport default function lazyLoadReducer(state: ILazyLoadState = defaultLazyLoadState, action: ICalendarStateAction) {\r\n    switch (action.type) {\r\n        case ActionType.WaitForImage: {\r\n            if (action.value in state.imageHasLoaded) {\r\n                return state;\r\n            } else {\r\n                let imagesDictionary = { ...state.imageHasLoaded };\r\n                imagesDictionary[action.value] = false;\r\n\r\n                return { ...state, imageHasLoaded: imagesDictionary } as ILazyLoadState;\r\n            }\r\n        }\r\n        case ActionType.ImageHasLoaded: {\r\n            let imagesDictionary = { ...state.imageHasLoaded };\r\n            imagesDictionary[action.value] = true;\r\n\r\n            return { ...state, imageHasLoaded: imagesDictionary } as ILazyLoadState;\r\n        }\r\n        default:\r\n            return state;\r\n    }\r\n}\r\n","module.exports = __WEBPACK_EXTERNAL_MODULE__6215__;","module.exports = __WEBPACK_EXTERNAL_MODULE__8383__;","module.exports = __WEBPACK_EXTERNAL_MODULE__3949__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.hmd = function(module) {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: function() {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t548: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tfor(moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) var result = runtime(__webpack_require__);\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkIds[i]] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkLibrary\"] = self[\"webpackChunkLibrary\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [592], function() { return __webpack_require__(7322); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"sourceRoot":""}