"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[54996],{682e3(e,n,i){var a;i.d(n,{L:()=>a}),function(e){e.XS="XS",e.S="S",e.SM="SM",e.M="M",e.ML="ML",e.L="L",e.XL="XL",e.XXL="XXL"}(a||(a={}))},588769(e,n,i){i.d(n,{A:()=>r,G:()=>s});var a=i(682e3);const t={[a.L.XS]:{FROM:0,TO:374},[a.L.S]:{FROM:375,TO:567},[a.L.SM]:{FROM:568,TO:767},[a.L.M]:{FROM:768,TO:1023},[a.L.ML]:{FROM:1024,TO:1199},[a.L.L]:{FROM:1200,TO:1919},[a.L.XL]:{FROM:1920,TO:2559},[a.L.XXL]:{FROM:2560,TO:1/0}},s=600,r={...t,DASHBOARD:{LAYOUT:{MOBILE:"(max-width: 767px)",DESKTOP:"(min-width: 768px)"},CHART:{MOBILE:"(max-width: 1419px)",DESKTOP:"(min-width: 1420px)"},BAND_SELECTOR:{MOBILE:"(max-width: 1119px)",DESKTOP:"(min-width: 1120px)"}},SIDE_NAVIGATION_BREAKPOINT_UP:`(min-width: ${s+1}px)`,SIDE_NAVIGATION_BREAKPOINT_DOWN:`(max-width: ${s}px)`,VIEWPORT_XS:`(max-width: ${t[a.L.XS].TO}px)`,VIEWPORT_S:`(min-width: ${t[a.L.S].FROM}px) and (max-width: ${t[a.L.S].TO}px)`,VIEWPORT_SM:`(min-width: ${t[a.L.SM].FROM}px) and (max-width: ${t[a.L.SM].TO}px)`,VIEWPORT_M:`(min-width: ${t[a.L.M].FROM}px) and (max-width: ${t[a.L.M].TO}px)`,VIEWPORT_ML:`(min-width: ${t[a.L.ML].FROM}px) and (max-width: ${t[a.L.ML].TO}px)`,VIEWPORT_L:`(min-width: ${t[a.L.L].FROM}px) and (max-width: ${t[a.L.L].TO}px)`,VIEWPORT_XL:`(min-width: ${t[a.L.XL].FROM}px) and (max-width: ${t[a.L.XL].TO}px)`,VIEWPORT_XXL:`(min-width: ${t[a.L.XXL].FROM}px)`,VIEWPORT_XS_UP:`(min-width: ${t[a.L.S].FROM}px)`,VIEWPORT_S_UP:`(min-width: ${t[a.L.SM].FROM}px)`,VIEWPORT_SM_UP:`(min-width: ${t[a.L.M].FROM}px)`,VIEWPORT_M_UP:`(min-width: ${t[a.L.ML].FROM}px)`,VIEWPORT_ML_UP:`(min-width: ${t[a.L.L].FROM}px)`,VIEWPORT_L_UP:`(min-width: ${t[a.L.XL].FROM}px)`,VIEWPORT_XL_UP:`(min-width: ${t[a.L.XXL].FROM}px)`,VIEWPORT_S_DOWN:`(max-width: ${t[a.L.S].TO}px)`,VIEWPORT_SM_DOWN:`(max-width: ${t[a.L.SM].TO}px)`,VIEWPORT_M_DOWN:`(max-width: ${t[a.L.M].TO}px)`,VIEWPORT_ML_DOWN:`(max-width: ${t[a.L.ML].TO}px)`,VIEWPORT_L_DOWN:`(max-width: ${t[a.L.L].TO}px)`,VIEWPORT_XL_DOWN:`(max-width: ${t[a.L.XL].TO}px)`,VIEWPORT_XXL_DOWN:`(max-width: ${t[a.L.XXL].TO}px)`}},875922(e,n,i){i.d(n,{A:()=>o});var a=i(293668),t=i(956978),s=i(927316);const r=({device:e,radio:{radio:n}})=>!(0,a.k_)(e,n),l=({device:e})=>!(0,t.YdF)(e),o={ht:r,channel:r,tx_power_mode:l,tx_power:l,min_rssi_enabled:l,min_rssi:l,hard_noise_floor_enabled:({radio:e})=>(0,s.Wg)(e)}},635496(e,n,i){var a;i.d(n,{M:()=>a}),function(e){e.MAIN="main",e.DHCP="dhcp",e.HOTSPOT="hotspot"}(a||(a={}))},364142(e,n,i){i.d(n,{A:()=>d,n:()=>o});var a=i(274934),t=i(125799),s=i(864217);const r=(0,i(247816).A)("div")`
  white-space: nowrap;
`,l=({option:e,children:n})=>e.disabled&&"message"in e?(0,a.jsx)(t.A,{description:e.message,portal:!0,position:"left",width:193,isInteractive:e.isInteractive,children:n}):(0,a.jsx)(a.Fragment,{children:n}),o=({option:e,...n})=>(0,a.jsx)(l,{option:e,children:(0,a.jsx)(r,{children:(0,a.jsx)(s.p,{option:e,...n})})}),d=l},308833(e,n,i){i.d(n,{D:()=>s,X:()=>t});var a=i(857780);const t={MIN:-67,DEFAULT:-80,MAX:-90},s=[{value:a.eF.OFF,label:"DEVICE_PROPERTIES_AP_BAND_STEER_OFF"},{value:a.eF.PREFER_5G,label:"DEVICE_PROPERTIES_AP_BAND_STEER_PREFER_5G"},{value:a.eF.EQUAL,label:"DEVICE_PROPERTIES_AP_BAND_STEER_BALANCED"}]},432001(e,n,i){i.d(n,{W:()=>l,k:()=>r});var a=i(586566),t=i(537871),s=i(795206);const r=(e,n)=>{if(!n)return(0,a.mT)(e,t.A.HIDE_CH_WIDTH);const i=e?.hide_ch_width;return!!i&&("all"===i||i===n)},l=(e,n,i,a)=>{e.uplinkPriority1===n.uplinkPriority1&&e.uplinkPriority2===n.uplinkPriority2||a(e.meshingEnabled&&(e.uplinkPriority1||e.uplinkPriority2)?(0,s.A0)(i,e.uplinkPriority1,e.uplinkPriority2):(0,s.Bh)(i))}},350626(e,n,i){i.d(n,{A:()=>I});var a=i(274934),t=i(977872),s=i(602086),r=i(43506),l=i(309130),o=i(304151),d=i(728064),c=i(247816),_=i(250266),A=i(100978);const u=(0,c.A)(A.A)`
  div[class*='tooltip-container'] {
    width: 100%;
  }
`,h=({children:e,isOpen:n,handleClose:i,handleConfirm:t})=>(0,a.jsx)(u,{marginBottom:l.Ln,children:(0,a.jsx)(_.A,{title:"ANTENNA_TYPE_CHANGE_WARNING_TITLE",message:"ANTENNA_TYPE_CHANGE_WARNING_DESCRIPTION",buttonMessage:"COMMON_ACTION_PROCEED",isOpen:n,handleClose:i,handleConfirm:t,showHeaderClose:!0,children:e})});var E=i(120197),x=i(502129),O=i(470070),m=i(570801),C=i(927316),N=i(969288);const I=({name:e,device:n,onChangeRadioAntenna:i,configuredAntennaId:c,radio:_})=>{const{formatMessage:A}=(0,O.tz)(),u=(0,r.A)(N.WT),I=(0,t.d4)(m.EH),p=(0,C.A4)(n,I),g=(0,C.Ox)(n,_.name,p,A),[v,R]=(0,s.useState)(null);return(0,a.jsx)(h,{isOpen:null!==v,handleClose:()=>R(null),handleConfirm:()=>i(v),children:(0,a.jsx)(E.A,{label:(0,a.jsx)("label",{htmlFor:e,children:(0,a.jsxs)(d.C,{gap:l.YC,alignItems:"center",children:[(0,a.jsx)(O.sA,{id:"DEVICE_PROPERTIES_LABEL_ANTENNA_TYPE"}),(0,a.jsx)(o.A,{description:(0,a.jsx)(O.sA,{id:(0,C.p$)(n.model)?"DEVICE_PROPERTIES_LABEL_ANTENNA_ANGLE_TYPE_DESC":"DEVICE_PROPERTIES_LABEL_ANTENNA_TYPE_DESC",values:{link:(0,a.jsx)(x.A,{to:u,children:(0,a.jsx)(O.sA,{id:"COMMON_PROFESSIONAL_INSTALLER"})})}}),isInteractive:!0,portal:!0})]})}),name:e,value:c,type:"dropdown",variant:"secondary",options:g,validated:!0,full:!0,translateLabel:!0,onChange:({value:e})=>{(0,C.kb)({model:n.model},e)?R(e):i(e)}})})}},338119(e,n,i){i.d(n,{A:()=>u});var a=i(274934),t=i(125799),s=i(632622),r=i(853777),l=i(247816),o=i(309130),d=i(100978),c=i(470070);const _=(0,l.A)(d.A)`
  > div {
    display: flex;
    align-items: center;
  }
