"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[43891],{104154(e,t,a){a.d(t,{A:()=>c});var n=a(296540),r=a(469733),i=a(691294),l=a(239417);const c=({client:{id:e,type:t,status:a,blocked:c},props:m,children:o})=>{const s=(0,n.useMemo)(()=>t===i.sK.VPN?i.N7.VPN:t===i.sK.TELEPORT?i.N7.TELEPORT:c?i.N7.BLOCKED:a===i.S2.OFFLINE?i.N7.OFFLINE:i.N7.ACTIVE,[t,c,a]);return o((0,r.useSelector)((0,n.useMemo)(()=>(0,l.kV)(e,m,s),[e,m,s])))}},907157(e,t,a){a.d(t,{A:()=>l});var n=a(296540),r=a(469733),i=a(435325);const l=({mac:e,props:t,children:a})=>a((0,r.useSelector)((0,n.useMemo)(()=>(0,i.eu)(e,t),[e,t])))},522453(e,t,a){a.d(t,{Ay:()=>p,v$:()=>h});var n=a(296540),r=a(469733),i=a(271856),l=a(71479),c=a(132196),m=a(811822),o=a(955161),s=a(916537),E=a(602021),d=a(566723);const u=(0,l.A)("div")`
  pointer-events: none;
`,A=c.AH`
  opacity: ${d.xN};
`,_=({warning:e,children:t})=>{return e?n.createElement(o.A,{condition:!!e,wrapper:(a=e,e=>n.createElement(i.A,{description:(0,m.Kg)(a)?n.createElement(s.sA,{id:a}):a,portal:!0,isInteractive:!(0,m.Kg)(a)},n.createElement(u,null,e)))},t):n.createElement(n.Fragment,null,t);var a},h=({disabled:e,children:t})=>e?n.createElement(u,{className:A,style:{width:"100%"}},t):n.createElement(n.Fragment,null,t),p=({disableWithWarning:e,children:t})=>{const a=(0,r.useSelector)(E.EL);return n.createElement(_,{warning:e},e?n.createElement("div",{className:a?void 0:A},t):t)}},811015(e,t,a){a.d(t,{A:()=>E});var n=a(296540),r=a(822336),i=a(705145),l=a(57527),c=a(71479),m=a(566723),o=a(916537);const s=(0,c.A)(l.A)`
  background-color: ${({theme:{themeName:e}})=>r.Ay[`desktop-color-green-06-${e}`]};
  margin-right: ${m.YC};
`,E=()=>n.createElement(s,null,n.createElement(i.A,{size:"small",color:"neutral-inverse"},n.createElement(o.sA,{id:"COMMON_MESH"})))},66648(e,t,a){a.d(t,{Ay:()=>y,KK:()=>C,gJ:()=>O});var n=a(296540),r=a(217439),i=a(822336),l=a(71479),c=a(860631),m=a(596441),o=a(943805),s=a(522453),E=a(916537),d=a(564985),u=a(765562),A=a(861951),_=a(811015),h=a(349107),p=a(294303),N=a(720572),M=a(115829);const C={CHANNEL:220,MIMO:40,STANDARD:55,CLIENTS:66},O=(0,l.A)(p.A)`
  height: ${m.I.ROW_HEIGHT-1}px;
  border-bottom: ${({theme:{themeName:e}})=>i.Ay[`desktop-border-divider-${e}`]};
  align-items: center;
  justify-content: space-between;
