function buildBootmanager(data){function gv(src,id){var r=src.filter(function(e){return e.id===id});if(r.length>0)return r[0].value};function nl(frag,cnt=1){while(cnt--){html2.add(frag,html2.br())}};var m=data.filter(function(d){return d.name==="messages"})[0].obj;var v=data.filter(function(d){return d.name==="values"})[0].obj;var r=html2.fragment();if(v.length==0){html2.add(r,html2.h3({},gv(m,"nodata")));return r}html2.add(r,html2.h3({},gv(m,"headline")));nl(r);var ct=html2.span();var at=html2.span();var cs=gv(v,"current_switch_value");html2.add(ct,html2.strong({style:gv(m,"style_caption")},gv(m,"currsys")));html2.add(ct,html2.printf(gv(m,"switchvalue"),cs));nl(ct,2);html2.add(ct,html2.printf(gv(m,"version"),gv(v,"active_version"),gv(v,"active_date")));if(gv(v,"active_modified_at")){nl(ct);html2.add(ct,html2.printf(gv(m,"modified"),gv(v,"active_modified_at"),gv(v,"active_modified_by")))}nl(ct,2);html2.add(at,html2.strong({style:gv(m,"style_caption")},gv(m,"altsys")));html2.add(at,html2.printf(gv(m,"switchvalue"),cs?((parseInt(cs)+1)%2).toString():"0"));nl(at,2);var inactive=gv(v,"inactive_version");if(inactive!="missing"){if(inactive.length>0){html2.add(at,html2.printf(gv(m,"version"),gv(v,"inactive_version"),gv(v,"inactive_date")));if(gv(v,"inactive_modified_at")){nl(at);html2.add(at,html2.printf(gv(m,"modified"),gv(v,"inactive_modified_at"),gv(v,"inactive_modified_by")))}}else{gv(m,"altinv").split("\n").forEach(function(l){html2.add(at,l);nl(at)})}}else{html2.add(at,gv(m,"altmiss"))}nl(at,2);var radios=html2.radios({name:'linux_fs_start',selected:(gv(v,"system_is_switched")=="true"?'alternative':'running'),attr:{disabled:(inactive=="missing"?true:false),onClick:onChangeLinuxFsStart},options:[{value:'running',text:ct},{value:'alternative',text:at,}]});html2.add(r,radios);html2.add(r,html2.h4({},gv(m,"brndhead")));var cb=gv(v,"switch_branding_support");if(cb=="false"){html2.add(r,html2.span({},gv(m,"brndunsupp")));html2.add(r,html2.hiddenInput({name:"alternative_branding",value:gv(v,"current_branding")}))}else{var rb=html2.span({id:"running_branding",style:(gv(v,"system_is_switched")=="true"?'display: none':'')});if(cb=="both_fixed"||cb=="running_fixed"){html2.add(rb,html2.printf(gv(m,"brndcurrfixed"),html2.strong({},gv(v,"current_branding"))));html2.add(r,html2.hiddenInput({name:"running_branding",value:gv(v,"current_branding")}))}else{if(gv(v,"active_brandings").split(" ").length>1){html2.add(rb,html2.printf(gv(m,"brndmulti"),html2.strong({},gv(v,"current_branding"))));nl(rb);var sb=html2.selectBox({id:"uiRunningBranding",name:"running_branding"});gv(v,"active_brandings").split(" ").forEach(function(o){sb.options.add(html2.option({value:o,selected:gv(v,"current_branding")==o?true:false},o))});html2.add(rb,html2.label({for:"uiRunningBranding",style:gv(m,"style_sblbl")},gv(m,"brndset")));html2.add(rb,sb)}else{html2.add(rb,html2.printf(gv(m,"brndcurrsingle"),html2.strong({},gv(v,"current_branding"))));html2.add(r,html2.hiddenInput({name:"running_branding",value:gv(v,"current_branding")}))}}html2.add(r,rb);var ab=html2.span({id:"alternative_branding",style:(gv(v,"system_is_switched")=="true"?'':'display: none')});if(inactive!="missing"){if(inactive.length>0){if(cb=="both_fixed"||cb=="alternative_fixed"){html2.add(ab,html2.printf(gv(m,"brndaltfixed"),html2.strong({},gv(v,"inactive_brandings"))));html2.add(r,html2.hiddenInput({name:"alternative_branding",value:gv(v,"alternative_branding")}))}else{if(gv(v,"inactive_brandings").split(" ").length>1){html2.add(ab,html2.printf(gv(m,"brndmulti"),html2.strong({},gv(v,"current_branding"))));nl(ab);var asb=html2.selectBox({id:"uiAlternativeBranding",name:"alternative_branding",style:gv(m,"style_selbrand")});gv(v,"inactive_brandings").split(" ").forEach(function(o){asb.options.add(html2.option({value:o,selected:gv(v,"current_branding")==o?true:false},o))});if(asb.selectedOptions.length==0){asb.options.forEach(function(o){if(o.value==gv(v,"current_branding"))o.selected=true})}html2.add(ab,html2.label({for:"uiAlternativeBranding",style:gv(m,"style_sblbl")},gv(m,"brndset")));html2.add(ab,asb)}else{html2.add(ab,html2.printf(gv(m,"brndaltsingle"),html2.strong({},gv(v,"inactive_brandings"))));if(gv(v,"inactive_brandings")==gv(v,"current_branding")){html2.add(ab,gv(m,"brndaltnochg"))}else{html2.add(ab,html2.printf(gv(m,"brndaltset"),html2.strong({},gv(v,"current_branding"))));nl(ab);html2.add(ab,html2.printf(gv(m,"brndaltnew"),html2.strong({},gv(v,"inactive_brandings"))))}html2.add(r,html2.hiddenInput({name:"alternative_branding",value:gv(v,"inactive_brandings")}))}}}else{html2.add(ab,gv(m,"brndaltinv"))}}html2.add(r,ab)}return r}