"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[94906],{376892(e,r,s){s.d(r,{A:()=>o});var i=s(274934),n=s(179102),t=s(470070);const o=({id:e,children:r,values:s})=>(0,i.jsxs)(n.A,{color:"text-1",weight:"bold",size:"medium",children:[e?(0,i.jsx)(t.sA,{id:e,values:s}):null,r]})},216082(e,r,s){s.d(r,{A:()=>v});var i,n=s(274934),t=s(266824),o=s(602086),l=s(977872),a=s(179102),c=s(976458),d=s(470070),u=s(535322),m=s(376892),A=s(222102);!function(e){e.OPEN_MODAL="openModal"}(i||(i={}));const h=(0,A.Mz)(c.zn,e=>void 0!==e[i.OPEN_MODAL]);var p=s(828373),x=s(367821);const E=({uidbDevice:e})=>{const r=(0,l.d4)(c.zn),s=r?.[i.OPEN_MODAL];return s?(0,n.jsx)(t.A,{onClick:()=>s(e),children:(0,n.jsx)(a.A,{size:"medium",color:"inherit",children:(0,n.jsx)(d.sA,{id:"DEVICE_SHOW_DETAILS"})})}):null},_=({shortname:e})=>{(0,x.A)();const r=(0,l.d4)((0,o.useMemo)(()=>(0,p.$E)(e),[e]));return r?.compliance?(0,n.jsx)(u.A,{type:u.I.ACCORDION,items:[{id:"compliance",label:(0,n.jsx)(m.A,{id:"COMMON_COMPLIANCE"}),renderContent:()=>(0,n.jsx)(E,{uidbDevice:r}),openByDefault:!0}]}):null},v=({shortname:e})=>(0,l.d4)(h)?(0,n.jsx)(_,{shortname:e}):null},643334(e,r,s){s.d(r,{A:()=>ee});var i=s(274934),n=s(602086),t=s(179102),o=s(266824),l=s(228032),a=s(409844),c=s(263705),d=s(977872),u=s(505817),m=s(87449),A=s(470070),h=s(100978),p=s(309130),x=s(968021),E=s(29472),_=s(430986),v=s(401042);const O=(0,v.T7)("device/{mac}/fw-revert-options"),j=(e,r={},s={})=>(0,E.Kd)("firmwareRevertOptions",(0,_.P)(O,{mac:e}),e,r,{idField:"mac",...s});var C=s(222102),g=s(15989);var f=s(45978),N=s(724081),I=s(517640),w=s(83985),M=s(247816),b=s(669439),T=(s(232087),s(129402)),D=s(347625),R=s(807811),L=s(224012),k=s(743178),S=s(591256),y=s(594633),H=s(976458),z=s(696916),U=s(795206),V=s(898809),$=s(146215),P=s(877268);const G=(0,M.A)(P.A)`
  border-radius: 50%;
  padding: 1px;
  border: ${({theme:{themeName:e}})=>u.Ay[`desktop-border-divider-${e}`]};
  color: ${({theme:{themeName:e}})=>u.Ay[`desktop-color-neutral-08-${e}`]};
`,F=({model:e,version:r})=>{const s=(0,d.d4)(H.qf),t=(0,m.coerce)(r)?.version||r,o=(0,n.useCallback)(()=>{t&&s?.(e,t)},[s,e,t]);return(0,i.jsx)(b.A,{description:(0,i.jsx)(A.sA,{id:"COMMON_RELEASE_NOTES"}),children:(0,i.jsx)("span",{children:(0,i.jsx)(G,{actionable:!0,onClick:o,size:"original"})})})},B=()=>{const{themeName:e}=(0,c.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:u.Ay[`desktop-color-purple-06-${e}`]})})},q=(0,M.A)(h.A)`
  padding: ${p.xO};
  border: ${({theme:{themeName:e}})=>u.Ay[`desktop-border-divider-${e}`]};
  border-radius: 8px;
  margin-bottom: ${p.kc};
`,W=(0,M.A)(h.A)`
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background-color: ${({theme:{themeName:e}})=>u.Ay[`desktop-color-purple-06-${e}`]};
  z-index: 1;
