"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[3261],{889702(s,e,t){var r;t.d(e,{S:()=>r}),function(s){s.API_DEVICE_ADOPT="API_DEVICE_ADOPT",s.API_DEVICE_RESTART="API_DEVICE_RESTART",s.API_WIDGET_OS_STATS="API_WIDGET_OS_STATS"}(r||(r={}))},952566(s,e,t){t.d(e,{p:()=>c});var r=t(222102),i=t(591256),a=t(897166),n=t(570801),o=t(889702);const c=s=>(0,r.Mz)(a.ah,i.pw,a.dK,n.fR,(e,t,r,i)=>{switch(s){case o.S.API_DEVICE_ADOPT:case o.S.API_DEVICE_RESTART:return r||e.includes(s);case o.S.API_WIDGET_OS_STATS:return i||t.includes(s);default:return r}})},850506(s,e,t){t.d(e,{i:()=>g,A:()=>D});var r=t(274934),i=t(602086),a=t(977872),n=t(221835),o=t(309130),c=t(250266),d=t(100978),l=t(470070),_=t(952566),E=t(889702),m=t(469890),A=t(956978),I=t(45978),x=t(795206),j=t(347625),N=t(434521),C=t(963428),p=t(146215);const S=({device:s,disabled:e,confirmTitle:t,confirmMessage:c,confirmButtonMessage:j,hidePoe:S,customName:h,unit_id:u})=>{const T=(0,a.wA)(),R=(0,a.d4)((0,_.p)(E.S.API_DEVICE_RESTART)),[O,g]=(0,i.useState)(!1),D=h||s.name||s.mac,M=(0,A.Tbi)(s)&&(0,m.b0)(s.port_table),G=(0,N.S9)(s),V=G!==I.g.CONNECTED&&G!==I.g.RFSCANNING,y=M||(0,A.moU)(s)||!s.bypassConfirmRestart,v=(0,i.useCallback)(()=>{T((0,x.CP)(s,O?"hard":"soft",u))},[T,s,O,u]);return R?(0,r.jsx)(p.A,{title:(0,r.jsx)(l.sA,{id:t||"DEVICE_ACTIONS_RESTART_CONFIRM_TITLE",values:{deviceName:D}}),message:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.sA,{id:c||"DEVICE_ACTIONS_RESTART_CONFIRM_MESSAGE",values:{deviceName:D}}),M&&!S?(0,r.jsx)(d.A,{paddingTop:o.kc,children:(0,r.jsx)(n.A,{checked:O,id:"hardReboot",onChange:()=>{g(s=>!s)},children:(0,r.jsx)(l.sA,{id:"DEVICE_ACTIONS_RESTART_CONFIRM_CYCLE_POE_POWER"})})}):null]}),confirmButtonLabel:j||"DEVICE_ACTIONS_RESTART",confirmButtonVariant:"destructive",onConfirm:v,trigger:y?(0,r.jsx)(C.A,{isDisabled:V||e,children:(0,r.jsx)(l.sA,{id:"DEVICE_ACTIONS_RESTART"})}):null}):null},h=(0,i.memo)(({device:s,disabled:e,confirmTitle:t,confirmMessage:i,confirmButtonMessage:a,hidePoe:n,customName:o,unit_id:c})=>(0,r.jsx)(S,{device:s,disabled:e,confirmTitle:t,confirmMessage:i,confirmButtonMessage:a,hidePoe:n,customName:o,unit_id:c}));var u=t(247816),T=t(648576);const R=(0,u.A)(T.Ay)`
  padding: 0;
