//>>built
define("mill/jssupport/jsApplication/controls/textFieldCounter/TextFieldCounter","dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/dom-construct dojo/on dijit/_Widget dijit/_TemplatedMixin dijit/form/ValidationTextBox mill/jssupport/TranslatableNode mill/mill".split(" "),function(g,h,k,b,l,m,n,p,q,f){return f.registerAlias("app.view.TextFieldCounter",g("mill.jssupport.jsApplication.controls.textFieldCounter.TextFieldCounter",[m,n],{templateString:"\x3cdiv\x3e\x3c/div\x3e",baseClass:"dim small",
startup:function(){this.inherited(arguments);this.registerCounter()},registerCounter:function(){var a=window.app.getControlField(this);if(a)if(a=k.filter(a.getChildren(),function(d){return d&&d.isInstanceOf&&d.isInstanceOf(p)}),a.length){1<a.length&&window.undefined;var c=a[0],e=c.maxLength;if(e){h.mixin(c,{charactersRemainingWidget:this});a=b.create("div",null,this.domNode);q({text:"Office.CharactersRemaining;:",display:"inline"},b.create("span",null,a));b.create("span",{innerHTML:"\x26#160;"},a);
var r=b.create("span",{innerHTML:e},a);l(c,"change",function(){r.innerHTML=e-f.normalizeLineBreaks(c.get("value")).length}.bind(this))}}else window.undefined}}))});