"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[94571],{662965(e,t,n){n.d(t,{A:()=>l});var a=n(296540),r=n(629318);const l=(0,n(51946).w)(e=>(0,a.createElement)("svg",(0,r.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,a.createElement)("path",{d:"M9.724 15 3 7.917 9.724 5 16 7.917 9.724 15Z",fill:"currentColor",className:e.twotonedclassname}),(0,a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.063 8a.479.479 0 0 1-.035.648.53.53 0 0 1-.773-.044A7.453 7.453 0 0 0 9.585 6a7.472 7.472 0 0 0-5.673 2.601.527.527 0 0 1-.766.046A.476.476 0 0 1 3.11 8a8.474 8.474 0 0 1 6.476-3 8.475 8.475 0 0 1 6.476 3Zm-2.454 2.531a.455.455 0 0 1-.056.592c-.229.228-.614.172-.813-.082a4 4 0 0 0-6.433.167c-.126.18-.386.217-.541.062-.246-.246-.293-.633-.075-.903A4.99 4.99 0 0 1 9.586 8.5c1.651 0 3.115.8 4.023 2.031ZM9.636 15a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z",fill:"currentColor",className:e.baseclassname}),(0,a.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.418 7.597c.267.275.244.71-.027.98-.315.316-.833.282-1.148-.033A6.97 6.97 0 0 0 10.298 6.5a6.945 6.945 0 0 0-4.934 2.043c-.315.316-.833.35-1.148.035-.27-.271-.294-.706-.028-.981A8.478 8.478 0 0 1 10.298 5c2.407 0 4.574.998 6.12 2.597Zm-4.58 5.903a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm2.099-2.468c.25-.25.286-.647.049-.907A4.98 4.98 0 0 0 10.298 8.5c-1.45 0-2.764.626-3.681 1.616-.24.26-.206.658.043.91.33.333.887.263 1.226-.06A3.476 3.476 0 0 1 10.299 10c.94 0 1.787.367 2.415.968.338.323.892.394 1.223.064Z",fill:"currentColor",className:e.fillclassname})))},776288(e,t,n){n.d(t,{A:()=>a});const a={PCAP:4194304,HWOFFLOAD_QOS_AND_SMART_QUEUE:2147483648,SUPPORT_FILE:65536}},104154(e,t,n){n.d(t,{A:()=>o});var a=n(296540),r=n(469733),l=n(691294),i=n(239417);const o=({client:{id:e,type:t,status:n,blocked:o},props:c,children:m})=>{const s=(0,a.useMemo)(()=>t===l.sK.VPN?l.N7.VPN:t===l.sK.TELEPORT?l.N7.TELEPORT:o?l.N7.BLOCKED:n===l.S2.OFFLINE?l.N7.OFFLINE:l.N7.ACTIVE,[t,o,n]);return m((0,r.useSelector)((0,a.useMemo)(()=>(0,i.kV)(e,c,s),[e,c,s])))}},907157(e,t,n){n.d(t,{A:()=>i});var a=n(296540),r=n(469733),l=n(435325);const i=({mac:e,props:t,children:n})=>n((0,r.useSelector)((0,a.useMemo)(()=>(0,l.eu)(e,t),[e,t])))},532114(e,t,n){n.d(t,{A:()=>i});var a=n(217439),r=n(71479),l=n(311785);const i=(0,r.A)(a.A,(0,l.A)("colorOverride"))`
  ${({colorOverride:e})=>e?`color: ${e} !important`:""};
`},424095(e,t,n){n.d(t,{A:()=>i});var a=n(296540),r=n(90757),l=n(573531);const i=({startTimestamp:e,uptimeParams:t})=>{const n=(0,a.useRef)(null),i=(0,a.useRef)(null),o=(0,a.useCallback)(t=>{n.current&&(n.current.innerText=e?(0,r.Ay)(Math.floor(Date.now()/1e3)-e,t).join(" "):l.L,i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{o(t)},1e3))},[e]);return(0,a.useEffect)(()=>(e&&o(t),()=>{i.current&&clearTimeout(i.current)}),[e,t,o]),a.createElement("span",{ref:n})}},78853(e,t,n){n.d(t,{A:()=>C});var a,r=n(592563),l=n(296540),i=n(469733),o=n(217439),c=n(187483),m=n(916537),s=n(689965),d=n(86571),E=n(801081);!function(e){e.OPEN_MODAL="openModal"}(a||(a={}));const u=(0,E.Mz)(c.zn,e=>void 0!==e[a.OPEN_MODAL]);var A=n(856632),_=n(957866);const p=({uidbDevice:e})=>{const t=(0,i.useSelector)(c.zn),n=t?.[a.OPEN_MODAL];return n?l.createElement(r.A,{onClick:()=>n(e)},l.createElement(o.A,{size:"medium",color:"inherit"},l.createElement(m.sA,{id:"DEVICE_SHOW_DETAILS"}))):null},O=({shortname:e})=>{(0,_.A)();const t=(0,i.useSelector)((0,l.useMemo)(()=>(0,A.$E)(e),[e]));return t?.compliance?l.createElement(s.A,{type:s.I.ACCORDION,items:[{id:"compliance",label:l.createElement(d.A,{id:"COMMON_COMPLIANCE"}),renderContent:()=>l.createElement(p,{uidbDevice:t}),openByDefault:!0}]}):null},C=({shortname:e})=>(0,i.useSelector)(u)?l.createElement(O,{shortname:e}):null},686130(e,t,n){n.d(t,{A:()=>S});var a=n(469733),r=n(296540),l=n(592510),i=n(860631),o=n(666889),c=n(635740),m=n(745667),s=n(634229),d=n(602021),E=n(776288),u=n(71479),A=n(180524),_=n(369702),p=n(916537),O=n(780811),C=n(837612),I=n(602197),h=n(199582);const g=(0,u.A)("span")`
  width: 100%;
`,N=({activeItem:e,onClick:t,disabledWithReason:n,[h.L]:a})=>{const l=(e=>{const t=(0,C.S9)(e);return e.disabled||t!==I.g.CONNECTED||!(0,O.sc7)(t)?"DEVICE_PCAP_DISABLED_TOOLTIP":null})(e)||n;return r.createElement(A.A,{description:l?r.createElement(p.sA,{id:l}):void 0},r.createElement(g,{...a&&{[h.L]:a}},r.createElement(_.A,{onClick:t,isDisabled:!!l,width:"full"},r.createElement(p.sA,{id:"COMMON_PACKET_CAPTURE"}))))};var b=n(845030),x=n(398300),f=n(968906),R=n(683086),v=n(132196),T=n(566723),w=n(294303);const y=v.AH`
  &:empty {
    display: none;
  }
`,M=(0,u.A)("div")`
  flex: 1 1 0;
  min-width: 33%;
  box-sizing: border-box;
  padding-right: ${T.kc};

  &:last-child {
    padding-right: 0;
  }
`,P=({children:e,...t})=>r.createElement(w.A,{marginTop:T.kc,className:y,...t},r.Children.map(e,e=>e?r.createElement(M,{className:y},e):null)),S=({activeItem:e,showPortsButton:t,showCaptureButton:n})=>{const u=(0,a.useDispatch)(),A=(0,a.useSelector)(d.vc),_=(0,a.useSelector)(o.ar),p=n&&A===e.mac&&_&&(0,i.W4)(e,E.A.PCAP),O=t&&e.port_table?.length>0;(0,r.useEffect)(()=>{u((0,s.Sk)(void 0,{crudCacheStrategy:{type:l.e.CACHE}})),u((0,m.hh)(void 0,{crudCacheStrategy:{type:l.e.CACHE}}))},[u]);const C=(0,r.useCallback)(()=>{u((0,b.XP)({type:x.H.PACKET_CAPTURE,id:e.mac,customData:{captureDeviceType:c.X.GATEWAY}}))},[u,e.mac]);return r.createElement(r.Fragment,null,r.createElement(P,null,O?r.createElement(R.A,{mac:e.mac}):null,p?r.createElement(N,{activeItem:e,captureDeviceType:c.X.GATEWAY,onClick:C,...f.A.addDataTestId(f.A.TestId.SIDE_PANEL_TRIGGER)}):null))}},635740(e,t,n){var a,r;n.d(t,{A:()=>a,X:()=>r}),function(e){e.DEFAULT="default",e.IN_PROGRESS="inProgress",e.READY="ready",e.DOWNLOADING="downloading",e.STOPPING="stopping"}(a||(a={})),function(e){e.AP="ap",e.GATEWAY="gateway"}(r||(r={}))},666889(e,t,n){n.d(t,{ar:()=>b,ax:()=>x,r8:()=>f});var a=n(801081),r=n(189601),l=n(513180),i=n(573531),o=n(938325),c=n(477544),m=n(339879),s=n(959207),d=n(233187),E=n(366188),u=n(535657),A=n(615720),_=n(532419),p=n(180830),O=n(635740);const C=[d.rR.CORPORATE,d.rR.GUEST],I=e=>void 0===e||e,h=({_id:e,name:t,enabled:n,ip_subnet:a,ipv6_subnet:r,wan_networkgroup:l,vpn_type:o,purpose:c,l2tp_interface:m,openvpn_interface:d,wireguard_interface:E,ipsec_interface:A,sdwan_hub_spoke_local_wan_id:_},p)=>({_id:e,enabled:I(n),name:t||i.L,ip_subnet:p?i.L:(0,s.Qe)({ip_subnet:a,ipv6_subnet:r},u.L),wan_networkgroup:l,vpn_type:o,ipsec_interface:A,l2tp_interface:m,openvpn_interface:d,purpose:c,sdwan_hub_spoke_local_wan_id:_,wireguard_interface:E}),g=(e,t)=>e?e===l.C.WAN?t.wan1:t[e.toLocaleLowerCase()]||{}:{},N=(0,r.WY)()((0,a.Mz)(E.Ct,_.U$,m.$D,_.AL,(e,t,n,a)=>[...e.reduce((e,n)=>(n&&t.network_table?.some(({_id:e})=>e===n._id)&&I(n.enabled)&&n.gateway_type!==d.xk.SWITCH&&C.includes(n.purpose)&&e.push(h(n)),e),[]),...n.reduce((e,{configuration:n={}})=>{if((({purpose:e,wan_networkgroup:t},n)=>{if(e!==d.rR.WAN)return!1;if(t===l.C.WAN_LTE_FAILOVER)return!0;const a=g(t,n);return!!a?.up})(n,t)){let r;if(n.wan_networkgroup===l.C.WAN_LTE_FAILOVER)r=a?.lte_ip;else{const e=g(n.wan_networkgroup,t);r=e?.ip}e.push({...h(n),...r?{ip_subnet:r}:{}})}return e},[])]),e=>e),b=(0,r.WY)()((0,a.Mz)(N,e=>Boolean(e.length)),e=>e),x=(e,t)=>{switch(t){case O.X.AP:return(e=>(0,a.Mz)(E.Ct,c.Ag,(0,p.a5)(e),_.fq,_.Dx,(e,t,n,a,r)=>{const l=t.reduce((e,{enabled:t,networkconf_id:a,ap_group_ids:r=[]})=>(t&&n.some(({_id:e})=>r.includes(e))&&e.push(a),e),[]);return e.reduce((e,t)=>(A.A.includes(t.purpose)&&l.includes(t._id)&&e.push(h(t,(0,o.cH)({gateway_device:t.gateway_device,purpose:t.purpose},a,r))),e),[])}))(e);case O.X.GATEWAY:return N;default:return()=>[]}},f=e=>(0,a.Mz)(c.Ag,t=>{const n=t.filter(t=>t.networkconf_id===e);return[...new Set(n.flatMap(e=>e.wlan_bands))]})},151931(e,t,n){n.d(t,{A:()=>x});var a=n(296540),r=n(71479),l=n(943887),i=n(566723),o=n(217439),c=n(294303),m=n(916537),s=n(360113);const d=({id:e,isDisabledRadio:t})=>a.createElement(c.A,{marginBottom:t?0:i.kc},a.createElement(s.A,null,a.createElement(o.A,{weight:"bold",size:"medium"},a.createElement(m.sA,{id:e})),t?a.createElement(o.A,{color:"text-3",size:"medium"},a.createElement(m.sA,{id:"COMMON_DISABLED"})):null));var E=n(689965),u=n(564985),A=n(170459),_=n(178233);const p=({radio_table_item:e,type:t,stat:n})=>{const{retryPercentage:r,droppedPercentage:l}=(0,a.useMemo)(()=>(0,A.GI)(t,e,"tx",n),[e,t,n]);return a.createElement(s.A,null,a.createElement(o.A,{color:"text-2",size:"medium"},a.createElement(m.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_RETRY_DROPPED"})),a.createElement(o.A,{color:"text-3",size:"medium"},(0,_.l)(r)," / ",(0,_.l)(l)))},O=({radio_table_item:e,type:t,stat:n})=>{const{totalPackets:r,totalBytes:l}=(0,a.useMemo)(()=>(0,A.GI)(t,e,"tx",n),[t,e,n]);return a.createElement(s.A,null,a.createElement(o.A,{color:"text-2",size:"medium"},a.createElement(m.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_PKTS_BYTES"})),a.createElement(o.A,{color:"text-3",size:"medium"},r??a.createElement(m.sA,{id:"COMMON_FALLBACK"})," /"," ",l??a.createElement(m.sA,{id:"COMMON_FALLBACK"})))},C=({radio_table_stats:e,radio_table_stats_item:t})=>{const{formatMessage:n}=(0,m.tz)(),r=(0,a.useMemo)(()=>(0,A.ZJ)(e,t,n),[e,t,n]);return r?a.createElement(s.A,null,a.createElement(o.A,{color:"text-2",size:"medium"},a.createElement(m.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_EIRP"})),a.createElement(o.A,{color:"text-3",size:"medium"},r)):null},I=({radio_table_item:e,type:t,stat:n})=>{const{retryPercentage:r,droppedPercentage:l}=(0,a.useMemo)(()=>(0,A.GI)(t,e,"rx",n),[e,t,n]);return a.createElement(s.A,null,a.createElement(o.A,{color:"text-2",size:"medium"},a.createElement(m.sA,{id:"DEVICE_PROPERTIES_LABEL_RX_RETRY_DROPPED"})),a.createElement(o.A,{color:"text-3",size:"medium"},(0,_.l)(r)," / ",(0,_.l)(l)))},h=({radio_table_item:e,type:t,stat:n})=>{const{totalPackets:r,totalBytes:l}=(0,a.useMemo)(()=>(0,A.GI)(t,e,"rx",n),[t,e,n]);return a.createElement(s.A,null,a.createElement(o.A,{color:"text-2",size:"medium"},a.createElement(m.sA,{id:"DEVICE_PROPERTIES_LABEL_RX_PKTS_BYTES"})),a.createElement(o.A,{color:"text-3",size:"medium"},r??a.createElement(m.sA,{id:"COMMON_FALLBACK"})," /"," ",l??a.createElement(m.sA,{id:"COMMON_FALLBACK"})))},g=({radio_table_stats:e,radio_table_item:t,flexProps:n})=>{const r=(0,a.useMemo)(()=>(0,A.Lm)(e,t),[e,t]);return r?a.createElement(s.A,{flexProps:n},a.createElement(o.A,{color:"text-2",size:"medium"},a.createElement(m.sA,{id:"DEVICE_PROPERTIES_LABEL_CHANNEL_UTILIZATION"})),a.createElement(o.A,{color:"text-3",size:"medium"},`${r.total}% / ${r.selfRx}% / ${r.selfTx}%`)):null};var N=n(86571);const b=(0,r.A)(c.A)`
  &:not(:last-child) {
    margin-bottom: ${i.Ln};
  }
`,x=(0,a.memo)(({radio_table:e,radio_table_stats:t,type:n,stat:r,support_wifi6e:i})=>{const o=(0,a.useMemo)(()=>[...e||[]].sort(A.j3),[e]);return o.length?a.createElement(E.A,{type:E.I.ACCORDION,items:[{id:"airStats",label:a.createElement(N.A,{id:"DEVICE_PROPERTY_AIR_STATS"}),openByDefault:!0,renderContent:()=>o.map(({radio:o,name:m})=>{const s=t?.find(e=>e.radio===o&&e.name===m),E=e?.find(e=>e.radio===o&&e.name===m),_=(0,A.Ww)(E);return o!==u.sx.RADIO_6E||i?a.createElement(b,{flexDirection:"column",key:`${o}-${m}`},a.createElement(d,{id:(0,l.dI)(o),isDisabledRadio:_}),_?void 0:a.createElement(c.A,{height:"100%",flexDirection:"column"},a.createElement(C,{radio_table_stats:t,radio_table_stats_item:s}),a.createElement(O,{radio_table_item:E,type:n,stat:r}),a.createElement(h,{radio_table_item:E,type:n,stat:r}),a.createElement(p,{radio_table_item:E,type:n,stat:r}),a.createElement(I,{radio_table_item:E,type:n,stat:r}),a.createElement(g,{radio_table_stats:t,radio_table_item:E}))):null})}]}):null})},69976(e,t,n){n.d(t,{S:()=>M});var a=n(469733),r=n(296540),l=n(963070),i=n(71479),o=n(592510),c=n(422969),m=n(86571),s=n(689965),d=n(294591),E=n(564985),u=n(328403),A=n(801081),_=n(960407),p=n(477544),O=n(180830);const C=(0,A.Mz)(O.K8,p.Ag,_.gm,(e,t,n)=>e.filter(({device_macs:e,for_wlanconf:t})=>e.includes(n)&&!t).map(e=>{const n=[];return((t||[]).filter(t=>t?.ap_group_ids?.includes(e._id))||[]).forEach(t=>{(t?.wlan_bands||[]).forEach(a=>{n.push({...t,id:`${t._id}-${e._id}-${a}`,wlan_band:a})}),n.length||n.push({...t,id:t._id+e._id})}),{...e,id:e._id,children:n}}));var I=n(271856),h=n(705145),g=n(662965),N=n(955161),b=n(916537),x=n(983329);const f=(0,i.A)(g.A)`
  margin-right: 7px;
  margin-bottom: 2px;
`,R=e=>t=>r.createElement(I.A,{description:r.createElement(r.Fragment,null,e.map(e=>r.createElement(r.Fragment,{key:e},r.createElement(b.sA,{id:"COMMON_BSSID"})," ",e))),width:167,portal:!0},t),v=[{id:"name",label:r.createElement(b.sA,{id:"DEVICE_PROPERTIES_AP_GROUP_TABLE_HEADER_NAME"}),renderCell:({name:e,attr_no_delete:t,children:n,wlan_band:a,bssids:l})=>n?r.createElement(h.A,{isTruncated:!0,color:"inherit",size:"medium"},(0,x.K5)({attr_no_delete:t})?r.createElement(r.Fragment,null,e," (",r.createElement(b.sA,{id:"COMMON_DEFAULT"}),")"):e):r.createElement(N.A,{condition:!!l?.length,wrapper:R(l||[])},r.createElement(h.A,{isTruncated:!0,color:"inherit",size:"medium"},a===d._$.NG?r.createElement(r.Fragment,null,r.createElement(f,null),e," (",r.createElement(b.sA,{id:"COMMON_RADIO_BAND_NG"}),")"):null,a===d._$.NA?r.createElement(r.Fragment,null,r.createElement(f,null),e," (",r.createElement(b.sA,{id:"COMMON_RADIO_BAND_NA"}),")"):null,a===d._$.AX?r.createElement(r.Fragment,null,r.createElement(f,null),e," (",r.createElement(b.sA,{id:"COMMON_RADIO_BAND_6E"}),")"):null))}],T=(0,i.A)("div")`
  table thead {
    display: none;
  }
`,w={[d._$.NG]:E.sx.RADIO_NG,[d._$.NA]:E.sx.RADIO_NA,[d._$.AX]:E.sx.RADIO_6E},y=({vap_table:e=[],radio_table:t=[]})=>{const n=(0,a.useSelector)(C),i=(0,r.useMemo)(()=>t?.reduce((e,t)=>(e[t.radio]=t,e),{}),[t]),m=(0,r.useMemo)(()=>n.map(t=>({...t,children:(t.children||[]).filter(e=>e.wlan_band&&i?.[w[e.wlan_band]]).map(t=>({...t,bssids:e?.filter(e=>t.wlan_band&&e.wlanconf_id===t._id&&e.radio===w[t.wlan_band]).map(e=>e?.bssid||"")}))})),[n,i,e]);return(0,c.A)([(0,u.Yo)(void 0,{crudCacheStrategy:{type:o.e.CACHE}})],r.createElement(T,null,r.createElement(l.A,{truncateHeaderCells:!0,items:m,columns:v,disableColumnFilters:!0,disableSelection:!0,disableTextPointer:!0})))},M=(0,r.memo)(({vap_table:e,radio_table:t})=>e?.length?r.createElement(s.A,{type:s.I.ACCORDION,items:[{id:"apGroups",label:r.createElement(m.A,{id:"COMMON_AP_GROUPS"}),renderContent:()=>r.createElement(y,{vap_table:e,radio_table:t}),openByDefault:!0}]}):null)},231460(e,t,n){n.d(t,{FN:()=>P,XG:()=>T,ZP:()=>w,dC:()=>v,hW:()=>x,kD:()=>S,mb:()=>b,pm:()=>f});var a=n(822336),r=n(296540),l=n(271856),i=n(773412),o=n(217439),c=n(705145),m=n(71479),s=n(903216),d=n(90757),E=n(945132),u=n(566723),A=n(424095),_=n(11001),p=n(294303),O=n(916537),C=n(907157),I=n(104154),h=n(691294),g=n(863489);const N=(0,m.A)(p.A)`
  > div > div {
    height: 8px;
    margin: 0;
    div {
      height: inherit !important;
    }
  }
`,b=(0,m.A)(c.A)`
  :hover {
    color: ${({theme:{themeName:e}})=>a.Ay[`desktop-color-ublue-06-${e}`]};
  }
`,x=({score:e,headerTranslationKey:t,scoreTranslationKey:n,color:a,hideScore:l})=>r.createElement(p.A,{justifyContent:"space-between"},r.createElement(o.A,{color:"text-1",size:"medium",weight:"bold"},r.createElement(O.sA,{id:t})),r.createElement(o.A,{size:"medium",style:{color:a}},r.createElement(O.sA,{id:n}),e>=0&&e<=100&&!l?r.createElement(r.Fragment,null," (",e,"%)"):null)),f=({wiredRateMbps:e,motif:t})=>r.createElement(p.A,{justifyContent:"space-between"},r.createElement(o.A,{size:"medium",weight:"bold"},r.createElement(O.sA,{id:"COMMON_WIRED_EXPERIENCE"})),r.createElement(o.A,{size:"medium",...e>0?{style:{color:(0,g.xe)(e,t)}}:{color:"disabled"}},e>0?(0,s.ir)(e):r.createElement(O.sA,{id:"COMMON_FALLBACK"}))),R=({color:e,tooltipColor:t,labelTranslationKey:n,scoreTranslationKey:a,score:l,hideScore:i=!1,wiredRateMbps:c,not_reported:m,from:s,to:d})=>r.createElement(p.A,{flexDirection:"column",whiteSpace:"nowrap"},r.createElement(p.A,{justifyContent:"space-between"},r.createElement(o.A,{weight:"bold",color:"text-1"},r.createElement(O.sA,{id:n})),r.createElement(o.A,{style:{color:t||e}},r.createElement(O.sA,{id:m?"COMMON_NOT_REPORTED":a,values:{value:c?c<1e3?c:c/1e3:0}}),l>=0&&l<=100&&!m&&!i?r.createElement(r.Fragment,null," (",l,"%)"):null)),r.createElement(p.A,{justifyContent:"space-between"},r.createElement(p.A,{marginRight:u.Ln},r.createElement(o.A,{color:"text-1"},r.createElement(O.sA,{id:"COMMON_TIME"}))),r.createElement(o.A,null,s," - ",d))),v=(0,r.memo)(({stackedBarItems:e,siteTimezone:t,language:n,selfHourCycle:a,hideScore:l=!1,wiredRateMbps:o,labelTranslationKey:c})=>r.createElement(N,null,r.createElement(i.A,{items:e,rounded:!0,itemTooltip:({score:e,color:i,tooltipColor:m,translationKey:s,timestamp:d,nextTimestamp:E,not_reported:u})=>({animate:!1,delay:.2,message:r.createElement(R,{color:i,tooltipColor:m,labelTranslationKey:c,scoreTranslationKey:s,score:e,hideScore:l,not_reported:u,wiredRateMbps:o,from:new Intl.DateTimeFormat(n,{timeZone:t,hourCycle:a,hour:"numeric",minute:"2-digit",day:"numeric",month:"short"}).format(d),to:new Intl.DateTimeFormat(n,{timeZone:t,hourCycle:a,hour:"numeric",minute:"2-digit",day:"numeric",month:"short"}).format(E)}),width:"auto",maxWidth:"auto"})}))),T=({siteTimezone:e,selfHourCycle:t,startTime:n,language:a})=>r.createElement(p.A,{justifyContent:"space-between",marginBottom:u.kc},r.createElement(o.A,{color:"text-3",size:"small"},new Intl.DateTimeFormat(a,{timeZone:e,hourCycle:t,hour:"numeric",minute:"2-digit"}).format(n||Date.now()-432e5)),r.createElement(o.A,{color:"text-3",size:"small"},new Intl.DateTimeFormat(a,{timeZone:e,hourCycle:t,hour:"numeric",minute:"2-digit"}).format(n?n+432e5:Date.now())),r.createElement(o.A,{color:"text-3",size:"small"},r.createElement(O.sA,{id:"COMMON_NOW"}))),w=({activeItem:e,isUnifiDeviceClient:t=!1})=>{const n=(0,r.useMemo)(()=>t?C.A:I.A,[t]);return r.createElement(n,{mac:e.mac,client:e,props:["tx_bytes-r","rx_bytes-r"]},({"tx_bytes-r":e=0,"rx_bytes-r":t=0})=>r.createElement(p.A,null,r.createElement(_.A,{style:{marginRight:"6px"},bytesPerSecond:e,direction:"down",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}}),r.createElement(_.A,{bytesPerSecond:t,direction:"up",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}})))},y=e=>[d.Au.HOURS,d.Au.MINUTES,Math.floor((Date.now()-new Date(1e3*e).getTime())/E.jU)<1?d.Au.SECONDS:d.Au.DAYS],M=(0,r.memo)(({id:e,startTimestamp:t})=>r.createElement(l.A,{width:100,description:r.createElement(c.A,{size:"small",color:"text-1",isCentered:!0,style:{width:"100%"}},r.createElement(O.sA,{id:e}))},r.createElement(o.A,{size:"medium",color:"text-2"},r.createElement(A.A,{startTimestamp:t,uptimeParams:y(t)})))),P=(0,r.memo)(({status:e,assoc_time:t,last_seen:n})=>e===h.S2.ONLINE&&t?r.createElement(M,{id:"COMMON_UPTIME",startTimestamp:t}):e===h.S2.OFFLINE&&n?r.createElement(M,{id:"COMMON_LAST_SEEN",startTimestamp:n}):null),S=({uptime:e,last_seen:t})=>e>=0?r.createElement(l.A,{description:r.createElement(O.sA,{id:"COMMON_UPTIME"})},r.createElement(o.A,{size:"medium"},(0,d.Ay)(e))):t?r.createElement(p.A,{width:"100%",whiteSpace:"nowrap",justifyContent:"flex-end"},r.createElement(o.A,{size:"medium"},r.createElement(O.sA,{id:"COMMON_LAST_SEEN"}))," ",r.createElement(o.A,{size:"medium",color:"inherit"},r.createElement(A.A,{startTimestamp:t,uptimeParams:y(t)}))):null},205830(e,t,n){n.d(t,{A:()=>d});var a=n(296540),r=n(217439),l=n(83438),i=n(566723),o=n(294303),c=n(916537),m=n(780811),s=n(360113);const d=({sys_stats:e,flexProps:t,withTooltip:n,compact:d=!1})=>{const E=(0,m.eiG)(e);return E?a.createElement(s.A,{flexProps:t,compact:d},a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(c.sA,{id:"COMMON_LOAD_AVERAGE"})),n?a.createElement(o.A,{alignItems:"center",gap:i.YC},a.createElement(r.A,{color:"text-3",size:"medium"},E),a.createElement(l.A,{description:a.createElement(c.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LOAD_AVERAGE_TOOLTIP"}),placement:"top start"})):a.createElement(r.A,{color:"text-3",size:"medium"},E)):null}},329708(e,t,n){n.d(t,{A:()=>c});var a=n(296540),r=n(217439),l=n(6510),i=n(916537),o=n(360113);const c=({model:e})=>a.createElement(o.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(i.sA,{id:"COMMON_MODEL"})),a.createElement(r.A,{color:"text-3",size:"medium"},(0,l.Lm)(e)))},559674(e,t,n){n.d(t,{A:()=>m});var a=n(296540),r=n(217439),l=n(115829),i=n(294303),o=n(916537),c=n(360113);const m=({connection_network_name:e})=>e?a.createElement(c.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(o.sA,{id:"COMMON_NETWORK"})),a.createElement(i.A,null,a.createElement(l.A,{color:"text-3",size:"medium"},e))):null},79727(e,t,n){n.d(t,{A:()=>c});var a=n(296540),r=n(217439),l=n(916537),i=n(757167),o=n(360113);const c=({psu_table:e})=>{const t=(0,a.useMemo)(()=>(0,i.Rj)(e),[e]);return a.createElement(a.Fragment,null,t.map(({status:e,statusColor:t,source:n,id:i},c)=>a.createElement(o.A,{key:i},a.createElement(r.A,{size:"medium"},a.createElement(l.sA,{id:n,..."COMMON_POWER_SUPPLY_UNIT"===n&&{values:{psuIndex:c+1}}})),a.createElement(r.A,{size:"medium",color:t},a.createElement(l.sA,{id:e})))))}},418328(e,t,n){n.d(t,{A:()=>x});var a=n(296540),r=n(325898),l=n(271856),i=n(822336),o=n(773412),c=n(84385),m=n(217439),s=n(823858),d=n(71479),E=n(382389),u=n(178233),A=n(566723),_=n(294303),p=n(532114),O=n(916537),C=n(757167),I=n(53765);const h=(0,d.A)(_.A)`
  justify-content: space-between;
`,g=(0,d.A)(c.A)`
  margin: 0 6px;
  height: 10px;
`,N=(0,d.A)(s.A)`
  margin: 0 6px;
`,b=({index:e,item:t})=>a.createElement(I.m,null,a.createElement(I.Y,{id:"COMMON_POWER_SUPPLY_UNIT",values:{psuIndex:""}},e+1),t.temp?Object.entries(t.temp).map(([e,t])=>a.createElement(I.Y,{id:"DEVICE_TEMPERATURE_SENSOR",values:{index:+e+1},key:e},t?.toFixed(1)||a.createElement(O.sA,{id:"COMMON_FALLBACK"})," ",a.createElement(O.sA,{id:"COMMON_UNIT_CELSIUS"}))):null,t.fanSpeed?a.createElement(I.Y,{id:"DEVICE_FAN_SPEED"},t.fanSpeed," ",a.createElement(O.sA,{id:"COMMON_UNIT_RPM"})):null),x=({psuTable:e=[],marginBottom:t})=>{const{themeName:n,motifPalette:c}=(0,E.u)(),{motif:s}=(0,r.A)(),{formatMessage:d}=(0,O.tz)(),I=(0,a.useMemo)(()=>e.map(({power:t,power_capacity:r,temp:E,fan:A,present:I,online:x,label:f},R)=>{const v=r||550,T=Math.ceil(Number.parseFloat(t)/v*100),w={variant:(0,C.NH)(T),value:T,temp:E,fanSpeed:A?.[0],online:x,present:I},y=e?.[R]?.power;return a.createElement(_.A,{flexDirection:"column",key:f},a.createElement(h,null,a.createElement(m.A,{color:"text-2",size:"medium"},a.createElement(O.sA,{id:"COMMON_POWER_SUPPLY_UNIT",values:{psuIndex:R+1}})),a.createElement(_.A,{justifyContent:"space-between",alignItems:"center"},w.present?a.createElement(a.Fragment,null,w.online||w.value?null:a.createElement(l.A,{description:d({id:"DEVICE_USW_MC_PSU_OFFLINE_TOOLTIP"},{index:R+1}),portal:!0},a.createElement(N,{size:"original",variant:"fill",color:i.Ay[`desktop-color-orange-06-${n}`],fill:i.Ay[`desktop-color-neutral-00-${n}`]})),w.online?a.createElement(a.Fragment,null,a.createElement(m.A,{color:"text-3",size:"medium"},a.createElement(O.sA,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:`${Math.ceil(Number.parseFloat(y))}/${v}`}})),a.createElement(g,{orientation:"vertical",color:i.Ay[`desktop-color-neutral-04-${n}`]}),a.createElement(p.A,{size:"medium",colorOverride:w.value?c[w.variant]:i.Ay[`desktop-color-text-3-${s}`]},(0,u.A)(w.value))):null):a.createElement(m.A,{color:"text-3",size:"medium"},a.createElement(O.sA,{id:"DEVICE_NOT_INSTALLED"})))),a.createElement(l.A,{description:w.present?a.createElement(b,{index:R,item:w}):null,width:250},a.createElement(o.A,{items:[w],rounded:!0})))}),[e]);return a.createElement(_.A,{flexDirection:"column",marginBottom:t??A.kI,gap:A.kc},I)}},319736(e,t,n){n.d(t,{A:()=>E});var a=n(296540),r=n(217439),l=n(178233),i=n(38937),o=n(916537),c=n(564985),m=n(170459),s=n(360113);const d={[c.sx.RADIO_NG]:"2.4",[c.sx.RADIO_NA]:"5",[c.sx.RADIO_6E]:"6",[c.sx.RADIO_AD]:"60"},E=(0,a.memo)(({satisfaction:e,vap_table:t,radio_table:n,radio_table_stats:E})=>{const u=(0,a.useMemo)(()=>void 0!==e&&(0,i.Oq)(e),[e]),{na:A,ng:_,sixe:p,naNumSta:O,ngNumSta:C,sixeNumSta:I}=(0,a.useMemo)(()=>(0,m.VM)({vap_table:t,radio_table:n,radio_table_stats:E,satisfaction:e}),[e,t,n,E]),h=[{radio:c.sx.RADIO_NG,satisfaction:_,numSta:C},{radio:c.sx.RADIO_NA,satisfaction:A,numSta:O},{radio:c.sx.RADIO_6E,satisfaction:p,numSta:I}].filter(({satisfaction:e,numSta:t})=>((e,t)=>0!==e&&!!t)(e,t));return u&&0!==h.length?a.createElement(s.A,null,a.createElement(r.A,{color:"text-2",size:"medium"},a.createElement(o.sA,{id:"DEVICE_WIFI_EXPERIENCE",values:{band:h.map(({radio:e})=>d[e]).join("/")}})),((e,t=" / ")=>a.createElement("div",null,e.map((n,o)=>a.createElement(a.Fragment,{key:`${n}-pos-${String(o)}`},(e=>{const t=Math.min(e,100);return a.createElement(r.A,{size:"medium",color:(0,i.Ld)(t)},(0,l.l)(t))})(n),o!==e.length-1?t:null))))(h.map(({satisfaction:e})=>e))):null})},442728(e,t,n){n.d(t,{A:()=>B});var a=n(822336),r=n(469733),l=n(296540),i=n(271856),o=n(963070),c=n(823858),m=n(382389),s=n(592510),d=n(879905),E=n(596441),u=n(398300),A=n(6176),_=n(703447),p=n(689965),O=n(845030),C=n(6510),I=n(532419),h=n(691294),g=n(239417),N=n(984652),b=n(643633),x=n(573531),f=n(768195);const R=({name:e,mac:t,model:n})=>e===t&&n?n:e,v=e=>{switch(e?.uplink?.type){case f.au.WIRE:return e?.connection_network_name||x.L;case f.au.WIRELESS:return e?.connection_network_name||e?.uplink?.essid||x.L;default:return x.L}};var T,w=n(758649),y=n(396660),M=n(566723),P=n(115829);!function(e){e.NAME="name",e.PORT="port",e.NETWORK="network"}(T||(T={}));const S={[T.NAME]:"COMMON_NAME",[T.PORT]:"COMMON_PORT",[T.NETWORK]:"COMMON_NETWORK"};var D=n(294303),L=n(916537),z=n(216211);const k=({port:e,mac:t})=>{const{handleGoToPortsPage:n}=(0,z.e)();return l.createElement(w.A,{variant:"inline",type:"button",size:"medium",onClick:()=>{n(t,e)}},e)},B=({activeItem:e})=>{const{themeName:t}=(0,m.u)(),n=(0,r.useDispatch)(),x=(0,r.useSelector)(I.ID),f=(0,l.useMemo)(()=>((e,t)=>(e||[]).map(e=>{const n=t.find(({mac:t})=>t===e.mac||t===e.ap_mac);return n?{...e,id:n._id,name:(0,C.Q)(n),activeItem:n,model:(0,C.Lm)(n.model)}:null}).filter(Boolean))(e.downlink_table,x),[e.downlink_table,x]),w=(0,r.useSelector)((0,g.Ax)(e.mac)).filter(e=>e.type===h.sK.WIRED);(0,l.useEffect)(()=>{n((0,N.$3)(void 0,{crudCacheStrategy:{type:s.e.CACHE}}))},[n]);const z=(0,l.useMemo)(()=>w.map(e=>({id:`${e.id}${e.sw_port}`,name:e.display_name,mac:e.mac,network:e.network_name,port:e.sw_port,image:l.createElement(_.A,{client:e}),isClient:!0})),[w]),B=(0,l.useMemo)(()=>f.map(({id:e,name:n,mac:r,port_idx:o,activeItem:m})=>({id:`${e}${o}`,name:R({name:n,mac:m.mac,model:m.model}),mac:r,network:v(m),port:o,image:l.createElement(A.A,{model:m.model}),isClient:!1,warning:m.detailed_states?.negotiated_low_uplink_port_speed?l.createElement(i.A,{portal:!0,description:l.createElement(b.A,{color:"text-1"})},l.createElement(c.A,{size:"medium",color:a.Ay[`desktop-color-orange-06-${t}`]})):void 0})),[f,a.Ay[`desktop-color-orange-06-${t}`]]),F=(0,l.useMemo)(()=>Array.prototype.concat.apply([],[z,B]),[B,z]),W=(0,l.useMemo)(()=>(({mac:e})=>[{id:T.NAME,label:l.createElement(L.sA,{id:S[T.NAME]}),renderCell:({image:e,name:t})=>l.createElement(D.A,{alignItems:"center",justifyContent:"center",width:"100%"},l.createElement(D.A,{alignItems:"center",justifyContent:"center",height:"20px",width:"20px"},e),l.createElement(P.A,{color:"inherit",size:"medium",style:{width:"170px",paddingLeft:"6px",paddingRight:"6px"}},t)),width:170,compare:(0,y.l0)(({name:e})=>e)},{id:T.NETWORK,label:l.createElement(L.sA,{id:S[T.NETWORK]}),renderCell:({network:e})=>l.createElement(P.A,{color:"inherit",size:"medium"},e),width:112,compare:(0,y.l0)(({network:e})=>e)},{id:T.PORT,align:"right",label:l.createElement(L.sA,{id:S[T.PORT]}),renderCell:({port:t,warning:n})=>l.createElement(D.A,{justifyContent:"flex-end",alignItems:"center",flexGrow:1},l.createElement(D.A,{marginTop:-2,marginRight:M.YC},n),l.createElement(k,{port:t,mac:e})),width:54,compare:(0,y.l0)(({port:e})=>e)}])({mac:e.mac}),[e.mac]),U=(0,l.useCallback)(({mac:e,isClient:t})=>{n((0,O.XP)({type:t?u.H.CLIENT:u.H.DEVICE,id:e}))},[n]),{rowLimit:V,renderFooter:K}=(0,d.A)(F.length,{defaultCount:10});return F.length?l.createElement(p.A,null,l.createElement(o.A,{items:F,columns:W,idField:"id",initialSortBy:"port",initiallySortAscending:!0,disableColumnFilters:!0,rowOffset:0,disableSelection:!0,onRowClick:U,rowLimit:V,renderFooter:()=>K,rowHeight:E.I.ROW_HEIGHT,truncateHeaderCells:!0})):null}},15244(e,t,n){n.d(t,{A:()=>w});var a=n(469733),r=n(296540),l=n(979106),i=n(362412),o=n(594827),c=n(513180),m=n(566723),s=n(294303),d=n(689965),E=n(916537),u=n(339879),A=n(316144),_=n(927806),p=n(993341),O=n(28536);var C=n(659243),I=n(217439),h=n(777916),g=n(137298),N=n(817518),b=n(348466),x=n(360113),f=n(258117),R=n(723544),v=n(146784);const T=({uplinkAttrs:e,configuration:t={wan_dns1:void 0,wan_dns2:void 0,wan_dhcpv6_pd_size:void 0,wan_type_v6:void 0,wan_prefixlen:void 0},details:n={},gatewayPort:{ipv6:a=[]}={}})=>{const{ip:l,speed:i,rx_packets:o,rx_bytes:c,tx_packets:m,tx_bytes:d,"rx_bytes-r":u,"tx_bytes-r":A,mac:_}=e||{};return r.createElement(s.A,{height:"100%",flexDirection:"column"},l?r.createElement(x.A,null,r.createElement(I.A,{size:"medium"},r.createElement(E.sA,{id:"COMMON_IP_ADDRESS"})),r.createElement(I.A,{size:"medium",color:"text-3"},l)):null,a.length?r.createElement(v.A,{ipv6_address:a,wan_dhcpv6_pd_size:t.wan_type_v6===N.c.SLAAC||t.wan_type_v6===N.c.DHCPV6?t.wan_dhcpv6_pd_size:void 0}):null,r.createElement(R.A,{mac:_}),r.createElement(f.A,{portSpeed:i}),n.service_provider?.name?r.createElement(x.A,null,r.createElement(I.A,{size:"medium"},r.createElement(E.sA,{id:"COMMON_ISP"})),r.createElement(I.A,{size:"medium",color:"text-3"},n.service_provider.name)):null,r.createElement(r.Fragment,null,t.wan_dns1?r.createElement(x.A,null,r.createElement(I.A,{color:"text-2",size:"medium"},r.createElement(E.sA,{id:"COMMON_DNS_SERVER_N",values:{n:1}})),r.createElement(I.A,{color:"text-3",size:"medium"},t.wan_dns1)):null,t.wan_dns2?r.createElement(x.A,null,r.createElement(I.A,{color:"text-2",size:"medium"},r.createElement(E.sA,{id:"COMMON_DNS_SERVER_N",values:{n:2}})),r.createElement(I.A,{color:"text-3",size:"medium"},t.wan_dns2)):null),o&&c?r.createElement(x.A,null,r.createElement(I.A,{size:"medium"},r.createElement(E.sA,{id:"COMMON_DOWN_PKTS_BYTES"})),r.createElement(I.A,{size:"medium",color:"text-3"},(0,C.A)(o,{spacer:b.HY})," / ",(0,g.z3)(c))):null,m&&d?r.createElement(x.A,null,r.createElement(I.A,{size:"medium"},r.createElement(E.sA,{id:"COMMON_UP_PKTS_BYTES"})),r.createElement(I.A,{size:"medium",color:"text-3"},(0,C.A)(m,{spacer:b.HY})," / ",(0,g.z3)(d))):null,r.createElement(x.A,null,r.createElement(I.A,{size:"medium"},r.createElement(E.sA,{id:"DEVICE_PROPERTY_UPLINK_DOWN_ACTIVITY"})),r.createElement(I.A,{size:"medium",color:"text-3"},void 0!==u?r.createElement(h.A,{type:"bytes",input:u,options:"bitrate",size:"body",color:"inherit"}):r.createElement(E.sA,{id:"COMMON_FALLBACK"}))),r.createElement(x.A,null,r.createElement(I.A,{size:"medium"},r.createElement(E.sA,{id:"DEVICE_PROPERTY_UPLINK_UP_ACTIVITY"})),r.createElement(I.A,{size:"medium",color:"text-3"},void 0!==A?r.createElement(h.A,{type:"bytes",input:A,options:"bitrate",size:"body",color:"inherit"}):r.createElement(E.sA,{id:"COMMON_FALLBACK"}))))},w=({activeItem:e})=>{const{formatMessage:t}=(0,E.tz)(),n=((e,t)=>{const n=(e.port_table||[]).filter(({up:e})=>e);return Object.values(O.s).reduce((a,r)=>{const l=1===(0,o.si)(r)?c.C.WAN:r.toUpperCase();if(n.find(({ifname:t})=>t===(0,A.KF)(l,{ethernet_overrides:e.ethernet_overrides,model:e.model,usg_caps:e.usg_caps,usg2_caps:e.usg2_caps}))||(i=e[r],i?.type===p.YT)){const n=(0,_.q$)(e,r);n&&a.push({wanNetworkGroup:l,uplinkAttrs:n,...(()=>{const{configuration:e={},details:n={}}=t.find(({configuration:{wan_networkgroup:e}})=>e===l)||{};return{configuration:e,details:n}})(),gatewayPort:e[r]})}var i;return a},[])})(e,(0,a.useSelector)(u.ht)),C=(0,r.useMemo)(()=>n.map(({wanNetworkGroup:e})=>({id:e,label:t({id:"COMMON_NETWORK_PURPOSE_WANX"},{number:(0,o.si)(e)})})),[t,n]),I=(0,r.useMemo)(()=>n.map(({wanNetworkGroup:e,configuration:t={}})=>({value:e,label:t.name||"",additionalInfo:r.createElement(E.sA,{id:"COMMON_NETWORK_PURPOSE_WANX",values:{number:(0,o.si)(e)}})})),[n]),[h,g]=(0,r.useState)(n?.[0]?.wanNetworkGroup||c.C.WAN),N=n.length<=4,b=(0,r.useMemo)(()=>n.find(({wanNetworkGroup:e})=>e===h)||{},[n,h]),x=(0,r.useMemo)(()=>[{id:"wan",openByDefault:!0,label:r.createElement(E.sA,1===C.length?{id:"COMMON_NETWORK_PURPOSE_WANX",values:{number:1}}:{id:"COMMON_NETWORK_PURPOSE_WAN"}),renderContent:()=>r.createElement(r.Fragment,null,C.length>1?r.createElement(s.A,{paddingBottom:m.kc,inline:N},N?r.createElement(l.A,{tabs:C,variant:"filter",onSelectTab:({id:e})=>{g(e)},selectedTab:h}):r.createElement(i.A,{options:I,width:"100%",variant:"secondary",value:h,onChange:({value:e})=>{g(e)}})):null,r.createElement(T,{...b}))}],[C,N,I,h,g,b]);return b?r.createElement(d.A,{type:d.I.ACCORDION,items:x}):null}},328787(e,t,n){n.d(t,{A:()=>E});var a=n(469733),r=n(296540),l=n(149133),i=n(855019),o=n(551753),c=n(916537),m=n(532419),s=n(765562);const d=({adopted:e})=>r.createElement(o.A,{link:s.A.virtualNetworkConnectivity},r.createElement(c.sA,{id:e?"DEVICE_FALLBACK_IP_ADOPTED_WITH_UNIFI_GATEWAY_WARNING":"DEVICE_FALLBACK_IP_NOT_ADOPTED_WARNING",values:{bold:r.createElement("strong",null,r.createElement(c.sA,{id:e?"DEVICE_WARNING_FALLBACK_IP":"DEVICE_WARNING_ADOPTION_FAILED"}))}})),E=({ip:e,adopted:t,config_network:n})=>(0,a.useSelector)(m.m9)&&(0,l.W5)(e)&&n?.type===i.NL.DHCP?r.createElement(d,{adopted:t}):null},274556(e,t,n){n.r(t),n.d(t,{default:()=>Oe});var a=n(296540),r=n(889879),l=n(328787),i=n(86571),o=n(689965),c=n(79727);const m=({psu_table:e})=>e?.length>0?a.createElement(o.A,{type:o.I.ACCORDION,items:[{id:"powerSource",openByDefault:!0,label:a.createElement(i.A,{id:"DEVICE_PROPERTY_OVERVIEW_POWER_SOURCE"}),renderContent:()=>a.createElement(c.A,{psu_table:e})}]}):null;var s=n(15244),d=n(686130),E=n(442728),u=n(812454),A=n(325898),_=n(217439),p=n(90757),O=n(945132),C=n(424095),I=n(11001),h=n(294303),g=n(916537),N=n(863489),b=n(231460);const x=e=>[p.Au.HOURS,p.Au.MINUTES,Math.floor((Date.now()-new Date(1e3*e).getTime())/O.jU)<1?p.Au.SECONDS:p.Au.DAYS],f=({uptime:e,last_seen:t})=>e>=0?a.createElement(_.A,{size:"medium"},(0,p.Ay)(e)):t?a.createElement(h.A,{width:"100%",whiteSpace:"nowrap",justifyContent:"flex-end"},a.createElement(_.A,{size:"medium"},a.createElement(g.sA,{id:"COMMON_LAST_SEEN"}))," ",a.createElement(_.A,{size:"medium",color:"inherit"},a.createElement(C.A,{startTimestamp:t,uptimeParams:x(t)}))):null,R=({stat:e,uplink:t,uptime:n,last_seen:r})=>{const{motif:l}=(0,A.A)(),i=(0,a.useMemo)(()=>(0,N.lD)(e),[e]),{translationKey:c,textColor:m}=(0,a.useMemo)(()=>(0,N.QS)(l,i),[l,i]);return i>=0?a.createElement(o.A,null,a.createElement(b.hW,{score:i,headerTranslationKey:"COMMON_TX_RETRIES",scoreTranslationKey:c,color:m}),a.createElement(h.A,{width:"100%",justifyContent:"space-between",marginTop:4},a.createElement(h.A,null,t?a.createElement(a.Fragment,null,a.createElement(I.A,{style:{marginRight:"6px"},bytesPerSecond:t["rx_bytes-r"]||0,direction:"down",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}}),a.createElement(I.A,{bytesPerSecond:t["tx_bytes-r"]||0,direction:"up",size:"medium",iconStyle:{width:"16px",height:"16px",marginRight:"2px"}})):null),a.createElement(f,{uptime:n,last_seen:r}))):null};var v=n(69976),T=n(151931),w=n(71479),y=n(132196),M=n(506327),P=n(574137),S=n(566723);const D=(0,w.A)(M.A)`
  margin-right: ${S.YC};
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 0;
`,L=e=>y.AH`
  background-color: ${e};
`,z=({ChannelBars:e})=>a.createElement(a.Fragment,null,e,a.createElement(h.A,{justifyContent:"flex-start"},a.createElement(h.A,{flex:"0 1 27%"},a.createElement(D,{className:L(P.XT.blue)}),a.createElement(_.A,{color:"text-3",size:"small"},a.createElement(g.sA,{id:"DEVICE_PROPERTIES_VALUES_RX_FRAMES"}))),a.createElement(h.A,{flex:"0 1 27%"},a.createElement(D,{className:L(P.sJ)}),a.createElement(_.A,{color:"text-3",size:"small"},a.createElement(g.sA,{id:"DEVICE_PROPERTIES_VALUES_TX_FRAMES"}))),a.createElement(h.A,{flex:"0 1 27%"},a.createElement(D,{className:L(P.z3)}),a.createElement(_.A,{color:"text-3",size:"small"},a.createElement(g.sA,{id:"COMMON_INTERFERENCE"})))));var k=n(271856),B=n(822336),F=n(773412),W=n(777916),U=n(608935),V=n(741568),K=n(678515),$=n(170459),G=n(178233);const Y=(0,w.A)("tr")`
  white-space: nowrap;
  font-size: ${({theme:e})=>e.fontSizes[1]}px;
`,H=(0,w.A)("td")`
  vertical-align: top;
`,X=(0,w.A)("td")`
  padding-left: 12px;
  padding-bottom: 2px;
  text-align: right;
  vertical-align: top;
`,j=({type:e,radio:t,channelUtilization:n,stat:r})=>{const{totalPacketsRx:l,totalBytesRx:i,droppedPercentageRx:o,retryPercentageRx:c,totalPacketsTx:m,totalBytesTx:s,droppedPercentageTx:d,retryPercentageTx:E}=(0,a.useMemo)(()=>(({totalPackets:e,totalBytes:t,droppedPercentage:n,retryPercentage:a},{totalPackets:r,totalBytes:l,droppedPercentage:i,retryPercentage:o})=>({totalPacketsRx:e,totalBytesRx:t,droppedPercentageRx:n,retryPercentageRx:a,totalPacketsTx:r,totalBytesTx:l,droppedPercentageTx:i,retryPercentageTx:o}))((0,$.GI)(e,t,"rx",r),(0,$.GI)(e,t,"tx",r)),[e,t,r]);return a.createElement("table",null,a.createElement("tbody",null,a.createElement(Y,null,a.createElement(H,null,a.createElement(_.A,{color:"text-2"},a.createElement(g.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_PKTS_BYTES"}))),a.createElement(X,null,a.createElement(_.A,{color:"text-2"},m??a.createElement(g.sA,{id:"COMMON_FALLBACK"})," /"," ",s??a.createElement(g.sA,{id:"COMMON_FALLBACK"})))),a.createElement(Y,null,a.createElement(H,null,a.createElement(_.A,{color:"text-2"},a.createElement(g.sA,{id:"DEVICE_PROPERTIES_LABEL_RX_PKTS_BYTES"}))),a.createElement(X,null,a.createElement(_.A,{color:"text-2"},l??a.createElement(g.sA,{id:"COMMON_FALLBACK"})," /"," ",i??a.createElement(g.sA,{id:"COMMON_FALLBACK"})))),a.createElement(Y,null,a.createElement(H,null,a.createElement(_.A,{color:"text-2"},a.createElement(g.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_RETRY_DROPPED"}))),a.createElement(X,null,a.createElement(_.A,{color:"text-2"},(0,G.l)(E)," / ",(0,G.l)(d)))),a.createElement(Y,null,a.createElement(H,null,a.createElement(_.A,{color:"text-2"},a.createElement(g.sA,{id:"DEVICE_PROPERTIES_LABEL_RX_RETRY_DROPPED"}))),a.createElement(X,null,a.createElement(_.A,{color:"text-2"},(0,G.l)(c)," / ",(0,G.l)(o)))),n?a.createElement(Y,null,a.createElement(H,null,a.createElement(_.A,{color:"text-2"},a.createElement(g.sA,{id:"DEVICE_PROPERTIES_LABEL_CHANNEL_UTILIZATION"}))),a.createElement(X,null,a.createElement(_.A,{color:"text-2"},`${n.total}% / ${n.selfRx}% / ${n.selfTx}%`))):null))},Z=(0,w.A)("div")`
  flex: 1;

  .radioText {
    color: ${({theme:{motifPalette:{text02:e}}})=>e};
    font-weight: ${B.Ay["desktop-font-weight-semibold"]};
  }
`,q=(0,w.A)(_.A)`
  margin-left: ${S.YC};
`,Q=(0,w.A)("div")`
  width: 100%;
`;var J=n(418328);const ee=({activeItem:{radio_table:e,radio_table_stats:t,model:n,vap_table:r,stat:l,type:c,psu_table:m}})=>{const s=(0,a.useMemo)(()=>(({radio_table:e,radio_table_stats:t,model:n,vap_table:r,type:l,stat:i})=>[...e||[]].sort(U.Rm).map(o=>{const c=(0,$.Lm)(t,o),m=(0,$.d_)(e,t,n,o?.name,r?.find(({radio_name:e})=>e===o.name));if(!c)return null;const{selfRx:s,selfTx:d,interference:E,total:u}=c,A=m?.state===V.A.INIT;return a.createElement(h.A,{key:o.name,flexDirection:"column",marginBottom:S.kc},a.createElement(h.A,{justifyContent:"space-between"},a.createElement(Z,null,a.createElement(K.A,{radio_table:e,radio_table_stats:t,model:n,vap_table:r,radio:o,hideDivider:!0,hideDfsInfo:!0,hideHtInfo:!0,hidePowerInfo:!0,hideChannelTooltip:!0,hideDisabledInfo:!0,textColor:"text-3"})),A?a.createElement(_.A,{color:"text-3",size:"medium"},a.createElement(g.sA,{id:"COMMON_DISABLED"})):a.createElement(a.Fragment,null,a.createElement(W.A,{size:"body",color:"tertiary",type:"percent",input:Math.min(u,100)/100}),a.createElement(q,{color:"text-3"},a.createElement(_.A,{color:"text-3",size:"medium"},a.createElement(g.sA,{id:"DEVICE_PROPERTIES_VALUES_UTILIZED"}))))),a.createElement(Q,null,a.createElement(k.A,{description:a.createElement(j,{type:l,stat:i,radio:o,channelUtilization:c}),portal:!0,maxWidth:350},a.createElement(F.A,{items:[{color:P.XT.blue,value:s},{color:P.sJ,value:d},{color:P.z3,value:E}],height:8,rounded:!0}))),a.createElement(_.A,{color:"text-3",size:"medium"},(0,$.rT)(e,n,o)))}))({radio_table:e,radio_table_stats:t,model:n,vap_table:r,type:c,stat:l}),[e,t,n,r,c,l]);return a.createElement(o.A,{type:o.I.ACCORDION,items:[{id:"deviceInsights",openByDefault:!0,label:a.createElement(i.A,{id:"COMMON_INSIGHTS"}),renderContent:()=>a.createElement(a.Fragment,null,m?.length?a.createElement(J.A,{psuTable:m}):null,s.length?a.createElement(z,{ChannelBars:s}):null)}]})};var te=n(319736),ne=n(999063),ae=n(559674),re=n(329708),le=n(32753),ie=n(723544),oe=n(205830),ce=n(780811),me=n(360113);const se=({ip:e,lan_ip:t,ethernet_overrides:n,port_table:r})=>{const l=(0,ce.Wcd)({ip:e,lan_ip:t,ethernet_overrides:n,port_table:r});return l?a.createElement(me.A,null,a.createElement(_.A,{size:"medium"},a.createElement(g.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LAN_IP_ADDRESS"})),a.createElement(_.A,{color:"text-3",size:"medium"},l)):null};var de=n(38937);const Ee=({satisfaction:e,guestNumSta:t})=>(0,de.Oq)(e)?a.createElement(me.A,null,a.createElement(_.A,{color:"text-2",size:"medium"},a.createElement(g.sA,{id:"DEVICE_HEADER_GUESTS"})),a.createElement(_.A,{color:"text-3",size:"medium"},t||0)):null;var ue=n(57759);const Ae=({satisfaction:e,userNumSta:t})=>(0,de.Oq)(e)?a.createElement(me.A,null,a.createElement(_.A,{color:"text-2",size:"medium"},a.createElement(g.sA,{id:"COMMON_CLIENTS"})),a.createElement(_.A,{color:"text-3",size:"medium"},t||0)):null,_e=({name:e,satisfaction:t,vap_table:n,radio_table:r,radio_table_stats:l,model:i,displayable_version:c,connection_network_name:m,mac:s,uptime:d,ip:E,lan_ip:u,ethernet_overrides:A,port_table:_,sys_stats:p,"system-stats":O,"user-num_sta":C,"guest-num_sta":I,type:g,deviceState:N})=>a.createElement(o.A,null,a.createElement(h.A,{flexDirection:"column"},a.createElement(te.A,{satisfaction:t,vap_table:n,radio_table:r,radio_table_stats:l}),a.createElement(re.A,{model:i}),a.createElement(se,{ip:E,lan_ip:u,ethernet_overrides:A,port_table:_}),a.createElement(ie.A,{mac:s}),a.createElement(ue.A,{name:e,model:i,mac:s,type:g,displayable_version:c,uptime:d,deviceState:N}),a.createElement(ae.A,{connection_network_name:m}),a.createElement(ne.A,{uptime:d}),a.createElement(le.A,{systemStatsMem:O?.mem}),a.createElement(oe.A,{sys_stats:p}),a.createElement(Ae,{satisfaction:t,userNumSta:C}),a.createElement(Ee,{satisfaction:t,guestNumSta:I})));var pe=n(78853);const Oe=({activeItem:e,activeItem:{adopted:t,name:n,type:i,mac:o,ip:c,uplink:A,uptime:_,radio_table:p,radio_table_stats:O,vap_table:C,stat:I,total_used_power:h,total_max_power:g,detailed_states:{device_near_power_limit:N}={device_near_power_limit:!1},support_wifi6e:b,config_network:x,last_seen:f,psu_table:w,satisfaction:y,model:M,lan_ip:P,ethernet_overrides:S,port_table:D,displayable_version:L,connection_network_name:z,sys_stats:k,"system-stats":B,"user-num_sta":F,"guest-num_sta":W,shortname:U}})=>a.createElement(a.Fragment,null,a.createElement(u.A,{activeItem:e,showPortOverview:!0,hidePortsButton:!0},a.createElement(d.A,{activeItem:e,showPortsButton:!0,showCaptureButton:!0})),a.createElement(l.A,{ip:c,adopted:t,config_network:x}),a.createElement(R,{stat:I,uplink:A,uptime:_,last_seen:f}),a.createElement(r.A,{mac:o,type:i,model:M,device_near_power_limit:N,total_used_power:h,total_max_power:g}),a.createElement(E.A,{activeItem:e}),a.createElement(_e,{name:n,type:i,satisfaction:y,vap_table:C,radio_table:p,radio_table_stats:O,model:M,displayable_version:L,connection_network_name:z,mac:o,uptime:_,ip:c,lan_ip:P,ethernet_overrides:S,port_table:D,sys_stats:k,"system-stats":B,"user-num_sta":F,"guest-num_sta":W}),a.createElement(s.A,{activeItem:e}),a.createElement(T.A,{radio_table:p,radio_table_stats:O,type:i,stat:I,support_wifi6e:b}),a.createElement(v.S,{vap_table:C,radio_table:p}),a.createElement(m,{psu_table:w}),a.createElement(ee,{activeItem:e}),a.createElement(pe.A,{shortname:U}))},766624(e,t,n){n.d(t,{A:()=>c});var a=n(296540),r=n(271856),l=n(709690),i=n(284428),o=n(566723);const c=({description:e,isInteractive:t,portal:n=!0,cursorType:c,title:m,position:s,width:d,iconProps:E,disabled:u=!1})=>{const A=(0,i.Im)()||u,_=(0,i.q)();return a.createElement(r.A,{description:e,portal:n,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:c,title:m,position:s,width:d,disableHover:_},a.createElement(l.A,{isActive:!0,size:"original",opacity:A?o.xN:void 0,...E}))}},451449(e,t,n){n.d(t,{I:()=>a});const a=(0,n(296540).createContext)({fields:!1,labels:!1,tooltipPopovers:!1,tooltipIcons:!1})},284428(e,t,n){n.d(t,{Im:()=>c,iL:()=>m,mQ:()=>i,pv:()=>l,q:()=>o});var a=n(296540),r=n(451449);function l(){return(0,a.useContext)(r.I)}function i(){return l().fields}function o(){return l().tooltipPopovers}function c(){return l().tooltipIcons}function m(){return l().labels}},957866(e,t,n){n.d(t,{A:()=>c});var a=n(296540),r=n(469733),l=n(765562),i=n(79871),o=n(856632);const c=()=>{const e=(0,r.useDispatch)(),t=(0,r.useSelector)(o.eo);return(0,a.useEffect)(()=>{t||(async()=>{const t=await fetch(l.A.fingerprintPublicDatabasePath),n=await t.json();e((0,i.$)(n))})()},[t,e]),t}},307330(e,t,n){n.d(t,{I:()=>r});var a=n(564985);const r=[a.sx.RADIO_NG,a.sx.RADIO_NA,a.sx.RADIO_6E,a.sx.RADIO_AD]},608935(e,t,n){n.d(t,{Rm:()=>i,fU:()=>l,uQ:()=>r});var a=n(307330);const r=e=>{const t=(t,n)=>e.indexOf(t)-e.indexOf(n);return{orderRadios:t,orderByRadio:(e,n)=>t(e.radio,n.radio)}},{orderRadios:l,orderByRadio:i}=r(a.I)},856632(e,t,n){n.d(t,{$E:()=>s,eo:()=>c});var a=n(801081),r=n(523275),l=n(840279),i=n(919952);const o=e=>e[i.U.UIDB]||(0,r.A)(),c=(0,a.Mz)(o,({version:e})=>Boolean(e)),m=(0,a.Mz)(o,({devices:e})=>e||(0,l.A)()),s=e=>(0,a.Mz)(m,t=>t.find(({shortnames:t})=>e&&(t||[]).includes(e))||(0,r.A)());(0,a.Mz)(m,e=>{const t=new Map;for(let n=0;n<e.length;n+=1){const a=e[n].power?.baseConsumption;if(void 0!==a){const{shortnames:r}=e[n];for(let e=0;e<(r||[]).length;e+=1)t.set(r[e],a)}}return t})}}]);