"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[9541],{809541(e,i,s){s.r(i),s.d(i,{default:()=>te});var t=s(274934),n=s(602086),d=s(463641),r=s(381107),l=s(247816),A=s(100978);const c=(0,l.A)(A.A)`
  flex-direction: column;
`;var o=s(775250),E=s(977872),m=s(505817),x=s(263705),I=s(590979),a=s(535322),u=s(974390),h=s(205521),N=s(449339),j=s(402799),T=s(347625),_=s(309130);const C=(0,l.A)(A.A)`
  width: 100%;
  justify-content: space-between;
  align-items: center;
`,O=(0,l.A)(A.A)`
  flex-direction: column;
  gap: ${_.YC};
  align-items: center;
  cursor: pointer;
  width: 30%;
  > p {
    max-width: 100%;
  }
`;var M=s(407627),D=s(699917);const S=({[d.bE.TYPE]:e,[d.bE.FROM_ENDPOINT]:{[d.AX.DEVICE_NAME]:i,[d.AX.DEVICE_MODEL]:s,[d.AX.DEVICE_MAC]:r},[d.bE.TO_ENDPOINT]:{[d.AX.DEVICE_NAME]:l,[d.AX.DEVICE_MODEL]:A,[d.AX.DEVICE_MAC]:c}})=>{const _=(0,E.wA)(),{themeName:S}=(0,x.u)(),p=(0,n.useCallback)(e=>()=>{_((0,h.XP)({type:N.H.DEVICE,id:e}))},[_]),b=(0,n.useMemo)(()=>{switch(e){case d.U7.SUCCESS_ROAMING:return m.Ay[`desktop-color-green-06-${S}`];case d.U7.FAILED_ROAMING:return m.Ay[`desktop-color-red-06-${S}`];default:return""}},[e,S]);return(0,t.jsx)(a.A,{children:(0,t.jsxs)(C,{children:[(0,t.jsxs)(O,{onClick:p(r),...I.A.addDataTestId(I.A.TestId.SIDE_PANEL_TRIGGER),children:[(0,t.jsx)(u.A,{width:j.b3,height:j.SI,model:s}),(0,t.jsx)(o.A,{isTruncated:!0,size:"small",color:"text-1",children:(0,T.Q)({name:i,model:s,mac:r})})]}),(0,t.jsx)(M.A,{roamingColor:b,direction:D.P.RIGHT,hidePercentage:!0}),(0,t.jsxs)(O,{onClick:p(c),...I.A.addDataTestId(I.A.TestId.SIDE_PANEL_TRIGGER),children:[(0,t.jsx)(u.A,{width:j.b3,height:j.SI,model:A}),(0,t.jsx)(o.A,{isTruncated:!0,size:"small",color:"text-1",children:(0,T.Q)({name:l,model:A,mac:c})})]})]})})};var p=s(179102),b=s(266824),L=s(669439),z=s(570801),R=s(897166),f=s(820633),P=s(470070),G=s(875343);const k=(0,l.A)(A.A)`
  flex-direction: column;
  gap: ${_.kc};
`,y=(0,l.A)(A.A)`
  justify-content: space-between;
  white-space: nowrap;
  > :nth-child(2) {
    max-width: 70%;
  }
  gap: ${_.Er};
  overflow: hidden;
