"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[62267],{843910(e,t,s){s.d(t,{A:()=>m,g:()=>c});var i=s(274934),r=s(814557),n=s(938984),a=s(247816),o=s(309130),l=s(470070);const d=(0,a.A)("span")`
  line-height: ${o.Er};
  padding: 2px ${o.kc};
  border-radius: ${o.xO};
  background: ${({theme:{themeName:e}})=>r.Ay[`desktop-color-green-01-${e}`]};
`,c=(0,a.A)("span")`
  margin-left: ${o.kc};
`,m=()=>(0,i.jsx)(d,{children:(0,i.jsx)(n.A,{variant:"caption",color:"green-06",children:(0,i.jsx)(l.sA,{id:"COMMON_MLO"})})})},376892(e,t,s){s.d(t,{A:()=>a});var i=s(274934),r=s(938984),n=s(470070);const a=({id:e,children:t,values:s})=>(0,i.jsxs)(r.A,{color:"text-1",weight:"bold",size:"medium",children:[e?(0,i.jsx)(n.sA,{id:e,values:s}):null,t]})},643334(e,t,s){s.d(t,{A:()=>ee});var i=s(274934),r=s(602086),n=s(938984),a=s(954702),o=s(167953),l=s(409844),d=s(263705),c=s(977872),m=s(814557),p=s(87449),u=s(470070),_=s(100978),A=s(309130),x=s(968021),h=s(29472),v=s(430986);const j=`${s(290454).w}/device/{mac}/fw-revert-options`,b=(e,t={},s={})=>(0,h.Kd)("firmwareRevertOptions",(0,v.P)(j,{mac:e}),e,t,{idField:"mac",...s});var g=s(222102),E=s(656466),C=s(401042);var f=s(45978),w=s(724081),O=s(260610),N=s(642687),k=s(247816),y=s(669439),M=(s(232087),s(129402)),I=s(347625),T=s(807811),S=s(224012),R=s(743178),H=s(591256),D=s(594633),$=s(976458),L=s(696916),U=s(795206),V=s(898809),z=s(146215),G=s(930071);const F=(0,k.A)(G.A)`
  border-radius: 50%;
  padding: 1px;
  border: ${({theme:{themeName:e}})=>m.Ay[`desktop-border-divider-${e}`]};
  color: ${({theme:{themeName:e}})=>m.Ay[`desktop-color-neutral-08-${e}`]};
`,P=({model:e,version:t})=>{const s=(0,c.d4)($.qf),n=(0,p.coerce)(t)?.version||t,a=(0,r.useCallback)(()=>{n&&s?.(e,n)},[s,e,n]);return(0,i.jsx)(y.A,{description:(0,i.jsx)(u.sA,{id:"COMMON_RELEASE_NOTES"}),children:(0,i.jsx)("span",{children:(0,i.jsx)(F,{actionable:!0,onClick:a,size:"original"})})})},q=()=>{const{themeName:e}=(0,d.u)();return(0,i.jsx)("svg",{viewBox:"0 0 93 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M92.3536 4.03715C92.5488 3.84189 92.5488 3.5253 92.3536 3.33004L89.1716 0.14806C88.9763 -0.0472023 88.6597 -0.0472023 88.4645 0.14806C88.2692 0.343322 88.2692 0.659904 88.4645 0.855167L91.2929 3.68359L88.4645 6.51202C88.2692 6.70728 88.2692 7.02387 88.4645 7.21913C88.6597 7.41439 88.9763 7.41439 89.1716 7.21913L92.3536 4.03715ZM0 3.68359V4.18359H92V3.68359V3.18359H0V3.68359Z",fill:m.Ay[`desktop-color-purple-06-${e}`]})})},B=(0,k.A)(_.A)`
  padding: ${A.xO};
  border: ${({theme:{themeName:e}})=>m.Ay[`desktop-border-divider-${e}`]};
  border-radius: 8px;
  margin-bottom: ${A.kc};
