{"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","parseRule","recurrenceRule","clone","recurrenceException","exdates","set","frequencies","until","getHours","getMinutes","getSeconds","_startPeriod","kendoDate","_endPeriod","duration","_startTime","toInvariantTime","setup","limit","setTime","toUtcTime","toOccurrence","_endTime","next","slice","parseDate","DATE_FORMATS","parseDateRule","dateRule","pair","property","tzid","valueIdx","pairs","recur","splits","part","parts","instance","predicate","day1","day2","trim","toLowerCase","monthDays","yearDays","months","weeks","culture","calendar","firstDay","_hasRuleValue","serializeDateRule","val","serialize","ruleString","weekDayCheckBoxes","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","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","weekDayRules","hourRules","startHours","minuteRules","currentMinutes","secondRules","BaseFrequency","extend","options","this","_hour","ruleName","firstRule","modified","current","startTimeHours","frequency","MS_PER_HOUR","MS_PER_MINUTE","MS_PER_DAY","_date","HourlyFrequency","fn","DailyFrequency","WeeklyFrequency","eventStartDate","MonthlyFrequency","YearlyFrequency","hourly","daily","weekly","monthly","yearly","CLICK","recurrence","parse","shortNames","namesShort","values","template","init","element","that","call","wrapper","today","_namespace","name","spinners","mobile","messages","never","repeatEvery","repeatOn","of","label","mobileLabel","after","occurrence","on","offsetPositions","first","second","third","fourth","last","weekdays","weekday","weekend","_initInterval","_value","_container","find","kendoNumericTextBox","decimals","format","min","change","_trigger","_weekDayRule","clear","_weekDay","_weekDayOffset","_weekDayView","weekDayOffset","weekDayValue","method","weekDayOffsetWidget","_initWeekDay","data","weekdayMessage","offsetMessage","weekDayInput","dataTextField","dataValueField","dataSource","text","map","names","dayName","_initWeekDays","i","l","filter","checkbox","checked","_initMonthDay","monthDayInput","_monthDay","NumericTextBox","max","_initCount","input","_count","_initUntil","_until","kendoDatePicker","trigger","_initFrequency","_initContainer","destroy","_frequency","off","select","_initView","container","editContainer","parent","insertAfter","append","ddl","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","_initRepeatEnd","_defaultValue","animations","left","right","cancel","update","endTitle","repeatTitle","headerTitle","patterns","repeatBy","dayOfMonth","dayOfWeek","every","_destroyView","_endFields","_repeatButton","preventDefault","_createView","navigate","endLabelField","endEditField","add","toggleClass","_endButton","_endText","frequencyMessages","ns","_view","li","addClass","siblings","removeClass","children","attr","_initRepeatView","_initEndNavigation","endMessages","_initEndView","viewType","returnViewId","view","id","stopPropagation","hasClass","one","remove","endPattern","weekDaySelect","_options","monthSelect","monthNames","_monthSelect","currentValue","repeatRuleGroupButton","weekDayView","monthDayView","weekDayName","hide","show","support","optionLabel","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,8BACH,qBACA,mBACA,wBACDD,IACL,WAutEE,MA3sEC,UAAUE,EAAGC,GA2fV,QAASC,GAAeC,EAAMC,GAC1B,GAAIC,EASJ,OARa,KAATF,GAAcA,EAAOC,EACrBC,EAASD,EAAWD,GAEpBE,EAASF,EAAOC,EACZC,IACAA,EAASD,EAAWC,IAGrBA,EAEX,QAASC,GAAUC,GAAnB,GACQC,GAAQD,EAAKE,WACbC,EAAOC,EAASJ,GAAQK,GAAiBJ,GAASK,GAAaL,EACnE,OAAOE,GAAOH,EAAKO,UAEvB,QAASC,GAAWR,EAAMS,GACtB,GAAIC,GAAMP,CAYV,OAXAH,GAAO,GAAIW,MAAKX,EAAKY,cAAeZ,EAAKE,WAAYF,EAAKO,WAC1DM,EAAUb,EAAM,GAChBU,EAAOV,EAAKY,cACRH,IAAcf,GACdoB,EAAad,EAAMS,MACnBT,EAAKe,QAAQf,EAAKO,UAAY,IAE9BP,EAAKe,QAAQf,EAAKO,WAAa,GAAKP,EAAKgB,UAAY,KAEz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AAO,eAAeoO,GAAG,SAAU,WAC9HjQ,EAAK2G,MAAQjD,EAAMmE,UAAUkF,KAAK3L,MAAO,gBAG/BkS,EAAMI,iBAChBxC,IAAKA,EACL9P,MAAOuF,GAAS9E,EAChBsP,OAAQ,WACJnR,EAAK2G,MAAQoG,KAAK3L,WAEvB2Q,KAAK,oBAGhBoI,SAAU,SAAUpI,EAAMgJ,GAAhB,GACF/Z,GAAM,EACNyT,EAAO,GACP3T,EAASiR,EAAKjR,OACd+N,EAAW9B,KAAK8J,eAOpB,KANIkE,IACAtG,GAAQ5F,GACJzN,MAAO,GACPkR,KAAMyI,KAGP/Z,EAAMF,EAAQE,IACjByT,GAAQ5F,EAASkD,EAAK/Q,GAE1B,OAAOyT,MAGf/J,EAAGkM,OAAOrM,IACZC,OAAO9G,MAAMsX,QACRxQ,OAAO9G,OACE,kBAAV9F,SAAwBA,OAAOqd,IAAMrd,OAAS,SAAUsd,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 ], 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 ],\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, 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 30,\n 31,\n 30,\n 31,\n 30,\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;\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 weekDays = rule.weekDays;\n var weekStart = rule.weekStart;\n var weekDayRules = ruleWeekValues(weekDays, date, weekStart);\n var hours = date.getHours();\n var weekDayRule, day;\n if (weekDayRules === null) {\n return false;\n }\n weekDayRule = weekDayRules[0];\n if (!weekDayRule) {\n weekDayRule = weekDays[0];\n setDayOfWeek(date, weekStart);\n }\n day = weekDayRule.day;\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.ceil(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 diff = (current.getFullYear() - start.getFullYear()) * 52;\n excess = weekInYear(current, weekStart) - weekInYear(start, weekStart) + diff;\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 _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';\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 = parseRule(event.recurrenceRule, zone), startTime, endTime, endDate, hours, minutes, seconds, durationMS, startPeriod, inPeriod, ruleStart, ruleEnd, useEventStart, freqName, exceptionDates, eventStartTime, eventStartMS, eventStart, count, freq, positions, currentIdx, periodEvents, events = [];\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) {\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 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 inPeriod = start >= startPeriod || endDate > 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 events.push(event.toOccurrence({\n start: new Date(start),\n end: endDate,\n _startTime: startTime,\n _endTime: endTime\n }));\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 freq.next(start, rule);\n freq.limit(start, end, rule);\n }\n }\n return events;\n }\n function parseUTCDate(value, zone) {\n value = kendo.parseDate(value, DATE_FORMATS);\n if (value && zone) {\n value = timezone.convert(value, value.getTimezoneOffset(), 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) {\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 = $.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 ($.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 = $.trim(splits[1]).split(',');\n switch ($.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 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 weekDayCheckBoxes = function (firstDay) {\n var shortNames = kendo.culture().calendar.days.namesShort, length = shortNames.length, result = '', idx = 0, values = [];\n for (; idx < length; idx++) {\n values.push(idx);\n }\n shortNames = shortNames.slice(firstDay).concat(shortNames.slice(0, firstDay));\n values = values.slice(firstDay).concat(values.slice(0, firstDay));\n for (idx = 0; idx < length; idx++) {\n result += '';\n }\n return result;\n };\n var RECURRENCE_VIEW_TEMPLATE = kendo.template('# if (frequency !== \"never\") { #' + '
' + '
#:messages.interval#
' + '# } #' + '# if (frequency === \"weekly\") { #' + '
' + '
#=weekDayCheckBoxes(firstWeekDay)#
' + '# } else if (frequency === \"monthly\") { #' + '
' + '
' + '' + '
' + '# } else if (frequency === \"yearly\") { #' + '
' + '
' + '' + '
' + '# } #' + '# if (frequency !== \"never\") { #' + '
' + '
' + '' + '
' + '# } #');\n var DAY_RULE = [\n {\n day: 0,\n offset: 0\n },\n {\n day: 1,\n offset: 0\n },\n {\n day: 2,\n offset: 0\n },\n {\n day: 3,\n offset: 0\n },\n {\n day: 4,\n offset: 0\n },\n {\n day: 5,\n offset: 0\n },\n {\n day: 6,\n offset: 0\n }\n ];\n var WEEKDAY_RULE = [\n {\n day: 1,\n offset: 0\n },\n {\n day: 2,\n offset: 0\n },\n {\n day: 3,\n offset: 0\n },\n {\n day: 4,\n offset: 0\n },\n {\n day: 5,\n offset: 0\n }\n ];\n var WEEKEND_RULE = [\n {\n day: 0,\n offset: 0\n },\n {\n day: 6,\n offset: 0\n }\n ];\n var BaseRecurrenceEditor = Widget.extend({\n init: function (element, options) {\n var start;\n var that = this;\n var frequencies = options && options.frequencies;\n Widget.fn.init.call(that, element, options);\n that.wrapper = that.element;\n options = that.options;\n options.start = start = options.start || kendoDate.today();\n if (frequencies) {\n options.frequencies = frequencies;\n }\n if (typeof start === 'string') {\n options.start = kendo.parseDate(start, 'yyyyMMddTHHmmss');\n }\n if (options.firstWeekDay === null) {\n options.firstWeekDay = kendo.culture().calendar.firstDay;\n }\n that._namespace = '.' + options.name;\n },\n options: {\n value: '',\n start: '',\n timezone: '',\n spinners: true,\n firstWeekDay: null,\n frequencies: [\n 'never',\n 'daily',\n 'weekly',\n 'monthly',\n 'yearly'\n ],\n mobile: false,\n messages: {\n frequencies: {\n never: 'Never',\n hourly: 'Hourly',\n daily: 'Daily',\n weekly: 'Weekly',\n monthly: 'Monthly',\n yearly: 'Yearly'\n },\n hourly: {\n repeatEvery: 'Repeat every: ',\n interval: ' hour(s)'\n },\n daily: {\n repeatEvery: 'Repeat every: ',\n interval: ' day(s)'\n },\n weekly: {\n interval: ' week(s)',\n repeatEvery: 'Repeat every: ',\n repeatOn: 'Repeat on: '\n },\n monthly: {\n repeatEvery: 'Repeat every: ',\n repeatOn: 'Repeat on: ',\n interval: ' month(s)',\n day: 'Day '\n },\n yearly: {\n repeatEvery: 'Repeat every: ',\n repeatOn: 'Repeat on: ',\n interval: ' year(s)',\n of: ' of '\n },\n end: {\n label: 'End:',\n mobileLabel: 'Ends',\n never: 'Never',\n after: 'After ',\n occurrence: ' occurrence(s)',\n on: 'On '\n },\n offsetPositions: {\n first: 'first',\n second: 'second',\n third: 'third',\n fourth: 'fourth',\n last: 'last'\n },\n weekdays: {\n day: 'day',\n weekday: 'weekday',\n weekend: 'weekend day'\n }\n }\n },\n events: ['change'],\n _initInterval: function () {\n var that = this;\n var rule = that._value;\n that._container.find('.k-recur-interval').kendoNumericTextBox({\n spinners: that.options.spinners,\n value: rule.interval || 1,\n decimals: 0,\n format: '#',\n min: 1,\n change: function () {\n rule.interval = this.value();\n that._trigger();\n }\n });\n },\n _weekDayRule: function (clear) {\n var that = this;\n var weekday = (that._weekDay.element || that._weekDay).val();\n var offset = Number((that._weekDayOffset.element || that._weekDayOffset).val());\n var weekDays = null;\n var positions = null;\n if (!clear) {\n if (weekday === 'day') {\n weekDays = DAY_RULE;\n positions = offset;\n } else if (weekday === 'weekday') {\n weekDays = WEEKDAY_RULE;\n positions = offset;\n } else if (weekday === 'weekend') {\n weekDays = WEEKEND_RULE;\n positions = offset;\n } else {\n weekDays = [{\n offset: offset,\n day: Number(weekday)\n }];\n }\n }\n that._value.weekDays = weekDays;\n that._value.positions = positions;\n },\n _weekDayView: function () {\n var that = this;\n var weekDays = that._value.weekDays;\n var positions = that._value.positions;\n var weekDayOffsetWidget = that._weekDayOffset;\n var weekDayOffset;\n var weekDayValue;\n var length;\n var method;\n if (weekDays) {\n length = weekDays.length;\n if (positions) {\n if (length === 7) {\n weekDayValue = 'day';\n weekDayOffset = positions;\n } else if (length === 5) {\n weekDayValue = 'weekday';\n weekDayOffset = positions;\n } else if (length === 2) {\n weekDayValue = 'weekend';\n weekDayOffset = positions;\n }\n }\n if (!weekDayValue) {\n weekDays = weekDays[0];\n weekDayValue = weekDays.day;\n weekDayOffset = weekDays.offset || '';\n }\n method = weekDayOffsetWidget.value ? 'value' : 'val';\n weekDayOffsetWidget[method](weekDayOffset);\n that._weekDay[method](weekDayValue);\n }\n },\n _initWeekDay: function () {\n var that = this, data;\n var weekdayMessage = that.options.messages.weekdays;\n var offsetMessage = that.options.messages.offsetPositions;\n var weekDayInput = that._container.find('.k-recur-weekday');\n var change = function () {\n that._weekDayRule();\n that._trigger();\n };\n if (weekDayInput[0]) {\n that._weekDayOffset = new DropDownList(that._container.find('.k-recur-weekday-offset'), {\n change: change,\n dataTextField: 'text',\n dataValueField: 'value',\n dataSource: [\n {\n text: offsetMessage.first,\n value: '1'\n },\n {\n text: offsetMessage.second,\n value: '2'\n },\n {\n text: offsetMessage.third,\n value: '3'\n },\n {\n text: offsetMessage.fourth,\n value: '4'\n },\n {\n text: offsetMessage.last,\n value: '-1'\n }\n ]\n });\n data = [\n {\n text: weekdayMessage.day,\n value: 'day'\n },\n {\n text: weekdayMessage.weekday,\n value: 'weekday'\n },\n {\n text: weekdayMessage.weekend,\n value: 'weekend'\n }\n ];\n that._weekDay = new DropDownList(weekDayInput, {\n value: that.options.start.getDay(),\n change: change,\n dataTextField: 'text',\n dataValueField: 'value',\n dataSource: data.concat($.map(kendo.culture().calendar.days.names, function (dayName, idx) {\n return {\n text: dayName,\n value: idx\n };\n }))\n });\n that._weekDayView();\n }\n },\n _initWeekDays: function () {\n var that = this;\n var rule = that._value;\n var weekDays = that._container.find('.k-recur-weekday-checkbox');\n if (weekDays[0]) {\n weekDays.on(CLICK + that._namespace, function () {\n rule.weekDays = $.map(weekDays.filter(':checked'), function (checkbox) {\n return {\n day: Number(checkbox.value),\n offset: 0\n };\n });\n if (!that.options.mobile) {\n that._trigger();\n }\n });\n if (rule.weekDays) {\n var idx, weekDay;\n var i = 0, l = weekDays.length;\n var length = rule.weekDays.length;\n for (; i < l; i++) {\n weekDay = weekDays[i];\n for (idx = 0; idx < length; idx++) {\n if (weekDay.value == rule.weekDays[idx].day) {\n weekDay.checked = true;\n }\n }\n }\n }\n }\n },\n _initMonthDay: function () {\n var that = this;\n var rule = that._value;\n var monthDayInput = that._container.find('.k-recur-monthday');\n if (monthDayInput[0]) {\n that._monthDay = new kendo.ui.NumericTextBox(monthDayInput, {\n spinners: that.options.spinners,\n min: 1,\n max: 31,\n decimals: 0,\n format: '#',\n value: rule.monthDays ? rule.monthDays[0] : that.options.start.getDate(),\n change: function () {\n var value = this.value();\n rule.monthDays = value ? [value] : value;\n that._trigger();\n }\n });\n }\n },\n _initCount: function () {\n var that = this, input = that._container.find('.k-recur-count'), rule = that._value;\n that._count = input.kendoNumericTextBox({\n spinners: that.options.spinners,\n value: rule.count || 1,\n decimals: 0,\n format: '#',\n min: 1,\n change: function () {\n rule.count = this.value();\n that._trigger();\n }\n }).data('kendoNumericTextBox');\n },\n _initUntil: function () {\n var that = this, input = that._container.find('.k-recur-until'), start = that.options.start, rule = that._value, until = rule.until;\n that._until = input.kendoDatePicker({\n min: until && until < start ? until : start,\n value: until || new Date(start.getFullYear(), start.getMonth(), start.getDate(), 23, 59, 59),\n change: function () {\n var date = this.value();\n rule.until = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59);\n that._trigger();\n }\n }).data('kendoDatePicker');\n },\n _trigger: function () {\n if (!this.options.mobile) {\n this.trigger('change');\n }\n }\n });\n var RecurrenceEditor = BaseRecurrenceEditor.extend({\n init: function (element, options) {\n var that = this;\n BaseRecurrenceEditor.fn.init.call(that, element, options);\n that._initFrequency();\n that._initContainer();\n that.value(that.options.value);\n },\n options: { name: 'RecurrenceEditor' },\n events: ['change'],\n destroy: function () {\n var that = this;\n that._frequency.destroy();\n that._container.find('input[type=radio],input[type=checkbox]').off(CLICK + that._namespace);\n kendo.destroy(that._container);\n BaseRecurrenceEditor.fn.destroy.call(that);\n },\n value: function (value) {\n var that = this;\n var timezone = that.options.timezone;\n var freq;\n if (value === undefined) {\n if (!that._value.freq) {\n return '';\n }\n return serialize(that._value, timezone);\n }\n that._value = parseRule(value, timezone) || {};\n freq = that._value.freq;\n if (freq) {\n that._frequency.value(freq);\n } else {\n that._frequency.select(0);\n }\n that._initView(that._frequency.value());\n },\n _initContainer: function () {\n var element = this.element, container = $('
'), editContainer = element.parent('.k-edit-field');\n if (editContainer[0]) {\n container.insertAfter(editContainer);\n } else {\n element.append(container);\n }\n this._container = container;\n },\n _initFrequency: function () {\n var that = this, options = that.options, frequencies = options.frequencies, messages = options.messages.frequencies, ddl = $(''), frequency;\n frequencies = $.map(frequencies, function (frequency) {\n return {\n text: messages[frequency],\n value: frequency\n };\n });\n frequency = frequencies[0];\n if (frequency && frequency.value === 'never') {\n frequency.value = '';\n }\n that.element.append(ddl);\n that._frequency = new DropDownList(ddl, {\n dataTextField: 'text',\n dataValueField: 'value',\n dataSource: frequencies,\n change: function () {\n that._value = {};\n that._initView(that._frequency.value());\n that.trigger('change');\n }\n });\n },\n _initView: function (frequency) {\n var that = this;\n var rule = that._value;\n var options = that.options;\n var data = {\n frequency: frequency || 'never',\n weekDayCheckBoxes: weekDayCheckBoxes,\n firstWeekDay: options.firstWeekDay,\n messages: options.messages[frequency],\n end: options.messages.end\n };\n kendo.destroy(that._container);\n that._container.html(RECURRENCE_VIEW_TEMPLATE(data));\n if (!frequency) {\n that._value = {};\n return;\n }\n rule.freq = frequency;\n if (frequency === 'weekly' && !rule.weekDays) {\n rule.weekDays = [{\n day: options.start.getDay(),\n offset: 0\n }];\n }\n that._initInterval();\n that._initWeekDays();\n that._initMonthDay();\n that._initWeekDay();\n that._initMonth();\n that._initCount();\n that._initUntil();\n that._period();\n that._end();\n },\n _initMonth: function () {\n var that = this;\n var rule = that._value;\n var month = rule.months || [that.options.start.getMonth() + 1];\n var monthInputs = that._container.find('.k-recur-month');\n var options;\n if (monthInputs[0]) {\n options = {\n change: function () {\n rule.months = [Number(this.value())];\n that.trigger('change');\n },\n dataTextField: 'text',\n dataValueField: 'value',\n dataSource: $.map(kendo.culture().calendar.months.names, function (monthName, idx) {\n return {\n text: monthName,\n value: idx + 1\n };\n })\n };\n that._month1 = new DropDownList(monthInputs[0], options);\n that._month2 = new DropDownList(monthInputs[1], options);\n if (month) {\n month = month[0];\n that._month1.value(month);\n that._month2.value(month);\n }\n }\n },\n _end: function () {\n var that = this;\n var rule = that._value;\n var container = that._container;\n var namespace = that._namespace;\n var click = function (e) {\n that._toggleEnd(e.currentTarget.value);\n that.trigger('change');\n };\n var endRule;\n that._buttonNever = container.find('.k-recur-end-never').on(CLICK + namespace, click);\n that._buttonCount = container.find('.k-recur-end-count').on(CLICK + namespace, click);\n that._buttonUntil = container.find('.k-recur-end-until').on(CLICK + namespace, click);\n if (rule.count) {\n endRule = 'count';\n } else if (rule.until) {\n endRule = 'until';\n }\n that._toggleEnd(endRule);\n },\n _period: function () {\n var that = this;\n var rule = that._value;\n var monthly = rule.freq === 'monthly';\n var toggleRule = monthly ? that._toggleMonthDay : that._toggleYear;\n var selector = '.k-recur-' + (monthly ? 'month' : 'year') + '-radio';\n var radioButtons = that._container.find(selector);\n if (!monthly && rule.freq !== 'yearly') {\n return;\n }\n radioButtons.on(CLICK + that._namespace, function (e) {\n toggleRule.call(that, e.currentTarget.value);\n that.trigger('change');\n });\n that._buttonMonthDay = radioButtons.eq(0);\n that._buttonWeekDay = radioButtons.eq(1);\n toggleRule.call(that, rule.weekDays ? 'weekday' : 'monthday');\n },\n _toggleEnd: function (endRule) {\n var that = this;\n var count, until;\n var enableCount, enableUntil;\n if (endRule === 'count') {\n that._buttonCount.prop('checked', true);\n enableCount = true;\n enableUntil = false;\n count = that._count.value();\n until = null;\n } else if (endRule === 'until') {\n that._buttonUntil.prop('checked', true);\n enableCount = false;\n enableUntil = true;\n count = null;\n until = that._until.value();\n } else {\n that._buttonNever.prop('checked', true);\n enableCount = enableUntil = false;\n count = until = null;\n }\n that._count.enable(enableCount);\n that._until.enable(enableUntil);\n that._value.count = count;\n that._value.until = until;\n },\n _toggleMonthDay: function (monthRule) {\n var that = this;\n var enableMonthDay = false;\n var enableWeekDay = true;\n var clear = false;\n var monthDays;\n if (monthRule === 'monthday') {\n that._buttonMonthDay.prop('checked', true);\n monthDays = [that._monthDay.value()];\n enableMonthDay = true;\n enableWeekDay = false;\n clear = true;\n } else {\n that._buttonWeekDay.prop('checked', true);\n monthDays = null;\n }\n that._weekDay.enable(enableWeekDay);\n that._weekDayOffset.enable(enableWeekDay);\n that._monthDay.enable(enableMonthDay);\n that._value.monthDays = monthDays;\n that._weekDayRule(clear);\n },\n _toggleYear: function (yearRule) {\n var that = this;\n var enableMonth1 = false;\n var enableMonth2 = true;\n var month;\n if (yearRule === 'monthday') {\n enableMonth1 = true;\n enableMonth2 = false;\n month = that._month1.value();\n } else {\n month = that._month2.value();\n }\n that._month1.enable(enableMonth1);\n that._month2.enable(enableMonth2);\n that._value.months = [month];\n that._toggleMonthDay(yearRule);\n }\n });\n ui.plugin(RecurrenceEditor);\n var RECURRENCE_HEADER_TEMPLATE = kendo.template('
' + '
' + '
');\n var RECURRENCE_REPEAT_PATTERN_TEMPLATE = kendo.template('# if (frequency !== \"never\") { #' + '
' + '
#:messages.interval#
' + '# } #' + '# if (frequency === \"weekly\") { #' + '
' + '
#=weekDayCheckBoxes(firstWeekDay)#
' + '# } else if (frequency === \"monthly\") { #' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '# } else if (frequency === \"yearly\") { #' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '
' + '# } #');\n var RECURRENCE_END_PATTERN_TEMPLATE = kendo.template('# if (endPattern === \"count\") { #' + '
' + '
' + '# } else if (endPattern === \"until\") { #' + '
' + '
' + '# } #');\n var RECURRENCE_GROUP_BUTTON_TEMPLATE = kendo.template('');\n var MobileRecurrenceEditor = BaseRecurrenceEditor.extend({\n init: function (element, options) {\n var that = this;\n BaseRecurrenceEditor.fn.init.call(that, element, options);\n options = that.options;\n that._optionTemplate = kendo.template('');\n that.value(options.value);\n that._pane = options.pane;\n that._initRepeatButton();\n that._initRepeatEnd();\n that._defaultValue = that._value;\n },\n options: {\n name: 'MobileRecurrenceEditor',\n animations: {\n left: 'slide',\n right: 'slide:right'\n },\n mobile: true,\n messages: {\n cancel: 'Cancel',\n update: 'Save',\n endTitle: 'Repeat ends',\n repeatTitle: 'Repeat pattern',\n headerTitle: 'Repeat event',\n end: {\n patterns: {\n never: 'Never',\n after: 'After...',\n on: 'On...'\n },\n never: 'Never',\n after: 'End repeat after',\n on: 'End repeat on'\n },\n daily: { interval: '' },\n hourly: { interval: '' },\n weekly: { interval: '' },\n monthly: {\n interval: '',\n repeatBy: 'Repeat by: ',\n dayOfMonth: 'Day of the month',\n dayOfWeek: 'Day of the week',\n repeatEvery: 'Repeat every',\n every: 'Every',\n day: 'Day '\n },\n yearly: {\n interval: '',\n repeatBy: 'Repeat by: ',\n dayOfMonth: 'Day of the month',\n dayOfWeek: 'Day of the week',\n repeatEvery: 'Repeat every: ',\n every: 'Every',\n month: 'Month',\n day: 'Day'\n }\n }\n },\n events: ['change'],\n value: function (value) {\n var that = this;\n var timezone = that.options.timezone;\n if (value === undefined) {\n if (!that._value.freq) {\n return '';\n }\n return serialize(that._value, timezone);\n }\n that._value = parseRule(value, timezone) || {};\n },\n destroy: function () {\n this._destroyView();\n kendo.destroy(this._endFields);\n this._repeatButton.off(CLICK + this._namespace);\n BaseRecurrenceEditor.fn.destroy.call(this);\n },\n _initRepeatButton: function () {\n var that = this;\n var freq = that.options.messages.frequencies[this._value.freq || 'never'];\n that._repeatButton = $('' + freq + '').on(CLICK + that._namespace, function (e) {\n e.preventDefault();\n that._createView('repeat');\n that._pane.navigate('recurrence', that.options.animations.left);\n });\n that.element.append(that._repeatButton);\n },\n _initRepeatEnd: function () {\n var that = this;\n var endLabelField = $('
').insertAfter(that.element.parent('.k-edit-field'));\n var endEditField = $('
').on(CLICK + that._namespace, function (e) {\n e.preventDefault();\n if (!that._value.freq) {\n return;\n }\n that._createView('end');\n that._pane.navigate('recurrence', that.options.animations.left);\n }).insertAfter(endLabelField);\n that._endFields = endLabelField.add(endEditField).toggleClass('k-state-disabled', !that._value.freq);\n that._endButton = endEditField.find('.k-scheduler-recur-end').text(that._endText());\n },\n _endText: function () {\n var rule = this._value;\n var messages = this.options.messages.end;\n var text = messages.never;\n if (rule.count) {\n text = kendo.format('{0} {1}', messages.after, rule.count);\n } else if (rule.until) {\n text = kendo.format('{0} {1:d}', messages.on, rule.until);\n }\n return text;\n },\n _initFrequency: function () {\n var that = this;\n var frequencyMessages = that.options.messages.frequencies;\n var html = RECURRENCE_GROUP_BUTTON_TEMPLATE({\n dataSource: $.map(this.options.frequencies, function (frequency) {\n return {\n text: frequencyMessages[frequency],\n value: frequency !== 'never' ? frequency : ''\n };\n }),\n value: that._value.freq || '',\n ns: kendo.ns\n });\n that._view.element.find('.k-recur-pattern').append(html).on(CLICK + that._namespace, '.k-scheduler-navigation li', function (e) {\n var li = $(this);\n e.preventDefault();\n li.addClass('k-state-selected').siblings().removeClass('k-state-selected');\n that._value = { freq: li.children('a').attr(kendo.attr('value')) };\n that._initRepeatView();\n });\n },\n _initEndNavigation: function () {\n var that = this;\n var endMessages = that.options.messages.end.patterns;\n var rule = that._value;\n var value = '';\n if (rule.count) {\n value = 'count';\n } else if (rule.until) {\n value = 'until';\n }\n var html = RECURRENCE_GROUP_BUTTON_TEMPLATE({\n dataSource: [\n {\n text: endMessages.never,\n value: ''\n },\n {\n text: endMessages.after,\n value: 'count'\n },\n {\n text: endMessages.on,\n value: 'until'\n }\n ],\n value: value,\n ns: kendo.ns\n });\n that._view.element.find('.k-recur-pattern').append(html).on(CLICK + that._namespace, '.k-scheduler-navigation li', function (e) {\n var li = $(this);\n var count = null;\n var until = null;\n e.preventDefault();\n li.addClass('k-state-selected').siblings().removeClass('k-state-selected');\n that._initEndView(li.children('a').attr(kendo.attr('value')));\n if (that._count) {\n count = that._count.value();\n until = null;\n } else if (that._until) {\n count = null;\n until = that._until.val ? kendo.parseDate(that._until.val(), 'yyyy-MM-dd') : that._until.value();\n }\n rule.count = count;\n rule.until = until;\n });\n },\n _createView: function (viewType) {\n var that = this;\n var options = that.options;\n var messages = options.messages;\n var headerTitle = messages[viewType === 'repeat' ? 'repeatTitle' : 'endTitle'];\n var html = '
' + '
' + '' + messages.cancel + '' + messages.headerTitle + '' + messages.update + '' + '
';\n var returnViewId = that._pane.view().id;\n that._view = that._pane.append(html + RECURRENCE_HEADER_TEMPLATE({ headerTitle: headerTitle }));\n that._view.element.on(CLICK + that._namespace, 'a.k-scheduler-cancel, a.k-scheduler-update', function (e) {\n e.preventDefault();\n e.stopPropagation();\n if ($(this).hasClass('k-scheduler-update')) {\n that.trigger('change');\n that._defaultValue = $.extend({}, that._value);\n } else {\n that._value = that._defaultValue;\n }\n var frequency = that._value.freq;\n that._endButton.text(that._endText());\n that._endFields.toggleClass('k-state-disabled', !frequency);\n that._repeatButton.text(messages.frequencies[frequency || 'never']);\n that._pane.one('viewShow', function () {\n that._destroyView();\n });\n that._pane.navigate(returnViewId, that.options.animations.right);\n });\n that._container = that._view.element.find('.k-recur-view');\n if (viewType === 'repeat') {\n that._initFrequency();\n that._initRepeatView();\n } else {\n that._initEndNavigation();\n that._initEndView();\n }\n },\n _destroyView: function () {\n if (this._view) {\n this._view.destroy();\n this._view.element.remove();\n }\n this._view = null;\n },\n _initRepeatView: function () {\n var that = this;\n var frequency = that._value.freq || 'never';\n var data = {\n frequency: frequency,\n weekDayCheckBoxes: weekDayCheckBoxes,\n firstWeekDay: that.options.firstWeekDay,\n messages: that.options.messages[frequency]\n };\n var html = RECURRENCE_REPEAT_PATTERN_TEMPLATE(data);\n var container = that._container;\n var rule = that._value;\n kendo.destroy(container);\n container.html(html);\n if (!html) {\n that._value = {};\n return;\n }\n if (frequency === 'weekly' && !rule.weekDays) {\n rule.weekDays = [{\n day: that.options.start.getDay(),\n offset: 0\n }];\n }\n that._initInterval();\n that._initMonthDay();\n that._initWeekDays();\n that._initWeekDay();\n that._initMonth();\n that._period();\n },\n _initEndView: function (endPattern) {\n var that = this;\n var rule = that._value;\n if (endPattern === undefined) {\n if (rule.count) {\n endPattern = 'count';\n } else if (rule.until) {\n endPattern = 'until';\n }\n }\n var data = {\n endPattern: endPattern,\n messages: that.options.messages.end\n };\n kendo.destroy(that._container);\n that._container.html(RECURRENCE_END_PATTERN_TEMPLATE(data));\n that._initCount();\n that._initUntil();\n },\n _initWeekDay: function () {\n var that = this, data;\n var weekdayMessage = that.options.messages.weekdays;\n var offsetMessage = that.options.messages.offsetPositions;\n var weekDaySelect = that._container.find('.k-recur-weekday');\n var change = function () {\n that._weekDayRule();\n that.trigger('change');\n };\n if (weekDaySelect[0]) {\n that._weekDayOffset = that._container.find('.k-recur-weekday-offset').html(that._options([\n {\n text: offsetMessage.first,\n value: '1'\n },\n {\n text: offsetMessage.second,\n value: '2'\n },\n {\n text: offsetMessage.third,\n value: '3'\n },\n {\n text: offsetMessage.fourth,\n value: '4'\n },\n {\n text: offsetMessage.last,\n value: '-1'\n }\n ])).change(change);\n data = [\n {\n text: weekdayMessage.day,\n value: 'day'\n },\n {\n text: weekdayMessage.weekday,\n value: 'weekday'\n },\n {\n text: weekdayMessage.weekend,\n value: 'weekend'\n }\n ];\n data = data.concat($.map(kendo.culture().calendar.days.names, function (dayName, idx) {\n return {\n text: dayName,\n value: idx\n };\n }));\n that._weekDay = weekDaySelect.html(that._options(data)).change(change).val(that.options.start.getDay());\n that._weekDayView();\n }\n },\n _initMonth: function () {\n var that = this;\n var rule = that._value;\n var start = that.options.start;\n var month = rule.months || [start.getMonth() + 1];\n var monthSelect = that._container.find('.k-recur-month');\n var monthNames = kendo.culture().calendar.months.names;\n if (monthSelect[0]) {\n var data = $.map(monthNames, function (monthName, idx) {\n return {\n text: monthName,\n value: idx + 1\n };\n });\n monthSelect.html(that._options(data)).change(function () {\n rule.months = [Number(this.value)];\n });\n that._monthSelect = monthSelect;\n if (month) {\n monthSelect.val(month[0]);\n }\n }\n },\n _period: function () {\n var that = this;\n var rule = that._value;\n var container = that._container;\n var messages = that.options.messages[rule.freq];\n var repeatRuleGroupButton = container.find('.k-repeat-rule');\n var weekDayView = container.find('.k-weekday-view');\n var monthDayView = container.find('.k-monthday-view');\n if (repeatRuleGroupButton[0]) {\n var currentValue = rule.weekDays ? 'weekday' : 'monthday';\n var html = RECURRENCE_GROUP_BUTTON_TEMPLATE({\n value: currentValue,\n dataSource: [\n {\n text: messages.dayOfMonth,\n value: 'monthday'\n },\n {\n text: messages.dayOfWeek,\n value: 'weekday'\n }\n ],\n ns: kendo.ns\n });\n var init = function (val) {\n var weekDayName = that._weekDay.val();\n var weekDayOffset = that._weekDayOffset.val();\n var monthDay = that._monthDay.value();\n var month = that._monthSelect ? that._monthSelect.val() : null;\n if (val === 'monthday') {\n rule.weekDays = null;\n rule.monthDays = monthDay ? [monthDay] : monthDay;\n rule.months = month ? [Number(month)] : month;\n weekDayView.hide();\n monthDayView.show();\n } else {\n rule.monthDays = null;\n rule.months = month ? [Number(month)] : month;\n rule.weekDays = [{\n offset: Number(weekDayOffset),\n day: Number(weekDayName)\n }];\n weekDayView.show();\n monthDayView.hide();\n }\n };\n repeatRuleGroupButton.append(html).on(CLICK + that._namespace, '.k-scheduler-navigation li', function (e) {\n var li = $(this).addClass('k-state-selected');\n e.preventDefault();\n li.siblings().removeClass('k-state-selected');\n var value = li.children('a').attr(kendo.attr('value'));\n init(value);\n });\n init(currentValue);\n }\n },\n _initUntil: function () {\n var that = this;\n var input = that._container.find('.k-recur-until');\n var start = that.options.start;\n var rule = that._value;\n var until = rule.until;\n var min = until && until < start ? until : start;\n if (kendo.support.input.date) {\n that._until = input.attr('min', kendo.toString(min, 'yyyy-MM-dd')).val(kendo.toString(until || start, 'yyyy-MM-dd')).on('change', function () {\n rule.until = kendo.parseDate(this.value, 'yyyy-MM-dd');\n });\n } else {\n that._until = input.kendoDatePicker({\n min: min,\n value: until || start,\n change: function () {\n rule.until = this.value();\n }\n }).data('kendoDatePicker');\n }\n },\n _options: function (data, optionLabel) {\n var idx = 0;\n var html = '';\n var length = data.length;\n var template = this._optionTemplate;\n if (optionLabel) {\n html += template({\n value: '',\n text: optionLabel\n });\n }\n for (; idx < length; idx++) {\n html += template(data[idx]);\n }\n return html;\n }\n });\n ui.plugin(MobileRecurrenceEditor);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"],"sourceRoot":"/source/"}