`,A=({infoId:e})=>(0,a.jsx)(t.A,{width:208,description:(0,a.jsx)(c.sA,{id:e}),portal:!0,children:(0,a.jsx)(r.A,{isActive:!0,size:"original"})}),u=({name:e,infoId:n,info:i,warning:t,children:r})=>(0,a.jsx)(s.A,{as:"label",color:"tertiary",htmlFor:e,children:(0,a.jsxs)(_,{alignItems:"center",gap:o.YC,children:[r,n?(0,a.jsx)(A,{infoId:n}):null,i,t]})})},728064(e,n,i){i.d(n,{A:()=>p,C:()=>I});var a=i(274934),t=i(977872),s=i(843871),r=i(125799),l=i(853777),o=i(247816),d=i(43506),c=i(309130),_=i(350626),A=i(120197),u=i(502129),h=i(100978),E=i(470070),x=i(570801),O=i(956978),m=i(927316),C=i(969288),N=i(98334);const I=(0,o.A)(h.A)`
  > div {
    display: flex;
    align-items: center;
  }
`,p=({radioIdx:e,deviceRadio:{device:n,radio:i}})=>{const{formatMessage:o}=(0,E.tz)(),p=(0,d.A)(C.WT),g=(0,t.d4)(x.EH),{values:v,setFieldValue:R,errors:j}=(0,s.j7)(),M=(0,m.A4)(n,g),D=(0,m.Ox)(n,i.name,M,o);return(0,a.jsxs)(a.Fragment,{children:[n.multi_active_antennas&&!(0,O.ERA)(n)&&D.length>1?(0,a.jsx)(_.A,{name:`radios.${e}.antenna_id`,configuredAntennaId:(0,s.O6)(v,`radios.${e}.antenna_id`),radio:i,device:n,onChangeRadioAntenna:n=>{R(`radios.${e}.antenna_id`,n)}}):null,(!n.multi_active_antennas||(0,O.ERA)(n))&&D.length>1?(0,a.jsx)(h.A,{marginBottom:c.Ln,children:(0,a.jsx)(A.A,{label:M&&(0,m.p$)(n.model)?"DEVICE_PROPERTIES_LABEL_ANTENNA_GAIN":(0,a.jsx)("label",{htmlFor:`radios.${e}.antenna_gain`,children:(0,a.jsxs)(I,{gap:c.YC,alignItems:"center",children:[(0,a.jsx)(E.sA,{id:"DEVICE_PROPERTIES_LABEL_ANTENNA_GAIN"}),(0,a.jsx)(r.A,{description:(0,a.jsx)(E.sA,{id:"DEVICE_PROPERTIES_LABEL_ANTENNA_GAIN_DESC",values:{link:(0,a.jsx)(u.A,{to:p,children:(0,a.jsx)(E.sA,{id:"DEVICE_PROPERTIES_LABEL_ANTENNA_GAIN_DESC_LINK"})})}}),isInteractive:!0,portal:!0,children:(0,a.jsx)(l.A,{isActive:!0,size:"original"})})]})}),name:`radios.${e}.antenna_gain`,value:v.radios[e].antenna_gain,min:N.x8,max:N.Pe,type:"number",variant:"secondary",full:!0,disabled:!(0,m.kb)(n,v.radios[e].antenna_id),invalid:(0,s.O6)(j,`radios.${e}.antenna_gain`)})}):null]})}},258893(e,n,i){i.d(n,{A:()=>C});var a=i(274934),t=i(602086),s=i(843871),r=i(125799),l=i(762705),o=i(938984),d=i(853777),c=i(309130),_=i(338119),A=i(250266),u=i(120197),h=i(793442),E=i(100978),x=i(470070),O=i(726831);const m="afc_enabled",C=({isOutdoor:e=!1})=>{const{values:n,setFieldValue:i}=(0,s.j7)(),[C,N]=(0,t.useState)(!1),[I,p]=(0,t.useState)(!1),g=(0,t.useCallback)(()=>{n.afc_enabled?i("afc_enabled",!n.afc_enabled):N(!0)},[n?.afc_enabled,i]),v=(0,t.useMemo)(()=>(0,a.jsx)(r.A,{description:(0,a.jsx)(x.sA,{id:e?"COMMON_AFC_TOOLTIP_OUTDOOR":"COMMON_AFC_TOOLTIP_INDOOR",values:{link:(0,a.jsx)(h.A,{href:O.A.afcArticle,id:"COMMON_LEARN_MORE"})}}),portal:!0,isInteractive:!0,children:(0,a.jsx)(d.A,{isActive:!0,size:"original"})}),[e]),R=(0,t.useMemo)(()=>(0,a.jsxs)(E.A,{flexDirection:"column",children:[(0,a.jsx)(E.A,{flexDirection:"row",children:(0,a.jsx)(o.A,{size:"medium",variant:"body-primary",children:(0,a.jsx)(x.sA,{id:e?"DEVICE_ENABLE_AFC_OUTDOOR_CONFIRM_TEXT":"DEVICE_ENABLE_AFC_INDOOR_CONFIRM_TEXT",values:e?{}:{link:(0,a.jsx)(h.A,{href:O.A.afcArticle,id:"COMMON_LEARN_MORE"})}})})}),(0,a.jsx)(E.A,{flexDirection:"row",marginTop:c.kc,children:(0,a.jsx)(l.A,{id:"tos_agreement",checked:I,onClick:()=>p(e=>!e),children:(0,a.jsx)(o.A,{size:"medium",variant:"body-primary",children:(0,a.jsx)(x.sA,{id:e?"DEVICE_ENABLE_6GHZ_TOS_AGREE":"DEVICE_ENABLE_EXTEND_6GHZ_RANGE_TOS_AGREE",values:{link:(0,a.jsx)(h.A,{noWrap:!0,href:O.A.termsOfServiceUrl,id:"COMMON_TOS"})}})})})})]}),[I,e]);return(0,a.jsx)(E.A,{marginBottom:c.Ln,justifyContent:"space-between",alignItems:"center",children:(0,a.jsx)(A.A,{title:e?"DEVICE_ENABLE_6GHZ":"DEVICE_ENABLE_AFC_CONFIRM_HEADER",body:R,handleClose:N,handleConfirm:()=>i("afc_enabled",!0),buttonMessage:"COMMON_ACTION_ENABLE",buttonDisabled:!I,isOpen:C,children:(0,a.jsx)(u.A,{label:"COMMON_AFC",type:"realCheckbox",name:m,checked:!!n?.[m],onChange:g,children:(0,a.jsxs)(E.A,{flexDirection:"row",alignItems:"center",gap:c.YC,children:[(0,a.jsx)(x.sA,{id:"COMMON_AFC"}),(0,a.jsx)(_.A,{name:m,info:v})]})})})})}},50051(e,n,i){i.d(n,{A:()=>D});var a=i(274934),t=i(977872),s=i(602086),r=i(843871),l=i(247816),o=i(947414),d=i(345272),c=i(309130),_=i(364142),A=i(250266),u=i(120197),h=i(100978),E=i(470070),x=i(669641),O=i(754924),m=i(338119),C=i(98334);const N=(0,l.A)(u.A)`
  margin: 0;
  padding: 0 ${c.kc};
