"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[25374,89965],{22169:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(296540),a=n(217439),r=n(699784),l=n(115829),o=n(39705),s=n(294303);const c=({ipv6:e,size:t="inherit",color:n="inherit"})=>{const c=e?.[0];return c?i.createElement(s.A,{width:"100%",justifyContent:"flex-end"},i.createElement(l.A,{flexProps:{justifyContent:"flex-end",alignItems:"center"},color:n,size:t},c),e?.length>1?i.createElement(o.A,{items:e,isInteractive:!0,showListMarkers:!1,getItemKey:e=>e,renderListItem:e=>i.createElement(i.Fragment,null,e),renderMultipleItemsSummary:()=>null}):null):i.createElement(a.A,{size:t,color:n},i.createElement(r.sA,{id:"COMMON_FALLBACK"}))}},39705:(e,t,n)=>{n.d(t,{A:()=>c});var i=n(296540),a=n(705145),r=n(699784),l=n(115829),o=n(424135),s=n(819127);const c=function({items:e,renderMultipleItemsSummary:t,renderListItem:n,renderNoItems:c,getItemKey:m,enabled:d=!0,showListMarkers:A,cursorType:u,isInteractive:p}){const E=d?"inherit":"disabled";return e.length>1?i.createElement(o.A,{tooltip:i.createElement(s.A,{items:e,getItemKey:m,renderItem:n,showListMarkers:A,isInteractive:p,cursorType:u})},i.createElement(l.A,{color:E,cursorType:u},t(e))):1===e.length?i.createElement(l.A,{color:E,cursorType:u},n(e[0])):c?i.createElement(i.Fragment,null,c()):i.createElement(a.A,{isTruncated:!0,color:E},i.createElement(r.sA,{id:"COMMON_FALLBACK"}))}},75354:(e,t,n)=>{n.d(t,{A:()=>R});var i=n(296540),a=n(814942),r=n.n(a),l=n(776248),o=n.n(l),s=n(837407),c=n.n(s),m=n(580351),d=n.n(m),A=n(128153),u=n.n(A),p=n(258407),E=n.n(p),h=n(324837),_=n.n(h),g=n(89189),I=n.n(g),C=n(990292),N=n.n(C),O=n(127403),S=n.n(O),y=n(590517),f=n.n(y),v=n(778899),x=n.n(v),M=n(894713),T=n.n(M),D=n(296713),w=n.n(D),L=n(699784);const R=({uptime:e=0})=>{const t=new Date;let n=r()(t,e);const a=e=>(n=e,n),l=o()(t,n),s=u()(t,a(N()(n,l))),m=c()(t,a(f()(n,s))),A=I()(t,a(S()(n,m))),p=_()(t,a(w()(n,A))),h=E()(t,a(T()(n,p))),g=d()(t,a(x()(n,h)));let C="DASHBOARD_DURATION_SECONDS";return l?C="DASHBOARD_DURATION_YEARS":s?C="DASHBOARD_DURATION_MONTHS":m?C="DASHBOARD_DURATION_WEEKS":A?C="DASHBOARD_DURATION_DAYS":p?C="DASHBOARD_DURATION_HOURS":h&&(C="DASHBOARD_DURATION_MINUTES"),i.createElement(L.sA,{id:C,values:{years:l,months:s,weeks:m,days:A,hours:p,minutes:h,seconds:g}})}},86571:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(296540),a=n(217439),r=n(699784);const l=({id:e,children:t,values:n})=>i.createElement(a.A,{color:"text-1",weight:"bold",size:"medium"},e?i.createElement(r.sA,{id:e,values:n}):null,t)},91255:(e,t,n)=>{n.d(t,{T:()=>o});var i=n(691189);const a=":wanNetworkGroup:",r=`ispStatus${a}`,l=`/v2/api/site/{site}/wan/${a}/isp-status`,o=(e,t={},n={})=>(0,i.Kd)(r.replace(a,e),l.replace(a,e),r,{queryParams:{include_isp_alerts:!1},...t},n)},224948:(e,t,n)=>{n.d(t,{A:()=>d});var i=n(296540),a=n(217439),r=n(71479),l=n(566723),o=n(294303),s=n(689965);const c=(0,r.A)("div")`
  margin-right: ${l.kc};
`,m=(0,r.A)("div")`
  margin-left: ${l.kc};
`,d=({icon:e,closeIcon:t,nested:n,children:r,...l})=>i.createElement(s.A,{nested:n,...l},i.createElement(o.A,null,i.createElement(c,null,e),i.createElement(a.A,{size:"medium"},r),t?i.createElement(m,null,t):null))},284428:(e,t,n)=>{n.d(t,{Im:()=>s,iL:()=>c,mQ:()=>l,pv:()=>r,q:()=>o});var i=n(296540),a=n(451449);function r(){return(0,i.useContext)(a.I)}function l(){return r().fields}function o(){return r().tooltipPopovers}function s(){return r().tooltipIcons}function c(){return r().labels}},325374:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Fe});var i,a=n(296540),r=n(469733),l=n(592510),o=n(86571),s=n(689965),c=n(479403),m=n(91255),d=n(780811),A=n(566723),u=n(294303),p=n(699784),E=n(195462),h=n(945132);!function(e){e.NEUTRAL="neutral",e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger"}(i||(i={}));var _=n(927099),g=n(823858),I=n(71479);const C=(0,I.A)(u.A)`
  width: 336px;
  padding: ${A.Ln} ${A.xO};
  margin-bottom: ${A.S2};
  background-color: ${({theme:{motifPalette:{neutral02:e}}})=>e};
