"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[28294],{776288(e,t,n){n.d(t,{A:()=>r});const r={PCAP:4194304,HWOFFLOAD_QOS_AND_SMART_QUEUE:2147483648,SUPPORT_FILE:65536}},78853(e,t,n){n.d(t,{A:()=>O});var r,a=n(592563),i=n(296540),l=n(469733),o=n(217439),c=n(187483),s=n(916537),m=n(689965),d=n(86571),u=n(801081);!function(e){e.OPEN_MODAL="openModal"}(r||(r={}));const p=(0,u.Mz)(c.zn,e=>void 0!==e[r.OPEN_MODAL]);var E=n(856632),_=n(957866);const A=({uidbDevice:e})=>{const t=(0,l.useSelector)(c.zn),n=t?.[r.OPEN_MODAL];return n?i.createElement(a.A,{onClick:()=>n(e)},i.createElement(o.A,{size:"medium",color:"inherit"},i.createElement(s.sA,{id:"DEVICE_SHOW_DETAILS"}))):null},w=({shortname:e})=>{(0,_.A)();const t=(0,l.useSelector)((0,i.useMemo)(()=>(0,E.$E)(e),[e]));return t?.compliance?i.createElement(m.A,{type:m.I.ACCORDION,items:[{id:"compliance",label:i.createElement(d.A,{id:"COMMON_COMPLIANCE"}),renderContent:()=>i.createElement(A,{uidbDevice:t}),openByDefault:!0}]}):null},O=({shortname:e})=>(0,l.useSelector)(p)?i.createElement(w,{shortname:e}):null},686130(e,t,n){n.d(t,{A:()=>D});var r=n(469733),a=n(296540),i=n(592510),l=n(860631),o=n(666889),c=n(635740),s=n(745667),m=n(634229),d=n(602021),u=n(776288),p=n(71479),E=n(180524),_=n(369702),A=n(916537),w=n(780811),O=n(837612),v=n(602197),C=n(199582);const g=(0,p.A)("span")`
  width: 100%;
`,h=({activeItem:e,onClick:t,disabledWithReason:n,[C.L]:r})=>{const i=(e=>{const t=(0,O.S9)(e);return e.disabled||t!==v.g.CONNECTED||!(0,w.sc7)(t)?"DEVICE_PCAP_DISABLED_TOOLTIP":null})(e)||n;return a.createElement(E.A,{description:i?a.createElement(A.sA,{id:i}):void 0},a.createElement(g,{...r&&{[C.L]:r}},a.createElement(_.A,{onClick:t,isDisabled:!!i,width:"full"},a.createElement(A.sA,{id:"COMMON_PACKET_CAPTURE"}))))};var f=n(845030),N=n(398300),M=n(968906),P=n(683086),y=n(132196),I=n(566723),b=n(294303);const R=y.AH`
  &:empty {
    display: none;
  }
`,T=(0,p.A)("div")`
  flex: 1 1 0;
  min-width: 33%;
  box-sizing: border-box;
  padding-right: ${I.kc};

  &:last-child {
    padding-right: 0;
  }