`,I=({name:e,option:n,value:i,onChange:t,disabled:s})=>(0,a.jsx)(_.A,{option:n,children:(0,a.jsx)(N,{name:e,id:`${e}-${n.value}`,type:"radio",variant:"inputless",checked:n.value===i,disabled:s||n.disabled,onChange:o.P1,onClick:()=>t(n),children:(0,a.jsx)(h.A,{alignItems:"center",justifyContent:"center",height:30,paddingBottom:1,children:n.value})},n.value)}),p=e=>{const[n,i]=(0,s.useState)(null),{setFieldValue:t}=(0,r.j7)(),{name:l,onChange:o,onChangeCallback:d}=e;return(0,a.jsx)(A.A,{title:"AP_CHANNEL_WIDTH_DFS_WARNING_TITLE_IN_PROPERTY_PANEL",message:"AP_CHANNEL_WIDTH_DFS_WARNING_DESC_IN_PROPERTY_PANEL",buttonMessage:"COMMON_ACTION_PROCEED",isOpen:null!==n,handleClose:()=>i(null),handleConfirm:()=>{t(l,n),d?.({value:n})},showHeaderClose:!0,children:(0,a.jsx)(I,{name:l,...e,onChange:e=>{C.mO.includes(e.value)?i(e.value):o(e)}})})},g=e=>{const{formatMessage:n}=(0,E.tz)(),[i,t]=(0,s.useState)(null),{setFieldValue:l}=(0,r.j7)(),{name:o,onChangeCallback:d}=e;return(0,a.jsx)(A.A,{title:"AP_CHANNEL_WIDTH_CHANGE_WARNING_TITLE",titleValues:{field:n({id:"COMMON_CHANNEL_WIDTH"}).toLowerCase(),value:i},message:"AP_RADIO_CHANNEL_CHANGE_MESHING_WARNING_DESCRIPTION",messageValues:{appendix:(0,a.jsx)(E.sA,{id:"DEVICE_CONFIRM_TO_CONTINUE"})},buttonMessage:"COMMON_ACTION_PROCEED",isOpen:null!==i,handleClose:()=>t(null),handleConfirm:()=>{l(o,i),d?.({value:i})},showHeaderClose:!0,children:(0,a.jsx)(I,{name:o,...e,onChange:e=>{t(e.value)}})})},v=({radioType:e,showMeshingParentWarning:n,...i})=>n?(0,a.jsx)(g,{...i}):e!==d.A.NA.type||i.onDfs||C.mO.includes(i.value)?(0,a.jsx)(I,{...i}):(0,a.jsx)(p,{...i}),R=({name:e,onChange:n,onChangeCallback:i,...t})=>{const{setFieldValue:s,values:l}=(0,r.j7)(),o=t.value||(0,r.O6)(l,e);return(0,a.jsx)(v,{...t,value:o,onChange:n=>{s(e,n.value),i?.(n)},name:e,onChangeCallback:i})},j=({options:e,warning:n,fieldLabel:i,...t})=>(0,a.jsxs)(h.A,{flexDirection:"column",children:[i||(0,a.jsx)(m.A,{name:t.name,warning:n,children:(0,a.jsx)(E.sA,{id:"COMMON_CHANNEL_WIDTH"})}),(0,a.jsx)(h.A,{width:"100%",gap:c.YC,children:e.map(e=>(0,a.jsx)(R,{option:e,...t},e.value))})]}),M=({device:e,...n})=>{const i=(0,t.d4)(O.ID),s=(0,x.T)(e,i);return(0,a.jsx)(j,{...n,value:s?.radio?.ht||n.value})},D=({meshingDevice:e,...n})=>e?(0,a.jsx)(M,{device:e,...n}):(0,a.jsx)(j,{...n})},829540(e,n,i){i.d(n,{qk:()=>qe,Hm:()=>Ke,sG:()=>Qe,eu:()=>Ve});var a=i(274934),t=i(977872),s=i(602086),r=i(843871),l=i(125799),o=i(938984),d=i(642687),c=i(247816),_=i(409844),A=i(293668),u=i(947414),h=i(586566),E=i(285458),x=i(309130),O=i(761801),m=i(258893),C=i(98334),N=i(364142),I=i(100978),p=i(408402),g=i(470070),v=i(561614),R=i(291935),j=i(570801),M=i(956978),D=i(927316),T=i(857780),f=i(718429),L=i(221008),S=i(310379),w=i(244081),P=i(432001),b=i(787677),H=i(600191),F=i(599110),W=i(347625),B=i(201829),V=i(974390);const y=_.AH`
  justify-content: flex-start !important; // Otherwise button internal styles overwrite the alignment
`,G=({unsupportedDevices:e,onAction:n,captionId:i,actionCaptionId:t="COMMON_DESELECT",children:s})=>{const r=Object.values(e.reduce((e,{device:n})=>(e[n._id]=n,e),{})),l=r.slice(0,B.w),d=r.length-l.length;return(0,a.jsxs)(I.A,{flexDirection:"column",gap:x.YC,children:[i?(0,a.jsx)(o.A,{size:"small",children:s||(0,a.jsx)(g.sA,{id:i})}):null,l.map(({name:e,model:n,mac:i,_id:t})=>(0,a.jsxs)(I.A,{flexDirection:"row",gap:x.YC,children:[(0,a.jsx)(V.A,{model:n,width:16}),(0,W.Q)({name:e,model:n,mac:i})]},t)),d>0?(0,a.jsx)(g.sA,{id:"COMMON_X_MORE",values:{count:d}}):null,n?(0,a.jsx)(F.A,{variant:"inline",contentClassName:y,onClick:i=>{i.stopPropagation(),n(e)},children:(0,a.jsx)(g.sA,{id:t})}):null]})},$=(0,c.A)(H.A)`
  pointer-events: auto;
  color: #808893;
`,k=e=>(0,a.jsx)(l.A,{description:(0,a.jsx)(G,{captionId:"COMMON_UNSUPPORTED_DEVICES",...e}),portal:!0,isInteractive:!0,children:(0,a.jsx)($,{height:20,width:20})});var U=i(875922),X=i(762705),z=i(853777),Y=i(120197);const Z=(0,c.A)(Y.A)`
  margin: 0;
  padding: 0 6px;
