"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[16730],{22169:(e,t,n)=>{n.d(t,{A:()=>s});var l=n(296540),r=n(217439),a=n(699784),c=n(115829),i=n(39705),o=n(294303);const s=({ipv6:e,size:t="inherit",color:n="inherit"})=>{const s=e?.[0];return s?l.createElement(o.A,{width:"100%",justifyContent:"flex-end"},l.createElement(c.A,{flexProps:{justifyContent:"flex-end",alignItems:"center"},color:n,size:t},s),e?.length>1?l.createElement(i.A,{items:e,isInteractive:!0,showListMarkers:!1,getItemKey:e=>e,renderListItem:e=>l.createElement(l.Fragment,null,e),renderMultipleItemsSummary:()=>null}):null):l.createElement(r.A,{size:t,color:n},l.createElement(a.sA,{id:"COMMON_FALLBACK"}))}},39705:(e,t,n)=>{n.d(t,{A:()=>s});var l=n(296540),r=n(705145),a=n(699784),c=n(115829),i=n(424135),o=n(819127);const s=function({items:e,renderMultipleItemsSummary:t,renderListItem:n,renderNoItems:s,getItemKey:m,enabled:E=!0,showListMarkers:A,cursorType:u,isInteractive:d}){const p=E?"inherit":"disabled";return e.length>1?l.createElement(i.A,{tooltip:l.createElement(o.A,{items:e,getItemKey:m,renderItem:n,showListMarkers:A,isInteractive:d,cursorType:u})},l.createElement(c.A,{color:p,cursorType:u},t(e))):1===e.length?l.createElement(c.A,{color:p,cursorType:u},n(e[0])):s?l.createElement(l.Fragment,null,s()):l.createElement(r.A,{isTruncated:!0,color:p},l.createElement(a.sA,{id:"COMMON_FALLBACK"}))}},46119:(e,t,n)=>{n.d(t,{A:()=>l});const l={open:(e,t="_blank",n="noopener,noreferrer")=>window.open(e,t,n)}},124092:(e,t,n)=>{n.d(t,{A:()=>I});var l=n(469733),r=n(296540),a=n(962926),c=n(705145),i=n(71479),o=n(132196),s=n(6510),m=n(130851),E=n(566723),A=n(294303),u=n(6176);const d=o.AH`
  margin-bottom: ${E.Ln};
  margin-top: ${E.Ln};
`,p=(0,i.A)("div")`
  align-self: center;
  overflow: hidden;
  word-break: break-word;
`,C=(0,i.A)("img")`
  width: 40px;
  height: 40px;
  object-fit: contain;