`,N=(0,I.A)(g.A,{shouldForwardProp:e=>"color"!==e})`
  margin-right: ${A.xO};
  color: ${({theme:{motifPalette:e},color:t})=>e[t]};
`,O=({isHighLatency:e,isPacketLoss:t,latencyState:n})=>e||t?a.createElement(C,null,a.createElement(N,{size:"original",variant:"twoTone",color:t?"danger":n}),a.createElement(_.A,{size:"caption",color:"secondary"},a.createElement(p.sA,{id:e&&t?"DASHBOARD_ISP_HIGH_LAT_PACKET_LOSS":e?"DASHBOARD_ISP_HIGH_LAT":"DASHBOARD_ISP_PACKET_LOSS"})," ",a.createElement(p.sA,{id:"DASHBOARD_ISP_RESTART"}))):null;var S=n(618983),y=n(6510),f=n(381377),v=n(747065),x=n(568777);const M=(0,I.A)(u.A,{shouldForwardProp:e=>"latencyState"!==e})`
  border-bottom: 1px solid ${({theme:{motifPalette:e},latencyState:t})=>e[t]};
`,T=(0,I.A)(u.A,{shouldForwardProp:e=>!["content","isIsp"].includes(e)})`
  &:after {
    content: ${({content:e})=>`'${e}'`};
    position: absolute;
    ${({isIsp:e=!1})=>`\n      width: ${e?"4":"2"}00%;\n      left: ${e?"4px":"-100%"};\n      text-align: ${e?"start":"end"};\n    `}
    bottom: -25%;
    white-space: nowrap;
    font-weight: 600;
    font-size: 10px;
    text-overflow: ellipsis;
    overflow: hidden;
  }
`,D=(0,a.memo)(({formatMessage:e,model:t,type:n,latencyState:r,serviceProviderName:l,serviceProviderAsn:o})=>{return a.createElement(u.A,{position:"relative",width:"100%",alignItems:"center",justifyContent:"space-between",marginTop:A.kc},a.createElement(T,{position:"relative",content:l||e({id:"COMMON_ISP"}),isIsp:!0},a.createElement(u.A,{width:25,maxWidth:25,minWidth:25,height:45,maxHeight:45,minHeight:45},a.createElement(x.A,{style:{width:"25px",objectFit:"contain"},asn:o,name:l,useFallback:!0}))),a.createElement(M,{position:"absolute",width:"calc(100% - 28px)",left:25,latencyState:r},(0,a.createElement)((s=r===i.SUCCESS?S.A:g.A,(0,I.A)(s,{shouldForwardProp:e=>"latencyState"!==e})`
  position: absolute;
  left: calc(50% - 12.5px);
  margin-top: 8px;
  color: ${({theme:{motifPalette:e},latencyState:t})=>e[t]};
