"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[95767],{13994:(e,t,a)=>{a.d(t,{A:()=>d});var n=a(296540),r=a(112142),l=a(66706),i=a(71479),c=a(132196),o=a(294303);const s=c.AH`
  overflow: visible;
`,m=(0,i.A)(o.A,{shouldForwardProp:e=>!["innerColor","outerColor"].includes(e)})`
  g {
    transition: unset;
  }
  circle {
    &:first-child {
      ${({outerColor:e})=>e?`fill: ${e};`:""}
    }
    &:last-child {
      ${({innerColor:e})=>e?`fill: ${e};`:""}
    }
  }
`,E=({chartWidth:e,chartHeight:t,top:a,left:r,innerColor:i,outerColor:c="#fff"})=>n.createElement(m,{position:"absolute",top:0,left:0,zIndex:2,innerColor:i,outerColor:c,pointerEvents:"none"},n.createElement("svg",{width:e,height:t,className:s},r&&a&&n.createElement(l.A,{hasAnimation:!1,x:r,y:a}))),u=({topA:e,leftA:t,topB:a,leftB:r})=>n.createElement(o.A,{zIndex:1,borderLeft:"2px dashed white",top:Math.min(e,a),height:Math.max(e,a)-Math.min(e,a),left:(t+r)/2-1,position:"absolute"}),d=({width:e,topA:t,leftA:a,topB:l,leftB:i,chartWidth:c,chartHeight:o,hidden:s,description:m,innerColor:d,tooltipRenderCondition:A,tooltipProps:N={},useSideSwapping:C=!0})=>s?null:n.createElement(n.Fragment,null,A?n.createElement(r.A,{width:e,left:C?a+(a<Math.round(c/2)?8:-8):a-8,top:(t+l)/(l?2:1),description:m,hidden:s,topMargin:4,tooltipProps:{maxWidth:"auto",...!N.position&&C&&a&&c&&{position:a<Math.round(c/2)?"right":"left"},portal:!0,...N}}):null,i&&l?n.createElement(u,{topA:t,topB:l,leftA:a,leftB:i}):null,n.createElement(E,{chartWidth:c,chartHeight:o,top:t,left:a,innerColor:d}))},46685:(e,t,a)=>{a.d(t,{A:()=>o});var n=a(165126),r=a(860765),l=a(716654),i=a(95636),c=a(469987);const o=()=>(e,t)=>{e((0,c.z7)((0,n.A)((0,l.bq)(t()),i.x))),e((0,c.M2)(r.B))}},57867:(e,t,a)=>{a.d(t,{A:()=>c});var n=a(165126),r=a(512759),l=a(449256),i=a(706574);const c=()=>(e,t)=>{e((0,i.nd)((0,n.A)((0,r.rQ)(t()),l.jI)))}},75354:(e,t,a)=>{a.d(t,{A:()=>x});var n=a(296540),r=a(814942),l=a.n(r),i=a(776248),c=a.n(i),o=a(837407),s=a.n(o),m=a(580351),E=a.n(m),u=a(128153),d=a.n(u),A=a(258407),N=a.n(A),C=a(324837),O=a.n(C),_=a(89189),T=a.n(_),I=a(990292),p=a.n(I),D=a(127403),S=a.n(D),M=a(590517),h=a.n(M),R=a(778899),g=a.n(R),f=a(894713),L=a.n(f),y=a(296713),v=a.n(y),w=a(699784);const x=({uptime:e=0})=>{const t=new Date;let a=l()(t,e);const r=e=>(a=e,a),i=c()(t,a),o=d()(t,r(p()(a,i))),m=s()(t,r(h()(a,o))),u=T()(t,r(S()(a,m))),A=O()(t,r(v()(a,u))),C=N()(t,r(L()(a,A))),_=E()(t,r(g()(a,C)));let I="DASHBOARD_DURATION_SECONDS";return i?I="DASHBOARD_DURATION_YEARS":o?I="DASHBOARD_DURATION_MONTHS":m?I="DASHBOARD_DURATION_WEEKS":u?I="DASHBOARD_DURATION_DAYS":A?I="DASHBOARD_DURATION_HOURS":C&&(I="DASHBOARD_DURATION_MINUTES"),n.createElement(w.sA,{id:I,values:{years:i,months:o,weeks:m,days:u,hours:A,minutes:C,seconds:_}})}},82226:(e,t,a)=>{a.d(t,{p:()=>i});var n=a(691189),r=a(269828),l=a(176556);const i=(e={},t={})=>(0,n.t9)(l.A2,`${l.gI.replace(":mac:",t.queryParams.mac)}`,{...t,queryParams:{mac:t.queryParams.mac,separateConnectionSignalParam:t.queryParams.separateConnectionSignalParam,limit:t.queryParams.limit,scope:t.queryParams.scope}},{idField:l.RR,compareFunction:r.G,...e})},86571:(e,t,a)=>{a.d(t,{A:()=>i});var n=a(296540),r=a(217439),l=a(699784);const i=({id:e,children:t,values:a})=>n.createElement(r.A,{color:"text-1",weight:"bold",size:"medium"},e?n.createElement(l.sA,{id:e,values:a}):null,t)},127041:(e,t,a)=>{a.d(t,{Y:()=>s});var n=a(717905),r=a(691189),l=a(887831),i=a(222723),c=a(655773),o=a(143053);const s=(e={},t={})=>(0,r.sU)((0,i.f)(e.data),c.gI,e,{method:l.A.POST,idField:c.RR,fetchConfig:{getAllPostResponse:!0},additionalPayloadSelectors:{[n.bI.PAGE_NUMBER]:{},[n.bI.TOTAL_PAGE_COUNT]:{},[n.bI.TOTAL_ELEMENT_COUNT]:{},[n.bI.OR_MORE]:{}},failureToast:o.X,compareFunction:i.G,...t})},140496:(e,t,a)=>{var n,r;a.d(t,{N:()=>r,e:()=>n}),function(e){e.DASHBOARD="dashboard",e.SIDE_PANEL="sidePanel"}(n||(n={})),function(e){e.DIAMETER="diameter",e.BORDER="border",e.PADDING="padding",e.SPACER="spacer",e.THICKNESS="thickness"}(r||(r={}))},143053:(e,t,a)=>{a.d(t,{X:()=>l,o:()=>i});var n=a(742920),r=a(286388);const l=()=>({icon:n.C.danger,message:"COMMON_LOG_API_ERROR"}),i={[r.DU.RISK]:[],[r.DU.ACTION]:[],[r.DU.DIRECTION]:[],[r.DU.PROTOCOL]:[],[r.DU.POLICY]:[],[r.DU.POLICY_TYPE]:[],[r.DU.SERVICE]:[],[r.DU.SOURCE_HOST]:[],[r.DU.SOURCE_MAC]:[],[r.DU.SOURCE_IP]:[],[r.DU.SOURCE_PORT]:[],[r.DU.SOURCE_NETWORK_ID]:[],[r.DU.SOURCE_DOMAIN]:[],[r.DU.SOURCE_ZONE_ID]:[],[r.DU.SOURCE_REGION]:[],[r.DU.DESTINATION_HOST]:[],[r.DU.DESTINATION_MAC]:[],[r.DU.DESTINATION_IP]:[],[r.DU.DESTINATION_PORT]:[],[r.DU.DESTINATION_NETWORK_ID]:[],[r.DU.DESTINATION_DOMAIN]:[],[r.DU.DESTINATION_ZONE_ID]:[],[r.DU.DESTINATION_REGION]:[],[r.DU.IN_NETWORK_ID]:[],[r.DU.OUT_NETWORK_ID]:[],[r.DU.NEXT_AI_QUERY]:[],[r.DU.EXCEPT_FOR]:[],[r.DU.SEARCH_TEXT]:"",[r.DU.TIMESTAMP_FROM]:0,[r.DU.TIMESTAMP_TO]:0,[r.DU.PAGE_NUMBER]:0,[r.DU.PAGE_SIZE]:0,[r.DU.SKIP_COUNT]:!1}},161235:(e,t,a)=>{a.d(t,{A2:()=>n,HF:()=>i,RR:()=>l,gI:()=>r});const n="deviceLogs",r="/v2/api/site/{site}/system-log/device/:mac:",l="timestamp",i=6},176556:(e,t,a)=>{a.d(t,{A2:()=>n,HF:()=>i,RR:()=>l,gI:()=>r});const n="apLogs",r="/v2/api/site/{site}/system-log/client-connection/:mac:",l="timestamp",i=6},223670:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(296540),r=a(366702),l=a(572112),i=a(140496);const c=(e,t)=>{if(!e)return null;switch(t){case i.e.DASHBOARD:return e>=l.A.XXL.FROM?{[i.N.DIAMETER]:150,[i.N.BORDER]:null,[i.N.PADDING]:20,[i.N.SPACER]:15,[i.N.THICKNESS]:10}:e>=l.A.XL.FROM?{[i.N.DIAMETER]:130,[i.N.BORDER]:null,[i.N.PADDING]:16,[i.N.SPACER]:15,[i.N.THICKNESS]:10}:e>=l.A.L.FROM?{[i.N.DIAMETER]:130,[i.N.BORDER]:null,[i.N.PADDING]:12,[i.N.SPACER]:15,[i.N.THICKNESS]:10}:e>=l.A.ML.FROM?{[i.N.DIAMETER]:130,[i.N.BORDER]:null,[i.N.PADDING]:12,[i.N.SPACER]:15,[i.N.THICKNESS]:10}:e>=l.A.M.FROM?{[i.N.DIAMETER]:130,[i.N.BORDER]:null,[i.N.PADDING]:12,[i.N.SPACER]:15,[i.N.THICKNESS]:10}:e>=l.A.SM.FROM?{[i.N.DIAMETER]:130,[i.N.BORDER]:null,[i.N.PADDING]:12,[i.N.SPACER]:15,[i.N.THICKNESS]:10}:e>=l.A.S.FROM?{[i.N.DIAMETER]:130,[i.N.BORDER]:null,[i.N.PADDING]:12,[i.N.SPACER]:15,[i.N.THICKNESS]:10}:e>=l.A.XS.FROM?{[i.N.DIAMETER]:130,[i.N.BORDER]:null,[i.N.PADDING]:12,[i.N.SPACER]:15,[i.N.THICKNESS]:10}:null;case i.e.SIDE_PANEL:return{[i.N.DIAMETER]:96,[i.N.BORDER]:null,[i.N.PADDING]:0,[i.N.SPACER]:10,[i.N.THICKNESS]:10};default:return null}},o={[i.N.DIAMETER]:null,[i.N.BORDER]:null,[i.N.PADDING]:null,[i.N.SPACER]:null,[i.N.THICKNESS]:null},s=e=>{const[t,a]=(0,n.useState)(c(document.body?.getBoundingClientRect()?.width,e)||o),{width:l}=(0,r.A)();return(0,n.useEffect)(()=>{const t=c(l,e);t&&a(t)},[l,e]),t}},239764:(e,t,a)=>{a.d(t,{A:()=>d});var n=a(956347),r=a(469733),l=a(296540),i=a(874807),c=a(15095),o=a(627440),s=a(670180),m=a(469987),E=a(361485),u=a(46685);const d=()=>{const e=(0,r.useDispatch)(),t=(0,n.W6)(),a=(0,c.A)(`${o.VO.INSIGHTS}/${s.H.FLOWS}`);return(0,l.useCallback)((n=i.P1)=>{(0,r.batch)(()=>{e((0,u.A)()),e((0,m.AL)(!0)),e((0,m.lB)(E.X)),n(e)}),t.push(a)},[e,t,a])}},269828:(e,t,a)=>{a.d(t,{G:()=>n});const n=({queryParams:{mac:e,limit:t,separateConnectionSignalParam:a,scope:n}},{queryParams:{mac:r,limit:l,separateConnectionSignalParam:i,scope:c}})=>e===r&&t===l&&a===i&&n===c},282637:(e,t,a)=>{a.d(t,{Ay:()=>o,In:()=>i,Wx:()=>c,Zo:()=>l});var n=a(296540),r=a(294303);const l=({color:e})=>n.createElement(r.A,{width:8,height:2,background:e}),i=({color:e})=>n.createElement(r.A,{width:8,height:5,background:e,borderRadius:1}),c=({color:e})=>n.createElement(r.A,{alignItems:"center",gap:2},n.createElement(r.A,{width:4,height:2,background:e}),n.createElement(r.A,{width:4,height:2,background:e})),o=l},296968:(e,t,a)=>{var n;a.d(t,{x:()=>n}),function(e){e.MAIN="main",e.SETTINGS="settings"}(n||(n={}))},451723:(e,t,a)=>{a.d(t,{A:()=>i});var n=a(469733),r=a(302167),l=a(792072);const i=()=>{const e=(0,n.useSelector)(l.K7),t=(0,n.useSelector)(l.xJ),a=(0,n.useSelector)(l.BZ),{enabled_allowed_traffic:i}=(0,n.useSelector)(r.fu),c=e||t;return{areAllFlowsSupported:c,areAllFlowsEnabled:c&&i,showExternalDiskMessage:t&&!a,isFlowsDownloadAvailable:!t||a}}},455155:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(469733),r=a(296540),l=a(130851),i=a(765562);const c={};const o=(0,a(71479).A)("img",{shouldForwardProp:e=>"dimension"!==e})`
  ${({dimension:e=22})=>`\n    height: ${e}px;\n    width: ${e}px;\n  `}
