if(!nexacro.ProgressBar){nexacro.ProgressBar_Style=function(_a){nexacro.Style.call(this);if(_a){this._target=_a;}};var _pProgressBarStyle=nexacro._createPrototype(nexacro.Style,nexacro.ProgressBar_Style);nexacro.ProgressBar_Style.prototype=_pProgressBarStyle;eval(nexacro._createValueAttributeEvalStr("_pProgressBarStyle","bartype"));eval(nexacro._createValueAttributeEvalStr("_pProgressBarStyle","smooth"));eval(nexacro._createValueAttributeEvalStr("_pProgressBarStyle","direction"));eval(nexacro._createValueAttributeEvalStr("_pProgressBarStyle","startimage"));eval(nexacro._createValueAttributeEvalStr("_pProgressBarStyle","progressimage"));eval(nexacro._createValueAttributeEvalStr("_pProgressBarStyle","endimage"));eval(nexacro._createValueAttributeEvalStr("_pProgressBarStyle","barcolor"));eval(nexacro._createGradationAttributeEvalStr("_pProgressBarStyle","bargradation"));_pProgressBarStyle.__custom_emptyObject=function(){this.bartype=null;this.smooth=null;this.direction=null;this.startimage=null;this.progressimage=null;this.endimage=null;this.barcolor=null;this.bargradation=null;};_pProgressBarStyle.__get_custom_style_value=function(){var _a="";if(this.bartype&&!this.bartype._is_empty){_a+="bartype:"+this.bartype._value+"; ";}if(this.smooth&&!this.smooth._is_empty){_a+="smooth:"+this.smooth._value+"; ";}if(this.direction&&!this.direction._is_empty){_a+="direction:"+this.direction._value+"; ";}if(this.startimage&&!this.startimage._is_empty){_a+="startimage:"+this.startimage._value+"; ";}if(this.progressimage&&!this.progressimage._is_empty){_a+="progressimage:"+this.progressimage._value+"; ";}if(this.endimage&&!this.endimage._is_empty){_a+="endimage:"+this.endimage._value+"; ";}if(this.barcolor&&!this.barcolor._is_empty){_a+="barcolor:"+this.barcolor._value+"; ";}if(this.bargradation&&!this.bargradation._is_empty){_a+="bargradation:"+this.bargradation._value+"; ";}return _a;};nexacro.ProgressBar_CurrentStyle=function(){nexacro.CurrentStyle.call(this);this.bartype=null;this.smooth=null;this.direction=null;this.startimage=null;this.progressimage=null;this.endimage=null;this.barcolor=null;this.bargradation=null;};var _pProgressBarCurrentStyle=nexacro._createPrototype(nexacro.CurrentStyle,nexacro.ProgressBar_CurrentStyle);nexacro.ProgressBar_CurrentStyle.prototype=_pProgressBarCurrentStyle;_pProgressBarCurrentStyle.__custom_emptyObject=_pProgressBarStyle.__custom_emptyObject;_pProgressBarCurrentStyle.__get_custom_style_value=_pProgressBarStyle.__get_custom_style_value;_pProgressBarStyle=null;_pProgressBarCurrentStyle=null;nexacro.ProgressBar=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){nexacro.Component.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i);this.celllist=[];this.cellitem=null;this.start_img=null;this.progress_img=null;this.progress_img_list=new Array();this.end_img=null;this.statictext=null;this.style_list=null;this.start_img_width=0;this.progress_img_width=0;this.end_img_width=0;this.start_img_url="";this.progress_img_url="";this.end_img_url="";this.pos=0;this.step=1;this.max=100;this.min=0;this.blocksize=15;this.blockgap=2;this._accessibility_role="progressbar";};var _pProgressBar=nexacro._createPrototype(nexacro.Component,nexacro.ProgressBar);nexacro.ProgressBar.prototype=_pProgressBar;_pProgressBar._type_name="ProgressBar";nexacro.ProgressBar._default_bartype=nexacro._getCachedStyleObj("bartype","normal");_pProgressBar.on_apply_custom_pseudo=function(_a){if(!_a){_a=this._pseudo;}var _b=this.currentstyle;var _c=this.on_find_CurrentStyle_bartype(_a);var _d=this.on_find_CurrentStyle_smooth(_a);var _e=this.on_find_CurrentStyle_direction(_a);var _f=this.on_find_CurrentStyle_startImage(_a);var _g=this.on_find_CurrentStyle_progressImage(_a);var _h=this.on_find_CurrentStyle_endImage(_a);var _i=this.on_find_CurrentStyle_barColor(_a);var _j=this.on_find_CurrentStyle_barGradation(_a);var _k=this.on_find_CurrentStyle_font(_a);var _l=this.on_find_CurrentStyle_color(_a);var _m=this.on_find_CurrentStyle_align(_a);if(_b.font!=_k){_b.font=_k;this.on_apply_style_font(_k);}if(_b.color!=_l){_b.color=_l;this.on_apply_style_color(_l);}if(_b.align!=_m){_b.align=_m;this.on_apply_style_align(_m);}if(_c!=_b.bartype){_b.bartype=_c;this.on_apply_style_bartype(_c);}if(_d!=_b.smooth){_b.smooth=_d;this.on_apply_style_smooth(_d);}if(_e!=_b.direction){_b.direction=_e;this.on_apply_style_direction(_e);}if(_f!=_b.startimage){_b.startimage=_f;this.on_apply_style_startimage(_f);}if(_g!=_b.progressimage){_b.progressimage=_g;this.on_apply_style_progressimage(_g);}if(_h!=_b.endimage){_b.endimage=_h;this.on_apply_style_endimage(_h);}if(_i!=_b.barcolor){_b.barcolor=_i;this.on_apply_style_barcolor(_i);}if(_j!=_b.bargradation){_b.bargradation=_j;this.on_apply_style_bargradation(_j);}};_pProgressBar.on_create_custom_style=function(){return new nexacro.ProgressBar_Style(this);};_pProgressBar.on_create_custom_currentStyle=function(){return new nexacro.ProgressBar_CurrentStyle();};_pProgressBar.on_find_CurrentStyle_bartype=function(_a){var _b=this._find_pseudo_obj("bartype",_a);return (_b)?_b:nexacro.ProgressBar._default_bartype;};_pProgressBar.on_find_CurrentStyle_smooth=function(_a){return this._find_pseudo_obj("smooth",_a);};_pProgressBar.on_find_CurrentStyle_direction=function(_a){return this._find_pseudo_obj("direction",_a);};_pProgressBar.on_find_CurrentStyle_startImage=function(_a){return this._find_pseudo_obj("startimage",_a);};_pProgressBar.on_find_CurrentStyle_progressImage=function(_a){return this._find_pseudo_obj("progressimage",_a);};_pProgressBar.on_find_CurrentStyle_endImage=function(_a){return this._find_pseudo_obj("endimage",_a);};_pProgressBar.on_find_CurrentStyle_barColor=function(_a){return this._find_pseudo_obj("barcolor",_a,"color");};_pProgressBar.on_find_CurrentStyle_barGradation=function(_a){return this._find_pseudo_obj("bargradation",_a,"gradation");};_pProgressBar.on_update_style_bartype=function(){var _a=this.currentstyle.bartype=this.on_find_CurrentStyle_bartype(this._pseudo);this.on_apply_style_bartype(_a);};_pProgressBar.on_update_style_smooth=function(){var _a=this.currentstyle.smooth=this.on_find_CurrentStyle_smooth(this._pseudo);this.on_apply_style_smooth(_a);};_pProgressBar.on_update_style_direction=function(){var _a=this.currentstyle.direction=this.on_find_CurrentStyle_direction(this._pseudo);this.on_apply_style_direction(_a);};_pProgressBar.on_update_style_startimage=function(){var _a=this.currentstyle.startimage=this.on_find_CurrentStyle_startImage(this._pseudo);this.on_apply_style_startimage(_a);};_pProgressBar.on_update_style_progressimage=function(){var _a=this.currentstyle.progressimage=this.on_find_CurrentStyle_progressImage(this._pseudo);this.on_apply_style_progressimage(_a);};_pProgressBar.on_update_style_endimage=function(){var _a=this.currentstyle.endimage=this.on_find_CurrentStyle_endImage(this._pseudo);this.on_apply_style_endimage(_a);};_pProgressBar.on_update_style_barcolor=function(){var _a=this.currentstyle.barcolor=this.on_find_CurrentStyle_barColor(this._pseudo);this.on_apply_style_barcolor(_a);};_pProgressBar.on_update_style_bargradation=function(){var _a=this.currentstyle.bargradation=this.on_find_CurrentStyle_barGradation(this._pseudo);this.on_apply_style_bargradation(_a);};_pProgressBar.on_apply_style_bartype=function(_a){this._update();};_pProgressBar.on_apply_style_smooth=function(_a){if(!_a){return;}if(_a==true&&this.celllist&&this.celllist.length>1){for(i=1;i0)?this.displaytext+" "+this.min+" "+this.max:this.pos+" "+this.min+" "+this.max;}return _a;};_pProgressBar._on_getAccessibilityAdditionalRole=function(){if(this._getAccessibilityRole(this.on_find_CurrentStyle_accessibility(this._pseudo))=="progressbar"){return " ProgressBar";}return "";};_pProgressBar.on_apply_text=function(){var _a=this._control_element;if(_a){var _b=this._text_elem;if(!_b){this._text_elem=new nexacro.TextBoxElement(_a);_b=this._text_elem;_b.setElementSize(this._client_width,this._client_height);var _c=this.on_find_CurrentStyle_align(this._pseudo);_b.setElementColor(this.currentstyle.color);_b.setElementFont(this.currentstyle.font);_b.setElementAlignXY(_c.halign?_c._halign:"center",_c.valign?_c._valign:"middle");_b.create();}var _d=this.expr;if(_d&&_d.length>0){_d=_d.trim().split(":");var _e=_d.length;var _f=new nexacro.ExprParser();var _g,_h;var _i;if(_e==1){_i=_d[0];}else{if(_d[0].trim().toUpperCase()!="EXPR"){_i=_d.join(":");}else{_i=_d.slice(1).join(":");}}_g=_f.makeExpr(this,_i);_h=nexacro._createInlineFunc(_g,["comp","pos"]);if(_h){try{var _j=nexacro._toString(_h.call(null,this,this.pos));if(_j!=this.displaytext){this.displaytext=_j;if(nexacro._enableaccessibility&&this._isAccessibilityEnable()){this._setAccessibilityValue(_j);this._notifyAccessibility(_j,"notify");}}}catch(e){return;}}}else{this.displaytext=this.text;}_b.setElementText(this.displaytext);this.on_apply_style_align(this.currentstyle.align);_b=null;}};_pProgressBar.on_apply_expr=function(){this.on_apply_text();};_pProgressBar.set_blockgap=function(_a){if(this.blockgap!=_a){var _b=parseInt(_a)|0;this.blockgap=(_b<0)?0:_b;this._update();}};_pProgressBar.set_blocksize=function(_a){if(this.blocksize!=_a){var _b=parseInt(_a)|0;this.blocksize=(_b<1)?1:_b;this._update();}};_pProgressBar.set_min=function(_a){if(this.min!=_a){var _b=parseInt(_a)|0;var _c=parseInt(this.max)|0;var _d=parseInt(this.pos)|0;this.min=_b=(_b<0)?0:_b;if(_b>_c){this.max=_b;}if(_b>_d){this.pos=_b;}if(nexacro._enableaccessibility&&this._isAccessibilityEnable()){this._setAccessibilityInfoValueMin(_b);}this._update();}};_pProgressBar.set_max=function(_a){if(this.max!=_a){var _b=parseInt(_a)|0;var _c=parseInt(this.min)|0;var _d=parseInt(this.pos)|0;this.max=_b=(_b<0)?0:_b;if(_b<_c){this.min=_b;}if(_b<_d){this.pos=_b;}if(nexacro._enableaccessibility&&this._isAccessibilityEnable()){this._setAccessibilityInfoValueMax(_b);}this._update();}};_pProgressBar.set_pos=function(_a){_a=parseInt(_a)|0;if(this.pos!=_a){var _b=_a;var _c=parseInt(this.min)|0;var _d=parseInt(this.max)|0;this.pos=_b=(_b<0)?0:_b;if(_b>_d){this.pos=_b=_d;}else if(_b<_c){this.pos=_b=_c;}if(nexacro._enableaccessibility&&this._isAccessibilityEnable()){this._setAccessibilityInfoValueCur(_b);}}this._update();};_pProgressBar.set_step=function(_a){if(this.step!=_a){this.step=_a;this._update();}};_pProgressBar.resize=function(_a,_b){nexacro.Component.prototype.resize.call(this,_a,_b);this._update();};_pProgressBar.move=function(_a,_b,_c,_d,_e,_f){nexacro.Component.prototype.move.call(this,_a,_b,_c,_d,_e,_f);this._update();};_pProgressBar.stepIt=function(){var _a=this.min,_b=this.max;var _c=(parseInt(this.pos)|0)+(parseInt(this.step)|0);if(parseInt(_b)<_c){this.pos=_b;return;}else if(parseInt(_a)>_c){this.pos=_a;return;}else{this.pos=_c;}this._update();};_pProgressBar._update=function(){var _a=this.on_find_CurrentStyle_bartype()||nexacro.ProgressBar._default_bartype;if(_a=="normal"){this._update_cell();return;}this._update_img();};_pProgressBar._update_cell=function(){this._delete_cell();this._delete_img(this.start_img);this._delete_img(this.end_img);if(this.progress_img_list){var _s=this.progress_img_list.length;for(var _t=0;_t<_s;_t++ ){this._delete_img(this.progress_img_list[_t]);}this.progress_img_list=[];}if(this.pos==0){this._clear();this.on_apply_text(this.text);return;}var _a=this._client_height;var _b=this._client_width;if(this.cellitem==null){this.cellitem=new nexacro.ProgressBarCell("cell_0","absolute",0,0,0,_a,null,null,this);this.cellitem.createComponent();}var _c=this.cellitem;var _d=this.celllist;var _e,_f,_g,_h;var _i=1;var _j=parseInt(this.pos)|0;var _k=parseInt(this.max)|0;var _l=parseInt(this.min)|0;var _m=(_j-_l)/(_k-_l);var _n=this.on_find_CurrentStyle_smooth(this._pseudo);var _o=this.on_find_CurrentStyle_direction(this._pseudo);var _p=parseInt(this.blocksize)|0;var _q=parseInt(this.blockgap)|0;if(_n=="true"){if(_o=="backward"){_f=_c._adjust_top;_g=parseInt(_b*_m)|0;_e=_b-parseInt(_b*_m)|0;_h=_a;}else{_e=0;_f=0;_g=parseInt(_b*_m)|0;_h=_a;}_c._applysetPosition(_e,_f,_g,_h);_c.show();}else{if(_o=="backward"){_g=_p;_e=_b-_p;_f=_c._adjust_top;_h=_c._adjust_height;_c._applysetPosition(_e,_f,_g,_h);_d[0]=_c;_i=_q+_p;var _u=Math.ceil((_b/_i)*_m);for(var _t=_u;_t>0;_t-- ){_e=_b-(_t*_i);_f=0;_g=_p;_h=_a;_d[_t]=new nexacro.ProgressBarCell("cell_"+_t,"absolute",_e+_q,_f,_g,_h,null,null,this);_d[_t].createComponent();}this.celllist=_d;}else{_e=_c._adjust_left;_f=_c._adjust_top;_h=_c._adjust_height;_g=_p;_c._applysetPosition(_e,_f,_g,_h);_d[0]=_c;_i=_q+_p;var _u=Math.ceil((_b/_i)*_m);for(var _t=1;_t<_u;_t++ ){_e=(_t*_i);_f=0;_g=_p;_h=_a;_d[_t]=new nexacro.ProgressBarCell("cell_"+_t,"absolute",_e,_f,_g,_h,null,null,this);_d[_t].createComponent();}this.celllist=_d;}}if(this._text_elem){this._text_elem.destroy();delete this._text_elem;this._text_elem=null;}var _r=this.getElement();if(_r){this._text_elem=new nexacro.TextBoxElement(_r);var _v=this._text_elem;var _w=this.currentstyle.align?(this.currentstyle.align.halign==""?"center":this.currentstyle.align._halign):"center";var _x=this.currentstyle.align?(this.currentstyle.align.valign==""?"middle":this.currentstyle.align._valign):"middle";_v.setElementSize(this._client_width,this._client_height);_v.setElementColor(this.currentstyle.color);_v.setElementFont(this.currentstyle.font);_v.setElementAlignXY(_w,_x);if(_v){_v.create();}this.on_apply_style_align(this.currentstyle.align);this.on_apply_style_barcolor(this.currentstyle.barcolor);this.on_apply_style_bargradation(this.currentstyle.bargradation);this.on_apply_text(this.text);}var _c=null;var _d=null;};_pProgressBar._delete_cell=function(){if(this.celllist){var _a=this.celllist.length;for(var _b=0;_b<_a;_b++ ){this.celllist[_b].destroy();delete this.celllist[_b];}this.celllist=[];}if(this.cellitem){this.cellitem.destroy();delete this.cellitem;this.cellitem=null;}};_pProgressBar._on_start_img=function(_a,_b,_c){this.start_img_width=_b;this.start_img_url=_a;this._update_img();};_pProgressBar._on_progress_img=function(_a,_b,_c){this.progress_img_width=_b;this.progress_img_url=_a;this._update_img();};_pProgressBar._on_end_img=function(_a,_b,_c){this.end_img_width=_b;this.end_img_url=_a;this._update_img();};_pProgressBar._create_img=function(_a,_b,_c){if(_b!=null&&_b!=""){_a=new nexacro.ProgressBarImg(_c,"absolute",0,0,0,this._client_height,null,null,this);_a.createComponent();if(_c=="startImg"){_b=this.currentstyle.startimage;}else if(_c=="endImg"){_b=this.currentstyle.endimage;}else{_b=this.currentstyle.progressimage;}_a.style.set_background("URL('"+_b+"') stretch");try{return _a;}finally{delete _a;_a=null;}}};_pProgressBar._delete_img=function(_a){if(_a){_a.destroy();}};_pProgressBar._get_img_fullurl=function(_a){url=nexacro._toString(_a);if(url.substring(0,4).toLowerCase()=="url("){url=url.substring(5,url.length-2);}url=nexacro._getImageLocation(url,this._getRefFormBaseUrl());return url;};_pProgressBar._update_img=function(){var _a=this.on_find_CurrentStyle_bartype();var _b=this.on_find_CurrentStyle_progressImage();if((_a&&_a.value=="normal")||(_b&&_b.value=="")){return;}this._delete_cell();var _c=this.currentstyle.direction;if(_a=="image"){this._delete_img(this.start_img);this._delete_img(this.end_img);if(this.progress_img_list){var _d=this.progress_img_list.length;for(var _e=0;_e<_d;_e++ ){this._delete_img(this.progress_img_list[_e]);}this.progress_img_list=[];}if(this.pos==0){this._clear();this.on_apply_text(this.text);return;}if(!this.progress_img_list){this.progress_img_list=new Array();}var _f=this.progress_img_width;var _g=0,_h=0,_i=0,_j=0,_k=0,_l=0;var _m=this._client_height;var _n=this._client_width;var _o=parseInt(this.pos)|0;var _p=parseInt(this.max)|0;var _q=parseInt(this.min)|0;var _r=_m;var _s=parseInt(((_o-_q)/(_p-_q))*_n)|0;this.start_img=this._create_img(this.start_img,this.start_img_url,"startImg");if(this.start_img){_g=this.start_img_width;}this.end_img=this._create_img(this.end_img,this.end_img_url,"endImg");if(this.end_img){_h=this.end_img_width;}_i=parseInt((_s-_g-_h)/_f)|0;if(_c=="backward"){if(this.end_img&&this.progress_img){_j=_n-_h;this.end_img._applysetPosition(_j,_k,_h,_r);}var _t=null;var _u=_n-_f;for(var _e=0;_e<_i;_e++ ){_t=this._create_img(this.progress_img,this.progress_img_url,"pImg"+_e);_j=_u-(_f*_e);_k=0;_t._applysetPosition(_j,_k,_f,_r);this.progress_img_list[_e]=_t;}if(this.start_img){_j=_j-_g;this.start_img._applysetPosition(_j,_k,_g,_r);}}else{for(var _e=0;_e<_i;_e++ ){this.progress_img=this._create_img(this.progress_img,this.progress_img_url,"pImg"+_e);this.progress_img_list[_e]=this.progress_img;}if(this.start_img){_l=_g;this.start_img._applysetPosition(_j,_k,_l-_j,_r-_k);}for(var _e=0;_e<_i;_e++ ){if(_e>0){var _v=this.progress_img_list[_e-1];_j=_v._adjust_left+_v._adjust_width;_k=0;_l=_j+_f;_r=_m;}else{if(this.start_img){_j=this.start_img._adjust_left+this.start_img._adjust_width;_l=_j+_f;}else{_j=0;_l=_f;}}this.progress_img_list[_e]._applysetPosition(_j,_k,_l-_j,_r-_k);this.progress_img=this.progress_img_list[_e];}if(this.end_img&&this.progress_img){_j=this.progress_img._adjust_left+this.progress_img._adjust_width;_l=_j+_h;this.end_img._applysetPosition(_j,_k,_l-_j,_r-_k);}}if(this._text_elem){this._text_elem.destroy();delete this._text_elem;this._text_elem=null;}var _w=this.getElement();if(_w){this._text_elem=new nexacro.TextBoxElement(_w);var _x=this._text_elem;var _y=this.currentstyle.align?(this.currentstyle.align.halign==""?"center":this.currentstyle.align._halign):"center";var _z=this.currentstyle.align?(this.currentstyle.align.valign==""?"middle":this.currentstyle.align._valign):"middle";_x.setElementSize(this._client_width,this._client_height);_x.setElementColor(this.currentstyle.color);_x.setElementFont(this.currentstyle.font);_x.setElementAlignXY(_y,_z);if(_x){_x.create();}this.on_apply_text(this.text);}}};delete _pProgressBar;nexacro.ProgressBarCell=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){nexacro.StaticCtrl.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i);this._is_reference_control=false;};_pProgressBarCell=nexacro.ProgressBarCell.prototype=nexacro._createPrototype(nexacro.StaticCtrl,nexacro.ProgressBarCell);_pProgressBarCell.on_find_CurrentStyle_gradation=function(_a){return this.parent._find_pseudo_obj("bargradation",_a,"gradation");};_pProgressBarCell.on_find_CurrentStyle_padding=nexacro._emptyFn;_pProgressBarCell.on_apply_style_color=nexacro._emptyFn;_pProgressBarCell.on_apply_style_font=nexacro._emptyFn;_pProgressBarCell.on_apply_style_align=nexacro._emptyFn;_pProgressBarCell.on_apply_expr=nexacro._emptyFn;_pProgressBarCell.on_apply_wordwrap=nexacro._emptyFn;delete _pProgressBarCell;nexacro.ProgressBarImg=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){nexacro.StaticCtrl.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i);this._is_reference_control=false;};_pProgressBarImg=nexacro.ProgressBarImg.prototype=nexacro._createPrototype(nexacro.StaticCtrl,nexacro.ProgressBarImg);_pProgressBarImg.on_find_CurrentStyle_border=nexacro._emptyFn;_pProgressBarImg.on_find_CurrentStyle_padding=nexacro._emptyFn;_pProgressBarImg.on_apply_style_color=nexacro._emptyFn;_pProgressBarImg.on_apply_style_font=nexacro._emptyFn;_pProgressBarImg.on_apply_style_align=nexacro._emptyFn;_pProgressBarImg.on_apply_expr=nexacro._emptyFn;_pProgressBarImg.on_apply_wordwrap=nexacro._emptyFn;delete _pProgressBarImg;nexacro.ProgressBarCtrl=function(_a,_b,_c,_d,_e,_f,_g,_h,_i){nexacro.ProgressBar.call(this,_a,_b,_c,_d,_e,_f,_g,_h,_i);this._is_subcontrol=true;};var _pProgressBarCtrl=nexacro.ProgressBarCtrl.prototype=nexacro._createPrototype(nexacro.ProgressBar,nexacro.ProgressBarCtrl);_pProgressBarCtrl._type_name="ProgressBarControl";_pProgressBarCtrl._is_focus_accept=false;nexacro._setForControlStyleFinder(_pProgressBarCtrl);delete _pProgressBarCtrl;}