`,I=({children:e,description:t,meshingDescription:n,isOffline:i,activeItem:I,style:_,className:N,isStacking:g})=>{const v=(0,l.useSelector)(m.p);return r.createElement(a.A,{className:(0,o.cx)(d,N),sections:[r.createElement("div",null,r.createElement(A.A,{gap:E.kc},g?r.createElement(C,{src:`${v}/topology/stacking.png`,alt:"stacked"}):r.createElement(u.A,{model:I.model,width:40,height:40}),r.createElement(p,{style:_},r.createElement(c.A,{color:i?"text-3":"text-1",weight:"bold",isTruncated:!0},(0,s.Lm)(I.model)),t)),n,e)]})}},146784:(e,t,n)=>{n.d(t,{A:()=>u});var l=n(296540),r=n(349424),a=n(217439),c=n(383653),i=n(568560),o=n(22169),s=n(294303),m=n(699784),E=n(348466),A=n(360113);const u=(0,l.memo)(({ipv6_address:e=[],wan_dhcpv6_pd_size:t})=>{const{globalAddresses:n,linkLocalAddress:u}=(0,l.useMemo)(()=>{const t=[];let n=null;for(let l=0;l<e.length;l+=1){const a=e[l];new r.Address6(a).isLinkLocal()?n=a?.split(E.Ed)?.[0]:t.push(a.split(E.Ed)?.[0])}return{globalAddresses:t,linkLocalAddress:n}},[e]);return n.length?l.createElement(l.Fragment,null,l.createElement(A.A,null,l.createElement(a.A,{color:"text-2",size:"medium"},l.createElement(m.sA,{id:"COMMON_IPV6_ADDRESS"})),l.createElement(i.A,{ipv6:n,size:"medium",color:"text-3"})),t?l.createElement(A.A,null,l.createElement(a.A,{color:"text-2",size:"medium"},l.createElement(m.sA,{id:"COMMON_IPV6_PREFIX"})),l.createElement(s.A,{flex:"1",minWidth:"0",justifyContent:"flex-end"},l.createElement(o.A,{ipv6:[`${(0,c.Gh)(n[0],t)}/${t}`],color:"text-3",size:"medium"}))):null,u?l.createElement(A.A,null,l.createElement(a.A,{color:"text-2",size:"medium"},l.createElement(m.sA,{id:"COMMON_IPV6_LINK_LOCAL"})),l.createElement(i.A,{ipv6:[u],size:"medium",color:"text-3"})):null):null})},470962:(e,t,n)=>{n.d(t,{A:()=>u});var l=n(296540),r=n(217439),a=n(823858),c=n(998837),i=n(566723),o=n(224948),s=n(349107),m=n(294303),E=n(699784),A=n(765562);const u=(0,l.memo)(({children:e})=>l.createElement(o.A,{icon:l.createElement(a.A,{size:"original",color:(0,c.u)().motifPalette.warning,variant:"fill"})},l.createElement(m.A,{flexDirection:"column",gap:i.kc},l.createElement(r.A,{size:"medium",color:"text-2"},l.createElement(E.sA,{id:"COMMON_DEVICE_OFFLINE_WARNING",values:{b:E.b,link:l.createElement(s.A,{href:A.A.offlineArticle,id:"COMMON_LEARN_MORE",noWrap:!0})}})),e)))},500045:(e,t,n)=>{n.d(t,{A:()=>i});var l=n(296540),r=n(927099),a=n(699784),c=n(360113);const i=({displayable_version:e,flexProps:t})=>e?l.createElement(c.A,{flexProps:t},l.createElement(r.A,{color:"secondary",size:"body"},l.createElement(a.sA,{id:"COMMON_DEVICE_VERSION"})),l.createElement(r.A,{color:"tertiary",size:"body"},e)):null},551753:(e,t,n)=>{n.d(t,{A:()=>d});var l=n(296540),r=n(758649),a=n(217439),c=n(162420),i=n(823858),o=n(793336),s=n(998837),m=n(46119),E=n(699784),A=n(224948),u=n(294303);const d=(0,l.memo)(({children:e,customIcon:t,link:n,nested:d,extra:p,variant:C="warning",...I})=>{const{motifPalette:{warning:_,danger:N}}=(0,s.u)(),g=(0,l.useMemo)(()=>{switch(C){case"warning":return l.createElement(i.A,{size:"original",color:_,variant:"fill"});case"info":return l.createElement(c.A,{isActive:!0,size:"original",variant:"fill"});case"custom":return t;default:return l.createElement(o.A,{size:"medium",color:N,variant:"fill"})}},[C,_,N,t]),v=(0,l.useCallback)(()=>{m.A.open(n)},[n]);return l.createElement(A.A,{icon:g,nested:d,...I},l.createElement(u.A,{flexDirection:"column",alignItems:"flex-start"},l.createElement(a.A,null,e),l.createElement(a.A,null,n?l.createElement(r.A,{type:"button",variant:"inline",onClick:v},l.createElement(E.sA,{id:"COMMON_LEARN_MORE"})):null),p))})},568560:(e,t,n)=>{n.d(t,{A:()=>p});var l=n(469733),r=n(296540),a=n(217439),c=n(895795),i=n(383653),o=n(742920),s=n(115829),m=n(39705),E=n(294303),A=n(675359),u=n(699784),d=n(348466);const p=({ipv6:e=[],enabled:t=!0,size:n="inherit",color:p="inherit",showOnlyPrefix:C=!1})=>{const I=(0,l.useDispatch)(),_=(0,r.useCallback)(e=>{navigator.clipboard.writeText(e).then(()=>{I((0,A.ox)({icon:o.C.success,message:"COMMON_COPIED_TO_CLIPBOARD"}))})},[I]),N=(0,r.useCallback)((e,t)=>{t.stopPropagation(),t.preventDefault(),_(e)},[_]),g=(0,r.useMemo)(()=>(e=>{const t=e=>(0,i.G8)(e)?0:(0,i.ZV)(e)?1:2;return e.sort((e,n)=>t(e)-t(n))})(e||[]).map(e=>{const[t,n]=e.split(d.Ed);return C?`${(0,i.Gh)(t,Number(n))}/${n}`:(0,i.z2)(e)}),[e,C]),v=g?.[0];return v?r.createElement(E.A,{maxWidth:"100%",justifyContent:"flex-end"},r.createElement(s.A,{enabled:t,flexProps:{justifyContent:"flex-end",alignItems:"center"},color:t?p:"disabled",size:n},v),g?.length>1?r.createElement(m.A,{items:g,isInteractive:!0,showListMarkers:!1,getItemKey:e=>e,renderListItem:e=>r.createElement(r.Fragment,null,e,r.createElement(c.A,{size:"original",actionable:!0,onClick:t=>N(e,t)})),renderMultipleItemsSummary:()=>null}):r.createElement(c.A,{size:"original",actionable:!0,onClick:e=>N(v,e)})):r.createElement(a.A,{size:n,color:t?p:"disabled"},r.createElement(u.sA,{id:"COMMON_FALLBACK"}))}},723544:(e,t,n)=>{n.d(t,{A:()=>i});var l=n(296540),r=n(927099),a=n(699784),c=n(360113);const i=({mac:e,compact:t=!1})=>e?l.createElement(c.A,{compact:t},l.createElement(r.A,{color:"secondary",size:"body"},l.createElement(a.sA,{id:"COMMON_MAC_ADDRESS"})),l.createElement(r.A,{color:"tertiary",size:"body"},e)):null},772317:(e,t,n)=>{n.d(t,{A:()=>f});var l,r=n(592563),a=n(296540),c=n(469733),i=n(217439),o=n(187483),s=n(699784),m=n(689965),E=n(86571),A=n(801081);!function(e){e.OPEN_MODAL="openModal"}(l||(l={}));const u=(0,A.Mz)(o.zn,e=>void 0!==e[l.OPEN_MODAL]);var d=n(523275),p=n(840279),C=n(919952);const I=e=>e[C.U.UIDB]||(0,d.A)(),_=(0,A.Mz)(I,({version:e})=>Boolean(e)),N=(0,A.Mz)(I,({devices:e})=>e||(0,p.A)());var g=n(765562),v=n(79871);const M=()=>{const e=(0,c.useDispatch)(),t=(0,c.useSelector)(_);return(0,a.useEffect)(()=>{t||(async()=>{const t=await fetch(g.A.fingerprintPublicDatabasePath),n=await t.json();e((0,v.$)(n))})()},[t,e]),t},h=({uidbDevice:e})=>{const t=(0,c.useSelector)(o.zn),n=t?.[l.OPEN_MODAL];return n?a.createElement(r.A,{onClick:()=>n(e)},a.createElement(i.A,{size:"medium",color:"inherit"},a.createElement(s.sA,{id:"DEVICE_SHOW_DETAILS"}))):null},O=({shortname:e})=>{const t=(0,c.useSelector)((e=>(0,A.Mz)(N,t=>t.find(t=>t.shortnames?.includes(e))||(0,d.A)()))(e));return M(),t?.compliance?a.createElement(m.A,{type:m.I.ACCORDION,items:[{id:"compliance",label:a.createElement(E.A,{id:"COMMON_COMPLIANCE"}),renderContent:()=>a.createElement(h,{uidbDevice:t}),openByDefault:!0}]}):null},f=({shortname:e})=>(0,c.useSelector)(u)?a.createElement(O,{shortname:e}):null},812454:(e,t,n)=>{n.d(t,{A:()=>G});var l=n(296540),r=n(71479),a=n(566723),c=n(218234),i=n(294303),o=n(217439),s=n(998837),m=n(842630),E=n(224948),A=n(699784),u=n(469733),d=n(824182),p=n(264963),C=n(822336),I=n(705145);const _=(0,r.A)(i.A)`
  flex-direction: column;
  margin-top: ${a.kc};
  padding-top: ${a.kc};
  border-top: ${({theme:{themeName:e}})=>C.Ay[`desktop-border-divider-${e}`]};