`,y=({channel:e,ht:t,radio:a,mimo:i,standard:l,disabled:m,mac:y,children:I,is_device_afc_supported:T,afc_enabled:g,afc_done:w,afc_initialize_timeout_at:f,is_device_outdoor_mode_supported:D,has_enabled_6Ghz:b,is_disabled_all_6ghz_radios:v,isMesh:L})=>{let R=null;const S=(0,c.gR)({afc_initialize_timeout_at:f});return a===d.sx.RADIO_6E&&D&&T&&m&&v&&b?R=n.createElement(E.sA,{id:"DEVICE_TRANSMIT_POWER_DISABLED_6GHZ_WARNING",values:{link:n.createElement(A.A,{mac:y},n.createElement(E.sA,{id:"COMMON_CLICK_TO_ENABLE"})),br:E.br}}):a===d.sx.RADIO_6E&&D&&T&&g&&void 0!==w&&!w&&!S&&!m&&b?R=n.createElement(E.sA,{id:"DEVICE_DID_NOT_RECEIVE_AFC_RESPONSE_WARNING",values:{link:n.createElement(h.A,{id:"COMMON_LEARN_MORE",href:u.A.afcArticle})}}):m&&(R=n.createElement(E.sA,{id:"DEVICE_RADIO_DISABLED_WARNING",values:{link:n.createElement(N.A,{mac:y,band:a},n.createElement(E.sA,{id:"COMMON_CLICK_TO_ENABLE"}))}})),n.createElement(s.Ay,{disableWithWarning:R},n.createElement(O,{width:"100%"},n.createElement(p.A,{width:C.CHANNEL},n.createElement(r.A,{weight:"bold"},n.createElement(E.sA,void 0!==e?{id:"COMMON_CHANNEL_RADIO_CHANNEL",values:{channel:e}}:{id:"COMMON_FALLBACK"})),n.createElement(M.A,{size:"medium"}," (",a&&o.A[a.toUpperCase()]?.frequency||n.createElement(E.sA,{id:"COMMON_FALLBACK"}),", ",t||n.createElement(E.sA,{id:"COMMON_FALLBACK"})," ",n.createElement(E.sA,{id:"COMMON_UNIT_MHZ"}),")"),L?n.createElement(_.A,null):null),n.createElement(p.A,{width:C.MIMO},n.createElement(r.A,null,i||n.createElement(E.sA,{id:"COMMON_FALLBACK"}))),n.createElement(p.A,{width:C.STANDARD},n.createElement(r.A,null,l||n.createElement(E.sA,{id:"COMMON_FALLBACK"}))),I))}},424095(e,t,a){a.d(t,{A:()=>l});var n=a(296540),r=a(90757),i=a(573531);const l=({startTimestamp:e,uptimeParams:t})=>{const a=(0,n.useRef)(null),l=(0,n.useRef)(null),c=(0,n.useCallback)(t=>{a.current&&(a.current.innerText=e?(0,r.Ay)(Math.floor(Date.now()/1e3)-e,t).join(" "):i.L,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{c(t)},1e3))},[e]);return(0,n.useEffect)(()=>(e&&c(t),()=>{l.current&&clearTimeout(l.current)}),[e,t,c]),n.createElement("span",{ref:a})}},743891(e,t,a){a.d(t,{A:()=>q});var n=a(469733),r=a(296540),i=a(325898),l=a(382389),c=a(132196),m=a(628291),o=a(282556),s=a(566723),E=a(294303),d=a(689965),u=a(602021),A=a(198494),_=a(801081),h=a(25553),p=a(87485);const N=({queryParams:e},{queryParams:t})=>e?.mac===t?.mac;var M=a(771805);const C="clientsDailySatisfaction",O=`${M.w}/client/:mac:/24hr-satisfaction`,y="mac",I=e=>(0,_.Mz)((e=>(0,_.Mz)((e=>({models:t})=>(0,h.JC)(C,t,{queryParams:{mac:e}},{idField:y,compareFunction:N}))(e),e=>(0,p.kh)(e)[0]))(e),e=>e?.historical_scores||[]);var T=a(691189);const g=(e,t={},a={})=>(0,T.An)([{model:C,payload:t=>[{...t,[y]:e}]}],O.replace(":mac:",e),{queryParams:{mac:e},...t},{idField:y,compareFunction:N,...a}),w=({queryParams:e},{queryParams:t})=>e?.mac===t?.mac,f="clientsDailyActivity",D=`${M.w}/client/:mac:/24hr-activity`,b="mac",v=e=>(0,_.Mz)((e=>(0,_.Mz)((e=>({models:t})=>(0,h.JC)(f,t,{queryParams:{mac:e}},{idField:b,compareFunction:w}))(e),e=>(0,p.kh)(e)[0]))(e),e=>e?.historical_activity||[]),L=(e,t={},a={})=>(0,T.An)([{model:f,payload:t=>[{...t,[b]:e}]}],D.replace(":mac:",e),{queryParams:{mac:e},...t},{idField:b,compareFunction:w,...a});var R=a(951106),S=a(691294),H=a(863489),F=a(217439),x=a(38937),z=a(66648),P=a(916537),K=a(104154);const k=({signal:e})=>r.createElement(E.A,{alignItems:"center",justifyContent:"flex-end"},r.createElement(F.A,{size:"medium",color:(0,x.b5)(e)},e," ",r.createElement(P.sA,{id:"COMMON_UNIT_DBM"}))),W=({radio:e,channel:t,channel_width:a,mimo:n,radio_proto:i,signal:l,children:c})=>e||t||a?r.createElement(z.Ay,{radio:e,channel:t,ht:a,mimo:n?(0,R.iP)(n):null,standard:i?(0,R.z0)(i):null},l?r.createElement(k,{signal:l}):c):null,G=({activeItem:e,activeItem:{radio:t,channel:a,channel_width:n,mimo:i,radio_proto:l}})=>"is_mlo"in e&&e.is_mlo?r.createElement(K.A,{client:e,props:["mlo_details"]},({mlo_details:e=[]})=>r.createElement(E.A,{flexDirection:"column"},e.map(({channel_width:e,...t})=>r.createElement(W,{key:t.radio,channel_width:+e,...t})))):r.createElement(W,{radio:t,channel:a,channel_width:n,mimo:i,radio_proto:l},r.createElement(K.A,{client:e,props:["signal"]},({signal:e=null})=>e?r.createElement(k,{signal:e}):null));var B=a(231460);const U=c.AH`
  &:empty {
    display: none;
  }