`),{latencyState:r,size:"medium",variant:"twoTone"})),a.createElement(T,{position:"relative",content:t&&n?(0,y.Lm)(t):e({id:"COMMON_NON_UNIFI_GW"})},t&&n?a.createElement(v.A,{model:t,type:n,size:45}):a.createElement(f.A,null)));var s});var w=n(340936),L=n(325898),R=n(936344),b=n(282556),P=n(602021),k=n(198494),z=n(964238),$=n(66706),H=n(112142);const U={[i.DANGER]:30,[i.WARNING]:15};var G=n(825032);const B="ispGraphGradientId",W={[G.S.LIGHT]:{[i.NEUTRAL]:"#D6D9E2",[i.SUCCESS]:"#88E0A2",[i.WARNING]:"#FFDB1A",[i.DANGER]:"#F03A3E"},[G.S.DARK]:{[i.NEUTRAL]:"#333543",[i.SUCCESS]:"#30AD55",[i.WARNING]:"#D9BA16",[i.DANGER]:"#CC3135"}};var F=n(118818);const Y=({y:e,x:t,latency_max:n,formatTimestamp:i})=>a.createElement(u.A,{flexDirection:"column",gap:A.YC},a.createElement(u.A,{justifyContent:"space-between"},a.createElement(_.A,{color:"primary",size:"caption"},a.createElement(p.sA,{id:"COMMON_TIME"})),a.createElement(_.A,{color:"secondary",size:"caption"},i(t)," - ",i(t+3e5))),a.createElement(u.A,{justifyContent:"space-between"},a.createElement(_.A,{color:"primary",size:"caption"},a.createElement(p.sA,{id:"COMMON_AVERAGE"})),a.createElement(_.A,{color:"secondary",size:"caption"},a.createElement(p.sA,{id:"COMMON_UNIT_MILLISECONDS_SHORT",values:{value:e}}))),a.createElement(u.A,{justifyContent:"space-between"},a.createElement(_.A,{color:"primary",size:"caption"},a.createElement(p.sA,{id:"COMMON_MAXIMUM"})),a.createElement(_.A,{color:"secondary",size:"caption"},a.createElement(p.sA,{id:"COMMON_UNIT_MILLISECONDS_SHORT",values:{value:n}})))),K=({downtimes:e,formatTimestamp:t})=>a.createElement(u.A,{flexDirection:"column",gap:A.YC},a.createElement(_.A,{color:"primary",size:"caption",weight:"bold"},a.createElement(p.sA,{id:"COMMON_INTERNET_DISCONNECTED"})),(e||[]).map(({id:e,downtime_in_seconds:n,timestamp:i})=>a.createElement(u.A,{key:e,alignItems:"center",gap:A.YC},a.createElement(F.A,{variant:"danger"}),a.createElement(_.A,{style:{marginLeft:A.YC},color:"secondary",size:"caption"},t(i)," - ",t(i+1e3*n))))),j=(e,t,n,r)=>()=>{const l=100*Math.min(Math.max(n,0),t)/t,o=l-100*Math.min(U[i.DANGER],t)/t,s=l-100*Math.min(U[i.WARNING],t)/t;return a.createElement("defs",null,a.createElement("linearGradient",{id:e,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},o>0?a.createElement("stop",{offset:`${o}%`,stopColor:W[r][i.DANGER],stopOpacity:.7}):null,s>0?a.createElement("stop",{offset:`${s}%`,stopColor:W[r][i.WARNING],stopOpacity:.7}):null,a.createElement("stop",{offset:"100%",stopColor:W[r][i.SUCCESS],stopOpacity:.7})))},V=(e,t,n)=>W[n][t?i.DANGER:e<1&&i.NEUTRAL||e>U[i.DANGER]&&i.DANGER||e>U[i.WARNING]&&i.WARNING||i.SUCCESS],Z=({width:e,height:t,highestYAxis:n,motif:i,formatTimestamp:r})=>({left:l,top:o,hidden:s,y:c=0,x:m=0,custom:{latency_max:d,downtimes:A,downtime:p}={latency_max:0,downtime:!1,downtimes:[]}})=>a.createElement(a.Fragment,null,a.createElement(H.A,{width:200,left:l,top:o-4,description:p?a.createElement(K,{formatTimestamp:r,downtimes:A}):a.createElement(Y,{formatTimestamp:r,y:c,x:m,latency_max:d}),hidden:s||c<0||!n,tooltipProps:{maxWidth:"auto",...l&&e&&{position:l<Math.round(e/2)?"topLeft":"topRight"},offset:16}}),a.createElement(u.A,{position:"absolute",top:0,left:0},a.createElement("svg",{width:e,height:t},n&&l&&o?a.createElement($.A,{hasAnimation:!1,x:l,y:o,color:V(c,p,i)}):null)));var q=n(718073),Q=n(162420);const X=(0,a.memo)(()=>a.createElement(u.A,{alignItems:"center",marginBottom:A.kc,gap:A.kc},a.createElement(_.A,{size:"body",color:"primary"},a.createElement(p.sA,{id:"COMMON_LATENCY"})," (",a.createElement(p.sA,{id:"COMMON_UNIT_MS"}),")"),a.createElement(q.A,{description:a.createElement(p.sA,{id:"DASHBOARD_PING_SERVER"})},a.createElement("span",null,a.createElement(Q.A,{isActive:!0}))))),J=({uplinkStatusStatistics:e,formatMessage:t})=>{const{motif:n}=(0,L.A)(),i=(0,a.useRef)(null),l=(0,r.useSelector)(P.hq),o=(0,r.useSelector)(b.zi),s=(0,r.useSelector)(k.BQ),{ref:c,width:m=0,height:d=0}=(0,w.A)(),{chartData:A,highestYAxis:p}=(0,a.useMemo)(()=>{let t=0;return{chartData:e.map(({latency:e,timestamp:n,latency_max:i,downtime:a,downtimes:r})=>(e>t&&(t=e),{x:n,y:a?0:Math.max(.5,e),custom:{latency_max:i,downtime:a,downtimes:r}})),highestYAxis:t}},[e]),_=Math.max(60,p),g=(0,a.useMemo)(()=>((e,t)=>{const n=e[0]?.timestamp||Date.now()-h.jU,i=e.length>1&&e[e.length-1]?.timestamp||Date.now(),a=i-n<h.$_;return(0,E.v)([n,i],5).map((e,r,l)=>({value:e,label:0===r?t({id:a?"COMMON_GRANULARITY_MINS_CUSTOM":"COMMON_GRANULARITY_HRS_CUSTOM"},{...a?{minutes:Math.ceil((i-n)/6e4)}:{hours:Math.ceil((i-n)/h.$_)}}):r===l.length-1&&t({id:"COMMON_NOW"})||null}))})(e,t),[e,t]),I=(0,a.useMemo)(()=>(0,E.Y)(_,5),[_]),C=(0,a.useCallback)(e=>new Intl.DateTimeFormat(o,{timeZone:l,hourCycle:s,hour:"numeric",minute:"2-digit"}).format(e),[o,l,s]);return a.createElement(u.A,{width:"100%",height:"100%",flexDirection:"column"},a.createElement(X,null),a.createElement(u.A,{ref:c,minHeight:190,position:"relative",width:"100%"},a.createElement(R.A,{xAxis:g,yAxis:I,width:m,height:d,margin:[20,5,30,20]},(({chartData:e,width:t,height:n,tooltipContainer:i,maxYAxis:r,highestYAxis:l,motif:o,formatTimestamp:s})=>(c,m,d,A,u,p,E,h,_,g)=>a.createElement(z.A,{data:e,maxY:d,mouseData:m,getCoordinates:c,lineColor:"transparent",variant:"gradientArea",interpolation:"curved",customGradientId:B,allowCustomDots:!0,renderCustomGradient:j(B,r,l,o),tooltipPortal:i?.current,yAxisMax:p,yAxisMin:E,y2AxisMax:h,y2AxisMin:_,showTooltip:g,renderTooltip:Z({width:t,height:n,highestYAxis:l,formatTimestamp:s,motif:o})}))({chartData:A,width:m,height:d,tooltipContainer:i,maxYAxis:_,highestYAxis:p,motif:n,formatTimestamp:C})),a.createElement("div",{ref:i})))},ee=(0,a.memo)(({availability:e,latency:t,model:n,type:r,isWanConnected:l,serviceProviderName:o,serviceProviderAsn:s,wanIspStatus:{statistics:c=[],latency_threshold:m}={statistics:[],latency_threshold:0}})=>{const{formatMessage:d}=(0,p.tz)(),E=(0,a.useMemo)(()=>((e,t)=>{if(e&&t){if(e>2*t)return i.DANGER;if(e>t)return i.WARNING}return i.SUCCESS})(t,m),[t,m]);return a.createElement(u.A,{width:"100%",height:"100%",flexDirection:"column",paddingBottom:A.kc},a.createElement(O,{isPacketLoss:e<100,isHighLatency:E!==i.SUCCESS,latencyState:E}),a.createElement(J,{uplinkStatusStatistics:c,formatMessage:d}),a.createElement(D,{model:n,type:r,formatMessage:d,latencyState:l?E:i.DANGER,serviceProviderName:o,serviceProviderAsn:s}))});var te=n(271856),ne=n(882675);const ie={[ne.L.DOWNTIMES]:"COMMON_INTERNET_DISCONNECTED",[ne.L.PACKET_LOSS]:"DASHBOARD_MODULE_INTERNET_PACKET_LOSS",[ne.L.HIGH_LATENCIES]:"DASHBOARD_MODULE_INTERNET_HEALTH_LATENCY"},ae={[ne.L.DOWNTIMES]:null,[ne.L.PACKET_LOSS]:"DASHBOARD_MODULE_INTERNET_PACKET_LOSS_NOTICE",[ne.L.HIGH_LATENCIES]:null};var re=n(75354);const le=e=>"downtime_in_seconds"in e,oe=(0,I.A)(u.A,{shouldForwardProp:e=>"ispConnectionWarning"!==e})`
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border-width: 1px;
  border-style: solid;
  ${({theme:{motifPalette:{warning:e,danger:t}},ispConnectionWarning:n})=>`\n    border-color: ${n===ne.L.HIGH_LATENCIES?e:t};\n    background-color: ${n===ne.L.PACKET_LOSS?"transparent":n===ne.L.HIGH_LATENCIES?e:t};\n  `}
