"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[77322],{732025(e,t,i){i.d(t,{A:()=>a});var o=i(274934),l=i(602086),s=i(376892),r=i(535322),n=i(560151);const a=(0,l.memo)(({mac:e,object:t})=>(0,o.jsx)(r.A,{type:r.I.ACCORDION,items:[{id:"systemPerformance",openByDefault:!1,label:(0,o.jsx)(s.A,{id:"DEVICE_PROPERTY_SYSTEM_STATISTICS"}),renderContent:()=>(0,o.jsx)(n.A,{mac:e,object:t})}]}))},713053(e,t,i){i.d(t,{Ay:()=>h,Jv:()=>b,RH:()=>g,cs:()=>O});var o=i(274934),l=i(602086),s=i(505817),r=i(179102),n=i(164714),a=i(882316),c=i(711950),d=i(98526),m=i(247816),x=i(263705),u=i(306212),p=i(309130),A=i(100978),j=i(470070),E=i(956978),_=i(291508);const O=(0,m.A)("div",(0,_.A)("noTopBorder"))`
  display: grid;
  grid-template-columns: repeat(3, minmax(min-content, 1fr));
  grid-gap: ${p.YC};
  margin-top: ${p.Ln};
  ${({noTopBorder:e,theme:{themeName:t}})=>e?"":`\n  padding-top: ${p.Ln};\n  border-top: ${s.Ay[`desktop-border-divider-${t}`]};\n  `}
`,T=(0,m.A)(A.A)`
  color: ${({theme:{motifPalette:{text02:e}}})=>e};

  > span {
    white-space: nowrap;
  }
`,g=(0,m.A)(u.A,(0,_.A)("background","borderColor"))`
  background-color: ${e=>e.background};
  border-radius: 1px;
  border: ${({borderColor:e})=>e&&`1px solid ${e}`};