`,K=({label:e,name:n,value:i,options:t,onChange:s})=>(0,a.jsxs)(I.A,{flexDirection:"column",children:[(0,a.jsx)(I.A,{paddingBottom:1,children:e}),(0,a.jsx)(I.A,{width:"100%",gap:x.YC,children:t.map(e=>(0,a.jsx)(l.A,{description:e.disabled&&e?.disabledTooltip?e.disabledTooltip:null,portal:!0,children:(0,a.jsx)(Z,{name:n,id:`${n}-${e.value}`,type:"radio",variant:"inputless",checked:e.value===i,disabled:e.disabled,onChange:u.P1,onClick:()=>s(e),children:(0,a.jsx)(I.A,{alignItems:"center",justifyContent:"center",height:30,paddingBottom:1,children:(0,a.jsx)(g.sA,{id:e.label})})})},e.value))})]});var Q=i(250266),q=i(796091),J=i(793442),ee=i(726831),ne=i(338119);const ie=({name:e,warning:n,tx_power_mode:i,onChange:t,filteredRadioPowerOptions:s})=>(0,a.jsx)(K,{name:e,label:(0,a.jsx)(ne.A,{name:e,info:i===v.PB.AUTO?(0,a.jsx)(l.A,{width:208,description:(0,a.jsx)(g.sA,{id:"DEVICE_RADIO_TRANSMIT_POWER_AUTO"}),portal:!0,children:(0,a.jsx)(z.A,{isActive:!0,size:"original"})}):null,warning:n,children:(0,a.jsx)(g.sA,{id:"COMMON_TRANSMIT_POWER"})}),type:"dropdown",value:i??C.SZ,onChange:t,options:s}),ae=({name:e,warning:n,hideCustomPower:i=!1,isAllowedToDisableRadio:t=!0,isRequiredToConfirmAfcTos:l=!1})=>{const{values:d,setFieldValue:c}=(0,r.j7)(),_=(0,r.O6)(d,e),[A,u]=(0,s.useState)(!1),[h,E]=(0,s.useState)(null),[O,m]=(0,s.useState)(!1);(0,s.useEffect)(()=>{E(null)},[_]);const C=(0,s.useMemo)(()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.A,{size:"medium",variant:"body-primary",children:(0,a.jsx)(g.sA,{id:"DEVICE_ENABLE_6GHZ_RADIO_CONFIRM_TEXT_BODY",values:{link:(0,a.jsx)(J.A,{href:ee.A.afcArticle,id:"COMMON_LEARN_MORE"}),br:g.br}})}),(0,a.jsx)(q.A,{paddingTop:x.kc,children:(0,a.jsx)(X.A,{id:"tos_agreement",checked:O,onChange:()=>m(!O),children:(0,a.jsx)(o.A,{size:"medium",variant:"body-primary",children:(0,a.jsx)(g.sA,{id:"DEVICE_ENABLE_6GHZ_RADIO_CONFIRM_TOS_AGREE",values:{link:(0,a.jsx)(J.A,{href:ee.A.termsOfServiceUrl,id:"COMMON_TOS"})}})})})})]}),[O]),N=(0,s.useMemo)(()=>(e=>[{value:v.PB.AUTO,label:"COMMON_VALUE_AUTO"},{value:v.PB.HIGH,label:"COMMON_HIGH"},{value:v.PB.MEDIUM,label:"COMMON_MEDIUM"},{value:v.PB.LOW,label:"COMMON_LOW"},{value:v.PB.CUSTOM,label:"COMMON_CUSTOM"},{value:v.PB.DISABLED,label:"COMMON_DISABLED",disabled:!e,disabledTooltip:e?null:(0,a.jsx)(g.sA,{id:"DEVICE_RADIO_TRANSMIT_POWER_DISABLE_NOT_ALLOWED_TOOLTIP"})}])(t),[t]),I=(0,s.useMemo)(()=>i?N.filter(({value:e})=>e!==v.PB.CUSTOM):N,[i,N]),p=(0,s.useCallback)(({value:n})=>{c(e,n)},[c,e]);if(l&&_===v.PB.DISABLED){const i=h??_;return(0,a.jsx)(Q.A,{title:"DEVICE_ENABLE_6GHZ",body:C,isOpen:A,handleClose:()=>{u(!1),E(null)},showHeaderClose:!0,footerActions:[{text:(0,a.jsx)(g.sA,{id:"COMMON_ACTION_ENABLE"}),disabled:!O,variant:"primary",onClick:()=>{c(e,h),c("afc_enabled",!0),u(!1)}}],children:(0,a.jsx)(ie,{name:e,warning:n,tx_power_mode:i,filteredRadioPowerOptions:I,onChange:e=>{i!==e.value&&(u(!0),E(e.value))}})})}return(0,a.jsx)(ie,{name:e,warning:n,tx_power_mode:_,onChange:p,filteredRadioPowerOptions:I})},te=({name:e,min:n,max:i})=>{const{values:t,setFieldValue:s,errors:l}=(0,r.j7)(),o=(0,r.O6)(t,e);return(0,a.jsx)(Y.A,{name:e,value:(0,r.O6)(t,e)??C.SZ,onConfirm:n=>{s(e,n)},min:n,max:i,type:"number",variant:"secondary",full:!0,validated:!0,placeholder:void 0===o?"COMMON_SELECT":void 0,contentAfter:(0,a.jsx)(g.sA,{id:"COMMON_UNIT_DBM"}),invalid:(0,r.O6)(l,e),width:x.o0})},se=({radioType:e,radioIdx:n,deviceRadios:i,warning:t,hasWirelessConnection:s,isAfcSupportedDevice:l,isOutdoorSupportedDevice:o})=>{const{values:d}=(0,r.j7)(),c=d.radios[n],_=c?.tx_power_mode===v.PB.CUSTOM,A=i.filter(e=>U.A.tx_power(e)),u=Math.max(...A.map(({radio:{min_txpower:e}})=>e)),h=Math.min(...A.map(({radio:{max_txpower:e}})=>e)),E=e!==v.sx.RADIO_NA||!s&&e===v.sx.RADIO_NA,O=l&&e===v.sx.RADIO_6E,m=O&&!d?.afc_enabled&&o;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(I.A,{marginBottom:x.Ln,children:(0,a.jsx)(I.A,{width:"100%",children:(0,a.jsx)(ae,{name:`radios.${n}.tx_power_mode`,warning:t,hideCustomPower:O&&o||!o&&d?.afc_enabled&&e===v.sx.RADIO_6E,isAllowedToDisableRadio:E,isRequiredToConfirmAfcTos:m})})}),_?(0,a.jsx)(I.A,{marginBottom:x.Ln,children:(0,a.jsx)(I.A,{width:x.o0,children:(0,a.jsx)(te,{name:`radios.${n}.tx_power`,min:u,max:h,radioType:e})})}):null]})};var re=i(308833),le=i(291508);const oe=(0,c.A)(o.A)`
  flex: 1;
  margin-right: ${x.xO};
`,de=(0,c.A)("div",(0,le.A)("marginBottom","marginTop"))`
  margin-bottom: ${({marginBottom:e})=>e||0};
  margin-top: ${({marginTop:e})=>e||0};

  & > :last-child {
    margin-bottom: 0;
  }
`,ce=e=>(0,a.jsxs)(o.A,{color:"text-2",children:["-",e]}),_e=({radioIdx:e,warning:n})=>{const{values:i,setFieldValue:t}=(0,r.j7)(),s=i.radios[e],l=`radios.${e}.min_rssi_enabled`;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(I.A,{marginBottom:x.Ln,justifyContent:"space-between",alignItems:"center",children:(0,a.jsx)(Y.A,{name:l,type:"realCheckbox",checked:s.min_rssi_enabled??C.SZ,children:(0,a.jsxs)(I.A,{flexDirection:"row",alignItems:"center",gap:x.YC,children:[(0,a.jsx)(g.sA,{id:"COMMON_MINIMUM_RSSI"}),(0,a.jsx)(ne.A,{name:l,infoId:"DEVICE_PROPERTIES_LABEL_ENABLE_MIN_RSSI_DESC",warning:n})]})})}),s.min_rssi_enabled?(0,a.jsxs)(de,{marginBottom:x.Ln,children:[(0,a.jsx)(oe,{size:"small",color:"text-3",children:(0,a.jsx)(g.sA,{id:"DEVICE_PROPERTIES_LABEL_MIN_RSSI"})}),(0,a.jsx)(Y.A,{type:"slider",name:`radios.${e}.min_rssi`,min:-re.X.MIN,max:-re.X.MAX,segments:1,value:-(s.min_rssi??re.X.MIN),withValueIndicator:void 0!==s.min_rssi,valueIndicatorPosition:"right",formatValueIndicatorContent:ce,onChange:({target:{value:n}})=>{t(`radios.${e}.min_rssi`,-n)}})]}):null]})},Ae=({radioIdx:e,deviceRadios:n,warning:i,onRemoveDeviceRadio:t})=>{const l=(0,s.useMemo)(()=>n.filter(({radio:e})=>!(0,D.Wg)(e)),[n]),o=l.length?(0,a.jsx)(k,{unsupportedDevices:l,onAction:t}):null,d=`radios.${e}.hard_noise_floor_enabled`,{values:c}=(0,r.j7)();return n.length>l.length?(0,a.jsx)(I.A,{marginBottom:x.Ln,justifyContent:"space-between",alignItems:"center",children:(0,a.jsx)(Y.A,{label:"COMMON_INTERFERENCE_BLOCKER",name:d,type:"realCheckbox",checked:c.radios[e].hard_noise_floor_enabled??C.SZ,children:(0,a.jsxs)(I.A,{flexDirection:"row",alignItems:"center",gap:x.YC,children:[(0,a.jsx)(g.sA,{id:"COMMON_INTERFERENCE_BLOCKER"}),(0,a.jsx)(ne.A,{name:d,warning:o??i})]})})}):null};var ue=i(935718);const he=(0,c.A)(ue.A)`
  padding: ${x.YC};
`,Ee=(0,c.A)("div")`
  margin-right: ${x.YC};
`,xe=e=>({className:n})=>(0,a.jsx)(Ee,{className:n,children:(0,a.jsx)(V.A,{model:e.model,width:20,height:20,className:n})}),Oe=({deviceRadios:e,onRemoveDeviceRadio:n})=>{const i=e.slice(0,2),t=e.slice(2);return(0,a.jsxs)(I.A,{marginBottom:x.Ln,gap:x.kc,children:[i.map(e=>(0,a.jsx)(he,{symbol:xe(e.device),label:(0,W.Q)(e.device),onClose:()=>{n([e])}},`${e.device._id}-${e.radio.name}`)),t.length>0?(0,a.jsx)(I.A,{padding:x.YC,flex:"0 0 auto",children:(0,a.jsx)(l.A,{portal:!0,isInteractive:!0,description:(0,a.jsx)(G,{unsupportedDevices:t,actionCaptionId:"COMMON_DESELECT",onAction:()=>n(t)}),children:(0,a.jsxs)(o.A,{size:"medium",children:["+",(0,a.jsx)(g.sA,{id:"DEVICE_PLUS_N_SELECTED",values:{n:t.length}})]})})}):null]})};var me=i(50051),Ce=i(345272),Ne=i(669641),Ie=i(754924);const pe=_.AH`
  display: inline-block;
