mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-07-21 09:03:23 +02:00
3 lines
75 KiB
JavaScript
3 lines
75 KiB
JavaScript
import{C as wt,a as Nt,L as Bt,P as Ft,b as jt,c as Et,i as It}from"./chart-B185MtDy.js";import{a as dt,r as B,c as W,D as Z,o as xt,E as it,H as vt,b as i,e as t,t as n,n as mt,g as w,I as Ut,p as l,x as ut,J as gt,K as kt,f as st,F as U,h as X,L as ft,M as Lt,i as Pt,u as ct,k as rt,N as Vt,T as Ht,l as zt,O as Xt,j as R,s as Gt,w as $t,q as Tt}from"./index-sHch0610.js";import{u as Ot}from"./useSignalQuality-CGSFiHBW.js";import{g as St,s as Rt}from"./preferences-DtwbSSgO.js";const Qt={class:"sparkline-card"},qt={class:"card-header"},Wt={class:"card-title"},Kt={class:"card-chart"},Jt=dt({name:"ChartSparkline",__name:"ChartSparkline",props:{title:{},value:{},color:{},data:{default:()=>[]},showChart:{type:Boolean,default:!0}},setup(at){wt.register(Nt,Bt,Ft,jt,Et,It);const C=at,G=B(null),m=B(null),P=v=>{if(v.length<3)return v;const D=Math.min(15,Math.max(3,Math.floor(v.length*.2))),j=[];for(let S=0;S<v.length;S++){const k=Math.floor(D/2),r=Math.max(0,S-k),h=Math.min(v.length,S+k+1),b=v.slice(r,h);j.push(b.reduce((y,M)=>y+M,0)/b.length)}const q=Math.min(12,j.length),V=j.length/q,I=[];for(let S=0;S<q;S++){const k=Math.floor(S*V);I.push(j[k])}return I},T=W(()=>!C.data||C.data.length===0?[]:P(C.data)),A=()=>{if(!G.value)return;const v=G.value.getContext("2d");if(!v)return;m.value&&(m.value.destroy(),m.value=null);const D=T.value;D.length<2||(m.value=Ut(new wt(v,{type:"line",data:{labels:D.map((j,q)=>q.toString()),datasets:[{data:D,borderColor:C.color,borderWidth:2.5,fill:!1,tension:.4,pointRadius:0,pointHoverRadius:0}]},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:800,easing:"easeOutQuart"},plugins:{legend:{display:!1},tooltip:{enabled:!1}},scales:{x:{display:!1,grid:{display:!1}},y:{display:!1,grid:{display:!1},grace:"10%"}},elements:{line:{capBezierPoints:!0}}}})))},O=()=>{if(!m.value){A();return}const v=T.value;v.length<2||(m.value.data.labels=v.map((D,j)=>j.toString()),m.value.data.datasets[0].data=v,m.value.update("default"))};return Z(()=>C.data,()=>{it(()=>O())},{deep:!0}),Z(()=>C.color,()=>{m.value&&(m.value.data.datasets[0].borderColor=C.color,m.value.update("none"))}),xt(()=>{it(()=>A())}),vt(()=>{m.value&&(m.value.destroy(),m.value=null)}),(v,D)=>(l(),i("div",Qt,[t("div",qt,[t("p",Wt,n(v.title),1),t("span",{class:"card-value",style:mt({color:v.color})},n(typeof v.value=="number"?v.value.toLocaleString():v.value),5)]),t("div",Kt,[v.showChart?(l(),i("canvas",{key:0,ref_key:"canvasRef",ref:G},null,512)):w("",!0)])]))}}),bt=ut(Jt,[["__scopeId","data-v-bcd5cf93"]]),Yt={class:"grid grid-cols-2 lg:grid-cols-4 gap-3 lg:gap-4 mb-5 stats-cards-container"},Zt=dt({name:"StatsCards",__name:"StatsCards",setup(at){const C=gt(),G=kt(),m=B(null),P=B(null),T=B(!1),A=W(()=>{const D=C.packetStats,j=C.systemStats,q=k=>{const r=Math.floor(k/86400),h=Math.floor(k%86400/3600),b=Math.floor(k%3600/60);return r>0?`${r}d ${h}h`:h>0?`${h}h ${b}m`:`${b}m`},V=D?.total_packets||0,I=D?.dropped_packets||0,S=V>0?Math.round(I/V*100):0;return{packetsReceived:V,packetsForwarded:D?.transmitted_packets||0,uptimeFormatted:j?q(j.uptime_seconds||0):"0m",uptimeHours:j?Math.floor((j.uptime_seconds||0)/3600):0,droppedPackets:I,dropPercent:`${S}%`,signalQuality:Math.round((D?.avg_rssi||0)+120)}}),O=W(()=>C.sparklineData),v=async()=>{if(!T.value)try{T.value=!0,await Promise.all([C.fetchSystemStats(),C.fetchPacketStats({hours:24})]),await it()}catch(D){console.error("Error fetching stats:",D)}finally{T.value=!1}};return xt(async()=>{await C.initializeSparklineHistory(),v(),G.isConnected||(m.value=window.setInterval(v,3e4)),P.value=window.setInterval(()=>{C.interpolateRates()},6e4)}),Z(()=>G.isConnected,D=>{D?m.value&&(clearInterval(m.value),m.value=null):m.value||(m.value=window.setInterval(v,3e4))}),vt(()=>{m.value&&clearInterval(m.value),P.value&&clearInterval(P.value)}),(D,j)=>(l(),i("div",Yt,[st(bt,{title:"Up Time",value:A.value.uptimeFormatted,color:"#EBA0FC",data:[],showChart:!1,class:"stat-card"},null,8,["value"]),st(bt,{title:"RX Packets",value:A.value.packetsReceived,color:"#AAE8E8",data:O.value.totalPackets,class:"stat-card"},null,8,["value","data"]),st(bt,{title:"Forward",value:A.value.packetsForwarded,color:"#FFC246",data:O.value.transmittedPackets,class:"stat-card"},null,8,["value","data"]),st(bt,{title:"Dropped",value:A.value.droppedPackets,color:"#FB787B",data:O.value.droppedPackets,class:"stat-card"},null,8,["value","data"])]))}}),te=ut(Zt,[["__scopeId","data-v-b87cc7f8"]]),ee={class:"glass-card rounded-[10px] p-4 lg:p-6"},se={class:"h-48 lg:h-56 relative"},ae={key:0,class:"absolute inset-0 flex items-center justify-center"},ne={key:1,class:"absolute inset-0 flex items-center justify-center"},oe={class:"text-red-600 dark:text-red-400 text-sm lg:text-base"},re={key:2,class:"absolute inset-0 flex items-center justify-center"},le={key:3,class:"h-full flex flex-col"},ie={key:0,class:"absolute top-2 left-1/2 -translate-x-1/2 bg-white/95 dark:bg-surface-elevated border border-stroke-subtle dark:border-stroke rounded-lg px-3 py-2 z-10 pointer-events-none min-w-48"},de={class:"text-content-primary dark:text-content-primary text-sm font-medium mb-1"},ce={class:"text-content-primary dark:text-content-primary"},ue={class:"flex-1 flex items-end justify-evenly gap-4 px-4"},pe=["onMouseenter"],me={class:"text-content-primary dark:text-content-primary text-xs sm:text-sm font-semibold text-center w-full",style:{"padding-bottom":"5px"}},xe={class:"text-content-secondary dark:text-content-muted text-xs mt-2 text-center"},ye={key:0,class:"mt-4 flex flex-wrap justify-center gap-3 sm:gap-4 px-2 sm:px-4 text-[10px] sm:text-xs text-content-secondary dark:text-content-muted"},be={class:"truncate text-left"},ve={key:1,class:"mt-3 text-xs text-content-secondary dark:text-content-muted text-center"},ge=dt({name:"PacketTypesChart",__name:"PacketTypesChart",setup(at){const C=B([]),G=gt(),m=kt(),P=B(!0),T=B(null),A=B(null),O=[{name:"Payload",types:["Plain Text Message","Group Text Message","Group Datagram","Multi-part Packet"],subColors:["#3B82F6","#60A5FA","#93C5FD","#BFDBFE"]},{name:"Requests",types:["Request","Response","Anonymous Request"],subColors:["#10B981","#34D399","#6EE7B7"]},{name:"Control",types:["Node Advertisement","Acknowledgment","Returned Path"],subColors:["#F59E0B","#FBBF24","#FCD34D"]},{name:"Routing",types:["Trace"],subColors:["#8B5CF6"]},{name:"Reserved",types:["Reserved Type 11","Reserved Type 12","Reserved Type 13"],subColors:["#6B7280","#9CA3AF","#D1D5DB"]}],v=W(()=>O.map(r=>{const h=C.value.filter(b=>r.types.some(y=>b.name.includes(y)||b.name===y)).sort((b,y)=>y.count-b.count).map((b,y)=>({...b,color:r.subColors[y%r.subColors.length]}));return{name:r.name,color:r.subColors[0],items:h,total:h.reduce((b,y)=>b+y.count,0)}}).filter(r=>r.total>0)),D=W(()=>Math.max(...v.value.map(r=>r.total),1)),j=W(()=>v.value.reduce((r,h)=>r+h.total,0)),q=async()=>{try{T.value=null;const r=await ft.get("/packet_type_graph_data");if(r?.success&&r?.data){const h=r.data;if(h?.series){const b=[];h.series.forEach((y,M)=>{let $=0;y.data&&Array.isArray(y.data)&&($=y.data.reduce((s,e)=>s+(e[1]||0),0)),$>0&&b.push({name:y.name||`Type ${y.type}`,type:y.type,count:$,color:""})}),C.value=b,P.value=!1}else T.value="No series data in server response",P.value=!1}else T.value="Invalid response from server",P.value=!1}catch(r){T.value=r instanceof Error?r.message:"Failed to load data",P.value=!1}},V={0:"Request",1:"Response",2:"Plain Text Message",3:"Acknowledgment",4:"Node Advertisement",5:"Group Text Message",6:"Group Datagram",7:"Anonymous Request",8:"Returned Path",9:"Trace",10:"Multi-part Packet",15:"Custom Packet"},I=()=>{const r=G.packetTypeBreakdown;!r||r.length===0||(C.value=r.map(h=>({name:V[Number(h.type)]||`Type ${h.type}`,type:h.type,count:h.count,color:""})),P.value=!1,T.value=null)},S=r=>Math.max(r/D.value*90,2),k=(r,h)=>h===0?0:r/h*100;return xt(()=>{q()}),Z(()=>G.packetTypeBreakdown,()=>I(),{deep:!0,immediate:!0}),Z(()=>m.isConnected,r=>{r||q()},{immediate:!0}),(r,h)=>(l(),i("div",ee,[h[3]||(h[3]=t("div",{class:"flex items-baseline justify-between mb-3 lg:mb-4"},[t("h3",{class:"text-content-primary dark:text-content-primary text-lg lg:text-xl font-semibold"},"Packet Types"),t("p",{class:"text-content-secondary dark:text-content-muted text-xs lg:text-sm uppercase"},"Distribution by Type")],-1)),t("div",se,[P.value?(l(),i("div",ae,h[1]||(h[1]=[t("div",{class:"text-content-secondary dark:text-content-primary text-sm lg:text-base"},"Loading packet types...",-1)]))):T.value?(l(),i("div",ne,[t("div",oe,n(T.value),1)])):v.value.length===0?(l(),i("div",re,h[2]||(h[2]=[t("div",{class:"text-content-secondary dark:text-content-primary text-sm lg:text-base"},"No packet data available",-1)]))):(l(),i("div",le,[A.value?(l(),i("div",ie,[t("div",de,n(A.value.name)+" · "+n(A.value.total.toLocaleString()),1),(l(!0),i(U,null,X(A.value.items,b=>(l(),i("div",{key:b.type,class:"flex justify-between gap-4 text-xs text-content-secondary dark:text-content-muted"},[t("span",null,n(b.name),1),t("span",ce,n(b.count.toLocaleString()),1)]))),128))])):w("",!0),t("div",ue,[(l(!0),i(U,null,X(v.value,b=>(l(),i("div",{key:b.name,class:"flex flex-col items-center flex-1 max-w-32 h-full justify-end cursor-pointer",onMouseenter:y=>A.value=b,onMouseleave:h[0]||(h[0]=y=>A.value=null)},[t("span",me,n(b.total.toLocaleString()),1),t("div",{class:"w-full rounded-[5px] transition-all duration-300 ease-out hover:opacity-90 overflow-hidden flex flex-col-reverse",style:mt({height:S(b.total)+"%",minHeight:"8px"})},[(l(!0),i(U,null,X(b.items,y=>(l(),i("div",{key:y.type,style:mt({height:k(y.count,b.total)+"%",backgroundColor:y.color})},null,4))),128))],4),t("span",xe,n(b.name),1)],40,pe))),128))])]))]),v.value.length>0?(l(),i("div",ye,[(l(!0),i(U,null,X(v.value,b=>(l(),i("div",{key:"legend-"+b.name,class:"flex flex-col gap-0.5 min-w-[100px] max-w-[140px] flex-shrink-0"},[(l(!0),i(U,null,X(b.items,y=>(l(),i("div",{key:y.type,class:"flex items-center gap-1.5"},[t("span",{class:"w-2 h-2 rounded-sm shrink-0",style:mt({backgroundColor:y.color})},null,4),t("span",be,n(y.name),1)]))),128))]))),128))])):w("",!0),v.value.length>0?(l(),i("div",ve," Total: "+n(j.value.toLocaleString())+" packets ",1)):w("",!0)]))}}),he=ut(ge,[["__scopeId","data-v-0948a4bb"]]),fe={class:"glass-card rounded-[10px] p-4 lg:p-6"},ke={class:"relative h-40 lg:h-48"},_e={class:"mt-3 lg:mt-4 grid grid-cols-2 gap-3 lg:gap-4"},we={class:"text-center"},$e={class:"text-lg lg:text-2xl font-bold text-content-primary dark:text-content-primary"},Te={class:"text-center"},Se={class:"text-lg lg:text-2xl font-bold text-content-primary dark:text-content-primary"},Re={class:"mt-2 lg:mt-3 grid grid-cols-3 gap-2 lg:gap-3 text-center"},Pe={class:"text-xs lg:text-sm font-semibold text-accent-purple flex items-center justify-center gap-1"},Ce={key:0,class:"inline-block w-1.5 h-1.5 rounded-full bg-secondary opacity-70",title:"Early data - limited uptime"},Ae={class:"text-xs text-content-secondary dark:text-content-muted"},Me={class:"text-xs lg:text-sm font-semibold text-accent-red flex items-center justify-center gap-1"},De={key:0,class:"inline-block w-1.5 h-1.5 rounded-full bg-secondary opacity-70",title:"Early data - limited uptime"},Ne={class:"text-xs text-content-secondary dark:text-content-muted"},Be={class:"text-xs lg:text-sm font-semibold text-white"},Fe=dt({name:"AirtimeUtilizationChart",__name:"AirtimeUtilizationChart",setup(at){const C=gt(),G=Lt(),m=B(null),P=B([]),T=B(!0),A=B(null),O=B(30),v=B({totalReceived:0,totalTransmitted:0,dropped:0,firstPacketTime:0}),D=B({sf:9,bwHz:62500,cr:5,preamble:17}),j=k=>{const{sf:r,bwHz:h,cr:b,preamble:y}=D.value,M=1,$=0,s=r>=11&&h<=125e3?1:0,e=h/1e3,c=Math.pow(2,r)/e,d=(y+4.25)*c,o=Math.max(8*k-4*r+28+16*M-20*$,0),x=4*(r-2*s),N=(8+Math.ceil(o/x)*b)*c;return d+N},q=(k,r=60)=>{if(k.length===0)return[];const h=1-Math.pow(.5,1/r),b=Math.min(k.length,Math.max(10,Math.floor(r/3)));let y=0,M=0;for(let $=0;$<b;$++)y+=k[$].rxUtil,M+=k[$].txUtil;return y/=b,M/=b,k.map($=>(y=h*$.rxUtil+(1-h)*y,M=h*$.txUtil+(1-h)*M,{...$,rxUtil:y,txUtil:M}))},V=W(()=>{const k=C.packetStats?.total_packets||0,r=C.packetStats?.transmitted_packets||0,h=G.stats?.uptime_seconds||0,b=k||v.value.totalReceived,y=r||v.value.totalTransmitted,M=v.value.firstPacketTime>0?Math.floor(Date.now()/1e3)-v.value.firstPacketTime:0,$=h||M,s=Math.max($/3600,.1);if(s<1){const _=Math.max($/60,1);return{rxRate:{value:Math.round(b/_*100)/100,label:s<.5?"RX/min (early)":"RX/min"},txRate:{value:Math.round(y/_*100)/100,label:s<.5?"TX/min (early)":"TX/min"},confidence:"low"}}const c=Math.round(b/s*100)/100,d=Math.round(y/s*100)/100;let o,x;return s<6?(o=`RX/hr (${Math.round(s)}h)`,x="medium"):s<24?(o=`RX/hr (${Math.round(s)}h)`,x="high"):(o="RX/hr",x="high"),{rxRate:{value:c,label:o},txRate:{value:d,label:o.replace("RX","TX")},confidence:x}}),I=async()=>{T.value=!0;try{const y=Math.floor(Date.now()/1e3),M=y-24*3600;let $=0;try{const f=await ft.get("/stats");if(f.success&&f.data){const g=f.data,F=g.config;if(F?.radio){const Q=F.radio;D.value={sf:Q.spreading_factor??9,bwHz:Q.bandwidth??62500,cr:Q.coding_rate??5,preamble:Q.preamble_length??17}}$=g.dropped_count??0}}catch{}const s=await ft.get("/filtered_packets",{start_timestamp:M,end_timestamp:y,limit:5e4});if(!s.success){P.value=[],T.value=!1,it(()=>S());return}const e=s.data||[],c=new Float64Array(8640),d=new Float64Array(8640);let o=0,x=0,_=1/0;for(const f of e){const g=Math.floor((f.timestamp-M)/10);if(g<0||g>=8640)continue;const F=f.length??f.payload_length??32,Q=j(F),et=f.packet_origin;f.timestamp<_&&(_=f.timestamp),(et==="tx_local"||et==="tx_forward"||f.transmitted)&&(d[g]+=Q,x++),et!=="tx_local"&&(c[g]+=Q,o++)}v.value={totalReceived:o,totalTransmitted:x,dropped:$,firstPacketTime:_===1/0?y:_};const N=[];for(let f=0;f<8640;f++)N.push({timestamp:M+f*10,rxUtil:c[f]/1e4*100,txUtil:d[f]/1e4*100});const E=q(N,60),K=Math.max(1,Math.floor(E.length/400)),tt=[];for(let f=0;f<E.length;f+=K){let g=0,F=0,Q=0;const et=E[f].timestamp;for(let Y=f;Y<Math.min(f+K,E.length);Y++)g+=E[Y].rxUtil,F+=E[Y].txUtil,Q++;tt.push({timestamp:et,rxUtil:g/Q,txUtil:F/Q})}P.value=tt;const H=Math.max(...tt.flatMap(f=>[f.rxUtil,f.txUtil]))*1.05;O.value=Math.max(5,Math.ceil(H/5)*5),T.value=!1,it(()=>S())}catch(k){console.error("Failed to fetch airtime data:",k),P.value=[],T.value=!1,it(()=>S())}},S=()=>{if(!m.value)return;const k=m.value,r=k.getContext("2d");if(!r)return;const h=k.parentElement;if(!h)return;const b=h.getBoundingClientRect(),y=b.width,M=b.height;k.width=y*window.devicePixelRatio,k.height=M*window.devicePixelRatio,k.style.width=y+"px",k.style.height=M+"px",r.scale(window.devicePixelRatio,window.devicePixelRatio);const $=20,s=45;if(r.clearRect(0,0,y,M),T.value){r.fillStyle="#666",r.font="16px system-ui",r.textAlign="center",r.fillText("Loading chart data...",y/2,M/2);return}if(P.value.length===0){r.fillStyle="#666",r.font="16px system-ui",r.textAlign="center",r.fillText("No data available",y/2,M/2);return}const e=y-s-$,c=M-$*2,d=O.value,o=O.value;r.strokeStyle="rgba(255, 255, 255, 0.1)",r.lineWidth=1,r.font="10px system-ui",r.textAlign="right";for(let x=0;x<=5;x++){const _=$+c*x/5;r.beginPath(),r.moveTo(s,_),r.lineTo(y-$,_),r.stroke();const N=d-x/5*o;r.fillStyle="rgba(255, 255, 255, 0.5)",r.fillText(`${N.toFixed(0)}%`,s-5,_+3)}for(let x=0;x<=6;x++){const _=s+e*x/6;r.beginPath(),r.moveTo(_,$),r.lineTo(_,M-$),r.stroke()}P.value.length>1&&(r.strokeStyle="#EBA0FC",r.lineWidth=2,r.beginPath(),P.value.forEach((x,_)=>{const N=s+e*_/(P.value.length-1),E=M-$-Math.min(x.rxUtil,O.value)/o*c;_===0?r.moveTo(N,E):r.lineTo(N,E)}),r.stroke()),P.value.length>1&&(r.strokeStyle="#FB787B",r.lineWidth=2,r.beginPath(),P.value.forEach((x,_)=>{const N=s+e*_/(P.value.length-1),E=M-$-Math.min(x.txUtil,O.value)/o*c;_===0?r.moveTo(N,E):r.lineTo(N,E)}),r.stroke())};return xt(()=>{I(),A.value=window.setInterval(I,3e4),it(()=>{S(),setTimeout(()=>S(),100)}),window.addEventListener("resize",S)}),vt(()=>{A.value&&clearInterval(A.value),window.removeEventListener("resize",S)}),(k,r)=>(l(),i("div",fe,[r[3]||(r[3]=Pt('<h3 class="text-content-primary dark:text-content-primary text-lg lg:text-xl font-semibold mb-3 lg:mb-4" data-v-0aca4e12>Airtime Utilization</h3><p class="text-content-secondary dark:text-content-primary text-xs lg:text-sm uppercase mb-3 lg:mb-4" data-v-0aca4e12>Activity (Last 24 Hours)</p><div class="flex items-center gap-4 lg:gap-6 mb-3 lg:mb-4" data-v-0aca4e12><div class="flex items-center gap-2" data-v-0aca4e12><div class="w-5 lg:w-7 h-2 rounded bg-accent-purple" data-v-0aca4e12></div><span class="text-content-secondary dark:text-content-primary text-xs lg:text-sm" data-v-0aca4e12>Rx Util</span></div><div class="flex items-center gap-2" data-v-0aca4e12><div class="w-5 lg:w-7 h-2 rounded bg-accent-red" data-v-0aca4e12></div><span class="text-content-secondary dark:text-content-primary text-xs lg:text-sm" data-v-0aca4e12>Tx Util</span></div></div>',3)),t("div",ke,[t("canvas",{ref_key:"chartRef",ref:m,class:"absolute inset-0 w-full h-full"},null,512)]),t("div",_e,[t("div",we,[t("div",$e,n(ct(C).packetStats?.total_packets||v.value.totalReceived),1),r[0]||(r[0]=t("div",{class:"text-xs text-content-secondary dark:text-content-muted uppercase tracking-wide"},"Total Received",-1))]),t("div",Te,[t("div",Se,n(ct(C).packetStats?.transmitted_packets||v.value.totalTransmitted),1),r[1]||(r[1]=t("div",{class:"text-xs text-content-secondary dark:text-content-muted uppercase tracking-wide"},"Total Transmitted",-1))])]),t("div",Re,[t("div",null,[t("div",Pe,[rt(n(V.value.rxRate.value)+" ",1),V.value.confidence==="low"?(l(),i("span",Ce)):w("",!0)]),t("div",Ae,n(V.value.rxRate.label),1)]),t("div",null,[t("div",Me,[rt(n(V.value.txRate.value)+" ",1),V.value.confidence==="low"?(l(),i("span",De)):w("",!0)]),t("div",Ne,n(V.value.txRate.label),1)]),t("div",null,[t("div",Be,n(ct(C).packetStats?.dropped_packets||v.value.dropped),1),r[2]||(r[2]=t("div",{class:"text-xs text-white/60"},"Dropped",-1))])])]))}}),je=ut(Fe,[["__scopeId","data-v-0aca4e12"]]),Ee={class:"bg-white dark:bg-surface-elevated backdrop-blur-xl rounded-[20px] shadow-2xl border border-stroke-subtle dark:border-white/20 flex flex-col h-full overflow-hidden"},Ie={class:"flex items-center justify-between p-8 pb-4 flex-shrink-0"},Ue={class:"text-content-secondary dark:text-content-muted text-sm"},Le={class:"flex items-center gap-2"},Ve=["title"],He={class:"flex-1 overflow-y-auto custom-scrollbar px-8"},ze={class:"mb-6"},Xe={class:"glass-card bg-white/5 rounded-[15px] p-4"},Ge={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Oe={class:"space-y-3"},Qe={class:"flex justify-between py-2 border-b border-stroke-subtle dark:border-stroke/10"},qe={class:"text-content-primary dark:text-content-primary font-mono text-sm"},We={class:"flex justify-between py-2 border-b border-stroke-subtle dark:border-stroke/10"},Ke={class:"text-content-primary dark:text-content-primary font-mono text-xs break-all"},Je={key:0,class:"flex justify-between py-2 border-b border-stroke-subtle dark:border-stroke/10"},Ye={class:"text-content-primary dark:text-content-primary font-mono text-xs"},Ze={class:"space-y-3"},ts={class:"flex justify-between py-2 border-b border-stroke-subtle dark:border-stroke/10"},es={class:"text-content-primary dark:text-content-primary font-semibold"},ss={class:"flex justify-between py-2 border-b border-stroke-subtle dark:border-stroke/10"},as={class:"text-content-primary dark:text-content-primary font-semibold"},ns={class:"flex justify-between py-2 border-b border-stroke-subtle dark:border-stroke/10"},os={class:"mb-6"},rs={class:"bg-gray-50 dark:bg-white/5 rounded-[15px] p-4 border border-stroke-subtle dark:border-stroke/10"},ls={class:"space-y-3"},is={class:"flex justify-between py-2 border-b border-stroke-subtle dark:border-stroke/10"},ds={class:"text-content-primary dark:text-content-primary"},cs={key:0,class:"pt-2"},us={class:"glass-card bg-background-mute dark:bg-black/30 rounded-[10px] p-4 mb-4"},ps={class:"w-full overflow-x-auto"},ms={class:"text-content-primary dark:text-content-primary/90 text-xs font-mono whitespace-pre leading-relaxed min-w-full"},xs={class:"flex items-center justify-between mb-3"},ys={class:"text-content-secondary dark:text-content-primary/80 text-sm font-semibold"},bs={class:"text-content-muted dark:text-content-muted text-xs"},vs={class:"bg-background-mute dark:bg-black/40 rounded-[8px] p-3 mb-3"},gs={class:"font-mono text-xs text-content-primary dark:text-content-primary break-all whitespace-pre-wrap leading-relaxed"},hs={class:"bg-gray-50 dark:bg-white/5 rounded-[10px] overflow-hidden"},fs={key:0,class:"min-w-0"},ks={class:"text-cyan-500 text-sm font-mono break-words min-w-0"},_s={class:"text-content-primary dark:text-content-primary text-sm break-words min-w-0"},ws={class:"text-content-primary dark:text-content-primary text-sm font-semibold break-all min-w-0 overflow-hidden"},$s=["title"],Ts={key:0,class:"text-orange-500 text-xs font-mono break-all min-w-0 overflow-hidden"},Ss=["title"],Rs={class:"grid grid-cols-2 gap-2"},Ps={class:"text-cyan-500 text-sm font-mono break-words"},Cs={class:"text-content-primary dark:text-content-primary text-sm break-words"},As=["title"],Ms={key:0},Ds=["title"],Ns={key:0,class:"text-content-muted dark:text-content-muted text-xs italic mt-2 px-1"},Bs={key:1,class:"py-2"},Fs={class:"mb-6"},js={class:"bg-gray-50 dark:bg-white/5 rounded-[15px] p-4 border border-stroke-subtle dark:border-stroke/10"},Es={class:"space-y-4"},Is={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Us={class:"flex justify-between py-2 border-b border-stroke-subtle dark:border-stroke/10"},Ls={class:"flex justify-between py-2 border-b border-stroke-subtle dark:border-stroke/10"},Vs={key:0,class:"py-2"},Hs={class:"bg-background-mute dark:bg-black/20 rounded-[10px] p-4"},zs={class:"flex items-center flex-wrap gap-2"},Xs={class:"relative group"},Gs={class:"relative px-3 py-2 bg-gradient-to-br from-blue-500/20 to-cyan-500/20 border border-cyan-400/40 rounded-lg transform transition-all hover:scale-105"},Os={class:"font-mono text-xs font-semibold text-content-primary dark:text-content-primary/90"},Qs={class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-content-primary dark:bg-background/90 text-white dark:text-content-primary text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10"},qs={key:0,class:"mx-2 text-cyan-600 dark:text-cyan-400/60"},Ws={key:1,class:"py-2"},Ks={class:"text-content-secondary dark:text-content-muted text-sm mb-2 flex items-center"},Js={key:0,class:"w-4 h-4 ml-2 text-yellow-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Ys={key:1,class:"text-yellow-500 text-xs ml-1"},Zs={class:"bg-background-mute dark:bg-black/20 rounded-[10px] p-4"},ta={class:"flex items-center flex-wrap gap-2"},ea={class:"relative group"},sa={key:0,class:"absolute -top-1 -right-1 w-2 h-2 bg-yellow-400 rounded-full animate-pulse"},aa={class:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-content-primary dark:bg-background/90 text-white dark:text-content-primary text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10"},na={key:0,class:"mx-1 text-orange-600 dark:text-orange-400/60"},oa={class:"mb-6"},ra={class:"glass-card bg-gray-50 dark:bg-white/5 rounded-[15px] p-4"},la={class:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4"},ia={class:"text-center p-3 glass-card bg-background-mute dark:bg-black/20 rounded-[10px]"},da={class:"text-lg font-bold text-content-primary dark:text-content-primary"},ca={class:"text-center p-3 glass-card bg-background-mute dark:bg-black/20 rounded-[10px]"},ua={class:"text-center p-3 glass-card bg-background-mute dark:bg-black/20 rounded-[10px]"},pa={class:"text-lg font-bold text-content-primary dark:text-content-primary"},ma={key:0,class:"mb-4"},xa={class:"flex items-center gap-3"},ya={class:"flex gap-1"},ba={class:"text-content-secondary dark:text-content-primary/80 text-sm capitalize"},va={key:1,class:"mb-4"},ga={key:2,class:"mb-4"},ha={class:"text-content-secondary dark:text-content-muted text-sm mb-3"},fa={class:"space-y-2"},ka={class:"flex items-center gap-3"},_a={class:"text-content-muted dark:text-content-muted text-sm"},wa={key:3,class:"mt-6 pt-4 border-t border-stroke-subtle dark:border-stroke/10"},$a={class:"grid grid-cols-1 md:grid-cols-3 gap-3 mb-4"},Ta={class:"text-center p-3 glass-card bg-background-mute dark:bg-black/20 rounded-[10px]"},Sa={class:"text-2xl font-bold text-content-primary dark:text-content-primary"},Ra={class:"text-center p-3 glass-card bg-background-mute dark:bg-black/20 rounded-[10px]"},Pa={class:"text-2xl font-bold text-content-primary dark:text-content-primary"},Ca={class:"text-content-muted dark:text-content-muted text-xs mt-1"},Aa={class:"text-center p-3 glass-card bg-background-mute dark:bg-black/20 rounded-[10px]"},Ma={class:"text-content-muted dark:text-content-muted text-xs mt-1"},Da={key:0,class:"glass-card bg-background-mute dark:bg-black/20 rounded-[10px] p-4"},Na={class:"space-y-3"},Ba={class:"flex-shrink-0 w-16 text-right"},Fa={class:"text-content-secondary dark:text-content-muted text-xs"},ja={class:"flex-1 relative"},Ea={class:"h-8 rounded-lg overflow-hidden bg-background-mute dark:bg-stroke/5 relative"},Ia={class:"absolute inset-0 flex items-center px-3"},Ua={class:"text-content-primary dark:text-content-primary text-xs font-mono font-semibold"},La={class:"flex-shrink-0 w-12 text-left"},Va={class:"text-content-muted dark:text-content-muted text-xs"},Ha={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},za={class:"space-y-2"},Xa={class:"flex justify-between py-2 border-b border-stroke-subtle dark:border-stroke/10"},Ga={class:"text-content-primary dark:text-content-primary"},Oa={class:"flex justify-between py-2 border-b border-stroke-subtle dark:border-stroke/10"},Qa={class:"space-y-2"},qa={class:"flex justify-between py-2 border-b border-stroke-subtle dark:border-stroke/10"},Wa={key:0,class:"flex justify-between py-2 border-b border-stroke-subtle dark:border-stroke/10"},Ka={class:"text-red-600 dark:text-red-400 text-sm"},Ja={class:"p-8 pt-4 border-t border-stroke-subtle dark:border-stroke/10 flex justify-end flex-shrink-0"},Ya=dt({name:"PacketDetailsModal",__name:"PacketDetailsModal",props:{packet:{},isOpen:{type:Boolean},localHash:{}},emits:["close"],setup(at,{emit:C}){const{getSignalQuality:G}=Ot(),m=at,P=C,T=B(!1),A=s=>new Date(s*1e3).toLocaleString(),O=s=>s.transmitted?s.is_duplicate?"text-amber-600 dark:text-amber-400":s.drop_reason?"text-red-600 dark:text-red-400":"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400",v=s=>s.transmitted?s.is_duplicate?"Duplicate":s.drop_reason?"Dropped":"Forwarded":"Dropped",D=s=>({0:"Request",1:"Response",2:"Plain Text Message",3:"Acknowledgment",4:"Node Advertisement",5:"Group Text Message",6:"Group Datagram",7:"Anonymous Request",8:"Returned Path",9:"Trace",10:"Multi-part Packet",15:"Custom Packet"})[s]||`Unknown Type (${s})`,j=s=>({0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"})[s]||`Unknown Route (${s})`,q=s=>{if(!s)return"None";const c=s.replace(/\s+/g,"").toUpperCase().match(/.{2}/g)||[],d=[];for(let o=0;o<c.length;o+=32){const x=c.slice(o,o+32).join(" ");d.push(x)}return d.join(`
|
||
`)||s},V=(s,e,c)=>{try{let d=0;const o=e.length/2;if(o>=100){if(e.length>=d+64){const x=e.slice(d,d+64);s.push({name:"Public Key",byteRange:`${(c+d)/2}-${(c+d+63)/2}`,hexData:x.match(/.{8}/g)?.join(" ")||x,description:"Ed25519 public key of the node (32 bytes)",fields:[{bits:"0-255",name:"Ed25519 Public Key",value:`${x.slice(0,16)}...${x.slice(-16)}`,binary:"32 bytes (256 bits)"}]}),d+=64}if(e.length>=d+8){const x=e.slice(d,d+8),_=parseInt(x,16),N=new Date(_*1e3);s.push({name:"Timestamp",byteRange:`${(c+d)/2}-${(c+d+7)/2}`,hexData:x.match(/.{2}/g)?.join(" ")||x,description:"Unix timestamp of advertisement",fields:[{bits:"0-31",name:"Unix Timestamp",value:`${_} (${N.toLocaleString()})`,binary:_.toString(2).padStart(32,"0")}]}),d+=8}if(e.length>=d+128){const x=e.slice(d,d+128);s.push({name:"Signature",byteRange:`${(c+d)/2}-${(c+d+127)/2}`,hexData:x.match(/.{8}/g)?.join(" ")||x,description:"Ed25519 signature of public key, timestamp, and appdata",fields:[{bits:"0-511",name:"Ed25519 Signature",value:`${x.slice(0,16)}...${x.slice(-16)}`,binary:"64 bytes (512 bits)"}]}),d+=128}if(e.length>d){const x=e.slice(d);I(s,x,c+d)}}else s.push({name:"ADVERT AppData (Partial)",byteRange:`${c/2}-${c/2+o-1}`,hexData:e.match(/.{2}/g)?.join(" ")||e,description:`Partial ADVERT data - appears to be just AppData portion (${o} bytes)`,fields:[{bits:`0-${o*8-1}`,name:"Partial Data",value:`${o} bytes - attempting to decode as AppData`,binary:`${o} bytes (${o*8} bits)`}]}),I(s,e,c)}catch(d){s.push({name:"ADVERT Parse Error",byteRange:"N/A",hexData:e.slice(0,32)+"...",description:"Failed to parse ADVERT payload structure",fields:[{bits:"N/A",name:"Error",value:`Parse error: ${d instanceof Error?d.message:"Unknown error"}`,binary:"Invalid"}]})}},I=(s,e,c)=>{try{const d=e.length/2;s.push({name:"AppData",byteRange:`${c/2}-${c/2+d-1}`,hexData:e.match(/.{2}/g)?.join(" ")||e,description:`Node advertisement application data (${d} bytes)`,fields:[{bits:`0-${d*8-1}`,name:"Application Data",value:`${d} bytes (contains flags, location, name, etc.)`,binary:`${d} bytes (${d*8} bits)`}]});let o=0;if(e.length>=2){const x=parseInt(e.slice(o,o+2),16),_=[],N=!!(x&16),E=!!(x&32),K=!!(x&64),tt=!!(x&128);if(x&1&&_.push("is chat node"),x&2&&_.push("is repeater"),x&4&&_.push("is room server"),x&8&&_.push("is sensor"),N&&_.push("has location"),E&&_.push("has feature 1"),K&&_.push("has feature 2"),tt&&_.push("has name"),s.push({name:"AppData Flags",byteRange:`${(c+o)/2}`,hexData:`0x${e.slice(o,o+2)}`,description:"Flags indicating which optional fields are present",fields:[{bits:"0-7",name:"Flags",value:_.join(", ")||"none",binary:x.toString(2).padStart(8,"0")}]}),o+=2,N&&e.length>=o+16){const L=e.slice(o,o+8),H=[];for(let p=6;p>=0;p-=2)H.push(L.slice(p,p+2));const f=parseInt(H.join(""),16),g=f>2147483647?f-4294967296:f,F=g/1e6,Q=e.slice(o+8,o+16),et=[];for(let p=6;p>=0;p-=2)et.push(Q.slice(p,p+2));const Y=parseInt(et.join(""),16),nt=Y>2147483647?Y-4294967296:Y,yt=nt/1e6;s.push({name:"Location Data",byteRange:`${(c+o)/2}-${(c+o+15)/2}`,hexData:`${L.match(/.{2}/g)?.join(" ")||L} ${Q.match(/.{2}/g)?.join(" ")||Q}`,description:"GPS coordinates (latitude and longitude)",fields:[{bits:"0-31",name:"Latitude",value:`${F.toFixed(6)}° (raw: ${g})`,binary:g.toString(2).padStart(32,"0")},{bits:"32-63",name:"Longitude",value:`${yt.toFixed(6)}° (raw: ${nt})`,binary:nt.toString(2).padStart(32,"0")}]}),o+=16}if(E&&e.length>=o+4){const L=e.slice(o,o+4),H=parseInt(L,16);s.push({name:"Feature 1",byteRange:`${(c+o)/2}-${(c+o+3)/2}`,hexData:L.match(/.{2}/g)?.join(" ")||L,description:"Reserved feature 1 (2 bytes)",fields:[{bits:"0-15",name:"Feature 1 Value",value:`${H}`,binary:H.toString(2).padStart(16,"0")}]}),o+=4}if(K&&e.length>=o+4){const L=e.slice(o,o+4),H=parseInt(L,16);s.push({name:"Feature 2",byteRange:`${(c+o)/2}-${(c+o+3)/2}`,hexData:L.match(/.{2}/g)?.join(" ")||L,description:"Reserved feature 2 (2 bytes)",fields:[{bits:"0-15",name:"Feature 2 Value",value:`${H}`,binary:H.toString(2).padStart(16,"0")}]}),o+=4}if(tt&&e.length>o){const L=e.slice(o),H=L.match(/.{2}/g)||[],f=H.map(g=>{const F=parseInt(g,16);return F>=32&&F<=126?String.fromCharCode(F):"."}).join("").replace(/\.+$/,"");s.push({name:"Node Name",byteRange:`${(c+o)/2}-${(c+e.length-1)/2}`,hexData:L.match(/.{2}/g)?.join(" ")||L,description:`Node name string (${H.length} bytes)`,fields:[{bits:`0-${H.length*8-1}`,name:"Node Name",value:`"${f}"`,binary:`ASCII text (${H.length} bytes)`}]})}}}catch(d){s.push({name:"AppData Parse Error",byteRange:"N/A",hexData:e.slice(0,Math.min(32,e.length)),description:"Failed to parse AppData structure",fields:[{bits:"N/A",name:"Error",value:`Parse error: ${d instanceof Error?d.message:"Unknown error"}`,binary:"Invalid"}]})}},S=s=>{if(!s)return[];if(Array.isArray(s))return s;if(typeof s=="string")try{return JSON.parse(s)}catch{return[]}return[]},k=s=>{const e=[];if(!s)return e;try{const c=s.raw_packet;if(c){const d=c.replace(/\s+/g,"").toUpperCase();let o=0;if(d.length>=2){const x=d.slice(o,o+2),_=parseInt(x,16),N=_&3,E=(_&60)>>2,K=(_&192)>>6,tt={0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"},L={0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE",10:"MULTIPART",15:"RAW_CUSTOM"};if(e.push({name:"Header",byteRange:"0",hexData:`0x${x}`,description:"Contains routing type, payload type, and payload version",fields:[{bits:"0-1",name:"Route Type",value:tt[N]||"Unknown",binary:N.toString(2).padStart(2,"0")},{bits:"2-5",name:"Payload Type",value:L[E]||"Unknown",binary:E.toString(2).padStart(4,"0")},{bits:"6-7",name:"Version",value:K.toString(),binary:K.toString(2).padStart(2,"0")}]}),o+=2,(N===0||N===3)&&d.length>=o+8){const f=d.slice(o,o+8),g=parseInt(f.slice(0,4),16),F=parseInt(f.slice(4,8),16);e.push({name:"Transport Codes",byteRange:"1-4",hexData:`${f.slice(0,4)} ${f.slice(4,8)}`,description:"2x 16-bit transport codes for routing optimization",fields:[{bits:"0-15",name:"Code 1",value:g.toString(),binary:g.toString(2).padStart(16,"0")},{bits:"16-31",name:"Code 2",value:F.toString(),binary:F.toString(2).padStart(16,"0")}]}),o+=8}if(d.length>=o+2){const f=d.slice(o,o+2),g=parseInt(f,16);if(e.push({name:"Path Length",byteRange:`${o/2}`,hexData:`0x${f}`,description:`${g} bytes of path data`,fields:[{bits:"0-7",name:"Path Length",value:`${g} bytes`,binary:g.toString(2).padStart(8,"0")}]}),o+=2,g>0&&d.length>=o+g*2){const F=d.slice(o,o+g*2);e.push({name:"Path Data",byteRange:`${o/2}-${(o+g*2-2)/2}`,hexData:F.match(/.{2}/g)?.join(" ")||F,description:"Routing path information",fields:[{bits:`0-${g*8-1}`,name:"Route Path",value:`${g} bytes of routing data`,binary:`${g} bytes (${g*8} bits)`}]}),o+=g*2}}if(d.length>o){const f=d.slice(o),g=f.length/2;E===4?V(e,f,o):e.push({name:"Payload Data",byteRange:`${o/2}-${o/2+g-1}`,hexData:f.match(/.{2}/g)?.join(" ")||f,description:"Application data content",fields:[{bits:`0-${g*8-1}`,name:"Application Data",value:`${g} bytes`,binary:`${g} bytes (${g*8} bits)`}]})}}}else{if(s.header){const d=s.header.replace(/0x/gi,"").replace(/\s+/g,"").toUpperCase(),o=parseInt(d,16),x=o&3,_=(o&60)>>2,N=(o&192)>>6,E={0:"Transport Flood",1:"Flood",2:"Direct",3:"Transport Direct"},K={0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE",10:"MULTIPART",15:"RAW_CUSTOM"};e.push({name:"Header",byteRange:"0",hexData:`0x${d}`,description:"Contains routing type, payload type, and payload version",fields:[{bits:"0-1",name:"Route Type",value:E[x]||"Unknown",binary:x.toString(2).padStart(2,"0")},{bits:"2-5",name:"Payload Type",value:K[_]||"Unknown",binary:_.toString(2).padStart(4,"0")},{bits:"6-7",name:"Version",value:N.toString(),binary:N.toString(2).padStart(2,"0")}]}),s.transport_codes&&e.push({name:"Transport Codes",byteRange:"1-4",hexData:s.transport_codes,description:"2x 16-bit transport codes for routing optimization",fields:[{bits:"0-31",name:"Transport Codes",value:s.transport_codes,binary:"Available in separate field"}]}),s.original_path&&s.original_path.length>0&&e.push({name:"Original Path",byteRange:"?",hexData:s.original_path.join(" "),description:`Original routing path (${s.original_path.length} nodes)`,fields:[{bits:"0-?",name:"Path Nodes",value:`${s.original_path.length} nodes`,binary:"Available as node list"}]}),s.forwarded_path&&s.forwarded_path.length>0&&e.push({name:"Forwarded Path",byteRange:"?",hexData:s.forwarded_path.join(" "),description:`Forwarded routing path (${s.forwarded_path.length} nodes)`,fields:[{bits:"0-?",name:"Path Nodes",value:`${s.forwarded_path.length} nodes`,binary:"Available as node list"}]})}if(s.payload){const d=s.payload.replace(/\s+/g,"").toUpperCase(),o=d.length/2;s.type===4?V(e,d,0):e.push({name:"Payload Data",byteRange:`0-${o-1}`,hexData:d.match(/.{2}/g)?.join(" ")||d,description:`Application data content (${o} bytes)`,fields:[{bits:`0-${o*8-1}`,name:"Application Data",value:`${o} bytes`,binary:`${o} bytes (${o*8} bits)`}]})}}}catch{e.push({name:"Parse Error",byteRange:"N/A",hexData:"Error",description:"Unable to parse packet structure",fields:[{bits:"N/A",name:"Error",value:"Parse failed",binary:"Invalid"}]})}return e},r=(s,e)=>s==null||e==null?"text-content-muted dark:text-content-muted":G(e).color,h=s=>{if(s==null)return{level:0,className:"signal-none"};const e=G(s);let c,d;return e.bars>=5?(c=4,d="signal-excellent"):e.bars>=4?(c=3,d="signal-good"):e.bars>=2?(c=2,d="signal-fair"):e.bars>=1?(c=1,d="signal-poor"):(c=0,d="signal-none"),{level:c,className:d}},b=s=>{if(!s)return[];try{const e=JSON.parse(s);return Array.isArray(e)?e:[]}catch{return[]}},y=s=>s>=1e3?`${(s/1e3).toFixed(2)}s`:`${Math.round(s)}ms`,M=s=>{s.key==="Escape"&&P("close")},$=s=>{s.target===s.currentTarget&&P("close")};return Z(()=>m.isOpen,s=>{s?document.body.style.overflow="hidden":document.body.style.overflow=""},{immediate:!0}),(s,e)=>(l(),Vt(Xt,{to:"body"},[st(Ht,{name:"modal",appear:""},{default:zt(()=>[s.isOpen&&s.packet?(l(),i("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4 overflow-hidden",onClick:$,onKeydown:M,tabindex:"0"},[e[51]||(e[51]=t("div",{class:"absolute inset-0 bg-black/60 backdrop-blur-md pointer-events-none"},null,-1)),t("div",{class:"relative w-full max-w-4xl max-h-[90vh] flex flex-col",onClick:e[3]||(e[3]=Gt(()=>{},["stop"]))},[t("div",Ee,[t("div",Ie,[t("div",null,[e[4]||(e[4]=t("h2",{class:"text-2xl font-bold text-content-primary dark:text-content-primary mb-1"},"Packet Details",-1)),t("p",Ue,n(D(s.packet.type))+" - "+n(j(s.packet.route)),1)]),t("div",Le,[t("button",{onClick:e[0]||(e[0]=c=>T.value=!T.value),class:R(["flex items-center gap-2 px-3 py-1.5 rounded-lg transition-all duration-200",T.value?"bg-cyan-500/20 border border-cyan-400/30 text-cyan-600 dark:text-cyan-400":"bg-background-mute dark:bg-white/10 border border-stroke-subtle dark:border-stroke/20 text-content-secondary dark:text-content-muted"]),title:T.value?"Hide binary values":"Show binary values"},e[5]||(e[5]=[t("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"})],-1),t("span",{class:"text-xs font-medium"},"Binary",-1)]),10,Ve),t("button",{onClick:e[1]||(e[1]=c=>P("close")),class:"w-8 h-8 flex items-center justify-center rounded-full bg-background-mute dark:bg-white/10 hover:bg-stroke-subtle dark:hover:bg-white/20 transition-colors duration-200 text-content-secondary dark:text-content-muted hover:text-content-primary dark:hover:text-content-primary"},e[6]||(e[6]=[t("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))])]),t("div",He,[t("div",ze,[e[13]||(e[13]=t("h3",{class:"text-lg font-semibold text-content-primary dark:text-content-primary mb-4 flex items-center"},[t("div",{class:"w-2 h-2 rounded-full bg-cyan-400 mr-3"}),rt(" Basic Information ")],-1)),t("div",Xe,[t("div",Ge,[t("div",Oe,[t("div",Qe,[e[7]||(e[7]=t("span",{class:"text-content-secondary dark:text-content-muted text-sm"},"Timestamp",-1)),t("span",qe,n(A(s.packet.timestamp)),1)]),t("div",We,[e[8]||(e[8]=t("span",{class:"text-content-secondary dark:text-content-muted text-sm"},"Packet Hash",-1)),t("span",Ke,n(s.packet.packet_hash),1)]),s.packet.header?(l(),i("div",Je,[e[9]||(e[9]=t("span",{class:"text-content-secondary dark:text-content-muted text-sm"},"Header",-1)),t("span",Ye,n(s.packet.header),1)])):w("",!0)]),t("div",Ze,[t("div",ts,[e[10]||(e[10]=t("span",{class:"text-content-secondary dark:text-content-muted text-sm"},"Type",-1)),t("span",es,n(s.packet.type)+" ("+n(D(s.packet.type))+")",1)]),t("div",ss,[e[11]||(e[11]=t("span",{class:"text-content-secondary dark:text-content-muted text-sm"},"Route",-1)),t("span",as,n(s.packet.route)+" ("+n(j(s.packet.route))+")",1)]),t("div",ns,[e[12]||(e[12]=t("span",{class:"text-content-secondary dark:text-content-muted text-sm"},"Status",-1)),t("span",{class:R(["font-semibold",O(s.packet)])},n(v(s.packet)),3)])])])])]),t("div",os,[e[25]||(e[25]=t("h3",{class:"text-lg font-semibold text-content-primary dark:text-content-primary mb-4 flex items-center"},[t("div",{class:"w-2 h-2 rounded-full bg-orange-400 mr-3"}),rt(" Payload Data ")],-1)),t("div",rs,[t("div",ls,[t("div",is,[e[14]||(e[14]=t("span",{class:"text-content-secondary dark:text-content-muted text-sm"},"Payload Length",-1)),t("span",ds,n(s.packet.payload_length||s.packet.length)+" bytes",1)]),s.packet.payload?(l(),i("div",cs,[e[23]||(e[23]=t("div",{class:"text-content-secondary dark:text-content-muted text-sm mb-3"},"Payload Analysis",-1)),t("div",us,[e[15]||(e[15]=t("div",{class:"text-content-secondary dark:text-content-muted text-xs mb-2 font-semibold"},"Raw Hex Data",-1)),t("div",ps,[t("pre",ms,n(q(s.packet.payload)),1)])]),(l(!0),i(U,null,X(k(s.packet).filter(c=>!c.name.includes("Parse Error")),(c,d)=>(l(),i("div",{key:d,class:"mb-4"},[t("div",xs,[t("h4",ys,n(c.name),1),t("span",bs,"Bytes "+n(c.byteRange),1)]),t("div",vs,[t("div",gs,n(c.hexData),1)]),t("div",hs,[t("div",{class:R(["hidden md:grid gap-3 p-3 bg-background-mute dark:bg-white/10 text-content-secondary dark:text-content-muted text-xs font-semibold uppercase tracking-wide",T.value?"grid-cols-4":"grid-cols-3"])},[e[16]||(e[16]=t("div",{class:"min-w-0"},"Bits",-1)),e[17]||(e[17]=t("div",{class:"min-w-0"},"Field",-1)),e[18]||(e[18]=t("div",{class:"min-w-0"},"Value",-1)),T.value?(l(),i("div",fs,"Binary")):w("",!0)],2),(l(!0),i(U,null,X(c.fields,(o,x)=>(l(),i("div",{key:x,class:R(["hidden md:grid gap-3 p-3 border-b border-stroke-subtle dark:border-stroke/5 last:border-b-0 hover:bg-background-mute dark:hover:bg-stroke/5 transition-colors",T.value?"grid-cols-4":"grid-cols-3"])},[t("div",ks,n(o.bits),1),t("div",_s,n(o.name),1),t("div",ws,[t("span",{class:"block",title:o.value},n(o.value),9,$s)]),T.value?(l(),i("div",Ts,[t("span",{class:"block",title:o.binary},n(o.binary),9,Ss)])):w("",!0)],2))),128)),(l(!0),i(U,null,X(c.fields,(o,x)=>(l(),i("div",{key:`mobile-${x}`,class:"md:hidden p-3 border-b border-stroke-subtle dark:border-stroke/5 last:border-b-0 space-y-2"},[t("div",Rs,[t("div",null,[e[19]||(e[19]=t("span",{class:"text-content-secondary dark:text-content-muted text-xs uppercase tracking-wide"},"Bits:",-1)),t("div",Ps,n(o.bits),1)]),t("div",null,[e[20]||(e[20]=t("span",{class:"text-content-secondary dark:text-content-muted text-xs uppercase tracking-wide"},"Field:",-1)),t("div",Cs,n(o.name),1)])]),t("div",null,[e[21]||(e[21]=t("span",{class:"text-content-secondary dark:text-content-muted text-xs uppercase tracking-wide"},"Value:",-1)),t("div",{class:"text-content-primary dark:text-content-primary text-sm font-semibold break-all",title:o.value},n(o.value),9,As)]),T.value?(l(),i("div",Ms,[e[22]||(e[22]=t("span",{class:"text-content-secondary dark:text-content-muted text-xs uppercase tracking-wide"},"Binary:",-1)),t("div",{class:"text-orange-500 text-xs font-mono break-all",title:o.binary},n(o.binary),9,Ds)])):w("",!0)]))),128))]),c.description?(l(),i("div",Ns,n(c.description),1)):w("",!0)]))),128))])):(l(),i("div",Bs,e[24]||(e[24]=[t("span",{class:"text-content-secondary dark:text-content-muted text-sm"},"Payload:",-1),t("span",{class:"text-content-muted dark:text-content-muted ml-2"},"None",-1)])))])])]),t("div",Fs,[e[33]||(e[33]=t("h3",{class:"text-lg font-semibold text-content-primary dark:text-content-primary mb-4 flex items-center"},[t("div",{class:"w-2 h-2 rounded-full bg-purple-400 mr-3"}),rt(" Path Information ")],-1)),t("div",js,[t("div",Es,[t("div",Is,[t("div",Us,[e[26]||(e[26]=t("span",{class:"text-content-secondary dark:text-content-muted text-sm"},"Source Hash",-1)),t("span",{class:R(["text-content-primary dark:text-content-primary font-mono text-xs",m.localHash&&s.packet.src_hash===m.localHash?"bg-cyan-400/20 text-cyan-600 dark:text-cyan-300 px-1 rounded":""])},n(s.packet.src_hash||"Unknown"),3)]),t("div",Ls,[e[27]||(e[27]=t("span",{class:"text-content-secondary dark:text-content-muted text-sm"},"Destination Hash",-1)),t("span",{class:R(["text-content-primary dark:text-content-primary font-mono text-xs",m.localHash&&s.packet.dst_hash===m.localHash?"bg-cyan-400/20 text-cyan-600 dark:text-cyan-300 px-1 rounded":""])},n(s.packet.dst_hash||"Broadcast"),3)])]),S(s.packet.original_path).length>0?(l(),i("div",Vs,[e[29]||(e[29]=t("div",{class:"text-content-secondary dark:text-content-muted text-sm mb-2"},"Original Path",-1)),t("div",Hs,[t("div",zs,[(l(!0),i(U,null,X(S(s.packet.original_path),(c,d)=>(l(),i("div",{key:d,class:"flex items-center"},[t("div",Xs,[t("div",Gs,[t("div",Os,n(c.length<=2?c.toUpperCase():c.slice(0,2).toUpperCase()),1)]),t("div",Qs," Node: "+n(c),1)]),d<S(s.packet.original_path).length-1?(l(),i("div",qs,e[28]||(e[28]=[t("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M9 5l7 7-7 7"})],-1)]))):w("",!0)]))),128))])])])):w("",!0),s.packet.transmitted&&S(s.packet.forwarded_path).length>0?(l(),i("div",Ws,[t("div",Ks,[e[31]||(e[31]=rt(" Forwarded Path ",-1)),JSON.stringify(S(s.packet.original_path))!==JSON.stringify(S(s.packet.forwarded_path))?(l(),i("svg",Js,e[30]||(e[30]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)]))):w("",!0),JSON.stringify(S(s.packet.original_path))!==JSON.stringify(S(s.packet.forwarded_path))?(l(),i("span",Ys,"(Modified)")):w("",!0)]),t("div",Zs,[t("div",ta,[(l(!0),i(U,null,X(S(s.packet.forwarded_path),(c,d)=>(l(),i("div",{key:d,class:"flex items-center"},[t("div",ea,[t("div",{class:R(["relative px-3 py-2 bg-gradient-to-br from-orange-500/20 to-yellow-500/20 border border-orange-500 dark:border-orange-400/40 rounded-lg transform transition-all hover:scale-105",m.localHash&&c===m.localHash?"bg-gradient-to-br from-yellow-400/30 to-orange-400/30 border-yellow-300 shadow-yellow-400/20 shadow-lg":"hover:border-orange-500 dark:border-orange-400/60"])},[t("div",{class:R(["font-mono text-xs font-semibold",m.localHash&&c===m.localHash?"text-yellow-200":"text-white/90"])},n(c.slice(0,2).toUpperCase()),3),m.localHash&&c===m.localHash?(l(),i("div",sa)):w("",!0)],2),t("div",aa,n(c),1)]),d<S(s.packet.forwarded_path).length-1?(l(),i("div",na,e[32]||(e[32]=[t("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)]))):w("",!0)]))),128))])])])):w("",!0)])])]),t("div",oa,[e[50]||(e[50]=t("h3",{class:"text-lg font-semibold text-content-primary dark:text-content-primary mb-4 flex items-center"},[t("div",{class:"w-2 h-2 rounded-full bg-green-400 mr-3"}),rt(" Signal & Processing ")],-1)),t("div",ra,[t("div",la,[t("div",ia,[e[34]||(e[34]=t("div",{class:"text-content-secondary dark:text-content-muted text-xs mb-1"},"RSSI",-1)),t("div",da,n(typeof s.packet.rssi=="number"?s.packet.rssi:"N/A"),1),e[35]||(e[35]=t("div",{class:"text-content-muted dark:text-content-muted text-xs"},"dBm",-1))]),t("div",ca,[e[36]||(e[36]=t("div",{class:"text-content-secondary dark:text-content-muted text-xs mb-1"},"SNR",-1)),t("div",{class:R(["text-lg font-bold",r(s.packet.snr,s.packet.rssi)])},n(typeof s.packet.snr=="number"?s.packet.snr.toFixed(1):"N/A"),3),e[37]||(e[37]=t("div",{class:"text-content-muted dark:text-content-muted text-xs"},"dB",-1))]),t("div",ua,[e[38]||(e[38]=t("div",{class:"text-content-secondary dark:text-content-muted text-xs mb-1"},"Score",-1)),t("div",pa,n(typeof s.packet.score=="number"?s.packet.score.toFixed(3):"N/A"),1)])]),s.packet.rssi!=null?(l(),i("div",ma,[e[39]||(e[39]=t("div",{class:"text-content-secondary dark:text-content-muted text-sm mb-2"},"Signal Quality",-1)),t("div",xa,[t("div",ya,[(l(),i(U,null,X(4,c=>t("div",{key:c,class:R(["w-2 h-6 rounded-sm transition-all duration-300",c<=h(s.packet.rssi).level?{"signal-excellent":"bg-green-400","signal-good":"bg-cyan-400","signal-fair":"bg-yellow-400","signal-poor":"bg-red-400"}[h(s.packet.rssi).className]:"bg-stroke-subtle dark:bg-stroke/10"])},null,2)),64))]),t("span",ba,n(h(s.packet.rssi).className.replace("signal-","")),1)])])):(l(),i("div",va,e[40]||(e[40]=[t("div",{class:"text-content-secondary dark:text-content-muted text-sm mb-2"},"Signal Quality",-1),t("div",{class:"text-content-muted dark:text-content-muted text-sm italic"},"N/A (TX Packet)",-1)]))),s.packet.is_trace&&s.packet.path_snr_details&&s.packet.path_snr_details.length>0?(l(),i("div",ga,[t("div",ha,"Path SNR Details ("+n(s.packet.path_snr_details.length)+" hops)",1),t("div",fa,[(l(!0),i(U,null,X(s.packet.path_snr_details,(c,d)=>(l(),i("div",{key:d,class:"flex items-center justify-between p-2 glass-card bg-background-mute dark:bg-black/20 rounded-[8px]"},[t("div",ka,[t("span",_a,n(d+1)+".",1),t("span",{class:R(["font-mono text-xs text-content-primary dark:text-content-primary",m.localHash&&c.hash===m.localHash?"bg-cyan-400/20 text-cyan-600 dark:text-cyan-300 px-1 rounded":""])},n(c.hash),3)]),t("span",{class:R(["text-sm font-bold",r(c.snr_db,null)])},n(c.snr_db.toFixed(1))+"dB ",3)]))),128))])])):w("",!0),s.packet.transmitted&&s.packet.lbt_attempts!==void 0?(l(),i("div",wa,[e[45]||(e[45]=t("div",{class:"text-content-secondary dark:text-content-muted text-sm mb-3 flex items-center"},[t("svg",{class:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})]),rt(" Listen Before Talk (LBT) Metrics ")],-1)),t("div",$a,[t("div",Ta,[e[41]||(e[41]=t("div",{class:"text-content-secondary dark:text-content-muted text-xs mb-1"},"CAD Attempts",-1)),t("div",Sa,n(s.packet.lbt_attempts),1)]),t("div",Ra,[e[42]||(e[42]=t("div",{class:"text-content-secondary dark:text-content-muted text-xs mb-1"},"Total LBT Delay",-1)),t("div",Pa,n(y(b(s.packet.lbt_backoff_delays_ms).reduce((c,d)=>c+d,0))),1),t("div",Ca,n(b(s.packet.lbt_backoff_delays_ms).length)+" backoffs ",1)]),t("div",Aa,[e[43]||(e[43]=t("div",{class:"text-content-secondary dark:text-content-muted text-xs mb-1"},"Channel Status",-1)),t("div",{class:R(["text-lg font-bold",s.packet.lbt_channel_busy?"text-yellow-600 dark:text-yellow-400":"text-green-600 dark:text-green-400"])},n(s.packet.lbt_channel_busy?"BUSY":"CLEAR"),3),t("div",Ma,n(s.packet.lbt_channel_busy?"Waited for clear":"Immediate TX"),1)])]),b(s.packet.lbt_backoff_delays_ms).length>0?(l(),i("div",Da,[e[44]||(e[44]=t("div",{class:"text-content-secondary dark:text-content-muted text-xs mb-3 font-semibold"},"Backoff Pattern (Exponential with Jitter)",-1)),t("div",Na,[(l(!0),i(U,null,X(b(s.packet.lbt_backoff_delays_ms),(c,d)=>(l(),i("div",{key:d,class:"flex items-center gap-3"},[t("div",Ba,[t("span",Fa,"Attempt "+n(d+1),1)]),t("div",ja,[t("div",Ea,[t("div",{class:R(["h-full rounded-lg transition-all duration-300",[d===0?"bg-gradient-to-r from-cyan-500/50 to-cyan-600/50":d===1?"bg-gradient-to-r from-yellow-500/50 to-yellow-600/50":d===2?"bg-gradient-to-r from-orange-500/50 to-orange-600/50":"bg-gradient-to-r from-red-500/50 to-red-600/50"]]),style:mt({width:`${Math.min(100,c/Math.max(...b(s.packet.lbt_backoff_delays_ms))*100)}%`})},[t("div",Ia,[t("span",Ua,n(y(c)),1)])],6)])]),t("div",La,[t("span",Va,n(Math.round(c/b(s.packet.lbt_backoff_delays_ms).reduce((o,x)=>o+x,0)*100))+"% ",1)])]))),128))])])):w("",!0)])):w("",!0),t("div",Ha,[t("div",za,[t("div",Xa,[e[46]||(e[46]=t("span",{class:"text-content-secondary dark:text-content-muted text-sm"},"TX Delay",-1)),t("span",Ga,n(Number(s.packet.tx_delay_ms)>0?Number(s.packet.tx_delay_ms).toFixed(1)+"ms":"-"),1)]),t("div",Oa,[e[47]||(e[47]=t("span",{class:"text-content-secondary dark:text-content-muted text-sm"},"Transmitted",-1)),t("span",{class:R(s.packet.transmitted?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400")},n(s.packet.transmitted?"Yes":"No"),3)])]),t("div",Qa,[t("div",qa,[e[48]||(e[48]=t("span",{class:"text-content-secondary dark:text-content-muted text-sm"},"Is Duplicate",-1)),t("span",{class:R(s.packet.is_duplicate?"text-amber-600 dark:text-amber-400":"text-content-muted dark:text-content-muted")},n(s.packet.is_duplicate?"Yes":"No"),3)]),s.packet.drop_reason?(l(),i("div",Wa,[e[49]||(e[49]=t("span",{class:"text-content-secondary dark:text-content-muted text-sm"},"Drop Reason",-1)),t("span",Ka,n(s.packet.drop_reason),1)])):w("",!0)])])])])]),t("div",Ja,[t("button",{onClick:e[2]||(e[2]=c=>P("close")),class:"px-6 py-2 bg-gradient-to-r from-cyan-500/20 to-cyan-400/20 hover:from-cyan-500/30 hover:to-cyan-400/30 border border-cyan-400/30 rounded-[10px] text-content-primary dark:text-content-primary transition-all duration-200 backdrop-blur-sm"}," Close ")])])])],32)):w("",!0)]),_:1})]))}}),Za=ut(Ya,[["__scopeId","data-v-7f139e4b"]]),tn={class:"glass-card rounded-[20px] p-6"},en={class:"flex flex-col lg:flex-row lg:justify-between lg:items-center mb-6 gap-4 filter-container"},sn={class:"flex items-center gap-2 header-info relative"},an={class:"text-content-secondary dark:text-content-muted text-sm packet-count"},nn=["title"],on={class:"hidden sm:inline"},rn={key:1,class:"text-accent-red text-sm error-indicator"},ln={class:"flex items-center gap-3 lg:flex filter-controls"},dn={class:"flex flex-col"},cn=["value"],un={class:"flex flex-col"},pn=["value"],mn={class:"flex flex-col"},xn={class:"flex flex-col reset-container"},yn=["disabled"],bn={class:"space-y-4 overflow-hidden"},vn={class:"space-y-4"},gn=["onClick"],hn={class:"hidden lg:grid grid-cols-12 gap-2 items-center"},fn={class:"col-span-1 text-content-primary dark:text-content-primary text-sm"},kn={class:"col-span-1 flex items-center gap-2"},_n={class:"flex flex-col"},wn={class:"text-content-primary dark:text-content-primary text-xs"},$n=["title"],Tn={class:"col-span-2"},Sn={class:"col-span-1 text-content-primary dark:text-content-primary text-xs"},Rn={class:"col-span-2"},Pn={class:"space-y-1"},Cn={key:0,class:"flex items-center gap-0.5 flex-wrap"},An={key:0,class:"w-2.5 h-2.5 text-content-muted dark:text-content-muted/60",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Mn={key:0,class:"text-[9px] text-content-muted dark:text-content-muted ml-1"},Dn={key:1,class:"flex items-center gap-1"},Nn={class:"inline-block px-2 py-0.5 rounded bg-badge-cyan-bg text-badge-cyan-text text-xs font-mono"},Bn={class:"col-span-1 text-content-primary dark:text-content-primary text-xs"},Fn={class:"col-span-1 text-content-primary dark:text-content-primary text-xs"},jn={class:"col-span-1 text-content-primary dark:text-content-primary text-xs"},En={class:"col-span-1 text-content-primary dark:text-content-primary text-xs"},In={key:0,class:"flex items-center gap-1"},Un={class:"col-span-1"},Ln={key:0,class:"text-accent-red text-[8px] italic truncate"},Vn={class:"lg:hidden space-y-2"},Hn={class:"flex items-center justify-between"},zn={class:"flex items-center gap-2"},Xn={class:"flex flex-col"},Gn={class:"text-content-primary dark:text-content-primary text-sm font-medium"},On=["title"],Qn={class:"flex items-center gap-2 text-right"},qn={class:"text-content-secondary dark:text-content-muted text-xs"},Wn={class:"flex items-center justify-between"},Kn={class:"flex items-center gap-1.5"},Jn={key:0,class:"flex items-center gap-0.5"},Yn={key:0,class:"w-2.5 h-2.5 text-content-muted dark:text-content-muted/60",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Zn={key:0,class:"text-[9px] text-content-muted dark:text-content-muted ml-1"},to={class:"flex items-center gap-1"},eo={class:"inline-block px-2 py-0.5 rounded bg-badge-cyan-bg text-badge-cyan-text text-xs font-mono font-semibold"},so={class:"flex items-center gap-0.5 text-content-muted dark:text-content-muted/60"},ao={key:0,class:"text-[9px] font-medium",title:"Multi-hop path"},no={class:"flex items-center gap-1"},oo={class:"flex items-center gap-2"},ro={class:"flex items-center gap-1"},lo={key:0,class:"flex gap-0.5"},io={class:"text-content-primary dark:text-content-primary text-xs"},co={class:"flex items-center justify-between text-content-secondary dark:text-content-muted text-xs"},uo={class:"flex items-center gap-3"},po={class:"flex items-center gap-2"},mo={key:0,class:"flex items-center gap-1"},xo={key:0,class:"text-accent-red text-xs italic"},yo={key:0,class:"flex justify-between items-center mt-6 pt-4 border-t border-stroke-subtle dark:border-stroke pagination-container"},bo={class:"flex items-center gap-4 pagination-info"},vo={class:"text-content-secondary dark:text-content-muted text-sm"},go={key:0,class:"flex items-center gap-2 load-more-section"},ho=["disabled"],fo={class:"text-content-secondary dark:text-content-muted text-xs load-more-count"},ko={class:"flex items-center gap-2 pagination-controls"},_o=["disabled"],wo={class:"flex items-center gap-1 page-numbers"},$o={key:1,class:"text-content-secondary dark:text-content-muted text-sm px-2 ellipsis"},To=["onClick"],So={key:2,class:"text-content-secondary dark:text-content-muted text-sm px-2 ellipsis"},Ro=["disabled"],Po={key:1,class:"flex justify-center mt-6 pt-4 border-t border-stroke-subtle dark:border-stroke"},Co={class:"flex items-center gap-4"},Ao={class:"text-content-secondary dark:text-content-muted text-sm"},Mo={class:"text-content-secondary dark:text-content-muted text-xs"},Do={key:2,class:"flex justify-center mt-6 pt-4 border-t border-stroke-subtle dark:border-stroke"},pt=10,lt=1e3,No=dt({name:"PacketTable",__name:"PacketTable",setup(at){const C=gt(),G=kt(),m=B(1),P=B(null),T=B(100),A=B(!1),O=B(!1);let v=null;Z(()=>C.isLoading,p=>{p?(v&&(clearTimeout(v),v=null),O.value=!0):v=window.setTimeout(()=>{O.value=!1,v=null},600)});const D=B(null),j=B(!1),q=p=>{D.value=p,j.value=!0},V=()=>{j.value=!1,D.value=null},I=B(St("packetTable_selectedType","all")),S=B(St("packetTable_selectedRoute","all")),k=B(!1),r=B(null),h=["all","0","1","2","3","4","5","6","7","8","9","10","11"],b=["all","1","2"];Z(I,p=>{Rt("packetTable_selectedType",p),m.value=1}),Z(S,p=>{Rt("packetTable_selectedRoute",p),m.value=1}),Z(k,()=>{m.value=1});const y=W(()=>{let p=C.recentPackets;if(I.value!=="all"){const u=parseInt(I.value);p=p.filter(a=>a.type===u)}if(S.value!=="all"){const u=parseInt(S.value);p=p.filter(a=>a.route===u)}return k.value&&r.value!==null&&(p=p.filter(u=>u.timestamp>=r.value)),p}),M=W(()=>{const p=(m.value-1)*pt,u=p+pt;return y.value.slice(p,u)}),$=W(()=>Math.ceil(y.value.length/pt)),s=W(()=>m.value===$.value),e=W(()=>C.recentPackets.length>=T.value&&T.value<lt),c=W(()=>s.value&&e.value&&!A.value),d=p=>new Date(p*1e3).toLocaleTimeString(void 0,{hour12:!0}),o=p=>({0:"REQ",1:"RESPONSE",2:"TXT_MSG",3:"ACK",4:"ADVERT",5:"GRP_TXT",6:"GRP_DATA",7:"ANON_REQ",8:"PATH",9:"TRACE",10:"MULTI_PART",11:"CONTROL"})[p]||`TYPE_${p}`,x=p=>({0:"T-Flood",1:"Flood",2:"Direct",3:"T-Direct"})[p]||`Route ${p}`,_=p=>p.transmitted?"text-accent-green":"text-primary",N=p=>p.drop_reason?"Dropped":p.transmitted?"Forward":"Received",E=p=>p===1?"bg-badge-cyan-bg text-badge-cyan-text":"bg-badge-neutral-bg text-badge-neutral-text",K=p=>({0:"bg-primary",1:"bg-accent-green",2:"bg-secondary",3:"bg-accent-purple",4:"bg-accent-red",5:"bg-accent-cyan",6:"bg-primary",7:"bg-accent-purple",8:"bg-accent-green",9:"bg-secondary"})[p]||"bg-gray-500",tt=p=>({0:"border-l-primary",1:"border-l-accent-green",2:"border-l-secondary",3:"border-l-accent-purple",4:"border-l-accent-red",5:"border-l-accent-cyan",6:"border-l-primary",7:"border-l-accent-purple",8:"border-l-accent-green",9:"border-l-secondary"})[p]||"border-l-gray-500",L=p=>!p.transmitted||!p.lbt_attempts||p.lbt_attempts===0?"bg-green-400":p.lbt_attempts===1?"bg-cyan-400":p.lbt_attempts===2?"bg-yellow-400":"bg-orange-400",H=p=>p>=1e3?(p/1e3).toFixed(2)+"s":p.toFixed(1)+"ms",f=p=>{if(!p)return[];if(Array.isArray(p))return p;if(typeof p=="string")try{const u=JSON.parse(p);return typeof u=="string"?JSON.parse(u):Array.isArray(u)?u:[]}catch{return[]}return[]},g=p=>{const u=f(p.original_path),a=f(p.forwarded_path),z=u.length>0?u:a;return z.length===0?null:{hops:z.length-1,nodes:z.map(ot=>ot.slice(-4).toUpperCase())}},F=p=>{if(p.type!==4||!p.payload)return null;try{const u=p.payload.replace(/\s+/g,"").toUpperCase();let a=u,z=0;if(u.length/2>=100)if(u.length>200)a=u.slice(200),z=0;else return null;if(a.length>=2){const J=parseInt(a.slice(0,2),16);z+=2;const Ct=!!(J&16),At=!!(J&32),Mt=!!(J&64);if(!!!(J&128))return null;if(Ct&&a.length>=z+16&&(z+=16),At&&a.length>=z+4&&(z+=4),Mt&&a.length>=z+4&&(z+=4),a.length>z){const _t=(a.slice(z).match(/.{2}/g)||[]).map(Dt=>{const ht=parseInt(Dt,16);return ht>=32&&ht<=126?String.fromCharCode(ht):"."}).join("").replace(/\.*$/,"");return _t.length>0?_t:null}}}catch(u){console.error("Error parsing ADVERT node name:",u)}return null},Q=()=>{I.value="all",S.value="all",k.value=!1,r.value=null,m.value=1},et=()=>{k.value?(k.value=!1,r.value=null):(k.value=!0,r.value=Date.now()/1e3),m.value=1},Y=W(()=>r.value?new Date(r.value*1e3).toLocaleTimeString(void 0,{hour12:!0}):""),nt=async p=>{try{const u=p||T.value;await C.fetchRecentPackets({limit:u})}catch(u){console.error("Error fetching packet data:",u)}},yt=async()=>{if(!(A.value||T.value>=lt)){A.value=!0;try{const p=Math.min(T.value+200,lt);T.value=p,await nt(p)}catch(p){console.error("Error loading more records:",p)}finally{A.value=!1}}};return xt(async()=>{await nt(),G.isConnected||(P.value=window.setInterval(nt,1e4))}),Z(()=>G.isConnected,p=>{p?P.value&&(clearInterval(P.value),P.value=null):P.value||(P.value=window.setInterval(nt,1e4))}),vt(()=>{P.value&&clearInterval(P.value),v&&clearTimeout(v)}),(p,u)=>(l(),i(U,null,[t("div",tn,[t("div",en,[t("div",sn,[u[7]||(u[7]=t("h3",{class:"text-content-primary dark:text-content-primary text-xl font-semibold"},"Recent Packets",-1)),t("span",an," ("+n(y.value.length)+" of "+n(ct(C).recentPackets.length)+") ",1),k.value?(l(),i("span",{key:0,class:"text-primary text-xs sm:text-sm bg-primary/10 px-2 py-1 rounded-md border border-primary/20 live-mode-badge whitespace-nowrap",title:`Filter activated at ${Y.value}`},[t("span",on,"Live Mode (since "+n(Y.value)+")",1),u[6]||(u[6]=t("span",{class:"sm:hidden"},"Live",-1))],8,nn)):w("",!0),ct(C).error?(l(),i("span",rn,n(ct(C).error),1)):w("",!0)]),t("div",ln,[t("div",dn,[u[8]||(u[8]=t("label",{class:"text-content-secondary dark:text-content-muted text-xs mb-1"},"Type",-1)),$t(t("select",{"onUpdate:modelValue":u[0]||(u[0]=a=>I.value=a),class:"glass-card border border-stroke-subtle dark:border-stroke rounded-[10px] px-3 py-2 text-content-primary dark:text-content-primary text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20 transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/50"},[(l(),i(U,null,X(h,a=>t("option",{key:a,value:a,class:"bg-surface dark:bg-surface-elevated text-content-primary dark:text-content-primary"},n(a==="all"?"All Types":`Type ${a} (${o(parseInt(a))})`),9,cn)),64))],512),[[Tt,I.value]])]),t("div",un,[u[9]||(u[9]=t("label",{class:"text-content-secondary dark:text-content-muted text-xs mb-1"},"Route",-1)),$t(t("select",{"onUpdate:modelValue":u[1]||(u[1]=a=>S.value=a),class:"glass-card border border-stroke-subtle dark:border-stroke rounded-[10px] px-3 py-2 text-content-primary dark:text-content-primary text-sm focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20 transition-all duration-200 min-w-[120px] cursor-pointer hover:border-primary/50"},[(l(),i(U,null,X(b,a=>t("option",{key:a,value:a,class:"bg-surface dark:bg-surface-elevated text-content-primary dark:text-content-primary"},n(a==="all"?"All Routes":`Route ${a} (${x(parseInt(a))})`),9,pn)),64))],512),[[Tt,S.value]])]),t("div",mn,[u[10]||(u[10]=t("label",{class:"text-content-secondary dark:text-content-muted text-xs mb-1"},"Filter",-1)),t("button",{onClick:et,class:R(["glass-card border rounded-[10px] px-4 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20 min-w-[120px]",{"border-primary bg-primary/10 text-primary":k.value,"border-stroke-subtle dark:border-stroke text-content-secondary dark:text-content-muted hover:border-primary hover:text-content-primary dark:hover:text-content-primary hover:bg-primary/5":!k.value}])},n(k.value?"New Only":"Show New"),3)]),t("div",xn,[u[11]||(u[11]=t("label",{class:"text-transparent text-xs mb-1"},".",-1)),t("button",{onClick:Q,class:R(["glass-card border border-stroke-subtle dark:border-stroke hover:border-primary rounded-[10px] px-4 py-2 text-content-secondary dark:text-content-muted hover:text-content-primary dark:hover:text-content-primary text-sm transition-all duration-200 focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary/20",{"opacity-50 cursor-not-allowed hover:border-stroke-subtle dark:hover:border-stroke hover:text-content-secondary dark:hover:text-content-muted":I.value==="all"&&S.value==="all"&&!k.value,"hover:bg-primary/10":I.value!=="all"||S.value!=="all"||k.value}]),disabled:I.value==="all"&&S.value==="all"&&!k.value}," Reset ",10,yn)])])]),u[25]||(u[25]=Pt('<div class="hidden lg:grid grid-cols-12 gap-2 pb-3 border-b border-stroke-subtle dark:border-stroke text-content-secondary dark:text-content-muted text-xs uppercase mb-4" data-v-ec32abd6><div class="col-span-1" data-v-ec32abd6>Time</div><div class="col-span-1" data-v-ec32abd6>Type</div><div class="col-span-2" data-v-ec32abd6>Route</div><div class="col-span-1" data-v-ec32abd6>LEN</div><div class="col-span-2" data-v-ec32abd6>Path/Hashes</div><div class="col-span-1" data-v-ec32abd6>RSSI</div><div class="col-span-1" data-v-ec32abd6>SNR</div><div class="col-span-1" data-v-ec32abd6>Score</div><div class="col-span-1" data-v-ec32abd6>TX Delay</div><div class="col-span-1" data-v-ec32abd6>Status</div></div>',1)),t("div",bn,[t("div",vn,[(l(!0),i(U,null,X(M.value,(a,z)=>(l(),i("div",{key:`${a.packet_hash}_${a.timestamp}_${z}`,class:R(["packet-row border-b border-stroke-subtle dark:border-dark-border/50 pb-4 hover:bg-background-mute dark:hover:bg-stroke/5 transition-colors duration-150 cursor-pointer rounded-[10px] p-2 border-l-4",tt(a.type)]),onClick:ot=>q(a)},[t("div",hn,[t("div",fn,n(d(a.timestamp)),1),t("div",kn,[t("div",{class:R(["w-2 h-2 rounded-full",K(a.type)])},null,2),t("div",_n,[t("span",wn,n(o(a.type)),1),a.type===4&&F(a)?(l(),i("span",{key:0,class:"text-accent-red/70 text-[10px] font-medium max-w-[80px] truncate",title:F(a)||void 0},n(F(a)),9,$n)):w("",!0)])]),t("div",Tn,[t("span",{class:R(["inline-block px-2 py-1 rounded text-xs font-medium",E(a.route)])},n(x(a.route)),3)]),t("div",Sn,n(a.length)+"B",1),t("div",Rn,[t("div",Pn,[g(a)?(l(),i("div",Cn,[(l(!0),i(U,null,X(g(a).nodes,(ot,J)=>(l(),i(U,{key:J},[t("span",{class:R(["inline-block px-1.5 py-0.5 rounded text-[10px] font-mono font-semibold",J===0?"bg-badge-cyan-bg text-badge-cyan-text":"bg-gray-500/20 text-content-muted dark:text-content-muted"])},n(ot),3),J<g(a).nodes.length-1?(l(),i("svg",An,u[12]||(u[12]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M9 5l7 7-7 7"},null,-1)]))):w("",!0)],64))),128)),g(a).hops>0?(l(),i("span",Mn," ("+n(g(a).hops)+" hop"+n(g(a).hops>1?"s":"")+") ",1)):w("",!0)])):(l(),i("div",Dn,[t("span",Nn,n(a.src_hash?.slice(-4).toUpperCase()||"????"),1),u[13]||(u[13]=t("svg",{class:"w-3 h-3 text-content-muted dark:text-content-muted/60",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2.5",d:"M9 5l7 7-7 7"})],-1)),t("span",{class:R(["inline-block px-2 py-0.5 rounded text-xs font-mono",a.dst_hash?"bg-badge-cyan-bg text-badge-cyan-text":"bg-yellow-500/20 text-yellow-700 dark:text-yellow-300"])},n(a.dst_hash?a.dst_hash.slice(-4).toUpperCase():"BCAST"),3)]))])]),t("div",Bn,n(a.rssi!=null?a.rssi.toFixed(0):"N/A"),1),t("div",Fn,n(a.snr!=null?a.snr.toFixed(1)+"dB":"N/A"),1),t("div",jn,n(a.score!=null?a.score.toFixed(2):"N/A"),1),t("div",En,[Number(a.tx_delay_ms)>0?(l(),i("div",In,[a.transmitted?(l(),i("div",{key:0,class:R(["w-1.5 h-1.5 rounded-full flex-shrink-0",L(a)])},null,2)):w("",!0),t("span",null,n(H(Number(a.tx_delay_ms))),1)])):w("",!0)]),t("div",Un,[t("div",null,[t("span",{class:R(["text-xs font-medium",_(a)])},n(N(a)),3),a.drop_reason?(l(),i("p",Ln,n(a.drop_reason),1)):w("",!0)])])]),t("div",Vn,[t("div",Hn,[t("div",zn,[t("div",{class:R(["w-2 h-2 rounded-full flex-shrink-0",K(a.type)])},null,2),t("div",Xn,[t("span",Gn,n(o(a.type)),1),a.type===4&&F(a)?(l(),i("span",{key:0,class:"text-accent-red/70 text-[10px] font-medium leading-tight",title:F(a)||void 0},n(F(a)),9,On)):w("",!0)]),t("span",{class:R(["inline-block px-2 py-1 rounded text-xs font-medium ml-2",E(a.route)])},n(x(a.route)),3)]),t("div",Qn,[t("span",qn,n(d(a.timestamp)),1),t("span",{class:R(["text-xs font-medium",_(a)])},n(N(a)),3)])]),t("div",Wn,[t("div",Kn,[g(a)?(l(),i("div",Jn,[u[15]||(u[15]=t("span",{class:"text-content-muted dark:text-content-muted text-[10px] font-medium"},"PATH",-1)),(l(!0),i(U,null,X(g(a).nodes,(ot,J)=>(l(),i(U,{key:J},[t("span",{class:R(["inline-block px-1.5 py-0.5 rounded text-[10px] font-mono font-semibold",J===0?"bg-badge-cyan-bg text-badge-cyan-text":"bg-gray-500/20 text-content-muted dark:text-content-muted"])},n(ot),3),J<g(a).nodes.length-1?(l(),i("svg",Yn,u[14]||(u[14]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M9 5l7 7-7 7"},null,-1)]))):w("",!0)],64))),128)),g(a).hops>0?(l(),i("span",Zn," ("+n(g(a).hops)+" hop"+n(g(a).hops>1?"s":"")+") ",1)):w("",!0)])):(l(),i(U,{key:1},[t("div",to,[u[16]||(u[16]=t("span",{class:"text-content-muted dark:text-content-muted text-[10px] font-medium"},"SRC",-1)),t("span",eo,n(a.src_hash?.slice(-4)||"????"),1)]),t("div",so,[u[18]||(u[18]=t("svg",{class:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2.5",d:"M9 5l7 7-7 7"})],-1)),a.route===1?(l(),i("span",ao,u[17]||(u[17]=[t("svg",{class:"w-2.5 h-2.5 inline",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 5l7 7-7 7M5 5l7 7-7 7"})],-1)]))):w("",!0)]),t("div",no,[t("span",{class:R(["inline-block px-2 py-0.5 rounded text-xs font-mono font-semibold",a.dst_hash?"bg-badge-cyan-bg text-badge-cyan-text":"bg-yellow-500/20 text-yellow-700 dark:text-yellow-300"])},n(a.dst_hash?a.dst_hash.slice(-4).toUpperCase():"BCAST"),3),u[19]||(u[19]=t("span",{class:"text-content-muted dark:text-content-muted text-[10px] font-medium"},"DST",-1))])],64))]),t("div",oo,[t("div",ro,[a.snr!=null?(l(),i("div",lo,[t("div",{class:R(["w-1 h-3 rounded-sm",a.snr>=-10?"bg-green-400":"bg-white/20"])},null,2),t("div",{class:R(["w-1 h-4 rounded-sm",a.snr>=-5?"bg-green-400":"bg-white/20"])},null,2),t("div",{class:R(["w-1 h-5 rounded-sm",a.snr>=0?"bg-green-400":"bg-white/20"])},null,2),t("div",{class:R(["w-1 h-6 rounded-sm",a.snr>=10?"bg-green-400":"bg-white/20"])},null,2)])):w("",!0),t("span",io,n(a.rssi!=null?a.rssi.toFixed(0)+"dBm":"TX"),1)])])]),t("div",co,[t("div",uo,[t("span",null,n(a.length)+"B",1),t("span",null,"SNR: "+n(a.snr!=null?a.snr.toFixed(1)+"dB":"N/A"),1),t("span",null,"Score: "+n(a.score!=null?a.score.toFixed(2):"N/A"),1)]),t("div",po,[Number(a.tx_delay_ms)>0?(l(),i("span",mo,[a.transmitted?(l(),i("div",{key:0,class:R(["w-1.5 h-1.5 rounded-full flex-shrink-0",L(a)])},null,2)):w("",!0),t("span",null,n(H(Number(a.tx_delay_ms))),1)])):w("",!0)])]),a.drop_reason?(l(),i("div",xo,n(a.drop_reason),1)):w("",!0)])],10,gn))),128))])]),$.value>1?(l(),i("div",yo,[t("div",bo,[t("span",vo," Showing "+n((m.value-1)*pt+1)+" - "+n(Math.min(m.value*pt,y.value.length))+" of "+n(y.value.length)+" packets ",1),c.value?(l(),i("div",go,[u[20]||(u[20]=t("span",{class:"text-content-secondary dark:text-content-muted text-xs"},"•",-1)),t("button",{onClick:yt,disabled:A.value,class:R(["glass-card border border-primary rounded-[8px] px-3 py-1.5 text-xs transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20 hover:bg-primary/5",{"text-primary border-primary cursor-pointer":!A.value,"text-content-secondary dark:text-content-muted border-stroke-subtle dark:border-stroke cursor-not-allowed opacity-50":A.value}])},n(A.value?"Loading...":`Load ${Math.min(200,lt-T.value)} more`),11,ho),t("span",fo,"("+n(T.value)+"/"+n(lt)+" max)",1)])):w("",!0)]),t("div",ko,[t("button",{onClick:u[2]||(u[2]=a=>m.value=m.value-1),disabled:m.value<=1,class:R(["glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20 prev-next-btn",{"border-stroke-subtle dark:border-stroke text-content-muted dark:text-content-muted cursor-not-allowed opacity-50":m.value<=1,"border-stroke-subtle dark:border-stroke text-content-primary dark:text-content-primary hover:border-primary hover:text-primary hover:bg-primary/5":m.value>1}])},u[21]||(u[21]=[t("span",{class:"hidden sm:inline"},"Previous",-1),t("span",{class:"sm:hidden"},"‹",-1)]),10,_o),t("div",wo,[m.value>3?(l(),i("button",{key:0,onClick:u[3]||(u[3]=a=>m.value=1),class:"glass-card border border-stroke-subtle dark:border-stroke hover:border-primary rounded-[8px] px-3 py-2 text-sm text-content-primary dark:text-content-primary hover:text-primary hover:bg-primary/5 transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20"}," 1 ")):w("",!0),m.value>4?(l(),i("span",$o,"...")):w("",!0),(l(!0),i(U,null,X(Array.from({length:Math.min(5,$.value)},(a,z)=>Math.max(1,Math.min(m.value-2,$.value-4))+z).filter(a=>a<=$.value),a=>(l(),i("button",{key:a,onClick:z=>m.value=a,class:R(["glass-card border rounded-[8px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20 page-number",{"border-primary bg-primary/10 text-primary":m.value===a,"border-stroke-subtle dark:border-stroke text-content-primary dark:text-content-primary hover:border-primary hover:text-primary hover:bg-primary/5":m.value!==a}])},n(a),11,To))),128)),m.value<$.value-3?(l(),i("span",So,"...")):w("",!0),m.value<$.value-2?(l(),i("button",{key:3,onClick:u[4]||(u[4]=a=>m.value=$.value),class:"glass-card border border-stroke-subtle dark:border-stroke hover:border-primary rounded-[8px] px-3 py-2 text-sm text-content-primary dark:text-content-primary hover:text-primary hover:bg-primary/5 transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20"},n($.value),1)):w("",!0)]),t("button",{onClick:u[5]||(u[5]=a=>m.value=m.value+1),disabled:m.value>=$.value,class:R(["glass-card border rounded-[10px] px-3 py-2 text-sm transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20 prev-next-btn",{"border-stroke-subtle dark:border-stroke text-content-muted dark:text-content-muted cursor-not-allowed opacity-50":m.value>=$.value,"border-stroke-subtle dark:border-stroke text-content-primary dark:text-content-primary hover:border-primary hover:text-primary hover:bg-primary/5":m.value<$.value}])},u[22]||(u[22]=[t("span",{class:"hidden sm:inline"},"Next",-1),t("span",{class:"sm:inline"},"›",-1)]),10,Ro)])])):e.value&&!A.value?(l(),i("div",Po,[t("div",Co,[t("span",Ao," Showing "+n(y.value.length)+" packets ",1),u[23]||(u[23]=t("span",{class:"text-content-secondary dark:text-content-muted text-xs"},"•",-1)),t("button",{onClick:yt,class:"glass-card border border-primary rounded-[8px] px-4 py-2 text-sm text-primary hover:bg-primary/5 transition-all duration-200 focus:outline-none focus:ring-1 focus:ring-primary/20"}," Load "+n(Math.min(200,lt-T.value))+" more records ",1),t("span",Mo,"("+n(T.value)+"/"+n(lt)+" max)",1)])])):A.value?(l(),i("div",Do,u[24]||(u[24]=[t("div",{class:"flex items-center gap-2"},[t("div",{class:"w-4 h-4 border-2 border-primary border-t-transparent rounded-full animate-spin"}),t("span",{class:"text-primary text-sm"},"Loading more records...")],-1)]))):w("",!0)]),st(Za,{packet:D.value,isOpen:j.value,onClose:V},null,8,["packet","isOpen"])],64))}}),Bo=ut(No,[["__scopeId","data-v-ec32abd6"]]),Fo={class:"grid grid-cols-1 lg:grid-cols-2 gap-4 mb-2"},zo=dt({name:"DashboardView",__name:"Dashboard",setup(at){return(C,G)=>(l(),i("div",null,[st(te),t("div",Fo,[st(je),st(he)]),st(Bo)]))}});export{zo as default};
|