"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[7727],{563674(e,i,t){t.d(i,{EA:()=>o,G6:()=>A,Km:()=>l,ME:()=>r,Nq:()=>m,Sl:()=>x,Up:()=>d,bc:()=>u,ne:()=>c,pE:()=>a,t1:()=>s});var n=t(904614);const s=({security:e})=>e===n.Hs.WEP,r=({security:e})=>e===n.Hs.WPA_ENTERPRISE,a=({security:e})=>e===n.Hs.WPA_PERSONAL,l=({wpa_enc:e})=>e===n.Jl.AUTO,c=({security:e})=>e===n.Hs.HOTSPOT_2_OSEN,o=({mac_filter_enabled:e})=>e,d=(e,i)=>e&&[...new Set(e.filter(({is_guest:e})=>i?!!e:!e).map(({name:e})=>e))],A=e=>{switch(e){case n.Tl.PAP:case n.Tl.CHAP:case n.Tl.MSCHAP:case n.Tl.MSCHAP_V2:return 2;case n.Tl.SIM:case n.Tl.USIM:case n.Tl.CERTIFICATE:case n.Tl.USERNAME_PASSWORD:return 5;default:return}},x=e=>{switch(e){case n.Tl.PAP:case n.Tl.SIM:return 1;case n.Tl.CHAP:case n.Tl.USIM:return 2;case n.Tl.MSCHAP:return 3;case n.Tl.MSCHAP_V2:return 4;case n.Tl.CERTIFICATE:return 6;case n.Tl.USERNAME_PASSWORD:return 7;default:return}},u=e=>{const i=`${e.auth_id}:${e.auth_val}`;if(Object.values(n.Tl).includes(i))return i};function m(e){return Object.values(n.Ir).includes(e?.attr_hidden_id)}},752104(e,i,t){t.d(i,{A:()=>s,Q:()=>r});var n=t(765567);const s="_",r=[n.ZM,n.Je]},823709(e,i,t){t.d(i,{A:()=>c});var n=t(274934),s=t(602086),r=t(125799),a=t(853777),l=t(927728);const c=({list:e})=>{const i=(0,s.useMemo)(()=>e.map(e=>(0,n.jsx)("li",{children:e},e)),[e]);return(0,n.jsx)(r.A,{description:(0,n.jsx)(l.A,{children:i}),portal:!0,children:(0,n.jsx)(a.A,{isActive:!0,size:"original"})},e.join("-"))}},184970(e,i,t){t.d(i,{A:()=>d});var n=t(274934),s=t(938984),r=t(247816),a=t(724081),l=t(309130);const c=(0,r.A)(s.A)`
  white-space: nowrap;
  margin-right: ${l.xO};
`,o=(0,r.A)(s.A)`
  text-align: right;