`,ge=({name:e,options:n,warning:i,...t})=>{const{values:s,errors:l}=(0,r.j7)(),o=t.value||(0,r.O6)(s,e);return(0,a.jsx)(I.A,{flexDirection:"column",width:"100%",children:(0,a.jsx)(Y.A,{label:(0,a.jsx)(ne.A,{name:e,infoId:t.disabled||o!==C.YQ?void 0:"DEVICE_RADIO_CHANNEL_AUTO",warning:i,children:(0,a.jsx)(g.sA,{id:"COMMON_CHANNEL"})}),name:e,type:"dropdown",variant:"secondary",options:n,translateLabel:!0,validated:!0,invalid:(0,r.O6)(l,e),value:o??C.SZ,full:!0,portal:!0,...t})})},ve=e=>{const{setFieldValue:n}=(0,r.j7)(),{name:i}=e;return(0,a.jsx)(ge,{...e,onChange:(e,a)=>{n(i,a)}})};var Re;!function(e){e[e.NONE=0]="NONE",e[e.DFS=1]="DFS",e[e.MESHING=2]="MESHING"}(Re||(Re={}));const je=e=>{const[n,i]=(0,s.useState)(null),[t,l]=(0,s.useState)(Re.NONE),{setFieldValue:o}=(0,r.j7)(),{name:d,radioIdx:c,showMeshingParentWarning:_,showZeroWaitDfsWarning:A,onMeshingRadioChange:u,show6GhzNotAgreedTosWarning:h,...E}=e,x={[Re.NONE]:{title:""},[Re.DFS]:{title:"SET_DFS_CHANNEL_CONFIRM_TITLE",message:A?"SET_DFS_CHANNEL_CONFIRM_ON_ZERO_WAIT_DFS_DEVICE_DESCRIPTION":"SET_DFS_CHANNEL_CONFIRM_DESCRIPTION",messageValues:{link:(0,a.jsx)("a",{href:ee.A.optimizingWirelessConnectivity,target:"_blank",rel:"noopener noreferrer",children:(0,a.jsx)(g.sA,{id:"COMMON_DFS_CHANNELS"})}),appendix:_?(0,a.jsx)(g.sA,{id:"AP_RADIO_CHANNEL_CHANGE_MESHING_WARNING_DESCRIPTION",values:{appendix:""}}):""}},[Re.MESHING]:{title:"AP_RADIO_CHANNEL_CHANGE_WARNING_TITLE",message:"AP_RADIO_CHANNEL_CHANGE_MESHING_WARNING_DESCRIPTION",messageValues:{appendix:(0,a.jsx)(g.sA,{id:"DEVICE_CONFIRM_TO_CONTINUE"})}}}[t];return(0,a.jsx)(Q.A,{titleValues:{channel:n?.value},...x,buttonMessage:"COMMON_ACTION_PROCEED",isOpen:!!n,handleClose:()=>i(null),handleConfirm:()=>{o(d,n?.value)},contentClassName:pe,showHeaderClose:!0,children:(0,a.jsx)(ge,{...E,name:d,onChange:(e,n)=>{e.isDfs?(l(Re.DFS),i(e)):_?(l(Re.MESHING),i(e)):(l(Re.NONE),o(d,n),i(null))}})})},Me=e=>{const[n,i]=(0,s.useState)(null),[t,l]=(0,s.useState)(!1),{setFieldValue:d}=(0,r.j7)(),{name:c,radioIdx:_,showMeshingParentWarning:A,showZeroWaitDfsWarning:u,onMeshingRadioChange:h,show6GhzNotAgreedTosWarning:E,...O}=e;return(0,a.jsx)(Q.A,{title:"DEVICE_ENABLE_6GHZ",body:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.A,{size:"medium",variant:"body-primary",children:(0,a.jsx)(g.sA,{id:"DEVICE_ENABLE_6GHZ_RADIO_CONFIRM_TEXT_BODY",values:{link:(0,a.jsx)(J.A,{href:ee.A.afcArticle,id:"COMMON_LEARN_MORE"}),br:g.br}})}),(0,a.jsx)(q.A,{paddingTop:x.kc,children:(0,a.jsx)(X.A,{id:"tos_agreement",checked:t,onChange:()=>l(!t),children:(0,a.jsx)(o.A,{size:"medium",variant:"body-primary",children:(0,a.jsx)(g.sA,{id:"DEVICE_ENABLE_6GHZ_RADIO_CONFIRM_TOS_AGREE",values:{link:(0,a.jsx)(J.A,{href:ee.A.termsOfServiceUrl,id:"COMMON_TOS"})}})})})})]}),footerActions:[{text:(0,a.jsx)(g.sA,{id:"COMMON_ACTION_ENABLE"}),disabled:!t,variant:"primary",onClick:()=>{d(c,n?.value),d("afc_enabled",!0),d(`radios.${_}.tx_power_mode`,v.PB.AUTO),i(null)}}],isOpen:!!n,handleClose:()=>i(null),contentClassName:pe,showHeaderClose:!0,children:(0,a.jsx)(ge,{...O,name:c,onChange:e=>{i(e)}})})},De=e=>{const[n,i]=(0,s.useState)(null),{setFieldValue:t}=(0,r.j7)(),{name:l}=e;return(0,a.jsx)(Q.A,{title:"AP_RADIO_CHANNEL_CHANGE_WARNING_TITLE",titleValues:{channel:n?.value},message:"AP_RADIO_CHANNEL_CHANGE_WARNING_DESCRIPTION",messageValues:{link:(0,a.jsx)("a",{href:ee.A.optimizingWirelessConnectivity,target:"_blank",rel:"noopener noreferrer",children:(0,a.jsx)(g.sA,{id:"AP_RADIO_MAXIMIZE_CON_AND_PERF"})})},handleClose:()=>i(null),handleConfirm:()=>{t(l,n?.value)},buttonMessage:"COMMON_ACTION_PROCEED",showHeaderClose:!0,isOpen:!!n,contentClassName:pe,children:(0,a.jsx)(ge,{...e,onChange:(e,n)=>{[1,6,11,C.YQ].includes(e.value)?(t(l,n),i(null)):i(e)}})})},Te=({name:e,onMeshingRadioChange:n,...i})=>{const{formatMessage:t}=(0,g.tz)(),[l,o]=(0,s.useState)(null),{setFieldValue:d}=(0,r.j7)();return(0,a.jsx)(Q.A,{title:"AP_CHANNEL_WIDTH_CHANGE_WARNING_TITLE",titleValues:{field:t({id:"COMMON_CHANNEL"}).toLowerCase(),value:l},message:"AP_RADIO_CHANNEL_CHANGE_MESHING_WARNING_DESCRIPTION",messageValues:{appendix:(0,a.jsx)(g.sA,{id:"DEVICE_CONFIRM_TO_CONTINUE"})},buttonMessage:"COMMON_ACTION_PROCEED",isOpen:null!==l,handleClose:()=>o(null),handleConfirm:()=>{d(e,l),n?.({[e]:l})},showHeaderClose:!0,children:(0,a.jsx)(ge,{name:e,...i,onChange:e=>{o(e.value)}})})},fe=({radioType:e,ignoreWarnings:n,showMeshingParentWarning:i,showZeroWaitDfsWarning:t,show6GhzNotAgreedTosWarning:s,...r})=>{if(!n){if(r.options.some(({isDfs:e})=>e))return(0,a.jsx)(je,{showMeshingParentWarning:i,showZeroWaitDfsWarning:t,...r});if(i)return(0,a.jsx)(Te,{...r});if(e===Ce.A.NG.type)return(0,a.jsx)(De,{...r});if(s&&e===v.sx.RADIO_6E)return(0,a.jsx)(Me,{show6GhzNotAgreedTosWarning:s,...r})}return(0,a.jsx)(ve,{...r})},Le=({device:e,...n})=>{const i=(0,t.d4)(Ie.ID),s=(0,Ne.T)(e,i);return(0,a.jsx)(fe,{...n,value:s?.radio?.channel||n.value})},Se=({meshingDevice:e,...n})=>e?(0,a.jsx)(Le,{device:e,...n}):(0,a.jsx)(fe,{...n});var we=i(728064);function Pe(e,n,i){return Object.values(e.reduce((e,i)=>{const{device:a}=i;return n(i).forEach(n=>{const i=n.value,t=e[i];e[i]=t?{...t,supported:[...t.supported||[],a]}:{...n,supported:[a]}}),e},{})).map(n=>{if(!n.supported||n.supported.length===e.length)return n;let t=e;return n.supported?.length>0&&(t=t.filter(({device:e})=>!n.supported?.find(n=>e.mac===n.mac))),t.length?{...n,disabled:!0,message:(0,a.jsx)(G,{unsupportedDevices:t,captionId:"COMMON_UNSUPPORTED_DEVICES",onAction:i}),isInteractive:!0}:n})}const be=({device:e})=>(0,h.lr)(e)?(0,a.jsx)(I.A,{marginBottom:x.Ln,justifyContent:"space-between",alignItems:"center",children:(0,a.jsx)(Y.A,{label:"DEVICE_PROPERTIES_LABEL_AIRTIME_FAIRNESS",name:"atf_enabled",type:"realCheckbox",disabled:(0,M.KKO)(e.model,"atfDisabled"),children:(0,a.jsx)(g.sA,{id:"DEVICE_PROPERTIES_LABEL_AIRTIME_FAIRNESS"})})}):null;var He=i(693839),Fe=i(558948),We=i(816113);const Be=({deviceRadios:e,defaultExpanded:n=!1})=>{const[i,t]=(0,s.useState)(n),[r,l]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{r||t(n)},[n]),(0,a.jsx)(He.A,{label:(0,a.jsx)(g.sA,{id:"DEVICE_KEY_METRICS"}),hasDivider:!1,isExpanded:i,onExpandedChange:()=>{l(!0),t(!i)},children:(0,a.jsx)(I.A,{flexDirection:"column",gap:x.Ln,marginTop:x.Ln,children:e.filter(e=>e.device&&e.radio).map((e,n,i)=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(We.default,{radioTableEntry:e.radio,device:e.device,showDeviceHeader:!0},`${e.device._id}-${e.radio.name}`),n!==i.length-1?(0,a.jsx)(Fe.A,{}):null]}))})})},Ve=["antenna_gain","antenna_id","atf_enabled","afc_enabled"],ye="auto",Ge=(0,c.A)("div",(0,le.A)("marginBottom","marginTop"))`
  margin-bottom: ${({marginBottom:e})=>e||0}px;
  margin-top: ${({marginTop:e})=>e||0}px;

  & > :last-child {
    margin-bottom: 0;
  }
