"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[56932],{891642(e,i,t){t.d(i,{$:()=>s,D:()=>n});const s="reportWifiExperience",n=[{value:"DROPPED_CONNECTIVITY",label:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_REASON_DROPPED_CONNECTIVITY"},{value:"POOR_LATENCY",label:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_REASON_POOR_LATENCY"},{value:"POOR_THROUGHPUT",label:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_REASON_POOR_THROUGHPUT"}]},752104(e,i,t){t.d(i,{A:()=>n,Q:()=>r});var s=t(765567);const n="_",r=[s.ZM,s.Je]},850352(e,i,t){t.d(i,{e:()=>u});var s=t(602086),n=t(237725),r=t(977872),l=t(101134),a=t(104997),o=t(95546),c=t(212635),d=t(251905),m=t(10695);const u=()=>{const e=(0,r.wA)(),i=(0,n.W6)(),t=(0,l.A)(`${a.VO.PORTS}`);return{handleGoToPortsPage:(0,s.useCallback)((s,n,r)=>{if(s)if(e((0,m.gU)(!0)),e((0,m.U)((0,d.HN)(c.F7.DEVICE,[s]))),e((0,m.E1)(!0)),r&&e((0,m.IU)(!0)),n){const i=(0,o.FS)(s,n);e((0,m.Ao)([i]))}else e((0,m.Ao)([]));i.push(t)},[t,i,e])}}},537417(e,i,t){t.d(i,{A:()=>n});var s=t(938984);const n=(0,t(247816).A)(s.A)`
  white-space: nowrap;
`},620627(e,i,t){t.d(i,{A:()=>m});var s=t(274934),n=t(938984),r=t(247816),l=t(309130),a=t(100978),o=t(535322);const c=(0,r.A)("div")`
  margin-right: ${l.kc};
`,d=(0,r.A)("div")`
  margin-left: ${l.kc};
`,m=({icon:e,closeIcon:i,nested:t,children:r,...l})=>(0,s.jsx)(o.A,{nested:t,...l,children:(0,s.jsxs)(a.A,{children:[(0,s.jsx)(c,{children:e}),(0,s.jsx)(n.A,{size:"medium",children:r}),i?(0,s.jsx)(d,{children:i}):null]})})},648175(e,i,t){t.d(i,{A:()=>r});var s=t(274934),n=t(642687);const r=({children:e,...i})=>(0,s.jsx)(n.A,{variant:"secondary-emphasis",...i,children:e})},778270(e,i,t){t.d(i,{A:()=>_});var s=t(274934),n=t(602086),r=t(977872),l=t(590979),a=t(449339),o=t(205521),c=t(831433),d=t(223597),m=t(347625),u=t(698950),A=t(785068);const x=({uplinkDevice:e,client:i,maxWidth:t})=>{const d=(0,r.wA)(),x=(0,m.Q)(e),_=(0,c.f2)(i,e),h=(0,n.useCallback)(()=>{d((0,o.XP)({type:a.H.DEVICE,id:e?.mac}))},[d,e?.mac]);return x?(0,s.jsx)(u.A,{messageId:"COMMON_CONNECTED_TO",buttonEl:(0,s.jsx)(A.A,{...l.A.addDataTestId(l.A.TestId.SIDE_PANEL_TRIGGER),onClick:h,name:x,port:_,size:"medium",maxWidth:t||195,separatePortNumber:!0,isFullWidth:!0})}):null},_=({uplinkDevice:e,client:i,maxWidth:t})=>i.status===d.S2.ONLINE?(0,s.jsx)(x,{uplinkDevice:e,client:i,maxWidth:t}):null},250266(e,i,t){t.d(i,{A:()=>d});var s=t(274934),n=t(602086),r=t(696264),l=t(409844),a=t(521376),o=t(309130),c=t(470070);const d=({children:e=null,title:i,titleValues:t,message:d,messageValues:m,handleConfirm:u=()=>null,handleClose:A=()=>null,handleCancel:x,isOpen:_,buttonVariant:h="primary",cancelButtonVariant:p="tertiary",cancelButtonMessage:j="COMMON_ACTION_CANCEL",buttonMessage:E="COMMON_ACTION_CONFIRM",buttonDisabled:O=!1,position:I="top",offset:C,showHeaderClose:N=!1,contentClassName:M="",body:g,titleBody:v,className:k,rootClose:T=!1,footerActions:f})=>{const R=(0,n.useCallback)(e=>{_&&(e.stopPropagation(),e.key===a.U.ENTER?u():e.key===a.U.ESCAPE&&A(!1))},[_,u,A]);(0,n.useEffect)(()=>(window.addEventListener("keydown",R,!0),()=>{window.removeEventListener("keydown",R,!0)}),[R]);const L=(0,n.useCallback)(()=>{A(!1),x?.()},[A,x]),P=(0,n.useCallback)(()=>{A(!1),u()},[A,u]),w=(0,n.useMemo)(()=>[{text:(0,s.jsx)(c.sA,{id:j}),variant:p,onClick:L},{text:(0,s.jsx)(c.sA,{id:E}),disabled:O,variant:h,onClick:P}],[E,h,j,p,L,P,O]),y=(0,n.useCallback)(()=>{A(!1)},[A]),b=l.AH`
    ${i?"":`margin-top: ${o.xO}`}
  `;return(0,s.jsx)(r.A,{title:i?(0,s.jsx)(c.sA,{id:i,values:t}):v||null,...d?{body:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.sA,{id:d,values:m}),g]})}:{body:g},position:I,portal:!0,offset:C,actions:f||w,showHeaderClose:N,contentClassName:l.AH`
        ${b}
        ${M}
      `,onRequestClose:y,isOpen:_,allowOverflow:!0,rootClose:T,className:k,children:e})}},174710(e,i,t){t.d(i,{A:()=>l});var s=t(274934),n=t(304151),r=t(158498);const l=function({items:e,getItemKey:i,renderItem:t,maxItemCount:l,renderShowMore:a,showListMarkers:o,title:c,position:d,isInteractive:m,cursorType:u,listGap:A,iconProps:x}){return(0,s.jsx)(n.A,{title:c,position:d,isInteractive:m,cursorType:u,description:(0,s.jsx)(r.A,{items:e,getItemKey:i,renderItem:t,maxItemCount:l,listGap:A,renderShowMore:a,showListMarkers:o}),iconProps:x})}},986993(e,i,t){t.d(i,{A:()=>c});var s=t(274934),n=t(95032),r=t(470070),l=t(421314),a=t(300626),o=t(174710);const c=function({items:e,renderMultipleItemsSummary:i,renderListItem:t,renderNoItems:c,getItemKey:d,enabled:m=!0,showListMarkers:u,cursorType:A,isInteractive:x}){const _=m?"inherit":"disabled";return e.length>1?(0,s.jsx)(a.A,{tooltip:(0,s.jsx)(o.A,{items:e,getItemKey:d,renderItem:t,showListMarkers:u,isInteractive:x,cursorType:A}),children:(0,s.jsx)(l.A,{color:_,cursorType:A,children:i(e)})}):1===e.length?(0,s.jsx)(l.A,{color:_,cursorType:A,children:t(e[0])}):c?(0,s.jsx)(s.Fragment,{children:c()}):(0,s.jsx)(n.A,{isTruncated:!0,color:_,children:(0,s.jsx)(r.sA,{id:"COMMON_FALLBACK"})})}},300626(e,i,t){t.d(i,{A:()=>l});var s=t(274934),n=t(309130),r=t(100978);const l=({children:e,tooltip:i})=>(0,s.jsxs)(r.A,{maxWidth:"100%",overflow:"hidden",gap:n.YC,alignItems:"center",children:[e?(0,s.jsx)(r.A,{flex:1,overflow:"hidden",children:e}):null,i]})},620404(e,i,t){t.d(i,{v:()=>B,A:()=>X});var s=t(274934),n=t(602086),r=t(977872),l=t(843871),a=t(43009),o=t(335220),c=t(938984),d=t(95032),m=t(241365),u=t(832162),A=t(343954),x=t(247816),_=t(415537),h=t(59612),p=t(331472),j=t(347625),E=t(237887),O=t(565527),I=t(309130),C=t(222102),N=t(917190),M=t(396489),g=t.n(M),v=t(430328),k=t(754924);const T=["satisfaction"];var f=t(100978),R=t(974390),L=t(650632),P=t(470070),w=t(891642),y=t(831433),b=t(726831);const S=(0,x.A)(c.A)`
  margin-top: ${I.Ln};
  line-height: 20px;
`,D=(0,x.A)(f.A)`
  background: ${({theme:e})=>m.Ay[e.themeName===O.S.DARK?"grey-1":"white-10"]};
  border-radius: 8px;
  padding: ${I.kc};
`,z=(0,x.A)(c.A)`
  margin-left: ${I.YC};
`,W=(0,x.A)(L.A)`
  vertical-align: middle;
  width: 40px;
  height: 40px;
`,F=(0,x.A)(R.A)`
  vertical-align: middle;
`,$=(0,x.A)(f.A)`
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding-bottom: ${({theme:{spacing:e}})=>e["spacing-s"]};
`,U=(0,x.A)(E.A)`
  margin-top: ${I.Ln};
`,V=(0,x.A)(o.A)`
  margin-top: ${I.Ln};
`;var B;!function(e){e.UNIFI_CLIENT="unifiClient",e.CLIENT="client",e.AP="ap"}(B||(B={}));const H=(e,i)=>{switch(e){case B.CLIENT:case B.UNIFI_CLIENT:return(0,y.tn)(i);case B.AP:return(0,j.Q)(i);default:return null}},G=(e,i)=>{switch(e){case B.CLIENT:case B.UNIFI_CLIENT:return(0,s.jsx)(W,{client:i,alt:H(e,i)});case B.AP:return(0,s.jsx)(F,{model:i.model});default:return null}},K=({isSuccess:e,isError:i})=>e?(0,s.jsxs)(f.A,{gap:I.YC,alignItems:"center",justifyContent:"center",marginBottom:I.Ln,children:[(0,s.jsx)(A.A,{size:"original",variant:"fill",color:m.Ay["color-success"]}),(0,s.jsx)(c.A,{size:"medium",children:(0,s.jsx)(P.sA,{id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_SUBMIT_SUCCESS"})})]}):i?(0,s.jsxs)(f.A,{gap:I.YC,alignItems:"center",justifyContent:"center",marginBottom:I.Ln,children:[(0,s.jsx)(A.A,{size:"original",variant:"fill",color:m.Ay["color-danger"]}),(0,s.jsx)(c.A,{size:"medium",children:(0,s.jsx)(P.sA,{id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_SUBMIT_ERROR"})})]}):null,X=({item:e,experienceGraphType:i,hideModal:t})=>{const{formatMessage:o}=(0,P.tz)(),{motif:m}=(0,a.A)(),{dirty:A,errors:x,isSubmitting:j,handleSubmit:E,setFieldValue:O,status:M={},values:R}=(0,l.j7)(),{isSuccess:L,isError:W}=M,F=w.D.map(({value:e,label:i})=>({value:e,label:o({id:i})})),B=(0,n.useCallback)((e,i)=>{O("reason",i)},[O]),X=(0,n.useCallback)((e,i)=>{O(e.target.name,i)},[O]),Y=(0,n.useCallback)(e=>{E?.(e)},[E]),Q="uplink_mac"in e&&e.uplink_mac,Z="sw_port"in e&&e.sw_port,q=(0,n.useMemo)(()=>{return Q&&Z?(e=Q,i=Z,(0,v.WY)((e,i)=>g()((0,N.A)(e,T),(0,N.A)(i,T)))((0,C.Mz)((0,k.bw)(e,["port_table"]),e=>e?.port_table?.[i]||{}),e=>e)):()=>{};var e,i},[Q,Z]),J=(0,r.d4)(q),ee=(0,n.useMemo)(()=>{const{satisfaction:i}="type"in e?(0,y.FX)(J,e.type,"wifi_experience_score"in e?e.wifi_experience_score:void 0):e;return i},[e,J]);return(0,s.jsxs)(u.A,{isOpen:!0,onRequestClose:t,title:(0,s.jsx)(P.sA,{id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_HEADER"}),size:"small",actions:L||W?[]:[{text:(0,s.jsx)(P.sA,{id:"COMMON_ACTION_CANCEL"}),onClick:t},{text:(0,s.jsx)(P.sA,{id:"COMMON_ACTION_SUBMIT"}),variant:"primary",onClick:Y,disabled:!A||j,loader:j?"spinner":null}],...L||W?{footer:(0,s.jsx)(K,{isSuccess:L,isError:W})}:{},children:[(0,s.jsx)("iframe",{title:"unifi-experts-corner",width:"100%",height:"200",src:b.A.wifiPerformanceTipsVideo,frameBorder:"0"}),(0,s.jsx)(S,{color:"text-3",size:"medium",children:(0,s.jsx)(P.sA,{id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_SUBTITLE"})}),(0,s.jsxs)(D,{marginTop:I.Ln,gap:I.kc,children:[(0,s.jsx)(f.A,{justifyContent:"center",alignItems:"center",flexShrink:0,flexGrow:0,children:G(i,e)}),(0,s.jsxs)(f.A,{flexDirection:"column",overflow:"hidden",children:[(0,s.jsx)(d.A,{size:"medium",isTruncated:!0,children:(0,_.c)(H(i,e),30)}),ee&&-1!==ee?(0,s.jsxs)(c.A,{size:"medium",children:[(0,s.jsx)(P.sA,{id:"COMMON_WIFI_EXP"}),":",(0,s.jsx)(z,{weight:"bold",size:"medium",style:{color:(0,h.L)(ee,m)},children:(0,s.jsx)(P.sA,{id:(0,p.gd)(ee)})})]}):null]})]}),(0,s.jsxs)($,{children:[(0,s.jsx)(U,{width:"100%",placeholder:o({id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_PROBLEM_LABEL"}),options:F,variant:"secondary",onChange:B,value:R.reason}),(0,s.jsx)(V,{variant:"secondary",name:"comment",height:80,maxHeight:200,maxWidth:"100%",minWidth:349,full:!0,value:R.comment,onChange:X,placeholder:o({id:"COMMON_REPORT_WIFI_EXPERIENCE_MODAL_COMMENT_LABEL"}),invalid:x&&x.comment})]})]})}},748094(e,i,t){t.d(i,{A:()=>h});var s=t(274934),n=t(814557),r=t(602086),l=t(599110),a=t(938984),o=t(853777),c=t(600191),d=t(847399),m=t(263705),u=t(613842),A=t(470070),x=t(620627),_=t(100978);const h=(0,r.memo)(({children:e,customIcon:i,link:t,nested:h,extra:p,variant:j="warning",...E})=>{const{themeName:O}=(0,m.u)(),I=(0,r.useMemo)(()=>{switch(j){case"warning":return(0,s.jsx)(c.A,{size:"original",color:n.Ay[`desktop-color-orange-06-${O}`],variant:"fill"});case"info":return(0,s.jsx)(o.A,{isActive:!0,size:"original",variant:"fill"});case"custom":return i;default:return(0,s.jsx)(d.A,{size:"medium",color:n.Ay[`desktop-color-red-06-${O}`],variant:"fill"})}},[j,O,i]),C=(0,r.useCallback)(()=>{u.A.open(t)},[t]);return(0,s.jsx)(x.A,{icon:I,nested:h,...E,children:(0,s.jsxs)(_.A,{flexDirection:"column",alignItems:"flex-start",children:[(0,s.jsx)(a.A,{children:e}),(0,s.jsx)(a.A,{children:t?(0,s.jsx)(l.A,{type:"button",variant:"inline",onClick:C,children:(0,s.jsx)(A.sA,{id:"COMMON_LEARN_MORE"})}):null}),p]})})})},356235(e,i,t){t.d(i,{A:()=>a});var s=t(274934),n=t(602086),r=t(599110),l=t(850352);const a=({mac:e,port:i,children:t})=>{const{handleGoToPortsPage:a}=(0,l.e)(),o=(0,n.useCallback)(t=>{t.stopPropagation(),a(e,+i)},[a,e,i]);return(0,s.jsx)(r.A,{type:"button",size:"inherit",variant:"inline",onClick:o,children:t})}},199133(e,i,t){t.d(i,{x:()=>n});var s=t(274934);const n=({mac:e,detailedStates:i,uplinkDisplayName:t,portNumber:n,uplinkMac:r,PortPowerLimitExceededWarning:l,UplinkNearPowerLimitWarning:a,DeviceNearPowerLimitWarning:o=null})=>{switch(!0){case i.port_power_limit_exceeded:return(0,s.jsx)(l,{uplinkDisplayName:t,portNumber:n,uplinkMac:r});case i.uplink_near_power_limit:return(0,s.jsx)(a,{uplinkMac:r,uplinkDisplayName:t});case i.device_near_power_limit:return o?(0,s.jsx)(o,{mac:e}):null;default:return null}}},734983(e,i,t){t.d(i,{A:()=>a});var s=t(274934),n=t(415537),r=t(470070),l=t(356235);const a=({uplinkMac:e,portNumber:i,uplinkDisplayName:t})=>(0,s.jsx)(r.sA,{id:"DEVICE_POE_PORT_OUT_OF_POWER",values:{portName:(0,s.jsx)(l.A,{mac:e,port:i,children:`${(0,n.c)(t)} ${(0,r.tz)().formatMessage({id:"COMMON_PORT"})} ${i}`})}})},906701(e,i,t){t.d(i,{A:()=>h});var s=t(274934),n=t(602086),r=t(840704),l=t(938984),a=t(640708),o=t(195689),c=t(470070),d=t(421314),m=t(986993),u=t(100978);const A=({ipv6:e,size:i="inherit",color:t="inherit"})=>{const n=e?.[0];return n?(0,s.jsxs)(u.A,{width:"100%",justifyContent:"flex-end",children:[(0,s.jsx)(d.A,{flexProps:{justifyContent:"flex-end",alignItems:"center"},color:t,size:i,children:n}),e?.length>1?(0,s.jsx)(m.A,{items:e,isInteractive:!0,showListMarkers:!1,getItemKey:e=>e,renderListItem:e=>(0,s.jsx)(s.Fragment,{children:e}),renderMultipleItemsSummary:()=>null}):null]}):(0,s.jsx)(l.A,{size:i,color:t,children:(0,s.jsx)(c.sA,{id:"COMMON_FALLBACK"})})};var x=t(635187),_=t(664092);const h=(0,n.memo)(({ipv6_address:e=[],wan_dhcpv6_pd_size:i})=>{const{globalAddresses:t,linkLocalAddress:d}=(0,n.useMemo)(()=>{const i=[];let t=null;for(let s=0;s<e.length;s+=1){const n=e[s];new r.Address6(n).isLinkLocal()?t=n?.split(x.Ed)?.[0]:i.push(n.split(x.Ed)?.[0])}return{globalAddresses:i,linkLocalAddress:t}},[e]);return t.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(_.A,{children:[(0,s.jsx)(l.A,{color:"text-2",size:"medium",children:(0,s.jsx)(c.sA,{id:"COMMON_IPV6_ADDRESS"})}),(0,s.jsx)(o.A,{ipv6:t,size:"medium",color:"text-3"})]}),i?(0,s.jsxs)(_.A,{children:[(0,s.jsx)(l.A,{color:"text-2",size:"medium",children:(0,s.jsx)(c.sA,{id:"COMMON_IPV6_PREFIX"})}),(0,s.jsx)(u.A,{flex:"1",minWidth:"0",justifyContent:"flex-end",children:(0,s.jsx)(A,{ipv6:[`${(0,a.Gh)(t[0],i)}/${i}`],color:"text-3",size:"medium"})})]}):null,d?(0,s.jsxs)(_.A,{children:[(0,s.jsx)(l.A,{color:"text-2",size:"medium",children:(0,s.jsx)(c.sA,{id:"COMMON_IPV6_LINK_LOCAL"})}),(0,s.jsx)(o.A,{ipv6:[d],size:"medium",color:"text-3"})]}):null]}):null})},698950(e,i,t){t.d(i,{A:()=>x});var s=t(274934),n=t(247816),r=t(409844),l=t(291508),a=t(470070),o=t(309130),c=t(100978),d=t(537417);const m=(0,n.A)(c.A,(0,l.A)("alignLeft"))`
  ${({alignLeft:e})=>e?"max-width: 288px;":"max-width: 100%; justify-content: center;"}
  gap: ${o.YC};
  align-items: center;
`,u=r.AH`
  max-width: 50%;
`,A=r.AH`
  flex: 0 1 auto;
  min-width: 0;
`,x=({messageId:e,messageValues:i,buttonEl:t,alignLeft:n=!0,color:r="text-3",variant:l="body-primary"})=>(0,s.jsxs)(m,{alignLeft:n,children:[(0,s.jsx)(d.A,{variant:l,color:r,children:i?(0,s.jsx)(c.A,{maxWidth:288,whiteSpace:"nowrap",paddingRight:o.YC,children:(0,s.jsx)(a.sA,{id:e,values:i})}):(0,s.jsx)(a.sA,{id:e})}),t?(0,s.jsx)(c.A,{className:n?A:u,children:t}):null]})},488287(e,i,t){t.d(i,{A:()=>E});var s=t(274934),n=t(977872),r=t(602086),l=t(938984),a=t(590979),o=t(898809),c=t(309130),d=t(100978),m=t(449339),u=t(785068),A=t(205521),x=t(470070),_=t(754924),h=t(119425),p=t(698950),j=t(208583);const E=({last_uplink_mac:e,last_uplink_name:i,last_uplink_remote_port:t,disconnected_at:E,disabled:O,separatePortNumber:I,maxWidth:C})=>{const{formatMessage:N}=(0,x.tz)(),M=(0,n.wA)(),g=(0,n.d4)(_.CC),v=(0,j.Z)(e,g),k=(0,j.z)(i,t,v,N,I),T=(0,r.useCallback)(()=>{O||M((0,A.XP)({type:m.H.DEVICE,id:e}))},[O,M,e]);return(0,s.jsxs)(s.Fragment,{children:[v?(0,s.jsx)(p.A,{messageId:"COMMON_DEVICE_LAST_CONNECTED_TO",messageValues:{deviceWithPort:(0,s.jsx)(d.A,{width:"100%",overflow:"hidden",paddingLeft:c.YC,children:(0,s.jsx)(u.A,{onClick:T,disabled:O,...a.A.addDataTestId(a.A.TestId.SIDE_PANEL_TRIGGER),name:k,port:t,separatePortNumber:I,maxWidth:C})})}}):null,E?(0,s.jsx)("div",{children:(0,s.jsx)(l.A,{color:"text-3",children:(0,s.jsx)(h.A,{date:(0,o.gH)(E)})})}):null]})}},208583(e,i,t){t.d(i,{Z:()=>n,z:()=>r});var s=t(347625);const n=(e,i)=>e?i.find(({mac:i})=>i===e):void 0,r=(e,i,t,n,r)=>{const l=!r&&i?` ${n({id:"DEVICE_PROPERTIES_PORT_WITH_NUMBER"},{port:i})}`:"";return e?`${e}${l}`:t?`${(0,s.Q)(t)}${l}`:n({id:"COMMON_FALLBACK"})}},275247(e,i,t){t.d(i,{A:()=>o});var s=t(274934),n=t(938984),r=t(320509),l=t(470070),a=t(664092);const o=({rx_rate:e})=>e>0?(0,s.jsxs)(a.A,{children:[(0,s.jsx)(n.A,{color:"text-2",size:"medium",children:(0,s.jsx)(l.sA,{id:"COMMON_RX_RATE"})}),(0,s.jsx)(n.A,{color:"text-3",size:"medium",children:(0,r.Up)(e)})]}):null},206945(e,i,t){t.d(i,{A:()=>o});var s=t(274934),n=t(938984),r=t(320509),l=t(470070),a=t(664092);const o=({tx_rate:e})=>e>0?(0,s.jsxs)(a.A,{children:[(0,s.jsx)(n.A,{color:"text-2",size:"medium",children:(0,s.jsx)(l.sA,{id:"COMMON_TX_RATE"})}),(0,s.jsx)(n.A,{color:"text-3",size:"medium",children:(0,r.Up)(e)})]}):null},664092(e,i,t){t.d(i,{A:()=>c});var s=t(274934),n=t(247816),r=t(309130),l=t(100978),a=t(291508);const o=(0,n.A)(l.A,(0,a.A)("valueMaxWidth","keyMinWidth","compact"))`
  &:not(:last-child) {
    ${({compact:e})=>e?"":`margin-bottom: ${r.kc};`}
  }
  & > {
    &:nth-child(1) {
      min-width: ${({keyMinWidth:e})=>e}px;
    }
    &:nth-child(2) {
      max-width: ${({valueMaxWidth:e})=>e}px;
    }
  }
`,c=({children:e,valueMaxWidth:i=215,keyMinWidth:t=0,flexProps:n={},compact:l=!1})=>(0,s.jsx)(o,{width:"100%",justifyContent:"space-between",gap:r.kc,height:l?void 0:24,valueMaxWidth:i,keyMinWidth:t,compact:l,...n,children:e})},830257(e,i,t){t.d(i,{B:()=>f,i:()=>k});var s=t(274934),n=t(814557),r=t(977872),l=t(602086),a=t(600191),o=t(263705),c=t(101347),d=t(347625),m=t(734983),u=t(199133),A=t(620627),x=t(754924),_=t(247816),h=t(415537),p=t(309130),j=t(100978),E=t(353704),O=t(470070);const I=(0,_.A)("div")`
  margin-bottom: ${p.kc};
`,C=({uplinkMac:e,uplinkDisplayName:i})=>(0,s.jsxs)(j.A,{flexDirection:"column",alignItems:"flex-start",children:[(0,s.jsx)(I,{children:(0,s.jsx)(O.sA,{id:"DEVICE_POE_ALMOST_OUT_OF_POWER",values:{deviceName:(0,s.jsx)(E.A,{mac:e,children:(0,h.c)(i)})}})}),(0,s.jsx)(E.A,{mac:e,children:(0,s.jsx)(O.sA,{id:"DEVICE_POE_VIEW_DETAILS"})})]}),N=({children:e})=>(0,s.jsx)(A.A,{icon:(0,s.jsx)(a.A,{size:"original",color:n.Ay[`desktop-color-orange-06-${(0,o.u)().themeName}`],variant:"fill"}),children:e}),M=e=>(0,s.jsx)(N,{children:(0,s.jsx)(m.A,{...e})}),g=e=>(0,s.jsx)(N,{children:(0,s.jsx)(C,{...e})}),v=({uplink:e,mac:i,detailed_states:t})=>{const n=(0,r.d4)((0,l.useMemo)(()=>(0,x.tG)(e.uplink_mac),[e.uplink_mac]));return(0,s.jsx)(u.x,{mac:i,uplinkMac:n.mac,uplinkDisplayName:(0,d.Q)(n),portNumber:e.uplink_remote_port,detailedStates:t,PortPowerLimitExceededWarning:M,UplinkNearPowerLimitWarning:g})},k=({uplink:e,mac:i,detailed_states:t})=>(0,c.w)(t)?(0,s.jsx)(v,{uplink:e,mac:i,detailed_states:t}):null,T=({uplinkMac:e,...i})=>{const t=(0,r.d4)((0,l.useMemo)(()=>(0,x.tG)(e),[e]));return(0,s.jsx)(u.x,{...i,uplinkMac:e,uplinkDisplayName:(0,d.Q)(t),PortPowerLimitExceededWarning:M,UplinkNearPowerLimitWarning:g})},f=({detailedStates:e,...i})=>(0,c.w)(e)?(0,s.jsx)(T,{detailedStates:e,...i}):null},856932(e,i,t){t.r(i),t.d(i,{default:()=>de});var s=t(274934),n=t(223597),r=t(830257),l=t(660366),a=t(977872),o=t(602086),c=t(135469),d=t(938984),m=t(409844),u=t(271656),A=t(309130),x=t(100978),_=t(778270),h=t(650632),p=t(754924),j=t(34118),E=t(95032),O=t(247816),I=t(648175),C=t(470070),N=t(604715),M=t(633905),g=t(976458);const v=(0,O.A)(x.A)`
  > div {
    align-items: center;
    &:first-child {
      flex: 1;
    }
  }
`,k=({activeItem:e})=>{const{formatMessage:i}=(0,C.tz)(),t=(0,a.d4)(g.TP),{Icon:n,redirectCallback:r,id:l}=(0,o.useMemo)(()=>({Icon:M.m8[e.product_line],redirectCallback:M.VF[e.product_line],id:M.dn[e.product_line]}),[e.product_line]);return Boolean(e.product_line)&&e.product_line!==N.p1.NETWORK?(0,s.jsx)(v,{gap:A.kc,children:e.unifi_device_info?.view_in_application&&r?(0,s.jsxs)(I.A,{width:"full",onClick:()=>{window.location.href=t.replace("network",r(e.mac)).replace(/\/$/,"")},children:[(0,s.jsx)(n,{width:20,height:20,variant:"flat"}),(0,s.jsx)(E.A,{isTruncated:!0,variant:"inherit",children:(0,s.jsx)(C.sA,{id:"UNIFI_DEVICE_CLIENT_LABEL_VIEW_IN",values:{application:i({id:l})}})})]}):null}):null};var T=t(488287),f=t(898826),R=t(876940),L=t(590979),P=t(669439),w=t(815436),y=t(869332),b=t(620404);const S=({activeItem:e})=>{const i=(0,a.wA)(),t=(0,o.useCallback)(()=>{i((0,y.to)({modalType:w.A.REPORT_WIFI_EXPERIENCE,modalProps:{item:e,experienceGraphType:b.v.UNIFI_CLIENT}}))},[e,i]);return e.status===n.S2.ONLINE&&e.type===n.sK.WIRELESS?(0,s.jsx)(x.A,{alignItems:"center",width:A.ED,children:(0,s.jsx)(P.A,{description:(0,s.jsx)(C.sA,{id:"COMMON_REPORT_AN_ISSUE"}),children:(0,s.jsx)(f.A,{variant:"tertiary-neutral",size:"small",onPress:t,...L.A.addDataTestId(L.A.TestId.MODAL_TRIGGER),children:(0,s.jsx)(R.A,{size:"logo",isActive:!0})})})}):null},D=m.AH`
  margin-bottom: ${A.Ln};
  margin-top: ${A.Ln};
`,z=({activeItem:e})=>{const i=(0,a.d4)((0,o.useMemo)(()=>(0,j.OF)(e.fingerprint),[e.fingerprint])),t=(0,a.d4)((0,o.useMemo)(()=>e.uplink_mac?(0,p.bw)(e.uplink_mac,["type","name","model","mac"]):u.A,[e.uplink_mac])),r=(0,o.useMemo)(()=>e.status===n.S2.ONLINE&&e.type===n.sK.WIRELESS?160:void 0,[e.status,e.type]);return(0,s.jsx)(c.A,{className:D,sections:[(0,s.jsxs)(x.A,{flexDirection:"column",gap:A.kc,children:[(0,s.jsxs)(x.A,{gap:A.kc,children:[(0,s.jsx)(h.A,{client:e,grid:!0,width:40,height:40}),(0,s.jsxs)(x.A,{flex:1,flexDirection:"column",children:[(0,s.jsx)("div",{children:(0,s.jsx)(d.A,{color:e.status===n.S2.ONLINE?"text-1":"text-3",weight:"bold",children:e.display_name||e.name||i?.fingerprint_device_name})}),(0,s.jsx)(x.A,{flexDirection:"column",justifyContent:"center",flex:1,children:e.status===n.S2.ONLINE?(0,s.jsx)(_.A,{client:e,uplinkDevice:t,maxWidth:r}):e.last_seen?(0,s.jsx)(T.A,{last_uplink_mac:e.last_uplink?.uplink_mac,last_uplink_name:e.last_uplink?.uplink_device_name,last_uplink_remote_port:e.last_uplink?.uplink_remote_port,disconnected_at:e.last_seen,disabled:e.disabled,separatePortNumber:!0,maxWidth:180}):null})]}),(0,s.jsx)(S,{activeItem:e})]}),(0,s.jsx)(k,{activeItem:e})]})]})};var W=t(878151),F=t(293668),$=t(331472),U=t(906701),V=t(535322),B=t(54052),H=t(831433),G=t(206945),K=t(275247),X=t(664092);const Y=({activeItem:e})=>{const{formatMessage:i}=(0,C.tz)(),t=(0,a.d4)((0,o.useMemo)(()=>(0,j.OF)(e.fingerprint),[e.fingerprint]));return(0,s.jsxs)(V.A,{children:[e.network_name?(0,s.jsxs)(X.A,{children:[(0,s.jsx)(d.A,{color:"text-2",size:"medium",children:(0,s.jsx)(C.sA,{id:"COMMON_NETWORK"})}),(0,s.jsx)(d.A,{color:"text-3",size:"medium",children:e.network_name})]}):null,e.type===n.sK.WIRELESS&&e.essid?(0,s.jsxs)(X.A,{children:[(0,s.jsx)(d.A,{color:"text-2",size:"medium",children:(0,s.jsx)(C.sA,{id:"COMMON_WIFI_NAME"})}),(0,s.jsx)(d.A,{color:"text-3",size:"medium",children:e.essid})]}):null,e.type===n.sK.WIRELESS&&(e.radio||e.channel||e.channel_width)?(0,s.jsxs)(X.A,{children:[(0,s.jsx)(d.A,{color:"text-2",size:"medium",children:(0,s.jsx)(C.sA,{id:"COMMON_CHANNEL"})}),(0,s.jsxs)(d.A,{color:"text-3",size:"medium",children:[e.channel,e.radio||e.channel_width?` (${[e.radio?i({id:(0,F.dI)(e.radio)}):null,e.channel_width?`${e.channel_width} ${i({id:"COMMON_UNIT_MHZ"})}`:null].filter(Boolean).join(", ")})`:null]})]}):null,(0,s.jsx)(B.A,{mac:e.mac,props:["signal"],children:({signal:e=null})=>e?(0,s.jsxs)(X.A,{children:[(0,s.jsx)(d.A,{color:"text-2",size:"medium",children:(0,s.jsx)(C.sA,{id:"COMMON_SIGNAL"})}),(0,s.jsx)(x.A,{alignItems:"center",children:(0,s.jsxs)(d.A,{size:"medium",color:(0,$.b5)(e),children:[e," ",(0,s.jsx)(C.sA,{id:"COMMON_UNIT_DBM"})]})})]}):null}),e.type===n.sK.WIRELESS&&Number.isInteger(e.rate_imbalance)?(0,s.jsxs)(X.A,{children:[(0,s.jsx)(d.A,{color:"text-2",size:"medium",children:(0,s.jsx)(C.sA,{id:"CLIENTS_HEADER_AP_SIGNAL_BALANCE"})}),(0,s.jsx)(d.A,{color:"text-3",size:"medium",children:(0,s.jsx)(C.sA,{id:Math.abs(e.rate_imbalance??0)<=40?"COMMON_GOOD":"COMMON_POOR"})})]}):null,e.type===n.sK.WIRELESS&&e.radio_proto?(0,s.jsxs)(X.A,{children:[(0,s.jsx)(d.A,{color:"text-2",size:"medium",children:(0,s.jsx)(C.sA,{id:"COMMON_STANDARD"})}),(0,s.jsx)(d.A,{color:"text-3",size:"medium",children:(0,H.z0)(e.radio_proto)})]}):null,e.type===n.sK.WIRELESS&&e.mimo?(0,s.jsxs)(X.A,{children:[(0,s.jsxs)(d.A,{color:"text-2",size:"medium",children:[(0,s.jsx)(C.sA,{id:"COMMON_MIMO"})," ",(0,s.jsx)(C.sA,{id:"COMMON_CONFIGURATION"})]}),(0,s.jsx)(d.A,{color:"text-3",size:"medium",children:(0,H.iP)(e.mimo)})]}):null,(0,s.jsx)(B.A,{mac:e.mac,props:["tx_rate"],children:({tx_rate:e=0})=>(0,s.jsx)(G.A,{tx_rate:e})}),(0,s.jsx)(B.A,{mac:e.mac,props:["rx_rate"],children:({rx_rate:e=0})=>(0,s.jsx)(K.A,{rx_rate:e})}),e.ip?(0,s.jsxs)(X.A,{children:[(0,s.jsx)(d.A,{color:"text-2",size:"medium",children:(0,s.jsx)(C.sA,{id:"COMMON_IP_ADDRESS"})}),(0,s.jsx)(d.A,{color:"text-3",size:"medium",children:e.ip})]}):null,(0,s.jsx)(U.A,{ipv6_address:e.ipv6_address}),e.mac?(0,s.jsxs)(X.A,{children:[(0,s.jsx)(d.A,{color:"text-2",size:"medium",children:(0,s.jsx)(C.sA,{id:"COMMON_MAC_ADDRESS"})}),(0,s.jsx)(d.A,{color:"text-3",size:"medium",children:e.mac})]}):null,t?.fingerprint_device_name?(0,s.jsxs)(X.A,{children:[(0,s.jsx)(d.A,{color:"text-2",size:"medium",children:(0,s.jsx)(C.sA,{id:"COMMON_MODEL"})}),(0,s.jsx)(E.A,{style:{maxWidth:"250px"},color:"text-3",size:"medium",isTruncated:!0,children:t.fingerprint_device_name})]}):null,t?.fingerprint_device_os?(0,s.jsxs)(X.A,{children:[(0,s.jsx)(d.A,{color:"text-2",size:"medium",children:(0,s.jsx)(C.sA,{id:"CLIENTS_HEADER_OS"})}),(0,s.jsx)(E.A,{color:"text-3",size:"medium",isTruncated:!0,children:t.fingerprint_device_os})]}):null,(0,s.jsx)(B.A,{mac:e.mac,props:["tx_packets","tx_bytes"],children:({tx_packets:e=0,tx_bytes:i=0})=>e&&i?(0,s.jsxs)(X.A,{children:[(0,s.jsx)(d.A,{color:"text-2",size:"medium",children:(0,s.jsx)(C.sA,{id:"COMMON_ACTIVITY_DOWN_PKTS_BYTES"})}),(0,s.jsxs)(d.A,{color:"text-3",size:"medium",children:[e," / ",(0,s.jsx)(W.A,{type:"bytes",size:"body",input:i,color:"tertiary"})]})]}):null}),(0,s.jsx)(B.A,{mac:e.mac,props:["rx_packets","rx_bytes"],children:({rx_packets:e=0,rx_bytes:i=0})=>e&&i?(0,s.jsxs)(X.A,{children:[(0,s.jsx)(d.A,{color:"text-2",size:"medium",children:(0,s.jsx)(C.sA,{id:"COMMON_ACTIVITY_UP_PKTS_BYTES"})}),(0,s.jsxs)(d.A,{color:"text-3",size:"medium",children:[e," / ",(0,s.jsx)(W.A,{type:"bytes",size:"body",input:i,color:"tertiary"})]})]}):null})]})};var Q=t(814557),Z=t(954702),q=t(960105),J=t(263705),ee=t(347625),ie=t(29472),te=t(159469),se=t(748094),ne=t(250266),re=t(700444),le=t(664102),ae=t(193730);const oe=({uplink_remote_port:e,name:i,mac:t,model:n,ups_device:r})=>{const l=(0,a.wA)(),[c,d]=(0,o.useState)(!1),m=(0,o.useCallback)(()=>{l((0,ie.Xj)(ae.A.OUTLET_CTL,le.CMD_PATH,{mac:r.mac,outlet_table:[{index:e}]})).catch(({msg:e})=>{l((0,re.ox)({icon:te.C.danger,message:e||"COMMON_NOTICE_REQUEST_ERROR"}))})},[l,r.mac,e]),u=(0,o.useCallback)(()=>{d(!1)},[]),A=(0,o.useCallback)(()=>{d(!0)},[]),x=(0,o.useMemo)(()=>(0,ee.Q)({name:i,mac:t,model:n}),[i,n,t]),_=(0,a.d4)((0,o.useMemo)(()=>(0,p.uC)(r.mac),[r.mac]));return(0,s.jsx)(se.A,{variant:"custom",customIcon:(0,s.jsx)(q.A,{color:Q.Ay[`desktop-color-aqua-06-${(0,J.u)().themeName}`],variant:"fill",size:"original"}),children:(0,s.jsx)(C.sA,{id:_?"DEVICE_SAFE_SHUTDOWN_PAIRING_NOTIFICATION_ON_BATTERY_POWER":"DEVICE_SAFE_SHUTDOWN_PAIRING_NOTIFICATION_ON_AC_POWER",values:{deviceName:x,action:(0,s.jsx)(ne.A,{title:"DEVICE_SAFE_SHUTDOWN_PAIRING_NOTIFICATION_TITLE",titleValues:{deviceName:x},message:"DEVICE_SAFE_SHUTDOWN_PAIRING_NOTIFICATION_MESSAGE",handleClose:u,handleConfirm:m,buttonVariant:"danger",buttonMessage:"COMMON_ACTION_PROCEED",isOpen:c,children:(0,s.jsx)(Z.A,{type:"button",fontSize:"medium",onPress:A,children:(0,s.jsx)(C.sA,{id:"COMMON_CLICK_HERE"})})})}})})},ce=(0,o.memo)(({uplink_remote_port:e,name:i,mac:t,model:n,ups_device:r,graceful_shutdown_triggered_at:l})=>l&&e&&r&&Object.keys(r).length?(0,s.jsx)(oe,{uplink_remote_port:e,name:i,mac:t,model:n,ups_device:r,graceful_shutdown_triggered_at:l}):null),de=({activeItem:e})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(z,{activeItem:e}),(0,s.jsx)(ce,{name:e.name,mac:e.mac,model:e.model,graceful_shutdown_triggered_at:e.graceful_shutdown_triggered_at,ups_device:e.ups_device,uplink_remote_port:e.last_uplink?.uplink_remote_port}),e.type===n.sK.WIRED&&e.detailed_states?(0,s.jsx)(r.B,{mac:e.mac,uplinkMac:e.uplink_mac,portNumber:e.sw_port,detailedStates:e.detailed_states}):null,(0,s.jsx)(l.A,{activeItem:e,isWired:e.type===n.sK.WIRED||e.is_wired}),(0,s.jsx)(Y,{activeItem:e})]})},195689(e,i,t){t.d(i,{A:()=>x});var s=t(274934),n=t(602086),r=t(938984),l=t(688684),a=t(640708),o=t(421314),c=t(986993),d=t(100978),m=t(635187),u=t(316628),A=t(470070);const x=({ipv6:e=[],enabled:i=!0,size:t="inherit",color:x="inherit",showOnlyPrefix:_=!1,hideCopyIcon:h=!1})=>{const p=(0,u.A)(),j=(0,n.useCallback)((e,i)=>{i.stopPropagation(),i.preventDefault(),p(e)},[p]),E=(0,n.useMemo)(()=>(e=>{const i=e=>(0,a.G8)(e)?0:(0,a.ZV)(e)?1:2;return e.sort((e,t)=>i(e)-i(t))})(e||[]).map(e=>{const[i,t]=e.split(m.Ed);return _?`${(0,a.Gh)(i,Number(t))}/${t}`:(0,a.z2)(e)}),[e,_]),O=E?.[0];return O?(0,s.jsxs)(d.A,{maxWidth:"100%",justifyContent:"flex-end",children:[(0,s.jsx)(o.A,{enabled:i,flexProps:{justifyContent:"flex-end",alignItems:"center"},color:i?x:"disabled",size:t,children:O}),E?.length>1?(0,s.jsx)(c.A,{items:E,isInteractive:!0,showListMarkers:!1,getItemKey:e=>e,renderListItem:e=>(0,s.jsxs)(s.Fragment,{children:[e,(0,s.jsx)(l.A,{size:"original",actionable:!0,onClick:i=>{j(e,i)}})]}),renderMultipleItemsSummary:()=>null}):h?null:(0,s.jsx)(l.A,{size:"original",actionable:!0,onClick:e=>{j(O,e)}})]}):(0,s.jsx)(r.A,{size:t,color:i?x:"disabled",children:(0,s.jsx)(A.sA,{id:"COMMON_FALLBACK"})})}},696049(e,i,t){t.d(i,{H:()=>s});const s=""},521376(e,i,t){var s;t.d(i,{U:()=>s}),function(e){e.ARROW_LEFT="ArrowLeft",e.ARROW_RIGHT="ArrowRight",e.ARROW_DOWN="ArrowDown",e.ARROW_UP="ArrowUp",e.ENTER="Enter",e.ESCAPE="Escape",e.BACKSPACE="Backspace",e.DELETE="Delete",e.TAB="Tab"}(s||(s={}))},316628(e,i,t){t.d(i,{A:()=>a});var s=t(602086),n=t(977872),r=t(700444),l=t(159469);const a=()=>{const e=(0,n.wA)();return(0,s.useCallback)(i=>null!=i?navigator.clipboard.writeText(i.toString()).then(()=>{e((0,r.ox)({icon:l.C.success,message:"COMMON_COPIED_TO_CLIPBOARD",duration:1e3}))}):Promise.resolve(),[e])}},237887(e,i,t){t.d(i,{A:()=>u});var s=t(274934),n=t(602086),r=t(977872),l=t(693371),a=t(767822),o=t(820633),c=t(308111);const d=e=>(0,s.jsx)(l.A,{renderOption:a.q,...e}),m=e=>(0,s.jsx)(d,{...e});m.Sorted=e=>{const i=(0,r.d4)(o.zi),t=(0,n.useMemo)(()=>(0,c.k)(i),[i]);return(0,s.jsx)(d,{...e,sortBy:t})};const u=m},308111(e,i,t){t.d(i,{R:()=>m,k:()=>u});var s=t(696049),n=t(350068),r=t(177173),l=t(752104),a=t(64222),o=t(332530);const c=[...new Set([s.H,l.Q.join(l.A),r.Zt,a.F,n.nc,o.Vr])],d={numeric:!0,sensitivity:"base"},m=(e,i)=>{const t=[];for(let s=e;s<=i;s+=1)t.push({value:s,label:String(s)});return t},u=e=>({value:i,label:t},{value:s,label:n})=>c.includes(i?.toString())||c.includes(s?.toString())?1/0:t?.toString().localeCompare(n?.toString(),e,d)??-1}}]);