`,s=(0,r.memo)(({iconFileName:e,dimension:t,style:a={}})=>{const s=(0,n.useSelector)(l.p);return r.createElement(o,{src:c[e]||encodeURI(`${i.A.dpiPath}${e}`),dimension:t,onLoad:({target:t})=>{c[e]=t.src},onError:({currentTarget:e})=>{e.src=`${s}/dpiFallback.svg`},style:a})})},500235:(e,t,a)=>{a.d(t,{p:()=>o});var n=a(801081),r=a(25553),l=a(87485),i=a(269828),c=a(176556);const o=e=>(0,n.Mz)((e=>({models:t})=>(0,r.JC)(c.A2,t,{queryParams:e},{idField:c.RR,compareFunction:i.G}))(e),l.kh)},564328:(e,t,a)=>{a.d(t,{Fw:()=>l,Ql:()=>n,pN:()=>r,vB:()=>i});const n="createSimpleAppBlock",r="mac",l="appId",i="simpleAppBlockId"},572112:(e,t,a)=>{a.d(t,{A:()=>i});var n=a(779005);const r={[n.L.XS]:{FROM:0,TO:374},[n.L.S]:{FROM:375,TO:567},[n.L.SM]:{FROM:568,TO:767},[n.L.M]:{FROM:768,TO:1023},[n.L.ML]:{FROM:1024,TO:1199},[n.L.L]:{FROM:1200,TO:1919},[n.L.XL]:{FROM:1920,TO:2559},[n.L.XXL]:{FROM:2560,TO:1/0}},l={DASHBOARD:{LAYOUT:{MOBILE:"(max-width: 767px)",DESKTOP:"(min-width: 768px)"},CHART:{MOBILE:"(max-width: 1419px)",DESKTOP:"(min-width: 1420px)"},BAND_SELECTOR:{MOBILE:"(max-width: 1119px)",DESKTOP:"(min-width: 1120px)"}}},i={...r,...l,SIDE_NAVIGATION_BREAKPOINT_UP:"(min-width: 601px)",SIDE_NAVIGATION_BREAKPOINT_DOWN:"(max-width: 600px)",VIEWPORT_XS:`(max-width: ${r[n.L.XS].TO}px)`,VIEWPORT_S:`(min-width: ${r[n.L.S].FROM}px) and (max-width: ${r[n.L.S].TO}px)`,VIEWPORT_SM:`(min-width: ${r[n.L.SM].FROM}px) and (max-width: ${r[n.L.SM].TO}px)`,VIEWPORT_M:`(min-width: ${r[n.L.M].FROM}px) and (max-width: ${r[n.L.M].TO}px)`,VIEWPORT_ML:`(min-width: ${r[n.L.ML].FROM}px) and (max-width: ${r[n.L.ML].TO}px)`,VIEWPORT_L:`(min-width: ${r[n.L.L].FROM}px) and (max-width: ${r[n.L.L].TO}px)`,VIEWPORT_XL:`(min-width: ${r[n.L.XL].FROM}px) and (max-width: ${r[n.L.XL].TO}px)`,VIEWPORT_XXL:`(min-width: ${r[n.L.XXL].FROM}px)`,VIEWPORT_XS_UP:`(min-width: ${r[n.L.S].FROM}px)`,VIEWPORT_S_UP:`(min-width: ${r[n.L.SM].FROM}px)`,VIEWPORT_SM_UP:`(min-width: ${r[n.L.M].FROM}px)`,VIEWPORT_M_UP:`(min-width: ${r[n.L.ML].FROM}px)`,VIEWPORT_ML_UP:`(min-width: ${r[n.L.L].FROM}px)`,VIEWPORT_L_UP:`(min-width: ${r[n.L.XL].FROM}px)`,VIEWPORT_XL_UP:`(min-width: ${r[n.L.XXL].FROM}px)`,VIEWPORT_S_DOWN:`(max-width: ${r[n.L.S].TO}px)`,VIEWPORT_SM_DOWN:`(max-width: ${r[n.L.SM].TO}px)`,VIEWPORT_M_DOWN:`(max-width: ${r[n.L.M].TO}px)`,VIEWPORT_ML_DOWN:`(max-width: ${r[n.L.ML].TO}px)`,VIEWPORT_L_DOWN:`(max-width: ${r[n.L.L].TO}px)`,VIEWPORT_XL_DOWN:`(max-width: ${r[n.L.XL].TO}px)`,VIEWPORT_XXL_DOWN:`(max-width: ${r[n.L.XXL].TO}px)`}},632017:(e,t,a)=>{a.d(t,{P:()=>c});var n=a(572112),r=a(546391),l=a(584916);const i=e=>e>=n.A.XXL.TO?25:e>=n.A.L.TO?13:e>=n.A.M.TO?7:4,c={[l.l.ONE_HOUR]:{frequency:i,label:({index:e,value:t,selfHourCycle:a,documentWidth:n,formatMessage:r,siteTimezone:l,language:c})=>e!==i(n)-1?new Intl.DateTimeFormat(c,{hourCycle:a,hour:"numeric",timeZone:l,minute:"numeric"}).format(t):r({id:"COMMON_NOW"})},[l.l.ONE_DAY]:{frequency:i,label:({index:e,value:t,use24HourTime:a,selfHourCycle:n,siteTimezone:r,language:l,documentWidth:c,formatMessage:o})=>e!==i(c)-1?new Intl.DateTimeFormat(l,{hourCycle:n,hour:"numeric",minute:"numeric",timeZone:r,...a&&{minute:"numeric"}}).format(t).toUpperCase():o({id:"COMMON_NOW"})},[l.l.ONE_WEEK]:{frequency:()=>7,label:({value:e,language:t})=>new Intl.DateTimeFormat(t,{weekday:"short"}).format(e)},[l.l.ONE_MONTH]:{frequency:(e,t)=>Math.ceil(t/(e>=n.A.XXL.TO?1:e>=n.A.M.TO?2:4)),label:({value:e,language:t})=>new Intl.DateTimeFormat(t,{month:"short",day:"numeric"}).format(e)},[l.l.TWELVE_HOURS]:{frequency:()=>12,label:({value:e,selfHourCycle:t,siteTimezone:a,language:n})=>new Intl.DateTimeFormat(n,{hourCycle:t,hour:"numeric",timeZone:a}).format(e)},[l.l.SIX_HOURS]:{frequency:()=>6,label:({value:e,selfHourCycle:t,siteTimezone:a,language:n})=>new Intl.DateTimeFormat(n,{hourCycle:t,hour:"numeric",timeZone:a}).format(e)},[l.l.THIRTY_MINUTES]:{frequency:()=>6,label:({value:e,selfHourCycle:t,siteTimezone:a,language:n})=>new Intl.DateTimeFormat(n,{hourCycle:t,hour:"numeric",minute:"numeric",timeZone:a}).format(e)},[l.j]:{frequency:()=>10,label:({value:e,selfHourCycle:t,siteTimezone:a,language:n})=>new Intl.DateTimeFormat(n,{hourCycle:t,timeZone:a,month:"short",day:"numeric",hour:"numeric",minute:"numeric"}).format(e).replace(r.sO,e=>e.toUpperCase())}}},638334:(e,t,a)=>{a.d(t,{I:()=>l,w:()=>r});var n=a(945132);const r=(e,t)=>Math.floor(Math.abs(new Date(t).getTime()-new Date(e).getTime())/n.jU),l=(e,t)=>Math.floor(Math.abs(t-e)/n.jU)},640488:(e,t,a)=>{a.d(t,{A:()=>u});var n=a(956347),r=a(469733),l=a(296540),i=a(15095),c=a(296968),o=a(627440),s=a(449256),m=a(706574),E=a(57867);const u=()=>{const e=(0,r.useDispatch)(),t=(0,n.W6)(),a=(0,i.A)(`${o.VO.SYSLOG}/${c.x.MAIN}`);return(0,l.useCallback)(n=>{(0,r.batch)(()=>{e((0,E.A)()),e((0,m.ov)(!0)),e((0,m.oz)(s.fN)),n?.(e)}),t.push(a)},[e,t,a])}},663591:(e,t,a)=>{a.d(t,{A:()=>C});var n=a(469733),r=a(296540),l=a(758649),i=a(928085),c=a(566723),o=a(294303),s=a(699784),m=a(564328),E=a(767974),u=a(792072),d=a(959341),A=a(196010),N=a(966376);const C=(0,r.memo)(({dpiAppId:e,mac:t})=>{const a=(0,n.useSelector)(u.JP),C=(0,i.A)(d.bB),O=(0,i.A)(d.tz),_=(0,r.useMemo)(()=>{if(a){const a=new URLSearchParams;return a.set(m.Ql,"true"),t&&a.set(m.pN,t),e&&a.set(m.Fw,e.toString()),{pathname:`${C}/${d.Uy.CYBERSECURE}`,search:a.toString()}}return{pathname:`${O}/${N.D.TRAFFIC_RULES}/${d.fW}/${d.R6}`,state:{[E.U3.APP_ID]:e.toString(),[E.U3.CLIENT]:t}}},[e,a,t,C,O]);return r.createElement(o.A,{justifyContent:"flex-end",paddingRight:c.xO},r.createElement(l.A,{component:A.A,to:_,variant:"inline",color:"danger"},r.createElement(s.sA,{id:"COMMON_ACTION_BLOCK_APP"})))})},668995:(e,t,a)=>{a.d(t,{h:()=>n});const n=(e,t)=>(e<<16)+t},670180:(e,t,a)=>{var n;a.d(t,{H:()=>n}),function(e){e.FLOWS="flows",e.ACTIVITY="activity"}(n||(n={}))},720548:(e,t,a)=>{a.d(t,{w:()=>l});var n=a(664967),r=a(496507);const l=[n.E[r.U.ONE_HOUR],n.E[r.U.ONE_DAY],n.E[r.U.ONE_WEEK],n.E[r.U.ONE_MONTH]]},779005:(e,t,a)=>{var n;a.d(t,{L:()=>n}),function(e){e.XS="XS",e.S="S",e.SM="SM",e.M="M",e.ML="ML",e.L="L",e.XL="XL",e.XXL="XXL"}(n||(n={}))},834042:(e,t,a)=>{a.d(t,{EJ:()=>s,gy:()=>c,oP:()=>i,pi:()=>l,q8:()=>o,t:()=>r});var n=a(621690);const r=60,l=24,i=({minuteOfDay:e,use24HourFormat:t,formatMessage:a})=>{const n=Math.floor(e/60);return`${String(t?n:n%12||12).padStart(2,"0")}:${String(e%r).padStart(2,"0")}${t?"":` ${a({id:n>=12?"COMMON_PM":"COMMON_AM"})}`}`},c=(e,t,a)=>{const l=Math.max(1,Math.min(60,Math.floor(60/t))),c=Math.floor(60/l);return(0,n.A)(0,24).map(t=>(0,n.A)(l).map(n=>{const l=n*c;return{label:i({use24HourFormat:e,formatMessage:a,minuteOfDay:t*r+l}),value:60*t+ +l}})).flat()},o=e=>6e4*Math.round(e/6e4),s=(e,t)=>{const a=+(e/1e3).toFixed(1),n=+(a/1e3).toFixed(1),r=+(a/6e4).toFixed(1);return a<1e3?`${a} ${t({id:"COMMON_UNIT_MS"})}`:n<60?`${n} ${t({id:"COMMON_UNIT_S"})}`:`${r} ${t({id:"COMMON_UNIT_MIN"})}`}},966376:(e,t,a)=>{var n;a.d(t,{D:()=>n}),function(e){e.TRAFFIC_RULES="traffic-rules",e.FIREWALL_RULES="firewall-rules"}(n||(n={}))},995767:(e,t,a)=>{a.r(t),a.d(t,{default:()=>Bn});var n=a(296540),r=a(691294),l=a(743891),i=a(469733),c=a(758649),o=a(217439),s=a(162420),m=a(998837),E=a(822336),u=a(592510),d=a(640488),A=a(566723),N=a(86571),C=a(294303),O=a(689965),_=a(699784),T=a(706574),I=a(500235),p=a(176556),D=a(82226),S=a(151033),M=a(275357);const h=[M.fJ.CLIENT_CONNECTED_WIRED_2,M.fJ.CLIENT_CONNECTED_WIRELESS_2,M.fJ.CLIENT_CONNECTED_WIRED,M.fJ.CLIENT_CONNECTED_WIRELESS],R=[M.fJ.CLIENT_ROAMED_2,M.fJ.CLIENT_ROAMED],g=h.concat(R);var f=a(392085),L=a(868106),y=a(825528);const v=({log:{parameters:e,key:t,timestamp:a},showLine:r,active:l=!1})=>n.createElement(L.A,{active:l,showLine:r,timestamp:a,main:n.createElement(_.sA,{id:"COMMON_ROAMED_TO_AP",values:{ap:n.createElement(y.pF,{parameter:e[M.cr.DEVICE_TO]})}}),content:t===M.fJ.CLIENT_ROAMED_2?n.createElement(n.Fragment,null,n.createElement("div",null,n.createElement(y.Hq,{parameters:e})),n.createElement("div",null,n.createElement(o.A,{color:"text-3",size:"small"},n.createElement(_.sA,{id:"COMMON_ROAMED_DECISION_FROM_TO",values:{SIGNAL_STRENGTH_FROM:e[M.cr.SIGNAL_STRENGTH_FROM]?.name,SIGNAL_STRENGTH:e[M.cr.SIGNAL_STRENGTH]?.name,arrowIcon:n.createElement(f.A,{size:"small"})}})))):null}),w=({log:{parameters:e,timestamp:t},showLine:a,active:r=!1})=>n.createElement(L.A,{active:r,showLine:a,timestamp:t,main:n.createElement(_.sA,{id:"COMMON_DISCONNECTED_FROM",values:{from:n.createElement(y.v5,{parameters:e})}}),content:n.createElement("div",null,n.createElement(y.fX,{parameters:e}),n.createElement(y.cG,null),n.createElement(_.sA,{id:"COMMON_LAST_SEEN_AT",values:{at:`${e[M.cr.SIGNAL_STRENGTH]?.name} ${(0,_.tz)().formatMessage({id:"COMMON_UNIT_DBM"})}`}})),footer:e[M.cr.DURATION]?.name}),x=({log:{timestamp:e,parameters:t},active:a=!1})=>n.createElement(L.A,{active:a,timestamp:e,main:n.createElement(_.sA,{id:"COMMON_CONNECTED_TO_WIFI_ON_AP",values:{wifi:n.createElement(y.v5,{parameters:t}),ap:n.createElement(y.pF,{parameter:t[M.dl.DEVICE]})}}),content:n.createElement(y.Hq,{parameters:t}),footer:t[M.cr.IP]?.name}),P=({log:{parameters:e,timestamp:t},showLine:a})=>n.createElement(L.A,{showLine:a,timestamp:t,main:n.createElement(_.sA,{id:"COMMON_DISCONNECTED_FROM",values:{from:n.createElement(y.ak,{parameters:e})}}),content:n.createElement(y.fX,{parameters:e}),footer:e[M.cr.DURATION]?.name}),U=({log:{timestamp:e,parameters:t}})=>n.createElement(L.A,{timestamp:e,main:n.createElement(n.Fragment,null,n.createElement(_.sA,{id:"COMMON_CONNECTED_TO"})," ",n.createElement(y.ak,{parameters:t})),content:n.createElement(n.Fragment,null,n.createElement(_.sA,{id:"COMMON_LINK_SPEED"})," ",t[M.cr.CONNECTION_SPEED]?.name,n.createElement(y.cG,null),n.createElement(_.sA,{id:"COMMON_NETWORK"}),":  ",n.createElement(y.lg,{parameters:t})),footer:t[M.cr.IP]?.name}),F=({log:{timestamp:e},showLine:t})=>n.createElement(L.A,{showLine:t,timestamp:e,main:n.createElement(_.sA,{id:"COMMON_DISCONNECTED"})}),b=({log:{timestamp:e}})=>n.createElement(L.A,{timestamp:e,main:n.createElement(_.sA,{id:"COMMON_CONNECTED"})}),W={[M.fJ.CLIENT_CONNECTED_WIRELESS_2]:x,[M.fJ.CLIENT_CONNECTED_WIRED_2]:U,[M.fJ.CLIENT_DISCONNECTED_WIRED_2]:P,[M.fJ.CLIENT_DISCONNECTED_WIRELESS_2]:w,[M.fJ.CLIENT_ROAMED_2]:v,[M.fJ.CLIENT_CONNECTED_WIRED]:b,[M.fJ.CLIENT_CONNECTED_WIRELESS]:b,[M.fJ.CLIENT_DISCONNECTED_WIRED]:F,[M.fJ.CLIENT_DISCONNECTED_WIRELESS]:F,[M.fJ.CLIENT_ROAMED]:v},H=({queryParams:e,activeRows:t=[]})=>{const{themeName:a}=(0,m.u)(),r=(0,i.useDispatch)(),l=(0,i.useSelector)((0,n.useMemo)(()=>(0,I.p)(e),[e])),u=(0,d.A)(),N=(0,n.useCallback)(()=>{u(()=>{r((0,T.Sy)([e.mac])),r((0,T.A$)([S.nh.CLIENT_DEVICES]))})},[u,r,e.mac]);return n.createElement(C.A,{flexDirection:"column"},l.length>0?n.createElement(C.A,{flexDirection:"column",minHeight:78},l.map((e,a)=>{const r=W[e.key],i=a+1<l.length?l[a+1].key:"";return r?n.createElement(r,{key:e.id,log:e,showLine:!!i&&g.includes(i),active:t.includes(e.id)}):null}),n.createElement(C.A,{alignItems:"baseline",paddingTop:A.kc,marginTop:"auto"},n.createElement(c.A,{type:"button",variant:"inline",onClick:N},n.createElement(o.A,{size:"medium",color:"inherit"},n.createElement(_.sA,{id:"COMMON_FULL_LOG"}))))):n.createElement(C.A,{gap:A.kc,justifyContent:"flex-start",alignItems:"center"},n.createElement(s.A,{color:E.Ay[`desktop-color-ublue-03-${a}`],variant:"fill"}),n.createElement(o.A,{size:"medium",color:"text-2"},n.createElement(_.sA,{id:"COMMON_NO_LOGS_CLIENTS"}))))},$=(0,n.memo)(({mac:e})=>{const t=(0,i.useDispatch)(),a=(0,n.useMemo)(()=>({mac:e,separateConnectionSignalParam:!0,limit:p.HF,scope:void 0}),[e]),r=(0,n.useMemo)(()=>[{id:"Logs",label:n.createElement(N.A,{id:"CLIENTS_INSIGHTS_CL"}),openByDefault:!0,renderContent:()=>n.createElement(H,{queryParams:a})}],[a]);return(0,n.useEffect)(()=>{t((0,D.p)({crudCacheStrategy:{type:u.e.CACHE}},{queryParams:a}))},[a,t]),n.createElement(O.A,{type:O.I.ACCORDION,items:r})});var k,V=a(956347),z=a(979106),G=a(963070),X=a(705145),Y=a(834042),B=a(668995),K=a(15095),q=a(601242),J=a(411502),j=a(663591),Z=a(627440),Q=a(670180),ee=(a(767974),a(260411)),te=a(120205),ae=a(89716),ne=a(987309),re=a(602021),le=a(532419),ie=a(584916),ce=a(664967);!function(e){e.APPLICATION="application",e.TRAFFIC="total_bytes"}(k||(k={}));const oe=ie.l.ONE_MONTH,se=[ce.E[ie.l.ONE_HOUR],ce.E[ie.l.ONE_DAY],ce.E[ie.l.ONE_WEEK],ce.E[oe]],me={[k.APPLICATION]:"COMMON_APPLICATION",[k.TRAFFIC]:"CLIENTS_TRAFFIC_WITH_PERCENTAGE"},Ee="CLIENTS_TRAFFIC_IDENTIFICATION_HEADER_ROW_CLASSNAME",ue="CLIENTS_TRAFFIC_IDENTIFICATION_ROW_CLASSNAME";var de=a(71479);const Ae=(0,de.A)(C.A)`
  gap: ${A.Ln};
  flex-direction: column;
  align-items: start;
  .${Ee} {
    > th {
      color: ${({theme:{themeName:e}})=>E.Ay[`desktop-color-text-3-${e}`]};
      padding: 0;
    }
  }
  .${ue} {
    > td {
      padding: 0;
    }
  }
