--- a/htdocs/luci-static/resources/view/modem/modempreview.js
+++ b/htdocs/luci-static/resources/view/modem/modempreview.js
@@ -350,10 +350,11 @@
 lacView.innerHTML='-';else
 lacView.innerHTML=json[2].lac_dec+' ('+json[2].lac_hex+')';}}
 let tacView=document.getElementById(modem.tacId);if(tacView){let tacObj=(json[2].addon||[]).find(function(i){return i.key==='TAC';});let tac=tacObj?tacObj.value:_('-');tacView.innerHTML=(hidedata&&hide_list.indexOf('TAC')>=0)?tac.replace(/./g,'#'):tac;}
+let distView=document.getElementById(modem.distId);if(distView){let distObj=(json[2].addon||[]).find(function(i){return i.key==='Distance';});let dist=distObj?(distObj.value==='Distance to BTS'?_('Distance to BTS'):_(distObj.value)):_('-');distView.innerHTML=(hidedata&&hide_list.indexOf('Distance to BTS')>=0)?dist.replace(/./g,'#'):dist;}
 let mccView=document.getElementById(modem.mccId);if(mccView){mccView.innerHTML=(hidedata&&hide_list.indexOf('MCC')>=0)?(json[2].operator_mcc||'').replace(/./g,'#'):(json[2].operator_mcc||'');}
 let mncView=document.getElementById(modem.mncId);if(mncView){mncView.innerHTML=(hidedata&&hide_list.indexOf('MNC')>=0)?(json[2].operator_mnc||'').replace(/./g,'#'):(json[2].operator_mnc||'');}
 let modeView=document.getElementById(modem.modeId);if(modeView){if((json[2].mode||'').length<=1){modeView.textContent='-';if(lteTable)lteTable.style.display='none';if(wcdmaTable)wcdmaTable.style.display='none';let bs5=document.getElementById(modem.bandshowId);if(bs5)bs5.style.display='none';}else{let modeRaw2=json[2].mode||'';let modeUp=modeRaw2.toUpperCase();let modeDisplay;if(modeUp.indexOf('LTE')>=0||modeUp.indexOf('5G')>=0){let tech='';if(modeUp.indexOf('LTE')>=0)tech=modeRaw2.split(' ')[0];if(modeUp.indexOf('5G')>=0)tech=modeRaw2.split(' ')[0]+(modeRaw2.split(' ')[1]?(' '+modeRaw2.split(' ')[1]):'');let count=(modeRaw2.match(/\//g)||[]).length+1;modeDisplay=(count>1)?(tech+' ('+count+'CA)'):tech;}else{modeDisplay=modeRaw2.split(' ')[0];}
 modeDisplay=modeDisplay.replace('LTE_A','LTE-A');modeView.textContent=modeDisplay;}}});})().catch(function(e){console.error('JSON parsing error',modem.comm_port,e);});})).then(function(){return Promise.resolve();});}
 return view.extend({load:function(){return Promise.all([uci.load('defmodems'),uci.load('modemdata')]);},render:function(data){addDarkModeStyles();let sections=uci.sections('defmodems','defmodems')||[];let sectionsxt=uci.sections('modemdata','modemdata')||[];loadUCInterval();let info=_('For more information about the modemdata package, please visit: %shttps://github.com/obsy/modemdata%s.').format('<a href="https://github.com/obsy/modemdata" target="_blank">','</a>');if(!Array.isArray(sections)||sections.length===0){let modemsModal=baseclass.extend({__init__:function(){this.title=_('No Modems Detected...');this.description=_('Oops.. there are no modems in settings. You will be redirected to a tab where you can define the installed modem(s).');this.countdown=10;this.timer=null;},startCountdown:function(){let self=this;let countdownLabel=document.getElementById('countdownLabel');this.timer=setInterval(function(){self.countdown--;if(self.countdown>0){countdownLabel.textContent=_('Redirecting in')+' '+self.countdown+' '+_('seconds...');}else{clearInterval(self.timer);countdownLabel.textContent=_('Redirecting...');let pkg={get modemdefURI(){return'admin/modem/modemdata/modemdefine';}};window.location.href=L.url(pkg.modemdefURI);}},1000);},render:function(){ui.showModal(this.title,[E('div',{class:'info-message'},[E('p',{},this.description),E('label',{id:'countdownLabel'},_('Redirecting in')+' '+this.countdown+' '+_('seconds...'))]),],'cbi-modal');this.startCountdown();}});let modemDialog=new modemsModal();modemDialog.render();return E([E('h2',{'class':'fade-in'},_('Modemdata')),E('div',{'class':'cbi-section-descr fade-in'},_('Package allows the user to view the data read from the modem, to see the parameters of the connection to the mobile network.')+'<br />'+info)]);}
-let globalToolbar=E('div',{'class':'right','style':'width:100%; margin-bottom:8px; display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; flex-wrap:wrap;'},[E('div',{'style':'display:flex; flex-direction:column; align-items:flex-start; gap:.5rem; min-width:320px;'},[E('div',{'style':'display:flex; align-items:center; gap:.75rem; flex-wrap:wrap;'},[E('label',{'for':'selectInterval','style':'text-align:left;'},_('Auto update every:')),E('select',{'id':'selectInterval','change':clickToSelectInterval},[E('option',{value:'-1'},_('Disabled')),E('option',{value:'5'},_('5 seconds')),E('option',{value:'10'},_('10 seconds')),E('option',{value:'30'},_('30 seconds')),E('option',{value:'45'},_('45 seconds'))])]),E('label',{'id':'countdown-label','style':'font-size:.9em; opacity:.85; min-height:1.2em; margin-top:.25rem; text-align:left;'},E('em',{'class':'spinning'},_('Please wait... data collection is in progress.')))]),E('div',{'style':'display:flex; align-items:center; gap:1rem; margin-left:auto; flex-wrap:wrap;'},[E('label',{'class':'cbi-checkbox','style':'user-select:none;'},[E('input',{'id':'hide-data','type':'checkbox','name':'showhistory','title':_('Hide selected data')}),' ',E('label',{'for':'hide-data'}),' ',_('Hide data.')]),])]);let tabsContainer=E('div',{'class':'cbi-section-node cbi-section-node-tabbed'});let modemTabs=[];let wcdmaTableTitles=[_('Name'),_('UARFCN'),_('RSSI'),_('RSCP'),_('EC/IO'),];let lteTableTitles=[_('Band'),_('Bandwidth'),_('Physical cell ID'),_('EARFCN'),_('RSSI'),_('RSRP'),_('RSRQ'),_('SINR'),];for(let i=0;i<sections.length;i++){let modem=sections[i];let rmethod=modem.modemdata||'-';let fplmn=modem.forced_plmn||'-';let rmbim=modem.onproxy||'-';let modemName=modem.modem||'-';let desc=modem.user_desc||'-';let net=modem.network||'-';let mport=modem.comm_port||'-';let tabTitle=modemName+(desc.length>=2?(' ('+desc+')'):'');let signalId='signal_'+i;let connstId='connst_'+i;let stateId='state_'+i;let operatorId='operator_'+i;let countryId='country_'+i;let simId='sim_'+i;let rxId='rx_'+i;let txId='tx_'+i;let slotId='slot_'+i;let slotDivId='slotDiv_'+i;let tempDivId='tempDiv_'+i;let iccidId='iccid_'+i;let imeiId='imei_'+i;let imsiId='imsi_'+i;let modemtypeId='modemtype_'+i;let firmwareId='firmware_'+i;let tempId='temp_'+i;let cellId='cell_'+i;let lacId='lac_'+i;let tacId='tac_'+i;let mccId='mcc_'+i;let mncId='mnc_'+i;let modeId='mode_'+i;let bandshowId='bandshow_'+i;let wcdmaTableId='wcdmaTable_'+i;let lteTableId='lteTable_'+i;let wcdmaTable=E('table',{'class':'table','id':wcdmaTableId,'style':'border:1px solid var(--border-color-medium)!important; table-layout:fixed; border-collapse:collapse; width:100%; display:none; font-size:12px;'},E('tr',{'class':'tr table-titles'},[E('th',{'class':'th left','style':'min-width:80px; width:80px;'},wcdmaTableTitles[0]),E('th',{'class':'th left','style':'min-width:80px; width:80px;;'},wcdmaTableTitles[1]),E('th',{'class':'th left','style':'min-width:100px; width:100px;'},wcdmaTableTitles[2]),E('th',{'class':'th left','style':'min-width:100px; width:100px;'},wcdmaTableTitles[3]),E('th',{'class':'th left','style':'min-width:100px; width:100px;'},wcdmaTableTitles[4])]));let lteTable=E('table',{'class':'table','id':lteTableId,'style':'border:1px solid var(--border-color-medium)!important; table-layout:fixed; border-collapse:collapse; width:100%; display:none; font-size:12px;'},E('tr',{'class':'tr table-titles'},[E('th',{'class':'th left','style':'min-width:75px; width:85px;'},lteTableTitles[0]),E('th',{'class':'th left','style':'min-width:55px;  width:60px;'},lteTableTitles[1]),E('th',{'class':'th left','style':'min-width:50px;  width:60px;'},lteTableTitles[2]),E('th',{'class':'th left','style':'min-width:35px;  width:45px;'},lteTableTitles[3]),E('th',{'class':'th left','style':'min-width:90px;  width:100px;'},lteTableTitles[4]),E('th',{'class':'th left','style':'min-width:90px;  width:100px;'},lteTableTitles[5]),E('th',{'class':'th left','style':'min-width:90px;  width:100px;'},lteTableTitles[6]),E('th',{'class':'th left','style':'min-width:90px;  width:100px;'},lteTableTitles[7])]));const perTabToolbar=E('div',{'style':'display:flex; align-items:center; gap:.5rem; margin-left:auto;'},[E('span',{},_('Primary band')),E('button',{'class':'btn cbi-button-neutral','id':'basicSignals_'+i,'data-tooltip':_('Show signal levels'),'click':ui.createHandlerFn(this,function(){openBasicSignalsModal(i);})},_('☰')),E('span',{},_('Search BTS')),E('button',{'class':'cbi-button cbi-button-action important','id':'btsSearch_'+i,'click':ui.createHandlerFn(this,function(){return handleAction(i);})},_('Search'))]);let modemTab=E('div',{'data-tab':'tab'+i,'data-tab-title':tabTitle},[E('div',{'style':'display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.25rem;'},[E('h4',{},[_('General Information')]),perTabToolbar]),E('div',{'style':'display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));margin-bottom:1em;gap:1em'},[E('div',{'class':'ifacebox','style':'margin:.25em;width:100%'},[E('div',{'class':'ifacebox-head port-label','style':'font-weight:bold;padding:8px'},[_('Connection')]),E('div',{'class':'ifacebox-body','style':'padding:8px'},[E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:8px;font-size:12px'},[E('span',{},_('Signal')+':'),E('span',{'style':'font-weight:500','id':signalId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:8px;font-size:12px'},[E('span',{'style':'min-width:0; max-width:70%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;'},_('Connection state')+':'),E('span',{'style':'font-weight:500','id':stateId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Operator')+':'),E('span',{'style':'font-weight:500','id':operatorId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Country')+':'),E('span',{'style':'font-weight:500','id':countryId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Technology')+':'),E('span',{'style':'font-weight:500','id':modeId},['-'])]),E('div',{'style':'text-align:left;font-size:11px;border-top:1px solid var(--border-color-medium);padding-top:8px'},[E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{'style':'min-width:0; max-width:75%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;'},_('Connection time')+':'),E('span',{'style':'font-weight:500','id':connstId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:2px'},[E('span','▲ '+_('Sent')+':'),E('span',{'style':'font-weight:500','id':txId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between'},[E('span','▼ '+_('Received')+':'),E('span',{'style':'font-weight:500','id':rxId},['-'])])])])]),E('div',{'class':'ifacebox','style':'margin:.25em;width:100%'},[E('div',{'class':'ifacebox-head port-label','style':'font-weight:bold;padding:8px'},[_('SIM Card')]),E('div',{'class':'ifacebox-body','style':'padding:8px'},[E('div',{'id':slotDivId,'style':'display:none;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Slot in use')+':'),E('span',{'style':'font-weight:500','id':slotId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('SIM status')+':'),E('span',{'style':'font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:75%; display:inline-block; cursor:pointer;','id':simId,'title':'-'},['-'])]),E('div',{'style':'text-align:left;font-size:11px;border-top:1px solid var(--border-color-medium);padding-top:8px'},[E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('IMSI')+':'),E('span',{'style':'font-weight:500','id':imsiId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('ICCID')+':'),E('span',{'style':'font-weight:500','id':iccidId},['-'])])])])]),E('div',{'class':'ifacebox','style':'margin:.25em;width:100%'},[E('div',{'class':'ifacebox-head port-label','style':'font-weight:bold;padding:8px'},[_('Modem Information')]),E('div',{'class':'ifacebox-body','style':'padding:8px'},[E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Modem type')+':'),E('span',{'style':'font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:60%; display:inline-block; cursor:pointer;','id':modemtypeId,'title':'-'},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Revision / FW')+':'),E('span',{'style':'font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:60%; display:inline-block; cursor:pointer;','id':firmwareId,'title':'-'},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Modem IMEI')+':'),E('span',{'style':'font-weight:500','id':imeiId},['-'])]),E('div',{'id':tempDivId,'style':'display:none;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Chip Temperature')+':'),E('span',{'style':'font-weight:500','id':tempId},['-'])])])]),E('div',{'class':'ifacebox','style':'margin:.25em;width:100%'},[E('div',{'class':'ifacebox-head port-label','style':'font-weight:bold;padding:8px'},[_('Cell Information')]),E('div',{'class':'ifacebox-body','style':'padding:8px'},[E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Cell ID')+':'),E('span',{'style':'font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:42%; display:inline-block; cursor:pointer;','id':cellId,'title':_('Click to view Cell ID details'),'click':ui.createHandlerFn(this,function(){openCellIdModal(i);})},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('TAC')+':'),E('span',{'style':'font-weight:500','id':tacId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('LAC')+':'),E('span',{'style':'font-weight:500','id':lacId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Mobile Country Code')+':'),E('span',{'style':'font-weight:500','id':mccId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Mobile Network Code')+':'),E('span',{'style':'font-weight:500','id':mncId},['-'])])])])]),E('h4',{id:bandshowId,style:'display: none;'},[_('Bands')]),wcdmaTable,lteTable]);tabsContainer.append(modemTab);modemTabs.push({index:i,network:net,comm_port:mport,forced_plmn_op:fplmn,mbim_op:rmbim,modemdata:rmethod,signalId:signalId,connstId:connstId,operatorId:operatorId,countryId:countryId,simId:simId,rxId:rxId,txId:txId,slotId:slotId,slotDivId:slotDivId,tempDivId:tempDivId,iccidId:iccidId,imeiId:imeiId,imsiId:imsiId,modemtypeId:modemtypeId,firmwareId:firmwareId,tempId:tempId,cellId:cellId,lacId:lacId,tacId:tacId,mccId:mccId,mncId:mncId,stateId:stateId,modeId:modeId,bandshowId:bandshowId,wcdmaTableId:wcdmaTableId,lteTableId:lteTableId});}
-setTimeout(function(){refresh.labelEl=document.getElementById('countdown-label');refresh.selectEl=document.getElementById('selectInterval');if(refresh.selectEl)refresh.selectEl.value=String(refresh.interval);if(!poll.active()||refresh.interval<0)setUpdateMessage(refresh.labelEl,-1);},0);document.addEventListener('poll-start',function(){if(refresh.selectEl)refresh.selectEl.value=String(refresh.interval);});document.addEventListener('poll-stop',function(){if(refresh.selectEl)refresh.selectEl.value='-1';setUpdateMessage(refresh.labelEl,-1);});poll.add(function(){return updateDataTick(function(){return CreateModemMultiverse(modemTabs,sectionsxt);});},1);setTimeout(function(){ui.tabs.initTabGroup(tabsContainer.children);},0);return E([E('h2',{'class':'fade-in'},_('Modemdata')),E('div',{'class':'cbi-section-descr fade-in'},_('Package allows the user to view the data read from the modem, to see the parameters of the connection to the mobile network.')+'<br />'+info),E('hr'),globalToolbar,tabsContainer]);},handleSaveApply:null,handleSave:null,handleReset:null});
\ No newline at end of file
+let globalToolbar=E('div',{'class':'right','style':'width:100%; margin-bottom:8px; display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; flex-wrap:wrap;'},[E('div',{'style':'display:flex; flex-direction:column; align-items:flex-start; gap:.5rem; min-width:320px;'},[E('div',{'style':'display:flex; align-items:center; gap:.75rem; flex-wrap:wrap;'},[E('label',{'for':'selectInterval','style':'text-align:left;'},_('Auto update every:')),E('select',{'id':'selectInterval','change':clickToSelectInterval},[E('option',{value:'-1'},_('Disabled')),E('option',{value:'5'},_('5 seconds')),E('option',{value:'10'},_('10 seconds')),E('option',{value:'30'},_('30 seconds')),E('option',{value:'45'},_('45 seconds'))])]),E('label',{'id':'countdown-label','style':'font-size:.9em; opacity:.85; min-height:1.2em; margin-top:.25rem; text-align:left;'},E('em',{'class':'spinning'},_('Please wait... data collection is in progress.')))]),E('div',{'style':'display:flex; align-items:center; gap:1rem; margin-left:auto; flex-wrap:wrap;'},[E('label',{'class':'cbi-checkbox','style':'user-select:none;'},[E('input',{'id':'hide-data','type':'checkbox','name':'showhistory','title':_('Hide selected data')}),' ',E('label',{'for':'hide-data'}),' ',_('Hide data.')]),])]);let tabsContainer=E('div',{'class':'cbi-section-node cbi-section-node-tabbed'});let modemTabs=[];let wcdmaTableTitles=[_('Name'),_('UARFCN'),_('RSSI'),_('RSCP'),_('EC/IO'),];let lteTableTitles=[_('Band'),_('Bandwidth'),_('Physical cell ID'),_('EARFCN'),_('RSSI'),_('RSRP'),_('RSRQ'),_('SINR'),];for(let i=0;i<sections.length;i++){let modem=sections[i];let rmethod=modem.modemdata||'-';let fplmn=modem.forced_plmn||'-';let rmbim=modem.onproxy||'-';let modemName=modem.modem||'-';let desc=modem.user_desc||'-';let net=modem.network||'-';let mport=modem.comm_port||'-';let tabTitle=modemName+(desc.length>=2?(' ('+desc+')'):'');let signalId='signal_'+i;let connstId='connst_'+i;let stateId='state_'+i;let operatorId='operator_'+i;let countryId='country_'+i;let simId='sim_'+i;let rxId='rx_'+i;let txId='tx_'+i;let slotId='slot_'+i;let slotDivId='slotDiv_'+i;let tempDivId='tempDiv_'+i;let iccidId='iccid_'+i;let imeiId='imei_'+i;let imsiId='imsi_'+i;let modemtypeId='modemtype_'+i;let firmwareId='firmware_'+i;let tempId='temp_'+i;let cellId='cell_'+i;let lacId='lac_'+i;let tacId='tac_'+i;let mccId='mcc_'+i;let mncId='mnc_'+i;let distId='dist_'+i;let modeId='mode_'+i;let bandshowId='bandshow_'+i;let wcdmaTableId='wcdmaTable_'+i;let lteTableId='lteTable_'+i;let wcdmaTable=E('table',{'class':'table','id':wcdmaTableId,'style':'border:1px solid var(--border-color-medium)!important; table-layout:fixed; border-collapse:collapse; width:100%; display:none; font-size:12px;'},E('tr',{'class':'tr table-titles'},[E('th',{'class':'th left','style':'min-width:80px; width:80px;'},wcdmaTableTitles[0]),E('th',{'class':'th left','style':'min-width:80px; width:80px;;'},wcdmaTableTitles[1]),E('th',{'class':'th left','style':'min-width:100px; width:100px;'},wcdmaTableTitles[2]),E('th',{'class':'th left','style':'min-width:100px; width:100px;'},wcdmaTableTitles[3]),E('th',{'class':'th left','style':'min-width:100px; width:100px;'},wcdmaTableTitles[4])]));let lteTable=E('table',{'class':'table','id':lteTableId,'style':'border:1px solid var(--border-color-medium)!important; table-layout:fixed; border-collapse:collapse; width:100%; display:none; font-size:12px;'},E('tr',{'class':'tr table-titles'},[E('th',{'class':'th left','style':'min-width:75px; width:85px;'},lteTableTitles[0]),E('th',{'class':'th left','style':'min-width:55px;  width:60px;'},lteTableTitles[1]),E('th',{'class':'th left','style':'min-width:50px;  width:60px;'},lteTableTitles[2]),E('th',{'class':'th left','style':'min-width:35px;  width:45px;'},lteTableTitles[3]),E('th',{'class':'th left','style':'min-width:90px;  width:100px;'},lteTableTitles[4]),E('th',{'class':'th left','style':'min-width:90px;  width:100px;'},lteTableTitles[5]),E('th',{'class':'th left','style':'min-width:90px;  width:100px;'},lteTableTitles[6]),E('th',{'class':'th left','style':'min-width:90px;  width:100px;'},lteTableTitles[7])]));const perTabToolbar=E('div',{'style':'display:flex; align-items:center; gap:.5rem; margin-left:auto;'},[E('span',{},_('Primary band')),E('button',{'class':'btn cbi-button-neutral','id':'basicSignals_'+i,'data-tooltip':_('Show signal levels'),'click':ui.createHandlerFn(this,function(){openBasicSignalsModal(i);})},_('☰')),E('span',{},_('Search BTS')),E('button',{'class':'cbi-button cbi-button-action important','id':'btsSearch_'+i,'click':ui.createHandlerFn(this,function(){return handleAction(i);})},_('Search'))]);let modemTab=E('div',{'data-tab':'tab'+i,'data-tab-title':tabTitle},[E('div',{'style':'display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.25rem;'},[E('h4',{},[_('General Information')]),perTabToolbar]),E('div',{'style':'display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));margin-bottom:1em;gap:1em'},[E('div',{'class':'ifacebox','style':'margin:.25em;width:100%'},[E('div',{'class':'ifacebox-head port-label','style':'font-weight:bold;padding:8px'},[_('Connection')]),E('div',{'class':'ifacebox-body','style':'padding:8px'},[E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:8px;font-size:12px'},[E('span',{},_('Signal')+':'),E('span',{'style':'font-weight:500','id':signalId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:8px;font-size:12px'},[E('span',{'style':'min-width:0; max-width:70%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;'},_('Connection state')+':'),E('span',{'style':'font-weight:500','id':stateId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Operator')+':'),E('span',{'style':'font-weight:500','id':operatorId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Country')+':'),E('span',{'style':'font-weight:500','id':countryId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Technology')+':'),E('span',{'style':'font-weight:500','id':modeId},['-'])]),E('div',{'style':'text-align:left;font-size:11px;border-top:1px solid var(--border-color-medium);padding-top:8px'},[E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{'style':'min-width:0; max-width:75%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;'},_('Connection time')+':'),E('span',{'style':'font-weight:500','id':connstId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:2px'},[E('span','▲ '+_('Sent')+':'),E('span',{'style':'font-weight:500','id':txId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between'},[E('span','▼ '+_('Received')+':'),E('span',{'style':'font-weight:500','id':rxId},['-'])])])])]),E('div',{'class':'ifacebox','style':'margin:.25em;width:100%'},[E('div',{'class':'ifacebox-head port-label','style':'font-weight:bold;padding:8px'},[_('SIM Card')]),E('div',{'class':'ifacebox-body','style':'padding:8px'},[E('div',{'id':slotDivId,'style':'display:none;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Slot in use')+':'),E('span',{'style':'font-weight:500','id':slotId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('SIM status')+':'),E('span',{'style':'font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:75%; display:inline-block; cursor:pointer;','id':simId,'title':'-'},['-'])]),E('div',{'style':'text-align:left;font-size:11px;border-top:1px solid var(--border-color-medium);padding-top:8px'},[E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('IMSI')+':'),E('span',{'style':'font-weight:500','id':imsiId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('ICCID')+':'),E('span',{'style':'font-weight:500','id':iccidId},['-'])])])])]),E('div',{'class':'ifacebox','style':'margin:.25em;width:100%'},[E('div',{'class':'ifacebox-head port-label','style':'font-weight:bold;padding:8px'},[_('Modem Information')]),E('div',{'class':'ifacebox-body','style':'padding:8px'},[E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Modem type')+':'),E('span',{'style':'font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:60%; display:inline-block; cursor:pointer;','id':modemtypeId,'title':'-'},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Revision / FW')+':'),E('span',{'style':'font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:60%; display:inline-block; cursor:pointer;','id':firmwareId,'title':'-'},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Modem IMEI')+':'),E('span',{'style':'font-weight:500','id':imeiId},['-'])]),E('div',{'id':tempDivId,'style':'display:none;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Chip Temperature')+':'),E('span',{'style':'font-weight:500','id':tempId},['-'])])])]),E('div',{'class':'ifacebox','style':'margin:.25em;width:100%'},[E('div',{'class':'ifacebox-head port-label','style':'font-weight:bold;padding:8px'},[_('Cell Information')]),E('div',{'class':'ifacebox-body','style':'padding:8px'},[E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Cell ID')+':'),E('span',{'style':'font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:42%; display:inline-block; cursor:pointer;','id':cellId,'title':_('Click to view Cell ID details'),'click':ui.createHandlerFn(this,function(){openCellIdModal(i);})},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('TAC')+':'),E('span',{'style':'font-weight:500','id':tacId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('LAC')+':'),E('span',{'style':'font-weight:500','id':lacId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Mobile Country Code')+':'),E('span',{'style':'font-weight:500','id':mccId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Mobile Network Code')+':'),E('span',{'style':'font-weight:500','id':mncId},['-'])]),E('div',{'style':'display:flex;justify-content:space-between;margin-bottom:4px;font-size:12px'},[E('span',{},_('Distance to BTS')+':'),E('span',{'style':'font-weight:500','id':distId},['-'])])])])]),E('h4',{id:bandshowId,style:'display: none;'},[_('Bands')]),wcdmaTable,lteTable]);tabsContainer.append(modemTab);modemTabs.push({index:i,network:net,comm_port:mport,forced_plmn_op:fplmn,mbim_op:rmbim,modemdata:rmethod,signalId:signalId,connstId:connstId,operatorId:operatorId,countryId:countryId,simId:simId,rxId:rxId,txId:txId,slotId:slotId,slotDivId:slotDivId,tempDivId:tempDivId,iccidId:iccidId,imeiId:imeiId,imsiId:imsiId,modemtypeId:modemtypeId,firmwareId:firmwareId,tempId:tempId,cellId:cellId,lacId:lacId,tacId:tacId,mccId:mccId,mncId:mncId,distId:distId,stateId:stateId,modeId:modeId,bandshowId:bandshowId,wcdmaTableId:wcdmaTableId,lteTableId:lteTableId});}
+setTimeout(function(){refresh.labelEl=document.getElementById('countdown-label');refresh.selectEl=document.getElementById('selectInterval');if(refresh.selectEl)refresh.selectEl.value=String(refresh.interval);if(!poll.active()||refresh.interval<0)setUpdateMessage(refresh.labelEl,-1);},0);document.addEventListener('poll-start',function(){if(refresh.selectEl)refresh.selectEl.value=String(refresh.interval);});document.addEventListener('poll-stop',function(){if(refresh.selectEl)refresh.selectEl.value='-1';setUpdateMessage(refresh.labelEl,-1);});poll.add(function(){return updateDataTick(function(){return CreateModemMultiverse(modemTabs,sectionsxt);});},1);setTimeout(function(){ui.tabs.initTabGroup(tabsContainer.children);},0);return E([E('h2',{'class':'fade-in'},_('Modemdata')),E('div',{'class':'cbi-section-descr fade-in'},_('Package allows the user to view the data read from the modem, to see the parameters of the connection to the mobile network.')+'<br />'+info),E('hr'),globalToolbar,tabsContainer]);},handleSaveApply:null,handleSave:null,handleReset:null});