`,b=({label:e,icon:t})=>(0,o.jsxs)(T,{alignItems:"center",gap:p.YC,children:[(0,o.jsx)(A.A,{width:16,justifyContent:"center",children:t}),(0,o.jsx)(r.A,{size:"small",color:"text-3",children:e})]}),h=(0,l.memo)(({activeItem:e,noTopBorder:t})=>{const i=(0,E.Tl7)(e),l=(0,E.kYz)(e),r=(0,E.aR8)(e),m=(0,E.FeX)(e),{themeName:u,motifPalette:{lime06:p}}=(0,x.u)();return(0,o.jsxs)(O,{noTopBorder:t,children:[(0,o.jsx)(b,{icon:(0,o.jsx)(g,{status:"positive"}),label:(0,o.jsx)(j.sA,{id:"COMMON_ENABLED"})}),(0,o.jsx)(b,{icon:(0,o.jsx)(g,{borderColor:s.Ay[`desktop-color-neutral-04-${u}`],background:"transparent"}),label:(0,o.jsx)(j.sA,{id:"COMMON_DISABLED"})}),i||l||r||m?(0,o.jsx)(b,{icon:(0,o.jsx)(g,{background:s.Ay[`desktop-color-neutral-07-${u}`]}),label:(0,o.jsx)(j.sA,{id:"COMMON_DISCONNECTED"})}):null,l?(0,o.jsx)(b,{icon:(0,o.jsx)(g,{background:s.Ay[`desktop-color-neutral-03-${u}`]}),label:(0,o.jsx)(j.sA,{id:"DEVICE_OUTLET_STATE_NO_STATUS"})}):null,i||l?(0,o.jsx)(b,{icon:(0,o.jsx)(g,{background:p}),label:(0,o.jsx)(j.sA,{id:"DEVICE_PORT_STATE_MBPS",values:{speed:"100/10"}})}):null,r||m?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b,{icon:(0,o.jsx)(a.A,{size:"small",color:s.Ay[`desktop-color-neutral-08-${u}`]}),label:(0,o.jsx)(j.sA,{id:"DEVICE_OUTLET_STATE_DELIVERING"})}),(0,o.jsx)(b,{icon:(0,o.jsx)(c.A,{size:"small",color:s.Ay[`desktop-color-orange-06-${u}`]}),label:(0,o.jsx)(j.sA,{id:"DEVICE_OUTLET_STATE_WARNING"})}),(0,o.jsx)(b,{icon:(0,o.jsx)(g,{status:"destructive"}),label:(0,o.jsx)(j.sA,{id:"DEVICE_OUTLET_STATE_ERROR"})})]}):null,m?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b,{icon:(0,o.jsx)(n.A,{size:"small",color:s.Ay[`desktop-color-neutral-08-${u}`]}),label:(0,o.jsx)(j.sA,{id:"DEVICE_OUTLET_STATE_HIGH_PRIORITY"})}),(0,o.jsx)(b,{icon:(0,o.jsx)(d.A,{size:"small",color:s.Ay[`desktop-color-neutral-08-${u}`]}),label:(0,o.jsx)(j.sA,{id:"DEVICE_BATTERY_TYPE_EXTERNAL"})})]}):null]})})},332522(e,t,i){i.d(t,{A:()=>y});var o=i(274934),l=i(602086),s=i(492399),r=i(247816),n=i(977872),a=i(669439),c=i(586566),d=i(309130),m=i(510906),x=i(682662);const u={xlarge:{threshold:10,size:"24px",spacing:d.kc,marginSize:d.YC,iconSize:"original"},large:{threshold:12,size:"18px",spacing:"10px",marginSize:"10px",iconSize:"original"},medium:{threshold:15,size:"18px",spacing:"10px",marginSize:"3px",iconSize:"medium"},xxsmall:{threshold:34,size:"8px",spacing:"2px",marginSize:"2px",iconSize:"small"}};var p=i(100978),A=i(708861),j=i(340820),E=i(188481),_=i(163727),O=i(197571),T=i(940229),g=i(873247),b=i(461731),h=i(225889),v=i(820510),S=i(470070);const I=({battpool:{device_total_power_output:e,device_output_current:t,device_output_voltage:i,device_total_power_factor:l},outletsFrom:s,outletsTo:r,outletsType:n})=>(0,o.jsxs)(v.m,{children:[(0,o.jsxs)(v.Y,{id:"DEVICE_PROPERTIES_AC_OUTLETS",children:[s,"-",r]}),(0,o.jsx)(v.Y,{id:"DEVICE_OUTLET_PROTECTION_TYPE",children:(0,o.jsx)(S.sA,{id:n===E.s.SURGE?"DEVICE_SURGE":"DEVICE_SURGE_AND_BATTERY"})}),e?(0,o.jsx)(v.Y,{id:"COMMON_POWER",children:(0,o.jsx)(S.sA,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:Number(e).toFixed(2)}})}):null,t?(0,o.jsx)(v.Y,{id:"COMMON_CURRENT",children:(0,o.jsx)(S.sA,{id:"COMMON_UNIT_AMPERES_SHORT",values:{value:Number(t).toFixed(2)}})}):null,i?(0,o.jsx)(v.Y,{id:"COMMON_VOLTAGE",children:(0,o.jsx)(S.sA,{id:"COMMON_UNIT_VOLTAGE_SHORT",values:{value:Number(i).toFixed(2)}})}):null,l?(0,o.jsx)(v.Y,{id:"DEVICE_HEADER_POWER_FACTOR",children:Number(l).toFixed(2)}):null]});var C=i(291508);const f=(0,r.A)(p.A,(0,C.A)("verticalGap"))`
  &:not(:first-child) {
    margin-top: ${({verticalGap:e})=>e};
  }
`,z=(0,r.A)("div",(0,C.A)("marginSize","cellSize"))`
  width: ${({cellSize:e})=>e};
  height: ${({cellSize:e})=>e};

  &:not(:first-child) {
    margin-left: ${({marginSize:e})=>e};
  }