`,O=({device:s,isConfirmOpen:e,setIsConfirmOpen:t,disabled:_})=>{const E=(0,a.wA)(),[N,C]=(0,i.useState)(!1),p=(0,i.useMemo)(()=>(0,j.Q)({name:s.name,model:s.model,mac:s.mac}),[s.name,s.model,s.mac]),S=(0,i.useMemo)(()=>(0,A.Tbi)({type:s.type})&&(0,m.b0)(s.port_table),[s.type,s.port_table]),h=(0,i.useMemo)(()=>s.deviceState!==I.g.CONNECTED&&s.deviceState!==I.g.RFSCANNING,[s.deviceState]),u=(0,i.useCallback)(()=>{E((0,x.CP)({name:s.name,model:s.model,mac:s.mac},N?"hard":"soft"))},[E,s.name,s.model,s.mac,N]),T=(0,i.useCallback)(()=>{t(!1)},[t]),O=(0,i.useCallback)(()=>{C(s=>!s)},[]),g=(0,i.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),S||(0,A.moU)({type:s.type,model:s.model,device_mode_override:s.device_mode_override})||!s.bypassConfirmRestart?t(!0):E((0,x.CP)({name:s.name,model:s.model,mac:s.mac}))},[E,S,s.bypassConfirmRestart,t,s.type,s.model,s.device_mode_override,s.name,s.mac]);return(0,r.jsx)(c.A,{isOpen:e,title:"DEVICE_ACTIONS_RESTART_CONFIRM_TITLE",titleValues:{deviceName:p},message:"DEVICE_ACTIONS_RESTART_CONFIRM_MESSAGE",messageValues:{deviceName:p},...S?{body:(0,r.jsx)(d.A,{paddingTop:o.kc,children:(0,r.jsx)(n.A,{checked:N,id:"hardReboot",onChange:O,children:(0,r.jsx)(l.sA,{id:"DEVICE_ACTIONS_RESTART_CONFIRM_CYCLE_POE_POWER"})})})}:{},buttonMessage:"DEVICE_ACTIONS_RESTART",buttonVariant:"danger",handleConfirm:u,handleClose:T,offset:-1,children:(0,r.jsx)(R,{variant:"link",onClick:g,disabled:h||_,children:(0,r.jsx)(l.sA,{id:"DEVICE_ACTIONS_RESTART"})})})},g=s=>(0,a.d4)((0,i.useMemo)(()=>(0,_.p)(E.S.API_DEVICE_RESTART),[]))?(0,r.jsx)(O,{...s}):null,D=(0,i.memo)(({device:s,disabled:e})=>(0,r.jsx)(h,{device:s,disabled:e}))},963428(s,e,t){t.d(e,{A:()=>l});var r=t(274934),i=t(977872),a=t(602086),n=t(266824),o=t(669439),c=t(897166),d=t(100978);const l=(0,a.forwardRef)(({allowReadOnly:s,disabledReason:e,...t},a)=>{const l=(0,i.d4)(c.EL)&&!s;return(0,r.jsx)(d.A,{alignItems:"center",children:(0,r.jsx)(o.A,{description:e,placement:"left",children:(0,r.jsx)(n.A,{fontSize:"medium",type:"button",...t,isDisabled:l||t.isDisabled||!!e,ref:a})})})})},956350(s,e,t){t.d(e,{A:()=>d});var r=t(274934),i=t(70582),a=t(505817),n=t(263705),o=t(156007),c=t(453007);const d=({softLimit:s=0,threshold:e,used:t=0,dataFormat:d,inactive:l=!1})=>{const _=a.Ay[`desktop-color-${((s,e,t,r)=>{switch(!0){case r:return"text-4";case!s:return"text-3";case e>=s:return"red-06";case t&&e>=.01*t*s:return"orange-06";default:return"green-06"}})(s,t,e,l)}-${(0,n.u)().themeName}`];return(0,r.jsxs)(o.A,{color:l?"text-4":"text-3",size:"medium",children:[(0,r.jsx)(c.A,{colorOverride:_,children:(0,i.Ay)(t,"bytes",d)}),s>0?(0,r.jsxs)("span",{children:[" / ",(0,i.Ay)(s,"bytes",d)]}):null]})}},837625(s,e,t){t.d(e,{A:()=>ue});var r=t(274934),i=t(602086),a=t(179102),n=t(669439),o=t(309130),c=t(820510),d=t(304151),l=t(100978),_=t(470070),E=t(796282),m=t(956978),A=t(262768),I=t(687362),x=t(45978),j=t(419151),N=t(586566),C=t(561570),p=t(920492),S=t(505817),h=t(263705),u=t(981838),T=t(567572),R=t(769778),O=t(977872),g=t(390642),D=t(247816),M=t(306212),G=(t(156007),t(527153)),V=t(309675);const y=()=>(0,r.jsx)(r.Fragment,{children:" · "});var v=t(453007),f=t(690320),U=t(850506),b=t(754924),B=t(266824),L=t(590979),P=t(449339),F=t(589650),Y=t(205521),w=t(880319);const k=({mac:s,slot:e=I.td.SLOT_1,children:t,disabled:i})=>{const a=(0,O.wA)();return(0,r.jsx)(B.A,{...L.A.addDataTestId(L.A.TestId.SIDE_PANEL_TRIGGER),onPress:()=>{a((0,Y.XP)({type:P.H.DEVICE,id:s,tab:F.BC.SETTINGS,subId:e.toString(),customData:{scrollIntoViewId:w.Bu}}))},isDisabled:i,children:t})};var $=t(811799),W=t(244081),q=t(213920),H=t(401004),z=t(724081),K=t(539453),Q=t(434521);const Z=({mac:s,disabled:e})=>{const t=(0,O.d4)((0,i.useMemo)(()=>(0,b.tG)(s),[s])),o=(0,Q.S9)(t)===x.g.CONNECTED,c=(0,m.uod)(t)&&Boolean(t.wan_networkgroup);return(0,z.A)([(0,H.Zi)(q.B.DEVICES),(0,K.hh)(void 0,{crudCacheStrategy:{type:W.e.CACHE}})],(0,r.jsx)(n.A,{description:c?(0,r.jsx)(_.sA,{id:"DEVICE_ESIM_NOT_SUPPORTED_ON_WAN_ADOPTED_DEVICES"}):t.can_activate_esim?void 0:(0,r.jsx)(_.sA,{id:"DEVICE_ESIM_MUST_HAVE_INTERNET"}),children:(0,r.jsx)("span",{children:(0,r.jsx)(k,{mac:s,slot:I.HY.ESIM,disabled:e||!o||!t.can_activate_esim,children:(0,r.jsx)(a.A,{size:"inherit",color:"inherit",children:(0,r.jsx)(_.sA,{id:"DEVICE_ACTIVATE_ESIM"})})})})}))};var J;!function(s){s.DEFAULT="default",s.METERED="metered",s.WARNING="warning",s.LIMITED="limited"}(J||(J={}));const X=I.G_.OPERATIONAL,ss={[j.qU.SUCCESS]:"green-06",[j.qU.WARNING]:"orange-06",[j.qU.DANGER]:"red-06",[j.qU.MISSING]:"neutral-06"},es=(0,D.A)("div")`
  position: absolute;
  top: 0;
  left: -${o.YC};
  right: -${o.YC};
  bottom: 0;
  pointer-events: auto;
`,ts=(0,D.A)(l.A)`
  flex: 0 0 ${86}px;
  align-items: center;
  gap: ${o.YC};
`,rs=((0,D.A)(l.A)`
  flex-direction: row;
  align-items: center;
`,(0,D.A)(l.A)`
  flex: 1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
`),is=(0,D.A)(l.A)`
  justify-content: end;
  flex: 1 0 auto;
  align-items: center;
  gap: ${o.YC};
