"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[32773],{285947(e,t,n){n.d(t,{EA:()=>o,G6:()=>E,Km:()=>c,ME:()=>l,Nq:()=>u,Sl:()=>d,Up:()=>m,bc:()=>A,ne:()=>s,pE:()=>r,t1:()=>i});var a=n(294591);const i=({security:e})=>e===a.Hs.WEP,l=({security:e})=>e===a.Hs.WPA_ENTERPRISE,r=({security:e})=>e===a.Hs.WPA_PERSONAL,c=({wpa_enc:e})=>e===a.Jl.AUTO,s=({security:e})=>e===a.Hs.HOTSPOT_2_OSEN,o=({mac_filter_enabled:e})=>e,m=(e,t)=>e&&[...new Set(e.filter(({is_guest:e})=>t?!!e:!e).map(({name:e})=>e))],E=e=>{switch(e){case a.Tl.PAP:case a.Tl.CHAP:case a.Tl.MSCHAP:case a.Tl.MSCHAP_V2:return 2;case a.Tl.SIM:case a.Tl.USIM:case a.Tl.CERTIFICATE:case a.Tl.USERNAME_PASSWORD:return 5;default:return}},d=e=>{switch(e){case a.Tl.PAP:case a.Tl.SIM:return 1;case a.Tl.CHAP:case a.Tl.USIM:return 2;case a.Tl.MSCHAP:return 3;case a.Tl.MSCHAP_V2:return 4;case a.Tl.CERTIFICATE:return 6;case a.Tl.USERNAME_PASSWORD:return 7;default:return}},A=e=>{const t=`${e.auth_id}:${e.auth_val}`;if(Object.values(a.Tl).includes(t))return t};function u(e){return Object.values(a.Ir).includes(e?.attr_hidden_id)}},785160(e,t,n){n.d(t,{A:()=>c});var a=n(296540),i=n(271856),l=n(162420),r=n(795097);const c=({list:e})=>{const t=(0,a.useMemo)(()=>e.map(e=>a.createElement("li",{key:e},e)),[e]);return a.createElement(i.A,{key:e.join("-"),description:a.createElement(r.A,null,t),portal:!0},a.createElement(l.A,{isActive:!0,size:"original"}))}},134333(e,t,n){n.d(t,{A:()=>m});var a=n(296540),i=n(217439),l=n(71479),r=n(422969),c=n(566723);const s=(0,l.A)(i.A)`
  white-space: nowrap;
  margin-right: ${c.xO};
`,o=(0,l.A)(i.A)`
  text-align: right;