`,P=({data:e,activeItem:t,size:i,iconSize:l,outletSize:s,marginSize:r,spacing:n,disableTooltip:a,disableOnPortClick:c,tooltipPlacement:d,showBatteryPowered:u,isEU:p,offline:A,networkPort:j})=>e.outletType===E.s.LAN&&j?(0,o.jsx)(m.A,{extendedPort:j,centerIcon:e.centerIcon,marginLeft:r,portSize:s,portSizeOverride:i,disableOnPortClick:Boolean(c),tooltipPlacement:d}):(0,o.jsx)(x.A,{activeItemMac:t.mac,cellData:e,marginSize:r,cellSize:i,iconSize:l,iconRotation:e.iconRotation,centerIcon:e.centerIcon,verticalGap:n,disableOnPortClick:c,isBatteryMode:t.vbms_table?.is_battery_mode,tooltipPlacement:d,disableTooltip:a,showBatteryPowered:u,isEU:p,offline:A}),R=({outletData:e,rowIndex:t,dataIndex:i,activeItem:l,size:s,marginSize:r,outletSize:n,iconSize:m,spacing:x,outlets:u,vertical:A,tooltipPlacement:j,isEU:O,offline:T})=>{const g=Array.isArray(u[e.outletType])?u[e.outletType].sort((e,t)=>e-t):[],b=e.outletType===E.s.SURGE&&l.vbms_table?.is_battery_mode,h=(0,c.sQ)(e,_.A.AUTO_RELAY)&&!b,v=j||(A?0===i?"left":"right":0===t?"top":"bottom");return(0,o.jsx)(a.A,{description:h?(0,o.jsx)(I,{battpool:l.vbms_table?.battpool||{},outletsFrom:g[0],outletsTo:g.at(-1),outletsType:e.outletType}):void 0,placement:v,offset:8,children:(0,o.jsx)(p.A,{flexDirection:A?"column":"row",alignItems:"flex-end",gap:d.YC,children:e.subOutlets?.map(a=>a?(0,o.jsx)(P,{data:e,activeItem:l,size:s,outletSize:n,iconSize:m,marginSize:e.marginLeft||r,spacing:x,disableTooltip:!0,disableOnPortClick:!0,showBatteryPowered:e.showBatteryPowered,tooltipPlacement:j,isEU:O,offline:T},`SubOutlet-${t+1}-${i+1}-${a}`):(0,o.jsx)(z,{cellSize:s,marginSize:r},`OutletSpacer-${t+1}-${i+1}-${a}`))})})},y=(0,l.memo)(({activeItem:e,disableOnPortClick:t,sizeOverride:i,tooltipPlacement:r,isEU:a=!1,offline:c})=>{const{outletsDiagram:d=[],primaryOutletGroupCount:m=0,outlets:x={}}=(0,j.j)(e.model),p=d.length?(0,A.FP)(d,e.model):(0,A.ST)(m,e.model),E=(0,s.A)(p.map(e=>e.length))||0,_=(i?u[i]:Object.values(u).find(e=>E<=e.threshold))||u.small,{size:v,spacing:S,iconSize:I=0,marginSize:C}=_,y=(0,n.d4)(g.wD),N=(0,n.d4)(O.wf),D=(0,n.d4)(b.G),$=(0,l.useMemo)(()=>(0,T.Vi)(e,y,[],[],N,!1,D,void 0),[e,y,N,D]);return(p||[]).length?(0,o.jsx)(o.Fragment,{children:p.map((i,l)=>(0,o.jsx)(f,{"align-items":"flex-end",verticalGap:S,children:i.map((i,s)=>{if(!i)return(0,o.jsx)(z,{cellSize:v,marginSize:C},`OutletSpacer-${l+1}-${s+1}-spacer`);const n={...i,...(0,A.o3)(e,void 0,i.outletNumber)||{}},d=$.find(e=>e.port_idx===n.portIdx);return n.subOutlets&&n.subOutlets.length>1?(0,o.jsx)(R,{outletData:n,rowIndex:l,dataIndex:s,activeItem:e,size:v,marginSize:n.marginLeft||C,outletSize:_,iconSize:I,spacing:S,outlets:x,vertical:n.vertical,isEU:a,offline:c},`MultiCell-${l+1}-${s+1}`):(0,o.jsx)(P,{data:n,activeItem:e,size:v,outletSize:_,iconSize:I,marginSize:n.marginLeft||C,spacing:S,tooltipPlacement:r,disableOnPortClick:t||n.nonClickable,isEU:a,showBatteryPowered:n.showBatteryPowered,offline:c,networkPort:d},`SingleCell-${l+1}-${s+1}`)})},`OutletLayoutRow-${l+1}`))}):(0,o.jsx)(h.A,{})},({activeItem:e,isEU:t,offline:i},{activeItem:o,isEU:l,offline:s})=>e.model===o.model&&e.outlet_table===o.outlet_table&&e.outlet_overrides===o.outlet_overrides&&t===l&&i===s)},773351(e,t,i){i.d(t,{A:()=>h});var o=i(274934),l=i(602086),s=i(179102),r=i(505817),n=i(711950),a=i(377067),c=i(247816),d=i(309130),m=i(100978),x=i(470070),u=i(708861),p=i(956978),A=i(434521),j=i(251323),E=i(332522),_=i(713053);const O=(0,c.A)("div")`
  display: flex;
  flex-direction: column;
