"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[39070],{22169(e,t,r){r.d(t,{A:()=>s});var n=r(296540),l=r(217439),i=r(916537),a=r(115829),o=r(39705),c=r(294303);const s=({ipv6:e,size:t="inherit",color:r="inherit"})=>{const s=e?.[0];return s?n.createElement(c.A,{width:"100%",justifyContent:"flex-end"},n.createElement(a.A,{flexProps:{justifyContent:"flex-end",alignItems:"center"},color:r,size:t},s),e?.length>1?n.createElement(o.A,{items:e,isInteractive:!0,showListMarkers:!1,getItemKey:e=>e,renderListItem:e=>n.createElement(n.Fragment,null,e),renderMultipleItemsSummary:()=>null}):null):n.createElement(l.A,{size:t,color:r},n.createElement(i.sA,{id:"COMMON_FALLBACK"}))}},819127(e,t,r){r.d(t,{A:()=>a});var n=r(296540),l=r(766624),i=r(530813);const a=function({items:e,getItemKey:t,renderItem:r,maxItemCount:a,renderShowMore:o,showListMarkers:c,title:s,position:m,isInteractive:d,cursorType:u,listGap:p,iconProps:E}){return n.createElement(l.A,{title:s,position:m,isInteractive:d,cursorType:u,description:n.createElement(i.A,{items:e,getItemKey:t,renderItem:r,maxItemCount:a,listGap:p,renderShowMore:o,showListMarkers:c}),iconProps:E})}},39705(e,t,r){r.d(t,{A:()=>s});var n=r(296540),l=r(705145),i=r(916537),a=r(115829),o=r(424135),c=r(819127);const s=function({items:e,renderMultipleItemsSummary:t,renderListItem:r,renderNoItems:s,getItemKey:m,enabled:d=!0,showListMarkers:u,cursorType:p,isInteractive:E}){const A=d?"inherit":"disabled";return e.length>1?n.createElement(o.A,{tooltip:n.createElement(c.A,{items:e,getItemKey:m,renderItem:r,showListMarkers:u,isInteractive:E,cursorType:p})},n.createElement(a.A,{color:A,cursorType:p},t(e))):1===e.length?n.createElement(a.A,{color:A,cursorType:p},r(e[0])):s?n.createElement(n.Fragment,null,s()):n.createElement(l.A,{isTruncated:!0,color:A},n.createElement(i.sA,{id:"COMMON_FALLBACK"}))}},424135(e,t,r){r.d(t,{A:()=>a});var n=r(296540),l=r(566723),i=r(294303);const a=({children:e,tooltip:t})=>n.createElement(i.A,{maxWidth:"100%",overflow:"hidden",gap:l.YC,alignItems:"center"},e?n.createElement(i.A,{flex:1,overflow:"hidden"},e):null,t)},146784(e,t,r){r.d(t,{A:()=>p});var n=r(296540),l=r(349424),i=r(217439),a=r(383653),o=r(568560),c=r(22169),s=r(294303),m=r(916537),d=r(348466),u=r(360113);const p=(0,n.memo)(({ipv6_address:e=[],wan_dhcpv6_pd_size:t})=>{const{globalAddresses:r,linkLocalAddress:p}=(0,n.useMemo)(()=>{const t=[];let r=null;for(let n=0;n<e.length;n+=1){const i=e[n];new l.Address6(i).isLinkLocal()?r=i?.split(d.Ed)?.[0]:t.push(i.split(d.Ed)?.[0])}return{globalAddresses:t,linkLocalAddress:r}},[e]);return r.length?n.createElement(n.Fragment,null,n.createElement(u.A,null,n.createElement(i.A,{color:"text-2",size:"medium"},n.createElement(m.sA,{id:"COMMON_IPV6_ADDRESS"})),n.createElement(o.A,{ipv6:r,size:"medium",color:"text-3"})),t?n.createElement(u.A,null,n.createElement(i.A,{color:"text-2",size:"medium"},n.createElement(m.sA,{id:"COMMON_IPV6_PREFIX"})),n.createElement(s.A,{flex:"1",minWidth:"0",justifyContent:"flex-end"},n.createElement(c.A,{ipv6:[`${(0,a.Gh)(r[0],t)}/${t}`],color:"text-3",size:"medium"}))):null,p?n.createElement(u.A,null,n.createElement(i.A,{color:"text-2",size:"medium"},n.createElement(m.sA,{id:"COMMON_IPV6_LINK_LOCAL"})),n.createElement(o.A,{ipv6:[p],size:"medium",color:"text-3"})):null):null})},57759(e,t,r){r.d(t,{A:()=>J});var n=r(296540),l=r(217439),i=r(592563),a=r(517332),o=r(132196),c=r(382389),s=r(469733),m=r(822336),d=r(999589),u=r(916537),p=r(294303),E=r(566723),A=r(212178),_=r(691189),v=r(648549);const h=`${r(771805).w}/device/{mac}/fw-revert-options`,C=(e,t={},r={})=>(0,_.Kd)("firmwareRevertOptions",(0,v.P)(h,{mac:e}),e,t,{idField:"mac",...r});var g=r(801081),f=r(25553),I=r(87485);var w=r(602197),O=r(422969),b=r(442051),N=r(74750),x=r(71479),M=r(180524),y=(r(874734),r(752263)),S=r(6510),L=r(727270),k=r(809893),R=r(778851),z=r(215454),D=r(417378),T=r(187483),P=r(131147),V=r(171073),$=r(90757),U=r(147606),F=r(868456);const G=(0,x.A)(F.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}`]};
`,K=({model:e,version:t})=>{const r=(0,s.useSelector)(T.qf),l=(0,d.coerce)(t)?.version||t,i=(0,n.useCallback)(()=>{l&&r?.(e,l)},[r,e,l]);return n.createElement(M.A,{description:n.createElement(u.sA,{id:"COMMON_RELEASE_NOTES"})},n.createElement("span",null,n.createElement(G,{actionable:!0,onClick:i,size:"original"})))},B=()=>{const{themeName:e}=(0,c.u)();return n.createElement("svg",{viewBox:"0 0 93 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n.createElement("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}`]}))},q=(0,x.A)(p.A)`
  padding: ${E.xO};
  border: ${({theme:{themeName:e}})=>m.Ay[`desktop-border-divider-${e}`]};
  border-radius: 8px;
  margin-bottom: ${E.kc};
`,Y=(0,x.A)(p.A)`
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background-color: ${({theme:{themeName:e}})=>m.Ay[`desktop-color-purple-06-${e}`]};
  z-index: 1;
`,j=(0,x.A)(p.A)`
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  align-items: center;
`,W=(0,x.A)(p.A)`
  background-color: ${({theme:{themeName:e}})=>m.Ay[`desktop-color-neutral-02-${e}`]};
  border-radius: 4px;

  textarea {
    background-color: transparent;
    resize: none;
  }
`,H=({onCancel:e,onSubmitSuccess:t,name:r,model:i,mac:A,displayable_version:_,uptime:v,revertOptions:h})=>{const C=(0,s.useDispatch)(),{themeName:g}=(0,c.u)(),{formatMessage:f}=(0,u.tz)(),[I,w]=(0,n.useState)(""),O=(0,s.useSelector)(z.Eh),x=(0,s.useSelector)(D.S$),F=(0,R.GO)(x),G=(0,s.useSelector)(T.ap),H=(0,s.useSelector)(T.YL),X=(0,P.A)("firmware_downgrade_feedback"),Z=(0,S.Lm)(i),Q=(0,d.coerce)(_)?.version,J=(0,d.coerce)(h.previous_firmware_version)?.version,ee=(0,n.useCallback)(async(e,t)=>{const r=await X(),n=`${L.DU}${k.Fx[F]}/v1/firmware-downgrade`;try{await fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Captcha":r},mode:"cors",body:JSON.stringify({message:e,applicationName:"Network",applicationVersion:O,deviceModel:Z,deviceFirmwareCurrentVersion:(0,y._)(_),deviceFirmwareNewVersion:t,anonymousId:G})})}catch(e){}},[X,F,O,_,G,Z]),te=(0,n.useCallback)(()=>{if(C((0,V._1)({name:r,model:i,mac:A},h.previous_firmware_url)),H)return t();I&&ee(I,h.previous_firmware_version),t()},[C,r,i,A,h.previous_firmware_url,h.previous_firmware_version,H,I,t,ee]);return n.createElement(q,{flexDirection:"column",gap:E.Ln},n.createElement(p.A,{gap:E.kc,width:"100%"},n.createElement(p.A,{flexDirection:"column",alignItems:"center",width:"110px",flex:"0 0 110px"},n.createElement(l.A,{color:"text-3",size:"small"},n.createElement(u.sA,{id:"COMMON_CURRENT_VERSION"}),":"),n.createElement(p.A,{gap:E.YC},n.createElement(M.A,{description:n.createElement(n.Fragment,null,n.createElement(u.sA,{id:"DEVICE_TIME_RUNNING"}),": ",(0,$.Ay)(v).join("").trim())},n.createElement(l.A,{color:"text-2",size:"medium"},Q)),n.createElement(K,{model:i,version:_}))),n.createElement(p.A,{flex:1,alignItems:"center",justifyContent:"center",position:"relative"},n.createElement(j,null,n.createElement(B,null)),n.createElement(Y,null,n.createElement(a.A,{size:"original",variant:"twoTone",color:"white",twoTonedClassname:o.AH`
                fill: ${m.Ay[`desktop-color-purple-06-${g}`]};
              `}))),n.createElement(p.A,{flexDirection:"column",alignItems:"center",width:"110px",flex:"0 0 110px"},n.createElement(l.A,{color:"text-3",size:"small"},n.createElement(u.sA,{id:"COMMON_REVERT_TO"}),":"),n.createElement(p.A,{gap:E.YC},n.createElement(l.A,{color:"text-2",size:"medium"},J),n.createElement(K,{model:i,version:J||""})))),H?null:n.createElement(W,{flexDirection:"column",gap:E.YC},n.createElement(b.A,{resize:!1,style:{width:"100%"},placeholder:f({id:"COMMON_HELP_UNIFI_UNDERSTAND_REVERT_DESCRIPTION"}),value:I,onChange:e=>{w(e)}})),n.createElement(p.A,{gap:E.YC,width:"100%"},n.createElement(U.A,{title:n.createElement(u.sA,{id:"DEVICE_REVERT_NOW_CONFIRM_TITLE",values:{model:Z}}),message:n.createElement(u.sA,{id:"DEVICE_REVERT_NOW_CONFIRM_MESSAGE",values:{model:Z,version:J||""}}),confirmButtonVariant:"emphasis",onConfirm:te,trigger:n.createElement(N.A,{size:"small"},n.createElement(u.sA,{id:"COMMON_ACTION_REVERT_NOW"}))}),n.createElement(N.A,{size:"small",variant:"neutral",onClick:e},n.createElement(u.sA,{id:"COMMON_ACTION_CANCEL"}))))};var X=r(360113),Z=r(768195);const Q=[Z.bq.USW,Z.bq.UAP,Z.bq.UDB,Z.bq.UBB,Z.bq.UXG,Z.bq.UBLE,Z.bq.UAV,Z.bq.UCI,Z.bq.UACC],J=({name:e,model:t,mac:r,displayable_version:_,uptime:v,type:h,flexProps:b,deviceState:N})=>{const x=(0,s.useDispatch)(),[M,y]=(0,n.useState)(!1),{themeName:S}=(0,c.u)(),L=(0,s.useSelector)((0,n.useMemo)(()=>(e=>(0,g.Mz)((e=>(0,f.uh)(C(e)))(e),I.i6))(r),[r])),k=(0,A.A)(N);(0,n.useEffect)(()=>{k===w.g.UPGRADING&&N!==w.g.UPGRADING&&x(C(r))},[N,k,x,r]);const R=(0,n.useMemo)(()=>{const e=L.previous_firmware_version&&L.previous_firmware_url,t=_!==(0,d.coerce)(L.previous_firmware_version)?.version,r=N===w.g.UPGRADING;return Boolean(e)&&!r&&t&&Q.includes(h)},[L.previous_firmware_version,L.previous_firmware_url,_,N,h]),z=(0,O.A)(Q.includes(h)?[C(r,{},void 0)]:[],R?n.createElement(i.A,{onPress:()=>{y(!0)},fontSize:"medium"},n.createElement(a.A,{size:"original",variant:"twoTone",color:m.Ay[`desktop-color-ublue-06-${S}`],twoTonedClassname:o.AH`
            fill: ${m.Ay[`desktop-color-ublue-01-${S}`]};
          `}),n.createElement(u.sA,{id:"COMMON_REVERT"})):null);return n.createElement(n.Fragment,null,_?n.createElement(X.A,{flexProps:b},n.createElement(l.A,{color:"text-2",size:"medium"},n.createElement(u.sA,{id:"COMMON_DEVICE_VERSION"})),n.createElement(p.A,{gap:E.kc,alignItems:"flex-start"},n.createElement(l.A,{color:"text-3",size:"medium"},_),z)):null,M?n.createElement(H,{onCancel:()=>{y(!1)},onSubmitSuccess:()=>{y(!1)},name:e,model:t,mac:r,displayable_version:_,uptime:v,revertOptions:L}):null)}},400242(e,t,r){r.d(t,{A:()=>c});var n=r(296540),l=r(217439),i=r(916537),a=r(780811),o=r(360113);const c=({ip:e,lan_ip:t,ethernet_overrides:r,port_table:c,type:s,wan:m=!1,lan:d=!1,compact:u=!1})=>{const p=(0,a.o_Q)({type:s,ip:e,lan_ip:t,ethernet_overrides:r,port_table:c}),E=(0,n.useMemo)(()=>m?"DEVICE_PROPERTY_OVERVIEW_WAN_IP_ADDRESS":d?"DEVICE_PROPERTY_OVERVIEW_LAN_IP_ADDRESS":"COMMON_IP_ADDRESS",[m,d]);return p?n.createElement(o.A,{compact:u},n.createElement(l.A,{color:"text-2",size:"medium"},n.createElement(i.sA,{id:E})),n.createElement(l.A,{color:"text-3",size:"medium"},p)):null}},329708(e,t,r){r.d(t,{A:()=>c});var n=r(296540),l=r(217439),i=r(6510),a=r(916537),o=r(360113);const c=({model:e})=>n.createElement(o.A,null,n.createElement(l.A,{color:"text-2",size:"medium"},n.createElement(a.sA,{id:"COMMON_MODEL"})),n.createElement(l.A,{color:"text-3",size:"medium"},(0,i.Lm)(e)))},839070(e,t,r){r.r(t),r.d(t,{default:()=>h});var n=r(296540),l=r(812454),i=r(469733),a=r(59372),o=r(294303),c=r(689965),s=r(285947),m=r(146784),d=r(780492),u=r(999063),p=r(723544),E=r(329708),A=r(400242),_=r(57759);const v=({name:e,model:t,ip:r,ipv6:l,lan_ip:v,mac:h,type:C,displayable_version:g,uptime:f,deviceState:I,ethernet_overrides:w,port_table:O})=>{const b=(0,i.useSelector)(a.ad),N=(0,n.useMemo)(()=>(0,s.Up)(b,!1),[b]);return n.createElement(c.A,null,n.createElement(o.A,{flexDirection:"column",height:"100%"},n.createElement(E.A,{model:t}),n.createElement(A.A,{ip:r,lan_ip:v,type:C,ethernet_overrides:w,port_table:O}),n.createElement(m.A,{ipv6_address:l}),n.createElement(p.A,{mac:h}),n.createElement(_.A,{name:e,model:t,mac:h,type:C,displayable_version:g,uptime:f,deviceState:I}),n.createElement(d.A,{wifiNetworkNames:N}),n.createElement(u.A,{uptime:f})))},h=({activeItem:e,activeItem:{name:t,type:r,model:i,ip:a,ipv6:o,lan_ip:c,mac:s,displayable_version:m,uptime:d,ethernet_overrides:u,port_table:p}})=>n.createElement(n.Fragment,null,n.createElement(l.A,{activeItem:e}),n.createElement(v,{name:t,type:r,model:i,ip:a,ipv6:o,lan_ip:c,mac:s,displayable_version:m,uptime:d,ethernet_overrides:u,port_table:p}))},568560(e,t,r){r.d(t,{A:()=>A});var n=r(296540),l=r(469733),i=r(217439),a=r(895795),o=r(383653),c=r(742920),s=r(115829),m=r(39705),d=r(294303),u=r(675359),p=r(916537),E=r(348466);const A=({ipv6:e=[],enabled:t=!0,size:r="inherit",color:A="inherit",showOnlyPrefix:_=!1})=>{const v=(0,l.useDispatch)(),h=(0,n.useCallback)(e=>{navigator.clipboard.writeText(e).then(()=>{v((0,u.ox)({icon:c.C.success,message:"COMMON_COPIED_TO_CLIPBOARD"}))})},[v]),C=(0,n.useCallback)((e,t)=>{t.stopPropagation(),t.preventDefault(),h(e)},[h]),g=(0,n.useMemo)(()=>(e=>{const t=e=>(0,o.G8)(e)?0:(0,o.ZV)(e)?1:2;return e.sort((e,r)=>t(e)-t(r))})(e||[]).map(e=>{const[t,r]=e.split(E.Ed);return _?`${(0,o.Gh)(t,Number(r))}/${r}`:(0,o.z2)(e)}),[e,_]),f=g?.[0];return f?n.createElement(d.A,{maxWidth:"100%",justifyContent:"flex-end"},n.createElement(s.A,{enabled:t,flexProps:{justifyContent:"flex-end",alignItems:"center"},color:t?A:"disabled",size:r},f),g?.length>1?n.createElement(m.A,{items:g,isInteractive:!0,showListMarkers:!1,getItemKey:e=>e,renderListItem:e=>n.createElement(n.Fragment,null,e,n.createElement(a.A,{size:"original",actionable:!0,onClick:t=>C(e,t)})),renderMultipleItemsSummary:()=>null}):n.createElement(a.A,{size:"original",actionable:!0,onClick:e=>C(f,e)})):n.createElement(i.A,{size:r,color:t?A:"disabled"},n.createElement(p.sA,{id:"COMMON_FALLBACK"}))}},212178(e,t,r){r.d(t,{A:()=>l});var n=r(296540);const l=e=>{const t=(0,n.useRef)();return(0,n.useEffect)(()=>{t.current=e},[e]),t.current}},131147(e,t,r){r.d(t,{A:()=>s});var n=r(296540),l=r(469733),i=r(874734),a=r(417378),o=r(778851);const c={[i.OH.PRD]:"6Ld47OUpAAAAALQ4AgR1gfk-hnSw27y3zIMKLOSw",[i.OH.STG]:"6LeKc-UpAAAAAN6YqRab29cPCbU-cfe7_EvchSvc",[i.OH.DEV]:"6LeocOUpAAAAANmIju4N9DzlkK4UNYdYThrUkK3y"},s=e=>{const[t,r]=(0,n.useState)(),i=(0,n.useRef)(),s=(0,l.useSelector)(a.S$),m=(0,o.GO)(s);return(0,n.useEffect)(()=>{const t=()=>{const{grecaptcha:n}=window;n?.enterprise.ready(()=>r(()=>()=>n.enterprise.execute(c[m],{action:e}))),i.current?.removeEventListener("load",t)};return"grecaptcha"in window?t():(i.current=document.createElement("script"),i.current.src=(e=>`https://www.google.com/recaptcha/enterprise.js?render=${c[e]}`)(m),i.current.addEventListener("load",t),document.body.appendChild(i.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)})()),()=>{i.current?.removeEventListener("load",t)}},[]),t}}}]);