(function(c){"function"===typeof define&&define.amd?define(["jquery","./core","./widget"],c):c(jQuery)})(function(c){return c.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue();this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min});this.valueDiv=c("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);
this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove()},value:function(a){if(void 0===a)return this.options.value;this.options.value=this._constrainedValue(a);this._refreshValue()},_constrainedValue:function(a){void 0===a&&(a=this.options.value);this.indeterminate=!1===a;"number"!==typeof a&&(a=0);return this.indeterminate?
!1:Math.min(this.options.max,Math.max(this.min,a))},_setOptions:function(a){var b=a.value;delete a.value;this._super(a);this.options.value=this._constrainedValue(b);this._refreshValue()},_setOption:function(a,b){"max"===a&&(b=Math.max(this.min,b));"disabled"===a&&this.element.toggleClass("ui-state-disabled",!!b).attr("aria-disabled",b);this._super(a,b)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var a=
this.options.value,b=this._percentage();this.valueDiv.toggle(this.indeterminate||a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%");this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate);this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=c("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":a}),this.overlayDiv&&
(this.overlayDiv.remove(),this.overlayDiv=null));this.oldValue!==a&&(this.oldValue=a,this._trigger("change"));a===this.options.max&&this._trigger("complete")}})});