`,$={},j=({activeItem:e,motif:t})=>{const{motifPalette:{text04:a}}=(0,l.u)(),{satisfaction:n,translationKey:i}=(0,r.useMemo)(()=>(0,R.eg)(e.type,e.wifi_experience_score)||{satisfaction:0,translationKey:"COMMON_UNKNOWN"},[e.type,e.wifi_experience_score]);return r.createElement(B.hW,{score:n,scoreTranslationKey:n>0?i:"COMMON_NO_EXP",headerTranslationKey:"COMMON_WIFI_EXP",color:e.status===S.S2.OFFLINE||e.blocked?a:(0,m.L)(n,t),hideScore:0===n})},q=({activeItem:e,isWired:t=!1,hideChannels:a=!1})=>{const l=(0,n.useDispatch)(),{motif:c}=(0,i.A)(),m=(0,n.useSelector)(u.hq),_=(0,n.useSelector)(o.zi),h=(0,n.useSelector)(A.BQ),p=(0,n.useSelector)((0,r.useMemo)(()=>(t?v:I)(e.mac),[e.mac,t])),N=e.wired_rate_mbps,M=(0,r.useMemo)(()=>t?(0,H.mQ)(p,c,N):(0,H.l9)(p,c),[p,c,t,N]);return(0,r.useEffect)(()=>{(!$[e.mac]||Date.now()-$[e.mac]>=3e5)&&l((t?L:g)(e.mac)).then(()=>{$[e.mac]=Date.now()})},[l,e.mac,t]),r.createElement(d.A,null,t?r.createElement(B.pm,{wiredRateMbps:N,motif:c}):r.createElement(j,{activeItem:e,motif:c}),r.createElement(E.A,{flexDirection:"column",marginTop:s.Ln},r.createElement(B.dC,{stackedBarItems:M,labelTranslationKey:t?"COMMON_WIRED_EXPERIENCE":"COMMON_WIFI_EXP",siteTimezone:m,language:_,selfHourCycle:h,hideScore:t,wiredRateMbps:N}),r.createElement(B.XG,{siteTimezone:m,selfHourCycle:h,language:_,startTime:p[0]?.timestamp})),r.createElement(E.A,{width:"100%",justifyContent:"space-between",marginTop:s.YC},r.createElement(B.ZP,{activeItem:e}),r.createElement(B.FN,{status:e.status,assoc_time:"assoc_time"in e?e.assoc_time:void 0,last_seen:"last_seen"in e?e.last_seen:void 0})),e.status!==S.S2.ONLINE||t||a?null:r.createElement(E.A,{width:"100%",marginTop:s.Ln,className:U},r.createElement(G,{activeItem:e})))}},231460(e,t,a){a.d(t,{FN:()=>R,XG:()=>D,ZP:()=>b,dC:()=>f,hW:()=>T,kD:()=>S,mb:()=>I,pm:()=>g});var n=a(822336),r=a(296540),i=a(271856),l=a(773412),c=a(217439),m=a(705145),o=a(71479),s=a(903216),E=a(90757),d=a(945132),u=a(566723),A=a(424095),_=a(11001),h=a(294303),p=a(916537),N=a(907157),M=a(104154),C=a(691294),O=a(863489);const y=(0,o.A)(h.A)`
  > div > div {
    height: 8px;
    margin: 0;
    div {
      height: inherit !important;
    }
  }