`,as=({code:s,tooltip:e})=>(0,r.jsxs)(l.A,{justifyContent:"center",alignItems:"center",position:"relative",pointerEvents:"none",flex:0,marginRight:o.kc,children:[(0,r.jsx)(M.A,{color:S.Ay[`desktop-color-${ss[s]}-${(0,h.u)().themeName}`]}),(0,r.jsx)(n.A,{description:e,placement:"top start",children:(0,r.jsx)(es,{})})]}),ns=()=>(0,r.jsx)(l.A,{padding:`0 ${o.YC}`,height:16,alignItems:"center",justifyContent:"center",borderRadius:S.Ay["desktop-radius-infinity"],background:S.Ay[`desktop-color-neutral-03-${(0,h.u)().themeName}`],children:(0,r.jsx)(a.A,{color:"text-2",size:"xsmall",children:(0,r.jsx)(_.sA,{id:"COMMON_PRIMARY"})})}),os=({slot:s=I.HY.SLOT_1,disabled:e=!1,primary:t})=>(0,r.jsxs)(ts,{children:[(0,r.jsx)(T.m$,{slot:(0,A.Ff)(s),esim:s===I.HY.ESIM,weight:"bold",color:e?"text-4":"text-1"}),t?(0,r.jsx)(ns,{}):null]}),cs=({disabled:s=!1})=>(0,r.jsx)(is,{children:(0,r.jsx)(a.A,{color:s?"text-4":"text-3",size:"medium",children:(0,r.jsx)(_.sA,{id:"DEVICE_NO_SIM"})})}),ds=({signal_percent:s=0})=>(0,r.jsx)(G.A,{width:p.Rx,height:p.KN,signal_percent:s}),ls=({tooltip:s})=>(0,r.jsxs)(is,{gap:o.YC,children:[(0,r.jsx)(a.A,{color:"text-4",size:"medium",children:(0,r.jsx)(_.sA,{id:"COMMON_DISABLED"})}),s?(0,r.jsx)(d.A,{description:s}):null]}),_s=()=>(0,r.jsx)(a.A,{color:"text-2",size:"medium",children:(0,r.jsx)(_.sA,{id:"DEVICE_MBB_FAILOVER_STANDBY"})}),Es=({mac:s,disabled:e=!1})=>(0,r.jsxs)(is,{gap:o.YC,children:[(0,r.jsx)(Z,{mac:s,disabled:e}),(0,r.jsx)(d.A,{description:(0,r.jsx)(_.sA,{id:"DEVICE_ESIM_ACTIVATION_TOOLTIP"}),disabled:e})]}),ms=({mac:s,slot:e=I.HY.SLOT_1})=>(0,r.jsx)(is,{children:(0,r.jsx)(k,{mac:s,slot:e,children:(0,r.jsx)(_.sA,{id:"DEVICE_MBB_SETUP_REQUIRED"})})}),As=({mac:s,slot:e=I.HY.SLOT_1,children:t})=>(0,r.jsx)(k,{mac:s,slot:e,children:t||(0,r.jsx)(_.sA,{id:"COMMON_SETTINGS"})}),Is=({mac:s})=>{const e=(0,O.d4)((0,i.useMemo)(()=>(0,b.tG)(s),[s]));return(0,r.jsx)(U.A,{device:e})},xs=({radio:s})=>(0,r.jsxs)(is,{gap:o.YC,children:[(0,r.jsx)(a.A,{color:"text-3",size:"medium",children:(0,r.jsx)(_.sA,{id:"COMMON_CONNECTING"})}),(0,r.jsx)(ds,{signal_percent:s?.signal_percent})]}),js=({sim:s,isRemoving:e,tooltip:t,messageId:i})=>(0,r.jsxs)(is,{children:[i?(0,r.jsx)(a.A,{color:"text-3",size:"medium",children:(0,r.jsx)(_.sA,{id:i})}):null,(0,r.jsx)(n.A,{description:t,children:(0,r.jsx)("span",{children:(0,r.jsx)($.J,{initialTime:s.display_state_elapsed,duration:(0,A.gX)(s.display_state),isRemoving:e})})})]}),Ns=({messageId:s,children:e,values:t})=>(0,r.jsxs)(is,{alignItems:"center",gap:o.YC,children:[(0,r.jsx)(V.A,{}),(0,r.jsxs)(l.A,{alignItems:"baseline",children:[(0,r.jsx)(a.A,{color:"text-2",size:"medium",children:(0,r.jsx)(_.sA,{id:s,values:t})}),e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y,{}),e]}):null]})]}),Cs=({messageId:s,tooltip:e,mac:t,slot:i,children:a})=>(0,r.jsxs)(is,{alignItems:"center",gap:o.YC,children:[(0,r.jsx)(V.A,{}),(0,r.jsx)(l.A,{alignItems:"baseline",gap:o.YC,children:(0,r.jsx)(n.A,{description:e,children:(0,r.jsx)("span",{children:(0,r.jsx)(As,{mac:t,slot:i,children:(0,r.jsx)(_.sA,{id:s})})})})}),a]}),ps=({mac:s,slot:e=I.HY.SLOT_1})=>(0,r.jsx)(is,{alignItems:"center",gap:o.YC,children:(0,r.jsx)(k,{mac:s,slot:e,children:(0,r.jsxs)(l.A,{gap:o.YC,children:[(0,r.jsx)(V.A,{}),(0,r.jsx)(_.sA,{id:"DEVICE_ESIM_ACTIVATION_FAILED"})]})})}),Ss=()=>(0,r.jsxs)(is,{gap:o.YC,children:[(0,r.jsx)(g.A,{size:"original",color:S.Ay[`desktop-color-red-06-${(0,h.u)().themeName}`]}),(0,r.jsx)(a.A,{color:"text-2",size:"medium",children:(0,r.jsx)(_.sA,{id:"COMMON_BLOCKED"})})]}),hs=({radio:s})=>(0,r.jsx)(p.A3,{signal_percent:s?.signal_percent,dBm:s?.rsrp??s?.rscp}),us=({radio:s})=>(0,r.jsxs)(is,{gap:o.YC,children:[(0,r.jsx)(a.A,{color:"text-3",size:"medium",children:(0,r.jsx)(_.sA,{id:"DEVICE_ULTE_PRO_SETUP_SEARCHING_INFO"})}),(0,r.jsx)(ds,{signal_percent:s?.signal_percent})]}),Ts=({messageId:s,sim:e})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.WARNING}),(0,r.jsx)(os,{slot:I.HY.ESIM}),(0,r.jsx)(js,{sim:e,messageId:s})]}),Rs=({mac:s,carrier:e})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.DANGER}),(0,r.jsx)(os,{slot:I.HY.ESIM}),(0,r.jsxs)(rs,{children:[(0,r.jsx)(R.R,{carrier:e}),(0,r.jsx)(ps,{mac:s,slot:I.HY.ESIM})]})]}),Os=({slot:s})=>(0,r.jsx)(n.A,{description:(0,r.jsx)("span",{children:(0,r.jsx)(f.Gh,{slot:s})}),children:(0,r.jsx)("span",{children:(0,r.jsx)(V.A,{size:"original",color:S.Ay[`desktop-color-red-06-${(0,h.u)().themeName}`]})})}),gs=({slot:s,resetPolicy:e,usage:t=0,softLimit:i=0})=>(0,r.jsx)(n.A,{description:(0,r.jsx)("span",{children:(0,r.jsx)(f.Tk,{slot:s,resetPolicy:e,usage:t,softLimit:i,dataFormat:"SI"})}),children:(0,r.jsx)("span",{children:(0,r.jsx)(V.A,{size:"original",color:S.Ay[`desktop-color-orange-06-${(0,h.u)().themeName}`]})})}),Ds=({slot:s})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.MISSING}),(0,r.jsx)(os,{slot:I.HY.ESIM,disabled:!0}),(0,r.jsx)(ls,{tooltip:(0,r.jsx)(_.sA,{id:"DEVICE_MBB_ESIM_SLOT_DISABLED_TOOLTIP",values:{sim:(0,r.jsx)(T.pF,{slot:s})}})})]}),Ms=({slot:s})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.MISSING}),(0,r.jsx)(os,{slot:s,disabled:!0}),(0,r.jsx)(ls,{tooltip:(0,r.jsx)(_.sA,{id:"DEVICE_MBB_SLOT_N_DISABLED_TOOLTIP",values:{sim:(0,r.jsx)(T.pF,{slot:s})}})})]}),Gs=({slot:s})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.MISSING}),(0,r.jsx)(os,{slot:s}),(0,r.jsx)(cs,{})]}),Vs=({slot:s})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.MISSING}),(0,r.jsx)(os,{slot:s,disabled:!0}),(0,r.jsx)(is,{})]}),ys={[I.G_.NO_SIM]:({slot:s})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.MISSING}),(0,r.jsx)(os,{slot:s}),(0,r.jsx)(cs,{})]}),[I.G_.ESIM_READY_TO_ACTIVATE]:({mac:s})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.MISSING}),(0,r.jsx)(os,{slot:I.HY.ESIM}),(0,r.jsx)(Es,{mac:s})]}),[I.G_.OPERATIONAL_METERED]:({radio:s,slot:e,primary:t,sim:{spn:i,asn:a}})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.SUCCESS}),(0,r.jsx)(os,{slot:e,primary:t}),(0,r.jsxs)(rs,{children:[(0,r.jsx)(R.R,{carrier:(0,A.ap)(i),asn:a}),(0,r.jsx)(is,{children:(0,r.jsx)(hs,{radio:s})})]})]}),[I.G_.OPERATIONAL_WARNING]:({radio:s,slot:e,sim:{spn:t,asn:i,txbytes:a,rxbytes:n},overrides:{reset_policy:o,data_soft_limit_bytes:c}})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.WARNING}),(0,r.jsx)(os,{slot:e}),(0,r.jsxs)(rs,{children:[(0,r.jsx)(R.R,{carrier:(0,A.ap)(t),asn:i}),(0,r.jsxs)(is,{children:[(0,r.jsx)(gs,{slot:e,resetPolicy:o,usage:(0,A.rB)({txbytes:a,rxbytes:n}),softLimit:c}),(0,r.jsx)(hs,{radio:s})]})]})]}),[I.G_.OPERATIONAL_LIMITED]:({radio:s,slot:e,primary:t,sim:{spn:i,asn:a}})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.WARNING}),(0,r.jsx)(os,{slot:e,primary:t}),(0,r.jsxs)(rs,{children:[(0,r.jsx)(R.R,{carrier:(0,A.ap)(i),asn:a}),(0,r.jsxs)(is,{children:[(0,r.jsx)(Os,{slot:e}),(0,r.jsx)(hs,{radio:s})]})]})]}),[I.G_.OPERATIONAL]:({sim:{spn:s,asn:e},radio:t,slot:i,primary:a})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.SUCCESS}),(0,r.jsx)(os,{slot:i,primary:a}),(0,r.jsxs)(rs,{children:[(0,r.jsx)(R.R,{carrier:(0,A.ap)(s),asn:e}),(0,r.jsx)(is,{children:(0,r.jsx)(hs,{radio:t})})]})]}),[I.G_.FAILOVER_READY_METERED]:({slot:s,sim:e,primary:t})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.WARNING}),(0,r.jsx)(os,{slot:s,primary:t}),(0,r.jsxs)(rs,{children:[(0,r.jsx)(R.R,{carrier:(0,A.ap)(e.spn),asn:e.asn}),(0,r.jsx)(is,{children:(0,r.jsx)(_s,{})})]})]}),[I.G_.FAILOVER_READY_WARNING]:({slot:s,sim:{spn:e,asn:t,txbytes:i,rxbytes:a},primary:n,overrides:{reset_policy:o,data_soft_limit_bytes:c}})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.WARNING}),(0,r.jsx)(os,{slot:s,primary:n}),(0,r.jsxs)(rs,{children:[(0,r.jsx)(R.R,{carrier:(0,A.ap)(e),asn:t}),(0,r.jsxs)(is,{children:[(0,r.jsx)(gs,{slot:s,resetPolicy:o,usage:(0,A.rB)({txbytes:i,rxbytes:a}),softLimit:c}),(0,r.jsx)(_s,{})]})]})]}),[I.G_.FAILOVER_READY_LIMITED]:({slot:s,sim:{spn:e,asn:t},primary:i})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.WARNING}),(0,r.jsx)(os,{slot:s,primary:i}),(0,r.jsxs)(rs,{children:[(0,r.jsx)(R.R,{carrier:(0,A.ap)(e),asn:t}),(0,r.jsxs)(is,{children:[(0,r.jsx)(Os,{slot:s}),(0,r.jsx)(_s,{})]})]})]}),[I.G_.FAILOVER_READY]:({slot:s,sim:e,primary:t})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.SUCCESS}),(0,r.jsx)(os,{slot:s,primary:t}),(0,r.jsxs)(rs,{children:[(0,r.jsx)(R.R,{carrier:(0,A.ap)(e.spn),asn:e.asn}),(0,r.jsx)(is,{children:(0,r.jsx)(_s,{})})]})]}),[I.G_.SEARCHING]:({slot:s,primary:e,radio:t,sim:i})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.WARNING}),(0,r.jsx)(os,{slot:s,primary:e}),(0,r.jsxs)(rs,{children:[(0,r.jsx)(R.R,{carrier:(0,A.ap)(i.spn),asn:i.asn}),(0,r.jsx)(us,{radio:t})]})]}),[I.G_.SETUP_REQUIRED]:({mac:s,slot:e,sim:t})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.WARNING}),(0,r.jsx)(os,{slot:e}),(0,r.jsxs)(rs,{children:[(0,r.jsx)(R.R,{carrier:(0,A.ap)(t.spn),asn:t.asn}),(0,r.jsx)(is,{children:(0,r.jsx)(ms,{mac:s,slot:e})})]})]}),[I.G_.ROAMING_FORBIDDEN]:({mac:s,sim:e,slot:t,primary:i})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.WARNING}),(0,r.jsx)(os,{slot:t,primary:i}),(0,r.jsxs)(rs,{children:[(0,r.jsx)(R.R,{carrier:(0,A.ap)(e.spn),asn:e.asn}),(0,r.jsx)(Cs,{messageId:"COMMON_ROAMING",mac:s,slot:t})]})]}),[I.G_.CONNECTING]:({slot:s,radio:e,primary:t,sim:i})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.WARNING}),(0,r.jsx)(os,{slot:s,primary:t}),(0,r.jsxs)(rs,{children:[(0,r.jsx)(R.R,{carrier:(0,A.ap)(i.spn),asn:i.asn}),(0,r.jsx)(xs,{radio:e})]})]}),[I.G_.READING_SIM_DATA]:({slot:s,sim:e,primary:t})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.WARNING}),(0,r.jsx)(os,{slot:s,primary:t}),(0,r.jsxs)(rs,{children:[(0,r.jsx)(R.R,{carrier:(0,A.ap)(e.spn),asn:e.asn}),(0,r.jsx)(is,{children:(0,r.jsx)(js,{sim:e,tooltip:(0,r.jsxs)(l.A,{flexDirection:"column",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)(_.sA,{id:"COMMON_SETTING_UP"})," ",(0,r.jsx)(T.pF,{slot:s}),"."]}),(0,r.jsx)(_.sA,{id:"DEVICE_IN_PROGRESS_MESSAGE"})]})})})]})]}),[I.G_.ESIM_INITIALIZING]:({sim:s})=>(0,r.jsx)(Ts,{messageId:"DEVICE_PREPARING_ESIM",sim:s}),[I.G_.ESIM_DOWNLOADING]:({sim:s})=>(0,r.jsx)(Ts,{messageId:"DEVICE_DOWNLOADING_PROFILE",sim:s}),[I.G_.ESIM_ACTIVATING]:({sim:s})=>(0,r.jsx)(Ts,{messageId:"DEVICE_ACTIVATING_ESIM",sim:s}),[I.G_.ESIM_FINALIZING]:({sim:s})=>(0,r.jsx)(Ts,{messageId:"DEVICE_FINALIZING_SETUP",sim:s}),[I.G_.ESIM_FINALIZING_DOWNLOAD_FAILED]:({sim:s})=>(0,r.jsx)(Ts,{messageId:"DEVICE_CLEANING_UP",sim:s}),[I.G_.ESIM_FINALIZING_ACTIVATION_FAILED]:({sim:s})=>(0,r.jsx)(Ts,{messageId:"DEVICE_CLEANING_UP",sim:s}),[I.G_.ESIM_DEACTIVATING]:({sim:s})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.WARNING}),(0,r.jsx)(os,{slot:I.HY.ESIM}),(0,r.jsx)(js,{sim:s,isRemoving:!0,tooltip:(0,r.jsxs)("span",{children:[(0,r.jsx)(_.sA,{id:"COMMON_REMOVING"})," ",(0,r.jsx)(T.pF,{slot:I.HY.ESIM})]})})]}),[I.G_.PIN_INCORRECT]:({mac:s,slot:e,primary:t})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.DANGER}),(0,r.jsx)(os,{slot:e,primary:t}),(0,r.jsx)(Cs,{messageId:"DEVICE_MBB_STATUS_INCORRECT_PIN_CODE",mac:s,slot:e})]}),[I.G_.PIN_REQUIRED]:({mac:s,slot:e,primary:t})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.DANGER}),(0,r.jsx)(os,{slot:e,primary:t}),(0,r.jsx)(Cs,{messageId:"DEVICE_PIN_CODE_REQUIRED",mac:s,slot:e})]}),[I.G_.ERROR]:({mac:s,slot:e,primary:t})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.DANGER}),(0,r.jsx)(os,{slot:e,primary:t}),(0,r.jsx)(Ns,{messageId:"DEVICE_ERROR_OCCURRED",children:(0,r.jsx)(Is,{mac:s})})]}),[I.G_.ESIM_INITIALIZATION_FAILED]:({mac:s,sim:e})=>(0,r.jsx)(Rs,{mac:s,carrier:(0,A.ap)(e.spn)}),[I.G_.ESIM_ACTIVATION_FAILED]:({mac:s,sim:e})=>(0,r.jsx)(Rs,{mac:s,carrier:(0,A.ap)(e.spn)}),[I.G_.ESIM_DOWNLOAD_FAILED]:({mac:s,sim:e})=>(0,r.jsx)(Rs,{mac:s,carrier:(0,A.ap)(e.spn)}),[I.G_.BLOCKED]:({slot:s,primary:e})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.DANGER}),(0,r.jsx)(os,{slot:s,primary:e}),(0,r.jsx)(Ss,{})]}),[I.G_.PUK_REQUIRED]:({mac:s,slot:e,primary:t})=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(as,{code:j.qU.DANGER}),(0,r.jsx)(os,{slot:e,primary:t}),(0,r.jsx)(Cs,{messageId:"DEVICE_PUK_REQUIRED",mac:s,slot:e})]})},vs=({mac:s,sim:e,overrides:t,displaySlot:i,displayState:a,primary:n,radio:o})=>(0,r.jsx)(r.Fragment,{children:ys[a]?.({mac:s,overrides:t,sim:e,radio:o,slot:i,primary:n})}),fs=({offline:s=!1,isCompact:e=!1,slotCount:t=0,children:i,...a})=>{const n=S.Ay[`desktop-border-divider-${(0,h.u)().themeName}`],c=(({displayState:s,displaySlot:e,slotCount:t,sim:i,offline:a,radio:n={}})=>{const o=(0,A.Qi)(e,t);return e===I.HY.ESIM&&(0,u.J)(s,i.esim)?(0,r.jsx)(Ds,{slot:(0,A.WW)(t)}):o&&(0,u._)(s,i.esim)?(0,r.jsx)(Ms,{slot:e}):a?(0,r.jsx)(Vs,{slot:e}):o&&(0,A.k3)(s)||o&&(0,A.k3)(s)?(0,r.jsx)(Gs,{slot:e}):void 0})({displayState:a.displayState,displaySlot:a.displaySlot,slotCount:t,sim:a.sim,offline:s,radio:a.radio,mac:a.mac});return(0,r.jsxs)(l.A,{flexDirection:"column",borderBottom:e?void 0:n,children:[(0,r.jsx)(l.A,{padding:e?void 0:o.YC,height:e?27:32,alignItems:"center",justifyContent:"space-between",children:c||(0,r.jsx)(vs,{...a})}),c?null:i]})};var Us=t(131464);const bs=({mac:s,slot:e,isInvalid:t})=>(0,r.jsxs)(l.A,{gap:o.YC,children:[(0,r.jsx)(Us.A,{size:"original",variant:"fill",color:S.Ay[`desktop-color-orange-06-${(0,h.u)().themeName}`]}),(0,r.jsxs)("span",{children:[(0,r.jsxs)(a.A,{size:"medium",color:"text-1",children:[(0,r.jsx)(_.sA,{id:t?"DEVICE_PIN_CODE_INVALID":"DEVICE_PIN_CODE_REQUIRED"})," · "]}),(0,r.jsx)(k,{mac:s,slot:(0,A.CJ)(e),children:(0,r.jsx)(_.sA,{id:"COMMON_SETTINGS"})})]})]});var Bs=t(939940);const Ls=({radio:{signal_percent:s,rsrp:e,rscp:t}={}})=>{const i=(0,Bs._i)(s,(0,h.u)().themeName),a=e??t;return(0,r.jsx)(c.Y,{id:"COMMON_SIGNAL",children:(0,r.jsx)(v.A,{colorOverride:i,size:"inherit",children:a?(0,r.jsxs)(r.Fragment,{children:[a," ",(0,r.jsx)(_.sA,{id:"COMMON_UNIT_DBM"})]}):(0,r.jsx)(_.sA,{id:"COMMON_FALLBACK"})})})};var Ps=t(956350);const Fs=(0,D.A)("div")`
  padding: ${o.kc};
  border: ${({theme:{themeName:s}})=>S.Ay[`desktop-border-divider-${s}`]};
  border-radius: ${S.Ay["desktop-radius-base"]};
  background: ${({theme:{themeName:s}})=>S.Ay[`desktop-color-neutral-02-${s}`]};