`,m=({condition:e,definition:t,hideOnEmpty:n,placeholder:i="...",value:l})=>(0,r.A)(e,l||!n?a.createElement(a.Fragment,null,t?a.createElement(s,{color:"text-2"},t):null,a.createElement(o,{color:"text-3"},l)):null,{placeholder:a.createElement(a.Fragment,null,t?a.createElement(s,{color:"text-2"},t):null,a.createElement(o,{color:"text-3"},i))})},298523(e,t,n){n.d(t,{A:()=>_});var a=n(469733),i=n(296540),l=n(217439),r=n(592510),c=n(566723),s=n(134333),o=n(294303),m=n(916537),E=n(180830),d=n(328403),A=n(360113),u=n(785160);const _=({mac:e,compact:t=!1})=>{const n=(0,a.useSelector)((0,i.useMemo)(()=>(0,E.a5)(e),[e])),_=(0,i.useMemo)(()=>(n||[]).filter(({for_wlanconf:e})=>!e).map(({name:e})=>e).sort(),[n]);return _.length?i.createElement(A.A,{compact:t},i.createElement(s.A,{value:i.createElement(o.A,{gap:c.YC},1===_.length?i.createElement(l.A,{size:"medium",color:"text-3"},_[0]):i.createElement(i.Fragment,null,i.createElement(l.A,{size:"medium",color:"text-3"},i.createElement(m.sA,{id:"COMMON_MULTIPLE"})),i.createElement(u.A,{list:_}))),condition:[(0,d.Yo)(void 0,{crudCacheStrategy:{type:r.e.CACHE}})],definition:i.createElement(l.A,{size:"medium"},i.createElement(m.sA,{id:"COMMON_AP_GROUPS"}))})):null}},589694(e,t,n){n.d(t,{A:()=>_});var a=n(469733),i=n(296540),l=n(271856),r=n(217439),c=n(592510),s=n(59372),o=n(134333),m=n(916537),E=n(285947),d=n(632169),A=n(328403),u=n(360113);const _=()=>{const e=(0,a.useSelector)(s.ad),t=(0,i.useMemo)(()=>(0,E.Up)(e,!0).sort(),[e]);return t.length?i.createElement(u.A,null,i.createElement(o.A,{value:t.length>1?i.createElement(l.A,{width:120,description:t.join(", ")},i.createElement(r.A,{size:"medium",color:"text-3"},i.createElement(m.sA,{id:"COMMON_MULTIPLE"}))):i.createElement(r.A,{size:"medium",color:"text-3"},t[0]),condition:[(0,A.Yo)(void 0,{crudCacheStrategy:{type:c.e.CACHE}}),(0,d.uy)(void 0,{crudCacheStrategy:{type:c.e.CACHE}})],definition:i.createElement(r.A,{size:"medium"},i.createElement(m.sA,{id:"DEVICE_PROPERTY_OVERVIEW_MEMBERSHIP_HOTSPOT"})),hideOnEmpty:!0})):null}},319736(e,t,n){n.d(t,{A:()=>d});var a=n(296540),i=n(217439),l=n(178233),r=n(38937),c=n(916537),s=n(564985),o=n(170459),m=n(360113);const E={[s.sx.RADIO_NG]:"2.4",[s.sx.RADIO_NA]:"5",[s.sx.RADIO_6E]:"6",[s.sx.RADIO_AD]:"60"},d=(0,a.memo)(({satisfaction:e,vap_table:t,radio_table:n,radio_table_stats:d})=>{const A=(0,a.useMemo)(()=>void 0!==e&&(0,r.Oq)(e),[e]),{na:u,ng:_,sixe:p,naNumSta:C,ngNumSta:I,sixeNumSta:O}=(0,a.useMemo)(()=>(0,o.VM)({vap_table:t,radio_table:n,radio_table_stats:d,satisfaction:e}),[e,t,n,d]),h=[{radio:s.sx.RADIO_NG,satisfaction:_,numSta:I},{radio:s.sx.RADIO_NA,satisfaction:u,numSta:C},{radio:s.sx.RADIO_6E,satisfaction:p,numSta:O}].filter(({satisfaction:e,numSta:t})=>((e,t)=>0!==e&&!!t)(e,t));return A&&0!==h.length?a.createElement(m.A,null,a.createElement(i.A,{color:"text-2",size:"medium"},a.createElement(c.sA,{id:"DEVICE_WIFI_EXPERIENCE",values:{band:h.map(({radio:e})=>E[e]).join("/")}})),((e,t=" / ")=>a.createElement("div",null,e.map((n,c)=>a.createElement(a.Fragment,{key:`${n}-pos-${String(c)}`},(e=>{const t=Math.min(e,100);return a.createElement(i.A,{size:"medium",color:(0,r.Ld)(t)},(0,l.l)(t))})(n),c!==e.length-1?t:null))))(h.map(({satisfaction:e})=>e))):null})},496520(e,t,n){n.d(t,{A:()=>O});var a=n(469733),i=n(296540),l=n(217439),r=n(592510),c=n(566723),s=n(115829),o=n(59372),m=n(134333),E=n(785160),d=n(294303),A=n(916537),u=n(285947),_=n(632169),p=n(328403),C=n(360113);const I=({wifiNetworks:e,compact:t=!1})=>{const n=(0,i.useMemo)(()=>(0,u.Up)(e,!1).sort(),[e]);return n.length?i.createElement(C.A,{compact:t},i.createElement(m.A,{value:1===n.length?i.createElement(d.A,{flex:1,overflow:"hidden"},i.createElement(s.A,{size:"medium",color:"text-3"},n[0])):i.createElement(d.A,{gap:c.YC},i.createElement(l.A,{size:"medium",color:"text-3"},i.createElement(A.sA,{id:"COMMON_MULTIPLE"})),i.createElement(E.A,{list:n})),condition:[(0,p.Yo)(void 0,{crudCacheStrategy:{type:r.e.CACHE}}),(0,_.uy)(void 0,{crudCacheStrategy:{type:r.e.CACHE}})],definition:i.createElement(l.A,{size:"medium"},i.createElement(A.sA,{id:"COMMON_WIFI_NAME"}))})):null},O=()=>{const e=(0,a.useSelector)(o.ad);return i.createElement(I,{wifiNetworks:e})}},788576(e,t,n){n.d(t,{A:()=>Q});var a=n(469733),i=n(296540),l=n(271856),r=n(217439),c=n(162420),s=n(71479),o=n(566723),m=n(916537),E=n(360113);const d=(0,s.A)(c.A)`
  margin-left: ${o.YC};