`,I=(0,o.A)(m.A)`
  :hover {
    color: ${({theme:{themeName:e}})=>n.Ay[`desktop-color-ublue-06-${e}`]};
  }
`,T=({score:e,headerTranslationKey:t,scoreTranslationKey:a,color:n,hideScore:i})=>r.createElement(h.A,{justifyContent:"space-between"},r.createElement(c.A,{color:"text-1",size:"medium",weight:"bold"},r.createElement(p.sA,{id:t})),r.createElement(c.A,{size:"medium",style:{color:n}},r.createElement(p.sA,{id:a}),e>=0&&e<=100&&!i?r.createElement(r.Fragment,null," (",e,"%)"):null)),g=({wiredRateMbps:e,motif:t})=>r.createElement(h.A,{justifyContent:"space-between"},r.createElement(c.A,{size:"medium",weight:"bold"},r.createElement(p.sA,{id:"COMMON_WIRED_EXPERIENCE"})),r.createElement(c.A,{size:"medium",...e>0?{style:{color:(0,O.xe)(e,t)}}:{color:"disabled"}},e>0?(0,s.ir)(e):r.createElement(p.sA,{id:"COMMON_FALLBACK"}))),w=({color:e,tooltipColor:t,labelTranslationKey:a,scoreTranslationKey:n,score:i,hideScore:l=!1,wiredRateMbps:m,not_reported:o,from:s,to:E})=>r.createElement(h.A,{flexDirection:"column",whiteSpace:"nowrap"},r.createElement(h.A,{justifyContent:"space-between"},r.createElement(c.A,{weight:"bold",color:"text-1"},r.createElement(p.sA,{id:a})),r.createElement(c.A,{style:{color:t||e}},r.createElement(p.sA,{id:o?"COMMON_NOT_REPORTED":n,values:{value:m?m<1e3?m:m/1e3:0}}),i>=0&&i<=100&&!o&&!l?r.createElement(r.Fragment,null," (",i,"%)"):null)),r.createElement(h.A,{justifyContent:"space-between"},r.createElement(h.A,{marginRight:u.Ln},r.createElement(c.A,{color:"text-1"},r.createElement(p.sA,{id:"COMMON_TIME"}))),r.createElement(c.A,null,s," - ",E))),f=(0,r.memo)(({stackedBarItems:e,siteTimezone:t,language:a,selfHourCycle:n,hideScore:i=!1,wiredRateMbps:c,labelTranslationKey:m})=>r.createElement(y,null,r.createElement(l.A,{items:e,rounded:!0,itemTooltip:({score:e,color:l,tooltipColor:o,translationKey:s,timestamp:E,nextTimestamp:d,not_reported:u})=>({animate:!1,delay:.2,message:r.createElement(w,{color:l,tooltipColor:o,labelTranslationKey:m,scoreTranslationKey:s,score:e,hideScore:i,not_reported:u,wiredRateMbps:c,from:new Intl.DateTimeFormat(a,{timeZone:t,hourCycle:n,hour:"numeric",minute:"2-digit",day:"numeric",month:"short"}).format(E),to:new Intl.DateTimeFormat(a,{timeZone:t,hourCycle:n,hour:"numeric",minute:"2-digit",day:"numeric",month:"short"}).format(d)}),width:"auto",maxWidth:"auto"})}))),D=({siteTimezone:e,selfHourCycle:t,startTime:a,language:n})=>r.createElement(h.A,{justifyContent:"space-between",marginBottom:u.kc},r.createElement(c.A,{color:"text-3",size:"small"},new Intl.DateTimeFormat(n,{timeZone:e,hourCycle:t,hour:"numeric",minute:"2-digit"}).format(a||Date.now()-432e5)),r.createElement(c.A,{color:"text-3",size:"small"},new Intl.DateTimeFormat(n,{timeZone:e,hourCycle:t,hour:"numeric",minute:"2-digit"}).format(a?a+432e5:Date.now())),r.createElement(c.A,{color:"text-3",size:"small"},r.createElement(p.sA,{id:"COMMON_NOW"}))),b=({activeItem:e,isUnifiDeviceClient:t=!1})=>{const a=(0,r.useMemo)(()=>t?N.A:M.A,[t]);return r.createElement(a,{mac:e.mac,client:e,props:["tx_bytes-r","rx_bytes-r"]},({"tx_bytes-r":e=0,"rx_bytes-r":t=0})=>r.createElement(h.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"}})))},v=e=>[E.Au.HOURS,E.Au.MINUTES,Math.floor((Date.now()-new Date(1e3*e).getTime())/d.jU)<1?E.Au.SECONDS:E.Au.DAYS],L=(0,r.memo)(({id:e,startTimestamp:t})=>r.createElement(i.A,{width:100,description:r.createElement(m.A,{size:"small",color:"text-1",isCentered:!0,style:{width:"100%"}},r.createElement(p.sA,{id:e}))},r.createElement(c.A,{size:"medium",color:"text-2"},r.createElement(A.A,{startTimestamp:t,uptimeParams:v(t)})))),R=(0,r.memo)(({status:e,assoc_time:t,last_seen:a})=>e===C.S2.ONLINE&&t?r.createElement(L,{id:"COMMON_UPTIME",startTimestamp:t}):e===C.S2.OFFLINE&&a?r.createElement(L,{id:"COMMON_LAST_SEEN",startTimestamp:a}):null),S=({uptime:e,last_seen:t})=>e>=0?r.createElement(i.A,{description:r.createElement(p.sA,{id:"COMMON_UPTIME"})},r.createElement(c.A,{size:"medium"},(0,E.Ay)(e))):t?r.createElement(h.A,{width:"100%",whiteSpace:"nowrap",justifyContent:"flex-end"},r.createElement(c.A,{size:"medium"},r.createElement(p.sA,{id:"COMMON_LAST_SEEN"}))," ",r.createElement(c.A,{size:"medium",color:"inherit"},r.createElement(A.A,{startTimestamp:t,uptimeParams:v(t)}))):null},596441(e,t,a){a.d(t,{I:()=>n});const n={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,t,a,n){return Math.min((n||this.ROW_HEIGHT)*e+(a??this.HEADER_HEIGHT),(n||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)}}}}]);