`,d=({condition:e,definition:i,hideOnEmpty:t,placeholder:s="...",value:r})=>(0,a.A)(e,r||!t?(0,n.jsxs)(n.Fragment,{children:[i?(0,n.jsx)(c,{color:"text-2",children:i}):null,(0,n.jsx)(o,{color:"text-3",children:r})]}):null,{placeholder:(0,n.jsxs)(n.Fragment,{children:[i?(0,n.jsx)(c,{color:"text-2",children:i}):null,(0,n.jsx)(o,{color:"text-3",children:s})]})})},223232(e,i,t){t.d(i,{A:()=>_});var n=t(274934),s=t(977872),r=t(602086),a=t(938984),l=t(244081),c=t(309130),o=t(184970),d=t(100978),A=t(470070),x=t(544691),u=t(393482),m=t(664092),h=t(823709);const _=({mac:e,compact:i=!1})=>{const t=(0,s.d4)((0,r.useMemo)(()=>(0,x.a5)(e),[e])),_=(0,r.useMemo)(()=>(t||[]).filter(({for_wlanconf:e})=>!e).map(({name:e})=>e).sort(),[t]);return _.length?(0,n.jsx)(m.A,{compact:i,children:(0,n.jsx)(o.A,{value:(0,n.jsx)(d.A,{gap:c.YC,children:1===_.length?(0,n.jsx)(a.A,{size:"medium",color:"text-3",children:_[0]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.A,{size:"medium",color:"text-3",children:(0,n.jsx)(A.sA,{id:"COMMON_MULTIPLE"})}),(0,n.jsx)(h.A,{list:_})]})}),condition:[(0,u.Yo)(void 0,{crudCacheStrategy:{type:l.e.CACHE}})],definition:(0,n.jsx)(a.A,{size:"medium",children:(0,n.jsx)(A.sA,{id:"COMMON_AP_GROUPS"})})})}):null}},425381(e,i,t){t.d(i,{A:()=>_});var n=t(274934),s=t(977872),r=t(602086),a=t(125799),l=t(938984),c=t(244081),o=t(577141),d=t(184970),A=t(470070),x=t(563674),u=t(301940),m=t(393482),h=t(664092);const _=()=>{const e=(0,s.d4)(o.ad),i=(0,r.useMemo)(()=>(0,x.Up)(e,!0).sort(),[e]);return i.length?(0,n.jsx)(h.A,{children:(0,n.jsx)(d.A,{value:i.length>1?(0,n.jsx)(a.A,{width:120,description:i.join(", "),children:(0,n.jsx)(l.A,{size:"medium",color:"text-3",children:(0,n.jsx)(A.sA,{id:"COMMON_MULTIPLE"})})}):(0,n.jsx)(l.A,{size:"medium",color:"text-3",children:i[0]}),condition:[(0,m.Yo)(void 0,{crudCacheStrategy:{type:c.e.CACHE}}),(0,u.uy)(void 0,{crudCacheStrategy:{type:c.e.CACHE}})],definition:(0,n.jsx)(l.A,{size:"medium",children:(0,n.jsx)(A.sA,{id:"DEVICE_PROPERTY_OVERVIEW_MEMBERSHIP_HOTSPOT"})}),hideOnEmpty:!0})}):null}},956021(e,i,t){t.d(i,{A:()=>h});var n=t(274934),s=t(602086),r=t(938984),a=t(662986),l=t(331472),c=t(470070),o=t(561614),d=t(927316),A=t(664092);const x={[o.sx.RADIO_NG]:"2.4",[o.sx.RADIO_NA]:"5",[o.sx.RADIO_6E]:"6",[o.sx.RADIO_AD]:"60"},u=e=>{const i=Math.min(e,100);return(0,n.jsx)(r.A,{size:"medium",color:(0,l.Ld)(i),children:(0,a.l)(i)})},m=(e,i=" / ")=>(0,n.jsx)("div",{children:e.map((t,r)=>(0,n.jsxs)(s.Fragment,{children:[u(t),r!==e.length-1?i:null]},`${t}-pos-${String(r)}`))}),h=(0,s.memo)(({satisfaction:e,vap_table:i,radio_table:t,radio_table_stats:a})=>{const u=(0,s.useMemo)(()=>void 0!==e&&(0,l.Oq)(e),[e]),{na:h,ng:_,sixe:j,naNumSta:p,ngNumSta:E,sixeNumSta:C}=(0,s.useMemo)(()=>(0,d.VM)({vap_table:i,radio_table:t,radio_table_stats:a,satisfaction:e}),[e,i,t,a]),I=[{radio:o.sx.RADIO_NG,satisfaction:_,numSta:E},{radio:o.sx.RADIO_NA,satisfaction:h,numSta:p},{radio:o.sx.RADIO_6E,satisfaction:j,numSta:C}].filter(({satisfaction:e,numSta:i})=>((e,i)=>0!==e&&!!i)(e,i));return u&&0!==I.length?(0,n.jsxs)(A.A,{children:[(0,n.jsx)(r.A,{color:"text-2",size:"medium",children:(0,n.jsx)(c.sA,{id:"DEVICE_WIFI_EXPERIENCE",values:{band:I.map(({radio:e})=>x[e]).join("/")}})}),m(I.map(({satisfaction:e})=>e))]}):null})},187801(e,i,t){t.d(i,{A:()=>C});var n=t(274934),s=t(977872),r=t(602086),a=t(938984),l=t(244081),c=t(309130),o=t(421314),d=t(577141),A=t(184970),x=t(823709),u=t(100978),m=t(470070),h=t(563674),_=t(301940),j=t(393482),p=t(664092);const E=({wifiNetworks:e,compact:i=!1})=>{const t=(0,r.useMemo)(()=>(0,h.Up)(e,!1).sort(),[e]);return t.length?(0,n.jsx)(p.A,{compact:i,children:(0,n.jsx)(A.A,{value:1===t.length?(0,n.jsx)(u.A,{flex:1,overflow:"hidden",children:(0,n.jsx)(o.A,{size:"medium",color:"text-3",children:t[0]})}):(0,n.jsxs)(u.A,{gap:c.YC,children:[(0,n.jsx)(a.A,{size:"medium",color:"text-3",children:(0,n.jsx)(m.sA,{id:"COMMON_MULTIPLE"})}),(0,n.jsx)(x.A,{list:t})]}),condition:[(0,j.Yo)(void 0,{crudCacheStrategy:{type:l.e.CACHE}}),(0,_.uy)(void 0,{crudCacheStrategy:{type:l.e.CACHE}})],definition:(0,n.jsx)(a.A,{size:"medium",children:(0,n.jsx)(m.sA,{id:"COMMON_WIFI_NAME"})})})}):null},C=()=>{const e=(0,s.d4)(d.ad);return(0,n.jsx)(E,{wifiNetworks:e})}},17534(e,i,t){t.d(i,{A:()=>K});var n=t(274934),s=t(977872),r=t(125799),a=t(938984),l=t(853777),c=t(247816),o=t(309130),d=t(470070),A=t(664092);const x=(0,c.A)(l.A)`
  margin-left: ${o.YC};