`,se=(0,I.A)("span")`
  &:after {
    content: '|';
  }
  margin: 0 ${A.kc};
  color: ${({theme:{motifPalette:{neutral03:e}}})=>e};
`,ce=({ispConnectionWarningValues:e,dateTimeFormat:t})=>a.createElement(u.A,{flexDirection:"column",gap:A.YC},e.sort((e,t)=>(le(t)?t.timestamp:t.timestamp_start)-(le(e)?e.timestamp:e.timestamp_start)).slice(0,20).map(e=>{return n=le(e)?e.timestamp:e.timestamp_start,i=le(e)?e.downtime_in_seconds:(e.timestamp_end-e.timestamp_start)/1e3,a.createElement(_.A,{key:n,size:"caption",color:"primary"},n>0?t.format(n):null,n>0&&i>0?a.createElement(a.Fragment,null," - "):null,i>0?a.createElement(re.A,{uptime:i}):null);var n,i})),me=({ispConnectionWarningValue:e,dateTimeFormat:t})=>{return n=le(e)?e.timestamp:e.timestamp_start,i=le(e)?e.downtime_in_seconds:(e.timestamp_end-e.timestamp_start)/1e3,a.createElement(a.Fragment,null,n>0?t.format(n):null,n>0&&i>0?a.createElement(se,null):null,i>0?a.createElement(re.A,{uptime:i}):null);var n,i},de=(0,a.memo)(({networkgroup:e})=>{const t=(0,r.useSelector)(P.hq),n=(0,r.useSelector)(b.zi),i=(0,r.useSelector)(k.BQ),l=Object.entries((0,r.useSelector)((0,a.useMemo)(()=>(0,c.IB)(e),[e]))).filter(([e,t=[]])=>Boolean(t.length)),o=(0,a.useMemo)(()=>new Intl.DateTimeFormat(n,{hourCycle:i,timeZone:t,month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}),[n,i,t]);return l.length?a.createElement(u.A,{flexDirection:"column",width:"100%",gap:A.kc},l.map(([e,t])=>a.createElement(u.A,{key:e,alignItems:"center",gap:A.Ln},a.createElement(oe,{ispConnectionWarning:e}),a.createElement(u.A,{flexDirection:"column"},a.createElement(u.A,{alignItems:"center",gap:A.YC},a.createElement(_.A,{size:"body",color:"primary"},a.createElement(p.sA,{id:ie[e]||"COMMON_UNKNOWN"})),ae[e]?a.createElement(te.A,{width:320,portal:!0,description:a.createElement(p.sA,{id:ae[e]})},a.createElement(Q.A,{isActive:!0})):null),a.createElement(_.A,{size:"caption",color:"tertiary"},t.length>1?a.createElement(u.A,{alignItems:"center",gap:A.kc},a.createElement(p.sA,{id:"DASHBOARD_MULTIPLE_TIMES"}),a.createElement(te.A,{width:"100%",maxWidth:"max-content",description:a.createElement(ce,{ispConnectionWarningValues:t,dateTimeFormat:o}),portal:!0},a.createElement(Q.A,{isActive:!0}))):a.createElement(me,{ispConnectionWarningValue:t[0],dateTimeFormat:o})))))):a.createElement(_.A,{color:"tertiary",size:"body"},a.createElement(p.sA,{id:"DASHBOARD_MODULE_INTERNET_NO_EV"}))});var Ae=n(777916),ue=n(217439),pe=n(383653),Ee=n(137298),he=n(568560),_e=n(22169),ge=n(115829),Ie=n(519680),Ce=n(745667),Ne=n(817518),Oe=n(634229),Se=n(896291),ye=n(811822);const fe=(0,I.A)(u.A)`
  flex-direction: column;
  gap: ${A.kc};
  white-space: nowrap;