`,$e=_.AH`
  width: 100%;
`,ke=(0,c.A)("div")`
  pointer-events: none;
`,Ue=(0,a.jsxs)(a.Fragment,{children:["(",(0,a.jsx)(g.sA,{id:"COMMON_RADIO_BAND_LOW_BAND"}),")"]}),Xe=(0,a.jsxs)(a.Fragment,{children:["(",(0,a.jsx)(g.sA,{id:"COMMON_RADIO_BAND_HIGH_BAND"}),")"]}),ze=(e,n)=>i=>(0,a.jsx)(l.A,{position:"top",width:200,portal:!0,description:(0,a.jsx)(o.A,{size:"small",color:"inherit",children:(0,a.jsx)(g.sA,{id:e,values:n})}),className:$e,children:(0,a.jsx)(ke,{children:i})}),Ye=(0,c.A)(I.A)`
  div[class*='tooltip-container'] {
    width: 100%;
  }
`,Ze=({Wrapper:e,children:n,showWarning:i,warning:t,warningValues:s,...r})=>(0,a.jsx)(e,{...r,children:(0,a.jsx)(p.A,{condition:i,wrapper:ze(t,s),children:n})});var Ke;!function(e){e[e.DEVICE_AND_RADIO=0]="DEVICE_AND_RADIO",e[e.ONLY_RADIO=1]="ONLY_RADIO"}(Ke||(Ke={}));const Qe=({radioType:e,deviceRadios:n,radioIdx:i,isLastNa:l,radio6gCount:c,hideTitle:_,showDeviceList:p,onRemoveDeviceRadio:f=u.P1,onSelectMeshingParents:H,mode:F,ignoreMeshingWarnings:W,showZeroWaitDfsWarning:B,showKeyRadioMetrics:V,defaultKeyRadioMetricsExpanded:y})=>{const{formatMessage:G}=(0,g.tz)(),{values:$,setFieldValue:U}=(0,r.j7)(),X=(0,t.d4)(L.H),{outdoor_mode_enabled:z}=(0,t.d4)(R.$5),Y=(0,t.d4)(R.ZZ),Z=(0,t.d4)(j.EH),K=(0,t.wA)();(0,s.useEffect)(()=>{K((0,S.v)(void 0,{crudCacheStrategy:{type:w.e.CACHE}}))},[K]);const Q=n.length>1,q=$.radios[i],J=n.filter(({device:e})=>(0,M.YdF)(e)||(0,M.CB0)(e)),ee=n.filter(({device:e})=>(0,M.KKO)(e.model,"outdoorModeSupport")),ne=n.filter(({device:e})=>(0,h.X5)(e,Y)).length===n.length,ie=0===ee.length,ae=J.length>0,te=J.length===n.length,re=n.every(({device:e})=>(0,M.CB0)(e)),le=J.length?(0,a.jsx)(k,{unsupportedDevices:J,onAction:f}):null,oe=ae&&!re,de=F===Ke.DEVICE_AND_RADIO,ce=(0,s.useCallback)(e=>{const n=de?$:e;return n?.outdoor_mode_override===T.Gi.ON},[de,$]),ue=(0,s.useMemo)(()=>Pe(n,({device:e,radio:n})=>(0,D.Gi)(e,n,X,ce(e),G),f),[X,n,G,ce,f]),he=n.every(({device:n})=>(0,P.k)(n,e)),Ee=(0,s.useMemo)(()=>e===E.A&&!ae&&n.some(({device:n})=>n?.downlink_table?.some(n=>n.radio===e)),[n,ae,e]),xe=n.filter(({device:e,radio:n})=>(0,A.k_)(e,n.radio)),Ce=xe.length===n.length,Ne=xe.length>0&&!Ce,Ie=Ne?(0,a.jsx)(k,{unsupportedDevices:xe,actionCaptionId:"DEVICE_SELECT_UPLINK_RADIO",onAction:H,children:(0,a.jsx)(g.sA,{id:"DEVICE_MESHED_CHILDREN_WARNING"})}):null,pe=ue.reduce((e,{value:i})=>{const a=Pe(n,({device:e,radio:n})=>(0,A.r1)({countryChannels:X,formatMessage:G,deviceData:{model:e.model,radio_table:e.radio_table,type:e.type,outdoor_mode_override:ce(e)?T.Gi.ON:T.Gi.OFF,supported_afc_regions:e.supported_afc_regions},radioData:{radio:n.radio,name:n.name,ht:i},options:{isOutdoorModeEnabled:z,isProfessionalInstaller:Z}}),f);return{...e,[i]:a.sort((e,n)=>e.value-n.value)}},{}),ge=n.filter(({device:e})=>(0,M.SDT)({model:e.model})).length===n.length,ve=n.filter(({device:e})=>(0,M.aFj)({model:e.model})).length===n.length,Re=(0,s.useMemo)(()=>ge&&e===v.sx.RADIO_6E&&c&&c>1&&1===i?Ue:ge&&e===v.sx.RADIO_6E&&c&&c>1&&2===i?Xe:ve&&e===v.sx.RADIO_NA&&1===i?Ue:ve&&e===v.sx.RADIO_NA&&2===i?Xe:void 0,[ge,ve,e,c,i]),je=(0,s.useCallback)((e,n)=>void 0===q?.channel||n===ye||(pe?.[e]||[]).some(({value:e})=>e===n),[q?.channel,pe]),Me=(e,n)=>n===ye||(pe?.[e]||[]).some(({value:e})=>e===n),De=[{value:ye,label:G({id:"COMMON_VALUE_AUTO"})},...Object.values(pe).flat().filter((e,n,i)=>n===i.findIndex(n=>n.value===e.value))],Te=De.map(n=>{return{...n,...q?.ht&&(i=q.ht,t=n.value,s=n.label,t!==ye&&e===v.sx.RADIO_NA&&C.mO.includes(i)&&!s.includes(G({id:"COMMON_DEVICE_RADIO_CHANNEL_DFS"})))?{label:`${n.label} (${G({id:"COMMON_DEVICE_RADIO_CHANNEL_DFS"})})`,isDfs:!0}:{},...!q?.ht||Me(q?.ht,n.value)?{}:{disabled:!0,message:(0,a.jsx)(g.sA,{id:"DEVICE_RADIO_CHANNEL_NOT_SUPPORTED",values:{width:q?.ht}})}};var i,t,s}),fe=Ce&&!W,Le=(0,r.O6)($,`radios.${i}.channel`),He=De.find(({value:e})=>e===Le)?.isDfs,Fe=(0,s.useCallback)(e=>{fe||je(e.value,Le)||U(`radios.${i}.channel`,void 0)},[fe,je,Le,U,i]);return q&&n.length?0===ue.length?(0,a.jsx)(b.A,{radioType:e,radioSuffix:Re}):(0,a.jsxs)(Ge,{children:[_?null:(0,a.jsx)(o.A,{size:"medium",style:{marginBottom:x.kc},children:(0,a.jsx)(O.A,{radio:e,suffix:Re})}),p?(0,a.jsx)(Oe,{deviceRadios:n,onRemoveDeviceRadio:f}):null,he?null:(0,a.jsxs)(I.A,{marginBottom:x.Ln,gap:x.Ln,children:[(0,a.jsx)(Ze,{Wrapper:I.A,showWarning:fe,warning:"DEVICE_MESHED_RADIO_CHANNEL_WIDTH_DISABLED_TOOLTIP",warningValues:{radio:(0,a.jsx)(g.sA,{id:(0,A.dI)(e)})},flex:1,children:(0,a.jsx)(me.A,{name:`radios.${i}.ht`,radioType:e,options:ue.map(n=>{return{...n,...je(n.value,q?.channel)?{}:{disabled:!0,message:(0,a.jsx)(g.sA,{id:"DEVICE_RADIO_CHANNEL_WIDTH_NOT_SUPPORTED",values:{channel:q?.channel}})},disabled:(i=n.value,e===v.sx.RADIO_6E&&void 0!==i&&0===pe?.[i]?.length)};var i}),disabled:fe,showMeshingParentWarning:Ee,meshingDevice:1===xe.length?xe[0]?.device:void 0,warning:Ne?Ie:null,onDfs:He,onChangeCallback:Fe})}),(0,a.jsx)(Ze,{Wrapper:Ye,showWarning:fe,warning:"DEVICE_MESHED_RADIO_CHANNEL_DISABLED_TOOLTIP",warningValues:{radio:(0,a.jsx)(g.sA,{id:(0,A.dI)(e)})},width:116,children:(0,a.jsx)(Se,{name:`radios.${i}.channel`,options:fe?De:Te,radioType:e,radioIdx:i,renderOption:N.n,disabled:fe,ignoreWarnings:oe,showMeshingParentWarning:Ee,meshingDevice:1===xe.length?xe[0]?.device:void 0,showZeroWaitDfsWarning:B,warning:Ne?Ie:null,show6GhzNotAgreedTosWarning:ne&&!$?.afc_enabled&&q?.tx_power_mode===v.PB.DISABLED&&!ie})})]}),Ce&&H?(0,a.jsxs)(I.A,{marginBottom:x.Ln,gap:x.kc,flexDirection:"column",children:[(0,a.jsx)(o.A,{size:"small",color:"text-3",children:(0,a.jsx)(g.sA,{id:"DEVICE_MESHED_CHANNEL_HT_CONTROLLED"})}),(0,a.jsx)(d.A,{variant:"secondary-emphasis",width:"full",onClick:H,children:(0,a.jsx)(g.sA,{id:F===Ke.ONLY_RADIO?"DEVICE_MESHING_SELECT_UPLINK":"DEVICE_MESHING_EDIT_UPLINK"})})]}):null,te?null:(0,a.jsx)(se,{radioType:e,radioIdx:i,deviceRadios:n,warning:ae&&le,hasWirelessConnection:Ce||Ne||Ee,isAfcSupportedDevice:ne,isOutdoorSupportedDevice:!ie}),F!==Ke.DEVICE_AND_RADIO||ae?null:(0,a.jsx)(we.A,{radioIdx:i,deviceRadio:n[0]}),!Q&&e===v.sx.RADIO_6E&&ne&&1===c&&ie?(0,a.jsx)(m.A,{}):null,te?null:(0,a.jsx)(_e,{radioIdx:i,warning:ae&&le}),!te&&q.min_rssi_enabled?(0,a.jsx)(Ae,{radioIdx:i,deviceRadios:n,onRemoveDeviceRadio:f}):null,!Q&&l?(0,a.jsx)(be,{device:n[0].device}):null,V?(0,a.jsx)(Be,{deviceRadios:n,defaultExpanded:y}):null]}):null},qe=({device:e,radio:n,...i})=>{const{values:{radios:t}}=(0,r.j7)(),s=t.findIndex(e=>e.type===n.radio&&e.name===n.name);return t[s]?(0,a.jsx)(Qe,{radioType:n.radio,deviceRadios:[{device:e,radio:n}],radioIdx:s,showZeroWaitDfsWarning:(0,h.CW)(e,f.A.DFS_BACKGROUND_SCAN),...i}):null}},787677(e,n,i){i.d(n,{A:()=>p});var a=i(274934),t=i(977872),s=i(125799),r=i(938984),l=i(853777),o=i(309130),d=i(241365),c=i(537519),_=i(438812),A=i(79255),u=i(247816);(0,u.A)(A.A)`
  color: ${({theme:{motifPalette:{aqua08:e}}})=>e};