`,u=()=>(0,n.jsx)(r.A,{description:(0,n.jsx)(d.sA,{id:"DEVICE_PROPERTY_UPLINK_HIGH_AVAILABILITY_MODE_ACTIVE_TOOLTIP"}),width:280,position:"top",style:{display:"inline"},children:(0,n.jsx)(x,{size:"original",isActive:!0})}),m=({isActiveHighAvailability:e})=>(0,n.jsxs)(A.A,{children:[(0,n.jsx)(a.A,{variant:"body-primary",children:(0,n.jsx)(d.sA,{id:"COMMON_MODE"})}),(0,n.jsx)(a.A,{variant:"body-secondary",children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.sA,{id:e?"COMMON_ACTIVE":"COMMON_INACTIVE"}),e?(0,n.jsx)(u,{}):null]})})]});var h=t(631692),_=t(100978);const j=({isActiveHighAvailability:e,secondaryPortAvailabilityLacpState:i})=>(0,n.jsxs)(_.A,{height:"100%",flexDirection:"column",children:[(0,n.jsx)(m,{isActiveHighAvailability:e}),(0,n.jsx)(h.A,{portSpeed:i?.speed})]});var p=t(376892),E=t(535322),C=t(853109),I=t(754924),O=t(808232),g=t(347625),M=t(820266),v=t(602086),N=t(43009),y=t(95032),S=t(792929),f=t(409844),w=t(594005),T=t(331472),b=t(325704),H=t(831433),P=t(223597),R=t(367789),k=t(59612),D=t(112104),L=t(61322),V=t(449339),z=t(974390),F=t(205521),U=t(927316);const W=(0,c.A)("div")`
  height: 100%;
  > div + div {
    margin-top: 16px;
  }