`,X=({[d.bE.TIME]:e,[d.bE.ENDPOINT]:{[d.AX.WLAN_NAME]:i,[d.AX.WLAN_ID]:s},[d.bE.FROM_ENDPOINT]:{[d.AX.DEVICE_NAME]:r,[d.AX.DEVICE_MAC]:l,[d.AX.DEVICE_MODEL]:A,[d.AX.RSSI]:c,[d.AX.CHANNEL]:m,[d.AX.BAND]:x,[d.AX.CHANNEL_WIDTH]:u,[d.AX.WLAN_NAME]:j,[d.AX.WLAN_ID]:_},[d.bE.TO_ENDPOINT]:{[d.AX.DEVICE_NAME]:C,[d.AX.DEVICE_MAC]:O,[d.AX.DEVICE_MODEL]:M,[d.AX.RSSI]:D,[d.AX.CHANNEL]:S,[d.AX.BAND]:X,[d.AX.CHANNEL_WIDTH]:w,[d.AX.WLAN_NAME]:g,[d.AX.WLAN_ID]:F},[d.bE.CLIENT]:{[d.Sf.NAME]:H,[d.Sf.MAC]:V,[d.Sf.HOSTNAME]:W,[d.Sf.IP]:$}})=>{const{formatMessage:U}=(0,P.tz)(),v=(0,E.wA)(),Y=(0,E.d4)(f.zi),Q=(0,E.d4)(R.hq),B=(0,E.d4)(z.BQ),q=(0,n.useMemo)(()=>new Intl.DateTimeFormat(Y,{timeZone:Q,hourCycle:B,weekday:"short",day:"numeric",month:"short",hour:"numeric",minute:"numeric",year:"numeric"}),[Y,Q,B]),Z=(0,n.useCallback)(e=>()=>{v((0,h.XP)({type:N.H.CLIENT,id:e}))},[v]),J=(0,n.useCallback)(e=>()=>{v((0,h.XP)({type:N.H.DEVICE,id:e}))},[v]),K=(0,n.useCallback)(e=>()=>{v((0,h.XP)({type:N.H.WIFI,id:e}))},[v]),ee=(0,n.useMemo)(()=>(0,G.Mw)({channel:m,band:x,channelWidth:u,rssi:c,formatMessage:U,separator:" | "}),[m,x,u,c,U]),ie=(0,n.useMemo)(()=>(0,G.Mw)({channel:S,band:X,channelWidth:w,rssi:D,formatMessage:U,separator:" | "}),[S,X,w,D,U]),se=(0,n.useMemo)(()=>i||j||g,[i,j,g]),te=(0,n.useMemo)(()=>(0,T.Q)({name:r,model:A,mac:l}),[r,A,l]),ne=(0,n.useMemo)(()=>(0,T.Q)({name:C,model:M,mac:O}),[C,M,O]);return(0,t.jsx)(a.A,{children:(0,t.jsxs)(k,{children:[e?(0,t.jsxs)(y,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"COMMON_DATE_TIME"})}),(0,t.jsx)(p.A,{size:"medium",color:"text-3",children:q.format(e)})]}):null,H?(0,t.jsxs)(y,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"LOGS_CLIENT_NAME"})}),(0,t.jsx)(b.A,{type:"button",fontSize:"medium",onClick:Z(V),...I.A.addDataTestId(I.A.TestId.SIDE_PANEL_TRIGGER),children:(0,t.jsx)(o.A,{isTruncated:!0,size:"medium",color:"inherit",children:H})})]}):null,W?(0,t.jsxs)(y,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"LOGS_CLIENT_HOSTNAME"})}),(0,t.jsx)(p.A,{size:"medium",color:"text-3",children:W})]}):null,$?(0,t.jsxs)(y,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"COMMON_CLIENT_IP_ADDRESS"})}),(0,t.jsx)(p.A,{size:"medium",color:"text-3",children:$})]}):null,V?(0,t.jsxs)(y,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"LOGS_CLIENT_MAC_ADDRESS"})}),(0,t.jsx)(p.A,{size:"medium",color:"text-3",children:V})]}):null,se?(0,t.jsxs)(y,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"COMMON_WIFI_NAME"})}),(0,t.jsx)(b.A,{type:"button",fontSize:"medium",onClick:K(s||_||F),...I.A.addDataTestId(I.A.TestId.SIDE_PANEL_TRIGGER),children:(0,t.jsx)(o.A,{isTruncated:!0,size:"medium",color:"inherit",children:se})})]}):null,te?(0,t.jsxs)(y,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"LOGS_ROAMED_FROM"})}),(0,t.jsx)(b.A,{type:"button",fontSize:"medium",onClick:J(l),...I.A.addDataTestId(I.A.TestId.SIDE_PANEL_TRIGGER),children:(0,t.jsx)(o.A,{isTruncated:!0,size:"medium",color:"inherit",children:te})})]}):null,ee?(0,t.jsxs)(y,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"LOGS_PRIOR_CONNECTION"})}),(0,t.jsx)(L.A,{description:ee,children:(0,t.jsx)(o.A,{size:"medium",color:"text-3",isTruncated:!0,children:ee})})]}):null,c&&D?(0,t.jsxs)(y,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"LOGS_ROAMING_DECISION"})}),(0,t.jsx)(p.A,{size:"medium",color:"text-3",children:(0,t.jsx)(P.sA,{id:"COMMON_DBM_FROM_TO",values:{from:c,to:D}})})]}):null,ne?(0,t.jsxs)(y,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"COMMON_CONNECTED_TO"})}),(0,t.jsx)(b.A,{type:"button",fontSize:"medium",onClick:J(O),...I.A.addDataTestId(I.A.TestId.SIDE_PANEL_TRIGGER),children:(0,t.jsx)(o.A,{isTruncated:!0,size:"medium",color:"inherit",children:ne})})]}):null,ie?(0,t.jsxs)(y,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"LOGS_CONNECTION_INFO"})}),(0,t.jsx)(L.A,{description:ie,children:(0,t.jsx)(o.A,{size:"medium",color:"text-3",isTruncated:!0,children:ie})})]}):null]})})},w=({[d.bE.TIME]:e,[d.bE.ENDPOINT]:i,[d.bE.FROM_ENDPOINT]:s,[d.bE.TO_ENDPOINT]:n,[d.bE.CLIENT]:r,[d.bE.TYPE]:l})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S,{from_endpoint:s,to_endpoint:n,type:l}),(0,t.jsx)(X,{time:e,endpoint:i,from_endpoint:s,to_endpoint:n,client:r})]}),g=(0,l.A)(A.A)`
  flex-direction: column;
  gap: ${_.kc};
