{"version":3,"file":"app.js","sources":["../src/scripts/renderArrows.js","../src/scripts/renderArrowsNav.js","../src/app.js"],"sourcesContent":["export const renderArrows = (filePath) => {\n $.ajax({\n method: 'GET',\n url: filePath,\n dataType: 'html',\n }).done(function (result) {\n $('.calendar .arrow').html(result);\n }).fail(function (error) {\n console.log(error);\n });\n}","export const renderArrowsNav = (months) => {\n // let months = document.querySelectorAll('.calendar .month');\t\t\n\t\n const tapAction = ( window.ontouchstart === null ) ? 'touchstart' : 'click';\n const handleButton = (e) => {\n // console.log(e);\n e.preventDefault();\n months.forEach((month, idx) => {\n month.classList.remove('active');\n if(month.classList.contains('month--' + e.srcElement.dataset.dir)) {\n month.classList.add('active');\n }\n });\n };\n\n months.forEach((month, idx) => {\n let prevMonth = month.querySelector('.calendar .calendar__arrow--left');\t\n let nextMonth = month.querySelector('.calendar .calendar__arrow--right');\n prevMonth.addEventListener(tapAction, handleButton);\n nextMonth.addEventListener(tapAction, handleButton);\n });\n}","import { renderArrows } from \"./scripts/renderArrows\";\nimport { renderArrowsNav } from \"./scripts/renderArrowsNav\";\n\nwindow.addEventListener('DOMContentLoaded', (ev) => {\n\n\t$ = jQuery.noConflict();\n\n\tlet performances, ticketProvider, csvOptions, calFilters; \n\tlet weeklyNumberDays; //for weekly vars\n\tlet $telecharge_production_name, $best_activation, $limited_activation, $limited_max, $sold_activation, $sold_max;\n\tlet weeklyCalendar, calendar, performanceName, $windowWidth, breakpoint, daysOfTheWeek;\n\tlet formatWeekly, formatMonthly; // For formatting\n\n\tperformances = limelight.performances;\n\tticketProvider = limelight.ticket_provider;\n\tformatWeekly = limelight.data.weekly_date_format;\n\tformatMonthly = limelight.data.monthly_date_format;\n\tweeklyNumberDays = limelight.data.weekly_shown_days ?? 7;\n\n\tcsvOptions = {\n\t\t'production_name': limelight.tc_name\n\t};\n\n\tcalFilters = [\n\t\t[\n\t\t\tlimelight.data.cal_filter_1,\n\t\t\tlimelight.data.cal_filter_1_max, \n\t\t],\n\t\t[\n\t\t\tlimelight.data.cal_filter_2,\n\t\t\tlimelight.data.cal_filter_2_max,\n\t\t],\n\t\tlimelight.data.cal_filter_3_max ? [\n\t\t\tlimelight.data.cal_filter_3,\n\t\t\tlimelight.data.cal_filter_3_max,\n\t\t] : null,\n\t\tlimelight.data.cal_best_filter ? [\n\t\t\t'Best Availability'\n\t\t] : null,\n\t];\n\n\t$telecharge_production_name = limelight.tc_name;\n\t$best_activation = limelight.best; \n\t$limited_activation = limelight.limited;\n\t$limited_max = limelight.limited_max ?? null;\n\t$sold_activation = limelight.sold;\n\t$sold_max = limelight.sold_max ?? null;\n\n\tif(performances && performances.length > 0) {\n\t\trenderCalendar();\n\t}\n\n\tfunction renderCalendar() {\n\n\t\tcalendar = document.querySelector('#cal');\n\t\tperformanceName = $telecharge_production_name;\n\t\tdaysOfTheWeek = [\n\t\t\t'Sunday',\n\t\t\t'Monday',\n\t\t\t'Tuesday',\n\t\t\t'Wednesday',\n\t\t\t'Thursday',\n\t\t\t'Friday',\n\t\t\t'Saturday',\n\t\t];\n\n\t\tif (calendar && performances) {\n\t\t\tif( calendar.classList.contains('calendar__weekly') ) {\n\t\t\t\treturn renderWeekly(ticketProvider);\n\t\t\t} else {\n\t\t\t\treturn renderMonthly(ticketProvider);\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction renderMonthly(provider) {\n\t\t\n\t\trenderArrows(limelight.plugin_path + '/public/svg/arrow.svg');\n\n\t\tvar CALENDAR = {\n\t\t\t// OBJ TO HOLD USERS CURRENT WEBPAGE LOCATION\n\t\t\t// currentPage: window.location.pathname.substring(window.location.pathname.lastIndexOf('/') + 1),\n\t\t\tcurrentPage: window.location.pathname.replace(/\\//g, ''),\n\n\t\t\t// FUNCTION TO EXECUTE CODE BASED ON LOCATION\n\t\t\tuserLocation: function (pagename) {\n\t\t\t\t'use strict';\n\t\t\t\tSCHEDULE.getData(SCHEDULE.sched, '#cal');\n\t\t\t},\n\t\t\t\n\t\t};\n\n\t\t// NAMESPACE FOR SCHEDULE FUNCTIONS\n\t\tvar SCHEDULE = {\n\n\t\t\tTimes: null,\n\t\t\tAvail: null,\n\t\t\tsched: performances,\n\t\t\tSchedule: null,\n\n\t\t\tgetData: function (schedule, targetDiv) {\n\t\t\t\t// console.log(schedule);\n\t\t\t\tvar results = SCHEDULE.schedulePop(schedule); //********\n\t\t\t\t$(targetDiv).append(results); // Adds calendar to div\n\n\t\t\t\t// Renders Arrows\n\t\t\t\tlet months = document.querySelectorAll('.calendar .month');\n\t\t\t\trenderArrowsNav(months);\n\t\t\t},\n\n\t\t\t// Get JSON file, call appropriate parsing function after\n\t\t\tFetch: function (source, callback) {\n\t\t\t\t$.getJSON(source, function (data) {\n\t\t\t\t\t// Format dates if Ticketmaster calendar\n\t\t\t\t\tSCHEDULE.Times = data;\n\t\t\t\t\tcallback();\n\t\t\t\t});\n\t\t\t},\n\n\t\t\t// Populates Schedule Menu\n\t\t\tschedulePop: function (schedule) {\n\t\t\t\tvar today = new Date();\n\t\t\t\tvar performances = schedule;\n\t\t\t\tvar today_month = today.getMonth(); today_month++; // because months are 0 indexed\n\t\t\t\tvar today_year = today.getFullYear();\n\t\t\t\tvar today_date = today.getDate();\n\t\t\t\tlet joinPerformancesByYearMonth = [];\n\t\t\t\t\n\t\t\t\ttoday_month = renderMonthNumber(today_month); // Formats months\n\n\t\t\t\tfor (let di = 0; di < performances.length; di++) {\n\t\t\t\t\tlet performanceYear = performances[di].date.split('-')[0];\n\t\t\t\t\tlet performanceMonth = performances[di].date.split('-')[1];\n\t\t\t\t\tlet performanceMonthYear = performanceYear + '-' + performanceMonth;\n\t\t\t\t\tjoinPerformancesByYearMonth.indexOf(performanceMonthYear) === -1 ? joinPerformancesByYearMonth.push(performanceMonthYear) : null /* console.log(\"This item already exists\") */;\n\t\t\t\t}\n\n\t\t\t\tconst sorter = (a, b) => {\n\t\t\t\t\t// console.log(a);\n\t\t\t\t\treturn new Date(a.date.split('-')[0]).toDateString() - new Date(b.date.split('-')[1]).toDateString();\n\t\t\t\t};\n\t\t\t\tperformances.sort(sorter);\n\n\t\t\t\tconst sorterMonths = (a, b) => {\n\t\t\t\t\treturn new Date(a) - new Date(b);\n\t\t\t\t};\n\t\t\t\tjoinPerformancesByYearMonth.sort(sorterMonths);\n\n\n\t\t\t\tvar months = joinPerformancesByYearMonth.filter(function(date){\n\t\t\t\t\tlet dd = today_month;\n\t\t\t\t\tlet dateCompare = date.replace('-', '');\n\t\t\t\t\tlet dateToday = today_year.toString() + dd.toString();\n\t\t\t\t\tif( dateCompare >= dateToday) {\n\t\t\t\t\t\treturn date;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tvar schedule_html = '';\n\n\t\t\t\tfor (let i = 0; i < months.length; i++) {\n\t\t\t\t\tlet calendar = '';\n\t\t\t\t\t\n\t\t\t\t\t// IF IT'S THIS MONTH ( DISPLAYS PAST DATES DARK )\n\t\t\t\t\t// This dictates the appropriate month number in the calendar dates when rendered on the frontend.\n\t\t\t\t\tif ( months[i] === (today_year + '-' + today_month.toString()) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tlet totalDaysInMonth = new Date(today_year, today_month, 0).getDate();\n\t\t\t\t\t\tfor ( let dayNumber = 1; dayNumber <= Number(totalDaysInMonth); dayNumber++ ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (today_date > dayNumber) { // days before today\n\t\t\t\t\t\t\t\tcalendar +=\n\t\t\t\t\t\t\t\t\t`
\n\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t${renderCalendarNumber(dayNumber)}\n\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t
`; \n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tlet this_performance = performances.filter( el => {\n\t\t\t\t\t\t\t\t\tlet filterIterator = el.date;\n\t\t\t\t\t\t\t\t\tlet filterComaprison = today_year + '-' + today_month.toString() + '-' + renderCalendarNumber(dayNumber);\n\t\t\t\t\t\t\t\t\t// console.log(filterIterator,filterComaprison);\n\t\t\t\t\t\t\t\t\tif(filterIterator == filterComaprison) {\n\t\t\t\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tif( this_performance.length > 0 ) {\n\t\t\t\t\t\t\t\t\t// If Day has performance, show empty\n\t\t\t\t\t\t\t\t\t// Render Date/Times Here\n\t\t\t\t\t\t\t\t\tcalendar +=\n\t\t\t\t\t\t\t\t\t\t`
\n\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t\t${renderCalendarNumber(dayNumber)}\n\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
`;\n\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// If Day has no performance, show empty\n\t\t\t\t\t\t\t\t\t// Fixes issue of some empty dates displaying previous month number\n\t\t\t\t\t\t\t\t\t// ((today.getMonth() + 1) < 10 ? '0' + (today.getMonth() + 1) : (today.getMonth() + 1))\n\t\t\t\t\t\t\t\t\tcalendar +=\n\t\t\t\t\t\t\t\t\t\t`
\n\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t\t\t${renderCalendarNumber(dayNumber)}\n\t\t\t\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\t
`;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tlet totalDaysInMonth = new Date(months[i].split('-')[0], months[i].split('-')[1], 0).getDate();\n\t\t\t\t\t\t// IF IT'S NOT THIS MONTH ( DISPLAYS FULL MONTH )\n\t\t\t\t\t\tfor (let dayNumber = 1; dayNumber <= Number(totalDaysInMonth); dayNumber++) {\n\n\t\t\t\t\t\t\tlet this_performance = performances.filter( el => {\n\t\t\t\t\t\t\t\tlet filterIterator = el.date;\n\t\t\t\t\t\t\t\t// let filterComaprison = months[i].split('-')[0] + '-' + months[i].split('-')[1] + '-' + renderCalendarNumber(dayNumber);\n\t\t\t\t\t\t\t\tlet filterComaprison = months[i].split('-')[0] + '-' + months[i].split('-')[1] + '-' + (dayNumber < 10 ? '0' + dayNumber : dayNumber);\n\t\t\t\t\t\t\t\t// console.log(dayNumber, filterIterator, filterComaprison);\n\t\t\t\t\t\t\t\tif(filterIterator === filterComaprison) {\n\t\t\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t// console.log(this_performance);\n\n\t\t\t\t\t\t\tif( this_performance.length > 0 ) {\n\t\t\t\t\t\t\t\t// If Day has performance, show empty\n\t\t\t\t\t\t\t\t// Render Date/Times Here\n\t\t\t\t\t\t\t\tcalendar +=\n\t\t\t\t\t\t\t\t\t'

' + renderCalendarNumber(dayNumber) + '

';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// If Day has no performance, show empty\n\t\t\t\t\t\t\t\t// Fixes issue of some empty dates displaying previous month number\n\t\t\t\t\t\t\t\tcalendar += \n\t\t\t\t\t\t\t\t\t'

' + renderCalendarNumber(dayNumber) + '

';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// let isCurrentMonth = parseInt(todayMonth) === (today.getMonth()+1) ? 'month--current' : '';\n\t\t\t\t\t\n\t\t\t\t\tschedule_html =\n\t\t\t\t\t\tschedule_html +\n\t\t\t\t\t\t`
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t${renderMonthTitle( months[i] )}\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t${renderLegend(calFilters)}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
Sun
\n\t\t\t\t\t\t\t\t\t
Mon
\n\t\t\t\t\t\t\t\t\t
Tue
\n\t\t\t\t\t\t\t\t\t
Wed
\n\t\t\t\t\t\t\t\t\t
Thu
\n\t\t\t\t\t\t\t\t\t
Fri
\n\t\t\t\t\t\t\t\t\t
Sat
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t` +\n\t\t\t\t\t\t\t\t\trenderBeforeOffsetDays( months[i].split('-')[0], months[i].split('-')[1], 1) +\n\t\t\t\t\t\t\t\t\tcalendar +\n\t\t\t\t\t\t\t\t\trenderAfterOffsetDays( months[i].split('-')[0], months[i].split('-')[1], 1) +\n\t\t\t\t\t\t\t\t\t`\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t`;\n\t\t\t\t}\n\n\t\t\t\treturn schedule_html;\n\t\t\t},\n\t\t};\n\n\t\tCALENDAR.userLocation(CALENDAR.currentPage);\n\t\n\t\tcalendarInit(); // After data is rendered, show init month\n\n\t}\n\n\tfunction renderWeekly(provider) {\n\t\tweeklyInit(calendar, provider);\n\t}\n\n\tfunction weeklyInit(container, provider){\n\t\tlet weekday = [\n\t\t\t'Sun',\n\t\t\t'Mon',\n\t\t\t'Tue',\n\t\t\t'Wed',\n\t\t\t'Thu',\n\t\t\t'Fri',\n\t\t\t'Sat'\n\t\t]\n\t\t\n\t\t\n\t\tlet calText = '';\n\t\tcontainer.parentElement.querySelector('.calendar__header').innerHTML = renderLegend(calFilters); \n\t\tcontainer.innerHTML = calText;\n \n\t\tvar todayDate = new Date();\n\t\tvar startCustom = false; //new Date(block.dataset.start);\n\n\t\t// If user selects start date && before today\n\t\tvar commence = todayDate <= startCustom ? startCustom : todayDate;\n\t\tvar thisDay = new Date(commence);\n\n\t\t// Generates weekday names\n\t\tcalText += '';\n\t\tfor (let i = thisDay.getDay(); i < thisDay.getDay() + 7; i++) {\n\t\t\tlet the_day = i;\n\t\t\tif (the_day > 6) {\n\t\t\t\tthe_day = the_day - 7;\n\t\t\t}\n\t\t\tcalText += '' + weekday[the_day] + '';\n\t\t}\n\t\tcalText += '';\n\n\t\t// Generates Day\n\t\tcalText += ''; // open a week row\n\t\tfor (let j = 0; j < weeklyNumberDays; j++) {\n\n\t\t\tconst newDate = new Date(thisDay);\n\t\t\tlet thisRenderedDate = new Date( newDate.setDate(newDate.getDate() + j) );\n\t\t\t// formatWeekly\n\t\t\tvar d = thisRenderedDate.getDate();\n\t\t\tvar m = thisRenderedDate.getMonth() + 1;\n\t\t\tvar y = thisRenderedDate.getFullYear();\n\t\t\tvar n = thisRenderedDate[thisDay.getDay()];\t\t\t\n\n\t\t\tcalText +=\n\t\t\t\t`\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t${renderPerformanceLink(y + '-' + (m < 10 ? '0' + m : m) + '-' + (d < 10 ? '0' + d : d))}\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t`;\n\t\t}\n\n\t\tcalText += ''; // close a week row\n\n\t\tcontainer.innerHTML += calText; \n\n\t\tcalText = '';\n\t}\n\n\tfunction calendarInit() {\n\t\tlet start_date = limelight.data.tm_start_date;\n\t\tlet rendered_months = document.querySelectorAll('.calendar__monthly .month');\n\n\t\tif(rendered_months.length > 0) {\n\t\t\tif(start_date) {\n\t\t\t\tfor (let index = 0; index < rendered_months.length; index++) {\n\t\t\t\t\tlet month = rendered_months[index];\n\t\t\t\t\tlet monthOperator = 'month--' + start_date.split('-')[0] + '-' + start_date.split('-')[1];\n\t\t\t\t\tif( month.classList.contains( monthOperator ) ) {\n\t\t\t\t\t\tmonth.classList.add('active');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\trendered_months[0].classList.add('active');\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction renderDateFormatWeekly(theDate) {\n\t\tlet j = theDate.getDate();\n\t\tlet m = theDate.getMonth() + 1;\n\t\tlet y = theDate.getFullYear();\n\n\t\tlet formatDate = '';\n\n\t\tswitch (formatWeekly) {\n\t\t\tcase 'j':\n\t\t\t\tformatDate = j;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn formatDate;\n\t}\n\n\tfunction renderPerformanceLink(toRenderPerformances) {\n\n\t\tlet performanceLink = '';\n\n\t\tlet selectedPerformances = [];\n\t\t// selectedPerformances = toRenderPerformances;\n\t\t// console.log(toRenderPerformances);\n\t\tif( typeof toRenderPerformances === 'string' ) {\n\t\t\tperformances.filter(performance => {\n\t\t\t\tif(performance.date === toRenderPerformances) {\n\t\t\t\t\tselectedPerformances.push(performance);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tselectedPerformances = toRenderPerformances;\n\t\t}\n\n\t\t// console.log(selectedPerformances);\n\n\t\tif(selectedPerformances && selectedPerformances.length > 0) {\n\n\t\t\tconst sorter = (a, b) => {\n\t\t\t\tlet first = a.time.split(':')[0];\n\t\t\t\tlet last = b.time.split(':')[0];\n\t\t\t\t\n\t\t\t\treturn first - last;\n\t\t\t};\n\n\t\t\tselectedPerformances.sort(sorter);\n\n\t\t\tfor (let index = 0; index < selectedPerformances.length; index++) {\n\t\t\t\tconst perf = selectedPerformances[index];\n\t\t\t\t// console.log(perf, '\\n');\n\t\t\t\tif(perf.time && perf.url) {\n\t\t\t\t\tlet performanceFilter = '';\n\t\t\t\t\tlet filterFilters = [];\n\n\t\t\t\t\tcalFilters.filter(fi => {\n\t\t\t\t\t\tif(fi && fi.length > 0) {\n\t\t\t\t\t\t\tfilterFilters.push(fi);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t});\n\n\t\t\t\t\t// console.log('HERE', filterFilters);\n\n\t\t\t\t\tif(perf.remaining_tickets) {\n\t\t\t\t\t\tfor (let i = 0; i < filterFilters.length; ++i) {\n\t\t\t\t\t\t\tif(Number(perf.remaining_tickets) < Number(filterFilters[i][1])) {\n\t\t\t\t\t\t\t\tperformanceFilter = filterFilters[i][0].split(' ')[0].toLowerCase();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tperformanceFilter = 'best';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tperformanceFilter = 'none';\n\t\t\t\t\t}\n\n\t\t\t\t\tlet perfTime = perf.time.split(' ')[0];\n\t\t\t\t\tlet perfAMPM = perf.time.split(' ')[1];\n\t\t\t\t\tlet perfHour = perfTime.split(':')[0];\n\t\t\t\t\tlet perfMins = perfTime.split(':')[1];\n\n\t\t\t\t\t// Appointed Classes\n\t\t\t\t\tlet performanceClasses = 'event-time';\n\t\t\t\t\tperformanceClasses += ' event-time--' + perf.date;\n\t\t\t\t\tperformanceClasses += ' event-time--' + performanceFilter;\n\t\t\t\t\tperf.overwrite_best_avail ? performanceClasses += ' event-time--best' : '';\n\t\t\t\t\t\n\t\t\t\t\tperformanceLink += `\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t${`${perfHour}` + `:${perfMins}` + `${perfAMPM}`}\n\t\t\t\t\t\t\n\t\t\t\t\t`;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t}\n\n\t\treturn performanceLink;\n\n\t}\n\n\tfunction renderMonthNumber(monthNumber) {\n\t\treturn monthNumber < 10 ? '0' + monthNumber : monthNumber;\n\t}\n\n\tfunction renderCalendarNumber(dayNumber) {\n\t\t// console.log(limelight);\n\t\tif(limelight.data.tm_calendar_date_number) {\n\t\t\treturn dayNumber < 10 ? '0' + dayNumber : dayNumber;\n\t\t} else {\n\t\t\treturn dayNumber;\n\t\t}\n\t}\n\n\tfunction renderMonthTitle( data ) {\n\t\tlet date_formatted = data.replace('-', '/') + '/' + '01';\n\t\tlet month_num = new Date(date_formatted).toLocaleString('en-us', { month: 'long' });\n\t\tlet title = '';\n\t\ttitle += `

${month_num}

`;\n\t\treturn title;\n\t}\n\n\tfunction renderLegend( legends ) {\n\n\t\tlet calLegend = '';\n\t\tlet filterFilters = [];\n\n\t\tlegends.filter(fi => {\n\t\t\tif(fi && fi.length > 0 && fi[0].length > 0 ) {\n\t\t\t\t// console.log(fi[0].length > 0);\n\t\t\t\tfilterFilters.push(fi);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn;\n\t\t});\n\n\t\tif(filterFilters.length > 0) {\n\t\t\tcalLegend += '
';\n\t\t\t\tfilterFilters.forEach( legend => {\n\t\t\t\t\tif(legend[0].length > 0) {\n\t\t\t\t\t\t// console.log('hre', legend);\n\t\t\t\t\t\tcalLegend += '
';\n\t\t\t\t\t\t\tcalLegend += '
';\n\t\t\t\t\t\t\tcalLegend += '

' + legend[0] + '

'; \n\t\t\t\t\t\tcalLegend += '
';\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// calLegend += '
';\n\t\t\t\t// calLegend += '

Best Availability

';\n\t\t\tcalLegend += '
';\n\t\t}\n\n\t\treturn calLegend;\n\t}\n\n\tfunction renderBeforeOffsetDays(y,m,d) {\n\t\tlet offset = new Date(y,m-1,d).getDay();\n\t\t// console.log(offset)\n\t\tlet before = ''; // setup blank days before first day of month\n\t\tfor (var f = 0; f < offset; f++) {\n\t\t\tbefore +=\n\t\t\t\t`
\n\t\t\t\t\t

\n\t\t\t\t\t \n\t\t\t\t
`;\n\t\t}\n\t\treturn before;\n\t}\n\n\tfunction renderAfterOffsetDays(y,m,d) { \n\n\t\tlet totalDays = new Date(y,m,d).getDate();\n\t\tlet offset = new Date(y,m,totalDays).getDay();\n\t\t// console.log(new Date(y,m,d).getMonth(), totalDays, offset);\n\t\tlet after = ''; // setup blank days after last day of month\n\t\tfor (var t = offset; t > 0 && t < 7; t++) {\n\t\t\tafter +=\n\t\t\t`
\n\t\t\t\t

\n\t\t\t\t \n\t\t\t
`;\n\t\t}\n\t\treturn after;\n\t}\n\n});\n"],"names":["renderArrows","filePath","$","ajax","method","url","dataType","done","result","html","fail","error","console","log","renderArrowsNav","months","tapAction","window","ontouchstart","handleButton","e","preventDefault","forEach","month","idx","classList","remove","contains","srcElement","dataset","dir","add","prevMonth","querySelector","nextMonth","addEventListener","ev","jQuery","noConflict","performances","ticketProvider","calFilters","weeklyNumberDays","weeklyCalendar","calendar","formatWeekly","limelight","ticket_provider","data","weekly_date_format","formatMonthly","monthly_date_format","weekly_shown_days","csvOptions","tc_name","cal_filter_1","cal_filter_1_max","cal_filter_2","cal_filter_2_max","cal_filter_3_max","cal_filter_3","cal_best_filter","best","limited","$limited_max","limited_max","sold","$sold_max","sold_max","length","renderCalendar","document","renderWeekly","renderMonthly","provider","plugin_path","CALENDAR","currentPage","location","pathname","replace","userLocation","pagename","SCHEDULE","getData","sched","Times","Avail","Schedule","schedule","targetDiv","results","schedulePop","append","querySelectorAll","Fetch","source","callback","getJSON","today","Date","today_month","getMonth","today_year","getFullYear","today_date","getDate","joinPerformancesByYearMonth","renderMonthNumber","di","performanceYear","date","split","performanceMonth","performanceMonthYear","indexOf","push","sorter","a","b","toDateString","sort","sorterMonths","filter","dd","dateCompare","dateToday","toString","schedule_html","i","totalDaysInMonth","dayNumber","Number","renderCalendarNumber","this_performance","el","filterIterator","filterComaprison","renderPerformanceLink","renderMonthTitle","renderLegend","renderBeforeOffsetDays","renderAfterOffsetDays","calendarInit","weeklyInit","container","weekday","calText","parentElement","innerHTML","todayDate","startCustom","commence","thisDay","getDay","the_day","j","newDate","thisRenderedDate","setDate","d","m","y","renderDateFormatWeekly","start_date","tm_start_date","rendered_months","index","monthOperator","theDate","formatDate","toRenderPerformances","performanceLink","selectedPerformances","performance","first","time","last","perf","performanceFilter","filterFilters","fi","remaining_tickets","toLowerCase","perfTime","perfAMPM","perfHour","perfMins","performanceClasses","overwrite_best_avail","monthNumber","tm_calendar_date_number","date_formatted","month_num","toLocaleString","title","legends","calLegend","legend","offset","before","f","totalDays","after","t"],"mappings":";;;IAAO,MAAMA,YAAY,GAAIC,QAAQ,IAAK;MACtCC,CAAC,CAACC,IAAI,CAAC;IACHC,IAAAA,MAAM,EAAE,KAAK;IACbC,IAAAA,GAAG,EAAEJ,QAAQ;IACbK,IAAAA,QAAQ,EAAE,MAAA;IACd,GAAC,CAAC,CAACC,IAAI,CAAC,UAAUC,MAAM,EAAE;IACtBN,IAAAA,CAAC,CAAC,kBAAkB,CAAC,CAACO,IAAI,CAACD,MAAM,CAAC,CAAA;IACtC,GAAC,CAAC,CAACE,IAAI,CAAC,UAAUC,KAAK,EAAE;IACrBC,IAAAA,OAAO,CAACC,GAAG,CAACF,KAAK,CAAC,CAAA;IACtB,GAAC,CAAC,CAAA;IACN,CAAC;;ICVM,MAAMG,eAAe,GAAIC,MAAM,IAAK;IACvC;;MAEA,MAAMC,SAAS,GAAKC,MAAM,CAACC,YAAY,KAAK,IAAI,GAAK,YAAY,GAAG,OAAO,CAAA;MAC3E,MAAMC,YAAY,GAAIC,CAAC,IAAK;IACxB;QACAA,CAAC,CAACC,cAAc,EAAE,CAAA;IAClBN,IAAAA,MAAM,CAACO,OAAO,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;IAC3BD,MAAAA,KAAK,CAACE,SAAS,CAACC,MAAM,CAAC,QAAQ,CAAC,CAAA;IAChC,MAAA,IAAGH,KAAK,CAACE,SAAS,CAACE,QAAQ,CAAC,SAAS,GAAGP,CAAC,CAACQ,UAAU,CAACC,OAAO,CAACC,GAAG,CAAC,EAAE;IAC/DP,QAAAA,KAAK,CAACE,SAAS,CAACM,GAAG,CAAC,QAAQ,CAAC,CAAA;IACjC,OAAA;IACJ,KAAC,CAAC,CAAA;OACL,CAAA;IAEDhB,EAAAA,MAAM,CAACO,O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