`,T=(0,c.A)("div")`
  margin-top: ${d.Ln};
  padding-top: ${d.Ln};
  border-top: ${({theme:{themeName:e}})=>r.Ay[`desktop-border-divider-${e}`]};

  div:first-child {
    margin-bottom: ${d.xO};
  }
`,g=(0,c.A)(n.A)`
  color: ${({theme:{themeName:e}})=>r.Ay[`desktop-color-orange-06-${e}`]};
  height: 18px;
  width: 18px;
  margin-right: 10px;
`,b=(0,c.A)(a.A)`
  color: ${({theme:{themeName:e}})=>r.Ay[`desktop-color-green-06-${e}`]};
  height: 18px;
  width: 18px;
  margin-right: 10px;
`,h=({activeItem:e,activeItem:{outlet_table:t,outlet_ac_power_budget:i,outlet_ac_power_consumption:r,port_table:n},hidePorts:a,noDivider:c,gap:h=d.xO,legend:v,verticalLegend:S,tooltipPlacement:I="bottom end"})=>{const{usedPower:C,maxPower:f}=(0,l.useMemo)(()=>(0,u.hf)({outlet_table:t,outlet_ac_power_budget:i,outlet_ac_power_consumption:r}),[t,i,r]),z=(0,p.Tl7)(e)||(0,p.kYz)(e);return(0,o.jsxs)(O,{children:[(0,o.jsxs)(m.A,{justifyContent:"center",gap:h,alignItems:S?"center":void 0,children:[(0,o.jsx)(m.A,{flexDirection:"column",children:(0,o.jsx)(E.A,{disableOnPortClick:!0,activeItem:e,tooltipPlacement:I,isEU:(0,p.goQ)(e),offline:(0,p.aK8)((0,A.S9)(e))})}),n&&!a?(0,o.jsx)("div",{children:(0,o.jsx)(j.A,{activeItem:e,portSizeOverride:"19px",disableOnPortClick:z})}):null,S]}),S?null:v||(0,o.jsx)(_.Ay,{activeItem:e,noTopBorder:c}),C>f?(0,o.jsxs)(T,{children:[(0,o.jsxs)(m.A,{justifyContent:"space-between",children:[(0,o.jsx)(g,{}),(0,o.jsx)(s.A,{size:"small",children:(0,o.jsx)(x.sA,{id:"DEVICE_PROPERTIES_OUTLET_POWER_OVERLOAD_WARNING"})})]}),(0,o.jsxs)(m.A,{justifyContent:"space-between",children:[(0,o.jsx)(b,{}),(0,o.jsx)(s.A,{size:"small",children:(0,o.jsx)(x.sA,{id:"DEVICE_PROPERTIES_OUTLET_POWER_OVERLOAD_INFO"})})]})]}):null]})}},666461(e,t,i){i.d(t,{Ay:()=>A,u6:()=>p});var o=i(274934),l=i(505817),s=i(413402),r=i(247816),n=i(263705),a=i(309130),c=i(100978),d=i(470070),m=i(713053);const x=()=>{const{themeName:e,motifPalette:{lime06:t,uBlue01:i}}=(0,n.u)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(m.Jv,{icon:(0,o.jsx)(m.RH,{status:"positive"}),label:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(d.sA,{id:"COMMON_ENABLED"})," / ",(0,o.jsx)(d.sA,{id:"COMMON_MEDIA_GE"})]})}),(0,o.jsx)(m.Jv,{icon:(0,o.jsx)(m.RH,{color:t}),label:(0,o.jsx)(d.sA,{id:"COMMON_MEDIA_FE"})}),(0,o.jsx)(m.Jv,{icon:(0,o.jsx)(m.RH,{color:l.Ay[`desktop-color-neutral-05-${e}`]}),label:(0,o.jsx)(d.sA,{id:"DEVICE_NOT_POWERED"})}),(0,o.jsx)(m.Jv,{icon:(0,o.jsx)(s.A,{color:l.Ay[`desktop-color-neutral-08-${e}`]}),label:(0,o.jsx)(d.sA,{id:"DEVICE_BATTERY_BACKED"})}),(0,o.jsx)(m.Jv,{icon:(0,o.jsx)(m.RH,{borderColor:l.Ay[`desktop-color-ublue-03-${e}`],background:i}),label:(0,o.jsx)(d.sA,{id:"DEVICE_SURGE_NETWORK"})})]})},u=(0,r.A)(m.cs)`
  grid-template-columns: repeat(4, minmax(min-content, 0.5fr));
