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GgR,GAA6C,CAAE7R,QAAS,mBAAoB0C,GAAY6C,OAAQgM,OAExIY,EAAqC,CAC9CnS,aAAS0C,EACTzC,aAASyC,EACT6C,OAAQ0L,EACRhG,YAAauG,EACbQ,OAAQ,IACRC,WAAY,IACZF,OAAQ,CAAC,GAEAK,EAA4CxR,OAAOC,OAAOD,OAAOC,OAAO,CAAC,EAAGsR,GAAqC,CAAEnS,aAAS0C,EAAW6C,OAAQyL,IAC/IqB,EAA+CF,EAC/CG,EAAyClS,GAC9C,YAAaA,EACNgS,EACJC,C,kBC7BJ,IAAIE,E,iBACX,SAAWA,GAIPA,EAA8C,MAAI,QAIlDA,EAAsD,cAAI,eAC7D,CATD,CASGA,IAA2CA,EAAyC,CAAC,G","sources":["webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-domain/dist/domains/browsing/utils/showtimes/get-showtimes-query.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/subcomponents/date-picker/subcomponents/date.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/subcomponents/date-picker/subcomponents/skeleton.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/node_modules/date-fns/esm/min/index.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/node_modules/date-fns/esm/max/index.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/subcomponents/date-picker/utils.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/node_modules/date-fns/esm/eachDayOfInterval/index.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/subcomponents/date-picker/date-picker.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/subcomponents/form/input/toggle/toggle-input.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/subcomponents/form/input/toggle/types/layout.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-domain/dist/domains/browsing/actions/showtimes/load-showtimes-for-first-business-date.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/utils/date-showtime-picker-utils.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/utils/action-type.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/utils/action-reducer.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/utils/filter-screening-dates.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/utils/get-film-ids-to-display.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/utils/get-next-or-previous-screening-date.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/utils/get-no-showtimes-for-site-display-text-props.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/utils/get-selected-business-date.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-domain/dist/domains/browsing/actions/showtimes/add-showtime-ids-for-query-on-business-date.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/utils/handle-date-selected.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/utils/validate.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/date-showtime-picker.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/types/state.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-domain/dist/domains/browsing/selectors/showtimes/get-all-showtimes.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/types/internal-action.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-domain/dist/utils/validators/business-date.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/types/config.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/subcomponents/date-picker/types/props.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/types/display-text.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/types/props.js","webpack://vista.digital.curzon/./node_modules/@vista/omnichannel-components-ui/lib/src/lib/components/date-showtime-picker/types/selected-business-date.js"],"sourcesContent":["import { getSelectedSiteIds } from '../../selectors/sites/get-selected-site-ids';\r\n/**\r\n * Returns a ShowtimeQuery object that contains the filmId and siteId filters for the Showtime Picker component,\r\n * based on the current config and browsing store selections.\r\n */\r\nexport const getShowtimesQuery = (filmIds, siteIds) => {\r\n return {\r\n filmIds,\r\n siteIds: siteIds !== null && siteIds !== void 0 ? siteIds : getSelectedSiteIds()\r\n };\r\n};\r\n","import { jsx as _jsx } from \"react/jsx-runtime\";\r\nimport { parseBusinessDate } from '@vista/omnichannel-components-domain';\r\nimport { bemClassBuilder } from '@vista-digital/bem-class-builder';\r\nimport { observer } from 'mobx-react';\r\nimport { DisplayText } from '../../display-text';\r\nconst b = bemClassBuilder('v-date-picker-date');\r\nexport const DatePickerDate = observer(props => {\r\n const { value, onClick, dateFormat } = props;\r\n const { businessDate, isActive, isSelected, isToday } = props.value;\r\n const handleClick = () => onClick(value.businessDate);\r\n return (_jsx(\"li\", Object.assign({ className: b.block() }, { children: _jsx(\"button\", Object.assign({ className: b.element('button', { selected: isSelected, inactive: !isActive }), onClick: handleClick }, { children: _jsx(DisplayText, { label: dateFormat, templateParameters: { date: parseBusinessDate(businessDate) }, className: b.element('label', { today: isToday }) }) })) })));\r\n});\r\nDatePickerDate.displayName = 'DatePickerDate';\r\n","import { jsx as _jsx } from \"react/jsx-runtime\";\r\nexport const DatePickerSkeleton = () => _jsx(\"div\", { className: \"v-date-picker v-date-picker--skeleton\" });\r\nDatePickerSkeleton.displayName = 'DatePickerSkeleton';\r\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name min\n * @category Common Helpers\n * @summary Returns the earliest of the given dates.\n *\n * @description\n * Returns the earliest of the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - `min` function now accepts an array of dates rather than spread arguments.\n *\n * ```javascript\n * // Before v2.0.0\n * const date1 = new Date(1989, 6, 10)\n * const date2 = new Date(1987, 1, 11)\n * const minDate = min(date1, date2)\n *\n * // v2.0.0 onward:\n * const dates = [new Date(1989, 6, 10), new Date(1987, 1, 11)]\n * const minDate = min(dates)\n * ```\n *\n * @param {Date[]|Number[]} datesArray - the dates to compare\n * @returns {Date} - the earliest of the dates\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which of these dates is the earliest?\n * const result = min([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Wed Feb 11 1987 00:00:00\n */\n\nexport default function min(dirtyDatesArray) {\n requiredArgs(1, arguments);\n var datesArray; // `dirtyDatesArray` is Array, Set or Map, or object with custom `forEach` method\n\n if (dirtyDatesArray && typeof dirtyDatesArray.forEach === 'function') {\n datesArray = dirtyDatesArray; // If `dirtyDatesArray` is Array-like Object, convert to Array.\n } else if (typeof dirtyDatesArray === 'object' && dirtyDatesArray !== null) {\n datesArray = Array.prototype.slice.call(dirtyDatesArray);\n } else {\n // `dirtyDatesArray` is non-iterable, return Invalid Date\n return new Date(NaN);\n }\n\n var result;\n datesArray.forEach(function (dirtyDate) {\n var currentDate = toDate(dirtyDate);\n\n if (result === undefined || result > currentDate || isNaN(currentDate.getDate())) {\n result = currentDate;\n }\n });\n return result || new Date(NaN);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name max\n * @category Common Helpers\n * @summary Return the latest of the given dates.\n *\n * @description\n * Return the latest of the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - `max` function now accepts an array of dates rather than spread arguments.\n *\n * ```javascript\n * // Before v2.0.0\n * var date1 = new Date(1989, 6, 10)\n * var date2 = new Date(1987, 1, 11)\n * var maxDate = max(date1, date2)\n *\n * // v2.0.0 onward:\n * var dates = [new Date(1989, 6, 10), new Date(1987, 1, 11)]\n * var maxDate = max(dates)\n * ```\n *\n * @param {Date[]|Number[]} datesArray - the dates to compare\n * @returns {Date} the latest of the dates\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which of these dates is the latest?\n * var result = max([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Sun Jul 02 1995 00:00:00\n */\n\nexport default function max(dirtyDatesArray) {\n requiredArgs(1, arguments);\n var datesArray; // `dirtyDatesArray` is Array, Set or Map, or object with custom `forEach` method\n\n if (dirtyDatesArray && typeof dirtyDatesArray.forEach === 'function') {\n datesArray = dirtyDatesArray; // If `dirtyDatesArray` is Array-like Object, convert to Array.\n } else if (typeof dirtyDatesArray === 'object' && dirtyDatesArray !== null) {\n datesArray = Array.prototype.slice.call(dirtyDatesArray);\n } else {\n // `dirtyDatesArray` is non-iterable, return Invalid Date\n return new Date(NaN);\n }\n\n var result;\n datesArray.forEach(function (dirtyDate) {\n var currentDate = toDate(dirtyDate);\n\n if (result === undefined || result < currentDate || isNaN(Number(currentDate))) {\n result = currentDate;\n }\n });\n return result || new Date(NaN);\n}","import { getBusinessDateString, parseBusinessDate } from '@vista/omnichannel-components-domain';\r\nimport { eachDayOfInterval, isToday as isDateToday, max, min } from 'date-fns';\r\nexport const getDatePickerDateValues = (businessDates, selectedBusinessDate, i18n) => {\r\n if (businessDates.length === 0)\r\n return [];\r\n const parsedBusinessDates = businessDates.map(parseBusinessDate);\r\n const allDates = eachDayOfInterval({\r\n start: min([...parsedBusinessDates, new Date(Date.now())]),\r\n end: max(parsedBusinessDates)\r\n });\r\n return allDates.map(date => {\r\n const businessDate = i18n.date(date, { format: 'YYYY-MM-DD' });\r\n return {\r\n businessDate: getBusinessDateString(date),\r\n isActive: businessDates.includes(businessDate),\r\n isSelected: businessDate === selectedBusinessDate,\r\n isToday: isDateToday(date)\r\n };\r\n });\r\n};\r\n","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name eachDayOfInterval\n * @category Interval Helpers\n * @summary Return the array of dates within the specified time interval.\n *\n * @description\n * Return the array of dates within the specified time interval.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The function was renamed from `eachDay` to `eachDayOfInterval`.\n * This change was made to mirror the use of the word \"interval\" in standard ISO 8601:2004 terminology:\n *\n * ```\n * 2.1.3\n * time interval\n * part of the time axis limited by two instants\n * ```\n *\n * Also, this function now accepts an object with `start` and `end` properties\n * instead of two arguments as an interval.\n * This function now throws `RangeError` if the start of the interval is after its end\n * or if any date in the interval is `Invalid Date`.\n *\n * ```javascript\n * // Before v2.0.0\n *\n * eachDay(new Date(2014, 0, 10), new Date(2014, 0, 20))\n *\n * // v2.0.0 onward\n *\n * eachDayOfInterval(\n * { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) }\n * )\n * ```\n *\n * @param {Interval} interval - the interval. See [Interval]{@link https://date-fns.org/docs/Interval}\n * @param {Object} [options] - an object with options.\n * @param {Number} [options.step=1] - the step to increment by. The value should be more than 1.\n * @returns {Date[]} the array with starts of days from the day of the interval start to the day of the interval end\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.step` must be a number greater than 1\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // Each day between 6 October 2014 and 10 October 2014:\n * const result = eachDayOfInterval({\n * start: new Date(2014, 9, 6),\n * end: new Date(2014, 9, 10)\n * })\n * //=> [\n * // Mon Oct 06 2014 00:00:00,\n * // Tue Oct 07 2014 00:00:00,\n * // Wed Oct 08 2014 00:00:00,\n * // Thu Oct 09 2014 00:00:00,\n * // Fri Oct 10 2014 00:00:00\n * // ]\n */\n\nexport default function eachDayOfInterval(dirtyInterval, options) {\n requiredArgs(1, arguments);\n var interval = dirtyInterval || {};\n var startDate = toDate(interval.start);\n var endDate = toDate(interval.end);\n var endTime = endDate.getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date`\n\n if (!(startDate.getTime() <= endTime)) {\n throw new RangeError('Invalid interval');\n }\n\n var dates = [];\n var currentDate = startDate;\n currentDate.setHours(0, 0, 0, 0);\n var step = options && 'step' in options ? Number(options.step) : 1;\n if (step < 1 || isNaN(step)) throw new RangeError('`options.step` must be a number greater than 1');\n\n while (currentDate.getTime() <= endTime) {\n dates.push(toDate(currentDate));\n currentDate.setDate(currentDate.getDate() + step);\n currentDate.setHours(0, 0, 0, 0);\n }\n\n return dates;\n}","import { jsx as _jsx } from \"react/jsx-runtime\";\r\nimport { bemClassBuilder } from '@vista-digital/bem-class-builder';\r\nimport { observer } from 'mobx-react';\r\nimport { useEffect, useState } from 'react';\r\nimport { useI18n } from '../../context/occ/hooks/use-i18n';\r\nimport { useOccConfig } from '../../context/occ/hooks/use-occ-config';\r\nimport { Carousel } from '../carousel/carousel';\r\nimport { DatePickerDate } from './subcomponents/date';\r\nimport { DatePickerSkeleton } from './subcomponents/skeleton';\r\nimport { getDatePickerDateValues } from './utils';\r\nconst b = bemClassBuilder('v-date-picker');\r\nexport const DatePicker = observer(props => {\r\n const i18n = useI18n();\r\n const { enableSkeletonLoadingIndicators } = useOccConfig();\r\n const { isLoading, businessDates, selectedBusinessDate, onDateClicked, dateFormat, todayDateFormat, dateExternallyClicked, carouselConfig } = props;\r\n const values = getDatePickerDateValues(businessDates, selectedBusinessDate, i18n);\r\n const [scrollToSlide, setScrollToSlide] = useState(0);\r\n // Scroll an externally clicked date into view.\r\n useEffect(() => {\r\n if (!dateExternallyClicked)\r\n return;\r\n const index = values.findIndex(v => v.businessDate === selectedBusinessDate);\r\n setScrollToSlide(index + 1);\r\n }, [dateExternallyClicked, selectedBusinessDate, values]);\r\n if (isLoading)\r\n return enableSkeletonLoadingIndicators ? _jsx(DatePickerSkeleton, {}) : null;\r\n return (_jsx(\"div\", Object.assign({ className: b.block() }, { children: _jsx(Carousel, Object.assign({ config: Object.assign(Object.assign({}, carouselConfig), { scrollToSlide }) }, { children: values.map(value => (_jsx(DatePickerDate, { value: value, onClick: onDateClicked, dateFormat: value.isToday ? todayDateFormat : dateFormat }, value.businessDate))) })) })));\r\n});\r\nDatePicker.displayName = 'DatePicker';\r\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { bemClassBuilder } from '@vista-digital/bem-class-builder';\r\nimport { observer } from 'mobx-react';\r\nimport { useState } from 'react';\r\nimport { DisplayText } from '../../../display-text/display-text';\r\nconst b = bemClassBuilder('v-toggle-input');\r\n/**\r\n * Renders a single toggle input.\r\n */\r\nexport const ToggleInput = observer(props => {\r\n const { className, label, name, value: checked, onChange, onChangeValue, style, disabled, id, loading, layout } = props;\r\n const [isFocused, setIsFocused] = useState(false);\r\n const handleChange = event => {\r\n if (disabled)\r\n return;\r\n onChange === null || onChange === void 0 ? void 0 : onChange(event);\r\n onChangeValue === null || onChangeValue === void 0 ? void 0 : onChangeValue(event.target.checked);\r\n };\r\n const handleFocus = () => setIsFocused(true);\r\n const handleBlur = () => setIsFocused(false);\r\n return (_jsx(\"div\", Object.assign({ className: b.block({ disabled, style, layout }, className), id: id }, { children: _jsxs(\"label\", Object.assign({ className: b.element('label', { disabled }) }, { children: [_jsx(\"input\", { className: b.element('input'), type: \"checkbox\", name: name, onChange: handleChange, checked: checked, onFocus: handleFocus, onBlur: handleBlur, disabled: disabled }), _jsx(\"div\", { className: b.element('button', { focused: isFocused, checked }) }), _jsx(DisplayText, { className: b.element('label-text'), label: label }), loading && _jsx(\"span\", Object.assign({ className: b.element('loading-dots') }, { children: \".\" })), props.children] })) })));\r\n});\r\nToggleInput.displayName = 'ToggleInput';\r\n","/**\r\n * Layout options for the Toggle Input subcomponent.\r\n */\r\nexport var ToggleInputLayout;\r\n(function (ToggleInputLayout) {\r\n /**\r\n * Show the label before the input.\r\n */\r\n ToggleInputLayout[\"LabelFirst\"] = \"LabelFirst\";\r\n /**\r\n * Show the input before the label\r\n */\r\n ToggleInputLayout[\"InputFirst\"] = \"InputFirst\";\r\n})(ToggleInputLayout || (ToggleInputLayout = {}));\r\n","import { runInAction } from 'mobx';\r\nimport { ocapiClient } from '../../../../api-clients/ocapi/client';\r\nimport { createFetchedData } from '../../../../utils/fetched-data/create-fetched-data';\r\nimport { createFetchedDataRecord } from '../../../../utils/fetched-data/create-fetched-data-record';\r\nimport { generateQueryKey } from '../../../../utils/generate-query-key';\r\nimport { getCacheDuration } from '../../../../utils/get-cache-duration';\r\nimport { updateObject } from '../../../../utils/object-utils';\r\nimport { browsingDomainStore } from '../../store';\r\nimport { assignShowtimeListRelatedData } from '../../utils/showtimes/assign-related-data';\r\nexport const loadShowtimesForFirstBusinessDate = async (query) => {\r\n // The 'first business date' is calculated server-side, therefore there's no reliable way to check\r\n // whether the data has already been loaded and use the cache instead.\r\n // See US239585.\r\n const queryKey = generateQueryKey(query);\r\n const response = await ocapiClient.instance.v1.browsing.masterData.showtimes.getForFirstBusinessDate(query);\r\n if (!response)\r\n return;\r\n const { showtimes, relatedData, businessDate } = response;\r\n const cacheDuration = getCacheDuration('showtimes');\r\n runInAction(() => {\r\n browsingDomainStore.data.showtimeIdsForQueryByBusinessDate[queryKey] = {\r\n [businessDate]: createFetchedData(showtimes.map(showtime => showtime.id), cacheDuration)\r\n };\r\n updateObject(browsingDomainStore.data.showtimesById, createFetchedDataRecord(showtimes, 'id', cacheDuration));\r\n assignShowtimeListRelatedData(relatedData, cacheDuration);\r\n });\r\n};\r\n","import { loadScreeningDatesByQuery, loadShowtimesForBusinessDate, loadShowtimesForFirstBusinessDate } from '@vista/omnichannel-components-domain';\r\n/**\r\n * Asynchronously loads screening dates from the API\r\n */\r\nexport const loadScreeningDates = async (query) => {\r\n // Fetch Screening Dates\r\n return loadScreeningDatesByQuery(query);\r\n};\r\n/**\r\n * Asynchronously loads the showtimes for the current query.\r\n * If a businessDate is provided, showtimes are loaded for that date.\r\n * If no businessDate is provided, showtimes are loaded for the first date with showtimes.\r\n */\r\nexport const loadShowtimes = async (query, businessDate) => {\r\n if (businessDate)\r\n return loadShowtimesForBusinessDate(query, businessDate);\r\n else\r\n return loadShowtimesForFirstBusinessDate(query);\r\n};\r\nexport const isDateShowtimePickerPropsWithFilmIds = (props) => {\r\n return props.filmIds !== undefined;\r\n};\r\n","export var DateShowtimePickerActionType;\r\n(function (DateShowtimePickerActionType) {\r\n DateShowtimePickerActionType[\"Loading\"] = \"Loading\";\r\n DateShowtimePickerActionType[\"FailedToLoad\"] = \"FailedToLoad\";\r\n DateShowtimePickerActionType[\"Loaded\"] = \"Loaded\";\r\n DateShowtimePickerActionType[\"LoadingAllFilms\"] = \"LoadingAllFilms\";\r\n DateShowtimePickerActionType[\"LoadedAllFilms\"] = \"LoadedAllFilms\";\r\n DateShowtimePickerActionType[\"FailedToLoadAllFilms\"] = \"FailedToLoadAllFilms\";\r\n DateShowtimePickerActionType[\"SetOldShowtimeIdsForDate\"] = \"SetOldShowtimeIdsForDate\";\r\n DateShowtimePickerActionType[\"SelectDate\"] = \"SelectDate\";\r\n DateShowtimePickerActionType[\"SetIsExternalDateTransition\"] = \"SetIsExternalDateTransition\";\r\n DateShowtimePickerActionType[\"ToggleAllFilms\"] = \"ToggleAllFilms\";\r\n})(DateShowtimePickerActionType || (DateShowtimePickerActionType = {}));\r\n","import { LoadingState, logger } from '@vista/omnichannel-components-domain';\r\nimport { handleApiError } from '../../../subcomponents/showtime-picker/utils/showtime-picker-utils';\r\nimport { DateShowtimePickerActionType as ActionType } from './action-type';\r\nexport const dateShowtimePickerActionReducer = (state, action) => {\r\n switch (action.type) {\r\n case ActionType.Loading:\r\n return Object.assign(Object.assign({}, state), { filmsLoadingState: LoadingState.Loading, apiErrorMessageType: undefined });\r\n case ActionType.FailedToLoad:\r\n return Object.assign(Object.assign({}, state), { filmsLoadingState: LoadingState.Failure, apiErrorMessageType: handleApiError(action.error) });\r\n case ActionType.Loaded:\r\n return Object.assign(Object.assign({}, state), { filmsLoadingState: LoadingState.Success });\r\n case ActionType.LoadingAllFilms:\r\n return Object.assign(Object.assign({}, state), { isLoadingAllFilms: true });\r\n case ActionType.FailedToLoadAllFilms:\r\n return Object.assign(Object.assign({}, state), { isLoadingAllFilms: false, showAllFilms: false });\r\n case ActionType.LoadedAllFilms:\r\n return Object.assign(Object.assign({}, state), { isLoadingAllFilms: false });\r\n case ActionType.SetOldShowtimeIdsForDate:\r\n return Object.assign(Object.assign({}, state), { oldShowtimeIdsForDate: action.showtimeIds });\r\n case ActionType.SelectDate:\r\n return Object.assign(Object.assign({}, state), { selectedBusinessDate: action.date, apiErrorMessageType: undefined });\r\n case ActionType.SetIsExternalDateTransition:\r\n return Object.assign(Object.assign({}, state), { isExternalDateTransition: action.isExternalDateTransition });\r\n case ActionType.ToggleAllFilms:\r\n return Object.assign(Object.assign({}, state), { showAllFilms: action.showAllFilms });\r\n default: {\r\n logger.error(`Unknown DateShowtimePickerAction ${action.type}.`);\r\n return state;\r\n }\r\n }\r\n};\r\n","import { FilterType, getFilmById, getFilterByIdAndType, hasValidValuesForFilter } from '@vista/omnichannel-components-domain';\r\nexport const filterScreeningDates = (screeningDates, filterId) => {\r\n const filter = getFilterByIdAndType(filterId, FilterType.Showtime);\r\n if (!filter)\r\n return screeningDates;\r\n return screeningDates.reduce((acc, screeningDate) => {\r\n const validFilmScreenings = filterFilmScreenings(screeningDate.filmScreenings, filter);\r\n const updatedScreeningDate = Object.assign(Object.assign({}, screeningDate), { filmScreenings: validFilmScreenings });\r\n return validFilmScreenings.length ? [...acc, updatedScreeningDate] : acc;\r\n }, []);\r\n};\r\nconst filterFilmScreenings = (filmScreenings, filter) => {\r\n return filmScreenings.reduce((acc, filmScreening) => {\r\n const film = getFilmById(filmScreening.filmId);\r\n const validFilm = !!film && hasValidValuesForFilter(filter.sections.genre, film.genreIds);\r\n const validSites = filmScreening.sites.filter(site => hasValidValuesForFilter(filter.sections.attribute, site.showtimeAttributeIds));\r\n const validFilmScreening = validFilm && validSites.length > 0;\r\n const updatedFilmScreening = Object.assign(Object.assign({}, filmScreening), { sites: validSites });\r\n return validFilmScreening ? [...acc, updatedFilmScreening] : acc;\r\n }, []);\r\n};\r\n","import { compactMap, filterFilms, FilterType, getDistinctItems, getFilmById, getFilms, getFilterByIdAndType } from '@vista/omnichannel-components-domain';\r\nexport const getFilmIdsToDisplay = (props) => {\r\n const { filmIds, showAllFilms, filterId, showtimes, isLoading } = props;\r\n if (!isLoading) {\r\n if (showAllFilms)\r\n return getAllFilmIds(filterId);\r\n if (filmIds)\r\n return filterFilmIds(filmIds, filterId);\r\n }\r\n // Note: showtimes are already filtered\r\n return getFilmIdsForShowtimes(showtimes);\r\n};\r\nconst getAllFilmIds = (filterId) => {\r\n var _a, _b;\r\n const filmFilter = getFilmFilterFromShowtimeFilterId(filterId);\r\n return (_b = (_a = getFilms(undefined, filmFilter)) === null || _a === void 0 ? void 0 : _a.map(film => film.id)) !== null && _b !== void 0 ? _b : [];\r\n};\r\nconst filterFilmIds = (filmIds, filterId) => {\r\n const filmFilter = getFilmFilterFromShowtimeFilterId(filterId);\r\n if (!filmFilter)\r\n return getDistinctItems(filmIds);\r\n const films = compactMap(filmIds, getFilmById);\r\n const filteredFilmIds = filterFilms(filmFilter, films).map(film => film.id);\r\n return getDistinctItems(filteredFilmIds);\r\n};\r\n/**\r\n * Returns the unique list of film IDs for a given list of showtimes.\r\n */\r\nconst getFilmIdsForShowtimes = (showtimes) => {\r\n return getDistinctItems(showtimes.map(s => s.filmId));\r\n};\r\nconst getFilmFilterFromShowtimeFilterId = (filterId) => {\r\n const filter = filterId ? getFilterByIdAndType(filterId, FilterType.Showtime) : undefined;\r\n if (!filter)\r\n return;\r\n const filmFilter = Object.assign(Object.assign({}, filter), { type: FilterType.Film, baseData: [], sections: Object.assign(Object.assign({}, filter.sections), { category: {\r\n fixed: [],\r\n options: []\r\n } }) });\r\n return filmFilter;\r\n};\r\n","import { getBusinessDateString, parseBusinessDate } from '@vista/omnichannel-components-domain';\r\nimport { max, min } from 'date-fns';\r\nexport var ScreeningDateType;\r\n(function (ScreeningDateType) {\r\n ScreeningDateType[\"Next\"] = \"Next\";\r\n ScreeningDateType[\"Previous\"] = \"Previous\";\r\n})(ScreeningDateType || (ScreeningDateType = {}));\r\nexport const getNextOrPreviousScreeningDate = (selectedBusinessDate, screeningDates, filmId, siteId) => {\r\n if (!selectedBusinessDate || !screeningDates)\r\n return undefined;\r\n const futureScreeningDates = [];\r\n const pastScreeningDates = [];\r\n screeningDates.forEach(screeningDate => {\r\n const businessDate = parseBusinessDate(screeningDate.businessDate);\r\n if (!screeningDateContainsFilmAndSite(screeningDate, filmId, siteId)) {\r\n return;\r\n }\r\n if (screeningDate.businessDate > selectedBusinessDate) {\r\n futureScreeningDates.push(businessDate);\r\n }\r\n else if (screeningDate.businessDate < selectedBusinessDate) {\r\n pastScreeningDates.push(businessDate);\r\n }\r\n });\r\n if (futureScreeningDates.length) {\r\n const nextBusinessDate = min(futureScreeningDates);\r\n return {\r\n type: ScreeningDateType.Next,\r\n screeningDate: getBusinessDateString(nextBusinessDate)\r\n };\r\n }\r\n if (pastScreeningDates.length) {\r\n const prevBusinessDate = max(pastScreeningDates);\r\n return {\r\n type: ScreeningDateType.Previous,\r\n screeningDate: getBusinessDateString(prevBusinessDate)\r\n };\r\n }\r\n};\r\nconst screeningDateContainsFilmAndSite = (screeningDate, filmId, siteId) => {\r\n return (screeningDate.filmScreenings.find(screening => screening.filmId === filmId && screening.sites.find(site => site.siteId === siteId)) !== undefined);\r\n};\r\n","import { DateShowtimePickerInternalAction } from '../types/internal-action';\r\nimport { getNextOrPreviousScreeningDate, ScreeningDateType } from './get-next-or-previous-screening-date';\r\nexport const getNoShowtimesForSiteDisplayTextProps = (displayText, siteId, filmId, screeningDates, selectedBusinessDate, handleDateClicked, i18n) => {\r\n const alternateScreeningDate = getNextOrPreviousScreeningDate(selectedBusinessDate, screeningDates, filmId, siteId);\r\n if (!alternateScreeningDate) {\r\n return { label: displayText.noShowtimesForSiteAndFilmMessage };\r\n }\r\n let label;\r\n if (alternateScreeningDate.type === ScreeningDateType.Next) {\r\n label = i18n.displayTextLabel(displayText.nextShowtimeForSiteOnDateMessage, {\r\n nextScreeningDate: alternateScreeningDate.screeningDate\r\n });\r\n }\r\n else {\r\n label = i18n.displayTextLabel(displayText.lastShowtimeForSiteOnDateMessage, {\r\n lastScreeningDate: alternateScreeningDate.screeningDate\r\n });\r\n }\r\n return {\r\n label,\r\n internalActions: [\r\n {\r\n name: DateShowtimePickerInternalAction.NavigateToDate,\r\n action: () => handleDateClicked(alternateScreeningDate.screeningDate, filmId)\r\n }\r\n ]\r\n };\r\n};\r\n","import { getBusinessDateString, isEmptyArray } from '@vista/omnichannel-components-domain';\r\nimport { DateShowtimePickerSelectedBusinessDate } from '../types/selected-business-date';\r\nexport const getSelectedBusinessDate = (selectedBusinessDate, screeningDates) => {\r\n switch (selectedBusinessDate) {\r\n case DateShowtimePickerSelectedBusinessDate.Today: {\r\n return getCurrentBusinessDate();\r\n }\r\n case DateShowtimePickerSelectedBusinessDate.NextAvailable: {\r\n return getNextAvailableBusinessDate(screeningDates);\r\n }\r\n default: {\r\n return selectedBusinessDate;\r\n }\r\n }\r\n};\r\nconst getCurrentBusinessDate = () => getBusinessDateString(new Date());\r\nconst getNextAvailableBusinessDate = (screeningDates) => {\r\n if (!screeningDates || isEmptyArray(screeningDates))\r\n return getCurrentBusinessDate();\r\n return screeningDates.sort(compareScreeningDates)[0].businessDate;\r\n};\r\nconst compareScreeningDates = (a, b) => {\r\n return a.businessDate < b.businessDate ? -1 : a.businessDate > b.businessDate ? 1 : 0;\r\n};\r\n","import { runInAction } from 'mobx';\r\nimport { generateQueryKey } from '../../../../utils/generate-query-key';\r\nimport { browsingDomainStore } from '../../store';\r\nexport const addShowtimeIdsForQueryOnBusinessDate = (showtimeIdsForQuery, query, businessDate) => {\r\n const queryKey = generateQueryKey(query);\r\n runInAction(() => {\r\n browsingDomainStore.data.showtimeIdsForQueryByBusinessDate[queryKey] = {\r\n [businessDate]: showtimeIdsForQuery\r\n };\r\n });\r\n};\r\n","import { addShowtimeIdsForQueryOnBusinessDate, configurationSettings, createFetchedData, getScreeningDatesForQuery, loadShowtimesForBusinessDate, logger } from '@vista/omnichannel-components-domain';\r\nimport { DateShowtimePickerActionType as ActionType } from './action-type';\r\n/**\r\n * Action performed when a date is selected in the date picker\r\n */\r\nexport const handleDateSelected = async (query, businessDate, dispatch) => {\r\n // Check if selected date is a Screening Date to void calling API when we know there will be no showtimes.\r\n const screeningDates = getScreeningDatesForQuery(query);\r\n if (screeningDates) {\r\n const dates = screeningDates.map(date => date.businessDate);\r\n if (dates.length && !dates.includes(businessDate)) {\r\n const emptyShowtimesData = createFetchedData([], configurationSettings.data.cache.durations.showtimes);\r\n addShowtimeIdsForQueryOnBusinessDate(emptyShowtimesData, query, businessDate);\r\n return;\r\n }\r\n }\r\n dispatch({ type: ActionType.Loading });\r\n // Date exists in screening dates, call API\r\n try {\r\n await loadShowtimesForBusinessDate(query, businessDate);\r\n dispatch({ type: ActionType.Loaded });\r\n }\r\n catch (error) {\r\n logger.error('Get Showtimes Error:', error);\r\n dispatch({ type: ActionType.FailedToLoad, error: error });\r\n }\r\n};\r\n","import { getFilmById, isEmptyArray, LoadingState } from '@vista/omnichannel-components-domain';\r\nimport { ShowtimePickerMessageType as MessageType } from '../../../subcomponents/showtime-picker/subcomponents/message';\r\nimport { nonFixedFiltersApplied } from '../../../subcomponents/showtime-picker/utils/showtime-picker-utils';\r\nexport const validateShowtimePickerData = (screeningDates, query, filmIdsToDisplay, filmsLoadingState, config) => {\r\n var _a, _b;\r\n let invalidStateMessage = undefined;\r\n const invalidStateMessageFilm = ((_a = query.filmIds) === null || _a === void 0 ? void 0 : _a.length) === 1 ? getFilmById(query.filmIds[0]) : undefined;\r\n if (!((_b = query.siteIds) === null || _b === void 0 ? void 0 : _b.length)) {\r\n invalidStateMessage = MessageType.NoCinemasSelected;\r\n }\r\n else if (screeningDates) {\r\n if (isEmptyArray(screeningDates)) {\r\n invalidStateMessage = MessageType.NoShowtimesAllDates;\r\n }\r\n else if (filmsLoadingState === LoadingState.Success && filmIdsToDisplay.length === 0) {\r\n if (nonFixedFiltersApplied(config.filter)) {\r\n invalidStateMessage = MessageType.NoShowtimesForFilter;\r\n }\r\n else {\r\n invalidStateMessage = config.filmDetails.show\r\n ? MessageType.NoShowtimesForSitesOnDate\r\n : MessageType.NoShowtimesForFilmOnDate;\r\n }\r\n }\r\n }\r\n return invalidStateMessage\r\n ? { messageType: invalidStateMessage, messageFilmTitle: invalidStateMessageFilm === null || invalidStateMessageFilm === void 0 ? void 0 : invalidStateMessageFilm.title }\r\n : undefined;\r\n};\r\n","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\r\nimport { addErrorNotification, createFetchedData, CxmEntityType, getAllShowtimes, getFetchedDataPayload, getScreeningDatesForQuery, getSelectedSiteIds, getShowtimeIdsForQueryOnBusinessDate, getShowtimesQuery, isEmptyArray, loadAllFilmAvailabilities, loadAllFilms, loadCxmFilmsForComponent, LoadingState, NotificationType } from '@vista/omnichannel-components-domain';\r\nimport { bemClassBuilder } from '@vista-digital/bem-class-builder';\r\nimport { observer } from 'mobx-react';\r\nimport { useCallback, useEffect, useMemo, useReducer } from 'react';\r\nimport { useI18n } from '../../context/occ/hooks/use-i18n';\r\nimport { DatePicker } from '../../subcomponents/date-picker';\r\nimport { ToggleInput } from '../../subcomponents/form/input/toggle/toggle-input';\r\nimport { ToggleInputLayout } from '../../subcomponents/form/input/toggle/types/layout';\r\nimport { ShowtimePicker } from '../../subcomponents/showtime-picker/showtime-picker';\r\nimport { ShowtimePickerMessageType as MessageType } from '../../subcomponents/showtime-picker/subcomponents/message';\r\nimport { getFilmListItemElementId } from '../../subcomponents/showtime-picker/utils/get-film-list-item-element-id';\r\nimport { getIdForComponentNotification } from '../../utils/get-id-for-component-notification';\r\nimport { scrollToElementById } from '../../utils/imperative-utils/scroll';\r\nimport { withComponentWrapper } from '../../utils/with-component-wrapper';\r\nimport { dateShowtimePickerPropsValidator, defaultDateShowtimePickerPropsProvider } from './types/props';\r\nimport { getDefaultDateShowtimePickerState } from './types/state';\r\nimport { dateShowtimePickerActionReducer } from './utils/action-reducer';\r\nimport { DateShowtimePickerActionType as ActionType } from './utils/action-type';\r\nimport { isDateShowtimePickerPropsWithFilmIds, loadScreeningDates, loadShowtimes } from './utils/date-showtime-picker-utils';\r\nimport { filterScreeningDates } from './utils/filter-screening-dates';\r\nimport { getFilmIdsToDisplay } from './utils/get-film-ids-to-display';\r\nimport { getNoShowtimesForSiteDisplayTextProps } from './utils/get-no-showtimes-for-site-display-text-props';\r\nimport { getSelectedBusinessDate } from './utils/get-selected-business-date';\r\nimport { handleDateSelected } from './utils/handle-date-selected';\r\n//import { setupFilter } from './utils/setup-filter';\r\nimport { browsingDomainStore } from \"@vista/omnichannel-components-domain\";\r\nimport { getShowtimeById } from \"@vista/omnichannel-components-domain\";\r\nimport { createShowtimeFilter } from '@vista/omnichannel-components-domain';\r\nimport { validateShowtimePickerData } from './utils/validate';\r\nconst b = bemClassBuilder('v-date-showtime-picker');\r\nexport const DateShowtimePicker = observer(props => {\r\n\tconsole.log(\"render\")\r\n var _a;\r\n const i18n = useI18n();\r\n const { filmIds, config, displayText } = props;\r\n const { filter, componentId, datePicker } = config;\r\n const siteIds = (_a = props.siteIds) !== null && _a !== void 0 ? _a : getSelectedSiteIds();\r\n const filterId = filter === null || filter === void 0 ? void 0 : filter.filterId;\r\n const defaultDateShowtimePickerState = getDefaultDateShowtimePickerState(props);\r\n const [state, dispatch] = useReducer(dateShowtimePickerActionReducer, defaultDateShowtimePickerState);\r\n const { oldShowtimeIdsForDate, selectedBusinessDate, apiErrorMessageType, filmsLoadingState, isLoadingAllFilms, isExternalDateTransition, showAllFilms } = state;\r\n const showtimesQuery = getShowtimesQuery(filmIds, siteIds);\r\n const screeningDates = getScreeningDatesForQuery(showtimesQuery);\r\n const filteredScreeningDates = screeningDates && filterId ? filterScreeningDates(screeningDates, filterId) : screeningDates;\r\n const datePickerActiveDates = filteredScreeningDates === null || filteredScreeningDates === void 0 ? void 0 : filteredScreeningDates.map(screeningDate => screeningDate.businessDate);\r\n const showtimeIdsForDate = useMemo(() => {\r\n return selectedBusinessDate\r\n ? getShowtimeIdsForQueryOnBusinessDate(getShowtimesQuery(filmIds, siteIds), selectedBusinessDate)\r\n : createFetchedData(LoadingState.NotLoaded);\r\n }, [filmIds, selectedBusinessDate, siteIds]);\r\n const handleDateClicked = useCallback(async (businessDate) => {\r\n const query = getShowtimesQuery(filmIds, siteIds);\r\n dispatch({ type: ActionType.SelectDate, date: businessDate });\r\n await handleDateSelected(query, businessDate, dispatch);\r\n }, [filmIds, siteIds]);\r\n const handleAllFilmsToggleClicked = useCallback(async (show) => {\r\n dispatch({ type: ActionType.ToggleAllFilms, showAllFilms: show });\r\n if (!show)\r\n return;\r\n dispatch({ type: ActionType.LoadingAllFilms });\r\n try {\r\n await loadAllFilms();\r\n dispatch({ type: ActionType.LoadedAllFilms });\r\n }\r\n catch (error) {\r\n addErrorNotification({\r\n id: getIdForComponentNotification('date-showtime-picker', NotificationType.Error, 'show-all-films'),\r\n messages: ['Failed to load films, please try again later']\r\n }, error);\r\n dispatch({ type: ActionType.FailedToLoadAllFilms });\r\n }\r\n }, []);\r\n useEffect(() => {\r\n (async () => {\r\n const query = getShowtimesQuery(filmIds, siteIds);\r\n dispatch({ type: ActionType.Loading });\r\n if (!query.siteIds || isEmptyArray(query.siteIds))\r\n return;\r\n try {\r\n await Promise.all([\r\n loadScreeningDates(query),\r\n //loadShowtimes(query, selectedBusinessDate), // HACK - need all showtimes to be loaded\r\n loadCxmFilmsForComponent(CxmEntityType.FilmShowtimePicker, componentId),\r\n handleAllFilmsToggleClicked(showAllFilms),\r\n loadAllFilmAvailabilities()\r\n ]);\r\n // We don't want to execute this effect each time the selected business date changes, but we do want to use the initial value prior to a re-render,\r\n // hence using the return value here instead of including selectedBusinessDate as a dependency of this useEffect.\r\n const dates = getScreeningDatesForQuery(query);\r\n const filteredDates = dates && filterId ? filterScreeningDates(dates, filterId) : dates;\r\n\t\t\t\t// HACK - loading showtimes from ALL the filtered dates so we can get all the attributes loaded\r\n\t\t\t\tawait Promise.all(filteredDates.map(async date => await loadShowtimes(query, date.businessDate)));\r\n const selectedDate = await attemptSetSelectedDate(filteredDates);\r\n setupFilter(query, filter, selectedDate);\r\n dispatch({ type: ActionType.SetIsExternalDateTransition, isExternalDateTransition: true });\r\n dispatch({ type: ActionType.Loaded });\r\n }\r\n catch (error) {\r\n dispatch({ type: ActionType.FailedToLoad, error: error });\r\n }\r\n })();\r\n // Stringifying the siteIds, because when an array is passed in, useEffect does not re-run.\r\n // This is because React is not able to identify the difference between the mutated SiteIds arrays by comparing only their references.\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [JSON.stringify(siteIds), filter]);\r\n useEffect(() => {\r\n const currentShowtimeIds = getFetchedDataPayload(showtimeIdsForDate);\r\n if (!filterId || !currentShowtimeIds)\r\n return;\r\n // If the current showtimes have changed, update filter so that it has the most recent data.\r\n if (currentShowtimeIds.length !== oldShowtimeIdsForDate.length ||\r\n !currentShowtimeIds.every((id, index) => id === oldShowtimeIdsForDate[index])) {\r\n const query = getShowtimesQuery(filmIds, siteIds);\r\n setupFilter(query, filter, selectedBusinessDate);\r\n dispatch({ type: ActionType.SetOldShowtimeIdsForDate, showtimeIds: currentShowtimeIds });\r\n }\r\n }, [oldShowtimeIdsForDate, filterId, showtimeIdsForDate, filter, filmIds, siteIds, selectedBusinessDate]);\r\n const handleDateChangedExternally = useCallback(async (date, filmId) => {\r\n await handleDateClicked(date);\r\n dispatch({ type: ActionType.SetIsExternalDateTransition, isExternalDateTransition: true });\r\n if (filmId)\r\n scrollToElementById(getFilmListItemElementId(filmId));\r\n }, [handleDateClicked]);\r\n /**\r\n * Once isExternalDateTransition becomes true, a date has externally been changed and the DatePicker component\r\n * will scroll the slide into view. This effect will reset the transition afterwards.\r\n */\r\n useEffect(() => {\r\n dispatch({ type: ActionType.SetIsExternalDateTransition, isExternalDateTransition: false });\r\n }, [isExternalDateTransition]);\r\n /**\r\n * If selectedBusinessDate is already set, or the data in the browsing store is not available, this method does nothing.\r\n * Returns the updated selected business date immediately.\r\n */\r\n const attemptSetSelectedDate = useCallback(async (dates) => {\r\n const selectedDate = getSelectedBusinessDate(datePicker.selectedBusinessDate, dates);\r\n dispatch({ type: ActionType.SelectDate, date: selectedDate });\r\n await handleDateChangedExternally(selectedDate);\r\n return selectedDate;\r\n }, [datePicker.selectedBusinessDate, handleDateChangedExternally]);\r\n const showtimes = getAllShowtimes(selectedBusinessDate, filmIds, siteIds, filterId);\r\n const filmIdsToDisplay = getFilmIdsToDisplay({\r\n showtimes,\r\n showAllFilms,\r\n isLoading: filmsLoadingState !== LoadingState.Success,\r\n filmIds,\r\n filterId\r\n });\r\n\t\r\n\t\r\n\r\n // Check for invalid states - e.g. empty data, or no sites selected.\r\n const invalidStateMessage = apiErrorMessageType\r\n ? { messageType: apiErrorMessageType }\r\n : validateShowtimePickerData(screeningDates, showtimesQuery, filmIdsToDisplay, filmsLoadingState, config);\r\n const hideAccessories = invalidStateMessage &&\r\n (invalidStateMessage.messageType === MessageType.FailedToLoadData ||\r\n invalidStateMessage.messageType === MessageType.NoCinemasSelected ||\r\n invalidStateMessage.messageType === MessageType.NoShowtimesAllDates);\r\n const hideDatePicker = !datePicker.show || hideAccessories;\r\n const isAllFilmsToggleVisible = () => {\r\n if (isDateShowtimePickerPropsWithFilmIds(props))\r\n return true;\r\n return !props.config.allFilmsToggle.show || hideAccessories;\r\n };\r\n const handleGetNoShowtimesForSiteDisplayTextProps = (siteId, filmId) => getNoShowtimesForSiteDisplayTextProps(displayText, siteId, filmId, filteredScreeningDates, selectedBusinessDate, handleDateChangedExternally, i18n);\r\n return (_jsxs(\"div\", Object.assign({ className: b.block() }, { children: [!hideDatePicker && (_jsx(DatePicker, { isLoading: !screeningDates, businessDates: datePickerActiveDates !== null && datePickerActiveDates !== void 0 ? datePickerActiveDates : [], selectedBusinessDate: selectedBusinessDate, dateExternallyClicked: isExternalDateTransition, onDateClicked: handleDateClicked, dateFormat: displayText.datePickerDateFormat, todayDateFormat: displayText.datePickerTodayDateFormat, carouselConfig: datePicker.carousel })), !isAllFilmsToggleVisible() && (_jsx(ToggleInput, { label: displayText.allFilmsToggleLabel, value: showAllFilms, className: b.element('all-films-toggle'), layout: ToggleInputLayout.InputFirst, disabled: filmsLoadingState !== LoadingState.Success || isLoadingAllFilms, loading: isLoadingAllFilms, onChangeValue: handleAllFilmsToggleClicked })), _jsx(ShowtimePicker, Object.assign({}, props, { config: config, showtimes: showtimes, filmsLoadingState: filmsLoadingState, filmIds: filmIdsToDisplay, siteIds: siteIds, getNoShowtimesForSiteDisplayTextProps: handleGetNoShowtimesForSiteDisplayTextProps, groupShowtimesByDate: false, invalidStateMessage: invalidStateMessage }))] })));\r\n});\r\nDateShowtimePicker.displayName = 'DateShowtimePicker';\r\n/**\r\n * The **Date Showtime Picker** component renders a list of showtimes for a given set of films and sites for specified dates.\r\n */\r\nexport const DateShowtimePickerComponent = withComponentWrapper(DateShowtimePicker, defaultDateShowtimePickerPropsProvider, dateShowtimePickerPropsValidator);\r\n\r\n// Hack - https://vistadigital.atlassian.net/browse/CRZN-1363 - Alternative setupFilter function gets showtimes from ALL dates\r\n\t// This prevents some instances where not all the filters appear on some dates. Should be fixed by OCC upgrade at some point\r\nexport const setupFilter = (query, filterConfig, businessDate) => {\r\n if (!filterConfig || !businessDate)\r\n return;\r\n const { filterId, options } = filterConfig;\r\n\tconsole.log(\"browsingDomainStore\", browsingDomainStore)\r\n\r\n const showtimesObject = browsingDomainStore.data.showtimesById\r\n let showtimes = []\r\n\r\n for (const showtimeId in showtimesObject) {\r\n\t\t\r\n if (!query?.filmIds || query?.filmIds?.includes(showtimesObject[showtimeId]?.payload?.filmId) && query?.siteIds?.includes(showtimesObject[showtimeId]?.payload?.siteId)) {\r\n showtimes.push(getShowtimeById(showtimeId))\r\n console.log(\"pushing this showtime: \", getShowtimeById(showtimeId))\r\n }\r\n }\r\n \r\n createShowtimeFilter(filterId, showtimes, options);\r\n};","import { LoadingState } from '@vista/omnichannel-components-domain';\r\nimport { isDateShowtimePickerPropsWithFilmIds } from '../utils/date-showtime-picker-utils';\r\nexport const getDefaultDateShowtimePickerState = (props) => {\r\n const showAllFilms = isDateShowtimePickerPropsWithFilmIds(props) ? false : props.config.allFilmsToggle.initialValue;\r\n return {\r\n oldShowtimeIdsForDate: [],\r\n selectedBusinessDate: undefined,\r\n isExternalDateTransition: false,\r\n filmsLoadingState: LoadingState.Loading,\r\n isLoadingAllFilms: false,\r\n showAllFilms\r\n };\r\n};\r\n","import { LoadingState } from '../../../../types/loading-state';\r\nimport { compactMap } from '../../../../utils/array-utils';\r\nimport { createFetchedData } from '../../../../utils/fetched-data/create-fetched-data';\r\nimport { getFetchedDataPayload } from '../../../../utils/fetched-data/get-fetched-data-payload';\r\nimport { getFilterByIdAndType } from '../../../filter/selectors/get-filter-by-id-and-type';\r\nimport { FilterType } from '../../../filter/types/filter-type';\r\nimport { filterShowtimes } from '../../../filter/utils/filter-showtimes';\r\nimport { getShowtimesQuery } from '../../utils/showtimes/get-showtimes-query';\r\nimport { getShowtimeById } from './get-showtime-by-id';\r\nimport { getShowtimeIdsForQueryOnBusinessDate } from './get-showtime-ids-for-query-on-business-date';\r\nexport const getAllShowtimes = (businessDate, filmIds, siteIds, filterId) => {\r\n const showtimesQuery = getShowtimesQuery(filmIds, siteIds);\r\n const showtimeIdsForDate = businessDate\r\n ? getShowtimeIdsForQueryOnBusinessDate(showtimesQuery, businessDate)\r\n : createFetchedData(LoadingState.NotLoaded);\r\n const showtimeIds = getFetchedDataPayload(showtimeIdsForDate);\r\n const showtimes = showtimeIds ? compactMap(showtimeIds, showtimeId => getShowtimeById(showtimeId)) : [];\r\n const filter = filterId && getFilterByIdAndType(filterId, FilterType.Showtime);\r\n return filter ? filterShowtimes(filter, showtimes) : showtimes;\r\n};\r\n","export var DateShowtimePickerInternalAction;\r\n(function (DateShowtimePickerInternalAction) {\r\n DateShowtimePickerInternalAction[\"NavigateToDate\"] = \"NavigateToDate\";\r\n})(DateShowtimePickerInternalAction || (DateShowtimePickerInternalAction = {}));\r\n","import { Validator } from '@vista-digital/validator';\r\nconst businessDateValidationFormat = new RegExp('^[0-9]{4}-[0-9]{2}-[0-9]{2}$');\r\nexport const businessDateValidator = Validator.string({ format: businessDateValidationFormat });\r\n","import { businessDateValidator } from '@vista/omnichannel-components-domain';\r\nimport { Validator } from '@vista-digital/validator';\r\nimport { carouselConfigValidator } from '../../../subcomponents/carousel/types/config';\r\nimport { defaultDatePickerCarouselConfig } from '../../../subcomponents/date-picker/types/props';\r\nimport { defaultShowtimePickerConfig, defaultShowtimePickerConfigValidatorSchema } from '../../../subcomponents/showtime-picker/types/config';\r\nimport { DateShowtimePickerSelectedBusinessDate } from './selected-business-date';\r\nconst defaultDateShowtimePickerConfigBase = Object.assign(Object.assign({}, defaultShowtimePickerConfig), { actionButton: {\r\n show: true,\r\n showOnMessage: true\r\n }, datePicker: {\r\n show: true,\r\n selectedBusinessDate: DateShowtimePickerSelectedBusinessDate.Today,\r\n carousel: defaultDatePickerCarouselConfig\r\n } });\r\nexport const defaultDateShowtimePickerConfigWithFilmIds = defaultDateShowtimePickerConfigBase;\r\nexport const defaultDateShowtimePickerConfigWithoutFilmIds = Object.assign(Object.assign({}, defaultDateShowtimePickerConfigBase), { allFilmsToggle: {\r\n show: true,\r\n initialValue: false\r\n } });\r\nexport const showtimePickerDatePickerConfigValidator = Validator.object({\r\n show: Validator.boolean(),\r\n selectedBusinessDate: Validator.any([\r\n Validator.oneOf(Object.keys(DateShowtimePickerSelectedBusinessDate)),\r\n businessDateValidator\r\n ]),\r\n carousel: carouselConfigValidator\r\n});\r\nexport const showtimePickerAllFilmsToggleValidator = Validator.object({\r\n show: Validator.boolean(),\r\n initialValue: Validator.boolean()\r\n});\r\nconst defaultDateShowtimePickerConfigBaseValidatorSchema = Object.assign(Object.assign({}, defaultShowtimePickerConfigValidatorSchema), { datePicker: showtimePickerDatePickerConfigValidator });\r\nexport const dateShowtimePickerConfigWithFilmIdsValidator = Validator.object(defaultDateShowtimePickerConfigBaseValidatorSchema);\r\nexport const dateShowtimePickerConfigWithoutFilmIdsValidator = Validator.object(Object.assign(Object.assign({}, defaultDateShowtimePickerConfigBaseValidatorSchema), { allFilmsToggle: showtimePickerAllFilmsToggleValidator }));\r\n","export const defaultDatePickerDateFormat = [\r\n { text: '${date|d|ddd}', className: 'v-date-picker-date__day-of-week' },\r\n { text: '${date|d|D}', className: 'v-date-picker-date__day-of-month' },\r\n { text: '${date|d|MMM}', className: 'v-date-picker-date__month' }\r\n];\r\nexport const defaultDatePickerTodayDateFormat = 'Today';\r\nexport const defaultDatePickerCarouselConfig = {\r\n showDots: false,\r\n refreshOnUpdate: true,\r\n settings: {\r\n slidesToScroll: 'auto',\r\n slidesToShow: 3,\r\n responsive: [\r\n {\r\n breakpoint: 420,\r\n settings: {\r\n slidesToShow: 4\r\n }\r\n },\r\n {\r\n breakpoint: 500,\r\n settings: {\r\n slidesToShow: 5\r\n }\r\n },\r\n {\r\n breakpoint: 900,\r\n settings: {\r\n slidesToShow: 7\r\n }\r\n }\r\n ]\r\n },\r\n touchSettings: {\r\n slidesToScroll: 'auto',\r\n slidesToShow: 2.5,\r\n responsive: [\r\n {\r\n breakpoint: 420,\r\n settings: {\r\n slidesToShow: 3.5\r\n }\r\n },\r\n {\r\n breakpoint: 500,\r\n settings: {\r\n slidesToShow: 5.5\r\n }\r\n },\r\n {\r\n breakpoint: 900,\r\n settings: {\r\n slidesToShow: 7.5\r\n }\r\n }\r\n ]\r\n }\r\n};\r\n","import { displayTextLabelValidator, getDisplayTextLabelValidator, nonEmptyStringValidator } from '@vista/omnichannel-components-domain';\r\nimport { Validator } from '@vista-digital/validator';\r\nimport { defaultDatePickerDateFormat, defaultDatePickerTodayDateFormat } from '../../../subcomponents/date-picker/types/props';\r\nimport { defaultShowtimePickerDisplayText, defaultShowtimePickerDisplayTextValidatorSchema } from '../../../subcomponents/showtime-picker/types/display-text';\r\nimport { DateShowtimePickerInternalAction } from './internal-action';\r\n/**\r\n * Default display text for the Showtime Picker component.\r\n */\r\nexport const defaultDateShowtimePickerDisplayText = Object.assign(Object.assign({}, defaultShowtimePickerDisplayText), { actionButtonLabel: 'Add cinemas', nextShowtimeForSiteOnDateMessage: [\r\n 'This movie is not available on this date. Next screening is on the ',\r\n {\r\n text: '${nextScreeningDate|d|Do of MMMM}',\r\n internalAction: DateShowtimePickerInternalAction.NavigateToDate\r\n },\r\n '.'\r\n ], lastShowtimeForSiteOnDateMessage: [\r\n 'This movie is not available on this date. Last screening is on the ',\r\n {\r\n text: '${lastScreeningDate|d|Do of MMMM}',\r\n internalAction: DateShowtimePickerInternalAction.NavigateToDate\r\n },\r\n '.'\r\n ], allFilmsToggleLabel: 'Show all films', datePickerDateFormat: defaultDatePickerDateFormat, datePickerTodayDateFormat: defaultDatePickerTodayDateFormat });\r\nexport const dateShowtimePickerDisplayTextValidator = Validator.object(Object.assign(Object.assign({}, defaultShowtimePickerDisplayTextValidatorSchema), { nextShowtimeForSiteOnDateMessage: getDisplayTextLabelValidator(Object.values(DateShowtimePickerInternalAction)), lastShowtimeForSiteOnDateMessage: getDisplayTextLabelValidator(Object.values(DateShowtimePickerInternalAction)), allFilmsToggleLabel: nonEmptyStringValidator, datePickerDateFormat: displayTextLabelValidator, datePickerTodayDateFormat: displayTextLabelValidator }));\r\n","import { nonEmptyStringValidator } from '@vista/omnichannel-components-domain';\r\nimport { Validator } from '@vista-digital/validator';\r\nimport { defaultShowtimePickerAssets, showtimePickerAssetsValidator } from '../../../subcomponents/showtime-picker/types/assets';\r\nimport { defaultShowtimePickerCdnOptions, showtimePickerCdnOptionsValidator } from '../../../subcomponents/showtime-picker/types/cdn-options';\r\nimport { showtimePickerEventsValidator } from '../../../subcomponents/showtime-picker/types/events';\r\nimport { dateShowtimePickerConfigWithFilmIdsValidator, dateShowtimePickerConfigWithoutFilmIdsValidator, defaultDateShowtimePickerConfigWithFilmIds, defaultDateShowtimePickerConfigWithoutFilmIds } from './config';\r\nimport { dateShowtimePickerDisplayTextValidator, defaultDateShowtimePickerDisplayText } from './display-text';\r\nconst dateShowtimePickerPropsBaseValidatorSchema = {\r\n siteIds: Validator.optional(Validator.array({ items: nonEmptyStringValidator })),\r\n displayText: dateShowtimePickerDisplayTextValidator,\r\n events: showtimePickerEventsValidator,\r\n assets: showtimePickerAssetsValidator,\r\n cdnOptions: showtimePickerCdnOptionsValidator\r\n};\r\nexport const dateShowtimePickerPropsValidator = Validator.any([\r\n Validator.object(Object.assign(Object.assign({}, dateShowtimePickerPropsBaseValidatorSchema), { filmIds: Validator.array({ items: nonEmptyStringValidator }), config: dateShowtimePickerConfigWithFilmIdsValidator })),\r\n Validator.object(Object.assign(Object.assign({}, dateShowtimePickerPropsBaseValidatorSchema), { filmIds: Validator.isEqualTo(undefined), config: dateShowtimePickerConfigWithoutFilmIdsValidator }))\r\n]);\r\nexport const defaultDateShowtimePickerPropsBase = {\r\n filmIds: undefined,\r\n siteIds: undefined,\r\n config: defaultDateShowtimePickerConfigWithoutFilmIds,\r\n displayText: defaultDateShowtimePickerDisplayText,\r\n assets: defaultShowtimePickerAssets,\r\n cdnOptions: defaultShowtimePickerCdnOptions,\r\n events: {}\r\n};\r\nexport const defaultDateShowtimePickerPropsWithFilmIds = Object.assign(Object.assign({}, defaultDateShowtimePickerPropsBase), { filmIds: undefined, config: defaultDateShowtimePickerConfigWithFilmIds });\r\nexport const defaultDateShowtimePickerPropsWithoutFilmIds = defaultDateShowtimePickerPropsBase;\r\nexport const defaultDateShowtimePickerPropsProvider = props => {\r\n if ('filmIds' in props)\r\n return defaultDateShowtimePickerPropsWithFilmIds;\r\n return defaultDateShowtimePickerPropsWithoutFilmIds;\r\n};\r\n","/**\r\n * Selected business date options for Date Showtime Picker component.\r\n */\r\nexport var DateShowtimePickerSelectedBusinessDate;\r\n(function (DateShowtimePickerSelectedBusinessDate) {\r\n /**\r\n * Sets the initial selected business date to today's date.\r\n */\r\n DateShowtimePickerSelectedBusinessDate[\"Today\"] = \"Today\";\r\n /**\r\n * Sets the initial selected business date to the first date with available showtimes.\r\n */\r\n DateShowtimePickerSelectedBusinessDate[\"NextAvailable\"] = \"NextAvailable\";\r\n})(DateShowtimePickerSelectedBusinessDate || (DateShowtimePickerSelectedBusinessDate = {}));\r\n"],"names":["getShowtimesQuery","filmIds","siteIds","b","DatePickerDate","props","value","onClick","dateFormat","businessDate","isActive","isSelected","isToday","Object","assign","className","block","children","element","selected","inactive","label","templateParameters","date","today","displayName","DatePickerSkeleton","min","dirtyDatesArray","datesArray","result","requiredArgs","arguments","forEach","Date","NaN","Array","prototype","slice","call","dirtyDate","currentDate","toDate","undefined","isNaN","getDate","max","Number","getDatePickerDateValues","businessDates","selectedBusinessDate","i18n","length","parsedBusinessDates","map","dirtyInterval","options","interval","startDate","start","endTime","end","getTime","RangeError","dates","setHours","step","push","setDate","eachDayOfInterval","now","format","includes","DatePicker","enableSkeletonLoadingIndicators","isLoading","onDateClicked","todayDateFormat","dateExternallyClicked","carouselConfig","values","scrollToSlide","setScrollToSlide","useState","useEffect","index","findIndex","v","config","ToggleInput","name","checked","onChange","onChangeValue","style","disabled","id","loading","layout","isFocused","setIsFocused","type","event","target","onFocus","onBlur","focused","ToggleInputLayout","loadScreeningDates","async","query","loadShowtimes","queryKey","response","showtimes","relatedData","cacheDuration","showtime","loadShowtimesForFirstBusinessDate","isDateShowtimePickerPropsWithFilmIds","DateShowtimePickerActionType","dateShowtimePickerActionReducer","state","action","filmsLoadingState","Loading","apiErrorMessageType","error","isLoadingAllFilms","showAllFilms","oldShowtimeIdsForDate","showtimeIds","isExternalDateTransition","logger","filterScreeningDates","screeningDates","filterId","filter","reduce","acc","screeningDate","validFilmScreenings","filterFilmScreenings","filmScreenings","updatedScreeningDate","filmScreening","film","filmId","validFilm","sections","genre","genreIds","validSites","sites","site","attribute","showtimeAttributeIds","validFilmScreening","updatedFilmScreening","getAllFilmIds","_a","_b","filmFilter","getFilmFilterFromShowtimeFilterId","filterFilmIds","films","filteredFilmIds","getFilmIdsForShowtimes","s","baseData","category","fixed","ScreeningDateType","screeningDateContainsFilmAndSite","siteId","find","screening","getNoShowtimesForSiteDisplayTextProps","displayText","handleDateClicked","alternateScreeningDate","futureScreeningDates","pastScreeningDates","nextBusinessDate","Next","prevBusinessDate","Previous","getNextOrPreviousScreeningDate","noShowtimesForSiteAndFilmMessage","displayTextLabel","nextShowtimeForSiteOnDateMessage","nextScreeningDate","lastShowtimeForSiteOnDateMessage","lastScreeningDate","internalActions","getCurrentBusinessDate","getNextAvailableBusinessDate","sort","compareScreeningDates","a","handleDateSelected","dispatch","showtimeIdsForQuery","addShowtimeIdsForQueryOnBusinessDate","DateShowtimePicker","console","log","componentId","datePicker","defaultDateShowtimePickerState","allFilmsToggle","initialValue","getDefaultDateShowtimePickerState","useReducer","showtimesQuery","filteredScreeningDates","datePickerActiveDates","showtimeIdsForDate","useMemo","useCallback","handleAllFilmsToggleClicked","show","messages","Promise","all","filteredDates","selectedDate","attemptSetSelectedDate","setupFilter","JSON","stringify","currentShowtimeIds","every","handleDateChangedExternally","getSelectedBusinessDate","showtimeId","getAllShowtimes","filmIdsToDisplay","getFilmIdsToDisplay","invalidStateMessage","messageType","invalidStateMessageFilm","filmDetails","messageFilmTitle","title","validateShowtimePickerData","hideAccessories","hideDatePicker","datePickerDateFormat","datePickerTodayDateFormat","carousel","allFilmsToggleLabel","InputFirst","groupShowtimesByDate","DateShowtimePickerComponent","filterConfig","showtimesObject","payload","DateShowtimePickerInternalAction","businessDateValidationFormat","RegExp","businessDateValidator","defaultDateShowtimePickerConfigBase","actionButton","showOnMessage","showDots","refreshOnUpdate","settings","slidesToScroll","slidesToShow","responsive","breakpoint","touchSettings","defaultDateShowtimePickerConfigWithFilmIds","defaultDateShowtimePickerConfigWithoutFilmIds","showtimePickerDatePickerConfigValidator","keys","showtimePickerAllFilmsToggleValidator","defaultDateShowtimePickerConfigBaseValidatorSchema","dateShowtimePickerConfigWithFilmIdsValidator","dateShowtimePickerConfigWithoutFilmIdsValidator","defaultDateShowtimePickerDisplayText","actionButtonLabel","text","internalAction","dateShowtimePickerDisplayTextValidator","dateShowtimePickerPropsBaseValidatorSchema","items","events","assets","cdnOptions","dateShowtimePickerPropsValidator","defaultDateShowtimePickerPropsBase","defaultDateShowtimePickerPropsWithFilmIds","defaultDateShowtimePickerPropsWithoutFilmIds","defaultDateShowtimePickerPropsProvider","DateShowtimePickerSelectedBusinessDate"],"sourceRoot":""}