"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[22790],{527206(e,t,s){s.d(t,{A:()=>l});var i=s(274934),o=s(470070),r=s(669439);const l=({isMeshing:e,isNotReady:t,children:s,hidden:l})=>(0,i.jsx)(r.A,{description:l?void 0:t?(0,i.jsx)(o.sA,{id:"COMMON_SUPERVISOR_DEVICE_STATE_NOT_AVAILABLE"}):e?(0,i.jsx)(o.sA,{id:"COMMON_DEVICE_SUPERVISOR_MESHING_DISABLED_TOOLTIP"}):void 0,children:(0,i.jsx)("span",{children:s})})},427431(e,t,s){s.d(t,{D:()=>E});var i=s(274934),o=s(602086),r=s(954702),l=s(843871),n=s(396489),a=s.n(n),d=s(470070),c=s(164205),_=s(184931),x=s(725989),A=s(843615),m=s(100978),p=s(309130),O=s(455425);const j={heartbeat_interval:"COMMON_HEARTBEAT",silence_threshold:"COMMON_SILENCE_THRESHOLD",power_off_duration:"COMMON_POWER_OFF_DURATION"},u={heartbeat_interval:"COMMON_HEARTBEAT_TOOLTIP",silence_threshold:"COMMON_SILENCE_THRESHOLD_TOOLTIP",power_off_duration:"COMMON_POWER_OFF_DURATION_TOOLTIP"},h=(0,o.memo)(({field:e})=>{const{values:t,setFieldValue:s}=(0,l.j7)(),o=(0,_.mQ)(),r=e.split(".").pop(),n=t.powerSupervisor.settings[r]/O.gG,a=c.KP[r]/O.gG,h=c.Av[r]/O.gG;return(0,i.jsxs)(m.A,{gap:p.kc,width:"100%",children:[(0,i.jsx)(m.A,{width:"100%",children:(0,i.jsx)(x.A,{style:{width:"100%"},value:n,onChange:t=>s(e,Number(t)*O.gG),minValue:a,maxValue:h,label:(0,i.jsx)(d.sA,{id:j[r]}),labelProps:{tooltipMessage:(0,i.jsx)(d.sA,{id:u[r]}),isTooltipDisabled:o},isDisabled:o})}),(0,i.jsx)(m.A,{style:{maxWidth:"105px"},children:(0,i.jsx)(A.A,{type:"number",value:n,variant:"secondary",contentAfter:(0,i.jsx)(d.sA,{id:"COMMON_UNIT_MIN"}),onChange:t=>{s(e,Number(t.target.value)*O.gG)},min:a,max:h,disabled:o})})]})}),E=()=>{const{values:e,setFieldValue:t}=(0,l.j7)(),s=(0,o.useMemo)(()=>a()((0,l.O6)(e,"powerSupervisor.settings"),c.R4),[e]),n=(0,_.mQ)();return(0,i.jsxs)(m.A,{flexDirection:"column",gap:p.kc,alignItems:"flex-start",children:[(0,i.jsx)(h,{field:"powerSupervisor.settings.heartbeat_interval"}),(0,i.jsx)(h,{field:"powerSupervisor.settings.silence_threshold"}),(0,i.jsx)(r.A,{onClick:()=>{t("powerSupervisor.settings.heartbeat_interval",c.R4.heartbeat_interval),t("powerSupervisor.settings.silence_threshold",c.R4.silence_threshold),t("powerSupervisor.settings.power_off_duration",c.R4.power_off_duration)},fontSize:"medium",isDisabled:s||n,children:(0,i.jsx)(d.sA,{id:"COMMON_ACTION_RESET_TO_DEFAULT"})})]})}},260288(e,t,s){s.d(t,{be:()=>l,i3:()=>r,r8:()=>o});var i=s(164205);const o="powerForm",r="new",l={id:r,site_id:"",enabled:!1,client_mac:"",power_sources:[],settings:i.R4}},732025(e,t,s){s.d(t,{A:()=>a});var i=s(274934),o=s(602086),r=s(376892),l=s(535322),n=s(560151);const a=(0,o.memo)(({mac:e,object:t})=>(0,i.jsx)(l.A,{type:l.I.ACCORDION,items:[{id:"systemPerformance",openByDefault:!1,label:(0,i.jsx)(r.A,{id:"DEVICE_PROPERTY_SYSTEM_STATISTICS"}),renderContent:()=>(0,i.jsx)(n.A,{mac:e,object:t})}]}))},773351(e,t,s){s.d(t,{A:()=>g});var i=s(274934),o=s(602086),r=s(938984),l=s(814557),n=s(600191),a=s(343954),d=s(247816),c=s(309130),_=s(100978),x=s(470070),A=s(708861),m=s(956978),p=s(434521),O=s(251323),j=s(332522),u=s(713053);const h=(0,d.A)("div")`
  display: flex;
  flex-direction: column;
`,E=(0,d.A)("div")`
  margin-top: ${c.Ln};
  padding-top: ${c.Ln};
  border-top: ${({theme:{themeName:e}})=>l.Ay[`desktop-border-divider-${e}`]};

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