`,N=(0,r.A)(i.A)`
  width: 100%;
  justify-content: space-between;
`,g=(0,r.A)(i.A)`
  gap: ${a.Ln};
  align-items: center;
`,v=(0,r.A)(I.A)`
  max-width: 150px;
`,M=(0,l.memo)(({mac:e,replacementMac:t})=>{const n=(0,u.useDispatch)(),[r,a]=(0,l.useState)(!1),c=(0,l.useCallback)(()=>{a(!0),n((0,p.X2)(e)).finally(()=>{a(!1)})},[n,e]);return l.createElement(_,null,l.createElement(N,null,l.createElement(v,{isTruncated:!0,size:"medium",color:"text-2"},l.createElement(A.sA,{id:"DEVICE_REPLACEMENT_DEVICE"})),l.createElement(g,null,l.createElement(o.A,{size:"medium",color:"text-3"},t),l.createElement(d.A,{actionable:!0,onClick:c,disabled:r}))))}),h=(0,r.A)(i.A)`
  flex-direction: column;
  gap: ${a.kc};
`;var O=n(709690),f=n(823858),L=n(768195);const D=({state:e},{uBlue06:t,orange06:n})=>{switch(e){case L.gQ.WAITING_FOR_REPLACEMENT:return l.createElement(O.A,{size:"original",color:t,variant:"fill"});case L.gQ.WAITING_FOR_REPLACED_DEVICE_DISCONNECT:case L.gQ.INCOMPATIBLE_REPLACEMENT:case L.gQ.REPLACEMENT_ALREADY_ASSIGNED:case L.gQ.CANNOT_REPLACE:default:return l.createElement(f.A,{size:"original",color:n,variant:"fill"})}},P=({state:e})=>{switch(e){case L.gQ.WAITING_FOR_REPLACEMENT:return"DEVICE_REPLACEMENT_PENDING_WAITING_FOR_REPLACEMENT";case L.gQ.WAITING_FOR_REPLACED_DEVICE_DISCONNECT:return"DEVICE_REPLACEMENT_PENDING_WAITING_FOR_REPLACED_DEVICE_DISCONNECT";case L.gQ.INCOMPATIBLE_REPLACEMENT:return"DEVICE_REPLACEMENT_PENDING_INCOMPATIBLE_REPLACEMENT";case L.gQ.REPLACEMENT_ALREADY_ASSIGNED:case L.gQ.CANNOT_REPLACE:default:return"DEVICE_REPLACEMENT_PENDING_CANNOT_REPLACE"}},b=(0,l.memo)(({mac:e,replacement:t})=>{const{motifPalette:n}=(0,s.u)();return t?.device_mac?l.createElement(m.A,null,l.createElement(E.A,{icon:D(t,n)},l.createElement(h,null,l.createElement(o.A,{size:"medium",color:"text-2"},l.createElement(A.sA,{id:P(t),values:{b:A.b}}))),l.createElement(M,{mac:e,replacementMac:t.device_mac}))):null});var k=n(211908),y=n(188912),T=n(470962),x=n(281884),R=n(130648),w=n(392699),z=n(124092),S=n(236037),F=n(683086);const V=(0,r.A)(i.A)`
  & > :first-child {
    margin-top: ${a.kc};
  }