`,Ys=({children:s})=>(0,r.jsx)(Fs,{children:(0,r.jsx)(a.A,{color:"text-2",size:"small",children:s})});var ws;!function(s){s.SUCCESS="success",s.WARNING="warning",s.DISCONNECTED="disconnected",s.ERROR="error"}(ws||(ws={}));var ks=t(377067),$s=t(711950),Ws=t(611682),qs=t(248170);const Hs="success-icon-two-toned",zs=(0,D.A)(ks.A)`
  color: ${({theme:{themeName:s}})=>S.Ay[`desktop-color-green-06-${s}`]};
  .${Hs} {
    color: ${({theme:{themeName:s}})=>S.Ay[`desktop-color-green-02-${s}`]};
  }
`,Ks=(0,D.A)($s.A)`
  color: ${({theme:{themeName:s}})=>S.Ay[`desktop-color-orange-06-${s}`]};

  .${Hs} {
    color: ${({theme:{themeName:s}})=>S.Ay[`desktop-color-orange-01-${s}`]};
  }
`,Qs=(0,D.A)(qs.A)`
  color: ${({theme:{themeName:s}})=>S.Ay[`desktop-color-neutral-04-${s}`]};

  .${Hs} {
    color: ${({theme:{themeName:s}})=>S.Ay[`desktop-color-neutral-01-${s}`]};
  }
