{"version":3,"sources":["kendo.rating.js"],"names":["f","define","$","undefined","kendo","window","ui","NS","Widget","extend","proxy","keys","parseFloat","CHANGE","SELECT","SELECTED","HOVERED","DISABLED","READONLY","KEYDOWN","CLICK","MOUSEENTER","MOUSELEAVE","MOUSEMOVE","MOUSEDOWN","FOCUS","BLUR","ARIA_LABEL","ARIA_LABELLEDBY","ARIA_VALUEMIN","ARIA_VALUEMAX","ARIA_VALUENOW","ARIA_DISABLED","ARIA_READONLY","PRECISION_PART","PRECISION_COMPLEMENT","PRECISION_HALF_VALUE","LABELIDPART","KITEM","FOCUSED","TABINDEX","DOT","ROLE","MIN","MAX","ratingSelection","single","continuous","ratingPrecision","item","half","ratingItemTemplates","hovered","selected","ratingItemStates","hoveredPrecise","ratingItemAttributes","partValue","dataValue","value","title","ratingStyles","widget","container","icon","iconSelected","label","disabled","readonly","active","hidden","RATING_TEMPLATE","template","RATING_CONTAINER_TEMPLATE","RATING_LABEL_WRAPPER_TEMPLATE","RATING_LABEL_TEMPLATE","RATING_ITEM_WRAPPER_TEMPLATE","RATING_ITEM_TEMPLATE","Rating","init","element","options","that","this","fn","call","_element","_wrapper","_aria","_initSettings","_renderItems","_renderTooltip","_renderLabel","_selectInitial","_attachEvents","notify","events","name","messages","min","max","selection","precision","tooltip","enabled","selectValueOnFocus","itemTemplate","selectedTemplate","hoveredTemplate","addClass","wrapper","styles","wrap","parent","className","replace","append","style","cssText","find","labelId","id","attr","labelFor","ariaLabel","ariaLabelledBy","length","guid","isPrecise","val","_valueMin","_setState","i","itemWrapper","index","items","removeAttr","data","html","_format","maxValue","remove","isNaN","isHalfPrecision","on","_focus","_blur","_keydown","_click","_mouseenter","_mouseleave","_mousedown","_mousemove","selectedElement","hoveredElement","itemToFocus","focusedItems","firstElement","children","first","preventFocus","removeClass","last","blur","e","left","right","itemValue","currentValue","parsedValue","step","focusableItems","focusedElement","currentIndex","isRtl","support","isEmpty","keyCode","RIGHT","LEFT","DOWN","eq","_select","preventDefault","UP","HOME","END","_getTemplateType","type","_renderTemplate","target","defaultIcon","_updateItemTemplates","state","isSingle","previousSelection","currentSelection","prevAll","addBack","resetItems","nextAll","templateType","stateClass","get","_change","newValue","trigger","oldValue","closest","valueToSelect","enableMove","is","hasPart","setTemplate","currentItem","Math","ceil","hasClass","_togglePrecisionElements","mousePosition","itemOffset","partSize","clientX","offset","abs","_updatePrecisionElements","isFraction","itemSize","part","partTemplate","_getItemWidth","width","css","height","display","_createUpdatePrecisionComplement","isHalf","complement","iconElement","dir","_calculateItemWidthFromStyles","itemPart","itemWidth","halfWidth","halfOffset","outerWidth","_updateElement","elementValue","_updateItemsRendering","updateTemplate","valueItem","toggleClass","toString","getCulture","round","reset","enable","setOptions","empty","destroy","off","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,gBACH,aACA,aACDD,IACL,WAugBE,MA/fC,UAAUE,EAAGC,GAAb,GACOC,GAAQC,OAAOD,MAAOE,EAAKF,EAAME,GAAIC,EAAK,eAAgBC,EAASF,EAAGE,OAAQC,EAASP,EAAEO,OAAQC,EAAQR,EAAEQ,MAAOC,EAAOP,EAAMO,KAAMC,EAAaR,EAAMQ,WAAYC,EAAS,SAAUC,EAAS,SAAUC,EAAW,WAAYC,EAAU,UAAWC,EAAW,WAAYC,EAAW,WAAYC,EAAU,UAAYZ,EAAIa,EAAQ,QAAUb,EAAIc,EAAa,aAAed,EAAIe,EAAa,aAAef,EAAIgB,EAAY,YAAchB,EAAIiB,EAAY,YAAcjB,EAAIkB,EAAQ,QAAUlB,EAAImB,EAAO,OAASnB,EAAIoB,EAAa,aAAcC,EAAkB,kBAAmBC,EAAgB,gBAAiBC,EAAgB,gBAAiBC,EAAgB,gBAAiBC,EAAgB,gBAAiBC,EAAgB,gBAAiBC,EAAiB,0BAA2BC,EAAuB,gCAAiCC,EAAuB,GAAKC,EAAc,SAAUC,EAAQ,gBAAiBC,EAAU,kBAAm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B,SAEpBvB,EAAQb,WAAajE,GACrB+E,EAAKd,SAASa,EAAQb,UAEtBa,EAAQf,QAAU/D,GAClB+E,EAAKU,eAELX,EAAQsB,UAAYpG,GACpB+E,EAAKS,iBAELV,EAAQtB,QAAUxD,GAClB+E,EAAKvB,MAAMsB,EAAQtB,QAEnBsB,EAAQkB,KAAOlB,EAAQmB,MAAQjG,GAAa8E,EAAQyB,eAAiBvG,GAAa8E,EAAQ0B,mBAAqBxG,GAAa8E,EAAQ2B,kBAAoBzG,KACxJ+E,EAAKnB,UAAUmM,QACfhL,EAAKQ,eACLR,EAAKU,eACLV,EAAKS,iBACLT,EAAKW,mBAGbsK,QAAS,WACL,GAAIjL,GAAOC,IACXD,GAAK4B,QAAQsJ,IAAI7P,GACjB2E,EAAKnB,UAAUqM,IAAI7P,GACnBC,EAAO4E,GAAG+K,QAAQ9K,KAAKH,KAG/B5E,GAAG+P,OAAOvL,KACZzE,OAAOD,MAAMkQ,QACRjQ,OAAOD,OACE,kBAAVH,SAAwBA,OAAOsQ,IAAMtQ,OAAS,SAAUuQ,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.rating.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.rating', [\n 'kendo.core',\n 'kendo.dom'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'rating',\n name: 'Rating',\n category: 'web',\n description: 'The Rating component.',\n depends: ['core']\n };\n (function ($, undefined) {\n var kendo = window.kendo, ui = kendo.ui, NS = '.kendoRating', Widget = ui.Widget, extend = $.extend, proxy = $.proxy, keys = kendo.keys, parseFloat = kendo.parseFloat, CHANGE = 'change', SELECT = 'select', SELECTED = 'selected', HOVERED = 'hovered', DISABLED = 'disabled', READONLY = 'readonly', KEYDOWN = 'keydown' + NS, CLICK = 'click' + NS, MOUSEENTER = 'mouseenter' + NS, MOUSELEAVE = 'mouseleave' + NS, MOUSEMOVE = 'mousemove' + NS, MOUSEDOWN = 'mousedown' + NS, FOCUS = 'focus' + NS, BLUR = 'blur' + NS, ARIA_LABEL = 'aria-label', ARIA_LABELLEDBY = 'aria-labelledby', ARIA_VALUEMIN = 'aria-valuemin', ARIA_VALUEMAX = 'aria-valuemax', ARIA_VALUENOW = 'aria-valuenow', ARIA_DISABLED = 'aria-disabled', ARIA_READONLY = 'aria-readonly', PRECISION_PART = 'k-rating-precision-part', PRECISION_COMPLEMENT = 'k-rating-precision-complement', PRECISION_HALF_VALUE = 0.5, LABELIDPART = '_label', KITEM = 'k-rating-item', FOCUSED = 'k-state-focused', TABINDEX = 'tabindex', DOT = '.', ROLE = 'role', MIN = 'min', MAX = 'max';\n var ratingSelection = {\n single: 'single',\n continuous: 'continuous'\n };\n var ratingPrecision = {\n item: 'item',\n half: 'half'\n };\n var ratingItemTemplates = {\n item: 'itemTemplate',\n hovered: 'hoveredTemplate',\n selected: 'selectedTemplate'\n };\n var ratingItemStates = {\n selected: 'k-state-selected',\n hovered: 'k-state-hover',\n hoveredPrecise: 'k-state-hover-precise'\n };\n var ratingItemAttributes = {\n partValue: 'part-value',\n dataValue: 'data-value',\n value: 'value',\n title: 'title'\n };\n var ratingStyles = {\n widget: 'k-rating k-widget',\n container: 'k-rating-container',\n item: 'k-rating-item',\n icon: 'k-icon k-i-star-outline',\n iconSelected: 'k-icon k-i-star',\n label: 'k-rating-label',\n disabled: 'k-state-disabled',\n readonly: 'k-state-readonly',\n active: 'k-state-active',\n hidden: 'k-hidden'\n };\n var RATING_TEMPLATE = kendo.template('');\n var RATING_CONTAINER_TEMPLATE = kendo.template('');\n var RATING_LABEL_WRAPPER_TEMPLATE = kendo.template('');\n var RATING_LABEL_TEMPLATE = kendo.template('#=value# / #=maxValue#');\n var RATING_ITEM_WRAPPER_TEMPLATE = kendo.template('');\n var RATING_ITEM_TEMPLATE = kendo.template('');\n var Rating = Widget.extend({\n init: function (element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n that.options = extend({}, that.options, options);\n that._element();\n that._wrapper();\n that._aria();\n that._initSettings();\n that._renderItems();\n that._renderTooltip();\n that._renderLabel();\n that._selectInitial();\n that._attachEvents();\n kendo.notify(this);\n },\n events: [\n SELECT,\n CHANGE\n ],\n options: {\n name: 'Rating',\n messages: {},\n min: 1,\n max: 5,\n selection: ratingSelection.continuous,\n precision: ratingPrecision.item,\n tooltip: true,\n label: true,\n readonly: false,\n enabled: true,\n selectValueOnFocus: null,\n itemTemplate: null,\n selectedTemplate: null,\n hoveredTemplate: null\n },\n _element: function () {\n var that = this;\n that.element.addClass(ratingStyles.hidden);\n },\n _wrapper: function () {\n var that = this;\n that.wrapper = $(RATING_TEMPLATE({ styles: ratingStyles }));\n that.wrapper = that.element.wrap(that.wrapper).parent();\n that.wrapper.addClass(that.element[0].className.replace(ratingStyles.hidden, '')).append($(RATING_CONTAINER_TEMPLATE({ styles: ratingStyles })));\n that.wrapper[0].style.cssText = that.element[0].style.cssText;\n that.container = that.wrapper.find(DOT + ratingStyles.container);\n },\n _aria: function () {\n var that = this, wrapper = that.wrapper, element = that.element, id = element.attr('id'), labelFor = $('label[for=\"' + id + '\"]'), ariaLabel = element.attr(ARIA_LABEL), ariaLabelledBy = element.attr(ARIA_LABELLEDBY);\n that.wrapper.attr(TABINDEX, 0).attr(ROLE, 'slider').attr(ARIA_VALUEMIN, parseFloat(that.element.attr(MIN)) || that.options.min).attr(ARIA_VALUEMAX, parseFloat(that.element.attr(MAX)) || that.options.max).attr(ARIA_VALUENOW, that.options.value);\n if (ariaLabel) {\n wrapper.attr(ARIA_LABEL, ariaLabel);\n } else if (ariaLabelledBy) {\n wrapper.attr(ARIA_LABELLEDBY, ariaLabelledBy);\n } else if (labelFor.length) {\n var labelId = labelFor.attr('id');\n if (!labelId) {\n labelId = (id || kendo.guid()) + LABELIDPART;\n labelFor.attr('id', labelId);\n }\n wrapper.attr(ARIA_LABELLEDBY, labelId);\n }\n },\n _initSettings: function () {\n var that = this, isPrecise = that.options.precision != ratingPrecision.item, options = that.options;\n options.value = parseFloat(options.value);\n if (options.value === null) {\n options.value = parseFloat(that.element.val());\n }\n options.min = parseFloat(that.element.attr(MIN)) || that.options.min;\n options.max = parseFloat(that.element.attr(MAX)) || that.options.max;\n that._valueMin = isPrecise ? that.options.min - PRECISION_HALF_VALUE : that.options.min;\n options.enabled = options.enabled && !that.element.attr(DISABLED);\n options.readonly = options.readonly || !!that.element.attr(READONLY);\n that._setState();\n },\n _renderItems: function () {\n var that = this, container = that.container, min = that.options.min, max = that.options.max, itemTemplate = that.options.itemTemplate ? kendo.template(that.options.itemTemplate) : RATING_ITEM_TEMPLATE;\n for (var i = min; i <= max; i += 1) {\n var itemWrapper = $(RATING_ITEM_WRAPPER_TEMPLATE({\n styles: ratingStyles,\n value: i\n }));\n itemWrapper.append(itemTemplate({\n icon: ratingStyles.icon,\n index: i\n }));\n container.append(itemWrapper);\n }\n },\n _renderTooltip: function () {\n var that = this, items = that.container.find(DOT + KITEM), enabled = that.options.tooltip === true;\n if (!enabled) {\n items.removeAttr(ratingItemAttributes.title);\n return;\n }\n for (var i = 0; i < items.length; i += 1) {\n $(items[i]).attr(ratingItemAttributes.title, $(items[i]).data(ratingItemAttributes.value));\n }\n },\n _renderLabel: function () {\n var that = this, label = that.wrapper.find(DOT + ratingStyles.label), enabled = that.options.label === true || that.options.label.template !== undefined, template = that.options.label && that.options.label.template ? kendo.template(that.options.label.template) : RATING_LABEL_TEMPLATE;\n if (!enabled || that.value() === null) {\n label.remove();\n that.label = null;\n return;\n }\n if (!label.length) {\n that.label = label = $(RATING_LABEL_WRAPPER_TEMPLATE({ styles: ratingStyles }));\n that.wrapper.append(label);\n }\n label.html(template({\n styles: ratingStyles,\n value: that.value() % 1 === 0 ? that.value() : that._format(that.value()),\n maxValue: that.options.max\n }));\n },\n _selectInitial: function () {\n var that = this;\n if (!isNaN(that.options.value)) {\n that.value(that.options.value);\n }\n },\n _attachEvents: function () {\n var that = this, isHalfPrecision = that.options.precision == ratingPrecision.half;\n that.wrapper.on(FOCUS, proxy(that._focus, that)).on(BLUR, proxy(that._blur, that)).on(KEYDOWN, proxy(that._keydown, that));\n that.container.on(CLICK, DOT + KITEM, proxy(that._click, that)).on(MOUSEENTER, DOT + KITEM, proxy(that._mouseenter, that)).on(MOUSELEAVE, DOT + KITEM, proxy(that._mouseleave, that)).on(MOUSEDOWN, proxy(that._mousedown, that));\n if (isHalfPrecision) {\n that.container.on(MOUSEMOVE, DOT + KITEM, proxy(that._mousemove, that));\n }\n },\n _focus: function () {\n var that = this, container = that.container, wrapper = that.wrapper, focusedItems = that.container.find(DOT + FOCUSED), selectValueOnFocus = that.options.selectValueOnFocus, firstElement = container.children().first(), selectedElement, hoveredElement, itemToFocus;\n if (!that.options.enabled || that.options.readonly || that.preventFocus) {\n if (that.options.readonly) {\n that.wrapper.addClass(FOCUSED);\n }\n return;\n }\n wrapper.addClass(FOCUSED);\n focusedItems.removeClass(FOCUSED);\n if (that.value() === null && selectValueOnFocus !== null) {\n that.value(selectValueOnFocus);\n }\n selectedElement = container.find(DOT + ratingItemStates.selected).last();\n hoveredElement = container.find(DOT + ratingItemStates.hovered).last();\n itemToFocus = selectedElement.length ? selectedElement : hoveredElement;\n itemToFocus = itemToFocus.length ? itemToFocus : firstElement;\n itemToFocus.addClass(FOCUSED);\n },\n _blur: function () {\n var that = this;\n that.preventFocus = false;\n that.wrapper.removeClass(FOCUSED);\n that.container.find(DOT + FOCUSED).removeClass(FOCUSED);\n that.element.blur();\n },\n _mousedown: function () {\n var that = this;\n that.preventFocus = true;\n },\n _keydown: function (e) {\n var that = this, container = that.container, currentValue = that.parsedValue, isPrecise = that.options.precision != ratingPrecision.item, step = isPrecise ? PRECISION_HALF_VALUE : 1, focusableItems = container.find(DOT + KITEM), focusedElement = container.find(DOT + FOCUSED), currentIndex = focusableItems.index(focusedElement), isRtl = kendo.support.isRtl(that.wrapper), isEmpty = isNaN(currentValue), keyCode = e.keyCode, left, right, itemToFocus, itemValue;\n if (!that.options.enabled || that.options.readonly) {\n return;\n }\n left = keyCode === keys.RIGHT && isRtl || keyCode === keys.LEFT && !isRtl;\n right = keyCode === keys.LEFT && isRtl || keyCode === keys.RIGHT && !isRtl;\n if (left || keyCode === keys.DOWN) {\n itemToFocus = isEmpty ? focusableItems.eq(0) : $(focusableItems[currentIndex - 1]);\n itemValue = isEmpty ? that._valueMin : currentValue - step;\n that._select(itemToFocus, itemValue);\n e.preventDefault();\n } else if (right || keyCode === keys.UP) {\n itemToFocus = isEmpty ? focusableItems.eq(0) : $(focusableItems[currentIndex + 1]);\n itemValue = isEmpty ? that._valueMin : currentValue + step;\n that._select(itemToFocus, itemValue);\n e.preventDefault();\n } else if (keyCode === keys.HOME) {\n itemToFocus = focusableItems.eq(0);\n that._select(itemToFocus, that._valueMin);\n e.preventDefault();\n } else if (keyCode === keys.END) {\n itemToFocus = focusableItems.eq(focusableItems.length - 1);\n that._select(itemToFocus);\n e.preventDefault();\n }\n },\n _getTemplateType: function (type) {\n var that = this, template;\n if (that.options[type]) {\n template = kendo.template(that.options[type]);\n } else {\n template = RATING_ITEM_TEMPLATE;\n }\n return template;\n },\n _renderTemplate: function (target, type) {\n var that = this, template = that._getTemplateType(type), defaultIcon = ratingStyles.icon;\n if (type == ratingItemTemplates.selected || type == ratingItemTemplates.hovered) {\n defaultIcon = ratingStyles.iconSelected;\n }\n for (var i = 0; i < target.length; i += 1) {\n $(target[i]).html(template({\n icon: defaultIcon,\n index: $(target[i]).index()\n }));\n }\n },\n _updateItemTemplates: function (state, target) {\n var that = this, isSingle = ratingSelection.single == that.options.selection, isHalfPrecision = that.options.precision == ratingPrecision.half, previousSelection = that.container.find(DOT + ratingItemStates.selected), currentSelection = isSingle ? target : target.prevAll().addBack(), resetItems = isSingle ? previousSelection : target.nextAll(), templateType = ratingItemTemplates[state], stateClass = ratingItemStates[state];\n resetItems.removeClass(stateClass);\n currentSelection.addClass(stateClass);\n that._renderTemplate(currentSelection, templateType);\n if (!isSingle || isSingle && state == SELECTED && currentSelection.get(0) != previousSelection.get(0)) {\n that._renderTemplate(resetItems, ratingItemTemplates.item);\n }\n if (isHalfPrecision) {\n that._renderTemplate(target, ratingItemTemplates.item);\n }\n },\n _change: function (target, newValue) {\n var that = this, currentValue = that.value();\n that.value(newValue);\n that.trigger(CHANGE, {\n target: target,\n oldValue: currentValue,\n newValue: that.value()\n });\n },\n _click: function (e) {\n var that = this, target = $(e.target).closest(DOT + KITEM), valueToSelect = target.attr(ratingItemAttributes.dataValue);\n if (!that.options.enabled || that.options.readonly) {\n return;\n }\n if (target.data(ratingItemAttributes.partValue)) {\n valueToSelect = target.data(ratingItemAttributes.partValue);\n }\n that._select(target, valueToSelect);\n },\n _select: function (target, newValue) {\n var that = this, value = isNaN(newValue) ? target.attr(ratingItemAttributes.dataValue) : newValue;\n if (value == that.value() || value < that._valueMin || value > that.options.max) {\n return;\n }\n that.trigger(SELECT, { target: target });\n that._change(target, value);\n that._focus();\n },\n _mouseenter: function (e) {\n var that = this, target = $(e.target), item = target.closest(DOT + KITEM);\n if (!that.options.enabled || that.options.readonly) {\n return;\n }\n that.enableMove = true;\n if (target.is(DOT + KITEM)) {\n that._updateItemTemplates(HOVERED, item);\n }\n },\n _mouseleave: function (e) {\n var that = this, selection = that.options.selection, isHalfPrecision = that.options.precision == ratingPrecision.half, isSingle = selection == ratingSelection.single, item = $(e.target).closest(DOT + KITEM), items = that.container.find(DOT + KITEM), hasPart, template;\n that.enableMove = false;\n var setTemplate = function (item) {\n hasPart = that.parsedValue % 1 !== 0 && item.is(that.container.find('[data-value=' + Math.ceil(that.parsedValue) + ']'));\n template = (item.hasClass(ratingItemStates.selected) || item.hasClass(ratingItemStates.hovered)) && !hasPart ? ratingItemTemplates.selected : ratingItemTemplates.item;\n that._renderTemplate(item, template);\n if (isHalfPrecision && hasPart && item.hasClass(ratingItemStates.selected)) {\n that._togglePrecisionElements(item, SELECTED);\n }\n };\n items.removeClass(ratingItemStates.hovered);\n if (isSingle) {\n setTemplate(item);\n } else {\n for (var i = 0; i < items.length; i += 1) {\n var currentItem = $(items[i]);\n setTemplate(currentItem);\n }\n }\n },\n _mousemove: function (e) {\n var that = this, item = $(e.target).closest(DOT + KITEM), mousePosition, itemOffset, partSize;\n if (!that.enableMove) {\n return;\n }\n if (item.length) {\n mousePosition = e.clientX;\n itemOffset = item.offset().left;\n partSize = Math.abs(mousePosition - itemOffset);\n that._togglePrecisionElements(item, HOVERED);\n that._updatePrecisionElements(item, partSize);\n }\n e.preventDefault();\n },\n _togglePrecisionElements: function (item, templateType) {\n var that = this, part = item.find(DOT + PRECISION_PART), partTemplate = that._getTemplateType(ratingItemTemplates[templateType]), isFraction, itemSize;\n if (!part.length) {\n isFraction = that.parsedValue % 1 !== 0;\n itemSize = that._getItemWidth(item);\n part = $('').addClass(PRECISION_PART);\n part.append(partTemplate({ icon: ratingStyles.iconSelected }));\n part.width(isFraction ? itemSize / 2 : itemSize);\n item.append(part);\n item.append($('').css({\n 'width': itemSize,\n 'height': itemSize,\n 'display': 'block'\n }));\n that._createUpdatePrecisionComplement(item, isFraction);\n } else {\n part.html(partTemplate({ icon: ratingStyles.iconSelected }));\n }\n },\n _createUpdatePrecisionComplement: function (item, isHalf) {\n var that = this, complement = item.find(DOT + PRECISION_COMPLEMENT), iconElement = item.children().first(), isRtl = kendo.support.isRtl(that.wrapper), dir = !isRtl ? 'left' : 'right';\n if (!complement.length) {\n complement = iconElement.wrap($('').addClass(PRECISION_COMPLEMENT)).parent();\n }\n complement.width(isHalf ? that._getItemWidth(item) / 2 : 0);\n complement.css(dir, isHalf || isRtl ? '50%' : 0);\n },\n _calculateItemWidthFromStyles: function (item) {\n if (!item) {\n return;\n }\n return parseFloat(item.find('.k-icon').css('font-size'));\n },\n _getItemWidth: function (item) {\n if (!item) {\n return;\n }\n return item.width() || this._calculateItemWidthFromStyles(item) || 0;\n },\n _updatePrecisionElements: function (item, partSize) {\n var that = this, itemPart = item.find(DOT + PRECISION_PART), itemValue = kendo.parseFloat(item.data(ratingItemAttributes.value)), isRtl = kendo.support.isRtl(this.wrapper), itemWidth = item.width(), halfWidth = itemWidth / 2, halfOffset = parseFloat(item.outerWidth() / 2), isHalf = !isRtl ? partSize < halfOffset : partSize > halfOffset;\n if (item.length && itemPart.length) {\n itemPart.width(isHalf ? halfWidth : itemWidth);\n if (this.options.tooltip) {\n item.attr(ratingItemAttributes.title, isHalf ? that._format(itemValue - PRECISION_HALF_VALUE) : itemValue);\n }\n item.data(ratingItemAttributes.partValue, isHalf ? itemValue - PRECISION_HALF_VALUE : itemValue);\n that._createUpdatePrecisionComplement(item, isHalf);\n }\n },\n _updateElement: function (value) {\n var that = this, elementValue = value === null ? '' : value;\n that.element.val(that._format(elementValue));\n if (that.value === null) {\n that.wrapper.removeAttr(ARIA_VALUENOW);\n } else {\n that.wrapper.attr(ARIA_VALUENOW, that._format(value));\n }\n },\n _updateItemsRendering: function (value) {\n var that = this, isHalfPrecision = that.options.precision == ratingPrecision.half, updateTemplate = value === null ? 'item' : SELECTED, valueItem = value === null ? that.container.find(DOT + ratingItemStates.selected).last() : that.container.find(DOT + KITEM + '[data-value=\\'' + Math.ceil(value) + '\\']');\n if (value === null) {\n that.container.find(DOT + KITEM).removeClass(ratingItemStates.selected);\n }\n that._updateItemTemplates(updateTemplate, valueItem);\n if (isHalfPrecision && value !== null) {\n that._togglePrecisionElements(valueItem, SELECTED);\n }\n that._renderLabel();\n },\n _setState: function () {\n var that = this, element = that.element, wrapper = that.wrapper, readonly = that.options.readonly, enabled = that.options.enabled;\n if (readonly && enabled) {\n element.attr(READONLY, READONLY);\n wrapper.attr(ARIA_READONLY, true);\n } else {\n element.removeAttr(READONLY);\n wrapper.removeAttr(ARIA_READONLY);\n }\n if (enabled) {\n element.removeAttr(DISABLED);\n wrapper.removeAttr(ARIA_DISABLED);\n wrapper.attr(TABINDEX, 0);\n } else {\n element.attr(DISABLED, DISABLED);\n wrapper.attr(ARIA_DISABLED, true);\n wrapper.removeAttr(TABINDEX);\n }\n wrapper.toggleClass(ratingStyles.disabled, !enabled);\n wrapper.toggleClass(ratingStyles.readonly, readonly && enabled);\n },\n _format: function (value) {\n return kendo.toString(value, 'n1', kendo.getCulture().name);\n },\n value: function (value) {\n var that = this, isHalfPrecision = that.options.precision == ratingPrecision.half;\n if (value === null) {\n that._updateElement(value);\n that._updateItemsRendering(value);\n return;\n }\n value = parseFloat(value);\n if (value === null) {\n value = parseFloat(that.element.val());\n return value;\n }\n value = Math.max(that._valueMin, Math.min(value, that.options.max));\n if (isHalfPrecision) {\n that.parsedValue = parseFloat(that._format(Math.ceil(value * 2) / 2));\n } else {\n that.parsedValue = Math.round(value);\n }\n that._updateElement(value);\n that._updateItemsRendering(value);\n },\n reset: function () {\n var that = this;\n that.value(null);\n },\n enable: function (enable) {\n var that = this;\n if (typeof enable == 'undefined') {\n enable = true;\n }\n that.options.enabled = enable;\n that.options.readonly = false;\n that._setState();\n },\n readonly: function (readonly) {\n var that = this;\n if (typeof readonly == 'undefined') {\n readonly = true;\n }\n that.options.readonly = readonly;\n that.options.enabled = true;\n that._setState();\n },\n setOptions: function (options) {\n var that = this;\n that.options = $.extend(that.options, options);\n if (options.enabled !== undefined) {\n that.enable(options.enabled);\n }\n if (options.readonly !== undefined) {\n that.readonly(options.readonly);\n }\n if (options.label !== undefined) {\n that._renderLabel();\n }\n if (options.tooltip !== undefined) {\n that._renderTooltip();\n }\n if (options.value !== undefined) {\n that.value(options.value);\n }\n if (options.min || options.max !== undefined || options.itemTemplate !== undefined || options.selectedTemplate !== undefined || options.hoveredTemplate !== undefined) {\n that.container.empty();\n that._renderItems();\n that._renderLabel();\n that._renderTooltip();\n that._selectInitial();\n }\n },\n destroy: function () {\n var that = this;\n that.wrapper.off(NS);\n that.container.off(NS);\n Widget.fn.destroy.call(that);\n }\n });\n ui.plugin(Rating);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}