`,G=({activeItem:e,activeItem:{deviceState:t,uplink:n,mac:r,model:i,type:o,replacement:s},showPortOverview:m,hidePortsButton:E,isStacking:A,multipleDisplayedDevicesData:u,overviewChildren:d,children:p})=>{const C=(0,l.useMemo)(()=>(0,x.H)(t,n?.type),[t,n?.type]),I=Boolean(e?.port_table?.length),_=m&&I;return l.createElement(l.Fragment,null,l.createElement(z.A,{activeItem:e,isOffline:C===w.v.OFFLINE,description:l.createElement(y.A,{activeItem:e,connectionStatus:C}),meshingDescription:l.createElement(R.A,{activeItem:e,connectionStatus:C}),isStacking:A},d,_?l.createElement("div",{style:{marginTop:a.Ln}},l.createElement(c.A,{activeItem:e,disableOnPortClick:!0,showFullScreenDiagramButton:!1,useBubbleWrapper:!1,multipleDisplayedDevicesData:u,isStacking:A})):null,l.createElement(V,{gap:a.kc,flexDirection:"column"},l.createElement(S.A,{activeItem:e}),!E&&I?l.createElement(F.A,{mac:r}):null),p),C===w.v.OFFLINE?l.createElement(T.A,null,s?.device_mac?null:l.createElement(k.A,{mac:r,model:i,type:o})):null,l.createElement(b,{mac:r,replacement:s}))}},842630:(e,t,n)=>{n.d(t,{A:()=>c});var l=n(469733),r=n(296540),a=n(602021);const c=({children:e=null})=>(0,l.useSelector)(a.EL)?null:r.createElement(r.Fragment,null,e)}}]);