`,Ne=(0,de.A)(C.A)`
  justify-content: space-between;
  width: 100%;
  align-items: center;
  > div:last-child > div {
    margin: unset;
    margin-left: auto;
  }
`;var Ce=a(903216),Oe=a(455155);const _e=(0,n.memo)(({mac:e})=>{const{formatMessage:t}=(0,_.tz)(),a=(0,i.useDispatch)(),r=(0,V.W6)(),l=(0,K.A)(`${Z.VO.INSIGHTS}/${Q.H.ACTIVITY}`),s=(0,n.useCallback)(()=>{a((0,ee.P7)(te.f.CLIENTS)),a((0,ee._b)([e])),r.push(l)},[a,l,r,e]),m=(0,i.useSelector)(le.m9),E=(0,i.useSelector)(re.EL),d=(0,i.useSelector)(le.jY),[T,I]=(0,n.useState)(oe),p=se.find(({id:e})=>e===oe)||se[0],[D,S]=(0,n.useState)(p.getRange(new Date).startDate.getTime()),[M,h]=(0,n.useState)(p.getRange(new Date).endDate.getTime()),R=(0,i.useSelector)((0,n.useMemo)(()=>(0,ae.Fr)({start:D,end:M,includeUnidentified:!0,mac:e}),[e,D,M])),g=(0,n.useMemo)(()=>se.map(({id:e,message:a})=>({id:e,label:t({id:a})})),[t]),f=(0,n.useCallback)(e=>{const t=se.find(({id:t})=>t===e.id)||se[0],a=t.getRange(new Date).startDate.getTime(),n=t.getRange(new Date).endDate.getTime();t.id===ie.l.ONE_DAY||t.id===ie.l.ONE_HOUR?(S((0,Y.q8)(a)),h((0,Y.q8)(n)),I(t.id)):(S(a),h(n),I(t.id))},[]),L=(0,n.useMemo)(()=>{const e=(R?.usage_by_app||[]).reduce((e,{total_bytes:t,category:a,application:n})=>e+((0,q.ez)((0,B.h)(a,n)).toLowerCase()!==J.HV?t:0),0)||0;return(R?.usage_by_app||[]).sort((e,t)=>t.total_bytes-e.total_bytes).map(({category:t,application:a,total_bytes:n,...r})=>(l=>({category:t,isSummary:!1,compoundId:l,traffic_percentage:e?n/e*100:0,application:a,total_bytes:n,name:(0,q.ez)(l),iconFileName:(0,q.j9)(l),...r}))((0,B.h)(t,a))).filter(({name:e})=>e&&e.toLowerCase()!==J.HV).slice(0,10)},[R?.usage_by_app]),y=m&&d&&!E,v=(0,n.useCallback)(({compoundId:t})=>n.createElement(j.A,{dpiAppId:t,mac:e}),[e]),w=(0,n.useMemo)(()=>(e=>[{id:k.APPLICATION,label:n.createElement(_.sA,{id:me[k.APPLICATION]}),width:180,renderCell:({name:e,iconFileName:t})=>n.createElement(C.A,{alignItems:"center",width:"100%",gap:A.YC},n.createElement(C.A,{height:25,minWidth:25,maxWidth:25,justifyContent:"center",alignItems:"center"},n.createElement(Oe.A,{iconFileName:t})),n.createElement(X.A,{size:"medium",color:"text-2",isTruncated:!0},e))},{id:k.TRAFFIC,label:n.createElement(_.sA,{id:me[k.TRAFFIC]}),align:"right",width:140,renderCell:({total_bytes:t=0,traffic_percentage:a=0},r,l,{rowHovered:i})=>i&&e?null:n.createElement(o.A,{size:"medium",color:i?"inherit":"text-3"},(0,Ce.FI)(t),a>0&&` (${a.toFixed(1)}%)`)}])(y),[y]),x=(0,n.useCallback)(()=>n.createElement(X.A,{color:"text-2",size:"medium",isCentered:!0},n.createElement(_.sA,{id:"CLIENTS_TRAFFIC_ACTIVITY_EMPTY"})),[]);return(0,n.useEffect)(()=>{a((0,ne.m)({start:D,end:M,includeUnidentified:!0,mac:e},void 0,{crudCacheStrategy:{type:u.e.CACHE}}))},[a,M,e,D]),n.createElement(O.A,null,n.createElement(Ae,null,n.createElement(Ne,null,n.createElement(N.A,{id:"CLIENTS_TRAFFIC_ACTIVITY"}),n.createElement(z.A,{variant:"filter",tabs:g,onSelectTab:f,selectedTab:T})),n.createElement(G.A,{items:L,idField:"compoundId",columns:w,disableColumnFilters:!0,disableSelection:!0,truncateHeaderCells:!0,disableSort:!0,renderHoverContent:y?v:void 0,headerRowClassName:Ee,rowClassName:ue,renderPlaceholder:x}),L.length>0?n.createElement(c.A,{type:"button",variant:"inline",size:"medium",onClick:s},n.createElement(_.sA,{id:"COMMON_VIEW_ALL_TRAFFIC"})):null))});var Te=a(592563),Ie=a(451723),pe=a(239764),De=a(398300),Se=a(860765),Me=a(329991),he=a(845030),Re=a(716654),ge=a(469987),fe=a(670464),Le=a(286388),ye=a(127041),ve=a(429252),we=a.n(ve),xe=a(496507),Pe=a(720548),Ue=a(655773);const Fe="client-flows",be=Ue.gI,We=Ue.RR,He={},$e={},ke={},Ve=({queryParams:e},{queryParams:t})=>we()(e,t),ze=e=>[Fe,JSON.stringify(e)].join();var Ge=a(801081),Xe=a(25553),Ye=a(668258),Be=a(87485);const Ke=e=>(0,Ge.Mz)((e=>t=>t.models[ze(e)]||{})(e),t=>(0,Xe.Al)(t,{data:e},{compareFunction:Ve,excludePlaceholders:!0})),qe=e=>(0,Ge.Mz)(Ke(e),Be.kh),Je=(0,de.A)(C.A)`
  gap: ${A.Ln};
  flex-direction: column;
  align-items: start;
