YUI.add("aui-progressbar",function(e,t){var n=e.Lang,r=n.isNumber,i=n.isString,s=n.isUndefined,o="",u=".",a=" ",f="auto",l="bar",c="boundingBox",h="complete",p="contentBox",d="height",v="horizontal",m="label",g="lineHeight",y="max",b="min",w="offsetHeight",E="orientation",S="p",x="progress",T="px",N="ratio",C="step",k="text",L="textNode",A="useARIA",O="value",M="valuemax",_="valuemin",D="valuenow",P="vertical",H="width",B=function(e){return parseFloat(e)||0},j=e.getClassName,F=j(l),I=j(v),q=j(P),R="<p></p>",U=e.Component.create({NAME:x,ATTRS:{useARIA:{value:!0},height:{valueFn:function(){return this.get(c).get(w)||25}},label:{},max:{validator:r,value:100},min:{validator:r,value:0},orientation:{value:v,validator:function(e){return i(e)&&(e===v||e===P)}},ratio:{getter:"_getRatio",readOnly:!0},step:{getter:"_getStep",readOnly:!0},textNode:{valueFn:function(){return e.Node.create(R)}},value:{setter:B,validator:function(e){return r(B(e))&&e>=this.get(b)&&e<=this.get(y)},value:0}},HTML_PARSER:{label:function(e){var t=e.one(S);if(t)return t.html()},textNode:S},UI_ATTRS:[m,E,O],prototype:{renderUI:function(){var e=this;e.get(p).addClass(F),e._renderTextNodeIfLabelSet()},syncUI:function(){var t=this;t.get(A)&&t.plug(e.Plugin.Aria,{attributes:{value:D,max:M,min:_,orientation:E,label:m}})},_getBoundingBoxSize:function(){var e=this,t=e.get(c);return B(t.getStyle(this.get(E)===v?H:d))},_getPixelStep:function(){var e=this;return e._getBoundingBoxSize()*e.get(N)},_getRatio:function(){var e=this,t=e.get(b),n=(e.get(O)-t)/(e.get(y)-t);return Math.max(n,0)},_getStep:function(){return this.get(N)*100},_renderTextNodeIfLabelSet:function(){var e=this;s(e.get(m))||e.get(p).append(e.get(L))},_uiSetLabel:function(e){var t=this,n=t.get(L);n.inDoc()||t._renderTextNodeIfLabelSet(),n.html(e)},_uiSetOrientation:function(e){var t=this,n=t.get(c),r=e===v;n.toggleClass(I,r),n.toggleClass(q,!r),t._uiSetValue(t.get(O)),t._uiSizeTextNode()},_uiSetValue:function(e){var t=this,n=t._getPixelStep(),r={};t.get(E)===v?r={height:"100%",top:f,width:n+T}:r={height:n+T,top:B(t._getBoundingBoxSize()-n)+T,width:"100%"},t.get(C)>=100&&t.fire(h),t.get(p).setStyles(r)},_uiSizeTextNode:function(){var e=this,t=e.get(c),n=e.get(L);n.setStyle(g,t.getStyle(d))}}});e.ProgressBar=U},"2.0.0",{requires:["aui-node","aui-component","aui-aria"]});
