{"version":3,"sources":["kendo.progressbar.js"],"names":["f","define","$","undefined","kendo","window","ui","Widget","HORIZONTAL","VERTICAL","DEFAULTMIN","DEFAULTMAX","DEFAULTVALUE","DEFAULTCHUNKCOUNT","KPROGRESSBAR","KPROGRESSBARREVERSE","KPROGRESSBARINDETERMINATE","KPROGRESSBARCOMPLETE","KPROGRESSWRAPPER","KPROGRESSSTATUS","KCOMPLETEDCHUNK","KUPCOMINGCHUNK","KSTATEDISABLED","PROGRESSTYPE","VALUE","PERCENT","CHUNK","CHANGE","COMPLETE","BOOLEAN","math","Math","extend","proxy","HUNDREDPERCENT","DEFAULTANIMATIONDURATION","PRECISION","templates","progressStatus","ProgressBar","init","element","options","that","this","fn","call","_progressProperty","orientation","_fields","value","_validateValue","_validateType","type","_wrapper","_progressAnimation","min","_updateProgress","setOptions","hasOwnProperty","wrapper","toggleClass","reverse","enable","events","name","max","chunkCount","showStatus","animation","_isStarted","progressWrapper","currentType","isValid","each","k","Error","format","initialStatusValue","container","addClass","_addChunkProgressWrapper","prepend","find","text","_calculatePercentage","toFixed","_value","validated","_roundValue","isNaN","removeClass","parseFloat","power","pow","floor","percentage","_updateChunks","_onProgressUpdateAlways","_updateProgressWrapper","completedChunks","percentagesPerChunk","parseInt","percentageParsed","completedChunksCount","animationDuration","_animation","duration","animationCssOptions","length","_addRegularProgressWrapper","animate","start","_onProgressAnimateStart","progress","_onProgressAnimate","complete","_onProgressAnimateComplete","always","show","e","progressStatusWrapSize","progressInPercent","elem","style","css","currentValue","progressValue","progressWrapperSize","hide","trigger","destroy","i","chunkSize","html","append","first","end","last","_normalizeChunkSize","lastChunk","currentSize","difference","appendTo","_calculateChunkSize","chunkContainer","_onePercent","abs","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,qBAAsB,cAAeD,IAC9C,WAkUE,MA1TC,UAAUE,EAAGC,GAAb,GACOC,GAAQC,OAAOD,MAA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ClBlC,OAAOD,MAAMiJ,QACRhJ,OAAOD,OACE,kBAAVH,SAAwBA,OAAOqJ,IAAMrJ,OAAS,SAAUsJ,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.progressbar.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.progressbar', ['kendo.core'], f);\n}(function () {\n var __meta__ = {\n id: 'progressbar',\n name: 'ProgressBar',\n category: 'web',\n description: 'The ProgressBar offers rich functionality for displaying and tracking progress',\n depends: ['core']\n };\n (function ($, undefined) {\n var kendo = window.kendo, ui = kendo.ui, Widget = ui.Widget, HORIZONTAL = 'horizontal', VERTICAL = 'vertical', DEFAULTMIN = 0, DEFAULTMAX = 100, DEFAULTVALUE = 0, DEFAULTCHUNKCOUNT = 5, KPROGRESSBAR = 'k-progressbar', KPROGRESSBARREVERSE = 'k-progressbar-reverse', KPROGRESSBARINDETERMINATE = 'k-progressbar-indeterminate', KPROGRESSBARCOMPLETE = 'k-complete', KPROGRESSWRAPPER = 'k-state-selected', KPROGRESSSTATUS = 'k-progress-status', KCOMPLETEDCHUNK = 'k-state-selected', KUPCOMINGCHUNK = 'k-state-default', KSTATEDISABLED = 'k-state-disabled', PROGRESSTYPE = {\n VALUE: 'value',\n PERCENT: 'percent',\n CHUNK: 'chunk'\n }, CHANGE = 'change', COMPLETE = 'complete', BOOLEAN = 'boolean', math = Math, extend = $.extend, proxy = $.proxy, HUNDREDPERCENT = 100, DEFAULTANIMATIONDURATION = 400, PRECISION = 3, templates = { progressStatus: '' };\n var ProgressBar = Widget.extend({\n init: function (element, options) {\n var that = this;\n Widget.fn.init.call(this, element, options);\n options = that.options;\n that._progressProperty = options.orientation === HORIZONTAL ? 'width' : 'height';\n that._fields();\n options.value = that._validateValue(options.value);\n that._validateType(options.type);\n that._wrapper();\n that._progressAnimation();\n if (options.value !== options.min && options.value !== false) {\n that._updateProgress();\n }\n },\n setOptions: function (options) {\n var that = this;\n Widget.fn.setOptions.call(that, options);\n if (options.hasOwnProperty('reverse')) {\n that.wrapper.toggleClass('k-progressbar-reverse', options.reverse);\n }\n if (options.hasOwnProperty('enable')) {\n that.enable(options.enable);\n }\n that._progressAnimation();\n that._validateValue();\n that._updateProgress();\n },\n events: [\n CHANGE,\n COMPLETE\n ],\n options: {\n name: 'ProgressBar',\n orientation: HORIZONTAL,\n reverse: false,\n min: DEFAULTMIN,\n max: DEFAULTMAX,\n value: DEFAULTVALUE,\n enable: true,\n type: PROGRESSTYPE.VALUE,\n chunkCount: DEFAULTCHUNKCOUNT,\n showStatus: true,\n animation: {}\n },\n _fields: function () {\n var that = this;\n that._isStarted = false;\n that.progressWrapper = that.progressStatus = $();\n },\n _validateType: function (currentType) {\n var isValid = false;\n $.each(PROGRESSTYPE, function (k, type) {\n if (type === currentType) {\n isValid = true;\n return false;\n }\n });\n if (!isValid) {\n throw new Error(kendo.format('Invalid ProgressBar type \\'{0}\\'', currentType));\n }\n },\n _wrapper: function () {\n var that = this;\n var container = that.wrapper = that.element;\n var options = that.options;\n var orientation = options.orientation;\n var initialStatusValue;\n container.addClass('k-widget ' + KPROGRESSBAR);\n container.addClass(KPROGRESSBAR + '-' + (orientation === HORIZONTAL ? HORIZONTAL : VERTICAL));\n if (options.enable === false) {\n container.addClass(KSTATEDISABLED);\n }\n if (options.reverse) {\n container.addClass(KPROGRESSBARREVERSE);\n }\n if (options.value === false) {\n container.addClass(KPROGRESSBARINDETERMINATE);\n }\n if (options.type === PROGRESSTYPE.CHUNK) {\n that._addChunkProgressWrapper();\n } else {\n if (options.showStatus) {\n that.progressStatus = that.wrapper.prepend(templates.progressStatus).find('.' + KPROGRESSSTATUS);\n initialStatusValue = options.value !== false ? options.value : options.min;\n if (options.type === PROGRESSTYPE.VALUE) {\n that.progressStatus.text(initialStatusValue);\n } else {\n that.progressStatus.text(that._calculatePercentage(initialStatusValue).toFixed() + '%');\n }\n }\n }\n },\n value: function (value) {\n return this._value(value);\n },\n _value: function (value) {\n var that = this;\n var options = that.options;\n var validated;\n if (value === undefined) {\n return options.value;\n } else {\n if (typeof value !== BOOLEAN) {\n value = that._roundValue(value);\n if (!isNaN(value)) {\n validated = that._validateValue(value);\n if (validated !== options.value) {\n that.wrapper.removeClass(KPROGRESSBARINDETERMINATE);\n options.value = validated;\n that._isStarted = true;\n that._updateProgress();\n }\n }\n } else if (!value) {\n that.wrapper.addClass(KPROGRESSBARINDETERMINATE);\n options.value = false;\n }\n }\n },\n _roundValue: function (value) {\n value = parseFloat(value);\n var power = math.pow(10, PRECISION);\n return math.floor(value * power) / power;\n },\n _validateValue: function (value) {\n var that = this;\n var options = that.options;\n if (value !== false) {\n if (value <= options.min || value === true) {\n return options.min;\n } else if (value >= options.max) {\n return options.max;\n }\n } else if (value === false) {\n return false;\n }\n if (isNaN(that._roundValue(value))) {\n return options.min;\n }\n return value;\n },\n _updateProgress: function () {\n var that = this;\n var options = that.options;\n var percentage = that._calculatePercentage();\n if (options.type === PROGRESSTYPE.CHUNK) {\n that._updateChunks(percentage);\n that._onProgressUpdateAlways(options.value);\n } else {\n that._updateProgressWrapper(percentage);\n }\n },\n _updateChunks: function (percentage) {\n var that = this;\n var options = that.options;\n var chunkCount = options.chunkCount;\n var percentagesPerChunk = parseInt(HUNDREDPERCENT / chunkCount * 100, 10) / 100;\n var percentageParsed = parseInt(percentage * 100, 10) / 100;\n var completedChunksCount = math.floor(percentageParsed / percentagesPerChunk);\n var completedChunks;\n if (options.orientation === HORIZONTAL && !options.reverse || options.orientation === VERTICAL && options.reverse) {\n completedChunks = that.wrapper.find('li.k-item:lt(' + completedChunksCount + ')');\n } else {\n completedChunks = that.wrapper.find('li.k-item:gt(-' + (completedChunksCount + 1) + ')');\n }\n that.wrapper.find('.' + KCOMPLETEDCHUNK).removeClass(KCOMPLETEDCHUNK).addClass(KUPCOMINGCHUNK);\n completedChunks.removeClass(KUPCOMINGCHUNK).addClass(KCOMPLETEDCHUNK);\n },\n _updateProgressWrapper: function (percentage) {\n var that = this;\n var options = that.options;\n var progressWrapper = that.wrapper.find('.' + KPROGRESSWRAPPER);\n var animationDuration = that._isStarted ? that._animation.duration : 0;\n var animationCssOptions = {};\n if (progressWrapper.length === 0) {\n that._addRegularProgressWrapper();\n }\n animationCssOptions[that._progressProperty] = percentage + '%';\n that.progressWrapper.animate(animationCssOptions, {\n duration: animationDuration,\n start: proxy(that._onProgressAnimateStart, that),\n progress: proxy(that._onProgressAnimate, that),\n complete: proxy(that._onProgressAnimateComplete, that, options.value),\n always: proxy(that._onProgressUpdateAlways, that, options.value)\n });\n },\n _onProgressAnimateStart: function () {\n this.progressWrapper.show();\n },\n _onProgressAnimate: function (e) {\n var that = this;\n var options = that.options;\n var progressInPercent = parseFloat(e.elem.style[that._progressProperty], 10);\n var progressStatusWrapSize;\n if (options.showStatus) {\n progressStatusWrapSize = 10000 / parseFloat(that.progressWrapper[0].style[that._progressProperty]);\n that.progressWrapper.find('.k-progress-status-wrap').css(that._progressProperty, progressStatusWrapSize + '%');\n }\n if (options.type !== PROGRESSTYPE.CHUNK && progressInPercent <= 98) {\n that.progressWrapper.removeClass(KPROGRESSBARCOMPLETE);\n }\n },\n _onProgressAnimateComplete: function (currentValue) {\n var that = this;\n var options = that.options;\n var progressWrapperSize = parseFloat(that.progressWrapper[0].style[that._progressProperty]);\n var progressValue;\n if (options.type !== PROGRESSTYPE.CHUNK && progressWrapperSize > 98) {\n that.progressWrapper.addClass(KPROGRESSBARCOMPLETE);\n }\n if (options.showStatus) {\n if (options.type === PROGRESSTYPE.VALUE) {\n progressValue = currentValue;\n } else if (options.type == PROGRESSTYPE.PERCENT) {\n progressValue = that._calculatePercentage(currentValue).toFixed() + '%';\n } else {\n progressValue = math.floor(that._calculatePercentage(currentValue)) + '%';\n }\n that.progressStatus.text(progressValue);\n }\n if (currentValue === options.min) {\n that.progressWrapper.hide();\n }\n },\n _onProgressUpdateAlways: function (currentValue) {\n var that = this;\n var options = that.options;\n if (that._isStarted) {\n that.trigger(CHANGE, { value: currentValue });\n }\n if (currentValue === options.max && that._isStarted) {\n that.trigger(COMPLETE, { value: options.max });\n }\n },\n enable: function (enable) {\n var that = this;\n var options = that.options;\n options.enable = typeof enable === 'undefined' ? true : enable;\n that.wrapper.toggleClass(KSTATEDISABLED, !options.enable);\n },\n destroy: function () {\n var that = this;\n Widget.fn.destroy.call(that);\n },\n _addChunkProgressWrapper: function () {\n var that = this;\n var options = that.options;\n var container = that.wrapper;\n var chunkSize = HUNDREDPERCENT / options.chunkCount;\n var html = '';\n if (options.chunkCount <= 1) {\n options.chunkCount = 1;\n }\n html += '