`,je=(0,de.A)(C.A)`
  width: 100%;
  flex-direction: column;
  gap: ${A.YC};
`,Ze=(0,de.A)(C.A)`
  justify-content: space-between;
  width: 100%;
  align-items: center;
  gap: ${A.YC};
`,Qe=(0,de.A)(C.A,{shouldForwardProp:e=>"hovered"!==e})`
  gap: ${A.YC};
  align-items: center;
  width: 50%;
  min-width: 50%;
  cursor: pointer;
  ${({hovered:e,theme:{themeName:t}})=>e?`\n    p { color: ${E.Ay[`desktop-color-ublue-06-${t}`]} !important; }\n  `:""}
`,et=(0,de.A)(C.A)`
  align-items: center;
  gap: ${A.YC};
`;var tt=a(362156);const at=({clientFlow:e})=>n.createElement(X.A,{isTruncated:!0,size:"medium",color:"text-3"},e[Le.eq.TIME]?n.createElement(tt.A,{timestamp:e[Le.eq.TIME],showSeconds:!0}):n.createElement(_.sA,{id:"COMMON_FALLBACK"}));var nt=a(937740);const rt=({clientFlow:e})=>n.createElement(n.Fragment,null,(0,nt.A)(e,!1));var lt=a(400374),it=a(618983);const ct=({clientFlow:e})=>{const{themeName:t}=(0,m.u)(),{Icon:a,color:r}=(()=>{switch(e[Le.eq.ACTION]){case Le.HI.ALLOWED:return{Icon:it.A,color:E.Ay[`desktop-color-neutral-12-${t}`]};case Le.HI.BLOCKED:return{Icon:lt.A,color:E.Ay[`desktop-color-red-06-${t}`]};default:return{Icon:void 0,color:void 0}}})();return a?n.createElement(a,{size:"medium",color:r}):null};var ot=a(717905),st=a(691189),mt=a(887831);const Et=({mac:e})=>{const t=(0,i.useDispatch)(),[a,r]=(0,n.useState)(null),l=(0,pe.A)(),c=(0,n.useCallback)(()=>{l(t=>{t((0,ge.Tt)([e])),t((0,ge.AL)(!1))})},[l,e]),s=(0,i.useSelector)(Re.uK),m=(0,n.useMemo)(()=>He[e],[e]),E=(0,n.useMemo)(()=>(e=>{return t=Pe.w.find(({id:e})=>e===xe.U.ONE_MONTH),{[Le.DU.RISK]:[],[Le.DU.ACTION]:[],[Le.DU.DIRECTION]:[],[Le.DU.PROTOCOL]:[],[Le.DU.SERVICE]:[],[Le.DU.POLICY]:[],[Le.DU.POLICY_TYPE]:[],[Le.DU.SOURCE_HOST]:[],[Le.DU.SOURCE_MAC]:[e],[Le.DU.SOURCE_IP]:[],[Le.DU.SOURCE_PORT]:[],[Le.DU.SOURCE_NETWORK_ID]:[],[Le.DU.SOURCE_DOMAIN]:[],[Le.DU.SOURCE_REGION]:[],[Le.DU.SOURCE_ZONE_ID]:[],[Le.DU.DESTINATION_HOST]:[],[Le.DU.DESTINATION_MAC]:[],[Le.DU.DESTINATION_IP]:[],[Le.DU.DESTINATION_PORT]:[],[Le.DU.DESTINATION_NETWORK_ID]:[],[Le.DU.DESTINATION_DOMAIN]:[],[Le.DU.DESTINATION_REGION]:[],[Le.DU.DESTINATION_ZONE_ID]:[],[Le.DU.IN_NETWORK_ID]:[],[Le.DU.OUT_NETWORK_ID]:[],[Le.DU.NEXT_AI_QUERY]:[],[Le.DU.EXCEPT_FOR]:[],[Le.DU.TIMESTAMP_FROM]:t?.getRange(new Date).startDate.getTime()||0,[Le.DU.TIMESTAMP_TO]:t?.getRange(new Date).endDate.getTime()||0,[Le.DU.PAGE_NUMBER]:Se.B,[Le.DU.SEARCH_TEXT]:"",[Le.DU.PAGE_SIZE]:10,[Le.DU.SKIP_COUNT]:!0};var t})(e),[e]),u=(0,i.useSelector)((0,n.useMemo)(()=>qe(E),[E])),d=(0,i.useSelector)((0,n.useMemo)(()=>qe(m),[m])),A=(0,i.useSelector)((0,n.useMemo)(()=>(e=>(0,Ge.Mz)(Ke(e),Ye.wH))(E),[E])),C=(0,n.useCallback)(e=>{t((0,fe.B)({queryParams:{id:e}})).then(()=>{t((0,he.XP)({type:De.H.FLOWS,id:e}))})},[t]),T=(0,n.useCallback)(()=>{$e[e]||(t((0,ye.Y)({data:{...s,[Le.DU.SOURCE_MAC]:[e],[Le.DU.PAGE_NUMBER]:Se.B}})),$e[e]=!0)},[t,s,e]),I=(0,n.useCallback)(e=>()=>{r(e)},[]),p=(0,n.useCallback)(()=>{r(null)},[]);(0,n.useEffect)(()=>{ke[e]||(ke[e]=!0,t(((e={},t={})=>(0,st.sU)(ze(e.data),be,e,{method:mt.A.POST,idField:We,fetchConfig:{getAllPostResponse:!0},additionalPayloadSelectors:{[ot.bI.PAGE_NUMBER]:{},[ot.bI.TOTAL_PAGE_COUNT]:{},[ot.bI.TOTAL_ELEMENT_COUNT]:{},[ot.bI.OR_MORE]:{}},compareFunction:Ve,...t}))({data:E})).then(()=>{He[e]={...E}}).finally(()=>{ke[e]=!1}))},[t,E,e]);const D=u.length?u:d;return n.createElement(O.A,null,n.createElement(Je,{onMouseEnter:T},n.createElement(N.A,{id:"CLIENTS_LATEST_FLOWS"}),n.createElement(je,null,D.length||A?n.createElement(n.Fragment,null,n.createElement(Ze,null,n.createElement(o.A,{color:"text-3",weight:"bold",size:"medium"},n.createElement(_.sA,{id:"COMMON_DESTINATION"})),n.createElement(o.A,{color:"text-3",weight:"bold",size:"medium"},n.createElement(_.sA,{id:"COMMON_TIME"}))),D.length?D.map(e=>n.createElement(Ze,{key:e.id},n.createElement(Qe,{onClick:()=>{C(e[Le.eq.ID])},onMouseEnter:I(e[Le.eq.ID]),onMouseLeave:p,hovered:a===e[Le.eq.ID]},n.createElement(rt,{clientFlow:e})),n.createElement(et,null,n.createElement(ct,{clientFlow:e}),n.createElement(at,{clientFlow:e})))):n.createElement(Me.A,null)):n.createElement(X.A,{color:"text-2",size:"medium",isCentered:!0},n.createElement(_.sA,{id:"CLIENTS_NO_FLOWS"}))),D.length?n.createElement(Te.A,{type:"button",fontSize:"medium",onPress:c},n.createElement(_.sA,{id:"CLIENTS_VIEW_ALL_FLOWS"})):null))},ut=(0,n.memo)(({mac:e})=>{const{areAllFlowsSupported:t,areAllFlowsEnabled:a}=(0,Ie.A)();return t&&a?n.createElement(Et,{mac:e}):null});var dt=a(939703);const At="clientApStats",Nt="aggregatedClientApStatsIdField",Ct=(e,t)=>(0,Ge.Mz)(((e,t)=>({models:a})=>(0,Xe.JC)(At,a,{queryParams:{mac:e,start:t}},{idField:Nt}))(e,t),e=>(0,Be.kh)(e)[0]);var Ot=a(271856),_t=a(927099),Tt=a(118818),It=a(396660),pt=a(75354),Dt=a(6176);const St=(0,n.memo)(({mac:e})=>{const t=(0,i.useSelector)((0,n.useMemo)(()=>(0,le.tG)(e),[e]));return n.createElement(Dt.A,{model:t?.model})});var Mt;!function(e){e.NAME="name",e.VALUE="value"}(Mt||(Mt={}));const ht=(0,de.A)(Tt.A,{shouldForwardProp:e=>"customColor"!==e})`
  background-color: ${({customColor:e})=>e};