`,p=()=>(0,o.jsx)(u,{noTopBorder:!0,children:(0,o.jsx)(x,{})}),A=()=>(0,o.jsx)(c.A,{flexDirection:"column",gap:a.YC,children:(0,o.jsx)(x,{})})},377322(e,t,i){i.r(t),i.d(t,{default:()=>j});var o=i(274934),l=i(376892),s=i(535322),r=i(532565),n=i(956978),a=i(857780),c=i(412160),d=i(773351),m=i(113592),x=i(320018),u=i(732025),p=i(392184),A=i(666461);const j=({activeItem:e,activeItem:{mac:t,model:i,type:j}})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.A,{children:(0,o.jsx)(d.A,{activeItem:e,hidePorts:(0,n.kYz)(e)||(0,n.vqp)(e),noDivider:!0,...(0,n.vqp)(e)?{legend:(0,o.jsx)(A.u6,{})}:{}})}),(0,o.jsx)(s.A,{type:s.I.ACCORDION,items:[{id:"outlets",openByDefault:!0,label:(0,o.jsx)(l.A,{id:"COMMON_OUTLETS"}),renderContent:()=>(0,o.jsx)(p.A,{activeItem:e,hidePorts:!0})}]}),(0,o.jsx)(x.A,{mac:t,model:i,logType:m.F.DEVICE,ignoreActionableValues:[c.dl.DEVICE],label:"COMMON_HISTORY",hideClientTabs:!0}),(0,o.jsx)(u.A,{mac:t,object:j===a.bq.USW?r.qv.SW:r.qv.SP})]})}}]);