`,ve=(0,I.A)(u.A)`
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: ${A.Ln};
`,xe=(0,a.memo)(({lan_ip:e,ip:t,ipv6:n,latency:i,port_idx:o,configuration:c,service_provider:m,statistics:d,isWanUp:A,isWanConnected:E,wanIspStatus:h,wanDhcpv6PdSize:_})=>{const g=(0,r.useDispatch)();(0,a.useEffect)(()=>{g((0,Ce.hh)(void 0,{crudCacheStrategy:{type:l.e.CACHE}})),g((0,Oe.Sk)(void 0,{crudCacheStrategy:{type:l.e.CACHE}})),g((0,Se.N)(void 0,{crudCacheStrategy:{type:l.e.CACHE}}))},[g]);const I=(0,a.useMemo)(()=>c?.wan_type_v6&&c?.wan_type_v6!==Ne.c.DISABLED?(0,Ie.Ae)(c.wan_type_v6,c?.wan_ipv6,n):[],[c?.wan_ipv6,c?.wan_type_v6,n]);return a.createElement(s.A,null,a.createElement(fe,null,a.createElement(ve,null,a.createElement(ue.A,{color:"text-1",size:"medium"},a.createElement(p.sA,{id:"COMMON_STATUS"})),a.createElement(ue.A,{color:"text-3",size:"medium"},a.createElement(p.sA,{id:A?E?"COMMON_ONLINE":"COMMON_OFFLINE":"COMMON_DISCONNECTED"}))),t?a.createElement(ve,null,a.createElement(ue.A,{color:"text-1",size:"medium"},a.createElement(p.sA,{id:"COMMON_WAN_IP_ADDRESS"}),o?a.createElement(a.Fragment,null," (",a.createElement(p.sA,{id:"COMMON_PORT"})," ",o,")"):null),a.createElement(ue.A,{color:"text-3",size:"medium"},t)):null,e?a.createElement(ve,null,a.createElement(ue.A,{color:"text-1",size:"medium"},a.createElement(p.sA,{id:"COMMON_GATEWAY_IP"})),a.createElement(ue.A,{color:"text-3",size:"medium"},e)):null,I.length?a.createElement(ve,null,a.createElement(ue.A,{color:"text-1",size:"medium"},a.createElement(p.sA,{id:"COMMON_WAN_IP_V6"})),a.createElement(u.A,{flex:"1",minWidth:"0",justifyContent:"flex-end"},a.createElement(he.A,{ipv6:I,size:"medium",color:"text-3"}))):null,_&&I.length?a.createElement(ve,null,a.createElement(ue.A,{color:"text-1",size:"medium"},a.createElement(p.sA,{id:"COMMON_IPV6_PREFIX"})),a.createElement(u.A,{flex:"1",minWidth:"0",justifyContent:"flex-end"},a.createElement(_e.A,{ipv6:[`${(0,pe.Gh)(I[0],_)}/${_}`],color:"text-3",size:"medium"}))):null,Number.isFinite(i)?a.createElement(ve,null,a.createElement(ue.A,{color:"text-1",size:"medium"},a.createElement(p.sA,{id:"COMMON_LATENCY"})),a.createElement(ue.A,{color:"text-3",size:"medium"},a.createElement(p.sA,{id:"COMMON_UNIT_MILLISECONDS_SHORT",values:{value:i>0?i:"<1"}}))):null,m?.name?a.createElement(ve,null,a.createElement(ue.A,{color:"text-1",size:"medium"},a.createElement(p.sA,{id:"COMMON_SERVICE_PROVIDER"})),a.createElement(ge.A,{color:"text-3",size:"medium",flexProps:{justifyContent:"end"}},m.name)):null,m?.city?a.createElement(ve,null,a.createElement(ue.A,{color:"text-1",size:"medium"},a.createElement(p.sA,{id:"COMMON_LABEL_LOCATION"})),a.createElement(ue.A,{color:"text-3",size:"medium"},m.city)):null,c?.wan_provider_capabilities?.download_kilobits_per_second?a.createElement(ve,null,a.createElement(ue.A,{color:"text-1",size:"medium"},a.createElement(p.sA,{id:"DASHBOARD_ISP_PROPERTY_DOWNLOAD_CAPACITY"})),a.createElement(Ae.A,{type:"bytes",input:(0,Ee.Zz)(c.wan_provider_capabilities.download_kilobits_per_second),options:"bitrate",color:"tertiary",size:"body"})):null,c?.wan_provider_capabilities?.upload_kilobits_per_second?a.createElement(ve,null,a.createElement(ue.A,{color:"text-1",size:"medium"},a.createElement(p.sA,{id:"DASHBOARD_ISP_PROPERTY_UPLOAD_CAPACITY"})),a.createElement(Ae.A,{type:"bytes",input:(0,Ee.Zz)(c.wan_provider_capabilities.upload_kilobits_per_second),options:"bitrate",color:"tertiary",size:"body"})):null,(0,ye.Et)(h?.uptime)?a.createElement(ve,null,a.createElement(ue.A,{color:"text-1",size:"medium"},a.createElement(p.sA,{id:"COMMON_UPTIME"})),a.createElement(ue.A,{size:"medium",color:"text-3"},h.uptime,"%")):null,d?.peak_usage?.download_percentage&&-1!==d.peak_usage.download_percentage&&d.peak_usage?.upload_percentage&&1!==d.peak_usage.upload_percentage?a.createElement(ve,null,a.createElement(ue.A,{color:"text-1",size:"medium"},a.createElement(p.sA,{id:"DASHBOARD_PEAK_UTILIZATION"})),a.createElement(ue.A,{size:"medium",color:"text-3"},`${Math.min(d.peak_usage.download_percentage,100).toFixed(0)}% / ${Math.min(d.peak_usage.upload_percentage,100).toFixed(0)}%`)):null))});var Me,Te=n(822336),De=n(998837),we=n(592563),Le=n(956347),Re=n(224948),be=n(746289);!function(e){e.INITIALIZING="INITIALIZING",e.ACTIVE="ACTIVE",e.CONNECTION_ISSUE="CONNECTION_ISSUE",e.IP_CONFLICT="IP_CONFLICT"}(Me||(Me={}));var Pe=n(928085),ke=n(959341);const ze="192.168.100.0/24";var $e=n(845030),He=n(398300),Ue=n(366188),Ge=n(524936);const Be=(0,I.A)(u.A)`
  flex-direction: column;