`,A=()=>i.createElement(l.A,{description:i.createElement(m.sA,{id:"DEVICE_PROPERTY_UPLINK_HIGH_AVAILABILITY_MODE_ACTIVE_TOOLTIP"}),width:280,position:"top",style:{display:"inline"}},i.createElement(d,{size:"original",isActive:!0})),u=({isActiveHighAvailability:e})=>i.createElement(E.A,null,i.createElement(r.A,{variant:"body-primary"},i.createElement(m.sA,{id:"COMMON_MODE"})),i.createElement(r.A,{variant:"body-secondary"},i.createElement(i.Fragment,null,i.createElement(m.sA,{id:e?"COMMON_ACTIVE":"COMMON_INACTIVE"}),e?i.createElement(A,null):null)));var _=n(258117),p=n(294303);const C=({isActiveHighAvailability:e,secondaryPortAvailabilityLacpState:t})=>i.createElement(p.A,{height:"100%",flexDirection:"column"},i.createElement(u,{isActiveHighAvailability:e}),i.createElement(_.A,{portSpeed:t?.speed}));var I=n(86571),O=n(689965),h=n(927806),M=n(532419),g=n(560595),v=n(6510),N=n(53715),y=n(325898),f=n(705145),S=n(963070),x=n(132196),w=n(396660),T=n(38937),P=n(934645),R=n(951106),b=n(691294),H=n(661282),k=n(628291),D=n(879905),L=n(596441),V=n(398300),z=n(6176),F=n(845030),U=n(170459);const W=(0,s.A)("div")`
  height: 100%;
  > div + div {
    margin-top: 16px;
  }
`,Y=x.AH`
  th {
    padding-right: 0;
  }
`,X=x.AH`
  :hover {
    cursor: pointer;
  }

  td {
    padding-right: 25px;
  }
