"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[89598],{776288(e,t,a){a.d(t,{A:()=>l});const l={PCAP:4194304,HWOFFLOAD_QOS_AND_SMART_QUEUE:2147483648,SUPPORT_FILE:65536}},723544(e,t,a){a.d(t,{A:()=>c});var l=a(296540),n=a(217439),r=a(916537),i=a(360113);const c=({mac:e,compact:t=!1})=>e?l.createElement(i.A,{compact:t},l.createElement(n.A,{color:"text-2",size:"medium"},l.createElement(r.sA,{id:"COMMON_MAC_ADDRESS"})),l.createElement(n.A,{color:"text-3",size:"medium"},e)):null},336549(e,t,a){a.d(t,{A:()=>o,c:()=>m});var l=a(296540),n=a(217439),r=a(38937),i=a(916537),c=a(360113);const m=({signal:e,color:t,size:a})=>l.createElement(n.A,{size:a||"medium",color:t||(0,r.b5)(e)},e," ",l.createElement(i.sA,{id:"COMMON_UNIT_DBM"})),o=(0,l.memo)(e=>l.createElement(c.A,null,l.createElement(n.A,{color:"text-2",size:"medium"},l.createElement(i.sA,{id:"COMMON_SIGNAL"})),l.createElement(m,{...e})))},812454(e,t,a){a.d(t,{A:()=>B});var l=a(296540),n=a(71479),r=a(566723),i=a(218234),c=a(294303),m=a(217439),o=a(382389),s=a(842630),E=a(224948),_=a(916537),d=a(469733),u=a(824182),A=a(264963),p=a(822336),v=a(705145);const I=(0,n.A)(c.A)`
  flex-direction: column;
  margin-top: ${r.kc};
  padding-top: ${r.kc};
  border-top: ${({theme:{themeName:e}})=>p.Ay[`desktop-border-divider-${e}`]};
`,C=(0,n.A)(c.A)`
  width: 100%;
  justify-content: space-between;
`,b=(0,n.A)(c.A)`
  gap: ${r.Ln};
  align-items: center;
`,N=(0,n.A)(v.A)`
  max-width: 150px;
`,D=(0,l.memo)(({mac:e,replacementMac:t})=>{const a=(0,d.useDispatch)(),[n,r]=(0,l.useState)(!1),i=(0,l.useCallback)(()=>{r(!0),a((0,A.X2)(e)).finally(()=>{r(!1)})},[a,e]);return l.createElement(I,null,l.createElement(C,null,l.createElement(N,{isTruncated:!0,size:"medium",color:"text-2"},l.createElement(_.sA,{id:"DEVICE_REPLACEMENT_DEVICE"})),l.createElement(b,null,l.createElement(m.A,{size:"medium",color:"text-3"},t),l.createElement(u.A,{actionable:!0,onClick:i,disabled:n}))))}),O=(0,n.A)(c.A)`
  flex-direction: column;
  gap: ${r.kc};
`;var M=a(709690),g=a(823858),h=a(768195);const T=({state:e},{uBlue06:t,orange06:a})=>e===h.gQ.WAITING_FOR_REPLACEMENT?l.createElement(M.A,{size:"original",color:t,variant:"fill"}):l.createElement(g.A,{size:"original",color:a,variant:"fill"}),w=({state:e})=>{switch(e){case h.gQ.WAITING_FOR_REPLACEMENT:return"DEVICE_REPLACEMENT_PENDING_WAITING_FOR_REPLACEMENT";case h.gQ.WAITING_FOR_REPLACED_DEVICE_DISCONNECT:return"DEVICE_REPLACEMENT_PENDING_WAITING_FOR_REPLACED_DEVICE_DISCONNECT";case h.gQ.INCOMPATIBLE_REPLACEMENT:return"DEVICE_REPLACEMENT_PENDING_INCOMPATIBLE_REPLACEMENT";default:return"DEVICE_REPLACEMENT_PENDING_CANNOT_REPLACE"}},k=(0,l.memo)(({mac:e,replacement:t})=>{const{motifPalette:a}=(0,o.u)();return t?.device_mac?l.createElement(s.A,null,l.createElement(E.A,{icon:T(t,a)},l.createElement(O,null,l.createElement(m.A,{size:"medium",color:"text-2"},l.createElement(_.sA,{id:w(t),values:{b:_.b}}))),l.createElement(D,{mac:e,replacementMac:t.device_mac}))):null});var y=a(211908),P=a(129361),S=a(470962),L=a(281884),f=a(451632),R=a(392699),H=a(124092),F=a(236037),G=a(683086);const x=(0,n.A)(c.A)`
  & > :first-child {
    margin-top: ${r.kc};
  }