`,F=(0,l.A)(A.A)`
  gap: 2px;
`,H=(e,i)=>Number.isFinite(e)?e>=80?m.Ay[`desktop-color-green-05-${i}`]:e>=60?m.Ay[`desktop-color-orange-06-${i}`]:m.Ay[`desktop-color-red-06-${i}`]:m.Ay[`desktop-color-neutral-03-${i}`];var V=s(291508);const W=(0,l.A)(A.A)`
  flex-direction: column;
  gap: ${_.YC};
  width: 100%;
`,$=(0,l.A)(A.A,(0,V.A)("percentage"))`
  width: 100%;
  height: ${_.Ln};
  padding-left: ${_.YC};
  border-radius: ${m.Ay["desktop-radius-base"]};
  background: ${({percentage:e,theme:{themeName:i}})=>H(e,i)};
`,U=({id:e,percentage:i})=>(0,t.jsxs)(W,{children:[(0,t.jsx)($,{percentage:i,children:(0,t.jsx)(p.A,{size:"small",color:"text-2-oncolor-alpha",children:(0,t.jsx)(P.sA,{id:e})})}),(0,t.jsxs)(p.A,{size:"small",style:{color:H(i,(0,x.u)().themeName)},children:[i,"%"]})]}),v={[d.Ct.ASSOCIATION_RATIO]:"COMMON_ASSOC",[d.Ct.AUTHENTICATION_RATIO]:"COMMON_AUTH",[d.Ct.DHCP_RATIO]:"COMMON_DHCP",[d.Ct.DNS_RATIO]:"COMMON_DNS"},Y=Object.keys(v),Q=Object.entries(v),B=({[d.bE.STATISTICS]:e})=>(0,t.jsx)(a.A,{children:(0,t.jsxs)(g,{children:[(0,t.jsx)(p.A,{size:"small",color:"text-2",children:(0,t.jsx)(P.sA,{id:"COMMON_WIFI_CONNECTIVITY"})}),(0,t.jsx)(F,{children:Q.map(([i,s])=>(0,t.jsx)(U,{id:s,percentage:e[i]||0},s))})]})}),q=(0,l.A)(A.A)`
  flex-direction: column;
  gap: ${_.kc};
`,Z=(0,l.A)(A.A)`
  justify-content: space-between;
  white-space: nowrap;
  > :nth-child(2) {
    max-width: 70%;
  }
  gap: ${_.Er};
  overflow: hidden;