`,We=({service_provider:e,isp_stats:t})=>{const{themeName:n}=(0,De.u)(),i=(0,r.useDispatch)(),l=(0,Le.W6)(),o=(0,Pe.A)(ke.Cs),s=(0,r.useSelector)(Ue.Ct),c=(0,a.useMemo)(()=>s.find(e=>(0,Ge.mC)(e)===ze)?._id,[s]),m=(0,a.useMemo)(()=>[[e?.name?.toLowerCase()===be.ej.toLowerCase()&&(t?.status===Me.CONNECTION_ISSUE||t?.status===Me.IP_CONFLICT),a.createElement(Q.A,{variant:"fill",size:"original",color:Te.Ay[`desktop-color-ublue-06-${n}`]}),(()=>{switch(t?.status){case Me.CONNECTION_ISSUE:return{id:"DASHBOARD_STARLINK_GATEWAY_NOTIFICATIONS"};case Me.IP_CONFLICT:return{id:"DASHBOARD_STARLINK_IP_NOTIFICATIONS",values:{starlinkSubnet:ze,link:a.createElement(we.A,{type:"button",onClick:()=>{c?i((0,$e.XP)({type:He.H.NETWORK,id:c})):l.push(o)}},a.createElement(p.sA,{id:"DASHBOARD_STARLINK_IP_ACTION"}))},headerId:"DASHBOARD_STARLINK_IP_HEADER"};default:return{id:void 0}}})()]],[e?.name,n,t?.status,i,l,o,c]);return a.createElement(Be,null,m.map(([e,t,{id:n,values:i,headerId:r}])=>e?a.createElement(Re.A,{key:n,icon:t},r?a.createElement(a.Fragment,null,a.createElement(ue.A,{size:"medium",weight:"bold",color:"text-1"},a.createElement(p.sA,{id:r})),a.createElement("br",null)):null,a.createElement(p.sA,{id:n,values:i})):null))},Fe=({activeItem:{_id:e,ip:t,ipv6:n,availability:i,latency:A,port_idx:u,configuration:p,details:{service_provider:E,isp_stats:h},statistics:_,model:g,type:I,lan_ip:C,networkgroup:N,isWanUp:O,isWanConnected:S,wan_dhcpv6_pd_size:y}})=>{const f=(0,r.useDispatch)(),v=(0,r.useSelector)((0,a.useMemo)(()=>(0,c.nN)(N),[N])),x=(0,a.useMemo)(()=>(0,d.oWO)({type:I}),[I]),M=(0,a.useMemo)(()=>[{id:"internetQuality",openByDefault:!0,label:a.createElement(o.A,{id:"DASHBOARD_MODULE_INTERNET_QUALITY"}),renderContent:()=>a.createElement(ee,{latency:A,model:g,type:I,availability:i,isWanConnected:S,serviceProviderName:E?.name,serviceProviderAsn:E?.asn,wanIspStatus:v})}],[A,g,I,i,S,E?.name,E?.asn,v]),T=(0,a.useMemo)(()=>[{id:"internetEventLogs",openByDefault:!0,label:a.createElement(o.A,{id:"DASHBOARD_MODULE_INTERNET_EV_LOG"}),renderContent:()=>a.createElement(de,{networkgroup:N})}],[N]);return(0,a.useEffect)(()=>{f((0,m.T)(N,void 0,{crudCacheStrategy:{type:l.e.CACHE}}))},[f,N]),a.createElement(a.Fragment,null,a.createElement(We,{service_provider:E,isp_stats:h}),a.createElement(xe,{ip:t,lan_ip:C,ipv6:n,latency:A,port_idx:u,configuration:p,service_provider:E,statistics:_,isWanUp:O,isWanConnected:S,wanIspStatus:v,wanDhcpv6PdSize:y}),x?null:a.createElement(a.Fragment,null,a.createElement(s.A,{type:s.I.ACCORDION,items:M}),a.createElement(s.A,{type:s.I.ACCORDION,items:T})))}},381377:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(296540),a=n(469733),r=n(130851),l=n(971550);const o=({size:e=45})=>{const t=(0,a.useSelector)(r.p);return i.createElement(l.A,{size:e,flexProps:{alignItems:"center"}},i.createElement("img",{style:{width:"100%"},src:`${t}/device/generic.png`,alt:"Gateway"}))}},424135:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(296540),a=n(566723),r=n(294303);const l=({children:e,tooltip:t})=>i.createElement(r.A,{maxWidth:"100%",overflow:"hidden",gap:a.YC,alignItems:"center"},i.createElement(r.A,{flex:1,overflow:"hidden"},e),t)},451449:(e,t,n)=>{n.d(t,{I:()=>i});const i=(0,n(296540).createContext)({fields:!1,labels:!1,tooltipPopovers:!1,tooltipIcons:!1})},479403:(e,t,n)=>{n.d(t,{IB:()=>d,mo:()=>A,nN:()=>m});var i=n(801081),a=n(25553),r=n(87485),l=n(882675),o=n(91255);const s=e=>(0,a.uh)((0,o.T)(e)),c=e=>(0,i.Mz)(s(e),r.i6),m=e=>(0,i.Mz)(c(e),({wan_status:e})=>e),d=e=>(0,i.Mz)(c(e),({connection_warnings:e})=>e||{[l.L.DOWNTIMES]:[],[l.L.PACKET_LOSS]:[],[l.L.HIGH_LATENCIES]:[]}),A=e=>(0,i.Mz)(c(e),({speedtest_historical:e})=>e||[])},530813:(e,t,n)=>{n.d(t,{A:()=>u,d:()=>A});var i=n(296540),a=n(217439),r=n(705145),l=n(71479),o=n(311785),s=n(566723),c=n(699784),m=n(795097),d=n(294303);const A=(0,l.A)(m.A,(0,o.A)("showListMarkers","gap"))`
  padding-left: ${({showListMarkers:e})=>e?s.Ln:0};
  display: flex;
  flex-direction: column;
  gap: ${({gap:e})=>e??s.YC};

  > li {
    list-style-type: ${({showListMarkers:e})=>e?"disc":"none"};
  }