`,Rt=(0,de.A)("div")`
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-right: ${A.YC};
  margin-left: ${A.YC};
`,gt=[{id:Mt.NAME,minWidth:80,growthFactor:1,renderCell:({device_name:e,color:t,device_mac:a})=>n.createElement(n.Fragment,null,n.createElement(ht,{customColor:t}),n.createElement(Rt,null,n.createElement(St,{mac:a})),n.createElement(Ot.A,{description:e,portal:!0,noWrap:!0},n.createElement(_t.A,{size:"body",color:"secondary",truncate:!0},e))),compare:(0,It.l0)(({id:e})=>e)},{id:Mt.VALUE,minWidth:45,growthFactor:1,align:"right",renderCell:({session_time_seconds:e})=>n.createElement(Ot.A,{description:n.createElement(pt.A,{uptime:e}),portal:!0,noWrap:!0},n.createElement(_t.A,{size:"body",color:"tertiary",truncate:!0},n.createElement(pt.A,{uptime:e}))),compare:(0,It.l0)(({session_time_seconds:e=0})=>e)}],ft=ce.E[ie.l.ONE_DAY],Lt=[ft,ce.E[ie.l.ONE_WEEK],ce.E[ie.l.ONE_MONTH]],yt=(0,de.A)(C.A)`
  width: 100%;
  flex-direction: column;

  .rowClassName,
  .cellClassName,
  .tableClassName {
    border: 0 !important;
    border-bottom: 0 !important;
  }

  .headerRowClassName {
    display: none;
  }
  .rowClassName {
    margin-bottom: ${A.YC};
  }