`;var B;!function(e){e.NAME="name",e.EXPERIENCE_INFO="experienceInfo"}(B||(B={}));const G=[{id:B.NAME,sortable:!0,minWidth:120,label:i.createElement(m.sA,{id:"DEVICE_MESH_CHILDREN"}),renderCell:e=>i.createElement(p.A,{alignItems:"center",justifyContent:"center"},i.createElement(p.A,{alignItems:"center",justifyContent:"center",minWidth:25,maxWidth:25,height:25},e?i.createElement(z.A,{model:e.model,height:25}):null),i.createElement(f.A,{isTruncated:!0,color:"inherit",size:"medium",style:{width:"110px",paddingLeft:o.YC,paddingRight:o.YC}},(0,v.Q)(e))),compare:(0,w.l0)(R.tn)},{id:B.EXPERIENCE_INFO,label:i.createElement(m.sA,{id:"COMMON_EXPERIENCE"}),renderCell:({experienceInfo:e})=>e,minWidth:75,sortable:!0,compare:(0,w.l0)((e,t,n)=>((e,t)=>{const n="is_wired"in e?e.is_wired:void 0,{satisfaction:a,known:i}=(0,R.FX)(void 0,e.type,"wifi_experience_score"in e?e.wifi_experience_score:void 0);let l;switch(e.status===b.S2.ONLINE&&(l=(0,T.gd)(!n&&a>0&&i?a:H.MO)),l){case"COMMON_EXPERIENCE_EXCELLENT":return P.Ig;case"COMMON_GOOD":return P.Bd;case"COMMON_POOR":return P.IR;default:return(0,P.k)(t)}})(e,n))}],j=({downlinks:e})=>{const t=(0,a.useDispatch)(),{motif:n}=(0,y.A)(),l=(0,i.useMemo)(()=>e.map(({downlinkDevice:e})=>{const{averageSatisfaction:t,naNumSta:a,ngNumSta:l}=(0,U.VM)(e);return{id:e._id,name:e.name,experienceInfo:i.createElement(p.A,{alignItems:"center",whiteSpace:"nowrap"},a+l!==0&&t?i.createElement(r.A,{size:"medium",style:{color:(0,k.L)(t,n)}},i.createElement(m.sA,{id:(0,T.gd)(t)})):i.createElement(r.A,{size:"medium",color:"disabled"},i.createElement(m.sA,{id:"COMMON_NO_CLIENTS"}))),mac:e.mac,model:e.model,type:e.type}}),[e,n]),{rowLimit:c,renderFooter:s}=(0,D.A)(l.length,{defaultCount:10}),o=(0,i.useCallback)(({mac:e})=>{t((0,F.XP)({type:V.H.DEVICE,id:e}))},[t]);return l.length>0?i.createElement(W,null,i.createElement(S.A,{items:l,truncateHeaderCells:!0,disableColumnFilters:!0,headerRowClassName:Y,rowClassName:X,columns:G,initialSortBy:B.NAME,renderFooter:()=>s,rowHeight:L.I.ROW_HEIGHT,onRowClick:o,rowOffset:0,rowLimit:c})):null};var $=n(247324),q=n(20379);const K=({activeItem:{downlink_table:e},devices:t})=>{const n=new Map;for(const a of e||[]){const e=t.find(({mac:e})=>e===a.ap_mac||e===a.mac);if(!e?.mac||!a.radio)continue;const i={name:a.name||"",radio:a.radio,signal:"signal"in a&&a.signal||0,tx_rate:"tx_rate"in a?a.tx_rate:0,rx_rate:"rx_rate"in a?a.rx_rate:0,rx_packets:"rx_packets"in a?a.rx_packets:0,tx_packets:"tx_packets"in a?a.tx_packets:0,rx_bytes:"rx_bytes"in a?a.rx_bytes:0,tx_bytes:"tx_bytes"in a?a.tx_bytes:0},l=n.get(e.mac);n.set(e.mac,{downlinkDevice:e,downlinks:l?[...l.downlinks,i]:[i]})}const a=[...n.values()],l=a[0],r=l?.downlinks[0],c=l?.downlinkDevice;return a.length>0?i.createElement(O.A,{type:O.I.ACCORDION,items:[{id:"downlink",label:i.createElement(I.A,{id:a.length>1?"DEVICE_MESH_CHILDREN":"DEVICE_MESH_CHILD"}),openByDefault:!0,renderContent:()=>1===(a||[]).length?i.createElement(p.A,{height:"100%",flexDirection:"column"},i.createElement(N.A,{uplinkMac:c?.mac,uplinkName:(0,v.Q)(c)}),l.downlinks.length>1?i.createElement(q.A,{mlo_links:l.downlinks}):i.createElement($.A,{stats:r})):i.createElement(j,{downlinks:a})}]}):null},Q=({activeItem:e,activeItem:{downlink_table:t,uplink:n}})=>{const l=(0,a.useSelector)(M.ID),r=(0,h.q$)(e)||{},{lacp_state:c}=r,s=(0,h.oL)(c),o=(0,h.rX)(c);return i.createElement(i.Fragment,null,n?.mac?i.createElement(O.A,{type:O.I.ACCORDION,items:[{id:"uplink",label:i.createElement(I.A,{id:"wire"===n.type?"COMMON_PARENT_DEVICE":"COMMON_MESH_PARENT"}),openByDefault:!0,renderContent:()=>i.createElement(g.A,{activeItem:e,devices:l})}]}):null,"wire"===n?.type&&n?.mac&&c?.length>1?i.createElement(O.A,{type:O.I.ACCORDION,items:[{id:"highAvailability",label:i.createElement(I.A,{id:"COMMON_HIGH_AVAILABILITY"}),openByDefault:!0,renderContent:()=>i.createElement(C,{isActiveHighAvailability:o,secondaryPortAvailabilityLacpState:s})}]}):null,(t||[]).length>0?i.createElement(K,{activeItem:e,devices:l}):null)}}}]);