`;const u=function({items:e,getItemKey:t,renderItem:n,maxItemCount:l=20,renderShowMore:o,showListMarkers:m,listGap:u}){return i.createElement(d.A,{flexDirection:"column",gap:s.YC},i.createElement(A,{showListMarkers:m,gap:u},e.slice(0,l).map((e,a)=>i.createElement("li",{key:t(e,a)},i.createElement(r.A,{variant:"inherit",isTruncated:!0},n(e))))),l&&e.length>l?o?o(e):i.createElement(a.A,{variant:"inherit"},i.createElement(c.sA,{id:"COMMON_X_MORE",values:{count:e.length-l}})):null)}},568560:(e,t,n)=>{n.d(t,{A:()=>E});var i=n(469733),a=n(296540),r=n(217439),l=n(895795),o=n(383653),s=n(742920),c=n(115829),m=n(39705),d=n(294303),A=n(675359),u=n(699784),p=n(348466);const E=({ipv6:e=[],enabled:t=!0,size:n="inherit",color:E="inherit",showOnlyPrefix:h=!1})=>{const _=(0,i.useDispatch)(),g=(0,a.useCallback)(e=>{navigator.clipboard.writeText(e).then(()=>{_((0,A.ox)({icon:s.C.success,message:"COMMON_COPIED_TO_CLIPBOARD"}))})},[_]),I=(0,a.useCallback)((e,t)=>{t.stopPropagation(),t.preventDefault(),g(e)},[g]),C=(0,a.useMemo)(()=>(e=>{const t=e=>(0,o.G8)(e)?0:(0,o.ZV)(e)?1:2;return e.sort((e,n)=>t(e)-t(n))})(e||[]).map(e=>{const[t,n]=e.split(p.Ed);return h?`${(0,o.Gh)(t,Number(n))}/${n}`:(0,o.z2)(e)}),[e,h]),N=C?.[0];return N?a.createElement(d.A,{maxWidth:"100%",justifyContent:"flex-end"},a.createElement(c.A,{enabled:t,flexProps:{justifyContent:"flex-end",alignItems:"center"},color:t?E:"disabled",size:n},N),C?.length>1?a.createElement(m.A,{items:C,isInteractive:!0,showListMarkers:!1,getItemKey:e=>e,renderListItem:e=>a.createElement(a.Fragment,null,e,a.createElement(l.A,{size:"original",actionable:!0,onClick:t=>I(e,t)})),renderMultipleItemsSummary:()=>null}):a.createElement(l.A,{size:"original",actionable:!0,onClick:e=>I(N,e)})):a.createElement(r.A,{size:n,color:t?E:"disabled"},a.createElement(u.sA,{id:"COMMON_FALLBACK"}))}},689965:(e,t,n)=>{n.d(t,{A:()=>u,I:()=>i});var i,a=n(296540),r=n(822336),l=n(427853),o=n(71479),s=n(825032),c=n(566723),m=n(294303);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(i||(i={}));const d=(0,o.A)(m.A,{shouldForwardProp:e=>!["marginBottom","isButtonList","margin","flex","width","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||r.Ay[n===s.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}})=>r.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,A=(0,o.A)(l.A,{shouldForwardProp:e=>!["marginBottom","margin","flex","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||r.Ay[n===s.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||r.Ay[t===s.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${c.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0 ${c.Ln} ${c.Ln};
      > div {
        padding: 0;
      }
    }
  }
`,u=({type:e,marginBottom:t,margin:n,padding:r,flex:l,width:o,nested:s,...c})=>"items"in c?a.createElement(A,{marginBottom:t,margin:n,padding:r,flex:l,nested:s,...c}):a.createElement(d,{nested:s,width:o,marginBottom:t,margin:n,padding:r,flex:l,isButtonList:e===i.BUTTON_LIST,...c},c.children)},747065:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(296540),a=n(876250),r=n(6176),l=n(768195),o=n(971550);const s=(0,i.memo)(({model:e,type:t,size:n,flexProps:s={}})=>i.createElement(o.A,{size:n,flexProps:s},i.createElement(o.N,{alignContent:"center",justifyContent:"center",isPortrait:!1,isGatewayType:t===l.bq.UGW,isUdm:e===l.W4.UDM},i.createElement(r.A,{height:"100%",width:"100%",size:a.Xh.MEDIUM,variant:a.Hx.NOPADDING,model:e}))))},766624:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(296540),a=n(271856),r=n(709690),l=n(284428),o=n(566723);const s=({description:e,isInteractive:t,portal:n=!0,cursorType:s,title:c,position:m,width:d,iconProps:A,disabled:u=!1})=>{const p=(0,l.Im)()||u,E=(0,l.q)();return i.createElement(a.A,{description:e,portal:n,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:s,title:c,position:m,width:d,disableHover:E},i.createElement(r.A,{isActive:!0,size:"original",opacity:p?o.xN:void 0,...A}))}},795097:(e,t,n)=>{n.d(t,{A:()=>r});var i=n(71479),a=n(566723);const r=(0,i.A)("ul")`
  padding-left: ${a.Er};
  margin-bottom: 0;
  margin-top: 0;
`},819127:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(296540),a=n(766624),r=n(530813);const l=function({items:e,getItemKey:t,renderItem:n,maxItemCount:l,renderShowMore:o,showListMarkers:s,title:c,position:m,isInteractive:d,cursorType:A,listGap:u}){return i.createElement(a.A,{title:c,position:m,isInteractive:d,cursorType:A,description:i.createElement(r.A,{items:e,getItemKey:t,renderItem:n,maxItemCount:l,listGap:u,renderShowMore:o,showListMarkers:s})})}},882675:(e,t,n)=>{var i;n.d(t,{L:()=>i}),function(e){e.DOWNTIMES="downtimes",e.PACKET_LOSS="packet_loss",e.HIGH_LATENCIES="high_latencies"}(i||(i={}))},971550:(e,t,n)=>{n.d(t,{A:()=>s,N:()=>o});var i=n(296540),a=n(71479),r=n(566723),l=n(294303);const o=(0,a.A)(l.A,{shouldForwardProp:e=>!["isPortrait","isGateway","isUdm"].includes(e)})`
  ${({isPortrait:e,isGatewayType:t,isUdm:n})=>`\n      padding-bottom: ${e?r.kc:"initial"};\n      height: ${e?"100%":"auto"};\n      display: flex;\n      align-items: center;\n      img {\n        width: ${(n?"20px":t&&"70%")||"inherit"};\n        height: ${(n?"40px":e&&"inherit")||"unset"} !important;\n      }  \n    `}
`,s=({children:e,size:t=60,flexProps:n={}})=>i.createElement(l.A,{justifyContent:"flex-end",width:t,maxWidth:t,minWidth:t,height:t,maxHeight:t,minHeight:t,overflow:"hidden",zIndex:1,...n},e)}}]);