`,Y=(0,M.A)(h.A)`
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  align-items: center;
`,K=(0,M.A)(h.A)`
  background-color: ${({theme:{themeName:e}})=>u.Ay[`desktop-color-neutral-02-${e}`]};
  border-radius: 4px;

  textarea {
    background-color: transparent;
    resize: none;
  }
`,X=({onCancel:e,onSubmitSuccess:r,name:s,model:o,mac:x,displayable_version:E,uptime:_,revertOptions:v})=>{const O=(0,d.wA)(),{themeName:j}=(0,c.u)(),{formatMessage:C}=(0,A.tz)(),[g,f]=(0,n.useState)(""),N=(0,d.d4)(S.Eh),M=(0,d.d4)(y.S$),P=(0,k.GO)(M),G=(0,d.d4)(H.ap),X=(0,d.d4)(H.YL),Z=(0,z.A)("firmware_downgrade_feedback"),J=(0,D.Lm)(o),Q=(0,m.coerce)(E)?.version,ee=(0,m.coerce)(v.previous_firmware_version)?.version,re=(0,n.useCallback)(async(e,r)=>{const s=await Z(),i=`${R.DU}${L.Fx[P]}/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:N,deviceModel:J,deviceFirmwareCurrentVersion:(0,T._)(E),deviceFirmwareNewVersion:r,anonymousId:G})})}catch(e){}},[Z,P,N,E,G,J]),se=(0,n.useCallback)(()=>{if(O((0,U._1)({name:s,model:o,mac:x},v.previous_firmware_url)),X)return r();g&&re(g,v.previous_firmware_version),r()},[O,s,o,x,v.previous_firmware_url,v.previous_firmware_version,X,g,r,re]);return(0,i.jsxs)(q,{flexDirection:"column",gap:p.Ln,children:[(0,i.jsxs)(h.A,{gap:p.kc,width:"100%",children:[(0,i.jsxs)(h.A,{flexDirection:"column",alignItems:"center",width:"110px",flex:"0 0 110px",children:[(0,i.jsxs)(t.A,{color:"text-3",size:"small",children:[(0,i.jsx)(A.sA,{id:"COMMON_CURRENT_VERSION"}),":"]}),(0,i.jsxs)(h.A,{gap:p.YC,children:[(0,i.jsx)(b.A,{description:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(A.sA,{id:"DEVICE_TIME_RUNNING"}),": ",(0,V.Ay)(_).join("").trim()]}),children:(0,i.jsx)(t.A,{color:"text-2",size:"medium",children:Q})}),(0,i.jsx)(F,{model:o,version:E})]})]}),(0,i.jsxs)(h.A,{flex:1,alignItems:"center",justifyContent:"center",position:"relative",children:[(0,i.jsx)(Y,{children:(0,i.jsx)(B,{})}),(0,i.jsx)(W,{children:(0,i.jsx)(l.A,{size:"original",variant:"twoTone",color:"white",twoTonedClassname:a.AH`
                fill: ${u.Ay[`desktop-color-purple-06-${j}`]};
              `})})]}),(0,i.jsxs)(h.A,{flexDirection:"column",alignItems:"center",width:"110px",flex:"0 0 110px",children:[(0,i.jsxs)(t.A,{color:"text-3",size:"small",children:[(0,i.jsx)(A.sA,{id:"COMMON_REVERT_TO"}),":"]}),(0,i.jsxs)(h.A,{gap:p.YC,children:[(0,i.jsx)(t.A,{color:"text-2",size:"medium",children:ee}),(0,i.jsx)(F,{model:o,version:ee||""})]})]})]}),X?null:(0,i.jsx)(K,{flexDirection:"column",gap:p.YC,children:(0,i.jsx)(I.A,{resize:!1,style:{width:"100%"},placeholder:C({id:"COMMON_HELP_UNIFI_UNDERSTAND_REVERT_DESCRIPTION"}),value:g,onChange:e=>{f(e)}})}),(0,i.jsxs)(h.A,{gap:p.YC,width:"100%",children:[(0,i.jsx)($.A,{title:(0,i.jsx)(A.sA,{id:"DEVICE_REVERT_NOW_CONFIRM_TITLE",values:{model:J}}),message:(0,i.jsx)(A.sA,{id:"DEVICE_REVERT_NOW_CONFIRM_MESSAGE",values:{model:J,version:ee||""}}),confirmButtonVariant:"emphasis",onConfirm:se,trigger:(0,i.jsx)(w.A,{size:"small",children:(0,i.jsx)(A.sA,{id:"COMMON_ACTION_REVERT_NOW"})})}),(0,i.jsx)(w.A,{size:"small",variant:"neutral",onClick:e,children:(0,i.jsx)(A.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:r,mac:s,displayable_version:E,uptime:_,type:O,flexProps:I,deviceState:w})=>{const M=(0,d.wA)(),[b,T]=(0,n.useState)(!1),{themeName:D}=(0,c.u)(),R=(0,d.d4)((0,n.useMemo)(()=>(e=>(0,C.Mz)((e=>(0,g.uh)(j(e)))(e),v.i6))(s),[s])),L=(0,x.A)(w);(0,n.useEffect)(()=>{L===f.g.UPGRADING&&w!==f.g.UPGRADING&&M(j(s))},[w,L,M,s]);const k=(0,n.useMemo)(()=>{const e=R.previous_firmware_version&&R.previous_firmware_url,r=E!==(0,m.coerce)(R.previous_firmware_version)?.version,s=w===f.g.UPGRADING;return Boolean(e)&&!s&&r&&Q.includes(O)},[R.previous_firmware_version,R.previous_firmware_url,E,w,O]),S=(0,N.A)(Q.includes(O)?[j(s,{},void 0)]:[],k?(0,i.jsxs)(o.A,{onPress:()=>{T(!0)},fontSize:"medium",children:[(0,i.jsx)(l.A,{size:"original",variant:"twoTone",color:u.Ay[`desktop-color-ublue-06-${D}`],twoTonedClassname:a.AH`
            fill: ${u.Ay[`desktop-color-ublue-01-${D}`]};
          `}),(0,i.jsx)(A.sA,{id:"COMMON_REVERT"})]}):null);return(0,i.jsxs)(i.Fragment,{children:[E?(0,i.jsxs)(Z.A,{flexProps:I,children:[(0,i.jsx)(t.A,{color:"text-2",size:"medium",children:(0,i.jsx)(A.sA,{id:"COMMON_DEVICE_VERSION"})}),(0,i.jsxs)(h.A,{gap:p.kc,alignItems:"flex-start",children:[(0,i.jsx)(t.A,{color:"text-3",size:"medium",children:E}),S]})]}):null,b?(0,i.jsx)(X,{onCancel:()=>{T(!1)},onSubmitSuccess:()=>{T(!1)},name:e,model:r,mac:s,displayable_version:E,uptime:_,revertOptions:R}):null]})}},645682(e,r,s){s.d(r,{A:()=>l});var i=s(274934),n=s(179102),t=s(100978),o=s(470070);const l=({color:e})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.A,{children:(0,i.jsx)(n.A,{weight:"bold",color:e,children:(0,i.jsx)(o.sA,{id:"AP_LOW_UPLINK_SPEED_NOTIFICATION_TITLE"})})}),(0,i.jsx)(t.A,{children:(0,i.jsx)(n.A,{color:e,children:(0,i.jsx)(o.sA,{id:"AP_LOW_UPLINK_SPEED_NOTIFICATION_BODY"})})})]})},61322(e,r,s){s.d(r,{I:()=>i});const i={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,r,s,i){return Math.min((i||this.ROW_HEIGHT)*e+(s??this.HEADER_HEIGHT),(i||this.ROW_HEIGHT)*r+(s??this.HEADER_HEIGHT))},getEditContainerHeight(e,r,s){return Math.min((s||this.EDIT_FIELD_HEIGHT)*e,(s||this.EDIT_FIELD_HEIGHT)*r)}}},112104(e,r,s){s.d(r,{A:()=>d});var i=s(274934),n=s(602086),t=s(179102),o=s(526744),l=s(309130),a=s(100978),c=s(470070);const d=(e,r={})=>{const{formatMessage:s}=(0,c.tz)(),[d,u]=(0,n.useState)(!1),{defaultCount:m,label:{singular:A,plural:h}}=(0,n.useMemo)(()=>({defaultCount:r.defaultCount||6,label:{singular:s({id:r.label?.singular||"COMMON_DEVICE"}),plural:s({id:r.label?.plural||"COMMON_DEVICES"})}}),[r,s]),p=(0,n.useCallback)(()=>{u(e=>!e)},[]);return{rowLimit:e>m&&!d?m:e,renderFooter:e>m?(0,i.jsx)(a.A,{marginTop:l.kc,children:(0,i.jsxs)(t.A,{size:"medium",children:[(0,i.jsx)(c.sA,{id:"COMMON_ADV_TABLE_FOOTER",values:{length:e>m&&!d?m:e,total:e,singular:A,plural:h}}),(0,i.jsxs)(i.Fragment,{children:[" ",(0,i.jsxs)(o.A,{type:"button",variant:"inline",onClick:p,children:[(0,i.jsx)(c.sA,{id:"COMMON_SHOW"})," ",(0,i.jsx)(c.sA,{id:d?"COMMON_LESS":"COMMON_ALL"})]})]})]})}):null,setExpand:u}}},968021(e,r,s){s.d(r,{A:()=>n});var i=s(602086);const n=e=>{const r=(0,i.useRef)(void 0);return(0,i.useEffect)(()=>{r.current=e},[e]),r.current}},367821(e,r,s){s.d(r,{A:()=>a});var i=s(602086),n=s(977872),t=s(726831),o=s(575478),l=s(828373);const a=()=>{const e=(0,n.wA)(),r=(0,n.d4)(l.eo);return(0,i.useEffect)(()=>{r||(async()=>{const r=await fetch(t.A.fingerprintPublicDatabasePath),s=await r.json();e((0,o.$)(s))})()},[r,e]),r}},828373(e,r,s){s.d(r,{$E:()=>d,eo:()=>a});var i=s(222102),n=s(271656),t=s(720770),o=s(172205);const l=e=>e[o.U.UIDB]||(0,n.A)(),a=(0,i.Mz)(l,({version:e})=>Boolean(e)),c=(0,i.Mz)(l,({devices:e})=>e||(0,t.A)()),d=e=>(0,i.Mz)(c,r=>r.find(({shortnames:r})=>e&&(r||[]).includes(e))||(0,n.A)());(0,i.Mz)(c,e=>{const r=new Map;for(let s=0;s<e.length;s+=1){const i=e[s].power?.baseConsumption;if(void 0!==i){const{shortnames:n}=e[s];for(let e=0;e<(n||[]).length;e+=1)r.set(n[e],i)}}return r})},696916(e,r,s){s.d(r,{A:()=>c});var i=s(602086),n=s(977872),t=s(232087),o=s(594633),l=s(743178);const a={[t.OH.PRD]:"6Ld47OUpAAAAALQ4AgR1gfk-hnSw27y3zIMKLOSw",[t.OH.STG]:"6LeKc-UpAAAAAN6YqRab29cPCbU-cfe7_EvchSvc",[t.OH.DEV]:"6LeocOUpAAAAANmIju4N9DzlkK4UNYdYThrUkK3y"},c=e=>{const[r,s]=(0,i.useState)(),t=(0,i.useRef)(void 0),c=(0,n.d4)(o.S$),d=(0,l.GO)(c);return(0,i.useEffect)(()=>{const r=()=>{const{grecaptcha:i}=window;i?.enterprise.ready(()=>s(()=>()=>i.enterprise.execute(a[d],{action:e}))),t.current?.removeEventListener("load",r)};return"grecaptcha"in window?r():(t.current=document.createElement("script"),t.current.src=(e=>`https://www.google.com/recaptcha/enterprise.js?render=${a[e]}`)(d),t.current.addEventListener("load",r),document.body.appendChild(t.current),(()=>{const e="hide-grecaptcha-badge";if(document.getElementById(e))return;const r=document.createElement("style");r.id=e,r.innerText=".grecaptcha-badge { visibility: hidden; }",document.head.appendChild(r)})()),()=>{t.current?.removeEventListener("load",r)}},[]),r}}}]);