`,Zs=(0,D.A)(Ws.A)`
  color: ${({theme:{themeName:s}})=>S.Ay[`desktop-color-red-06-${s}`]};

  .${Hs} {
    color: ${({theme:{themeName:s}})=>S.Ay[`desktop-color-red-01-${s}`]};
  }
`,Js=({status:s})=>{switch(s){case ws.SUCCESS:return(0,r.jsx)(zs,{size:"original",variant:"twoTone",twoTonedClassname:Hs});case ws.WARNING:return(0,r.jsx)(Ks,{size:"original",variant:"twoTone",twoTonedClassname:Hs});case ws.DISCONNECTED:return(0,r.jsx)(Qs,{size:"original",variant:"twoTone",twoTonedClassname:Hs});case ws.ERROR:return(0,r.jsx)(Zs,{size:"original",variant:"twoTone",twoTonedClassname:Hs});default:return null}},Xs={[ws.SUCCESS]:"desktop-color-green-06",[ws.DISCONNECTED]:"desktop-color-neutral-04",[ws.WARNING]:"desktop-color-orange-06",[ws.ERROR]:"desktop-color-neutral-04"},se=D.A.div`
  height: ${1}px;
  background: ${({status:s,theme:{themeName:e}})=>S.Ay[`${Xs[s]}-${e}`]};
  display: flex;
  flex: 1;
  margin: 0 -2px; // extend both sides to compensate for icons internal SVG padding
  margin-top: -${1}px; // compensate for vertical offset