`,vt=(0,n.memo)(({formattedClientApStats:e})=>{const[t,a]=(0,n.useState)(!1),r=(0,n.useCallback)(()=>{a(e=>!e)},[]);return n.createElement(C.A,{flexDirection:"column",width:"100%"},n.createElement(yt,null,n.createElement(G.A,{rowClassName:"rowClassName",cellClassName:"cellClassName",tableClassName:"tableClassName",headerRowClassName:"headerRowClassName",columns:gt,disableColumnFilters:!0,disableHover:!0,rowHeight:20,truncateHeaderCells:!0,items:e,rowLimit:t?void 0:5})),e.length>5?n.createElement(C.A,{marginLeft:A.kc},n.createElement(c.A,{type:"button",variant:"inline",onClick:r},n.createElement(_t.A,{size:"body",color:"inherit"},n.createElement(_.sA,{id:t?"COMMON_VIEW_LESS":"COMMON_VIEW_ALL"})))):null)}),wt=(0,n.memo)(()=>n.createElement(C.A,{alignItems:"center",justifyContent:"center",gap:A.kc,width:"100%"},n.createElement(s.A,{isActive:!0,transparent:!0,variant:"fill"}),n.createElement(_t.A,{size:"body"},n.createElement(_.sA,{id:"COMMON_NO_SESSIONS"}))));var xt=a(23797),Pt=a(132196),Ut=a(223670),Ft=a(140496);const bt=Pt.AH`
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
`,Wt=(0,n.memo)(({totalAps:e,formattedClientApStats:t})=>{const{diameter:a,spacer:r,thickness:l}=(0,Ut.A)(Ft.e.SIDE_PANEL),{formatMessage:i}=(0,_.tz)();return n.createElement(xt.A,{items:t,title:`${e} ${i(1===e?{id:"COMMON_AP"}:{id:"COMMON_APS"})}`,size:a,spacer:r,thickness:l,titleClassName:bt})}),Ht=(0,dt.r0)(),$t=(0,n.memo)(({mac:e})=>{const{formatMessage:t}=(0,_.tz)(),a=(0,i.useDispatch)(),[r,l]=(0,n.useState)({ap_stats:[],total_session_time_seconds:0}),[c,o]=(0,n.useState)((0,Y.q8)(ft.getRange(new Date).startDate.getTime())),s=(0,i.useSelector)((0,n.useMemo)(()=>Ct(e,c),[e,c])),m=(0,n.useMemo)(()=>Lt.map(({id:e,message:a})=>({id:e,label:t({id:a})})),[t]),E=(0,n.useCallback)(e=>{const t=Lt.find(({id:t})=>t===e.id)||ft,a=t.getRange(new Date).startDate.getTime();return t.id===ie.l.ONE_DAY?o((0,Y.q8)(a)):o(a)},[]);(0,n.useEffect)(()=>{s?.ap_stats&&void 0!==s?.total_session_time_seconds&&l(s)},[s]);const{totalAps:d,formattedClientApStats:T}=(0,n.useMemo)(()=>({totalAps:r.ap_stats.length,formattedClientApStats:(r?.ap_stats||[]).map(({device_mac:e,device_name:t,session_time_seconds:a})=>({device_mac:e,device_name:t,session_time_seconds:a,id:e,value:a,totalTime:r.total_session_time_seconds,color:Ht(e)}))}),[r.ap_stats,r.total_session_time_seconds]);return(0,n.useEffect)(()=>{a(((e={},t={})=>(0,st.An)([{model:At,payload:t=>[{...t,[Nt]:`${e.queryParams.mac}_${e.queryParams.start}`}]}],`${"/v2/api/site/{site}/client/:mac:/ap-stats".replace(":mac:",e.queryParams.mac)}`,{...e,queryParams:{mac:e.queryParams.mac,start:e.queryParams.start}},{idField:Nt,...t}))({queryParams:{mac:e,start:c}},{crudCacheStrategy:{type:u.e.CACHE}}))},[a,e,c]),n.createElement(O.A,null,n.createElement(C.A,{flexDirection:"column",gap:A.Ln},n.createElement(C.A,{alignItems:"center",justifyContent:"space-between"},n.createElement(N.A,{id:"CLIENTS_SESSION_TIME"}),n.createElement(C.A,{width:"fit-content"},n.createElement(z.A,{variant:"filter",tabs:m,onSelectTab:E}))),n.createElement(C.A,null,n.createElement(Wt,{totalAps:d,formattedClientApStats:T}),T.length?n.createElement(vt,{formattedClientApStats:T}):n.createElement(wt,null))))});var kt,Vt=a(340936),zt=a(984652),Gt=a(834959),Xt=a(582724),Yt=a(413357),Bt=a(874807);!function(e){e.ACTIVE_ROWS="activeRows",e.SET_ACTIVE_ROWS="setActiveRows"}(kt||(kt={}));const Kt={[kt.ACTIVE_ROWS]:[],[kt.SET_ACTIVE_ROWS]:Bt.P1},qt=(0,n.createContext)(Kt);var Jt,jt=a(171073),Zt=a(874734),Qt=a(161235),ea=a(282637);!function(e){e.RETRIES="retries",e.SIGNAL="signal",e.EVENTS="events"}(Jt||(Jt={}));const ta={[Jt.RETRIES]:"red-06",[Jt.SIGNAL]:"purple-06",[Jt.EVENTS]:"ublue-06"},aa={[Jt.RETRIES]:!0,[Jt.SIGNAL]:!1,[Jt.EVENTS]:!0},na={[Jt.RETRIES]:!1,[Jt.SIGNAL]:!0,[Jt.EVENTS]:!1},ra={[Zt.FE.MINUTES]:3e5,[Zt.FE.HOURLY]:36e5,[Zt.FE.DAILY]:864e5},la=({icon:e,label:t})=>n.createElement(C.A,{alignItems:"center",gap:A.YC},n.createElement(C.A,{width:16,justifyContent:"center"},e),n.createElement(o.A,{size:"small",color:"text-3"},t)),ia=()=>{const{themeName:e}=(0,m.u)();return n.createElement(C.A,{gap:A.Ln,justifyContent:"center",alignItems:"center"},n.createElement(la,{icon:n.createElement(ea.Ay,{color:E.Ay[`desktop-color-${ta[Jt.SIGNAL]}-${e}`]}),label:n.createElement(_.sA,{id:"COMMON_SIGNAL_STRENGTH"})}),n.createElement(la,{icon:n.createElement(ea.Wx,{color:E.Ay[`desktop-color-${ta[Jt.RETRIES]}-${e}`]}),label:n.createElement(_.sA,{id:"COMMON_TX_RETRIES"})}),n.createElement(la,{icon:n.createElement(ea.Ay,{color:E.Ay[`desktop-color-${ta[Jt.EVENTS]}-${e}`]}),label:n.createElement(_.sA,{id:"COMMON_EVENTS"})}))};var ca=a(936344),oa=a(212401),sa=a(87250),ma=a(656372),Ea=a(195462),ua=a(13994);const da=({timestamp:e,dayDifference:t,intervalSeconds:a,txRetries:r,signalStrength:l,dateTimeFormat:{full:i,short:c}})=>n.createElement(C.A,{flexDirection:"column",width:"100%",whiteSpace:"nowrap",gap:A.YC},n.createElement(C.A,{justifyContent:"space-between"},n.createElement(o.A,{size:"small",color:"text-1"},n.createElement(_.sA,{id:"COMMON_DATE_TIME"})),n.createElement(o.A,{size:"small",color:"text-2"},i.format(e),t<=7&&a?n.createElement(n.Fragment,null," - ",c.format(e+1e3*a)):null)),n.createElement(C.A,{alignItems:"center",justifyContent:"space-between"},n.createElement(o.A,{size:"small",color:"text-1"},n.createElement(_.sA,{id:"COMMON_TX_RETRIES"})),n.createElement(o.A,{size:"small",color:"text-2"},(-1===r?0:r).toFixed(1),"%")),n.createElement(C.A,{alignItems:"center",justifyContent:"space-between"},n.createElement(o.A,{size:"small",color:"text-1"},n.createElement(_.sA,{id:"COMMON_SIGNAL_STRENGTH"})),n.createElement(o.A,{size:"small",color:"text-2"},l.toFixed(1)," ",n.createElement(_.sA,{id:"COMMON_UNIT_DBM"})))),Aa=({x:e,left:t,top:a,hidden:r,gradientColor:l,signalTooltipProps:i,wirelessClientsChartState:c,dayDifference:o,chartHeight:s,chartWidth:m,txRetries:E,signalStrength:u,dateTimeFormat:d,intervalSeconds:A})=>n.createElement(ua.A,{width:300,topA:a,leftA:t,topB:i.top,leftB:i.left,chartWidth:m,chartHeight:s,hidden:r,description:n.createElement(da,{timestamp:e,dayDifference:o,intervalSeconds:A,txRetries:E,signalStrength:u,dateTimeFormat:d}),innerColor:l,tooltipRenderCondition:c===Jt.SIGNAL});var Na=a(282556),Ca=a(366702),Oa=a(638334),_a=a(198494),Ta=a(632017);const Ia=({preset:e,documentWidth:t,dayDifference:a,use24HourTime:n,siteTimezone:r,language:l,selfHourCycle:i,formatMessage:c,timestamps:o,startDate:s,endDate:m})=>{return E=o[0]||s.getTime(),u=o.length>1&&o[o.length-1]||m.getTime(),d=0===a?ie.l.ONE_DAY:ie.j,(0,Ea.v)([E,u],7).map((a,o)=>({label:Ta.P[e||d].label({index:o,value:a,use24HourTime:n,siteTimezone:r,language:l,selfHourCycle:i,documentWidth:t,formatMessage:c}),value:a}));var E,u,d},pa=({startDate:e,endDate:t},a)=>{const{formatMessage:r}=(0,_.tz)(),{width:l}=(0,Ca.A)(),c=(0,n.useMemo)(()=>(0,Oa.w)(e,t),[e,t]),o=(0,i.useSelector)(_a.jc),s=(0,i.useSelector)(_a.BQ),m=(0,i.useSelector)(re.hq),E=(0,i.useSelector)(Na.zi);return{xAxis:Ia({preset:a,documentWidth:l,dayDifference:c,use24HourTime:o,siteTimezone:m,language:E,selfHourCycle:s,formatMessage:r,startDate:e,endDate:t,timestamps:[]}).map(({value:e,label:t},a)=>({value:e,label:a%2?void 0:t})),dayDifference:c}};var Da=a(964238);const Sa=({userReport:e,getCoordinates:t,mouseData:a,maxY:r,yAxisMax:l,yAxisMin:i,y2AxisMax:c,y2AxisMin:o,chartHovered:s,tooltipContainer:u,wirelessClientsChartState:d,renderTooltip:A})=>{const N=(0,n.useContext)(qt),{themeName:C}=(0,m.u)(),O=(0,n.useMemo)(()=>`${d}GradientId`,[d]),_=(0,n.useMemo)(()=>E.Ay[`desktop-color-${ta[d]}-${C}`],[d,C]),T=(0,n.useCallback)(({txRetries:e,signal:t})=>{switch(d){case Jt.RETRIES:return e;case Jt.SIGNAL:return t||-100;default:return 0}},[d]),I=(0,n.useMemo)(()=>e.map(({time:e,signal:t=0,tx_retries:a=0,wifi_tx_attempts:n=0,wifi_tx_dropped:r=0,tx_packets:l=0,rx_packets:i=0,poe_usage:c=0})=>{return o=Math.round(100*a/(a+n+r||1)),{x:e,y:T({txRetries:o,signal:t}),custom:{txRetries:o,signalStrength:t,txPackets:l,rxPackets:i,poeUsage:c}};var o}),[e,T]),p=(0,n.useCallback)(e=>A(e,d,_),[A,_,d]);return n.createElement(Da.A,{data:I,maxY:r,forY2Axis:na[d],yAxisMax:l,yAxisMin:i,y2AxisMax:c,y2AxisMin:o,mouseData:a,getCoordinates:t,lineColor:_,variant:"line",interpolation:"curved",dashed:aa[d],tooltipPortal:u?.current||void 0,customGradientId:O,renderTooltip:p,showTooltip:s&&!N[kt.ACTIVE_ROWS].length})},Ma=()=>{const e=(0,i.useSelector)(_a.BQ),t=(0,i.useSelector)(re.hq),a=(0,i.useSelector)(Na.zi);return(0,n.useMemo)(()=>({full:new Intl.DateTimeFormat(a,{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"numeric",hourCycle:e,timeZone:t}),short:new Intl.DateTimeFormat(a,{hour:"numeric",minute:"numeric",hourCycle:e,timeZone:t}),tooltip:new Intl.DateTimeFormat(a,{day:"numeric",month:"short",hour:"numeric",minute:"numeric",hourCycle:e,timeZone:t})}),[e,t,a])};var ha=a(481413);const Ra={open:0,close:100};var ga=a(825032);(0,de.A)("line")`
  stroke: ${({theme:{themeName:e}})=>E.Ay[`desktop-color-ublue-06-${e}`]};
  stroke-width: 2px;
  stroke-dasharray: 6;
`;const fa=(0,de.A)("foreignObject")`
  overflow: visible;
  width: 1px;
  height: 1px;
`,La=(0,de.A)(C.A)`
  justify-content: center;
  align-items: center;
  width: ${24}px;
  height: ${24}px;
  border-radius: 20px;
  background: ${({theme:{themeName:e}})=>E.Ay[`desktop-color-ublue-06-${e}`]};
  position: relative;
  > div,
  span {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
  }
`,ya=(0,de.A)(o.A)`
  color: ${E.Ay[`desktop-color-text-1-${ga.S.DARK}`]} !important;
`,va=({logs:e,range:{startDate:t,endDate:a},getCoordinates:r,getLogsDescription:l,getLogsIcon:i,onMouseEnter:c,onMouseLeave:o,eventGroupingRange:s})=>{const m=t.getTime(),E=a.getTime(),u=(0,n.useMemo)(()=>{const t=[],a=[],n=e.length;for(let t=0;t<n;t+=1){const{timestamp:n}=e[t];(0,ha.O)(n,m,E)&&a.push(e[t])}let r=0,l=!1;a.reverse();const i=a.length;for(let e=0;e<i;e+=1){const n=a[e],i=a[e+1];if(i&&i.timestamp-n.timestamp<s){l=!0;const e=t[r];t[r]=e?[...t[r],i]:[n,i]}else l?l=!1:t[r]=[n],r+=1}return t},[e,m,E,s]),d=(0,n.useMemo)(()=>Object.entries(u.reduce((e,t)=>(e[t.map(({id:e})=>e).join("_")]=[...t],e),{})),[u]),A=(0,n.useCallback)(e=>()=>c(e.map(({id:e})=>e)),[c]);return n.createElement(n.Fragment,null,d.map(([,e])=>(({x:t,y:a})=>n.createElement(n.Fragment,{key:[t,a].join()},n.createElement(fa,{x:t-24,y:a-12,onMouseEnter:A(e),onMouseLeave:o},n.createElement(La,null,n.createElement(Ot.A,{portal:!0,width:"100%",maxWidth:"max-content",isInteractive:!0,delay:Ra,description:l(e)},1===e.length?n.createElement("span",null,i(e)):n.createElement(ya,{size:"small"},e.length>99?"99+":e.length))))))((e=>r(e[0].timestamp,0))(e))))};var wa=a(945132),xa=a(548173),Pa=a(859241),Ua=a(978549),Fa=a(24367),ba=a(675544);const Wa=[M.fJ.CLIENT_CONNECTED_WIRELESS,M.fJ.CLIENT_CONNECTED_WIRELESS_2],Ha=[M.fJ.CLIENT_CONNECTED_WIRED,M.fJ.CLIENT_CONNECTED_WIRED_2],$a=[...Wa,...Ha],ka=[M.fJ.CLIENT_DISCONNECTED_WIRELESS,M.fJ.CLIENT_DISCONNECTED_WIRELESS_2],Va=[M.fJ.CLIENT_DISCONNECTED_WIRED,M.fJ.CLIENT_DISCONNECTED_WIRED_2],za=[...ka,...Va],Ga=[M.fJ.CLIENT_ROAMED,M.fJ.CLIENT_ROAMED_2],Xa={[M.fJ.CLIENT_CONNECTED_WIRELESS]:xa.A,[M.fJ.CLIENT_CONNECTED_WIRELESS_2]:xa.A,[M.fJ.CLIENT_CONNECTED_WIRED]:Fa.A,[M.fJ.CLIENT_CONNECTED_WIRED_2]:Fa.A,[M.fJ.CLIENT_DISCONNECTED_WIRELESS]:Pa.A,[M.fJ.CLIENT_DISCONNECTED_WIRELESS_2]:Pa.A,[M.fJ.CLIENT_DISCONNECTED_WIRED]:ba.A,[M.fJ.CLIENT_DISCONNECTED_WIRED_2]:ba.A,[M.fJ.CLIENT_ROAMED]:Ua.A,[M.fJ.CLIENT_ROAMED_2]:Ua.A},Ya={size:"original",color:"white"},Ba=(0,de.A)(C.A)`
  width: 100%;
  flex-direction: column;