`,(0,u.A)(_.A)`
  color: ${({theme:{motifPalette:{aqua07:e}}})=>e};
`;const h=(0,u.A)(c.A)`
  color: ${d.Ay["purple-1"]};
`;var E=i(793442),x=i(100978),O=i(470070),m=i(561614),C=i(291935),N=i(726831);const I={[m.sx.RADIO_NA]:{message:"DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS_SUBSECTION_NA"},[m.sx.RADIO_6E]:{message:"DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS_SUBSECTION_6E",tooltip:"DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS_SUBSECTION_6E_TOOLTIP",link:N.A.wifi6GHzRegions}},p=({radioType:e,radioSuffix:n})=>{const i=(0,t.d4)(C._B),{message:d,tooltip:c,link:_}=I[e]||{};return(0,a.jsxs)(x.A,{justifyContent:"space-between",children:[(0,a.jsxs)(x.A,{gap:o.YC,opacity:.5,alignItems:"center",children:[(0,a.jsx)(h,{height:"20",width:"20"}),(0,a.jsx)(r.A,{weight:"bold",size:"small",children:d?(0,a.jsx)(O.sA,{id:d,values:{suffix:n?(0,a.jsxs)(a.Fragment,{children:[" ",n]}):""}}):null})]}),(0,a.jsxs)(x.A,{gap:o.YC,alignItems:"center",children:[(0,a.jsx)(r.A,{size:"small",children:(0,a.jsx)(O.sA,{id:"COMMON_PROHIBITED_IN_COUNTRY",values:{country:i}})}),c?(0,a.jsx)(s.A,{portal:!0,isInteractive:!0,description:(0,a.jsxs)(r.A,{children:[(0,a.jsx)(O.sA,{id:c})," ",_?(0,a.jsx)(E.A,{href:_,id:"COMMON_LEARN_MORE",noWrap:!0}):null]}),children:(0,a.jsx)(l.A,{isActive:!0,size:"original"})}):null]})]})}},250820(e,n,i){i.d(n,{m:()=>c});var a=i(274934),t=i(950804),s=i(470070),r=i(483064),l=i(561614),o=i(98334);const d=(e,n,i)=>n?.filter(n=>n.radio===e).map(e=>+e[i]),c=(e,n)=>{const i=Object.values(l.sx).reduce((n,i)=>(n[i]={min_txpower:d(i,e,"min_txpower")?.sort((e,n)=>n-e)?.[0],max_txpower:d(i,e,"max_txpower")?.sort((e,n)=>e-n)?.[0]},n),{}),c=e=>{const n=i[e]||{};return[`txPowerLimit${e}`,(0,a.jsx)(s.sA,{id:"COMMON_VALIDATION_HINT_RANGE",values:{min:n.min_txpower,max:n.max_txpower}}),function(i){return this.parent?.type!==e||i===r.Q||((e,n,i)=>(void 0===i.min_txpower||n>=i.min_txpower)&&(void 0===i.max_txpower||n<=i.max_txpower))(0,i,n)}]};return{radios:t.A.array().of(t.A.object().shape({tx_power_mode:t.A.string(),tx_power:t.A.mixed(e=>"number"==typeof e||e===r.Q).nullable().when(["tx_power_mode"],{is:e=>e===l.PB.CUSTOM,then:t.A.number().integer().nullable().label("COMMON_TRANSMIT_POWER").test(...c(l.sx.RADIO_NG)).test(...c(l.sx.RADIO_NA)).test(...c(l.sx.RADIO_6E))}),antenna_gain:t.A.number().nullable().default(null).label("COMMON_ANTENNA_GAIN").minOrEmpty(o.x8).max(o.Pe),channel:n?t.A.string().nullable():t.A.string().required((0,a.jsx)(s.sA,{id:"COMMON_VALIDATION_REQUIRED",values:{name:(0,a.jsx)(s.sA,{id:"COMMON_CHANNEL"})}}))}))}}},761801(e,n,i){i.d(n,{A:()=>r});var a=i(274934),t=i(470070),s=i(581883);const r=({radio:e,suffix:n})=>s.U[e]?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.sA,{id:s.U[e]}),n?(0,a.jsxs)("span",{children:[" ",n]}):null]}):(0,a.jsx)(t.sA,{id:"COMMON_FALLBACK"})},142667(e,n,i){i.d(n,{A:()=>m});var a=i(274934),t=i(618965),s=i(844993),r=i(247816),l=i(100978),o=i(291508);const d=(0,r.A)(l.A,(0,o.A)("innerColor","outerColor"))`
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
  g {
    transition: unset;
  }
  circle {
    &:first-child {
      ${({outerColor:e})=>e?`fill: ${e};`:""}
    }
    &:last-child {
      ${({innerColor:e})=>e?`fill: ${e};`:""}
      r: 4.5;
    }
  }