`,Y=f.AH`
  th {
    padding-right: 0;
  }
`,B=f.AH`
  :hover {
    cursor: pointer;
  }

  td {
    padding-right: 25px;
  }
`;var X;!function(e){e.NAME="name",e.EXPERIENCE_INFO="experienceInfo"}(X||(X={}));const G=[{id:X.NAME,sortable:!0,minWidth:120,label:(0,n.jsx)(d.sA,{id:"DEVICE_MESH_CHILDREN"}),renderCell:e=>(0,n.jsxs)(_.A,{alignItems:"center",justifyContent:"center",children:[(0,n.jsx)(_.A,{alignItems:"center",justifyContent:"center",minWidth:25,maxWidth:25,height:25,children:e?(0,n.jsx)(z.A,{model:e.model,height:25}):null}),(0,n.jsx)(y.A,{isTruncated:!0,color:"inherit",size:"medium",style:{width:"110px",paddingLeft:o.YC,paddingRight:o.YC},children:(0,g.Q)(e)})]}),compare:(0,w.l0)(H.tn)},{id:X.EXPERIENCE_INFO,label:(0,n.jsx)(d.sA,{id:"COMMON_EXPERIENCE"}),renderCell:({experienceInfo:e})=>e,minWidth:75,sortable:!0,compare:(0,w.l0)((e,i,t)=>((e,i)=>{const t="is_wired"in e?e.is_wired:void 0,{satisfaction:n,known:s}=(0,H.FX)(void 0,e.type,"wifi_experience_score"in e?e.wifi_experience_score:void 0);let r;switch(e.status===P.S2.ONLINE&&(r=(0,T.gd)(!t&&n>0&&s?n:R.MO)),r){case"COMMON_EXPERIENCE_EXCELLENT":return b.Ig;case"COMMON_GOOD":return b.Bd;case"COMMON_POOR":return b.IR;default:return(0,b.k)(i)}})(e,t))}],$=({downlinks:e})=>{const i=(0,s.wA)(),{motif:t}=(0,N.A)(),r=(0,v.useMemo)(()=>e.map(({downlinkDevice:e})=>{const{averageSatisfaction:i,naNumSta:s,ngNumSta:r}=(0,U.VM)(e);return{id:e._id,name:e.name,experienceInfo:(0,n.jsx)(_.A,{alignItems:"center",whiteSpace:"nowrap",children:(0,n.jsx)(a.A,s+r!==0&&i?{size:"medium",style:{color:(0,k.L)(i,t)},children:(0,n.jsx)(d.sA,{id:(0,T.gd)(i)})}:{size:"medium",color:"disabled",children:(0,n.jsx)(d.sA,{id:"COMMON_NO_CLIENTS"})})}),mac:e.mac,model:e.model,type:e.type}}),[e,t]),{rowLimit:l,renderFooter:c}=(0,D.A)(r.length,{defaultCount:10}),o=(0,v.useCallback)(({mac:e})=>{i((0,F.XP)({type:V.H.DEVICE,id:e}))},[i]);return r.length>0?(0,n.jsx)(W,{children:(0,n.jsx)(S.A,{items:r,truncateHeaderCells:!0,disableColumnFilters:!0,headerRowClassName:Y,rowClassName:B,columns:G,initialSortBy:X.NAME,renderFooter:()=>c,rowHeight:L.I.ROW_HEIGHT,onRowClick:o,rowOffset:0,rowLimit:l})}):null};var q=t(295291),Q=t(222493);const J=({activeItem:{downlink_table:e},devices:i})=>{const t=new Map;for(const n of e||[]){const e=i.find(({mac:e})=>e===n.ap_mac||e===n.mac);if(!e?.mac||!n.radio)continue;const s={name:n.name||"",radio:n.radio,signal:"signal"in n&&n.signal||0,tx_rate:"tx_rate"in n?n.tx_rate:0,rx_rate:"rx_rate"in n?n.rx_rate:0,rx_packets:"rx_packets"in n?n.rx_packets:0,tx_packets:"tx_packets"in n?n.tx_packets:0,rx_bytes:"rx_bytes"in n?n.rx_bytes:0,tx_bytes:"tx_bytes"in n?n.tx_bytes:0},r=t.get(e.mac);t.set(e.mac,{downlinkDevice:e,downlinks:r?[...r.downlinks,s]:[s]})}const s=[...t.values()],r=s[0],a=r?.downlinks[0],l=r?.downlinkDevice;return s.length>0?(0,n.jsx)(E.A,{type:E.I.ACCORDION,items:[{id:"downlink",label:(0,n.jsx)(p.A,{id:s.length>1?"DEVICE_MESH_CHILDREN":"DEVICE_MESH_CHILD"}),openByDefault:!0,renderContent:()=>1===(s||[]).length?(0,n.jsxs)(_.A,{height:"100%",flexDirection:"column",children:[(0,n.jsx)(M.A,{uplinkMac:l?.mac,uplinkName:(0,g.Q)(l)}),r.downlinks.length>1?(0,n.jsx)(Q.A,{mlo_links:r.downlinks}):(0,n.jsx)(q.A,{stats:a})]}):(0,n.jsx)($,{downlinks:s})}]}):null},K=({activeItem:e,activeItem:{downlink_table:i,uplink:t}})=>{const r=(0,s.d4)(I.ID),a=(0,C.q$)(e)||{},{lacp_state:l}=a,c=(0,C.oL)(l),o=(0,C.rX)(l);return(0,n.jsxs)(n.Fragment,{children:[t?.mac?(0,n.jsx)(E.A,{type:E.I.ACCORDION,items:[{id:"uplink",label:(0,n.jsx)(p.A,{id:"wire"===t.type?"COMMON_PARENT_DEVICE":"COMMON_MESH_PARENT"}),openByDefault:!0,renderContent:()=>(0,n.jsx)(O.A,{activeItem:e,devices:r})}]}):null,"wire"===t?.type&&t?.mac&&l?.length>1?(0,n.jsx)(E.A,{type:E.I.ACCORDION,items:[{id:"highAvailability",label:(0,n.jsx)(p.A,{id:"COMMON_HIGH_AVAILABILITY"}),openByDefault:!0,renderContent:()=>(0,n.jsx)(j,{isActiveHighAvailability:o,secondaryPortAvailabilityLacpState:c})}]}):null,(i||[]).length>0?(0,n.jsx)(J,{activeItem:e,devices:r}):null]})}},696049(e,i,t){t.d(i,{H:()=>n});const n=""},237887(e,i,t){t.d(i,{A:()=>x});var n=t(274934),s=t(602086),r=t(977872),a=t(693371),l=t(767822),c=t(820633),o=t(308111);const d=e=>(0,n.jsx)(a.A,{renderOption:l.q,...e}),A=e=>(0,n.jsx)(d,{...e});A.Sorted=e=>{const i=(0,r.d4)(c.zi),t=(0,s.useMemo)(()=>(0,o.k)(i),[i]);return(0,n.jsx)(d,{...e,sortBy:t})};const x=A},308111(e,i,t){t.d(i,{R:()=>A,k:()=>x});var n=t(696049),s=t(350068),r=t(177173),a=t(752104),l=t(64222),c=t(332530);const o=[...new Set([n.H,a.Q.join(a.A),r.Zt,l.F,s.nc,c.Vr])],d={numeric:!0,sensitivity:"base"},A=(e,i)=>{const t=[];for(let n=e;n<=i;n+=1)t.push({value:n,label:String(n)});return t},x=e=>({value:i,label:t},{value:n,label:s})=>o.includes(i?.toString())||o.includes(n?.toString())?1/0:t?.toString().localeCompare(s?.toString(),e,d)??-1}}]);