`,Ka=(0,de.A)(C.A)`
  margin-bottom: ${A.kc};
`,qa=({analyzerDateTimeFormats:e,timestamp:t})=>n.createElement(Ka,null,e.tooltip.format(t)),Ja=(0,de.A)(C.A)`
  width: 100%;
  flex-direction: column;
  margin-top: ${A.kc};
`,ja=(0,de.A)(C.A)`
  width: 100%;
  flex-direction: column;
  margin-top: ${A.YC};
`;var Za=a(438369),Qa=a(670);const en=(0,de.A)(C.A)`
  width: 100%;
  min-width: 260px;
  flex-direction: column;
  gap: ${A.YC};
`,tn=(0,de.A)(C.A)`
  width: 100%;
  justify-content: space-between;
`,an=(0,de.A)(C.A)`
  gap: ${A.YC};
`,nn=(0,de.A)(C.A)`
  align-items: center;
`,rn=({parameters:e})=>{const t=(0,i.useDispatch)(),a=e[M.cr.DURATION]?.name,r=e[M.cr.DATA_DOWN]?.name,l=e[M.cr.DATA_UP]?.name,s=e[M.cr.DEVICE]?.name,m=e[M.cr.SIGNAL_STRENGTH]?.name,E=(0,n.useCallback)(()=>{t((0,he.XP)({type:De.H.DEVICE,id:e[M.cr.DEVICE]?.id}))},[t,e]);return n.createElement(en,null,a?n.createElement(tn,null,n.createElement(_.sA,{id:"COMMON_TIME_CONNECTED"}),n.createElement("div",null,a)):null,l||r?n.createElement(tn,{gap:A.YC},n.createElement(_.sA,{id:"COMMON_DATA_USED"}),n.createElement(an,null,r?n.createElement(nn,null,n.createElement(Qa.A.Icon,{size:"small"}),n.createElement(o.A,{size:"inherit",color:"traffic-down"},r)):null,l?n.createElement(nn,null,n.createElement(Za.A.Icon,{size:"small"}),n.createElement(o.A,{size:"inherit",color:"traffic-up"},l)):null)):null,s||m?n.createElement(tn,null,n.createElement(_.sA,{id:"COMMON_LAST_CONNECTED"}),n.createElement("div",null,n.createElement(c.A,{type:"button",variant:"inline",onClick:E},s||n.createElement(_.sA,{id:"COMMON_UNKNOWN"}))," ",n.createElement("span",{style:{textTransform:"lowercase"}},n.createElement(_.sA,{id:"COMMON_AT"}))," ",m||n.createElement(_.sA,{id:"COMMON_FALLBACK"})," ",n.createElement(_.sA,{id:"COMMON_UNIT_DBM"}))):null)},ln=(0,de.A)(C.A)`
  width: 100%;
  flex-direction: column;
  gap: ${A.YC};
`,cn=(0,de.A)(C.A)`
  width: 100%;
  justify-content: space-between;
`,on=({parameters:e})=>{const[t,a]=e[M.cr.WIFI_STATS]?.name?.split(", -")||[];return n.createElement(ln,null,t?n.createElement(cn,null,n.createElement(_.sA,{id:"COMMON_CHANNEL"}),n.createElement("div",null,t)):null,a?n.createElement(cn,null,n.createElement(_.sA,{id:"COMMON_SIGNAL"}),n.createElement("div",null,"-",a)):null)},sn=(0,de.A)(C.A)`
  width: 100%;
  min-width: 260px;
  flex-direction: column;
  gap: ${A.YC};
`,mn=(0,de.A)(C.A)`
  width: 100%;
  justify-content: space-between;
`,En=(0,de.A)(C.A)`
  gap: ${A.YC};
`,un=(0,de.A)(C.A)`
  align-items: center;
`,dn=({parameters:e})=>{const t=e[M.cr.DURATION]?.name,a=e[M.cr.DATA_DOWN]?.name,r=e[M.cr.DATA_UP]?.name;return n.createElement(sn,null,t?n.createElement(mn,null,n.createElement(_.sA,{id:"COMMON_TIME_CONNECTED"}),n.createElement("div",null,t)):null,r||a?n.createElement(mn,{gap:A.YC},n.createElement(_.sA,{id:"COMMON_DATA_USED"}),n.createElement(En,null,a?n.createElement(un,null,n.createElement(Qa.A.Icon,{size:"small"}),n.createElement(o.A,{size:"inherit",color:"traffic-down"},a)):null,r?n.createElement(un,null,n.createElement(Za.A.Icon,{size:"small"}),n.createElement(o.A,{size:"inherit",color:"traffic-up"},r)):null)):null)},An=(0,de.A)(C.A)`
  width: 100%;
  flex-direction: column;
  gap: ${A.YC};
`,Nn=(0,de.A)(C.A)`
  width: 100%;
  justify-content: space-between;
`,Cn=({parameters:e})=>{const t=e[M.cr.CONNECTION_SPEED]?.name,a=e[M.cr.IP]?.name;return n.createElement(An,null,t?n.createElement(Nn,null,n.createElement(_.sA,{id:"COMMON_LINK_SPEED"}),n.createElement("div",null,t)):null,a?n.createElement(Nn,null,n.createElement(_.sA,{id:"COMMON_IP_ADDRESS"}),n.createElement("div",null,a)):null)},On=(0,de.A)(C.A)`
  width: 100%;
  flex-direction: column;
  gap: ${A.YC};
`,_n=(0,de.A)(C.A)`
  width: 100%;
  justify-content: space-between;
`,Tn=({parameters:e})=>{const{formatMessage:t}=(0,_.tz)(),a=e[M.cr.WIFI_STATS]?.name?.split(", -")?.[0],r=e[M.cr.SIGNAL_STRENGTH_FROM]?.name,l=e[M.cr.SIGNAL_STRENGTH]?.name;return n.createElement(On,null,a?n.createElement(_n,null,n.createElement(_.sA,{id:"COMMON_CHANNEL"}),n.createElement("div",null,a)):null,r&&l?n.createElement(_n,null,n.createElement(_.sA,{id:"COMMON_ROAMING_DECISION"}),n.createElement("div",null,`${r} ${t({id:"COMMON_UNIT_DBM"})} ${t({id:"COMMON_TO"})} ${l} ${t({id:"COMMON_UNIT_DBM"})}`)):null)},In=({log:{key:e,parameters:t}})=>Wa.includes(e)?n.createElement(on,{parameters:t}):Ha.includes(e)?n.createElement(Cn,{parameters:t}):ka.includes(e)?n.createElement(rn,{parameters:t}):Va.includes(e)?n.createElement(dn,{parameters:t}):Ga.includes(e)?n.createElement(Tn,{parameters:t}):null,pn=({analyzerEventValue:e})=>e.length>1?e.length>5?n.createElement(ja,null,n.createElement(_.sA,{id:"COMMON_X_MORE",values:{count:e.length-5}})):null:n.createElement(Ja,null,n.createElement(In,{log:e[0]}));var Dn=a(928085),Sn=a(959341);const Mn=({parameters:e})=>{const t=(0,i.useDispatch)(),a=(0,V.W6)(),r=(0,n.useCallback)(()=>{t((0,he.XP)({type:De.H.DEVICE,id:e[M.cr.DEVICE]?.id}))},[t,e]),l=e[M.cr.WLAN]?.id,s=(0,Dn.A)(Sn._L),m=(0,n.useCallback)(()=>{l?(0,he.XP)({type:De.H.WIFI,id:l}):a.push(s)},[a,l,s]);return n.createElement(o.A,{size:"inherit",color:"inherit"},n.createElement(_.sA,{id:"ANALYZER_DISCONNECTED_EVENT",values:{network:n.createElement(c.A,{type:"button",variant:"inline",onClick:m},e[M.cr.WLAN]?.name||n.createElement(_.sA,{id:"COMMON_UNKNOWN"})),device:n.createElement(c.A,{type:"button",variant:"inline",onClick:r},e[M.cr.DEVICE]?.name||n.createElement(_.sA,{id:"COMMON_UNKNOWN"}))}}))},hn=({parameters:e})=>{const t=(0,i.useDispatch)(),a=(0,n.useCallback)(()=>{t((0,he.XP)({type:De.H.DEVICE,id:e[M.cr.DEVICE]?.id}))},[t,e]),r=(0,n.useCallback)(()=>{t((0,he.XP)({type:De.H.WIFI,id:e[M.cr.WLAN]?.id||Sn.R6}))},[e,t]);return n.createElement(o.A,{size:"inherit",color:"inherit"},n.createElement(_.sA,{id:"ANALYZER_CONNECTED_EVENT",values:{network:n.createElement(c.A,{type:"button",variant:"inline",onClick:r},e[M.cr.WLAN]?.name||n.createElement(_.sA,{id:"COMMON_UNKNOWN"})),device:n.createElement(c.A,{type:"button",variant:"inline",onClick:a},e[M.cr.DEVICE]?.name||n.createElement(_.sA,{id:"COMMON_UNKNOWN"}))}}))},Rn=({parameters:e})=>{const t=(0,i.useDispatch)(),a=(0,n.useCallback)(()=>{t((0,he.XP)({type:De.H.DEVICE,id:e[M.cr.DEVICE]?.id}))},[t,e]),r=(0,n.useCallback)(()=>{t((0,he.XP)({type:De.H.NETWORK,id:e[M.cr.NETWORK]?.id}))},[t,e]);return n.createElement(o.A,{size:"inherit",color:"inherit"},n.createElement(_.sA,{id:"ANALYZER_DISCONNECTED_EVENT",values:{network:n.createElement(c.A,{type:"button",variant:"inline",onClick:r},e[M.cr.NETWORK]?.name||n.createElement(_.sA,{id:"COMMON_UNKNOWN"})),device:n.createElement(c.A,{type:"button",variant:"inline",onClick:a},e[M.cr.DEVICE]?.name||n.createElement(_.sA,{id:"COMMON_UNKNOWN"}))}}))},gn=({parameters:e})=>{const t=(0,i.useDispatch)(),a=(0,n.useCallback)(()=>{t((0,he.XP)({type:De.H.DEVICE,id:e[M.cr.DEVICE]?.id}))},[t,e]),r=(0,n.useCallback)(()=>{t((0,he.XP)({type:De.H.NETWORK,id:e[M.cr.NETWORK]?.id}))},[t,e]);return n.createElement(o.A,{size:"inherit",color:"inherit"},n.createElement(_.sA,{id:"ANALYZER_CONNECTED_EVENT",values:{network:n.createElement(c.A,{type:"button",variant:"inline",onClick:r},e[M.cr.NETWORK]?.name||n.createElement(_.sA,{id:"COMMON_UNKNOWN"})),device:n.createElement(c.A,{type:"button",variant:"inline",onClick:a},e[M.cr.DEVICE]?.name||n.createElement(_.sA,{id:"COMMON_UNKNOWN"}))}}))},fn=({parameters:e})=>{const t=(0,i.useDispatch)(),a=(0,n.useCallback)(()=>{t((0,he.XP)({type:De.H.DEVICE,id:e[M.cr.DEVICE_FROM]?.id}))},[t,e]),r=(0,n.useCallback)(()=>{t((0,he.XP)({type:De.H.DEVICE,id:e[M.cr.DEVICE_TO]?.id}))},[t,e]);return n.createElement(o.A,{size:"inherit",color:"inherit"},n.createElement(_.sA,{id:"ANALYZER_ROAMED_EVENT",values:{deviceFrom:n.createElement(c.A,{type:"button",variant:"inline",onClick:a},e[M.cr.DEVICE_FROM]?.name||n.createElement(_.sA,{id:"COMMON_UNKNOWN"})),deviceTo:n.createElement(c.A,{type:"button",variant:"inline",onClick:r},e[M.cr.DEVICE_TO]?.name||n.createElement(_.sA,{id:"COMMON_UNKNOWN"}))}}))},Ln=({log:{key:e,parameters:t}})=>Wa.includes(e)?n.createElement(hn,{parameters:t}):Ha.includes(e)?n.createElement(gn,{parameters:t}):ka.includes(e)?n.createElement(Mn,{parameters:t}):Va.includes(e)?n.createElement(Rn,{parameters:t}):Ga.includes(e)?n.createElement(fn,{parameters:t}):null,yn=(0,de.A)(C.A)`
  flex-direction: column;
  gap: ${A.YC};