`,B=({activeItem:e,activeItem:{deviceState:t,uplink:a,mac:n,model:c,type:m,replacement:o},showPortOverview:s,hidePortsButton:E,isStacking:_,multipleDisplayedDevicesData:d,overviewChildren:u,children:A,badge:p})=>{const v=(0,l.useMemo)(()=>(0,L.H)(t,a?.type),[t,a?.type]),I=Boolean(e?.port_table?.length),C=s&&I;return l.createElement(l.Fragment,null,l.createElement(H.A,{activeItem:e,isOffline:v===R.v.OFFLINE,description:l.createElement(P.A,{activeItem:e,connectionStatus:v}),meshingDescription:l.createElement(f.A,{activeItem:e,connectionStatus:v}),isStacking:_,badge:p},u,C?l.createElement("div",{style:{marginTop:r.Ln}},l.createElement(i.A,{activeItem:e,disableOnPortClick:!0,showFullScreenDiagramButton:!1,useBubbleWrapper:!1,multipleDisplayedDevicesData:d,isStacking:_})):null,l.createElement(x,{gap:r.kc,flexDirection:"column"},l.createElement(F.A,{activeItem:e}),!E&&I?l.createElement(G.A,{mac:n}):null),A),v===R.v.OFFLINE?l.createElement(S.A,null,o?.device_mac?null:l.createElement(y.A,{mac:n,model:c,type:m})):null,l.createElement(k,{mac:n,replacement:o}))}},513154(e,t,a){a.d(t,{A:()=>v});var l=a(296540),n=a(146784),r=a(294303),i=a(689965),c=a(999063),m=a(633819),o=a(559674),s=a(32753),E=a(723544),_=a(205830),d=a(400242),u=a(57759),A=a(777741),p=a(10373);const v=({name:e,model:t,ip:a,ipv6:v,lan_ip:I,mac:C,displayable_version:b,connection_network_name:N,uptime:D,systemStatsMem:O,sys_stats:M,type:g,total_used_power:h,imei:T,eSimEid:w,deviceState:k,ethernet_overrides:y,port_table:P})=>l.createElement(i.A,null,l.createElement(r.A,{height:"100%",flexDirection:"column"},l.createElement(d.A,{ip:a,lan_ip:I,type:g,ethernet_overrides:y,port_table:P}),l.createElement(n.A,{ipv6_address:v}),l.createElement(E.A,{mac:C}),l.createElement(u.A,{name:e,model:t,mac:C,type:g,displayable_version:b,uptime:D,deviceState:k}),l.createElement(o.A,{connection_network_name:N}),l.createElement(c.A,{uptime:D}),l.createElement(s.A,{systemStatsMem:O}),l.createElement(_.A,{sys_stats:M}),l.createElement(m.A,{totalPower:h}),T?l.createElement(p.A,{imei:T}):null,w?l.createElement(A.A,{eid:w}):null))},813429(e,t,a){a.r(t),a.d(t,{default:()=>N});var l=a(296540),n=a(566723),r=a(294303),i=a(889879),c=a(243),m=a(937491),o=a(328787),s=a(15244),E=a(686130),_=a(812454),d=a(757760),u=a(32100),A=a(69976),p=a(151931),v=a(513154),I=a(943393),C=a(78853),b=a(675116);const N=({activeItem:e,activeItem:{adopted:t,name:a,type:N,mac:D,model:O,shortname:M,uplink:g,vap_table:h,uptime:T,last_seen:w,radio_table:k,radio_table_stats:y,stat:P,detailed_states:{device_near_power_limit:S}={device_near_power_limit:!1},total_used_power:L,total_max_power:f,ip:R,ipv6:H,lan_ip:F,displayable_version:G,connection_network_name:x,"system-stats":B,sys_stats:z,support_wifi6e:V,config_network:W,deviceState:$,mbb:Q,mbb_overrides:U,ethernet_overrides:j,port_table:X}})=>l.createElement(l.Fragment,null,l.createElement(_.A,{activeItem:e,showPortOverview:!0,hidePortsButton:!0,overviewChildren:l.createElement(d.A,{uplink:g,type:N,mac:D,radio_table:k,radio_table_stats:y,vap_table:h,support_wifi6e:V,deviceState:$})},l.createElement(r.A,{flexDirection:"column",gap:n.kc},l.createElement(E.A,{activeItem:e,showPortsButton:!0,showCaptureButton:!0}),Q?l.createElement(m.A,{mac:D,deviceState:$,mbb:Q,mbb_overrides:U}):null)),l.createElement(o.A,{ip:R,adopted:t,config_network:W}),Q?l.createElement(b.A,{imei:Q?.imei,eId:Q?.esim?.eid,model:O}):null,l.createElement(i.A,{mac:D,type:N,model:O,device_near_power_limit:Boolean(S),total_used_power:L||0,total_max_power:f||0}),l.createElement(I.A,{mac:D}),l.createElement(u.A,{stat:P,mac:D,uplink:g,uptime:T,last_seen:w}),l.createElement(v.A,{name:a,model:O,type:N,ip:R,ethernet_overrides:j,port_table:X,ipv6:H,lan_ip:F,mac:D,displayable_version:G,connection_network_name:x,uptime:T,systemStatsMem:B?.mem,sys_stats:z,total_used_power:L}),l.createElement(s.A,{activeItem:e}),l.createElement(p.A,{radio_table:k,radio_table_stats:y,type:N,stat:P||{},support_wifi6e:V}),Q?l.createElement(c.F,{sim:Q?.sim,radio:Q?.radio,mbb_overrides:U}):null,l.createElement(A.S,{vap_table:h,radio_table:k}),l.createElement(C.A,{shortname:M}))},596441(e,t,a){a.d(t,{I:()=>l});const l={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,t,a,l){return Math.min((l||this.ROW_HEIGHT)*e+(a??this.HEADER_HEIGHT),(l||this.ROW_HEIGHT)*t+(a??this.HEADER_HEIGHT))},getEditContainerHeight(e,t,a){return Math.min((a||this.EDIT_FIELD_HEIGHT)*e,(a||this.EDIT_FIELD_HEIGHT)*t)}}},879905(e,t,a){a.d(t,{A:()=>o});var l=a(296540),n=a(217439),r=a(758649),i=a(566723),c=a(294303),m=a(916537);const o=(e,t={})=>{const{formatMessage:a}=(0,m.tz)(),[o,s]=(0,l.useState)(!1),{defaultCount:E,label:{singular:_,plural:d}}=(0,l.useMemo)(()=>({defaultCount:t.defaultCount||6,label:{singular:a({id:t.label?.singular||"COMMON_DEVICE"}),plural:a({id:t.label?.plural||"COMMON_DEVICES"})}}),[t,a]),u=(0,l.useCallback)(()=>{s(e=>!e)},[]);return{rowLimit:e>E&&!o?E:e,renderFooter:e>E?l.createElement(c.A,{marginTop:i.kc},l.createElement(n.A,{size:"medium"},l.createElement(m.sA,{id:"COMMON_ADV_TABLE_FOOTER",values:{length:e>E&&!o?E:e,total:e,singular:_,plural:d}}),l.createElement(l.Fragment,null," ",l.createElement(r.A,{type:"button",variant:"inline",onClick:u},l.createElement(m.sA,{id:"COMMON_SHOW"})," ",l.createElement(m.sA,{id:o?"COMMON_LESS":"COMMON_ALL"}))))):null,setExpand:s}}}}]);