`,c=i(409844).AH`
  overflow: visible;
`,_=({chartWidth:e,chartHeight:n,top:i,left:t,innerColor:r,outerColor:l="#fff"})=>(0,a.jsx)(d,{innerColor:r,outerColor:l,children:(0,a.jsx)("svg",{width:e,height:n,className:c,children:t&&i?(0,a.jsx)(s.A,{hasAnimation:!1,x:t,y:i}):null})});var A=i(814557);const u=(0,r.A)(l.A,(0,o.A)("topA","topB","leftA","leftB","chartHeight","useFullHeightConnector"))`
  z-index: 1;
  border-left: 1px dashed
    ${({theme:{themeName:e}})=>A.Ay[`desktop-color-neutral-10-${e}`]};
  position: absolute;
  ${({topA:e,topB:n,leftA:i,leftB:a,chartHeight:t,useFullHeightConnector:s})=>`\n     top: ${s&&t?20:Math.min(e||0,n)}px;\n     height: ${s&&t?t-50:Math.max(e||0,n)-Math.min(e||0,n)}px;\n     left: ${((i||0)+a)/2-1}px;\n   `}
`,h=({topA:e,leftA:n,topB:i,leftB:t,chartHeight:s,useFullHeightConnector:r})=>(0,a.jsx)(u,{topA:e,topB:i,leftA:n,leftB:t,chartHeight:s,useFullHeightConnector:r}),E=(e,n,i)=>i?(e||0)+((e||0)<Math.round(n/2)?8:-8):(e||0)-8,x=(e,n)=>((e||0)+(n||0))/(n?2:1),O=(e,n,i,a)=>({maxWidth:"auto",...!a?.position&&i&&e&&n&&{position:e<Math.round(n/2)?"right":"left"},portal:!0,...a}),m=({width:e,topA:n,leftA:i,topB:s,leftB:r,chartWidth:l,chartHeight:o,hidden:d,description:c,innerColor:A,tooltipRenderCondition:u,tooltipProps:m={},useSideSwapping:C=!0,useFullHeightConnector:N=!1})=>d?null:(0,a.jsxs)(a.Fragment,{children:[u?(0,a.jsx)(t.A,{width:e,left:E(i,l,C),top:x(n,s),description:c,hidden:d,topMargin:4,tooltipProps:O(i,l,C,m)}):null,r&&s?(0,a.jsx)(h,{topA:n,topB:s,leftA:i,leftB:r,chartHeight:o,useFullHeightConnector:N}):null,(0,a.jsx)(_,{chartWidth:l,chartHeight:o,top:n,left:i,innerColor:A})]})},638990(e,n,i){var a;i.d(n,{Z:()=>a}),function(e){e.AIRVIEW="AIRVIEW"}(a||(a={}))},201829(e,n,i){i.d(n,{w:()=>a});const a=12},239875(e,n,i){i.d(n,{A:()=>s});var a=i(602086);function t(e,n,i){return e[n]?e[n][0]?e[n][0][i]:e[n][i]:"contentBoxSize"===n?e.contentRect["inlineSize"===i?"width":"height"]:void 0}const s=function(e={}){const n=e.onResize,i=(0,a.useRef)(void 0);i.current=n;const s=e.round||Math.round,r=(0,a.useRef)(void 0),[l,o]=(0,a.useState)({width:void 0,height:void 0}),d=(0,a.useRef)(!1);(0,a.useEffect)(()=>(d.current=!1,()=>{d.current=!0}),[]);const c=(0,a.useRef)({width:void 0,height:void 0}),_=function(e,n){const i=(0,a.useRef)(null),t=(0,a.useRef)(null);t.current=n;const s=(0,a.useRef)(null),r=(0,a.useCallback)(()=>{const n=t.current,a=s.current||(n?n instanceof Element?n:n.current:null);i.current&&i.current.element===a&&i.current.subscriber===e||(i.current&&i.current.cleanup&&i.current.cleanup(),i.current={element:a,subscriber:e,cleanup:a?e(a):void 0})},[e]);return(0,a.useEffect)(()=>{r()},[r]),(0,a.useEffect)(()=>()=>{i.current&&i.current.cleanup&&(i.current.cleanup(),i.current=null)},[]),(0,a.useCallback)(e=>{s.current=e,r()},[r])}((0,a.useCallback)(n=>(r.current&&r.current.box===e.box&&r.current.round===s||(r.current={box:e.box,round:s,instance:new ResizeObserver(n=>{const a=n[0],r="border-box"===e.box?"borderBoxSize":"device-pixel-content-box"===e.box?"devicePixelContentBoxSize":"contentBoxSize",l=t(a,r,"inlineSize"),_=t(a,r,"blockSize"),A=l?s(l):void 0,u=_?s(_):void 0;if(c.current.width!==A||c.current.height!==u){const e={width:A,height:u};c.current.width=A,c.current.height=u,i.current?i.current(e):d.current||o(e)}})}),r.current.instance.observe(n,{box:e.box}),()=>{r.current&&r.current.instance.unobserve(n)}),[e.box,s]),e.ref);return(0,a.useMemo)(()=>({ref:_,width:l.width,height:l.height}),[_,l.width,l.height])}},735239(e,n,i){var a;i.d(n,{t:()=>a}),function(e){e.NONE="none",e.HEALTHY="healthy",e.WARNING="warning"}(a||(a={}))},950486(e,n,i){i.d(n,{T:()=>t});var a=i(735239);const t=(e=0,n=0)=>n>=80&&e>=30?a.t.WARNING:n>=50&&e>=15?a.t.HEALTHY:a.t.NONE},927027(e,n,i){i.d(n,{Y:()=>t,v:()=>s});var a=i(752572);const t=(e,n,i=!1)=>{const t=n-1;let s=Math.ceil(e);if(Number.isNaN(s))return[];const r=s%t;return 0!==r&&(s+=t-r),(0,a.A)(n,e=>{return{value:n=e?Math.ceil(e*(s/t)):0,label:i?e%2==0&&String(n)||null:String(n)};var n}).reverse()},s=(e,n)=>{const[i]=e,a=[i],t=e.length-1;for(let i=1;i<n-1;i+=1){const s=i*t/(n-1),r=Math.floor(s).toFixed();a[i]=Math.round(e[r]+(e[Math.ceil(s).toFixed()]-e[r])*(+s-+r))}return a[n-1]=e[t],a}}}]);