"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[83007],{537417(e,t,i){i.d(t,{A:()=>n});var s=i(938984);const n=(0,i(247816).A)(s.A)`
  white-space: nowrap;
`},620627(e,t,i){i.d(t,{A:()=>A});var s=i(274934),n=i(938984),r=i(247816),o=i(309130),l=i(100978),d=i(535322);const a=(0,r.A)("div")`
  margin-right: ${o.kc};
`,c=(0,r.A)("div")`
  margin-left: ${o.kc};
`,A=({icon:e,closeIcon:t,nested:i,children:r,...o})=>(0,s.jsx)(d.A,{nested:i,...o,children:(0,s.jsxs)(l.A,{children:[(0,s.jsx)(a,{children:e}),(0,s.jsx)(n.A,{size:"medium",children:r}),t?(0,s.jsx)(c,{children:t}):null]})})},535322(e,t,i){i.d(t,{A:()=>u,I:()=>s});var s,n=i(274934),r=i(814557),o=i(158885),l=i(247816),d=i(565527),a=i(309130),c=i(100978),A=i(291508);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(s||(s={}));const x=(0,l.A)(c.A,(0,A.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:i}})=>e||r.Ay[i===d.S.DARK?`desktop-color-neutral-${t?"00":"01"}-${d.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${d.S.LIGHT}`]};
  padding: ${({isButtonList:e,padding:t})=>t||(e?`0 ${a.Ln}`:a.Ln)};
  margin-bottom: ${({marginBottom:e})=>e||a.Ln};
  ${({margin:e})=>e?`margin: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:e="100%"})=>e};
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:e})=>e?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:e}})=>r.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,m=(0,l.A)(o.A,(0,A.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:i}})=>e||r.Ay[i===d.S.DARK?`desktop-color-neutral-${t?"00":"01"}-${d.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${d.S.LIGHT}`]};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  ${({padding:e})=>e?`padding: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:e,theme:{themeName:t}})=>e||r.Ay[t===d.S.DARK?`desktop-color-neutral-01-${d.S.DARK}`:`desktop-color-neutral-00-${d.S.LIGHT}`]};
      height: 48px;
      padding: 0 ${a.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${a.Ln} ${a.Ln};
      }
    }
  }
`,u=({type:e,marginBottom:t,margin:i,padding:r,flex:o,width:l,nested:d,...a})=>"items"in a?(0,n.jsx)(m,{marginBottom:t,margin:i,padding:r,flex:o,nested:d,...a}):(0,n.jsx)(x,{nested:d,width:l,marginBottom:t,margin:i,padding:r,flex:o,isButtonList:e===s.BUTTON_LIST,...a,children:a.children})},748094(e,t,i){i.d(t,{A:()=>p});var s=i(274934),n=i(814557),r=i(602086),o=i(599110),l=i(938984),d=i(853777),a=i(600191),c=i(847399),A=i(263705),x=i(613842),m=i(470070),u=i(620627),h=i(100978);const p=(0,r.memo)(({children:e,customIcon:t,link:i,nested:p,extra:_,variant:j="warning",...E})=>{const{themeName:I}=(0,A.u)(),g=(0,r.useMemo)(()=>{switch(j){case"warning":return(0,s.jsx)(a.A,{size:"original",color:n.Ay[`desktop-color-orange-06-${I}`],variant:"fill"});case"info":return(0,s.jsx)(d.A,{isActive:!0,size:"original",variant:"fill"});case"custom":return t;default:return(0,s.jsx)(c.A,{size:"medium",color:n.Ay[`desktop-color-red-06-${I}`],variant:"fill"})}},[j,I,t]),C=(0,r.useCallback)(()=>{x.A.open(i)},[i]);return(0,s.jsx)(u.A,{icon:g,nested:p,...E,children:(0,s.jsxs)(h.A,{flexDirection:"column",alignItems:"flex-start",children:[(0,s.jsx)(l.A,{children:e}),(0,s.jsx)(l.A,{children:i?(0,s.jsx)(o.A,{type:"button",variant:"inline",onClick:C,children:(0,s.jsx)(m.sA,{id:"COMMON_LEARN_MORE"})}):null}),_]})})})},376892(e,t,i){i.d(t,{A:()=>o});var s=i(274934),n=i(938984),r=i(470070);const o=({id:e,children:t,values:i})=>(0,s.jsxs)(n.A,{color:"text-1",weight:"bold",size:"medium",children:[e?(0,s.jsx)(r.sA,{id:e,values:i}):null,t]})},216082(e,t,i){i.d(t,{A:()=>E});var s,n=i(274934),r=i(954702),o=i(602086),l=i(977872),d=i(938984),a=i(976458),c=i(470070),A=i(535322),x=i(376892),m=i(222102);!function(e){e.OPEN_MODAL="openModal"}(s||(s={}));const u=(0,m.Mz)(a.zn,e=>void 0!==e[s.OPEN_MODAL]);var h=i(828373),p=i(367821);const _=({uidbDevice:e})=>{const t=(0,l.d4)(a.zn),i=t?.[s.OPEN_MODAL];return i?(0,n.jsx)(r.A,{onClick:()=>i(e),children:(0,n.jsx)(d.A,{size:"medium",color:"inherit",children:(0,n.jsx)(c.sA,{id:"DEVICE_SHOW_DETAILS"})})}):null},j=({shortname:e})=>{(0,p.A)();const t=(0,l.d4)((0,o.useMemo)(()=>(0,h.$E)(e),[e]));return t?.compliance?(0,n.jsx)(A.A,{type:A.I.ACCORDION,items:[{id:"compliance",label:(0,n.jsx)(x.A,{id:"COMMON_COMPLIANCE"}),renderContent:()=>(0,n.jsx)(_,{uidbDevice:t}),openByDefault:!0}]}):null},E=({shortname:e})=>(0,l.d4)(u)?(0,n.jsx)(j,{shortname:e}):null},431660(e,t,i){i.d(t,{A:()=>x});var s=i(274934),n=i(602086),r=i(662986),o=i(100978),l=i(92684),d=i(470070),a=i(927316),c=i(828196);const A=({activeItem:{radio_table:e,radio_table_stats:t,type:i,model:A,vap_table:x,stat:m},radioType:u,radioName:h,hideChUtil:p=!1,hideRadio:_=!1})=>{const{formatMessage:j}=(0,d.tz)(),{radio:E,radioStats:I}=(0,n.useMemo)(()=>({radio:e?.find(({radio:e,name:t})=>e===u&&(!h||t===h)),radioStats:t?.find(({radio:e})=>e===u)}),[e,t,h,u]),{channelUtilization:g,transmitPower:C}=(0,n.useMemo)(()=>({channelUtilization:(0,a.Lm)(t,I),transmitPower:(0,a.ZJ)(t,I,j)}),[t,I,j]),{totalPacketsRx:O,totalBytesRx:M,droppedPercentageRx:T,retryPercentageRx:N,totalPacketsTx:y,totalBytesTx:b,droppedPercentageTx:R,retryPercentageTx:v}=(0,n.useMemo)(()=>(({totalPackets:e,totalBytes:t,droppedPercentage:i,retryPercentage:s},{totalPackets:n,totalBytes:r,droppedPercentage:o,retryPercentage:l})=>({totalPacketsRx:e,totalBytesRx:t,droppedPercentageRx:i,retryPercentageRx:s,totalPacketsTx:n,totalBytesTx:r,droppedPercentageTx:o,retryPercentageTx:l}))((0,a.GI)(i,E,"rx",m),(0,a.GI)(i,E,"tx",m)),[i,E,m]);return(0,s.jsxs)(o.A,{flexDirection:"column",children:[_?null:(0,s.jsx)(c.A,{id:"COMMON_CHANNEL",children:E?(0,s.jsx)(l.A,{radio_table:e,radio_table_stats:t,model:A,vap_table:x,radio:E,hidePowerInfo:!0,textSize:"medium",textColor:"text-3"}):(0,s.jsx)(d.sA,{id:"COMMON_FALLBACK"})}),(0,s.jsx)(c.A,{id:"DEVICE_PROPERTIES_LABEL_TX_EIRP",children:C||(0,s.jsx)(d.sA,{id:"COMMON_FALLBACK"})}),(0,s.jsxs)(c.A,{id:"DEVICE_PROPERTIES_LABEL_TX_PKTS_BYTES",children:[y??(0,s.jsx)(d.sA,{id:"COMMON_FALLBACK"})," /"," ",b??(0,s.jsx)(d.sA,{id:"COMMON_FALLBACK"})]}),(0,s.jsxs)(c.A,{id:"DEVICE_PROPERTIES_LABEL_RX_PKTS_BYTES",children:[O??(0,s.jsx)(d.sA,{id:"COMMON_FALLBACK"})," /"," ",M??(0,s.jsx)(d.sA,{id:"COMMON_FALLBACK"})]}),(0,s.jsxs)(c.A,{id:"DEVICE_PROPERTIES_LABEL_TX_RETRY_DROPPED",children:[(0,r.l)(v)," / ",(0,r.l)(R)]}),(0,s.jsxs)(c.A,{id:"DEVICE_PROPERTIES_LABEL_RX_RETRY_DROPPED",children:[(0,r.l)(N)," / ",(0,r.l)(T)]}),!p&&g?(0,s.jsx)(c.A,{id:"DEVICE_PROPERTIES_LABEL_CHANNEL_UTILIZATION",children:`${g.total}% / ${g.selfRx}% / ${g.selfTx}%`}):null]})},x=({activeItem:e,...t})=>e?.radio_table?.length?(0,s.jsx)(A,{activeItem:e,...t}):null},698950(e,t,i){i.d(t,{A:()=>u});var s=i(274934),n=i(247816),r=i(409844),o=i(291508),l=i(470070),d=i(309130),a=i(100978),c=i(537417);const A=(0,n.A)(a.A,(0,o.A)("alignLeft"))`
  ${({alignLeft:e})=>e?"max-width: 288px;":"max-width: 100%; justify-content: center;"}
  gap: ${d.YC};
  align-items: center;
`,x=r.AH`
  max-width: 50%;
`,m=r.AH`
  flex: 0 1 auto;
  min-width: 0;
`,u=({messageId:e,messageValues:t,buttonEl:i,alignLeft:n=!0,color:r="text-3",variant:o="body-primary"})=>(0,s.jsxs)(A,{alignLeft:n,children:[(0,s.jsx)(c.A,{variant:o,color:r,children:t?(0,s.jsx)(a.A,{maxWidth:288,whiteSpace:"nowrap",paddingRight:d.YC,children:(0,s.jsx)(l.sA,{id:e,values:t})}):(0,s.jsx)(l.sA,{id:e})}),i?(0,s.jsx)(a.A,{className:n?m:x,children:i}):null]})},783706(e,t,i){i.d(t,{A:()=>d});var s=i(274934),n=i(205240),r=i(956978),o=i(698950),l=i(949283);const d=({type:e,name:t,mac:i,uplink:d,state:a,model:c,disabled:A,alignLeft:x})=>(0,l.n)(a,d)?(0,s.jsx)(o.A,{messageId:(0,r.E4T)({model:c})?"COMMON_CONNECTED_TO":"DEVICE_MESHING_TO",alignLeft:x,buttonEl:(0,s.jsx)(n.E,{device:{type:e,name:t,mac:i,uplink:d},size:"medium",disabled:A})}):null},949283(e,t,i){i.d(t,{n:()=>l});var s=i(977872),n=i(45978),r=i(754924),o=i(313369);const l=(e,t)=>{const i=(0,s.d4)(r.CC),l=t.uplink_mac?i.find(({mac:e})=>e===t.uplink_mac):void 0,d=Boolean(t.signal);return o.q[e]===n.g.CONNECTED&&l&&d?l:void 0}},828196(e,t,i){i.d(t,{A:()=>c});var s=i(274934),n=i(938984),r=i(95032),o=i(247816),l=i(470070),d=i(664092);const a=(0,o.A)(n.A)`
  white-space: nowrap;
`,c=({id:e,color:t,values:i,children:n})=>(0,s.jsxs)(d.A,{children:[(0,s.jsx)(a,{color:"text-2",size:"medium",children:(0,s.jsx)(l.sA,{id:e,values:i})}),(0,s.jsx)(r.A,{color:t||"text-3",size:"medium",isTruncated:!0,children:n})]})},723838(e,t,i){i.d(t,{A:()=>m});var s=i(274934),n=i(878151),r=i(938984),o=i(703639),l=i(320509),d=i(309130),a=i(100978),c=i(470070),A=i(956978),x=i(664092);const m=({capacity:e,activeItem:t,withTooltip:i=!1})=>{const m=e??t?.link_capacity??((0,A.YdF)(t)&&t?.peer_ubb?.link_capacity),u=m&&m>0?(0,s.jsx)(n.A,{size:"body",type:"bytes",color:"tertiary",input:(0,l.N8)(m),options:"bitrate"}):null;return u?(0,s.jsxs)(x.A,{children:[(0,s.jsx)(r.A,{color:"text-2",size:"medium",children:(0,s.jsx)(c.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_CAPACITY"})}),i?(0,s.jsxs)(a.A,{alignItems:"center",gap:d.YC,children:[u,(0,s.jsx)(o.A,{description:(0,s.jsx)(c.sA,{id:"DEVICE_PROPERTY_OVERVIEW_CAPACITY_TOOLTIP"}),placement:"top start"})]}):u]}):null}},742368(e,t,i){i.d(t,{A:()=>p});var s,n=i(274934),r=i(977872),o=i(938984),l=i(470070),d=i(479964);!function(e){e.MM="mm",e.CM="cm",e.M="m",e.KM="km",e.MI="mi",e.FT="ft"}(s||(s={}));const a={[s.MM]:"COMMON_UNIT_DISTANCE_MM",[s.CM]:"COMMON_UNIT_DISTANCE_CM",[s.M]:"COMMON_UNIT_DISTANCE_M",[s.KM]:"COMMON_UNIT_DISTANCE_KM",[s.MI]:"COMMON_UNIT_DISTANCE_MI",[s.FT]:"COMMON_UNIT_DISTANCE_FT"},c=[d.A.US.numericCode,d.A.GB.numericCode,d.A.CA.numericCode,d.A.LR.numericCode,d.A.MM.numericCode],A=(e,t)=>(0,n.jsxs)(n.Fragment,{children:[`${e} `,(0,n.jsx)(l.sA,{id:a[t]})]}),x=(e,t,i=0,r=[s.MM,s.CM,s.M,s.KM,s.MI,s.FT])=>((e,t,i,r)=>{if((e=>c.includes(e))(e)){if(t.includes(s.FT)&&r<1610)return A((3.2808399*r).toFixed(i),s.FT);if(t.includes(s.MI))return A((.000621371192*r).toFixed(i),s.MI)}else{if(t.includes(s.MM)&&r<.01)return A((1e3*r).toFixed(i),s.MM);if(t.includes(s.CM)&&r<1)return A((100*r).toFixed(i),s.CM);if(t.includes(s.M)&&r<1e3)return A(r.toFixed(i),s.M);if(t.includes(s.KM))return A((r/1e3).toFixed(i),s.KM)}return(0,n.jsx)(n.Fragment,{children:`${r}`})})(e,r,i,t);var m=i(291935),u=i(956978),h=i(664092);const p=({distance:e,activeItem:t})=>{const i=(0,r.d4)(m.ZZ),s=e??t?.distance??((0,u.YdF)(t)&&t?.peer_ubb?.distance);return s?(0,n.jsxs)(h.A,{children:[(0,n.jsx)(o.A,{color:"text-2",size:"medium",children:(0,n.jsx)(l.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_DISTANCE"})}),(0,n.jsx)(o.A,{color:"text-3",size:"medium",children:x(i,s)})]}):null}},664613(e,t,i){i.d(t,{A:()=>A});var s=i(274934),n=i(938984),r=i(703639),o=i(309130),l=i(100978),d=i(470070),a=i(956978),c=i(664092);const A=({sys_stats:e,flexProps:t,withTooltip:i,compact:A=!1})=>{const x=(0,a.eiG)(e);return x?(0,s.jsxs)(c.A,{flexProps:t,compact:A,children:[(0,s.jsx)(n.A,{color:"text-2",size:"medium",children:(0,s.jsx)(d.sA,{id:"COMMON_LOAD_AVERAGE"})}),i?(0,s.jsxs)(l.A,{alignItems:"center",gap:o.YC,children:[(0,s.jsx)(n.A,{color:"text-3",size:"medium",children:x}),(0,s.jsx)(r.A,{description:(0,s.jsx)(d.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LOAD_AVERAGE_TOOLTIP"}),placement:"top start"})]}):(0,s.jsx)(n.A,{color:"text-3",size:"medium",children:x})]}):null}},725870(e,t,i){i.d(t,{A:()=>d});var s=i(274934),n=i(938984),r=i(470070),o=i(956978),l=i(664092);const d=({systemStatsMem:e,compact:t=!1})=>{const i=(0,o.HBQ)(e);return i?(0,s.jsxs)(l.A,{compact:t,children:[(0,s.jsx)(n.A,{color:"text-2",size:"medium",children:(0,s.jsx)(r.sA,{id:"DEVICE_PROPERTY_OVERVIEW_MEMORY_USAGE"})}),(0,s.jsxs)(n.A,{color:"text-3",size:"medium",children:[i,"%"]})]}):null}},893762(e,t,i){i.d(t,{A:()=>d});var s=i(274934),n=i(938984),r=i(898809),o=i(470070),l=i(664092);const d=({uptime:e,compact:t=!1})=>e>0?(0,s.jsxs)(l.A,{compact:t,children:[(0,s.jsx)(n.A,{color:"text-2",size:"medium",children:(0,s.jsx)(o.sA,{id:"COMMON_UPTIME"})}),(0,s.jsx)(n.A,{color:"text-3",size:"medium",children:(0,r.Ay)(e)})]}):null},631692(e,t,i){i.d(t,{A:()=>m});var s=i(274934),n=i(43009),r=i(938984),o=i(247816),l=i(442175),d=i(100978),a=i(470070),c=i(664092),A=i(128066);const x=(0,o.A)(d.A)`
  .tooltip-position-fixer {
    margin-right: -14px;
  }
`,m=({uplink:e,portSpeed:t})=>{const i=Number(t||e?.speed),{motif:o}=(0,n.A)();return i>0?(0,s.jsxs)(c.A,{children:[(0,s.jsx)(r.A,{color:"text-2",size:"medium",children:(0,s.jsx)(a.sA,{id:"COMMON_EXPERIENCE"})}),(0,s.jsx)(x,{alignItems:"center",children:(0,s.jsx)(r.A,{style:{color:(0,A.xe)(i,o,!1)},size:"medium",children:(0,l.ir)(i)})})]}):null}},664092(e,t,i){i.d(t,{A:()=>a});var s=i(274934),n=i(247816),r=i(309130),o=i(100978),l=i(291508);const d=(0,n.A)(o.A,(0,l.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;
    }
  }
`,a=({children:e,valueMaxWidth:t=215,keyMinWidth:i=0,flexProps:n={},compact:o=!1})=>(0,s.jsx)(d,{width:"100%",justifyContent:"space-between",gap:r.kc,height:o?void 0:24,valueMaxWidth:t,keyMinWidth:i,compact:o,...n,children:e})},872926(e,t,i){i.d(t,{A:()=>x});var s=i(274934),n=i(977872),r=i(810024),o=i(589650),l=i(748094),d=i(470070),a=i(754924),c=i(726831);const A=({adopted:e})=>(0,s.jsx)(l.A,{link:c.A.virtualNetworkConnectivity,children:(0,s.jsx)(d.sA,{id:e?"DEVICE_FALLBACK_IP_ADOPTED_WITH_UNIFI_GATEWAY_WARNING":"DEVICE_FALLBACK_IP_NOT_ADOPTED_WARNING",values:{bold:(0,s.jsx)("strong",{children:(0,s.jsx)(d.sA,{id:e?"DEVICE_WARNING_FALLBACK_IP":"DEVICE_WARNING_ADOPTION_FAILED"})})}})}),x=({ip:e,adopted:t,config_network:i})=>(0,n.d4)(a.m9)&&(0,r.W5)(e)&&i?.type===o.NL.DHCP?(0,s.jsx)(A,{adopted:t}):null},483007(e,t,i){i.r(t),i.d(t,{default:()=>_e});var s=i(274934),n=i(309130),r=i(938984),o=i(878151),l=i(558948),d=i(247816);const a=e=>{let t=Number.parseFloat(`${e}`);return t?(t=Math.min(45,Math.max(t,5)),t=(t-5)/40*99,`${0===t?"0":t.toPrecision(2)}`):""};var c=i(341434),A=i(320509),x=i(100978),m=i(470070),u=i(956978),h=i(664092),p=i(631692),_=i(725870),j=i(664613);const E=(0,d.A)(l.A)`
  margin-top: ${n.kc};
  margin-bottom: ${n.Ln};
`,I=(0,d.A)("div")`
  margin-bottom: ${n.kc};
`;var g;!function(e){e.STATION="station",e.ACCESS_POINT="access_point"}(g||(g={}));const C=({activeItem:e,ubbDeviceType:t,pendingAdoption:i})=>{const{mac:n,ip:l,link_capacity:d,uptime:C,has_temperature:O,general_temperature:M,uplink:T}=e,{rssi:N,tx_rate:y,tx_packets:b,rx_rate:R,tx_bytes:v,"tx_bytes-r":D,rx_packets:P,rx_bytes:f,"rx_bytes-r":L}=T||{},k=L+D;return(0,s.jsxs)(x.A,{flexDirection:"column",children:[n?(0,s.jsxs)(h.A,{children:[(0,s.jsx)(r.A,{color:"text-2",size:"medium",children:(0,s.jsx)(m.sA,{id:"COMMON_MAC_ADDRESS"})}),(0,s.jsx)(r.A,{color:"text-3",size:"medium",children:n})]}):null,l?(0,s.jsxs)(h.A,{children:[(0,s.jsx)(r.A,{color:"text-2",size:"medium",children:(0,s.jsx)(m.sA,{id:"COMMON_IP_ADDRESS"})}),(0,s.jsx)(r.A,{color:"text-3",size:"medium",children:l})]}):null,i?null:(0,s.jsxs)(s.Fragment,{children:[void 0!==d&&d>0?(0,s.jsxs)(h.A,{children:[(0,s.jsx)(r.A,{color:"text-2",size:"medium",children:(0,s.jsx)(m.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_CAPACITY"})}),(0,s.jsx)(o.A,{type:"bytes",color:"tertiary",size:"body",input:(0,A.N8)(d),options:"bitrate"})]}):null,O&&M?(0,s.jsxs)(h.A,{children:[(0,s.jsx)(r.A,{color:"text-2",size:"medium",children:(0,s.jsx)(m.sA,{id:"COMMON_TEMPERATURE"})}),(0,s.jsx)(r.A,{color:"text-3",size:"medium",children:(0,s.jsx)(m.sA,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_VALUE",values:{temperature:M}})})]}):null,C?(0,s.jsxs)(h.A,{children:[(0,s.jsx)(r.A,{color:"text-2",size:"medium",children:(0,s.jsx)(m.sA,{id:"COMMON_UPTIME"})}),(0,s.jsx)(o.A,{type:"uptime",color:"tertiary",size:"body",input:C})]}):null,(0,s.jsx)(_.A,{systemStatsMem:e["system-stats"]?.mem}),(0,s.jsx)(j.A,{sys_stats:e.sys_stats,withTooltip:!0}),T?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(E,{orientation:"horizontal"}),(0,s.jsx)(I,{children:(0,s.jsx)(r.A,{color:"text-1",weight:"bold",size:"medium",children:(0,s.jsx)(m.sA,{id:(0,u.Daf)(e)?"DEVICE_PROPERTY_DEVICE_WIRELESS":"DEVICE_PROPERTY_DEVICE_WIRED"})})}),t===g.STATION?(0,s.jsxs)(s.Fragment,{children:[void 0!==N?(0,s.jsxs)(h.A,{children:[(0,s.jsx)(r.A,{color:"text-2",size:"medium",children:(0,s.jsx)(m.sA,{id:"COMMON_SIGNAL"})}),(0,s.jsxs)(r.A,{color:"text-3",size:"medium",children:[a(N)," (",(0,c.A)(N),(0,s.jsx)(m.sA,{id:"COMMON_UNIT_DBM"}),")"]})]}):null,void 0!==y?(0,s.jsxs)(h.A,{children:[(0,s.jsx)(r.A,{color:"text-2",size:"medium",children:(0,s.jsx)(m.sA,{id:"DEVICE_PROPERTIES_LABEL_TX_RATE"})}),(0,s.jsx)(o.A,{type:"bytes",color:"tertiary",size:"body",input:(0,A.Zz)(y),options:"bitrate"})]}):null,void 0!==R?(0,s.jsxs)(h.A,{children:[(0,s.jsx)(r.A,{color:"text-2",size:"medium",children:(0,s.jsx)(m.sA,{id:"COMMON_RX_RATE"})}),(0,s.jsx)(o.A,{type:"bytes",color:"tertiary",size:"body",input:(0,A.Zz)(R),options:"bitrate"})]}):null]}):null,t===g.ACCESS_POINT?(0,s.jsx)(p.A,{uplink:T}):null,(0,s.jsxs)(h.A,{children:[(0,s.jsx)(r.A,{color:"text-2",size:"medium",children:(0,s.jsx)(m.sA,{id:"DEVICE_PROPERTIES_LABEL_DOWN_PKTS_BYTES"})}),(0,s.jsx)(r.A,{color:"text-3",size:"medium",children:P&&f?(0,s.jsxs)(s.Fragment,{children:[P.toLocaleString()," / ",(0,s.jsx)(o.A,{type:"bytes",input:f,color:"tertiary",size:"body"})]}):"0.00 / 0.00"})]}),(0,s.jsxs)(h.A,{children:[(0,s.jsx)(r.A,{color:"text-2",size:"medium",children:(0,s.jsx)(m.sA,{id:"DEVICE_PROPERTIES_LABEL_UP_PKTS_BYTES"})}),(0,s.jsx)(r.A,{color:"text-3",size:"medium",children:b&&v?(0,s.jsxs)(s.Fragment,{children:[b.toLocaleString()," / ",(0,s.jsx)(o.A,{type:"bytes",input:v,color:"tertiary",size:"body"})]}):"0.00 / 0.00"})]}),(0,s.jsxs)(h.A,{children:[(0,s.jsx)(r.A,{color:"text-2",size:"medium",children:(0,s.jsx)(m.sA,{id:"COMMON_ACTIVITY"})}),(0,s.jsx)(o.A,{type:"bytes",color:"tertiary",size:"body",input:k,options:"bitrate"})]})]}):null]})]})};var O=i(431660),M=i(561614),T=i(434521);const N=(0,d.A)("div")`
  &:not(:last-child) {
    margin-bottom: ${({theme:{spacing:e}})=>e["spacing-l"]};
  }
`,y=(0,d.A)(r.A)`
  margin-bottom: 4px;
`,b=(0,d.A)("div")`
  margin-bottom: 16px;
`,R=({activeItem:e})=>(0,T.YP)(e)?(0,s.jsxs)(N,{children:[(0,s.jsx)(y,{weight:"bold",size:"medium",children:(0,s.jsx)(m.sA,{id:"COMMON_RADIO_BAND_NA"})}),(0,s.jsx)(O.A,{activeItem:e,radioType:M.sx.RADIO_NA}),(0,s.jsx)(b,{}),(0,s.jsx)(y,{weight:"bold",size:"medium",children:(0,s.jsx)(m.sA,{id:"DEVICE_HEADER_RADIO60G_SHORT"})}),(0,s.jsx)(O.A,{activeItem:e,radioType:M.sx.RADIO_AD})]}):null;var v=i(376892),D=i(814557),P=i(602086),f=i(263705),L=i(291508);const k=(0,d.A)("div",(0,L.A)("color"))`
  padding: ${n.YC};
  border-radius: ${n.YC};
  border: 1px solid ${({color:e})=>e};
  color: ${({color:e})=>e};
  line-height: ${n.xO};
`,S=(0,P.memo)(()=>{const{themeName:e}=(0,f.u)();return(0,s.jsx)(k,{color:D.Ay[`desktop-color-orange-06-${e}`],children:(0,s.jsx)(r.A,{style:{textTransform:"uppercase"},color:"inherit",size:"small",weight:"bold",children:(0,s.jsx)(m.sA,{id:"COMMON_DEVICE_STATE_CONNECTION_INTERRUPTED"})})})});var $=i(535322),z=i(651561),V=i(857780),w=i(45978),B=i(313369),F=i(783706),W=i(872926),Y=i(157622),U=i(241365),K=i(600191),G=i(443502),H=i(331472),X=i(347625),Z=i(620627),Q=i(541819),q=i(974390),J=i(748027);const ee=J.i7`
  0% {
    width: 5%;
    opacity: 1;
  }
  75% {
    opacity: 1;
  }
  100% {
    width: 100%;
    opacity: 0;
  }  
`,te=J.i7`
  0% {
    opacity: 1;
  }
  30% {
    opacity: 1;
  }  
  50% {
    opacity: 0;
  }
`,ie=(0,d.A)("div")`
  position: relative;
  width: 100%;
  height: 3px;
  background-color: ${({theme:e})=>e.colors.neutralBackground};
`,se=(0,d.A)("div",(0,L.A)("linkAnimationColor"))`
  animation: ${ee} 5s infinite;
  width: 100%;
  opacity: 1;
  height: 5px;
  margin-top: -1px;
  position: absolute;
  background-image: linear-gradient(
    to right,
    ${({linkAnimationColor:e})=>e},
    transparent 30%,
    transparent 70%,
    ${({linkAnimationColor:e})=>e}
  );
  left: 50%;
  transform: translateX(-50%);
  border-radius: 3px;

  &:after {
    content: '';
    display: block;
    background-color: ${({linkAnimationColor:e})=>e};
    width: 100%;
    position: absolute;
    border-radius: 3px;
    height: 100%;
    opacity: 0;
    animation: ${te} 5s infinite;
  }
`,ne=({color:e})=>(0,s.jsx)(ie,{children:(0,s.jsx)(se,{linkAnimationColor:e})}),re=(0,d.A)("div",(0,L.A)("color","left","right","height"))`
  position: absolute;
  ${({left:e})=>e?`left: ${e}px`:""};
  ${({right:e})=>e?`right: ${e}px`:""};
  ${({height:e})=>e?`height: ${e}px`:""};
  width: 1px;
  border-radius: 1px;
  background-image: radial-gradient(transparent 0%, ${({color:e})=>e} 60%, transparent 100%);
  filter: drop-shadow(0px 0px 0.5px ${({color:e})=>e}) opacity(0.6);
`,oe=({color:e,model:t,flipped:i=!1})=>{const[n,r]=(0,P.useState)(!1),o=(0,P.useMemo)(()=>((e,t)=>{switch(e){case V.W4.UBB:return{left:t?12:16,height:29};case V.W4.UBBXG:return{left:t?12:17,height:29};default:return}})(t,i),[t,i]),l=(0,P.useCallback)(()=>{r(!0)},[]);return(0,s.jsxs)(x.A,{position:"relative",children:[n&&o?(0,s.jsx)(re,{color:e||Y.A["blue-0"],...o}):null,(0,s.jsx)(q.A,{width:29,height:29,model:t,variant:i?Q.Hx.RIGHT_NOPADDING:Q.Hx.LEFT_NOPADDING,onLoadCallback:l})]})},le=(0,d.A)("div")`
  align-self: stretch;
  border-right: solid 1px
    ${({theme:{themeName:e}})=>D.Ay[`desktop-color-neutral-03-${e}`]};
  width: 1px;
`,de=({activeItem:e,activeItem:{peer_ubb:t,led_override_color:i,model:l},pendingAdoption:d})=>{const a=(0,z.Gy)(e),c=(0,H.b5)(a),A=!d&&(0,z.hk)(e),u=!d&&(0,z.Q9)(e),h=(0,P.useMemo)(()=>!d&&!A||"destructive"===c?U.Ay["color-danger"]:d||"notice"===c?U.Ay["color-warning"]:U.Ay["color-success"],[c,A,d]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)($.A,{children:(0,s.jsxs)(x.A,{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:n.kc,children:[(0,s.jsx)(x.A,{minWidth:48,maxWidth:48,height:"100%",alignItems:"center",justifyContent:"center",children:(0,s.jsx)(q.A,{model:l,size:Q.Xh.MEDIUM,width:"100%"})}),(0,s.jsxs)(x.A,{flexDirection:"column",children:[(0,s.jsx)(r.A,{weight:"bold",size:"medium",color:"text-1",children:(0,X.Q)(e)}),(0,s.jsx)(x.A,{flexDirection:"row",alignItems:"center",children:(0,s.jsxs)(r.A,{size:"medium",children:[A?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(m.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_QUALITY"}),": ",(0,s.jsx)(o.A,{type:"percent",input:a/100,style:{color:Y.A.getGradientColor(a/100)}})]}):null,!A&&d?(0,s.jsx)(m.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_INACTIVE"}):null,A||d?null:(0,s.jsx)(m.sA,{id:"DEVICE_PROPERTY_OVERVIEW_NO_LINK"})]})})]}),(0,s.jsx)(le,{}),(0,s.jsxs)(x.A,{flex:"0 1 137px",gap:n.kc,justifyContent:"space-between",alignItems:"center",children:[(0,s.jsx)(oe,{color:i,model:l}),(0,s.jsx)(ne,{color:h}),(0,s.jsx)(oe,{flipped:!0,color:t?.led_override_color,model:l})]})]})}),d||u?(0,s.jsx)(Z.A,{icon:(0,s.jsx)(K.A,{size:"original",variant:"fill",color:G.PA.warning}),children:(0,s.jsx)(r.A,{children:(0,s.jsx)(m.sA,{id:d?"DEVICE_UBB_LINK_INACTIVE_WARNING_MESSAGE":"DEVICE_UBB_LINK_DOWN_WARNING_MESSAGE"})})}):null]})};var ae=i(893762);const ce=({activeItem:e})=>{const t=(0,z.Gy)(e);return t>0?(0,s.jsxs)(h.A,{children:[(0,s.jsx)(r.A,{color:"text-2",size:"medium",children:(0,s.jsx)(m.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_QUALITY"})}),(0,s.jsx)(o.A,{size:"body",type:"percent",input:t/100,style:{color:Y.A.getGradientColor(t/100)},color:"tertiary"})]}):null};var Ae=i(742368),xe=i(723838);const me=({throughput:e})=>void 0!==e&&Number.isFinite(e)?(0,s.jsxs)(h.A,{children:[(0,s.jsx)(r.A,{color:"text-2",size:"medium",children:(0,s.jsx)(m.sA,{id:"COMMON_LINK_SPEED"})}),(0,s.jsx)(o.A,{size:"body",type:"bytes",color:"tertiary",input:e,options:"bitrate"})]}):null,ue=({activeItem:e,activeItem:{p2p_stats:t,peer_ubb:i}})=>(0,s.jsx)(me,{throughput:t?.throughput??((0,u.YdF)(e)&&i?.p2p_stats?.throughput)}),he=({activeItem:e,activeItem:{uptime:t}})=>(0,s.jsx)($.A,{children:(0,s.jsxs)(x.A,{height:"100%",flexDirection:"column",children:[(0,s.jsx)(ae.A,{uptime:t}),(0,s.jsx)(Ae.A,{activeItem:e}),(0,s.jsx)(ue,{activeItem:e}),(0,s.jsx)(ce,{activeItem:e}),(0,s.jsx)(xe.A,{activeItem:e})]})});var pe=i(216082);const _e=({activeItem:e,activeItem:{name:t,mac:i,adopted:r,peer_ubb:o,ip:l,config_network:d,uplink:a,radio_table:c,type:A,shortname:h,state:p,model:_}})=>{const j=(0,T.YP)(e),E=o&&(!(0,z.hI)(e)||!j);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(de,{activeItem:e}),(0,s.jsx)(W.A,{ip:l,adopted:r,config_network:d}),(0,s.jsxs)(x.A,{flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",gap:n.YC,children:[B.q[p]===w.g.ADOPTION_FAILED?(0,s.jsx)(S,{}):null,a?.type===V.au.WIRELESS?(0,s.jsx)(F.A,{uplink:a,type:A,name:t,state:p,mac:i,model:_,alignLeft:!1}):null]}),j?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(he,{activeItem:e}),[e,o].filter(Boolean).map(e=>({id:(0,z.zX)(e)?"accessPoint":"station",openByDefault:!0,label:(0,s.jsxs)(v.A,{children:[(0,s.jsx)(m.sA,{id:(0,z.zX)(e)?"DEVICE_TYPE_UBB_AP":"DEVICE_TYPE_UBB_STATION"})," ",o?.uplink?(0,s.jsx)(m.sA,{id:(0,u.Daf)(e)?"COMMON_WIRELESS":"COMMON_WIRED"}):null]}),renderContent:()=>(0,s.jsx)(C,{activeItem:e,ubbDeviceType:(0,z.zX)(e)?g.ACCESS_POINT:g.STATION,pendingAdoption:E})})).map(e=>(0,s.jsx)($.A,{type:$.I.ACCORDION,items:[e]},e.id)),!E&&c?.length?(0,s.jsx)($.A,{type:$.I.ACCORDION,items:[{id:"radios",openByDefault:!0,label:(0,s.jsx)(v.A,{id:"DEVICE_HEADER_AIR_STATS"}),renderContent:()=>(0,s.jsx)(R,{activeItem:e})}]}):null,(0,s.jsx)(pe.A,{shortname:h})]}):null]})}},367821(e,t,i){i.d(t,{A:()=>d});var s=i(602086),n=i(977872),r=i(726831),o=i(575478),l=i(828373);const d=()=>{const e=(0,n.wA)(),t=(0,n.d4)(l.eo);return(0,s.useEffect)(()=>{t||(async()=>{const t=await fetch(r.A.fingerprintPublicDatabasePath),i=await t.json();e((0,o.$)(i))})()},[t,e]),t}},828373(e,t,i){i.d(t,{$E:()=>c,eo:()=>d});var s=i(222102),n=i(271656),r=i(720770),o=i(172205);const l=e=>e[o.U.UIDB]||(0,n.A)(),d=(0,s.Mz)(l,({version:e})=>Boolean(e)),a=(0,s.Mz)(l,({devices:e})=>e||(0,r.A)()),c=e=>(0,s.Mz)(a,t=>t.find(({shortnames:t})=>e&&(t||[]).includes(e))||(0,n.A)());(0,s.Mz)(a,e=>{const t=new Map;for(let i=0;i<e.length;i+=1){const s=e[i].power?.baseConsumption;if(void 0!==s){const{shortnames:n}=e[i];for(let e=0;e<(n||[]).length;e+=1)t.set(n[e],s)}}return t})}}]);