{"version":3,"sources":["kendo.scheduler.recurrence.js"],"names":["f","define","$","undefined","intervalExcess","diff","interval","excess","dayInYear","date","month","getMonth","days","leapYear","DAYS_IN_LEAPYEAR","DAYS_IN_YEAR","getDate","weekInYear","weekStart","year","Date","getFullYear","adjustDST","setDayOfWeek","setDate","getDay","Math","floor","getTime","weekInMonth","firstWeekDay","firstDayOfMonth","firstWeekLength","ceil","normalizeDayIndex","weekDay","normalizeOffset","rule","lastDate","weeksInMonth","day","skipFirst","skipLast","offset","numberOfWeeks","isInWeek","ruleWeekValues","weekDays","ruleWeekOffset","weekNumber","currentDay","length","result","idx","push","ruleValues","rules","value","normalize","ruleValue","availableRules","parseArray","list","range","parseInt","isNaN","start","end","sort","numberSortPredicate","parseWeekDayList","valueLength","substring","toUpperCase","WEEK_DAYS_IDX","serializeWeekDayList","valueString","WEEK_DAYS","getMonthLength","MONTHS","a","b","parseExceptions","exceptions","zone","dates","split","indexOf","parseUTCDate","isException","isArray","dateTime","getMilliseconds","toExceptionString","concat","kendo","timezone","convert","getTimezoneOffset","toString","RECURRENCE_DATE_FORMAT","join","startPeriodByFreq","freq","setFullYear","hours","setHours","minutes","setMinutes","seconds","setSeconds","endPeriodByFreq","eventsByPosition","periodEvents","positions","position","event","periodEventsLength","events","removeExceptionDates","exceptionDates","expand","startTime","endTime","endDate","durationMS","startPeriod","inPeriod","ruleStart","ruleEnd","useEventStart","freqName","eventStartTime","eventStartMS","eventStart","count","currentIdx","shiftedStart","shiftedEnd","shiftedStartTime","shifterEndTime","allDayCompensation","inPeriodCheckEndDate","startZone","endZone","startOffsetDiff","endOffsetDiff","startTZOffsetDiff","endTZOffsetDiff","offsetTicksStart","offsetTicksEnd","isMissingDSTHour","parseRule","recurrenceRule","getZoneOffset","startTimezone","MS_PER_MINUTE","endTimezone","clone","recurrenceException","exdates","set","frequencies","until","getHours","getMinutes","getSeconds","_startPeriod","kendoDate","_endPeriod","duration","isAllDay","_startTime","toInvariantTime","setup","limit","setTime","toUtcTime","toOccurrence","_endTime","next","slice","isDSTMissingHour","dateOffset","dateMinusHour","dateMinusHourOffset","parseDate","DATE_FORMATS","apply","parseDateRule","dateRule","pair","property","tzid","valueIdx","pairs","recur","offsets","splits","part","parts","instance","predicate","day1","day2","trim","toLowerCase","monthDays","yearDays","months","weeks","culture","calendar","firstDay","_hasRuleValue","serializeDateRule","val","serialize","ruleString","RECURRENCE_VIEW_TEMPLATE","DAY_RULE","WEEKDAY_RULE","WEEKEND_RULE","BaseRecurrenceEditor","RecurrenceEditor","RECURRENCE_HEADER_TEMPLATE","RECURRENCE_REPEAT_PATTERN_TEMPLATE","RECURRENCE_END_PATTERN_TEMPLATE","RECURRENCE_GROUP_BUTTON_TEMPLATE","MobileRecurrenceEditor","window","Class","ui","Widget","DropDownList","ButtonGroup","0","1","2","3","4","5","6","SU","MO","TU","WE","TH","FR","SA","RULE_NAMES","RULE_NAMES_LENGTH","limitation","monthRules","changed","setMonth","monthLength","monthDay","yearDay","week","weekDayRule","offsetDate","normalizeDay","weekDayRules","traverseRuleForNextMont","nextMonthFirstDay","ruleDay","forEach","hourRules","startHours","minuteRules","currentMinutes","secondRules","BaseFrequency","extend","options","this","_hour","ruleName","firstRule","modified","current","startTimeHours","normalizedCurrentIndex","normalizedStartIndex","frequency","MS_PER_HOUR","round","MS_PER_DAY","_date","_getNumberOfWeeksBetweenDates","first","second","exactWeeks","HourlyFrequency","fn","DailyFrequency","WeeklyFrequency","eventStartDate","MonthlyFrequency","YearlyFrequency","hourly","daily","weekly","monthly","yearly","CLICK","CHANGE","recurrence","parse","template","init","element","that","call","wrapper","today","_namespace","name","spinners","mobile","messages","repeat","recurrenceEditorTitle","never","repeatEvery","repeatOn","of","label","mobileLabel","after","occurrence","on","offsetPositions","third","fourth","last","weekdays","weekday","weekend","_initInterval","_value","_container","find","kendoNumericTextBox","decimals","format","min","change","_trigger","_weekDayButtons","names","abbreviated","namesAbbr","values","items","text","attributes","data-value","aria-label","_weekDayButtonGroup","selection","select","selectedDays","map","i","getAttribute","_weekDayRule","clear","_weekDay","_weekDayOffset","_weekDayView","weekDayOffset","weekDayValue","method","weekDayOffsetWidget","_initWeekDay","data","weekdayMessage","offsetMessage","weekDayInput","dataTextField","dataValueField","dataSource","dayName","_initWeekDays","ruleDays","ruleDaysLength","selectors","selectedWeekDayButtons","weekDayButtonGroup","_initMonthDay","monthDayInput","_monthDay","NumericTextBox","max","_initCount","input","_count","_initUntil","startInput","closest","validDateValidationMessage","Validator","prototype","dateCompareValidationMessage","dateCompare","initialValue","attr","_until","kendoDatePicker","setOptions","trigger","_initFrequency","_initContainer","destroy","_frequency","off","freqButton","_initView","container","editContainer","parent","insertAfter","append","buttonGroupElement","title","html","_initMonth","_period","_end","monthInputs","monthName","_month1","_month2","endRule","namespace","click","e","_toggleEnd","currentTarget","_buttonNever","_buttonCount","_buttonUntil","toggleRule","_toggleMonthDay","_toggleYear","selector","radioButtons","_buttonMonthDay","eq","_buttonWeekDay","enableCount","enableUntil","prop","enable","monthRule","enableMonthDay","enableWeekDay","yearRule","enableMonth1","enableMonth2","plugin","_optionTemplate","_pane","pane","_initRepeatButton","_initParentRepeatEnd","_defaultValue","animations","left","right","cancel","update","endTitle","repeatTitle","headerTitle","patterns","repeatBy","dayOfMonth","dayOfWeek","every","_destroyView","_endFields","target","_chevronButton","_repeatValue","parents","preventDefault","_createView","navigate","_view","_endLiItem","endLabelField","endEditField","appendTo","_navigateToView","_endParentLabelField","toggle","_endParentEndButton","_endText","_initRepeatEnd","_endLabelField","toggleClass","_endButton","viewName","frequencyMessages","ns","_initRepeatView","_initEndNavigation","endMessages","_initEndView","viewType","returnViewId","view","id","stopPropagation","hasClass","one","remove","content","show","hide","ev","endPattern","weekDaySelect","_options","monthSelect","monthNames","_monthSelect","currentValue","repeatRuleGroupButton","weekDayView","monthDayView","weekDayName","support","optionLabel","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,8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6BnT,EAAM2P,OAAO3P,EAAMyI,GAAG2K,UAAUC,UAAUjI,QAAQ8C,SAASxT,KAAMgT,EAAKtC,QAAQ8C,SAAS9P,IAAIyQ,IACxHyE,EAA+BtT,EAAMyI,GAAG2K,UAAUC,UAAUjI,QAAQ8C,SAASqF,WACjFT,GAAMW,KAAK,qBAAsBN,GACjCL,EAAMW,KAAK,4BAA6BH,GAEpC5F,EAAKgG,OADL1T,EAAMwb,QAAQ1I,MAAMpY,KACNoY,EAAMW,KAAK,MAAOzT,EAAMI,SAASwP,EAAK,eAAenI,IAAIzH,EAAMI,SAASgE,GAASjG,EAAO,eAAe0Q,GAAG,SAAU,WAC9H,GAAInU,GAAOsF,EAAM2F,UAAU0F,KAAK3N,MAAO,aACnChD,KACA4B,EAAK8H,MAAQ1J,GAEjBgT,EAAKoC,aAGKgD,EAAMa,iBAChB/D,IAAKA,EACLlS,MAAO0G,GAASjG,EAChB0R,OAAQ,WACJ,GAAInV,GAAO2Q,KAAK3N,OACZhD,KACA4B,EAAK8H,MAAQ1J,GAEjBgT,EAAKoC,cAEV4B,KAAK,oBAGhBqJ,SAAU,SAAUrJ,EAAM+J,GAAhB,GACFne,GAAM,EACNsX,EAAO,GACPxX,EAASsU,EAAKtU,OACdmQ,EAAWlC,KAAK2L,eAOpB,KANIyE,IACA7G,GAAQrH,GACJ7P,MAAO,GACP2S,KAAMoL,KAGPne,EAAMF,EAAQE,IACjBsX,GAAQrH,EAASmE,EAAKpU,GAE1B,OAAOsX,MAGfnM,EAAGsO,OAAOzO,IACZC,OAAOvI,MAAM0b,QACRnT,OAAOvI,OACE,kBAAV9F,SAAwBA,OAAOyhB,IAAMzhB,OAAS,SAAU0hB,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.scheduler.recurrence.min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('kendo.scheduler.recurrence', [\n 'kendo.dropdownlist',\n 'kendo.datepicker',\n 'kendo.numerictextbox',\n 'kendo.buttongroup'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'scheduler.recurrence',\n name: 'Recurrence',\n category: 'web',\n depends: [\n 'dropdownlist',\n 'datepicker',\n 'numerictextbox',\n 'buttongroup'\n ],\n hidden: true\n };\n (function ($, undefined) {\n var kendo = window.kendo, timezone = kendo.timezone, Class = kendo.Class, ui = kendo.ui, Widget = ui.Widget, DropDownList = ui.DropDownList, ButtonGroup = ui.ButtonGroup, kendoDate = kendo.date, setTime = kendoDate.setTime, setDayOfWeek = kendoDate.setDayOfWeek, adjustDST = kendoDate.adjustDST, firstDayOfMonth = kendoDate.firstDayOfMonth, getMilliseconds = kendoDate.getMilliseconds, DAYS_IN_LEAPYEAR = [\n 0,\n 31,\n 60,\n 91,\n 121,\n 152,\n 182,\n 213,\n 244,\n 274,\n 305,\n 335,\n 366\n ], DAYS_IN_YEAR = [\n 0,\n 31,\n 59,\n 90,\n 120,\n 151,\n 181,\n 212,\n 243,\n 273,\n 304,\n 334,\n 365\n ], MONTHS = [\n 31,\n 28,\n 31,\n 30,\n 31,\n 30,\n 31,\n 31,\n 30,\n 31,\n 30,\n 31\n ], WEEK_DAYS = {\n 0: 'SU',\n 1: 'MO',\n 2: 'TU',\n 3: 'WE',\n 4: 'TH',\n 5: 'FR',\n 6: 'SA'\n }, WEEK_DAYS_IDX = {\n 'SU': 0,\n 'MO': 1,\n 'TU': 2,\n 'WE': 3,\n 'TH': 4,\n 'FR': 5,\n 'SA': 6\n }, DATE_FORMATS = [\n 'yyyy-MM-ddTHH:mm:ss.fffzzz',\n 'yyyy-MM-ddTHH:mm:sszzz',\n 'yyyy-MM-ddTHH:mm:ss',\n 'yyyy-MM-ddTHH:mm',\n 'yyyy-MM-ddTHH',\n 'yyyy-MM-dd',\n 'yyyyMMddTHHmmssfffzzz',\n 'yyyyMMddTHHmmsszzz',\n 'yyyyMMddTHHmmss',\n 'yyyyMMddTHHmm',\n 'yyyyMMddTHH',\n 'yyyyMMdd'\n ], RULE_NAMES = [\n 'months',\n 'weeks',\n 'yearDays',\n 'monthDays',\n 'weekDays',\n 'hours',\n 'minutes',\n 'seconds'\n ], RULE_NAMES_LENGTH = RULE_NAMES.length, RECURRENCE_DATE_FORMAT = 'yyyyMMddTHHmmssZ', limitation = {\n months: function (date, end, rule) {\n var monthRules = rule.months, months = ruleValues(monthRules, date.getMonth() + 1), changed = false;\n if (months !== null) {\n if (months.length) {\n date.setMonth(months[0] - 1, 1);\n } else {\n date.setFullYear(date.getFullYear() + 1, monthRules[0] - 1, 1);\n }\n changed = true;\n }\n return changed;\n },\n monthDays: function (date, end, rule) {\n var monthLength, month, days, changed = false, hours = date.getHours(), normalize = function (monthDay) {\n if (monthDay < 0) {\n monthDay = monthLength + monthDay + 1;\n }\n return monthDay;\n };\n while (date <= end) {\n month = date.getMonth();\n monthLength = getMonthLength(date);\n days = ruleValues(rule.monthDays, date.getDate(), normalize);\n if (days === null) {\n return changed;\n }\n changed = true;\n if (days.length) {\n date.setMonth(month, days.sort(numberSortPredicate)[0]);\n adjustDST(date, hours);\n if (month === date.getMonth()) {\n break;\n }\n } else {\n date.setMonth(month + 1, 1);\n }\n }\n return changed;\n },\n yearDays: function (date, end, rule) {\n var year, yearDays, changed = false, hours = date.getHours(), normalize = function (yearDay) {\n if (yearDay < 0) {\n yearDay = year + yearDay;\n }\n return yearDay;\n };\n while (date < end) {\n year = leapYear(date) ? 366 : 365;\n yearDays = ruleValues(rule.yearDays, dayInYear(date), normalize);\n if (yearDays === null) {\n return changed;\n }\n changed = true;\n year = date.getFullYear();\n if (yearDays.length) {\n date.setFullYear(year, 0, yearDays.sort(numberSortPredicate)[0]);\n adjustDST(date, hours);\n break;\n } else {\n date.setFullYear(year + 1, 0, 1);\n }\n }\n return changed;\n },\n weeks: function (date, end, rule) {\n var weekStart = rule.weekStart, year, weeks, day, changed = false, hours = date.getHours(), normalize = function (week) {\n if (week < 0) {\n week = 53 + week;\n }\n return week;\n };\n while (date < end) {\n weeks = ruleValues(rule.weeks, weekInYear(date, weekStart), normalize);\n if (weeks === null) {\n return changed;\n }\n changed = true;\n year = date.getFullYear();\n if (weeks.length) {\n day = weeks.sort(numberSortPredicate)[0] * 7 - 1;\n date.setFullYear(year, 0, day);\n setDayOfWeek(date, weekStart, -1);\n adjustDST(date, hours);\n break;\n } else {\n date.setFullYear(year + 1, 0, 1);\n }\n }\n return changed;\n },\n weekDays: function (date, end, rule) {\n var offsetDate = new Date(date.getTime() + rule.offsets.start);\n var normalizeDay = offsetDate.getDay() - date.getDay();\n var weekDays = rule.weekDays;\n var weekStart = rule.weekStart;\n var weekDayRules = ruleWeekValues(weekDays, offsetDate, weekStart);\n var hours = date.getHours();\n var traverseRuleForNextMont = function (rule) {\n var nextMonthFirstDay = new Date(date.getFullYear(), date.getMonth() + 1, 1);\n var ruleDay = normalizeDayIndex(rule.day, weekStart);\n if (nextMonthFirstDay.getDay() <= ruleDay) {\n if (!weekDayRule || normalizeDayIndex(weekDayRule.day, weekStart) > ruleDay) {\n weekDayRule = rule;\n }\n }\n };\n var weekDayRule, day;\n if (weekDayRules === null) {\n return false;\n }\n weekDayRule = weekDayRules[0];\n if (!weekDayRule) {\n if (rule.freq === 'monthly' && !rule.positions || rule.position > 0) {\n weekDays.forEach(traverseRuleForNextMont);\n }\n if (!weekDayRule) {\n weekDayRule = weekDays[0];\n }\n setDayOfWeek(date, weekStart);\n }\n day = weekDayRule.day;\n day -= normalizeDay;\n if (weekDayRule.offset) {\n while (date <= end && !isInWeek(date, weekDayRule, weekStart)) {\n if (weekInMonth(date, weekStart) === numberOfWeeks(date, weekStart)) {\n date.setMonth(date.getMonth() + 1, 1);\n adjustDST(date, hours);\n } else {\n date.setDate(date.getDate() + 7);\n adjustDST(date, hours);\n setDayOfWeek(date, weekStart, -1);\n }\n }\n }\n if (date.getDay() !== day) {\n setDayOfWeek(date, day);\n }\n return true;\n },\n hours: function (date, end, rule) {\n var hourRules = rule.hours, startTime = rule._startTime, startHours = startTime.getHours(), hours = ruleValues(hourRules, startHours), changed = false;\n if (hours !== null) {\n changed = true;\n date.setHours(startHours);\n adjustDST(date, startHours);\n if (hours.length) {\n hours = hours[0];\n date.setHours(hours);\n } else {\n hours = date.getHours();\n date.setDate(date.getDate() + 1);\n adjustDST(date, hours);\n hours = hourRules[0];\n date.setHours(hours);\n adjustDST(date, hours);\n }\n if (rule.minutes) {\n date.setMinutes(0);\n }\n startTime.setHours(hours, date.getMinutes());\n }\n return changed;\n },\n minutes: function (date, end, rule) {\n var minuteRules = rule.minutes, currentMinutes = date.getMinutes(), minutes = ruleValues(minuteRules, currentMinutes), hours = rule._startTime.getHours(), changed = false;\n if (minutes !== null) {\n changed = true;\n if (minutes.length) {\n minutes = minutes[0];\n } else {\n hours += 1;\n minutes = minuteRules[0];\n }\n if (rule.seconds) {\n date.setSeconds(0);\n }\n date.setHours(hours, minutes);\n hours = hours % 24;\n adjustDST(date, hours);\n rule._startTime.setHours(hours, minutes, date.getSeconds());\n }\n return changed;\n },\n seconds: function (date, end, rule) {\n var secondRules = rule.seconds, hours = rule._startTime.getHours(), seconds = ruleValues(secondRules, date.getSeconds()), minutes = date.getMinutes(), changed = false;\n if (seconds !== null) {\n changed = true;\n if (seconds.length) {\n date.setSeconds(seconds[0]);\n } else {\n minutes += 1;\n date.setMinutes(minutes, secondRules[0]);\n if (minutes > 59) {\n minutes = minutes % 60;\n hours = (hours + 1) % 24;\n }\n }\n rule._startTime.setHours(hours, minutes, date.getSeconds());\n }\n return changed;\n }\n }, BaseFrequency = Class.extend({\n next: function (date, rule) {\n var startTime = rule._startTime, day = startTime.getDate(), minutes, seconds;\n if (rule.seconds) {\n seconds = date.getSeconds() + 1;\n date.setSeconds(seconds);\n startTime.setSeconds(seconds);\n startTime.setDate(day);\n } else if (rule.minutes) {\n minutes = date.getMinutes() + 1;\n date.setMinutes(minutes);\n startTime.setMinutes(minutes);\n startTime.setDate(day);\n } else {\n return false;\n }\n return true;\n },\n normalize: function (options) {\n var rule = options.rule;\n if (options.idx === 4 && rule.hours) {\n rule._startTime.setHours(0);\n this._hour(options.date, rule);\n }\n },\n limit: function (date, end, rule) {\n var interval = rule.interval, ruleName, firstRule, modified, idx, day;\n while (date <= end) {\n modified = firstRule = undefined;\n day = date.getDate();\n for (idx = 0; idx < RULE_NAMES_LENGTH; idx++) {\n ruleName = RULE_NAMES[idx];\n if (rule[ruleName]) {\n modified = limitation[ruleName](date, end, rule);\n if (firstRule !== undefined && modified) {\n break;\n } else {\n firstRule = modified;\n }\n }\n if (modified) {\n this.normalize({\n date: date,\n rule: rule,\n day: day,\n idx: idx\n });\n }\n }\n if ((interval === 1 || !this.interval(rule, date)) && idx === RULE_NAMES_LENGTH) {\n break;\n }\n }\n },\n interval: function (rule, current) {\n var start = new Date(rule._startPeriod);\n var date = new Date(current);\n var hours = current.getHours();\n var weekStart = rule.weekStart;\n var interval = rule.interval;\n var frequency = rule.freq;\n var modified = false;\n var excess = 0;\n var month = 0;\n var day = 1;\n var diff;\n var startTimeHours;\n if (frequency === 'hourly') {\n diff = date.getTimezoneOffset() - start.getTimezoneOffset();\n startTimeHours = rule._startTime.getHours();\n date = date.getTime();\n if (hours !== startTimeHours) {\n date += (startTimeHours - hours) * kendoDate.MS_PER_HOUR;\n }\n date -= start;\n if (diff) {\n date -= diff * kendoDate.MS_PER_MINUTE;\n }\n diff = Math.floor(date / kendoDate.MS_PER_HOUR);\n excess = intervalExcess(diff, interval);\n if (excess !== 0) {\n this._hour(current, rule, excess);\n modified = true;\n }\n } else if (frequency === 'daily') {\n kendoDate.setTime(date, -start, true);\n diff = Math.round(date / kendoDate.MS_PER_DAY);\n excess = intervalExcess(diff, interval);\n if (excess !== 0) {\n this._date(current, rule, excess);\n modified = true;\n }\n } else if (frequency === 'weekly') {\n excess = this._getNumberOfWeeksBetweenDates(start, current);\n var normalizedCurrentIndex = normalizeDayIndex(current.getDay(), weekStart);\n var normalizedStartIndex = normalizeDayIndex(start.getDay(), weekStart);\n if (normalizedCurrentIndex < normalizedStartIndex) {\n excess += 1;\n }\n excess = intervalExcess(excess, interval);\n if (excess !== 0) {\n kendoDate.setDayOfWeek(current, rule.weekStart, -1);\n current.setDate(current.getDate() + excess * 7);\n adjustDST(current, hours);\n modified = true;\n }\n } else if (frequency === 'monthly') {\n diff = current.getFullYear() - start.getFullYear();\n diff = current.getMonth() - start.getMonth() + diff * 12;\n excess = intervalExcess(diff, interval);\n if (excess !== 0) {\n day = rule._hasRuleValue ? 1 : current.getDate();\n current.setFullYear(current.getFullYear(), current.getMonth() + excess, day);\n adjustDST(current, hours);\n modified = true;\n }\n } else if (frequency === 'yearly') {\n diff = current.getFullYear() - start.getFullYear();\n excess = intervalExcess(diff, interval);\n if (!rule.months) {\n month = current.getMonth();\n }\n if (!rule.yearDays && !rule.monthDays && !rule.weekDays) {\n day = current.getDate();\n }\n if (excess !== 0) {\n current.setFullYear(current.getFullYear() + excess, month, day);\n adjustDST(current, hours);\n modified = true;\n }\n }\n return modified;\n },\n _getNumberOfWeeksBetweenDates: function (first, second) {\n var weeks = (second - first) / 604800000;\n var exactWeeks = Math.floor(weeks);\n if (weeks - exactWeeks > 0.99) {\n exactWeeks = Math.round(weeks);\n }\n return exactWeeks;\n },\n _hour: function (date, rule, interval) {\n var startTime = rule._startTime, hours = startTime.getHours();\n if (interval) {\n hours += interval;\n }\n date.setHours(hours);\n hours = hours % 24;\n startTime.setHours(hours);\n adjustDST(date, hours);\n },\n _date: function (date, rule, interval) {\n var hours = date.getHours();\n date.setDate(date.getDate() + interval);\n if (!adjustDST(date, hours)) {\n this._hour(date, rule);\n }\n }\n }), HourlyFrequency = BaseFrequency.extend({\n next: function (date, rule) {\n if (!BaseFrequency.fn.next(date, rule)) {\n this._hour(date, rule, 1);\n }\n },\n normalize: function (options) {\n var rule = options.rule;\n if (options.idx === 4) {\n rule._startTime.setHours(0);\n this._hour(options.date, rule);\n }\n }\n }), DailyFrequency = BaseFrequency.extend({\n next: function (date, rule) {\n if (!BaseFrequency.fn.next(date, rule)) {\n this[rule.hours ? '_hour' : '_date'](date, rule, 1);\n }\n }\n }), WeeklyFrequency = DailyFrequency.extend({\n setup: function (rule, eventStartDate) {\n if (!rule.weekDays) {\n rule.weekDays = [{\n day: eventStartDate.getDay(),\n offset: 0\n }];\n }\n }\n }), MonthlyFrequency = BaseFrequency.extend({\n next: function (date, rule) {\n var day, hours;\n if (!BaseFrequency.fn.next(date, rule)) {\n if (rule.hours) {\n this._hour(date, rule, 1);\n } else if (rule.monthDays || rule.weekDays || rule.yearDays || rule.weeks) {\n this._date(date, rule, 1);\n } else {\n day = date.getDate();\n hours = date.getHours();\n date.setMonth(date.getMonth() + 1);\n adjustDST(date, hours);\n while (date.getDate() !== day) {\n date.setDate(day);\n adjustDST(date, hours);\n }\n this._hour(date, rule);\n }\n }\n },\n normalize: function (options) {\n var rule = options.rule, date = options.date, hours = date.getHours();\n if (options.idx === 0 && !rule.monthDays && !rule.weekDays) {\n date.setDate(options.day);\n adjustDST(date, hours);\n } else {\n BaseFrequency.fn.normalize(options);\n }\n },\n setup: function (rule, eventStartDate, date) {\n if (!rule.monthDays && !rule.weekDays) {\n date.setDate(eventStartDate.getDate());\n }\n }\n }), YearlyFrequency = MonthlyFrequency.extend({\n next: function (date, rule) {\n var day, hours = date.getHours();\n if (!BaseFrequency.fn.next(date, rule)) {\n if (rule.hours) {\n this._hour(date, rule, 1);\n } else if (rule.monthDays || rule.weekDays || rule.yearDays || rule.weeks) {\n this._date(date, rule, 1);\n } else if (rule.months) {\n day = date.getDate();\n date.setMonth(date.getMonth() + 1);\n adjustDST(date, hours);\n while (date.getDate() !== day) {\n date.setDate(day);\n adjustDST(date, hours);\n }\n this._hour(date, rule);\n } else {\n date.setFullYear(date.getFullYear() + 1);\n adjustDST(date, hours);\n this._hour(date, rule);\n }\n }\n },\n setup: function () {\n }\n }), frequencies = {\n 'hourly': new HourlyFrequency(),\n 'daily': new DailyFrequency(),\n 'weekly': new WeeklyFrequency(),\n 'monthly': new MonthlyFrequency(),\n 'yearly': new YearlyFrequency()\n }, CLICK = 'click', CHANGE = 'change';\n function intervalExcess(diff, interval) {\n var excess;\n if (diff !== 0 && diff < interval) {\n excess = interval - diff;\n } else {\n excess = diff % interval;\n if (excess) {\n excess = interval - excess;\n }\n }\n return excess;\n }\n function dayInYear(date) {\n var month = date.getMonth();\n var days = leapYear(date) ? DAYS_IN_LEAPYEAR[month] : DAYS_IN_YEAR[month];\n return days + date.getDate();\n }\n function weekInYear(date, weekStart) {\n var year, days;\n date = new Date(date.getFullYear(), date.getMonth(), date.getDate());\n adjustDST(date, 0);\n year = date.getFullYear();\n if (weekStart !== undefined) {\n setDayOfWeek(date, weekStart, -1);\n date.setDate(date.getDate() + 4);\n } else {\n date.setDate(date.getDate() + (4 - (date.getDay() || 7)));\n }\n adjustDST(date, 0);\n days = Math.floor((date.getTime() - new Date(year, 0, 1, -6)) / 86400000);\n return 1 + Math.floor(days / 7);\n }\n function weekInMonth(date, weekStart) {\n var firstWeekDay = firstDayOfMonth(date).getDay();\n var firstWeekLength = 7 - (firstWeekDay + 7 - (weekStart || 7)) || 7;\n if (firstWeekLength < 0) {\n firstWeekLength += 7;\n }\n return Math.ceil((date.getDate() - firstWeekLength) / 7) + 1;\n }\n function normalizeDayIndex(weekDay, weekStart) {\n return weekDay + (weekDay < weekStart ? 7 : 0);\n }\n function normalizeOffset(date, rule, weekStart) {\n var offset = rule.offset;\n if (!offset) {\n return weekInMonth(date, weekStart);\n }\n var lastDate = new Date(date.getFullYear(), date.getMonth() + 1, 0);\n var weeksInMonth = weekInMonth(lastDate, weekStart);\n var day = normalizeDayIndex(rule.day, weekStart);\n var skipFirst = day < normalizeDayIndex(new Date(date.getFullYear(), date.getMonth(), 1).getDay(), weekStart);\n var skipLast = day > normalizeDayIndex(lastDate.getDay(), weekStart);\n if (offset < 0) {\n offset = weeksInMonth + (offset + 1 - (skipLast ? 1 : 0));\n } else if (skipFirst) {\n offset += 1;\n }\n weeksInMonth -= skipLast ? 1 : 0;\n if (offset < (skipFirst ? 1 : 0) || offset > weeksInMonth) {\n return null;\n }\n return offset;\n }\n function numberOfWeeks(date, weekStart) {\n return weekInMonth(new Date(date.getFullYear(), date.getMonth() + 1, 0), weekStart);\n }\n function isInWeek(date, rule, weekStart) {\n return weekInMonth(date, weekStart) === normalizeOffset(date, rule, weekStart);\n }\n function ruleWeekValues(weekDays, date, weekStart) {\n var currentDay = normalizeDayIndex(date.getDay(), weekStart);\n var length = weekDays.length;\n var ruleWeekOffset;\n var weekDay, day;\n var weekNumber;\n var result = [];\n var idx = 0;\n for (; idx < length; idx++) {\n weekDay = weekDays[idx];\n weekNumber = weekInMonth(date, weekStart);\n ruleWeekOffset = normalizeOffset(date, weekDay, weekStart);\n if (ruleWeekOffset === null) {\n continue;\n }\n if (weekNumber < ruleWeekOffset) {\n result.push(weekDay);\n } else if (weekNumber === ruleWeekOffset) {\n day = normalizeDayIndex(weekDay.day, weekStart);\n if (currentDay < day) {\n result.push(weekDay);\n } else if (currentDay === day) {\n return null;\n }\n }\n }\n return result;\n }\n function ruleValues(rules, value, normalize) {\n var idx = 0, length = rules.length, availableRules = [], ruleValue;\n for (; idx < length; idx++) {\n ruleValue = rules[idx];\n if (normalize) {\n ruleValue = normalize(ruleValue);\n }\n if (value === ruleValue) {\n return null;\n } else if (value < ruleValue) {\n availableRules.push(ruleValue);\n }\n }\n return availableRules;\n }\n function parseArray(list, range) {\n var idx = 0, length = list.length, value;\n for (; idx < length; idx++) {\n value = parseInt(list[idx], 10);\n if (isNaN(value) || value < range.start || value > range.end || value === 0 && range.start < 0) {\n return null;\n }\n list[idx] = value;\n }\n return list.sort(numberSortPredicate);\n }\n function parseWeekDayList(list) {\n var idx = 0, length = list.length, value, valueLength, day;\n for (; idx < length; idx++) {\n value = list[idx];\n valueLength = value.length;\n day = value.substring(valueLength - 2).toUpperCase();\n day = WEEK_DAYS_IDX[day];\n if (day === undefined) {\n return null;\n }\n list[idx] = {\n offset: parseInt(value.substring(0, valueLength - 2), 10) || 0,\n day: day\n };\n }\n return list;\n }\n function serializeWeekDayList(list) {\n var idx = 0, length = list.length, value, valueString, result = [];\n for (; idx < length; idx++) {\n value = list[idx];\n if (typeof value === 'string') {\n valueString = value;\n } else {\n valueString = '' + WEEK_DAYS[value.day];\n if (value.offset) {\n valueString = value.offset + valueString;\n }\n }\n result.push(valueString);\n }\n return result.toString();\n }\n function getMonthLength(date) {\n var month = date.getMonth();\n if (month === 1) {\n if (new Date(date.getFullYear(), 1, 29).getMonth() === 1) {\n return 29;\n }\n return 28;\n }\n return MONTHS[month];\n }\n function leapYear(year) {\n year = year.getFullYear();\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n }\n function numberSortPredicate(a, b) {\n return a - b;\n }\n function parseExceptions(exceptions, zone) {\n var idx = 0, length, date, dates = [];\n if (exceptions) {\n exceptions = exceptions.split(exceptions.indexOf(';') !== -1 ? ';' : ',');\n length = exceptions.length;\n for (; idx < length; idx++) {\n date = parseUTCDate(exceptions[idx], zone);\n if (date) {\n dates.push(date);\n }\n }\n }\n return dates;\n }\n function isException(exceptions, date, zone) {\n var dates = $.isArray(exceptions) ? exceptions : parseExceptions(exceptions, zone), dateTime = date.getTime() - date.getMilliseconds(), idx = 0, length = dates.length;\n for (; idx < length; idx++) {\n if (dates[idx].getTime() === dateTime) {\n return true;\n }\n }\n return false;\n }\n function toExceptionString(dates, zone) {\n var idx = 0;\n var length;\n var date;\n var result = [].concat(dates);\n for (length = result.length; idx < length; idx++) {\n date = result[idx];\n date = kendo.timezone.convert(date, zone || date.getTimezoneOffset(), 'Etc/UTC');\n result[idx] = kendo.toString(date, RECURRENCE_DATE_FORMAT);\n }\n return result.join(',');\n }\n function startPeriodByFreq(start, rule) {\n var date = new Date(start);\n switch (rule.freq) {\n case 'yearly':\n date.setFullYear(date.getFullYear(), 0, 1);\n break;\n case 'monthly':\n date.setFullYear(date.getFullYear(), date.getMonth(), 1);\n break;\n case 'weekly':\n setDayOfWeek(date, rule.weekStart, -1);\n break;\n default:\n break;\n }\n if (rule.hours) {\n date.setHours(0);\n }\n if (rule.minutes) {\n date.setMinutes(0);\n }\n if (rule.seconds) {\n date.setSeconds(0);\n }\n return date;\n }\n function endPeriodByFreq(start, rule) {\n var date = new Date(start);\n switch (rule.freq) {\n case 'yearly':\n date.setFullYear(date.getFullYear(), 11, 31);\n break;\n case 'monthly':\n date.setFullYear(date.getFullYear(), date.getMonth() + 1, 0);\n break;\n case 'weekly':\n setDayOfWeek(date, rule.weekStart, -1);\n date.setDate(date.getDate() + 6);\n break;\n default:\n break;\n }\n if (rule.hours) {\n date.setHours(23);\n }\n if (rule.minutes) {\n date.setMinutes(59);\n }\n if (rule.seconds) {\n date.setSeconds(59);\n }\n return date;\n }\n function eventsByPosition(periodEvents, start, positions) {\n var periodEventsLength = periodEvents.length;\n var events = [];\n var position;\n var event;\n for (var idx = 0, length = positions.length; idx < length; idx++) {\n position = positions[idx];\n if (position < 0) {\n position = periodEventsLength + position;\n } else {\n position -= 1;\n }\n event = periodEvents[position];\n if (event && event.start >= start) {\n events.push(event);\n }\n }\n return events;\n }\n function removeExceptionDates(periodEvents, exceptionDates, zone) {\n var events = [];\n var event;\n for (var idx = 0; idx < periodEvents.length; idx++) {\n event = periodEvents[idx];\n if (!isException(exceptionDates, event.start, zone)) {\n events.push(event);\n }\n }\n return events;\n }\n function expand(event, start, end, zone) {\n var rule, startTime, endTime, endDate, hours, minutes, seconds, durationMS, startPeriod, inPeriod, ruleStart, ruleEnd, useEventStart, freqName, exceptionDates, eventStartTime, eventStartMS, eventStart, count, freq, positions, currentIdx, periodEvents, events = [], shiftedStart, shiftedEnd, shiftedStartTime, shifterEndTime;\n rule = parseRule(event.recurrenceRule, zone, {\n start: (getZoneOffset(event.start, zone) - getZoneOffset(event.start, event.startTimezone)) * kendo.date.MS_PER_MINUTE,\n end: (getZoneOffset(event.end, zone) - getZoneOffset(event.end, event.endTimezone)) * kendo.date.MS_PER_MINUTE\n });\n if (!rule) {\n return [event];\n }\n positions = rule.positions;\n currentIdx = positions ? 0 : 1;\n ruleStart = rule.start;\n ruleEnd = rule.end;\n if (ruleStart || ruleEnd) {\n event = event.clone({\n start: ruleStart ? new Date(ruleStart.value[0]) : undefined,\n end: ruleEnd ? new Date(ruleEnd.value[0]) : undefined\n });\n }\n eventStart = event.start;\n eventStartMS = eventStart.getTime();\n eventStartTime = getMilliseconds(eventStart);\n exceptionDates = parseExceptions(event.recurrenceException, zone);\n if (!exceptionDates[0] && rule.exdates) {\n exceptionDates = rule.exdates.value;\n event.set('recurrenceException', toExceptionString(exceptionDates, zone));\n }\n startPeriod = start = new Date(start);\n end = new Date(end);\n freqName = rule.freq;\n freq = frequencies[freqName];\n count = rule.count;\n if (rule.until && rule.until < end) {\n end = new Date(rule.until);\n }\n useEventStart = freqName === 'yearly' || freqName === 'monthly' || freqName === 'weekly';\n if (start < eventStartMS || count || rule.interval > 1 || useEventStart || (freqName === 'daily' || freqName === 'hourly') && !rule.seconds) {\n start = new Date(eventStartMS);\n } else {\n hours = start.getHours();\n minutes = start.getMinutes();\n seconds = start.getSeconds();\n if (!rule.hours) {\n hours = eventStart.getHours();\n }\n if (!rule.minutes) {\n minutes = eventStart.getMinutes();\n }\n if (!rule.seconds) {\n seconds = eventStart.getSeconds();\n }\n start.setHours(hours, minutes, seconds, eventStart.getMilliseconds());\n }\n rule._startPeriod = new Date(start);\n if (positions) {\n start = startPeriodByFreq(start, rule);\n end = endPeriodByFreq(end, rule);\n var diff = getMilliseconds(end) - getMilliseconds(start);\n if (diff < 0) {\n hours = start.getHours();\n end.setHours(hours, start.getMinutes(), start.getSeconds(), start.getMilliseconds());\n kendoDate.adjustDST(end, hours);\n }\n rule._startPeriod = new Date(start);\n rule._endPeriod = endPeriodByFreq(start, rule);\n }\n durationMS = event.duration();\n var allDayCompensation = event.isAllDay ? 86400000 : 0;\n rule._startTime = startTime = kendoDate.toInvariantTime(start);\n if (freq.setup) {\n freq.setup(rule, eventStart, start);\n }\n freq.limit(start, end, rule);\n while (start <= end) {\n endDate = new Date(start);\n setTime(endDate, durationMS);\n var inPeriodCheckEndDate = new Date(start);\n setTime(inPeriodCheckEndDate, durationMS + allDayCompensation);\n inPeriod = start >= startPeriod || inPeriodCheckEndDate > startPeriod;\n if (inPeriod && !isException(exceptionDates, start, zone) || positions) {\n startTime = kendoDate.toUtcTime(kendoDate.getDate(start)) + getMilliseconds(rule._startTime);\n endTime = startTime + durationMS;\n if (eventStartMS !== start.getTime() || eventStartTime !== getMilliseconds(rule._startTime)) {\n var startZone = event.startTimezone || event.endTimezone;\n var endZone = event.endTimezone || event.startTimezone;\n if (!event.isAllDay) {\n if (zone && startZone || !zone && !startZone) {\n var startOffsetDiff = getZoneOffset(start, zone) - getZoneOffset(event.start, zone);\n var endOffsetDiff = getZoneOffset(endDate, zone) - getZoneOffset(event.end, zone);\n var startTZOffsetDiff = getZoneOffset(start, startZone) - getZoneOffset(event.start, startZone);\n var endTZOffsetDiff = getZoneOffset(endDate, endZone) - getZoneOffset(event.end, endZone);\n if (startOffsetDiff !== startTZOffsetDiff) {\n var offsetTicksStart = (startOffsetDiff - startTZOffsetDiff) * 60000;\n shiftedStart = new Date(start.getTime() - offsetTicksStart);\n shiftedStartTime = startTime - offsetTicksStart;\n }\n if (endOffsetDiff !== endTZOffsetDiff) {\n var offsetTicksEnd = (endOffsetDiff - endTZOffsetDiff) * 60000;\n shiftedEnd = new Date(endDate.getTime() - offsetTicksEnd);\n shifterEndTime = endTime - offsetTicksEnd;\n }\n }\n }\n events.push(event.toOccurrence({\n start: shiftedStart || new Date(start),\n end: shiftedEnd || endDate,\n _startTime: shiftedStartTime || startTime,\n _endTime: shifterEndTime || endTime\n }));\n shiftedStart = shiftedEnd = shiftedStartTime = shifterEndTime = null;\n } else {\n event._startTime = startTime;\n event._endTime = endTime;\n events.push(event);\n }\n }\n if (positions) {\n freq.next(start, rule);\n freq.limit(start, end, rule);\n if (start > rule._endPeriod) {\n periodEvents = eventsByPosition(events.slice(currentIdx), eventStart, positions);\n periodEvents = removeExceptionDates(periodEvents, exceptionDates, zone);\n events = events.slice(0, currentIdx).concat(periodEvents);\n rule._endPeriod = endPeriodByFreq(start, rule);\n currentIdx = events.length;\n }\n if (count && count === currentIdx) {\n break;\n }\n } else {\n if (count && count === currentIdx) {\n break;\n }\n currentIdx += 1;\n var isMissingDSTHour = isDSTMissingHour(start);\n freq.next(start, rule);\n if (isMissingDSTHour && rule.freq !== 'hourly' && kendoDate.toInvariantTime(event.start).getTime() !== kendoDate.toInvariantTime(start).getTime()) {\n rule._startTime = startTime = new Date(start.getTime() - 3600000);\n }\n freq.limit(start, end, rule);\n }\n }\n return events;\n }\n function isDSTMissingHour(date) {\n var dateOffset = date.getTimezoneOffset();\n var dateMinusHour = new Date(date.getTime() - 3600000);\n var dateMinusHourOffset = dateMinusHour.getTimezoneOffset();\n return dateOffset < dateMinusHourOffset;\n }\n function getZoneOffset(date, zone) {\n return zone ? kendo.timezone.offset(date, zone) : date.getTimezoneOffset();\n }\n function parseUTCDate(value, zone) {\n value = kendo.parseDate(value, DATE_FORMATS);\n if (value && zone) {\n value = timezone.apply(value, zone);\n }\n return value;\n }\n function parseDateRule(dateRule, zone) {\n var pairs = dateRule.split(';');\n var pair;\n var property;\n var value;\n var tzid;\n var valueIdx, valueLength;\n for (var idx = 0, length = pairs.length; idx < length; idx++) {\n pair = pairs[idx].split(':');\n property = pair[0];\n value = pair[1];\n if (property.indexOf('TZID') !== -1) {\n tzid = property.substring(property.indexOf('TZID')).split('=')[1];\n }\n if (value) {\n value = value.split(',');\n for (valueIdx = 0, valueLength = value.length; valueIdx < valueLength; valueIdx++) {\n value[valueIdx] = parseUTCDate(value[valueIdx], tzid || zone);\n }\n }\n }\n if (value) {\n return {\n value: value,\n tzid: tzid\n };\n }\n }\n function parseRule(recur, zone, offsets) {\n var instance = {};\n var splits, value;\n var idx = 0, length;\n var ruleValue = false;\n var rule, part, parts;\n var property, weekStart, weekDays;\n var predicate = function (a, b) {\n var day1 = a.day, day2 = b.day;\n if (day1 < weekStart) {\n day1 += 7;\n }\n if (day2 < weekStart) {\n day2 += 7;\n }\n return day1 - day2;\n };\n if (!recur) {\n return null;\n }\n parts = recur.split('\\n');\n if (!parts[1] && (recur.indexOf('DTSTART') !== -1 || recur.indexOf('DTEND') !== -1 || recur.indexOf('EXDATE') !== -1)) {\n parts = recur.split(' ');\n }\n for (idx = 0, length = parts.length; idx < length; idx++) {\n part = kendo.trim(parts[idx]);\n if (part.indexOf('DTSTART') !== -1) {\n instance.start = parseDateRule(part, zone);\n } else if (part.indexOf('DTEND') !== -1) {\n instance.end = parseDateRule(part, zone);\n } else if (part.indexOf('EXDATE') !== -1) {\n instance.exdates = parseDateRule(part, zone);\n } else if (part.indexOf('RRULE') !== -1) {\n rule = part.substring(6);\n } else if (kendo.trim(part)) {\n rule = part;\n }\n }\n rule = rule.split(';');\n for (idx = 0, length = rule.length; idx < length; idx++) {\n property = rule[idx];\n splits = property.split('=');\n value = kendo.trim(splits[1]).split(',');\n switch (kendo.trim(splits[0]).toUpperCase()) {\n case 'FREQ':\n instance.freq = value[0].toLowerCase();\n break;\n case 'UNTIL':\n instance.until = parseUTCDate(value[0], zone);\n break;\n case 'COUNT':\n instance.count = parseInt(value[0], 10);\n break;\n case 'INTERVAL':\n instance.interval = parseInt(value[0], 10);\n break;\n case 'BYSECOND':\n instance.seconds = parseArray(value, {\n start: 0,\n end: 60\n });\n ruleValue = true;\n break;\n case 'BYMINUTE':\n instance.minutes = parseArray(value, {\n start: 0,\n end: 59\n });\n ruleValue = true;\n break;\n case 'BYHOUR':\n instance.hours = parseArray(value, {\n start: 0,\n end: 23\n });\n ruleValue = true;\n break;\n case 'BYMONTHDAY':\n instance.monthDays = parseArray(value, {\n start: -31,\n end: 31\n });\n ruleValue = true;\n break;\n case 'BYYEARDAY':\n instance.yearDays = parseArray(value, {\n start: -366,\n end: 366\n });\n ruleValue = true;\n break;\n case 'BYMONTH':\n instance.months = parseArray(value, {\n start: 1,\n end: 12\n });\n ruleValue = true;\n break;\n case 'BYDAY':\n instance.weekDays = weekDays = parseWeekDayList(value);\n ruleValue = true;\n break;\n case 'BYWEEKNO':\n instance.weeks = parseArray(value, {\n start: -53,\n end: 53\n });\n ruleValue = true;\n break;\n case 'BYSETPOS':\n instance.positions = parseArray(value, {\n start: -366,\n end: 366\n });\n break;\n case 'WKST':\n instance.weekStart = weekStart = WEEK_DAYS_IDX[value[0]];\n break;\n }\n }\n if (instance.freq === undefined || instance.count !== undefined && instance.until) {\n return null;\n }\n if (!instance.interval) {\n instance.interval = 1;\n }\n if (weekStart === undefined) {\n instance.weekStart = weekStart = kendo.culture().calendar.firstDay;\n }\n if (weekDays) {\n instance.weekDays = weekDays.sort(predicate);\n }\n if (instance.positions && !ruleValue) {\n instance.positions = null;\n }\n instance._hasRuleValue = ruleValue;\n instance.offsets = offsets;\n return instance;\n }\n function serializeDateRule(dateRule, zone) {\n var value = dateRule.value;\n var tzid = dateRule.tzid || '';\n var length = value.length;\n var idx = 0;\n var val;\n for (; idx < length; idx++) {\n val = value[idx];\n val = timezone.convert(val, tzid || zone || val.getTimezoneOffset(), 'Etc/UTC');\n value[idx] = kendo.toString(val, 'yyyyMMddTHHmmssZ');\n }\n if (tzid) {\n tzid = ';TZID=' + tzid;\n }\n return tzid + ':' + value.join(',') + ' ';\n }\n function serialize(rule, zone) {\n var weekStart = rule.weekStart;\n var ruleString = 'FREQ=' + rule.freq.toUpperCase();\n var exdates = rule.exdates || '';\n var start = rule.start || '';\n var end = rule.end || '';\n var until = rule.until;\n if (rule.interval > 1) {\n ruleString += ';INTERVAL=' + rule.interval;\n }\n if (rule.count) {\n ruleString += ';COUNT=' + rule.count;\n }\n if (until) {\n until = timezone.convert(until, zone || until.getTimezoneOffset(), 'Etc/UTC');\n ruleString += ';UNTIL=' + kendo.toString(until, 'yyyyMMddTHHmmssZ');\n }\n if (rule.months) {\n ruleString += ';BYMONTH=' + rule.months;\n }\n if (rule.weeks) {\n ruleString += ';BYWEEKNO=' + rule.weeks;\n }\n if (rule.yearDays) {\n ruleString += ';BYYEARDAY=' + rule.yearDays;\n }\n if (rule.monthDays) {\n ruleString += ';BYMONTHDAY=' + rule.monthDays;\n }\n if (rule.weekDays) {\n ruleString += ';BYDAY=' + serializeWeekDayList(rule.weekDays);\n }\n if (rule.hours) {\n ruleString += ';BYHOUR=' + rule.hours;\n }\n if (rule.minutes) {\n ruleString += ';BYMINUTE=' + rule.minutes;\n }\n if (rule.seconds) {\n ruleString += ';BYSECOND=' + rule.seconds;\n }\n if (rule.positions) {\n ruleString += ';BYSETPOS=' + rule.positions;\n }\n if (weekStart !== undefined) {\n ruleString += ';WKST=' + WEEK_DAYS[weekStart];\n }\n if (start) {\n start = 'DTSTART' + serializeDateRule(start, zone);\n }\n if (end) {\n end = 'DTEND' + serializeDateRule(end, zone);\n }\n if (exdates) {\n exdates = 'EXDATE' + serializeDateRule(exdates, zone);\n }\n if (start || end || exdates) {\n ruleString = start + end + exdates + 'RRULE:' + ruleString;\n }\n return ruleString;\n }\n kendo.recurrence = {\n rule: {\n parse: parseRule,\n serialize: serialize\n },\n expand: expand,\n dayInYear: dayInYear,\n weekInYear: weekInYear,\n weekInMonth: weekInMonth,\n numberOfWeeks: numberOfWeeks,\n isException: isException,\n toExceptionString: toExceptionString\n };\n var RECURRENCE_VIEW_TEMPLATE = kendo.template('# if (frequency !== \"never\") { #' + '
' + '