/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dijit.form.Textarea"],["require","dijit.form.SimpleTextarea"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dijit.form.Textarea"]){_4._hasResource["dijit.form.Textarea"]=true;_4.provide("dijit.form.Textarea");_4.require("dijit.form.SimpleTextarea");_4.declare("dijit.form.Textarea",_5.form.SimpleTextarea,{baseClass:"dijitTextBox dijitTextArea dijitExpandingTextArea",cols:"",_previousNewlines:0,_strictMode:(_4.doc.compatMode!="BackCompat"),_getHeight:function(_7){var _8=_7.scrollHeight;if(_4.isIE){_8+=_7.offsetHeight-_7.clientHeight-((_4.isIE<8&&this._strictMode)?_4._getPadBorderExtents(_7).h:0);}else{if(_4.isMoz){_8+=_7.offsetHeight-_7.clientHeight;}else{if(_4.isWebKit){_8+=_4._getBorderExtents(_7).h;}else{_8+=_4._getPadBorderExtents(_7).h;}}}return _8;},_estimateHeight:function(_9){_9.style.maxHeight="";_9.style.height="auto";_9.rows=(_9.value.match(/\n/g)||[]).length+1;},_needsHelpShrinking:_4.isMoz||_4.isWebKit,_onInput:function(){this.inherited(arguments);if(this._busyResizing){return;}this._busyResizing=true;var _a=this.textbox;if(_a.scrollHeight&&_a.offsetHeight&&_a.clientHeight){var _b=this._getHeight(_a)+"px";if(_a.style.height!=_b){_a.style.maxHeight=_a.style.height=_b;}if(this._needsHelpShrinking){if(this._setTimeoutHandle){clearTimeout(this._setTimeoutHandle);}this._setTimeoutHandle=setTimeout(_4.hitch(this,"_shrink"),0);}}else{this._estimateHeight(_a);}this._busyResizing=false;},_busyResizing:false,_shrink:function(){this._setTimeoutHandle=null;if(this._needsHelpShrinking&&!this._busyResizing){this._busyResizing=true;var _c=this.textbox;var _d=false;if(_c.value==""){_c.value=" ";_d=true;}var _e=_c.scrollHeight;if(!_e){this._estimateHeight(_c);}else{var _f=_c.style.paddingBottom;var _10=_4._getPadExtents(_c);_10=_10.h-_10.t;_c.style.paddingBottom=_10+1+"px";var _11=this._getHeight(_c)-1+"px";if(_c.style.maxHeight!=_11){_c.style.paddingBottom=_10+_e+"px";_c.scrollTop=0;_c.style.maxHeight=this._getHeight(_c)-_e+"px";}_c.style.paddingBottom=_f;}if(_d){_c.value="";}this._busyResizing=false;}},resize:function(){this._onInput();},_setValueAttr:function(){this.inherited(arguments);this.resize();},buildRendering:function(){this.inherited(arguments);_4.style(this.textbox,{overflowY:"hidden",overflowX:"auto",boxSizing:"border-box",MsBoxSizing:"border-box",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box"});},postCreate:function(){this.inherited(arguments);this.connect(this.textbox,"onscroll","_onInput");this.connect(this.textbox,"onresize","_onInput");this.connect(this.textbox,"onfocus","_onInput");this._setTimeoutHandle=setTimeout(_4.hitch(this,"resize"),0);},uninitialize:function(){if(this._setTimeoutHandle){clearTimeout(this._setTimeoutHandle);}this.inherited(arguments);}});}}};});