`,J=({[d.bE.TIME]:e,[d.bE.ENDPOINT]:{[d.AX.DEVICE_MAC]:i,[d.AX.DEVICE_NAME]:s,[d.AX.WLAN_NAME]:r,[d.AX.WLAN_ID]:l},[d.bE.CLIENT]:{[d.Sf.NAME]:A,[d.Sf.MAC]:c,[d.Sf.HOSTNAME]:m,[d.Sf.IP]:x},[d.bE.STATISTICS]:u})=>{const j=(0,E.wA)(),T=(0,E.d4)(f.zi),_=(0,E.d4)(R.hq),C=(0,E.d4)(z.BQ),O=(0,n.useMemo)(()=>new Intl.DateTimeFormat(T,{timeZone:_,hourCycle:C,weekday:"short",day:"numeric",month:"short",hour:"numeric",minute:"numeric",year:"numeric"}),[T,_,C]),M=(0,n.useCallback)(e=>()=>{j((0,h.XP)({type:N.H.CLIENT,id:e}))},[j]),D=(0,n.useCallback)(e=>()=>{j((0,h.XP)({type:N.H.DEVICE,id:e}))},[j]),S=(0,n.useCallback)(e=>()=>{j((0,h.XP)({type:N.H.WIFI,id:e}))},[j]),L=(0,n.useMemo)(()=>Y.find(e=>!u[e]),[u]);return(0,t.jsx)(a.A,{children:(0,t.jsxs)(q,{children:[e?(0,t.jsxs)(Z,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"COMMON_DATE_TIME"})}),(0,t.jsx)(p.A,{size:"medium",color:"text-3",children:O.format(e)})]}):null,L?(0,t.jsxs)(Z,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"ROAMING_FAILURE_STEP"})}),(0,t.jsx)(p.A,{size:"medium",color:"text-3",children:(0,t.jsx)(P.sA,{id:v[L]})})]}):null,A?(0,t.jsxs)(Z,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"LOGS_CLIENT_NAME"})}),(0,t.jsx)(b.A,{type:"button",fontSize:"medium",onClick:M(c),...I.A.addDataTestId(I.A.TestId.SIDE_PANEL_TRIGGER),children:(0,t.jsx)(o.A,{isTruncated:!0,size:"medium",color:"inherit",children:A})})]}):null,m?(0,t.jsxs)(Z,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"LOGS_CLIENT_HOSTNAME"})}),(0,t.jsx)(p.A,{size:"medium",color:"text-3",children:m})]}):null,x?(0,t.jsxs)(Z,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"COMMON_CLIENT_IP_ADDRESS"})}),(0,t.jsx)(p.A,{size:"medium",color:"text-3",children:x})]}):null,c?(0,t.jsxs)(Z,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"LOGS_CLIENT_MAC_ADDRESS"})}),(0,t.jsx)(p.A,{size:"medium",color:"text-3",children:c})]}):null,s?(0,t.jsxs)(Z,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"COMMON_AP"})}),(0,t.jsx)(p.A,{size:"medium",color:"text-3",children:(0,t.jsx)(b.A,{type:"button",fontSize:"medium",onClick:D(i),...I.A.addDataTestId(I.A.TestId.SIDE_PANEL_TRIGGER),children:(0,t.jsx)(o.A,{isTruncated:!0,size:"medium",color:"inherit",children:s})})})]}):null,r?(0,t.jsxs)(Z,{children:[(0,t.jsx)(p.A,{size:"medium",color:"text-2",children:(0,t.jsx)(P.sA,{id:"COMMON_WIFI_NAME"})}),(0,t.jsx)(b.A,{type:"button",fontSize:"medium",onClick:S(l),...I.A.addDataTestId(I.A.TestId.SIDE_PANEL_TRIGGER),children:(0,t.jsx)(o.A,{isTruncated:!0,size:"medium",color:"inherit",children:r})})]}):null]})})};var K=s(897386);const ee=({[d.bE.ENDPOINT]:{[d.AX.DEVICE_MAC]:e},[d.bE.CLIENT]:{[d.Sf.MAC]:i}})=>{const s=(0,E.wA)(),r=(0,n.useCallback)(()=>{(0,E.vA)(()=>{s((0,K.TU)([d.U7.FAILED_CONNECTION])),s((0,K.Jw)([i])),s((0,K.T9)([e])),s((0,K.q)([e])),s((0,K.p0)(!0)),s((0,h.K5)())})},[s,i,e]);return(0,t.jsx)(a.A,{children:(0,t.jsx)(b.A,{style:{width:"fit-content"},type:"button",fontSize:"medium",onClick:r,children:(0,t.jsx)(P.sA,{id:"ROAMING_VIEW_ALL_ATTEMPTS"})})})},ie=({[d.bE.TIME]:e,[d.bE.ENDPOINT]:i,[d.bE.CLIENT]:s,[d.bE.STATISTICS]:n})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(B,{statistics:n}),(0,t.jsx)(J,{time:e,endpoint:i,client:s,statistics:n}),(0,t.jsx)(ee,{endpoint:i,client:s})]});var se=s(465061);const te=({activeItem:{[se.b.ROAMING]:{[d.bE.TYPE]:e,[d.bE.TIME]:i,[d.bE.ENDPOINT]:s,[d.bE.FROM_ENDPOINT]:l,[d.bE.TO_ENDPOINT]:A,[d.bE.CLIENT]:o,[d.bE.STATISTICS]:E},[se.b.ROAMING_TOPOLOGY]:{[r.mO.EDGES]:m=[]}}})=>{const x=(0,n.useMemo)(()=>{switch(e){case d.U7.SUCCESS_ROAMING:case d.U7.FAILED_ROAMING:return(0,t.jsx)(w,{time:i,endpoint:s,from_endpoint:l,to_endpoint:A,client:o,edges:m,type:e});case d.U7.FAILED_CONNECTION:return(0,t.jsx)(ie,{time:i,endpoint:s,client:o,statistics:E});default:return null}},[e,i,s,m,l,A,o,E]);return(0,t.jsx)(c,{children:x})}}}]);