"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[16166],{689965(e,t,n){n.d(t,{A:()=>h,I:()=>i});var i,r=n(296540),a=n(822336),o=n(963724),d=n(71479),l=n(825032),m=n(566723),c=n(294303),s=n(311785);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(i||(i={}));const g=(0,d.A)(c.A,(0,s.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||a.Ay[n===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:n})=>n||(t?`0 ${e.spacing["spacing-l"]}`:e.spacing["spacing-l"])};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({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}})=>a.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,u=(0,d.A)(o.A,(0,s.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||a.Ay[n===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-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||a.Ay[t===l.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${m.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${m.Ln} ${m.Ln};
      }
    }
  }
`,h=({type:e,marginBottom:t,margin:n,padding:a,flex:o,width:d,nested:l,...m})=>"items"in m?r.createElement(u,{marginBottom:t,margin:n,padding:a,flex:o,nested:l,...m}):r.createElement(g,{nested:l,width:d,marginBottom:t,margin:n,padding:a,flex:o,isButtonList:e===i.BUTTON_LIST,...m},m.children)},538610(e,t,n){n.r(t),n.d(t,{default:()=>L});var i=n(469733),r=n(296540),a=n(217439),o=n(705145),d=n(903216),l=n(294303),m=n(689965),c=n(916537),s=n(801081),g=n(25553),u=n(87485),h=n(771805);const p="clientTrafficInsights",A=`${h.w}/client/:mac:/traffic-insights`,f="mac";var b=n(691189),$=n(275357),k=n(540739),x=n(13739);const v={},I=[$.dl.CLIENT],L=({activeItem:{mac:e,model:t}})=>{const n=(0,i.useDispatch)(),h=(0,i.useSelector)((0,r.useMemo)(()=>(e=>(0,s.Mz)((e=>(0,s.Mz)((e=>({models:t})=>(0,g.JC)(p,t,{queryParams:{mac:e}},{idField:f}))(e),e=>(0,u.kh)(e)[0]))(e),e=>e?.traffic_overview))(e),[e]));return(0,r.useEffect)(()=>{(!v[e]||Date.now()-v[e]>=3e5)&&n(((e,t={},n={})=>(0,b.An)([{model:p,payload:t=>[{...t,[f]:e}]}],A.replace(":mac:",e),{queryParams:{mac:e},...t},{idField:f,...n}))(e)).then(()=>{v[e]=Date.now()})},[n,e]),r.createElement(r.Fragment,null,r.createElement(m.A,null,r.createElement(l.A,{justifyContent:"space-between"},r.createElement(a.A,{color:"text-2",size:"medium"},r.createElement(c.sA,{id:"CLIENTS_INSIGHTS_LOCAL_NET_DAILY_ACTIVITY"})),r.createElement(o.A,{color:"text-3",size:"medium",isTruncated:!0},(0,d.FI)(h?.["24hr_bytes"]||0)))),r.createElement(x.A,{mac:e,model:t,logType:k.F.CLIENT,label:"CLIENTS_INSIGHTS_CL",ignoreActionableValues:I}))}},383149(e,t,n){n.d(t,{A:()=>r});var i=n(885205);const r=function(e,t){return!(null==e||!e.length)&&(0,i.A)(e,t,0)>-1}},887809(e,t,n){n.d(t,{A:()=>i});const i=function(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}},458043(e,t,n){n.d(t,{A:()=>m});var i=n(8300),r=n(383149),a=n(887809),o=n(45572),d=n(552789),l=n(764099);const m=function(e,t,n,m){var c=-1,s=r.A,g=!0,u=e.length,h=[],p=t.length;if(!u)return h;n&&(t=(0,o.A)(t,(0,d.A)(n))),m?(s=a.A,g=!1):t.length>=200&&(s=l.A,g=!1,t=new i.A(t));e:for(;++c<u;){var A=e[c],f=null==n?A:n(A);if(A=m||0!==A?A:0,g&&f==f){for(var b=p;b--;)if(t[b]===f)continue e;h.push(A)}else s(t,f,m)||h.push(A)}return h}},144757(e,t,n){n.d(t,{A:()=>d});var i=n(458043),r=n(187671),a=n(224326),o=n(153533);const d=(0,a.A)(function(e,t){return(0,o.A)(e)?(0,i.A)(e,(0,r.A)(t,1,o.A,!0)):[]})}}]);