`,vn=(0,de.A)(C.A)`
  gap: ${A.xO};
  > div:first-child {
    margin-top: 6px;
  }
`,wn=(0,de.A)(C.A)`
  flex-direction: column;
  gap: 2px;
`,xn=({analyzerEventValue:e,analyzerDateTimeFormats:t})=>{const{themeName:a}=(0,m.u)();return n.createElement(yn,null,e.slice(0,5).map(e=>n.createElement(vn,{key:e.id},n.createElement(Tt.A,{size:"smaller",color:`${E.Ay[`desktop-color-text-2-${a}`]}`}),n.createElement(wn,null,n.createElement(Ln,{log:e}),n.createElement(o.A,{size:"inherit",color:"text-3"},t.tooltip.format(e.timestamp))))))},Pn=({analyzerEventValue:e,analyzerDateTimeFormats:t})=>e.length>1?n.createElement(xn,{analyzerEventValue:e,analyzerDateTimeFormats:t}):n.createElement(Ln,{log:e[0]}),Un=({analyzerEventValue:e,analyzerDateTimeFormats:t})=>n.createElement(Ba,null,1===e.length?n.createElement(qa,{analyzerDateTimeFormats:t,timestamp:e[0].timestamp}):null,n.createElement(Pn,{analyzerEventValue:e,analyzerDateTimeFormats:t}),n.createElement(pn,{analyzerEventValue:e})),Fn=wa.$_/2,bn=({clientLogsQueryParams:e,dateRange:{startDate:t,endDate:a},getCoordinates:r,dateTimeFormat:l})=>{const c=(0,n.useContext)(qt),o=(0,i.useSelector)((0,n.useMemo)(()=>(0,I.p)(e),[e])),s=(0,n.useCallback)(e=>{c[kt.SET_ACTIVE_ROWS](e)},[c]),m=(0,n.useCallback)(()=>{c[kt.SET_ACTIVE_ROWS]([])},[c]),E=(0,n.useCallback)(e=>n.createElement(Un,{analyzerEventValue:e,analyzerDateTimeFormats:l}),[l]),u=(0,n.useCallback)(e=>(0,n.createElement)(Xa[e[0].key],{...Ya}),[]);return n.createElement(va,{logs:o,range:{startDate:t,endDate:a},getCoordinates:r,getLogsDescription:E,getLogsIcon:u,onMouseEnter:s,onMouseLeave:m,eventGroupingRange:Fn})},Wn=[20,0,20,24],Hn=(0,Ea.Y)(100,3),$n=(0,Ea.Y)(-100,3).reverse().map(e=>({value:e.value})),kn=({mac:e,clientLogsQueryParams:t,chartHeight:a,preset:r,dateRange:l,scale:c})=>{const o=(0,i.useDispatch)(),s=(0,n.useRef)(null),m=(0,n.useRef)({left:0,top:0}),{ref:u,width:d=0}=(0,Vt.A)(),{startDate:A}=l,N=(0,n.useMemo)(()=>[e,A.getTime(),c,sa.qv.USER],[e,A,c]),O=(0,i.useSelector)((0,n.useMemo)(()=>(0,oa.aO)(...N),[N])),_=(0,n.useMemo)(()=>ra[c],[c]),T=(0,n.useMemo)(()=>O.flatMap((e,t,a)=>{const n=a[t-1],r=n?Math.round((e.time-n.time)/_):0;return r>1?Array.from(Array(r).keys()).map(t=>({...e,signal:0,tx_retries:0,wifi_tx_attempts:0,wifi_tx_dropped:0,tx_packets:0,rx_packets:0,time:n.time+(t+1)*_})):[{...e}]}),[O,_]),I=(0,n.useMemo)(()=>_/1e3,[_]),{xAxis:p,dayDifference:D}=pa(l,r),S=Ma(),M=(0,n.useCallback)(({hidden:e,left:t=0,top:r=0,x:l,custom:i},c,o)=>(c===Jt.SIGNAL&&(m.current={left:t||0,top:r||0}),n.createElement(Aa,{hidden:e,left:t||0,top:r||0,signalTooltipProps:m.current,x:l,customTooltipProps:i,chartHeight:a,chartWidth:d,wirelessClientsChartState:c,gradientColor:o,dayDifference:D,txRetries:i?.txRetries,signalStrength:i?.signalStrength,dateTimeFormat:S,intervalSeconds:I})),[S,a,d,m,D,I]),h=(0,n.useCallback)((e,t,a,r,l,i)=>n.createElement(n.Fragment,null,n.createElement(Sa,{userReport:T,getCoordinates:e,mouseData:t,maxY:a,yAxisMax:r,yAxisMin:l,y2AxisMax:r,y2AxisMin:l,chartHovered:i,tooltipContainer:s,wirelessClientsChartState:Jt.RETRIES,renderTooltip:M}),n.createElement(Sa,{userReport:T,getCoordinates:e,mouseData:t,maxY:a,yAxisMax:r,yAxisMin:l,y2AxisMax:r,y2AxisMin:l,chartHovered:i,tooltipContainer:s,wirelessClientsChartState:Jt.SIGNAL,renderTooltip:M})),[T,M]),R=(0,n.useCallback)(e=>n.createElement(bn,{clientLogsQueryParams:t,dateRange:l,getCoordinates:e,dateTimeFormat:S}),[t,l,S]),g=(0,n.useCallback)((e,t,a,r,l,i,c,o,s,m=!1)=>n.createElement(n.Fragment,null,h(e,t,a,i,c,m),R(e)),[h,R]);return(0,n.useEffect)(()=>{o((0,ma.EG)(...N))},[o,N]),n.createElement(C.A,{width:"100%",position:"relative",ref:u},n.createElement(ca.A,{key:N.join(),xAxis:p,yAxis:Hn,y2Axis:$n,width:d,height:a,margin:Wn,renderXLabel:e=>n.createElement("tspan",{fontSize:E.Ay["desktop-font-size-small"]},e.label),renderYLabel:(e,t)=>n.createElement("tspan",{fontSize:E.Ay["desktop-font-size-small"],y:0===t?10:void 0},e.label)},g),n.createElement("div",{ref:s}))},Vn=({queryParams:e})=>{const{[kt.ACTIVE_ROWS]:t}=(0,n.useContext)(qt);return n.createElement(H,{queryParams:e,activeRows:t})},zn=ie.l.ONE_DAY,Gn=ce.E[zn].getRange(new Date),Xn=Zt.FE.MINUTES,Yn=({mac:e})=>{const t=(0,i.useDispatch)(),{ref:a}=(0,Vt.A)(),[r,l]=(0,n.useState)([]),c=(0,n.useMemo)(()=>({mac:e,separateConnectionSignalParam:!0,limit:Qt.HF,scope:void 0}),[e]),o=(0,n.useMemo)(()=>({[kt.ACTIVE_ROWS]:r,[kt.SET_ACTIVE_ROWS]:l}),[r]);(0,n.useEffect)(()=>{t((0,zt.Ic)(void 0,{crudCacheStrategy:{type:u.e.CACHE}})),t((0,jt.Uc)(void 0,{crudCacheStrategy:{type:u.e.CACHE}}))},[t]),(0,n.useEffect)(()=>{t((0,D.p)({crudCacheStrategy:{type:u.e.CACHE}},{queryParams:c}))},[c,t]);const s=(0,n.useCallback)(()=>n.createElement(C.A,{flexDirection:"column",ref:a,gap:A.Ln},n.createElement(qt.Provider,{value:o},n.createElement(kn,{mac:e,clientLogsQueryParams:c,chartHeight:162,preset:zn,dateRange:Gn,scale:Xn}),n.createElement(ia,null),n.createElement(Vn,{queryParams:c}))),[o,a,c,e]),m=(0,n.useMemo)(()=>[{id:"performance",label:n.createElement(N.A,{id:"COMMON_PERFORMANCE"}),openByDefault:!0,renderContent:s}],[s]);return(0,Xt.A)([(0,Yt.Zi)(Gt.B.ANALYZER),(0,zt.$3)(void 0,{crudCacheStrategy:{type:u.e.CACHE}})],n.createElement(O.A,{type:O.I.ACCORDION,items:m}))},Bn=({activeItem:e,activeItem:{mac:t,type:a}})=>n.createElement(n.Fragment,null,n.createElement(l.A,{activeItem:e,isWired:a===r.sK.WIRED,hideChannels:!0}),a===r.sK.WIRELESS?n.createElement(n.Fragment,null,n.createElement(Yn,{mac:t}),n.createElement($t,{mac:t})):null,n.createElement(ut,{mac:t}),n.createElement(_e,{mac:t}),a!==r.sK.WIRELESS?n.createElement($,{mac:t}):null)}}]);