{"version":3,"sources":["kendo.textarea.js"],"names":["f","define","$","undefined","kendo","window","Widget","ui","isPlainObject","NS","CHANGE","DISABLED","READONLY","INPUT","FOCUSED","LABELCLASSES","STATEDISABLED","NOCLICKCLASS","ARIA_DISABLED","TEXTAREACONTAINER","proxy","TextArea","extend","init","element","options","that","this","fn","call","value","val","readonly","attr","enable","placeholder","replace","length","_wrapper","_label","_editable","disable","_applyAttributes","addClass","css","resizable","notify","events","attributes","name","label","maxLength","cols","rows","property","_value","floatingLabel","focus","destroy","off","wrapper","toggleClass","removeAttr","removeClass","on","_focusin","_focusout","floating","labelText","id","content","_floatingLabelContainer","wrap","parent","FloatingLabel","widget","isFunction","guid","_inputLabel","insertBefore","newValue","trigger","DOMElement","style","cssText","width","className","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,kBACH,aACA,uBACDD,IACL,WAgLE,MArKC,UAAUE,EAAGC,GAAb,GACOC,GAAQC,OAAOD,MAAOE,EAASF,EAAMG,GAAGD,OAAQC,EAAKH,EAAMG,GAAIC,EAAgBN,EAAEM,cAAeC,EAAK,iBAAkBC,EAAS,SAAUC,EAAW,WAAYC,EAAW,WAAYC,EAAQ,UAAWC,EAAU,kBAAmBC,EAAe,wBAAyBC,EAAgB,mBAAoBC,EAAe,aAAcC,EAAgB,gBAAiBC,EAAoB,uBAAwBC,EAAQlB,EAAEkB,MACxaC,EAAWf,EAAOgB,QAClBC,KAAM,SAAUC,EAASC,GACrB,GAAIC,GAAOC,IACXrB,GAAOsB,GAAGL,KAAKM,KAAKH,EAAMF,EAASC,GACnCA,EAAUvB,EAAEoB,QAAO,KAAUG,GAC7BC,EAAKD,QAAQK,MAAQL,EAAQK,OAASJ,EAAKF,QAAQO,MACnDL,EAAKD,QAAQO,SAAWP,EAAQO,WAAa7B,EAAYsB,EAAQO,WAAmBN,EAAKF,QAAQS,KAAK,YACtGP,EAAKD,QAAQS,OA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cAAchD,EAAK6C,yBAA2BI,OAAQjD,IACxFA,EAAK6C,wBAAwB5B,SAASxB,IAEtCf,EAAMwE,WAAWR,KACjBA,EAAYA,EAAUvC,KAAKH,IAE1B0C,IACDA,EAAY,IAEXC,IACDA,EAAK5C,EAAQwB,KAAO,IAAM7C,EAAMyE,OAChCrD,EAAQS,KAAK,KAAMoC,IAEvB3C,EAAKoD,YAAc5E,EAAE,iBAAoBa,EAAe,UAAcsD,EAAK,KAAQD,EAAY,aAAcW,aAAarD,EAAKkC,WAGvIK,SAAU,WACN,GAAIvC,GAAOC,IACXD,GAAKkC,QAAQjB,SAAS7B,IAE1BoD,UAAW,WAAA,GACHxC,GAAOC,KACPG,EAAQJ,EAAK6B,OACbyB,EAAWtD,EAAKF,QAAQO,KAC5BL,GAAKkC,QAAQG,YAAYjD,GACrBgB,IAAUkD,IACVtD,EAAK6B,OAASyB,EACdtD,EAAKuD,QAAQvE,KAGrB4B,SAAU,WAAA,GACFZ,GAAOC,KACPH,EAAUE,EAAKF,QACf0D,EAAa1D,EAAQ,GACrBoC,EACMpC,EAAQgD,KAAK,6CAA+CC,QACtEb,GAAQ,GAAGuB,MAAMC,QAAUF,EAAWC,MAAMC,QAC5CF,EAAWC,MAAME,MAAQ,OACzB3D,EAAKkC,QAAUA,EAAQjB,SAASuC,EAAWI,WAAWvB,YAAY,4BAG1ExD,GAAGgF,OAAOlE,IACZhB,OAAOD,MAAMoF,QACRnF,OAAOD,OACE,kBAAVH,SAAwBA,OAAOwF,IAAMxF,OAAS,SAAUyF,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.textarea.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.textarea', [\n 'kendo.core',\n 'kendo.floatinglabel'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'textarea',\n name: 'TextArea',\n category: 'web',\n description: 'The TextArea widget represents a multi-line plain-text editing control which enables you to style and provide a floating label functionality to textarea elements',\n depends: [\n 'core',\n 'floatinglabel'\n ]\n };\n (function ($, undefined) {\n var kendo = window.kendo, Widget = kendo.ui.Widget, ui = kendo.ui, isPlainObject = $.isPlainObject, NS = '.kendoTextArea', CHANGE = 'change', DISABLED = 'disabled', READONLY = 'readonly', INPUT = 'k-input', FOCUSED = 'k-state-focused', LABELCLASSES = 'k-label k-input-label', STATEDISABLED = 'k-state-disabled', NOCLICKCLASS = 'k-no-click', ARIA_DISABLED = 'aria-disabled', TEXTAREACONTAINER = 'k-textarea-container', proxy = $.proxy;\n var TextArea = Widget.extend({\n init: function (element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n options = $.extend(true, {}, options);\n that.options.value = options.value || that.element.val();\n that.options.readonly = options.readonly !== undefined ? options.readonly : Boolean(that.element.attr('readonly'));\n that.options.enable = options.enable !== undefined ? options.enable : !Boolean(that.element.attr('disabled'));\n that.options.placeholder = options.placeholder || that.element.attr('placeholder');\n if (!that.options.value.replace(/\\s/g, '').length) {\n that.options.value = '';\n that.element.val('');\n }\n that.value(that.options.value);\n that._wrapper();\n that._label();\n that._editable({\n readonly: that.options.readonly,\n disable: !that.options.enable\n });\n that._applyAttributes();\n that.element.addClass(INPUT).css('resize', that.options.resizable).attr('autocomplete', 'off');\n kendo.notify(that);\n },\n events: [CHANGE],\n attributes: [\n 'maxLength',\n 'rows',\n 'placeholder'\n ],\n options: {\n name: 'TextArea',\n value: '',\n readonly: false,\n enable: true,\n placeholder: '',\n label: null,\n resizable: 'none',\n maxLength: null,\n cols: 20,\n rows: 1\n },\n _applyAttributes: function () {\n var that = this;\n var property;\n var attributes = {};\n for (property in that.attributes) {\n attributes[that.attributes[property]] = that.options[that.attributes[property]];\n }\n that.element.attr(attributes);\n },\n value: function (value) {\n var that = this;\n if (value === undefined) {\n return that._value;\n }\n that._value = value;\n that.element.val(value);\n },\n readonly: function (readonly) {\n var that = this;\n this._editable({\n readonly: readonly === undefined ? true : readonly,\n disable: false\n });\n if (that.floatingLabel) {\n that.floatingLabel.readonly(readonly === undefined ? true : readonly);\n }\n },\n enable: function (enable) {\n var that = this;\n this._editable({\n readonly: false,\n disable: !(enable = enable === undefined ? true : enable)\n });\n if (that.floatingLabel) {\n that.floatingLabel.enable(enable = enable === undefined ? true : enable);\n }\n },\n focus: function () {\n var that = this;\n that.element[0].focus();\n },\n destroy: function () {\n var that = this;\n if (that.floatingLabel) {\n that.floatingLabel.destroy();\n }\n that.element.off(NS);\n Widget.fn.destroy.call(that);\n },\n _editable: function (options) {\n var that = this;\n var element = that.element;\n var wrapper = that.wrapper;\n var disable = options.disable;\n var readonly = options.readonly;\n element.off(NS);\n if (!readonly && !disable) {\n element.removeAttr(DISABLED).removeAttr(READONLY).attr(ARIA_DISABLED, false);\n wrapper.removeClass(STATEDISABLED).removeClass(NOCLICKCLASS);\n element.on('focusin' + NS, proxy(that._focusin, that));\n element.on('focusout' + NS, proxy(that._focusout, that));\n } else {\n element.attr(DISABLED, disable).attr(READONLY, readonly).attr(ARIA_DISABLED, disable);\n wrapper.toggleClass(STATEDISABLED, disable).toggleClass(NOCLICKCLASS, readonly);\n }\n },\n _label: function () {\n var that = this;\n var element = that.element;\n var options = that.options;\n var id = element.attr('id');\n var floating;\n var labelText;\n if (options.label !== null) {\n floating = isPlainObject(options.label) ? options.label.floating : false;\n labelText = isPlainObject(options.label) ? options.label.content : options.label;\n if (floating) {\n that._floatingLabelContainer = that.wrapper.wrap('').parent();\n that.floatingLabel = new kendo.ui.FloatingLabel(that._floatingLabelContainer, { widget: that });\n that._floatingLabelContainer.addClass(TEXTAREACONTAINER);\n }\n if (kendo.isFunction(labelText)) {\n labelText = labelText.call(that);\n }\n if (!labelText) {\n labelText = '';\n }\n if (!id) {\n id = options.name + '_' + kendo.guid();\n element.attr('id', id);\n }\n that._inputLabel = $('\\'').insertBefore(that.wrapper);\n }\n },\n _focusin: function () {\n var that = this;\n that.wrapper.addClass(FOCUSED);\n },\n _focusout: function () {\n var that = this;\n var value = that._value;\n var newValue = that.element.val();\n that.wrapper.removeClass(FOCUSED);\n if (value !== newValue) {\n that._value = newValue;\n that.trigger(CHANGE);\n }\n },\n _wrapper: function () {\n var that = this;\n var element = that.element;\n var DOMElement = element[0];\n var wrapper;\n wrapper = element.wrap('').parent();\n wrapper[0].style.cssText = DOMElement.style.cssText;\n DOMElement.style.width = '100%';\n that.wrapper = wrapper.addClass(DOMElement.className).removeClass('input-validation-error');\n }\n });\n ui.plugin(TextArea);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}