`,S=({children:e,...t})=>a.createElement(b.A,{marginTop:I.kc,className:R,...t},a.Children.map(e,e=>e?a.createElement(T,{className:R},e):null)),D=({activeItem:e,showPortsButton:t,showCaptureButton:n})=>{const p=(0,r.useDispatch)(),E=(0,r.useSelector)(d.vc),_=(0,r.useSelector)(o.ar),A=n&&E===e.mac&&_&&(0,l.W4)(e,u.A.PCAP),w=t&&e.port_table?.length>0;(0,a.useEffect)(()=>{p((0,m.Sk)(void 0,{crudCacheStrategy:{type:i.e.CACHE}})),p((0,s.hh)(void 0,{crudCacheStrategy:{type:i.e.CACHE}}))},[p]);const O=(0,a.useCallback)(()=>{p((0,f.XP)({type:N.H.PACKET_CAPTURE,id:e.mac,customData:{captureDeviceType:c.X.GATEWAY}}))},[p,e.mac]);return a.createElement(a.Fragment,null,a.createElement(S,null,w?a.createElement(P.A,{mac:e.mac}):null,A?a.createElement(h,{activeItem:e,captureDeviceType:c.X.GATEWAY,onClick:O,...M.A.addDataTestId(M.A.TestId.SIDE_PANEL_TRIGGER)}):null))}},635740(e,t,n){var r,a;n.d(t,{A:()=>r,X:()=>a}),function(e){e.DEFAULT="default",e.IN_PROGRESS="inProgress",e.READY="ready",e.DOWNLOADING="downloading",e.STOPPING="stopping"}(r||(r={})),function(e){e.AP="ap",e.GATEWAY="gateway"}(a||(a={}))},666889(e,t,n){n.d(t,{ar:()=>f,ax:()=>N,r8:()=>M});var r=n(801081),a=n(189601),i=n(513180),l=n(573531),o=n(938325),c=n(477544),s=n(339879),m=n(959207),d=n(233187),u=n(366188),p=n(535657),E=n(615720),_=n(532419),A=n(180830),w=n(635740);const O=[d.rR.CORPORATE,d.rR.GUEST],v=e=>void 0===e||e,C=({_id:e,name:t,enabled:n,ip_subnet:r,ipv6_subnet:a,wan_networkgroup:i,vpn_type:o,purpose:c,l2tp_interface:s,openvpn_interface:d,wireguard_interface:u,ipsec_interface:E,sdwan_hub_spoke_local_wan_id:_},A)=>({_id:e,enabled:v(n),name:t||l.L,ip_subnet:A?l.L:(0,m.Qe)({ip_subnet:r,ipv6_subnet:a},p.L),wan_networkgroup:i,vpn_type:o,ipsec_interface:E,l2tp_interface:s,openvpn_interface:d,purpose:c,sdwan_hub_spoke_local_wan_id:_,wireguard_interface:u}),g=(e,t)=>e?e===i.C.WAN?t.wan1:t[e.toLocaleLowerCase()]||{}:{},h=(0,a.WY)()((0,r.Mz)(u.Ct,_.U$,s.$D,_.AL,(e,t,n,r)=>[...e.reduce((e,n)=>(n&&t.network_table?.some(({_id:e})=>e===n._id)&&v(n.enabled)&&n.gateway_type!==d.xk.SWITCH&&O.includes(n.purpose)&&e.push(C(n)),e),[]),...n.reduce((e,{configuration:n={}})=>{if((({purpose:e,wan_networkgroup:t},n)=>{if(e!==d.rR.WAN)return!1;if(t===i.C.WAN_LTE_FAILOVER)return!0;const r=g(t,n);return!!r?.up})(n,t)){let a;if(n.wan_networkgroup===i.C.WAN_LTE_FAILOVER)a=r?.lte_ip;else{const e=g(n.wan_networkgroup,t);a=e?.ip}e.push({...C(n),...a?{ip_subnet:a}:{}})}return e},[])]),e=>e),f=(0,a.WY)()((0,r.Mz)(h,e=>Boolean(e.length)),e=>e),N=(e,t)=>{switch(t){case w.X.AP:return(e=>(0,r.Mz)(u.Ct,c.Ag,(0,A.a5)(e),_.fq,_.Dx,(e,t,n,r,a)=>{const i=t.reduce((e,{enabled:t,networkconf_id:r,ap_group_ids:a=[]})=>(t&&n.some(({_id:e})=>a.includes(e))&&e.push(r),e),[]);return e.reduce((e,t)=>(E.A.includes(t.purpose)&&i.includes(t._id)&&e.push(C(t,(0,o.cH)({gateway_device:t.gateway_device,purpose:t.purpose},r,a))),e),[])}))(e);case w.X.GATEWAY:return h;default:return()=>[]}},M=e=>(0,r.Mz)(c.Ag,t=>{const n=t.filter(t=>t.networkconf_id===e);return[...new Set(n.flatMap(e=>e.wlan_bands))]})},400242(e,t,n){n.d(t,{A:()=>c});var r=n(296540),a=n(217439),i=n(916537),l=n(780811),o=n(360113);const c=({ip:e,lan_ip:t,ethernet_overrides:n,port_table:c,type:s,wan:m=!1,lan:d=!1,compact:u=!1})=>{const p=(0,l.o_Q)({type:s,ip:e,lan_ip:t,ethernet_overrides:n,port_table:c}),E=(0,r.useMemo)(()=>m?"DEVICE_PROPERTY_OVERVIEW_WAN_IP_ADDRESS":d?"DEVICE_PROPERTY_OVERVIEW_LAN_IP_ADDRESS":"COMMON_IP_ADDRESS",[m,d]);return p?r.createElement(o.A,{compact:u},r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(i.sA,{id:E})),r.createElement(a.A,{color:"text-3",size:"medium"},p)):null}},205830(e,t,n){n.d(t,{A:()=>d});var r=n(296540),a=n(217439),i=n(83438),l=n(566723),o=n(294303),c=n(916537),s=n(780811),m=n(360113);const d=({sys_stats:e,flexProps:t,withTooltip:n,compact:d=!1})=>{const u=(0,s.eiG)(e);return u?r.createElement(m.A,{flexProps:t,compact:d},r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(c.sA,{id:"COMMON_LOAD_AVERAGE"})),n?r.createElement(o.A,{alignItems:"center",gap:l.YC},r.createElement(a.A,{color:"text-3",size:"medium"},u),r.createElement(i.A,{description:r.createElement(c.sA,{id:"DEVICE_PROPERTY_OVERVIEW_LOAD_AVERAGE_TOOLTIP"}),placement:"top start"})):r.createElement(a.A,{color:"text-3",size:"medium"},u)):null}},559674(e,t,n){n.d(t,{A:()=>s});var r=n(296540),a=n(217439),i=n(115829),l=n(294303),o=n(916537),c=n(360113);const s=({connection_network_name:e})=>e?r.createElement(c.A,null,r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(o.sA,{id:"COMMON_NETWORK"})),r.createElement(l.A,null,r.createElement(i.A,{color:"text-3",size:"medium"},e))):null},442728(e,t,n){n.d(t,{A:()=>W});var r=n(822336),a=n(469733),i=n(296540),l=n(271856),o=n(963070),c=n(823858),s=n(382389),m=n(592510),d=n(879905),u=n(596441),p=n(398300),E=n(6176),_=n(703447),A=n(689965),w=n(845030),O=n(6510),v=n(532419),C=n(691294),g=n(239417),h=n(984652),f=n(643633),N=n(573531),M=n(768195);const P=({name:e,mac:t,model:n})=>e===t&&n?n:e,y=e=>{switch(e?.uplink?.type){case M.au.WIRE:return e?.connection_network_name||N.L;case M.au.WIRELESS:return e?.connection_network_name||e?.uplink?.essid||N.L;default:return N.L}};var I,b=n(758649),R=n(396660),T=n(566723),S=n(115829);!function(e){e.NAME="name",e.PORT="port",e.NETWORK="network"}(I||(I={}));const D={[I.NAME]:"COMMON_NAME",[I.PORT]:"COMMON_PORT",[I.NETWORK]:"COMMON_NETWORK"};var k=n(294303),z=n(916537),x=n(216211);const L=({port:e,mac:t})=>{const{handleGoToPortsPage:n}=(0,x.e)();return i.createElement(b.A,{variant:"inline",type:"button",size:"medium",onClick:()=>{n(t,e)}},e)},W=({activeItem:e})=>{const{themeName:t}=(0,s.u)(),n=(0,a.useDispatch)(),N=(0,a.useSelector)(v.ID),M=(0,i.useMemo)(()=>((e,t)=>(e||[]).map(e=>{const n=t.find(({mac:t})=>t===e.mac||t===e.ap_mac);return n?{...e,id:n._id,name:(0,O.Q)(n),activeItem:n,model:(0,O.Lm)(n.model)}:null}).filter(Boolean))(e.downlink_table,N),[e.downlink_table,N]),b=(0,a.useSelector)((0,g.Ax)(e.mac)).filter(e=>e.type===C.sK.WIRED);(0,i.useEffect)(()=>{n((0,h.$3)(void 0,{crudCacheStrategy:{type:m.e.CACHE}}))},[n]);const x=(0,i.useMemo)(()=>b.map(e=>({id:`${e.id}${e.sw_port}`,name:e.display_name,mac:e.mac,network:e.network_name,port:e.sw_port,image:i.createElement(_.A,{client:e}),isClient:!0})),[b]),W=(0,i.useMemo)(()=>M.map(({id:e,name:n,mac:a,port_idx:o,activeItem:s})=>({id:`${e}${o}`,name:P({name:n,mac:s.mac,model:s.model}),mac:a,network:y(s),port:o,image:i.createElement(E.A,{model:s.model}),isClient:!1,warning:s.detailed_states?.negotiated_low_uplink_port_speed?i.createElement(l.A,{portal:!0,description:i.createElement(f.A,{color:"text-1"})},i.createElement(c.A,{size:"medium",color:r.Ay[`desktop-color-orange-06-${t}`]})):void 0})),[M,r.Ay[`desktop-color-orange-06-${t}`]]),V=(0,i.useMemo)(()=>Array.prototype.concat.apply([],[x,W]),[W,x]),G=(0,i.useMemo)(()=>(({mac:e})=>[{id:I.NAME,label:i.createElement(z.sA,{id:D[I.NAME]}),renderCell:({image:e,name:t})=>i.createElement(k.A,{alignItems:"center",justifyContent:"center",width:"100%"},i.createElement(k.A,{alignItems:"center",justifyContent:"center",height:"20px",width:"20px"},e),i.createElement(S.A,{color:"inherit",size:"medium",style:{width:"170px",paddingLeft:"6px",paddingRight:"6px"}},t)),width:170,compare:(0,R.l0)(({name:e})=>e)},{id:I.NETWORK,label:i.createElement(z.sA,{id:D[I.NETWORK]}),renderCell:({network:e})=>i.createElement(S.A,{color:"inherit",size:"medium"},e),width:112,compare:(0,R.l0)(({network:e})=>e)},{id:I.PORT,align:"right",label:i.createElement(z.sA,{id:D[I.PORT]}),renderCell:({port:t,warning:n})=>i.createElement(k.A,{justifyContent:"flex-end",alignItems:"center",flexGrow:1},i.createElement(k.A,{marginTop:-2,marginRight:T.YC},n),i.createElement(L,{port:t,mac:e})),width:54,compare:(0,R.l0)(({port:e})=>e)}])({mac:e.mac}),[e.mac]),U=(0,i.useCallback)(({mac:e,isClient:t})=>{n((0,w.XP)({type:t?p.H.CLIENT:p.H.DEVICE,id:e}))},[n]),{rowLimit:Y,renderFooter:K}=(0,d.A)(V.length,{defaultCount:10});return V.length?i.createElement(A.A,null,i.createElement(o.A,{items:V,columns:G,idField:"id",initialSortBy:"port",initiallySortAscending:!0,disableColumnFilters:!0,rowOffset:0,disableSelection:!0,onRowClick:U,rowLimit:Y,renderFooter:()=>K,rowHeight:u.I.ROW_HEIGHT,truncateHeaderCells:!0})):null}},15244(e,t,n){n.d(t,{A:()=>b});var r=n(469733),a=n(296540),i=n(979106),l=n(362412),o=n(594827),c=n(513180),s=n(566723),m=n(294303),d=n(689965),u=n(916537),p=n(339879),E=n(316144),_=n(927806),A=n(993341),w=n(28536);var O=n(659243),v=n(217439),C=n(777916),g=n(137298),h=n(817518),f=n(348466),N=n(360113),M=n(258117),P=n(723544),y=n(146784);const I=({uplinkAttrs:e,configuration:t={wan_dns1:void 0,wan_dns2:void 0,wan_dhcpv6_pd_size:void 0,wan_type_v6:void 0,wan_prefixlen:void 0},details:n={},gatewayPort:{ipv6:r=[]}={}})=>{const{ip:i,speed:l,rx_packets:o,rx_bytes:c,tx_packets:s,tx_bytes:d,"rx_bytes-r":p,"tx_bytes-r":E,mac:_}=e||{};return a.createElement(m.A,{height:"100%",flexDirection:"column"},i?a.createElement(N.A,null,a.createElement(v.A,{size:"medium"},a.createElement(u.sA,{id:"COMMON_IP_ADDRESS"})),a.createElement(v.A,{size:"medium",color:"text-3"},i)):null,r.length?a.createElement(y.A,{ipv6_address:r,wan_dhcpv6_pd_size:t.wan_type_v6===h.c.SLAAC||t.wan_type_v6===h.c.DHCPV6?t.wan_dhcpv6_pd_size:void 0}):null,a.createElement(P.A,{mac:_}),a.createElement(M.A,{portSpeed:l}),n.service_provider?.name?a.createElement(N.A,null,a.createElement(v.A,{size:"medium"},a.createElement(u.sA,{id:"COMMON_ISP"})),a.createElement(v.A,{size:"medium",color:"text-3"},n.service_provider.name)):null,a.createElement(a.Fragment,null,t.wan_dns1?a.createElement(N.A,null,a.createElement(v.A,{color:"text-2",size:"medium"},a.createElement(u.sA,{id:"COMMON_DNS_SERVER_N",values:{n:1}})),a.createElement(v.A,{color:"text-3",size:"medium"},t.wan_dns1)):null,t.wan_dns2?a.createElement(N.A,null,a.createElement(v.A,{color:"text-2",size:"medium"},a.createElement(u.sA,{id:"COMMON_DNS_SERVER_N",values:{n:2}})),a.createElement(v.A,{color:"text-3",size:"medium"},t.wan_dns2)):null),o&&c?a.createElement(N.A,null,a.createElement(v.A,{size:"medium"},a.createElement(u.sA,{id:"COMMON_DOWN_PKTS_BYTES"})),a.createElement(v.A,{size:"medium",color:"text-3"},(0,O.A)(o,{spacer:f.HY})," / ",(0,g.z3)(c))):null,s&&d?a.createElement(N.A,null,a.createElement(v.A,{size:"medium"},a.createElement(u.sA,{id:"COMMON_UP_PKTS_BYTES"})),a.createElement(v.A,{size:"medium",color:"text-3"},(0,O.A)(s,{spacer:f.HY})," / ",(0,g.z3)(d))):null,a.createElement(N.A,null,a.createElement(v.A,{size:"medium"},a.createElement(u.sA,{id:"DEVICE_PROPERTY_UPLINK_DOWN_ACTIVITY"})),a.createElement(v.A,{size:"medium",color:"text-3"},void 0!==p?a.createElement(C.A,{type:"bytes",input:p,options:"bitrate",size:"body",color:"inherit"}):a.createElement(u.sA,{id:"COMMON_FALLBACK"}))),a.createElement(N.A,null,a.createElement(v.A,{size:"medium"},a.createElement(u.sA,{id:"DEVICE_PROPERTY_UPLINK_UP_ACTIVITY"})),a.createElement(v.A,{size:"medium",color:"text-3"},void 0!==E?a.createElement(C.A,{type:"bytes",input:E,options:"bitrate",size:"body",color:"inherit"}):a.createElement(u.sA,{id:"COMMON_FALLBACK"}))))},b=({activeItem:e})=>{const{formatMessage:t}=(0,u.tz)(),n=((e,t)=>{const n=(e.port_table||[]).filter(({up:e})=>e);return Object.values(w.s).reduce((r,a)=>{const i=1===(0,o.si)(a)?c.C.WAN:a.toUpperCase();if(n.find(({ifname:t})=>t===(0,E.KF)(i,{ethernet_overrides:e.ethernet_overrides,model:e.model,usg_caps:e.usg_caps,usg2_caps:e.usg2_caps}))||(l=e[a],l?.type===A.YT)){const n=(0,_.q$)(e,a);n&&r.push({wanNetworkGroup:i,uplinkAttrs:n,...(()=>{const{configuration:e={},details:n={}}=t.find(({configuration:{wan_networkgroup:e}})=>e===i)||{};return{configuration:e,details:n}})(),gatewayPort:e[a]})}var l;return r},[])})(e,(0,r.useSelector)(p.ht)),O=(0,a.useMemo)(()=>n.map(({wanNetworkGroup:e})=>({id:e,label:t({id:"COMMON_NETWORK_PURPOSE_WANX"},{number:(0,o.si)(e)})})),[t,n]),v=(0,a.useMemo)(()=>n.map(({wanNetworkGroup:e,configuration:t={}})=>({value:e,label:t.name||"",additionalInfo:a.createElement(u.sA,{id:"COMMON_NETWORK_PURPOSE_WANX",values:{number:(0,o.si)(e)}})})),[n]),[C,g]=(0,a.useState)(n?.[0]?.wanNetworkGroup||c.C.WAN),h=n.length<=4,f=(0,a.useMemo)(()=>n.find(({wanNetworkGroup:e})=>e===C)||{},[n,C]),N=(0,a.useMemo)(()=>[{id:"wan",openByDefault:!0,label:a.createElement(u.sA,1===O.length?{id:"COMMON_NETWORK_PURPOSE_WANX",values:{number:1}}:{id:"COMMON_NETWORK_PURPOSE_WAN"}),renderContent:()=>a.createElement(a.Fragment,null,O.length>1?a.createElement(m.A,{paddingBottom:s.kc,inline:h},h?a.createElement(i.A,{tabs:O,variant:"filter",onSelectTab:({id:e})=>{g(e)},selectedTab:C}):a.createElement(l.A,{options:v,width:"100%",variant:"secondary",value:C,onChange:({value:e})=>{g(e)}})):null,a.createElement(I,{...f}))}],[O,h,v,C,g,f]);return f?a.createElement(d.A,{type:d.I.ACCORDION,items:N}):null}},606714(e,t,n){n.d(t,{A:()=>E});var r=n(296540),a=n(146784),i=n(294303),l=n(689965),o=n(999063),c=n(559674),s=n(32753),m=n(723544),d=n(205830),u=n(400242),p=n(57759);const E=({name:e,model:t,ip:n,ipv6:E,lan_ip:_,mac:A,displayable_version:w,connection_network_name:O,uptime:v,sys_stats:C,systemStatsMem:g,type:h,deviceState:f,ethernet_overrides:N,port_table:M})=>r.createElement(l.A,null,r.createElement(i.A,{height:"100%",flexDirection:"column"},r.createElement(u.A,{ip:n,lan_ip:_,type:h,ethernet_overrides:N,port_table:M}),r.createElement(a.A,{ipv6_address:E}),r.createElement(m.A,{mac:A}),r.createElement(p.A,{name:e,model:t,mac:A,type:h,displayable_version:w,uptime:v,deviceState:f}),r.createElement(c.A,{connection_network_name:O}),r.createElement(o.A,{uptime:v}),r.createElement(s.A,{systemStatsMem:g}),r.createElement(d.A,{sys_stats:C})))},766624(e,t,n){n.d(t,{A:()=>c});var r=n(296540),a=n(271856),i=n(709690),l=n(284428),o=n(566723);const c=({description:e,isInteractive:t,portal:n=!0,cursorType:c,title:s,position:m,width:d,iconProps:u,disabled:p=!1})=>{const E=(0,l.Im)()||p,_=(0,l.q)();return r.createElement(a.A,{description:e,portal:n,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:c,title:s,position:m,width:d,disableHover:_},r.createElement(i.A,{isActive:!0,size:"original",opacity:E?o.xN:void 0,...u}))}},451449(e,t,n){n.d(t,{I:()=>r});const r=(0,n(296540).createContext)({fields:!1,labels:!1,tooltipPopovers:!1,tooltipIcons:!1})},284428(e,t,n){n.d(t,{Im:()=>c,iL:()=>s,mQ:()=>l,pv:()=>i,q:()=>o});var r=n(296540),a=n(451449);function i(){return(0,r.useContext)(a.I)}function l(){return i().fields}function o(){return i().tooltipPopovers}function c(){return i().tooltipIcons}function s(){return i().labels}},957866(e,t,n){n.d(t,{A:()=>c});var r=n(296540),a=n(469733),i=n(765562),l=n(79871),o=n(856632);const c=()=>{const e=(0,a.useDispatch)(),t=(0,a.useSelector)(o.eo);return(0,r.useEffect)(()=>{t||(async()=>{const t=await fetch(i.A.fingerprintPublicDatabasePath),n=await t.json();e((0,l.$)(n))})()},[t,e]),t}},856632(e,t,n){n.d(t,{$E:()=>m,eo:()=>c});var r=n(801081),a=n(523275),i=n(840279),l=n(919952);const o=e=>e[l.U.UIDB]||(0,a.A)(),c=(0,r.Mz)(o,({version:e})=>Boolean(e)),s=(0,r.Mz)(o,({devices:e})=>e||(0,i.A)()),m=e=>(0,r.Mz)(s,t=>t.find(({shortnames:t})=>e&&(t||[]).includes(e))||(0,a.A)());(0,r.Mz)(s,e=>{const t=new Map;for(let n=0;n<e.length;n+=1){const r=e[n].power?.baseConsumption;if(void 0!==r){const{shortnames:a}=e[n];for(let e=0;e<(a||[]).length;e+=1)t.set(a[e],r)}}return t})}}]);