//>>built
define("dijit/form/_TextBoxMixin","dojo/_base/array dojo/_base/declare dojo/dom dojo/sniff dojo/keys dojo/_base/lang dojo/on ../main".split(" "),function(q,m,p,l,c,g,h,n){var f=m("dijit.form._TextBoxMixin"+(l("dojo-bidi")?"_NoBidi":""),null,{trim:!1,uppercase:!1,lowercase:!1,propercase:!1,maxLength:"",selectOnClick:!1,placeHolder:"",_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints)},_setValueAttr:function(a,b,d){if(void 0!==a){var e=this.filter(a);"string"!=typeof d&&
(d=null===e||"number"==typeof e&&isNaN(e)?"":this.filter(this.format(e,this.constraints)),0!=this.compare(e,this.filter(this.parse(d,this.constraints)))&&(d=null))}null==d||"number"==typeof d&&isNaN(d)||this.textbox.value==d||(this.textbox.value=d,this._set("displayedValue",this.get("displayedValue")));this.inherited(arguments,[e,b])},displayedValue:"",_getDisplayedValueAttr:function(){return this.filter(this.textbox.value)},_setDisplayedValueAttr:function(a){null==a?a="":"string"!=typeof a&&(a=String(a));
this.textbox.value=a;this._setValueAttr(this.get("value"),void 0);this._set("displayedValue",this.get("displayedValue"))},format:function(a){return null==a?"":a.toString?a.toString():a},parse:function(a){return a},_refreshState:function(){},onInput:function(){},_onInput:function(a){this._lastInputEventValue=this.textbox.value;this._processInput(this._lastInputProducingEvent||a);delete this._lastInputProducingEvent;this.intermediateChanges&&this._handleOnChange(this.get("value"),!1)},_processInput:function(){this._refreshState();
this._set("displayedValue",this.get("displayedValue"))},postCreate:function(){this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);this.own(h(this.textbox,"keydown, keypress, paste, cut, compositionend",g.hitch(this,function(a){if("keydown"==a.type&&229!=a.keyCode){var b=a.keyCode;switch(b){case c.SHIFT:case c.ALT:case c.CTRL:case c.META:case c.CAPS_LOCK:case c.NUM_LOCK:case c.SCROLL_LOCK:return}if(!a.ctrlKey&&!a.metaKey&&!a.altKey){switch(b){case c.NUMPAD_0:case c.NUMPAD_1:case c.NUMPAD_2:case c.NUMPAD_3:case c.NUMPAD_4:case c.NUMPAD_5:case c.NUMPAD_6:case c.NUMPAD_7:case c.NUMPAD_8:case c.NUMPAD_9:case c.NUMPAD_MULTIPLY:case c.NUMPAD_PLUS:case c.NUMPAD_ENTER:case c.NUMPAD_MINUS:case c.NUMPAD_PERIOD:case c.NUMPAD_DIVIDE:return}if(65<=
b&&90>=b||48<=b&&57>=b||b==c.SPACE)return;b=!1;for(var d in c)if(c[d]===a.keyCode){b=!0;break}if(!b)return}}(b=32<=a.charCode?String.fromCharCode(a.charCode):a.charCode)||(b=65<=a.keyCode&&90>=a.keyCode||48<=a.keyCode&&57>=a.keyCode||a.keyCode==c.SPACE?String.fromCharCode(a.keyCode):a.keyCode);b||(b=229);if("keypress"==a.type){if("string"!=typeof b)return;if("a"<=b&&"z">=b||"A"<=b&&"Z">=b||"0"<=b&&"9">=b||" "===b)if(a.ctrlKey||a.metaKey||a.altKey)return}var e={faux:!0},k;for(k in a)/^(layer[XY]|returnValue|keyLocation)$/.test(k)||
(d=a[k],"function"!=typeof d&&"undefined"!=typeof d&&(e[k]=d));g.mixin(e,{charOrCode:b,_wasConsumed:!1,preventDefault:function(){e._wasConsumed=!0;a.preventDefault()},stopPropagation:function(){a.stopPropagation()}});this._lastInputProducingEvent=e;!1===this.onInput(e)&&(e.preventDefault(),e.stopPropagation());if(!e._wasConsumed&&9>=l("ie"))switch(a.keyCode){case c.TAB:case c.ESCAPE:case c.DOWN_ARROW:case c.UP_ARROW:case c.LEFT_ARROW:case c.RIGHT_ARROW:break;default:a.keyCode==c.ENTER&&"textarea"!=
this.textbox.tagName.toLowerCase()||this.defer(function(){this.textbox.value!==this._lastInputEventValue&&h.emit(this.textbox,"input",{bubbles:!0})})}})),h(this.textbox,"input",g.hitch(this,"_onInput")),h(this.domNode,"keypress",function(a){a.stopPropagation()}))},_blankValue:"",filter:function(a){if(null===a)return this._blankValue;if("string"!=typeof a)return a;this.trim&&(a=g.trim(a));this.uppercase&&(a=a.toUpperCase());this.lowercase&&(a=a.toLowerCase());this.propercase&&(a=a.replace(/[^\s]+/g,
function(b){return b.substring(0,1).toUpperCase()+b.substring(1)}));return a},_setBlurValue:function(){this._setValueAttr(this.get("value"),!0)},_onBlur:function(a){this.disabled||(this._setBlurValue(),this.inherited(arguments))},_isTextSelected:function(){return this.textbox.selectionStart!=this.textbox.selectionEnd},_onFocus:function(a){this.disabled||this.readOnly||(this.selectOnClick&&"mouse"==a&&(this._selectOnClickHandle=h.once(this.domNode,"mouseup, touchend",g.hitch(this,function(b){this._isTextSelected()||
f.selectInputText(this.textbox)})),this.own(this._selectOnClickHandle),this.defer(function(){this._selectOnClickHandle&&(this._selectOnClickHandle.remove(),this._selectOnClickHandle=null)},500)),this.inherited(arguments),this._refreshState())},reset:function(){this.textbox.value="";this.inherited(arguments)}});l("dojo-bidi")&&(f=m("dijit.form._TextBoxMixin",f,{_setValueAttr:function(){this.inherited(arguments);this.applyTextDir(this.focusNode)},_setDisplayedValueAttr:function(){this.inherited(arguments);
this.applyTextDir(this.focusNode)},_onInput:function(){this.applyTextDir(this.focusNode);this.inherited(arguments)}}));f._setSelectionRange=n._setSelectionRange=function(a,b,d){a.setSelectionRange&&a.setSelectionRange(b,d)};f.selectInputText=n.selectInputText=function(a,b,d){a=p.byId(a);isNaN(b)&&(b=0);isNaN(d)&&(d=a.value?a.value.length:0);try{a.focus(),f._setSelectionRange(a,b,d)}catch(e){}};return f});