`,ee=({status:s})=>(0,r.jsx)(l.A,{flex:"1 0 auto",children:(0,r.jsx)(se,{status:s})}),te={[ws.SUCCESS]:"text-3",[ws.DISCONNECTED]:"text-3",[ws.WARNING]:"notice",[ws.ERROR]:"destructive"},re=[{left:0},{left:"50%",transform:"translateX(-50%)"},{right:0}],ie=({stages:s})=>(0,r.jsx)(l.A,{flexDirection:"column",gap:o.YC,width:"100%",padding:`${o.YC} 0`,marginBottom:o.Ln,children:(0,r.jsx)(l.A,{alignItems:"center",children:s.map(({status:e,caption:t},n)=>(0,r.jsxs)(i.Fragment,{children:[n>0?(0,r.jsx)(ee,{status:s[n-1]?.status}):null,(0,r.jsxs)(l.A,{position:"relative",flexDirection:"column",alignItems:"center",gap:o.YC,children:[(0,r.jsx)(Js,{status:e}),(0,r.jsx)(l.A,{position:"absolute",paddingTop:o.S2,...re[n]||{},whiteSpace:"nowrap",children:(0,r.jsx)(a.A,{color:te[e],size:"small",children:(0,r.jsx)(_.sA,{id:t})})})]})]},n))})}),ae={[I.Fe.INVALID_SIM]:"DEVICE_MBB_CONNECTIVITY_INVALID_SIM_MESSAGE",[I.Fe.CHECK_APN]:"DEVICE_MBB_CONNECTIVITY_CHECK_APN_MESSAGE",[I.Fe.ROAMING_RESTRICTED]:"DEVICE_MBB_CONNECTIVITY_ROAMING_RESTRICTED_MESSAGE",[I.Fe.PLAN_ISSUE]:"DEVICE_MBB_CONNECTIVITY_PLAN_ISSUE_MESSAGE",[I.Fe.TEMPORARY]:"DEVICE_MBB_CONNECTIVITY_TEMPORARY_MESSAGE",[I.Fe.DATA_UNAVAILABLE]:"DEVICE_MBB_CONNECTIVITY_DATA_UNAVAILABLE_MESSAGE"},ne={status:ws.SUCCESS,caption:"COMMON_RADIO"},oe={status:ws.DISCONNECTED,caption:"DEVICE_MBB_CONNECTIVITY_STAGE_NO_RADIO"},ce={status:ws.ERROR,caption:"DEVICE_MBB_CONNECTIVITY_STAGE_NO_RADIO"},de={status:ws.SUCCESS,caption:"DEVICE_MBB_CONNECTIVITY_STAGE_CARRIER_FOUND"},le={status:ws.DISCONNECTED,caption:"DEVICE_MBB_CONNECTIVITY_STAGE_NO_CARRIER"},_e={status:ws.ERROR,caption:"DEVICE_MBB_CONNECTIVITY_STAGE_NO_CARRIER"},Ee={status:ws.SUCCESS,caption:"DEVICE_DATA_PLAN"},me={status:ws.DISCONNECTED,caption:"COMMON_NO_DATA"},Ae={status:ws.ERROR,caption:"COMMON_NO_DATA"},Ie=({has_coverage:s,has_carrier:e,has_data_plan:t,network_reject:i,network_reject_category:n,mac:c,slot:d,card_data_basic:m})=>{const A=(({has_coverage:s,has_carrier:e,has_data_plan:t,network_reject:i,network_reject_category:n,mac:c,slot:d,card_data_basic:m})=>{switch(!0){case!1===m:return;case!0===s&&!0===e&&!1===t&&i===E.RG:return(0,r.jsxs)(l.A,{gap:o.YC,alignItems:"flex-start",children:[(0,r.jsx)(_.sA,{id:"DEVICE_MBB_CONNECTIVITY_ROAMING_MESSAGE"}),(0,r.jsx)(k,{mac:c,slot:d,children:(0,r.jsx)(_.sA,{id:"COMMON_SETTINGS"})})]});case!0===s&&!0===e&&!1===t:return(({network_reject_category:s,mac:e,slot:t})=>{switch(s){case I.Fe.CHECK_APN:return(0,r.jsxs)(l.A,{gap:o.YC,alignItems:"flex-start",children:[(0,r.jsx)(_.sA,{id:"DEVICE_MBB_CONNECTIVITY_CHECK_APN_MESSAGE"}),(0,r.jsx)(k,{mac:e,slot:t,children:(0,r.jsx)(a.A,{size:"inherit",color:"inherit",style:{whiteSpace:"nowrap"},children:(0,r.jsx)(_.sA,{id:"DEVICE_MBB_EDIT_APN"})})})]});case void 0:return;default:return ae[s]?(0,r.jsx)(_.sA,{id:ae[s]}):void 0}})({network_reject_category:n,mac:c,slot:d});case!1===s:return(0,r.jsx)(_.sA,{id:"DEVICE_MBB_CONNECTIVITY_NO_RADIO_MESSAGE"});case!1===e:return(0,r.jsx)(_.sA,{id:"DEVICE_MBB_CONNECTIVITY_NO_CARRIER_COVERAGE_MESSAGE"});default:return}})({has_coverage:s,has_carrier:e,has_data_plan:t,network_reject:i,network_reject_category:n,mac:c,slot:d,card_data_basic:m});return{stages:[!0===s?ne:!1===s?ce:oe,!0===e?de:!1===e?_e:le,!0===t?Ee:!1===t?Ae:me],...A?{message:A}:{}}},xe=s=>{const{stages:e,message:t}=Ie(s);return(0,r.jsxs)(l.A,{flexDirection:"column",gap:o.YC,width:"100%",paddingLeft:o.Ln,paddingBottom:o.Ln,children:[(0,r.jsx)(ie,{stages:e}),t?(0,r.jsx)(Ys,{children:t}):null]})},je=(s,e={},t,r,i)=>{switch(!0){case!s.card_present:case(0,m.aK8)(i||x.g.UNKNOWN):return j.qU.MISSING;case(0,A.Gv)(s):return j.qU.DANGER;case r===j.Gu.MODEM_INIT&&s.active:case r===j.Gu.SIM_ACTIVATION&&s.active:case r===j.Gu.SEARCHING&&s.active:case r===j.Gu.CONNECTING&&s.active:case(0,A.Ao)(s):case(0,A.cN)(s,e):case(0,A.d)(s.current_apn,t):case s.data_limited:return j.qU.WARNING;case s.connection_info?.inet_state===I.uQ.DISCONNECTED:case t?.signal===j.OP.NO_SIGNAL:return j.qU.DANGER;case(0,A.nP)(s,r):return j.qU.SUCCESS;default:return j.qU.MISSING}},Ne=(s,e={},t={},i,a)=>{switch(!0){case!s.card_present:case(0,A.cN)(s,e):case(0,A.kV)(s):case(0,A.Ao)(s):return null;default:return(0,r.jsx)(Ps.A,{softLimit:t.data_limit_enabled?t.data_soft_limit_bytes:0,threshold:t.data_limit_enabled?t.data_warning_threshold:void 0,dataFormat:"SI",used:(0,A.rB)(s),inactive:(0,m.aK8)(a||x.g.UNKNOWN)})}},Ce=(s,e,t,i,c={},I)=>{switch(!0){case(0,m.aK8)(e||x.g.UNKNOWN):return(0,r.jsx)(a.A,{color:"text-3",size:"medium",children:(0,r.jsx)(_.sA,{id:"COMMON_OFFLINE"})});case(0,A.cN)(i,c):return(0,r.jsx)($.A,{initialTime:i.display_state_elapsed,duration:(0,A.gX)(i.display_state)});case!i.card_present&&i.slot===E.QB:return(0,r.jsxs)(l.A,{gap:o.YC,children:[(0,r.jsx)(Z,{mac:s}),(0,r.jsx)(d.A,{description:(0,r.jsx)(_.sA,{id:"DEVICE_ESIM_ACTIVATION_TOOLTIP"})})]});case!i.card_present:return(0,r.jsx)(a.A,{color:"text-3",size:"medium",children:(0,r.jsx)(_.sA,{id:"DEVICE_NO_SIM"})});case(0,A.kV)(i):return(0,r.jsx)(k,{mac:s,slot:(0,A.CJ)(i.slot),children:(0,r.jsx)(_.sA,{id:"DEVICE_MBB_SETUP_REQUIRED"})});case(0,A.Ao)(i):return(0,r.jsx)(bs,{mac:s,slot:i.slot,isInvalid:(0,A.Gv)(i)});case t===j.Gu.READY&&(0,A.vc)(i)&&!i.active:return(0,r.jsx)(a.A,{color:"text-3",size:"medium",children:(0,r.jsx)(_.sA,{id:"COMMON_READY"})});default:return(0,r.jsxs)(r.Fragment,{children:[i.active?(0,r.jsx)(n.A,{description:t===j.Gu.READY?(0,r.jsx)(Ls,{radio:I}):void 0,placement:"top start",children:(0,r.jsx)("span",{children:(0,r.jsx)(p.A3,{signal_percent:I?.signal_percent,children:t===j.Gu.SEARCHING?(0,r.jsx)(_.sA,{id:"DEVICE_ULTE_PRO_SETUP_SEARCHING_INFO"}):(0,A.mR)(I?.rat)?I?.rat:0===I?.signal_percent?(0,r.jsx)(_.sA,{id:"COMMON_NO_SIGNAL"}):null})})}):null,i.slot===E.QB&&!c&&i.card_present?(0,r.jsx)(d.A,{description:(0,r.jsx)(_.sA,{id:"DEVICE_ESIM_TOOLTIP"})}):null]})}},pe=(s={},e={},t=void 0,i=void 0)=>{switch(!0){case!s.card_present:case(0,m.aK8)(i||x.g.UNKNOWN):return;case t===j.Gu.MODEM_INIT&&s.card_present:case t===j.Gu.SIM_ACTIVATION&&s.card_present:case t===j.Gu.CONNECTING&&s.active:case(0,A.cN)(s,e.esim):return(0,r.jsx)(_.sA,{id:"DEVICE_MBB_STATUS_SETTING_UP"});case t===j.Gu.SEARCHING&&s.active:return(0,r.jsx)(_.sA,{id:"DEVICE_MBB_STATUS_SEARCHING"});case(0,A.Gv)(s):return(0,r.jsx)(_.sA,{id:"DEVICE_MBB_STATUS_INCORRECT_PIN_CODE"});case(0,A.Ao)(s):return(0,r.jsx)(_.sA,{id:"DEVICE_PIN_CODE_REQUIRED"});case s.data_limited:return(0,r.jsx)(_.sA,{id:"DEVICE_MBB_STATUS_DATA_LIMIT_REACHED"});case(0,A.FT)(s):return(0,r.jsx)(_.sA,{id:"DEVICE_MBB_STATUS_INTERNET_UNREACHABLE"});case e?.radio?.signal===j.OP.NO_SIGNAL&&s.active:return(0,r.jsx)(_.sA,{id:"DEVICE_ULTE_PRO_SETUP_NO_SIGNAL"});case e?.radio&&(0,A.mr)(e.radio)&&s.active:return(0,r.jsx)(_.sA,{id:"DEVICE_MBB_STATUS_CANNOT_REGISTER"});case s.esim&&e.esim?.last_operation?.state===I.hM.FAILURE:return(0,r.jsx)(_.sA,{id:"DEVICE_MBB_STATUS_UNABLE_TO_ACTIVATE_ESIM"});case(0,A.d)(s.current_apn,e.radio):return(0,r.jsx)(_.sA,{id:"DEVICE_MBB_STATUS_ROAMING_UNAVAILABLE"});case(0,A.nP)(s,e.state)&&!!e.radio:return(0,r.jsx)(c.m,{minWidth:120,children:(0,r.jsx)(Ls,{radio:e.radio})});default:return}},Se=({mac:s,deviceState:e,mbb:t,mbb_overrides:i,isCompact:a})=>(0,r.jsx)(l.A,{flexDirection:"column",gap:a?void 0:o.kc,width:"100%",children:(t?.sim||[]).map((n={})=>{const o=(i?.sim||[]).find(s=>s.slot===n.slot)||{};return(0,r.jsx)(p.Ay,{slot:n.slot,esim:n.esim,card_present:n.card_present,statusCode:je(n,t.esim,t.radio,t.state,e),message:Ne(n,t.esim,o,0,e),status:Ce(s,e,t.state,n,t.esim,t.radio),statusBallTooltip:pe(n,t,t.state,e),isCompact:a},n.slot)})}),he=({mac:s,mbb:e,mbb_overrides:t,isCompact:i,deviceState:a,fw3_caps:n})=>(0,r.jsx)(l.A,{flexDirection:"column",width:"100%",children:(0,A.Vl)(e.sim||[]).map(o=>{const c=e.sim?.find(s=>s.slot===(0,A.Ff)(o,e.sim?.length))||{},d=(t?.sim||[]).find(s=>s.slot===c.slot)||{},l=t?.primary_slot===c.slot,_=!i&&(0,N.bm)({fw3_caps:n},C.A.MBB_CSM)&&c.card_present&&c.active;return(0,r.jsx)(fs,{displaySlot:o,mac:s,sim:c,displayState:c.display_state||X,primary:l,overrides:d,radio:e.radio,isCompact:i,offline:(0,m.aK8)(a||x.g.UNKNOWN),slotCount:e.sim?.length,children:_?(0,r.jsx)(xe,{mac:s,slot:o,has_carrier:c.has_carrier??null,has_data_plan:c.has_data_plan??null,has_coverage:e.radio?.has_coverage??null,network_reject:c.network_reject,network_reject_category:c.network_reject_category,card_data_basic:c.card_data_basic}):null},o)})}),ue=s=>{const e=(0,i.useMemo)(()=>Boolean(s.mbb.sim?.some(({display_state:s})=>Boolean(s))),[s.mbb.sim]);return(0,r.jsx)(e?he:Se,{...s})}},258325(s,e,t){t.d(e,{A:()=>c});var r=t(602086),i=t(977872),a=t(205521),n=t(254585);const o={delay:100,behavior:"smooth"},c=s=>{const e=(0,i.wA)(),t=(0,i.d4)((0,n.Gg)()),c=(0,r.useRef)(null),d=(0,r.useRef)(null);return(0,r.useEffect)(()=>{if(c.current&&t?.scrollIntoViewId===s){d.current&&clearTimeout(d.current);const{scrollIntoViewId:s,...r}=t;d.current=setTimeout(()=>{c.current?.scrollIntoView({...o,...r}),e((0,a.tD)(r))},r.delay||100)}return()=>{d.current&&clearTimeout(d.current)}},[c,t,e,s]),c}}}]);