`,W=(0,k.A)(_.A)`
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background-color: ${({theme:{themeName:e}})=>m.Ay[`desktop-color-purple-06-${e}`]};
  z-index: 1;
`,Y=(0,k.A)(_.A)`
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  align-items: center;
`,K=(0,k.A)(_.A)`
  background-color: ${({theme:{themeName:e}})=>m.Ay[`desktop-color-neutral-02-${e}`]};
  border-radius: 4px;

  textarea {
    background-color: transparent;
    resize: none;
  }
`,X=({onCancel:e,onSubmitSuccess:t,name:s,model:a,mac:x,displayable_version:h,uptime:v,revertOptions:j})=>{const b=(0,c.wA)(),{themeName:g}=(0,d.u)(),{formatMessage:E}=(0,u.tz)(),[C,f]=(0,r.useState)(""),w=(0,c.d4)(H.Eh),k=(0,c.d4)(D.S$),G=(0,R.GO)(k),F=(0,c.d4)($.ap),X=(0,c.d4)($.YL),Z=(0,L.A)("firmware_downgrade_feedback"),J=(0,I.Lm)(a),Q=(0,p.coerce)(h)?.version,ee=(0,p.coerce)(j.previous_firmware_version)?.version,te=(0,r.useCallback)(async(e,t)=>{const s=await Z(),i=`${T.DU}${S.Fx[G]}/v1/firmware-downgrade`;try{await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","X-Captcha":s},mode:"cors",body:JSON.stringify({message:e,applicationName:"Network",applicationVersion:w,deviceModel:J,deviceFirmwareCurrentVersion:(0,M._)(h),deviceFirmwareNewVersion:t,anonymousId:F})})}catch(e){}},[Z,G,w,h,F,J]),se=(0,r.useCallback)(()=>{if(b((0,U._1)({name:s,model:a,mac:x},j.previous_firmware_url)),X)return t();C&&te(C,j.previous_firmware_version),t()},[b,s,a,x,j.previous_firmware_url,j.previous_firmware_version,X,C,t,te]);return(0,i.jsxs)(B,{flexDirection:"column",gap:A.Ln,children:[(0,i.jsxs)(_.A,{gap:A.kc,width:"100%",children:[(0,i.jsxs)(_.A,{flexDirection:"column",alignItems:"center",width:"110px",flex:"0 0 110px",children:[(0,i.jsxs)(n.A,{color:"text-3",size:"small",children:[(0,i.jsx)(u.sA,{id:"COMMON_CURRENT_VERSION"}),":"]}),(0,i.jsxs)(_.A,{gap:A.YC,children:[(0,i.jsx)(y.A,{description:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.sA,{id:"DEVICE_TIME_RUNNING"}),": ",(0,V.Ay)(v).join("").trim()]}),children:(0,i.jsx)(n.A,{color:"text-2",size:"medium",children:Q})}),(0,i.jsx)(P,{model:a,version:h})]})]}),(0,i.jsxs)(_.A,{flex:1,alignItems:"center",justifyContent:"center",position:"relative",children:[(0,i.jsx)(Y,{children:(0,i.jsx)(q,{})}),(0,i.jsx)(W,{children:(0,i.jsx)(o.A,{size:"original",variant:"twoTone",color:"white",twoTonedClassname:l.AH`
                fill: ${m.Ay[`desktop-color-purple-06-${g}`]};
              `})})]}),(0,i.jsxs)(_.A,{flexDirection:"column",alignItems:"center",width:"110px",flex:"0 0 110px",children:[(0,i.jsxs)(n.A,{color:"text-3",size:"small",children:[(0,i.jsx)(u.sA,{id:"COMMON_REVERT_TO"}),":"]}),(0,i.jsxs)(_.A,{gap:A.YC,children:[(0,i.jsx)(n.A,{color:"text-2",size:"medium",children:ee}),(0,i.jsx)(P,{model:a,version:ee||""})]})]})]}),X?null:(0,i.jsx)(K,{flexDirection:"column",gap:A.YC,children:(0,i.jsx)(O.A,{resize:!1,style:{width:"100%"},placeholder:E({id:"COMMON_HELP_UNIFI_UNDERSTAND_REVERT_DESCRIPTION"}),value:C,onChange:e=>{f(e)}})}),(0,i.jsxs)(_.A,{gap:A.YC,width:"100%",children:[(0,i.jsx)(z.A,{title:(0,i.jsx)(u.sA,{id:"DEVICE_REVERT_NOW_CONFIRM_TITLE",values:{model:J}}),message:(0,i.jsx)(u.sA,{id:"DEVICE_REVERT_NOW_CONFIRM_MESSAGE",values:{model:J,version:ee||""}}),confirmButtonVariant:"emphasis",onConfirm:se,trigger:(0,i.jsx)(N.A,{size:"small",children:(0,i.jsx)(u.sA,{id:"COMMON_ACTION_REVERT_NOW"})})}),(0,i.jsx)(N.A,{size:"small",variant:"neutral",onClick:e,children:(0,i.jsx)(u.sA,{id:"COMMON_ACTION_CANCEL"})})]})]})};var Z=s(664092),J=s(857780);const Q=[J.bq.USW,J.bq.UAP,J.bq.UDB,J.bq.UBB,J.bq.UXG,J.bq.UBLE,J.bq.UAV,J.bq.UCI,J.bq.UACC],ee=({name:e,model:t,mac:s,displayable_version:h,uptime:v,type:j,flexProps:O,deviceState:N})=>{const k=(0,c.wA)(),[y,M]=(0,r.useState)(!1),{themeName:I}=(0,d.u)(),T=(0,c.d4)((0,r.useMemo)(()=>(e=>(0,g.Mz)((e=>(0,E.uh)(b(e)))(e),C.i6))(s),[s])),S=(0,x.A)(N);(0,r.useEffect)(()=>{S===f.g.UPGRADING&&N!==f.g.UPGRADING&&k(b(s))},[N,S,k,s]);const R=(0,r.useMemo)(()=>{const e=T.previous_firmware_version&&T.previous_firmware_url,t=h!==(0,p.coerce)(T.previous_firmware_version)?.version,s=N===f.g.UPGRADING;return Boolean(e)&&!s&&t&&Q.includes(j)},[T.previous_firmware_version,T.previous_firmware_url,h,N,j]),H=(0,w.A)(Q.includes(j)?[b(s,{},void 0)]:[],R?(0,i.jsxs)(a.A,{onPress:()=>{M(!0)},fontSize:"medium",children:[(0,i.jsx)(o.A,{size:"original",variant:"twoTone",color:m.Ay[`desktop-color-ublue-06-${I}`],twoTonedClassname:l.AH`
            fill: ${m.Ay[`desktop-color-ublue-01-${I}`]};
          `}),(0,i.jsx)(u.sA,{id:"COMMON_REVERT"})]}):null);return(0,i.jsxs)(i.Fragment,{children:[h?(0,i.jsxs)(Z.A,{flexProps:O,children:[(0,i.jsx)(n.A,{color:"text-2",size:"medium",children:(0,i.jsx)(u.sA,{id:"COMMON_DEVICE_VERSION"})}),(0,i.jsxs)(_.A,{gap:A.kc,alignItems:"flex-start",children:[(0,i.jsx)(n.A,{color:"text-3",size:"medium",children:h}),H]})]}):null,y?(0,i.jsx)(X,{onCancel:()=>{M(!1)},onSubmitSuccess:()=>{M(!1)},name:e,model:t,mac:s,displayable_version:h,uptime:v,revertOptions:T}):null]})}},129126(e,t,s){s.r(t),s.d(t,{default:()=>H});var i=s(274934),r=s(602086),n=s(309130),a=s(100978),o=s(956978),l=s(853109),d=s(843910),c=s(830257),m=s(17534),p=s(551803),u=s(383550),_=s(260067),A=s(326084),x=s(686318),h=s(241615),v=s(187801),j=s(956021),b=s(893762),g=s(948803),E=s(725870),C=s(924453),f=s(382583),w=s(664613),O=s(597377),N=s(425381),k=s(643334),y=s(223232),M=s(906701),I=s(535322);const T=({name:e,model:t,ip:s,ipv6:r,lan_ip:n,mac:a,connection_network_id:o,displayable_version:l,uptime:d,systemStatsMem:c,sys_stats:m,satisfaction:p,vap_table:u,radio_table:_,radio_table_stats:A,type:x,deviceState:h,ethernet_overrides:T,port_table:S,uplink:R,device_mode_override:H})=>(0,i.jsxs)(I.A,{children:[(0,i.jsx)(g.A,{model:t}),(0,i.jsx)(O.A,{ip:s,lan_ip:n,type:x,ethernet_overrides:T,port_table:S,uplink:R,device_mode_override:H}),(0,i.jsx)(M.A,{ipv6_address:r}),(0,i.jsx)(f.A,{connection_network_id:o}),(0,i.jsx)(C.A,{mac:a}),(0,i.jsx)(k.A,{name:e,model:t,mac:a,type:x,displayable_version:l,uptime:d,deviceState:h}),(0,i.jsx)(v.A,{}),(0,i.jsx)(j.A,{satisfaction:p,vap_table:u,radio_table:_,radio_table_stats:A}),(0,i.jsx)(b.A,{uptime:d}),(0,i.jsx)(E.A,{systemStatsMem:c}),(0,i.jsx)(w.A,{sys_stats:m}),(0,i.jsx)(y.A,{mac:a}),(0,i.jsx)(N.A,{})]});var S=s(352879),R=s(216082);const H=({activeItem:e,activeItem:{name:t,model:s,mac:v,type:j,uplink:b,satisfaction:g,adopted:E,uptime:C,last_seen:f,radio_table:w,radio_table_stats:O,vap_table:N,stat:k,detailed_states:y,lan_ip:M,ip:I,ipv6:H,displayable_version:D,sys_stats:$,"system-stats":L,support_wifi6e:U,deviceState:V,shortname:z,ethernet_overrides:G,port_table:F,device_mode_override:P}})=>{const q=(0,r.useMemo)(()=>(0,l.Uj)({type:b?.type,mlo_links:b?.mlo_links}),[b?.type,b?.mlo_links]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.A,{activeItem:e,hidePortsButton:!0,overviewChildren:(0,i.jsx)(_.A,{uplink:b,type:j,mac:v,radio_table:w,radio_table_stats:O,vap_table:N,support_wifi6e:U,deviceState:V,paddingBottom:n.kc,isMloUplinkConnection:q}),badge:q?(0,i.jsx)(d.g,{children:(0,i.jsx)(d.A,{})}):null,children:E&&w?.length?(0,i.jsx)(a.A,{marginTop:n.kc,children:(0,i.jsx)(p.A,{mac:v})}):null}),(0,i.jsx)(c.i,{uplink:b,mac:v,detailed_states:y}),(0,i.jsx)(S.A,{mac:v}),(0,i.jsx)(A.A,{stat:k,mac:v,uplink:b,uptime:C,last_seen:f,deviceState:V}),(0,i.jsx)(T,{name:t,model:s,type:j,ip:I,ipv6:H,lan_ip:M,mac:v,connection_network_id:e.connection_network_id,displayable_version:D,uptime:C,systemStatsMem:L?.mem,sys_stats:$,satisfaction:g,vap_table:N,radio_table:w,radio_table_stats:O,ethernet_overrides:G,port_table:F,uplink:b,device_mode_override:P}),(0,o.aK8)(V)?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(h.A,{radio_table:w,radio_table_stats:O,type:j,stat:k,support_wifi6e:U}),(0,i.jsx)(m.A,{activeItem:e}),(0,i.jsx)(x.S,{vap_table:N,radio_table:w})]}),(0,i.jsx)(R.A,{shortname:z})]})}},61322(e,t,s){s.d(t,{I:()=>i});const i={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,t,s,i){return Math.min((i||this.ROW_HEIGHT)*e+(s??this.HEADER_HEIGHT),(i||this.ROW_HEIGHT)*t+(s??this.HEADER_HEIGHT))},getEditContainerHeight(e,t,s){return Math.min((s||this.EDIT_FIELD_HEIGHT)*e,(s||this.EDIT_FIELD_HEIGHT)*t)}}},112104(e,t,s){s.d(t,{A:()=>c});var i=s(274934),r=s(602086),n=s(938984),a=s(599110),o=s(309130),l=s(100978),d=s(470070);const c=(e,t={})=>{const{formatMessage:s}=(0,d.tz)(),[c,m]=(0,r.useState)(!1),{defaultCount:p,label:{singular:u,plural:_}}=(0,r.useMemo)(()=>({defaultCount:t.defaultCount||6,label:{singular:s({id:t.label?.singular||"COMMON_DEVICE"}),plural:s({id:t.label?.plural||"COMMON_DEVICES"})}}),[t,s]),A=(0,r.useCallback)(()=>{m(e=>!e)},[]);return{rowLimit:e>p&&!c?p:e,renderFooter:e>p?(0,i.jsx)(l.A,{marginTop:o.kc,children:(0,i.jsxs)(n.A,{size:"medium",children:[(0,i.jsx)(d.sA,{id:"COMMON_ADV_TABLE_FOOTER",values:{length:e>p&&!c?p:e,total:e,singular:u,plural:_}}),(0,i.jsxs)(i.Fragment,{children:[" ",(0,i.jsxs)(a.A,{type:"button",variant:"inline",onClick:A,children:[(0,i.jsx)(d.sA,{id:"COMMON_SHOW"})," ",(0,i.jsx)(d.sA,{id:c?"COMMON_LESS":"COMMON_ALL"})]})]})]})}):null,setExpand:m}}},968021(e,t,s){s.d(t,{A:()=>r});var i=s(602086);const r=e=>{const t=(0,i.useRef)(void 0);return(0,i.useEffect)(()=>{t.current=e},[e]),t.current}},696916(e,t,s){s.d(t,{A:()=>d});var i=s(602086),r=s(977872),n=s(232087),a=s(594633),o=s(743178);const l={[n.OH.PRD]:"6Ld47OUpAAAAALQ4AgR1gfk-hnSw27y3zIMKLOSw",[n.OH.STG]:"6LeKc-UpAAAAAN6YqRab29cPCbU-cfe7_EvchSvc",[n.OH.DEV]:"6LeocOUpAAAAANmIju4N9DzlkK4UNYdYThrUkK3y"},d=e=>{const[t,s]=(0,i.useState)(),n=(0,i.useRef)(void 0),d=(0,r.d4)(a.S$),c=(0,o.GO)(d);return(0,i.useEffect)(()=>{const t=()=>{const{grecaptcha:i}=window;i?.enterprise.ready(()=>s(()=>()=>i.enterprise.execute(l[c],{action:e}))),n.current?.removeEventListener("load",t)};return"grecaptcha"in window?t():(n.current=document.createElement("script"),n.current.src=(e=>`https://www.google.com/recaptcha/enterprise.js?render=${l[e]}`)(c),n.current.addEventListener("load",t),document.body.appendChild(n.current),(()=>{const e="hide-grecaptcha-badge";if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.innerText=".grecaptcha-badge { visibility: hidden; }",document.head.appendChild(t)})()),()=>{n.current?.removeEventListener("load",t)}},[]),t}}}]);