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

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

  & > :last-child {
    margin-bottom: 0;
  }
`,Je=_.AH`
  width: 100%;
`,en=(0,c.A)("div")`
  pointer-events: none;
`,nn=(0,t.jsxs)(t.Fragment,{children:["(",(0,t.jsx)(v.sA,{id:"COMMON_RADIO_BAND_LOW_BAND"}),")"]}),tn=(0,t.jsxs)(t.Fragment,{children:["(",(0,t.jsx)(v.sA,{id:"COMMON_RADIO_BAND_HIGH_BAND"}),")"]}),an=(e,n)=>i=>(0,t.jsx)(o.A,{position:"top",width:200,portal:!0,description:(0,t.jsx)(l.A,{size:"small",color:"inherit",children:(0,t.jsx)(v.sA,{id:e,values:n})}),className:Je,isInteractive:!0,children:(0,t.jsx)(en,{children:i})}),sn=(0,c.A)(I.A)`
  div[class*='tooltip-container'] {
    width: 100%;
  }
`,rn=({Wrapper:e,children:n,showWarning:i,warning:a,warningValues:s,...r})=>(0,t.jsx)(e,{...r,children:(0,t.jsx)(g.A,{condition:i,wrapper:an(a,s),children:n})});var on;!function(e){e[e.DEVICE_AND_RADIO=0]="DEVICE_AND_RADIO",e[e.ONLY_RADIO=1]="ONLY_RADIO"}(on||(on={}));const ln=({radioType:e,deviceRadios:n,radioIdx:i,isLastNa:o,radio6gCount:c,hideTitle:_,showDeviceList:g,onRemoveDeviceRadio:S=h.P1,onSelectMeshingParents:V,mode:y,ignoreMeshingWarnings:G,showZeroWaitDfsWarning:k,showKeyRadioMetrics:$,defaultKeyRadioMetricsExpanded:U})=>{const{formatMessage:X}=(0,v.tz)(),{values:z,setFieldValue:Z}=(0,r.j7)(),K=(0,a.d4)(w.H),{outdoor_mode_enabled:Q}=(0,a.d4)(R.$5),q=(0,a.d4)(R.ZZ),J=(0,a.d4)(M.EH),ee=(0,a.d4)((0,s.useMemo)(()=>e===j.sx.RADIO_NG?ze:()=>Qe,[e])),ne=(0,a.wA)();(0,s.useEffect)(()=>{ne((0,b.v)(void 0,{crudCacheStrategy:{type:P.e.CACHE}}))},[ne]);const ie=n.length>1,te=z.radios[i],ae=n.filter(({device:e})=>(0,T.YdF)(e)||(0,T.CB0)(e)),se=n.filter(({device:e})=>(0,T.KKO)(e.model,"outdoorModeSupport")),re=n.filter(({device:e})=>(0,E.X5)(e,q)).length===n.length,oe=0===se.length,le=ae.length>0,ce=ae.length===n.length,_e=n.every(({device:e})=>(0,T.CB0)(e)),Ae=ae.length?(0,t.jsx)(Y,{unsupportedDevices:ae,onAction:S}):null,ue=le&&!_e,he=y===on.DEVICE_AND_RADIO,Oe=(0,s.useCallback)(e=>{const n=he?z:e;return n?.outdoor_mode_override===L.Gi.ON},[he,z]),me=(0,s.useMemo)(()=>Be(n,({device:e,radio:n})=>(0,f.Gi)(e,n,K,Oe(e),X),S),[K,n,X,Oe,S]),Ce=n.every(({device:n})=>(0,B.k)(n,e)),pe=(0,s.useMemo)(()=>x.h.includes(e)&&n.some(({device:n})=>(0,D.T)(n).some(n=>n.radio===e&&"is_mlo"in n&&n?.is_mlo&&"mlo"in n&&n.mlo&&n.mlo.num_links>0))&&!le,[n,e,le]),ge=(0,s.useMemo)(()=>e===x.A&&!le&&n.some(({device:n})=>(0,D.T)(n).some(n=>n.radio===e))||pe,[n,le,pe,e]),ve=n.filter(({device:e,radio:n})=>(0,u.k_)(e,n.radio)),je=ve.length===n.length,Re=ve.length>0&&!je,Me=Re?(0,t.jsx)(Y,{unsupportedDevices:ve,actionCaptionId:"DEVICE_SELECT_UPLINK_RADIO",onAction:V,children:(0,t.jsx)(v.sA,{id:"DEVICE_MESHED_CHILDREN_WARNING"})}):null,De=me.reduce((e,{value:i})=>{const t=Be(n,({device:e,radio:n})=>(0,u.r1)({countryChannels:K,formatMessage:X,deviceData:{model:e.model,radio_table:e.radio_table,type:e.type,outdoor_mode_override:Oe(e)?L.Gi.ON:L.Gi.OFF,supported_afc_regions:e.supported_afc_regions},radioData:{radio:n.radio,name:n.name,ht:i},options:{isOutdoorModeEnabled:Q,isProfessionalInstaller:J}}),S);return{...e,[i]:t.sort((e,n)=>e.value-n.value)}},{}),Te=n.filter(({device:e})=>(0,T.SDT)({model:e.model})).length===n.length,fe=n.filter(({device:e})=>(0,T.aFj)({model:e.model})).length===n.length,Le=(0,s.useMemo)(()=>Te&&e===j.sx.RADIO_6E&&c&&c>1&&1===i?nn:Te&&e===j.sx.RADIO_6E&&c&&c>1&&2===i?tn:fe&&e===j.sx.RADIO_NA&&1===i?nn:fe&&e===j.sx.RADIO_NA&&2===i?tn:void 0,[Te,fe,e,c,i]),Se=(0,s.useCallback)((e,n)=>void 0===te?.channel||n===Ke||(De?.[e]||[]).some(({value:e})=>e===n),[te?.channel,De]),we=(e,n)=>n===Ke||(De?.[e]||[]).some(({value:e})=>e===n),be=[{value:Ke,label:X({id:"COMMON_VALUE_AUTO"})},...Object.values(De).flat().filter((e,n,i)=>n===i.findIndex(n=>n.value===e.value))],Pe=be.map(n=>{return{...n,...te?.ht&&(i=te.ht,a=n.value,s=n.label,a!==Ke&&e===j.sx.RADIO_NA&&p.mO.includes(i)&&!s.includes(X({id:"COMMON_DEVICE_RADIO_CHANNEL_DFS"})))?{label:`${n.label} (${X({id:"COMMON_DEVICE_RADIO_CHANNEL_DFS"})})`,isDfs:!0}:{},...!te?.ht||we(te?.ht,n.value)?{}:{disabled:!0,message:(0,t.jsx)(v.sA,{id:"DEVICE_RADIO_CHANNEL_NOT_SUPPORTED",values:{width:te?.ht}})}};var i,a,s}),Ve=(0,s.useMemo)(()=>{if(e!==j.sx.RADIO_NG)return;const i=n.find(({device:e})=>ee.has(e.mac))?.device;return i?ee.get(i?.mac):void 0},[ee,n,e]),ye=je&&!G,Ge=(0,r.O6)(z,`radios.${i}.channel`),$e=be.find(({value:e})=>e===Ge)?.isDfs,Ue=(0,s.useCallback)(e=>{ye||Se(e.value,Ge)||Z(`radios.${i}.channel`,void 0)},[ye,Se,Ge,Z,i]);return te&&n.length?0===me.length?(0,t.jsx)(W.A,{radioType:e,radioSuffix:Le}):(0,t.jsxs)(qe,{children:[_?null:(0,t.jsx)(l.A,{size:"medium",style:{marginBottom:O.kc},children:(0,t.jsx)(m.A,{radio:e,suffix:Le})}),g?(0,t.jsx)(Ne,{deviceRadios:n,onRemoveDeviceRadio:S}):null,Ce?null:(0,t.jsxs)(I.A,{marginBottom:O.Ln,gap:O.Ln,children:[(0,t.jsx)(rn,{Wrapper:I.A,showWarning:ye,warning:"DEVICE_MESHED_RADIO_CHANNEL_WIDTH_DISABLED_TOOLTIP",warningValues:{radio:(0,t.jsx)(v.sA,{id:(0,u.dI)(e)})},flex:1,children:(0,t.jsx)(Ie.A,{name:`radios.${i}.ht`,radioType:e,options:me.map(n=>{return{...n,...Se(n.value,te?.channel)?{}:{disabled:!0,message:(0,t.jsx)(v.sA,{id:"DEVICE_RADIO_CHANNEL_WIDTH_NOT_SUPPORTED",values:{channel:te?.channel}})},disabled:(i=n.value,e===j.sx.RADIO_6E&&void 0!==i&&0===De?.[i]?.length)};var i}),disabled:ye,showMeshingParentWarning:ge,meshingDevice:1===ve.length?ve[0]?.device:void 0,warning:Re?Me:null,onDfs:$e,onChangeCallback:Ue})}),(0,t.jsx)(rn,{Wrapper:sn,showWarning:ye||Boolean(Ve),warning:ye?"DEVICE_MESHED_RADIO_CHANNEL_DISABLED_TOOLTIP":"DEVICE_CHANNEL_LOCKED_TOOLTIP",warningValues:{radio:(0,t.jsx)(v.sA,{id:(0,u.dI)(e)}),channel:Ge,settings:Ve?(0,t.jsx)(A.A,{onPress:()=>{ne((0,F.XP)({type:H.H.WIFI,id:Ve,customData:{scrollIntoViewId:Ye.q,block:"center"}}))},children:(0,t.jsx)(v.sA,{id:"COMMON_LINK_WIFI_SETTINGS"})}):null},width:116,children:(0,t.jsx)(He,{name:`radios.${i}.channel`,options:ye||Ve?be:Pe,radioType:e,radioIdx:i,renderOption:N.n,disabled:ye||Boolean(Ve),ignoreWarnings:ue,showMeshingParentWarning:ge,meshingDevice:1===ve.length?ve[0]?.device:void 0,showZeroWaitDfsWarning:k,warning:Re?Me:null,show6GhzNotAgreedTosWarning:re&&!z?.afc_enabled&&te?.tx_power_mode===j.PB.DISABLED&&!oe})})]}),je&&V?(0,t.jsxs)(I.A,{marginBottom:O.Ln,gap:O.kc,flexDirection:"column",children:[(0,t.jsx)(l.A,{size:"small",color:"text-3",children:(0,t.jsx)(v.sA,{id:"DEVICE_MESHED_CHANNEL_HT_CONTROLLED"})}),(0,t.jsx)(d.A,{variant:"secondary-emphasis",width:"full",onClick:V,children:(0,t.jsx)(v.sA,{id:y===on.ONLY_RADIO?"DEVICE_MESHING_SELECT_UPLINK":"DEVICE_MESHING_EDIT_UPLINK"})})]}):null,ce?null:(0,t.jsx)(de,{radioType:e,radioIdx:i,deviceRadios:n,warning:le&&Ae,hasWirelessConnection:je||Re||ge,isAfcSupportedDevice:re,isOutdoorSupportedDevice:!oe}),y!==on.DEVICE_AND_RADIO||le?null:(0,t.jsx)(Fe.A,{radioIdx:i,deviceRadio:n[0]}),!ie&&e===j.sx.RADIO_6E&&re&&1===c&&oe?(0,t.jsx)(C.A,{}):null,ce?null:(0,t.jsx)(Ee,{radioIdx:i,warning:le&&Ae}),!ce&&te.min_rssi_enabled?(0,t.jsx)(xe,{radioIdx:i,deviceRadios:n,onRemoveDeviceRadio:S}):null,!ie&&o?(0,t.jsx)(We,{device:n[0].device}):null,$?(0,t.jsx)(ke,{deviceRadios:n,defaultExpanded:U}):null]}):null},dn=({device:e,radio:n,...i})=>{const{values:{radios:a}}=(0,r.j7)(),s=a.findIndex(e=>e.type===n.radio&&e.name===n.name);return a[s]?(0,t.jsx)(ln,{radioType:n.radio,deviceRadios:[{device:e,radio:n}],radioIdx:s,showZeroWaitDfsWarning:(0,E.CW)(e,S.A.DFS_BACKGROUND_SCAN),...i}):null}},787677(e,n,i){i.d(n,{A:()=>I});var t=i(274934),a=i(977872),s=i(548941),r=i(179102),o=i(247368),l=i(309130),d=i(751271),c=i(361064),_=i(580569),A=i(518240),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),p=i(726831);const N={[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:p.A.wifi6GHzRegions}},I=({radioType:e,radioSuffix:n})=>{const i=(0,a.d4)(C._B),{message:d,tooltip:c,link:_}=N[e]||{};return(0,t.jsxs)(x.A,{justifyContent:"space-between",children:[(0,t.jsxs)(x.A,{gap:l.YC,opacity:.5,alignItems:"center",children:[(0,t.jsx)(h,{height:"20",width:"20"}),(0,t.jsx)(r.A,{weight:"bold",size:"small",children:d?(0,t.jsx)(O.sA,{id:d,values:{suffix:n?(0,t.jsxs)(t.Fragment,{children:[" ",n]}):""}}):null})]}),(0,t.jsxs)(x.A,{gap:l.YC,alignItems:"center",children:[(0,t.jsx)(r.A,{size:"small",children:(0,t.jsx)(O.sA,{id:"COMMON_PROHIBITED_IN_COUNTRY",values:{country:i}})}),c?(0,t.jsx)(s.A,{portal:!0,isInteractive:!0,description:(0,t.jsxs)(r.A,{children:[(0,t.jsx)(O.sA,{id:c})," ",_?(0,t.jsx)(E.A,{href:_,id:"COMMON_LEARN_MORE",noWrap:!0}):null]}),children:(0,t.jsx)(o.A,{isActive:!0,size:"original"})}):null]})]})}},250820(e,n,i){i.d(n,{m:()=>c});var t=i(274934),a=i(950804),s=i(470070),r=i(483064),o=i(561614),l=i(98334);const d=(e,n,i)=>n?.filter(n=>n.radio===e).map(e=>+e[i]),c=(e,n)=>{const i=Object.values(o.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,t.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:a.A.array().of(a.A.object().shape({tx_power_mode:a.A.string(),tx_power:a.A.mixed(e=>"number"==typeof e||e===r.Q).nullable().when(["tx_power_mode"],{is:e=>e===o.PB.CUSTOM,then:a.A.number().integer().nullable().label("COMMON_TRANSMIT_POWER").test(...c(o.sx.RADIO_NG)).test(...c(o.sx.RADIO_NA)).test(...c(o.sx.RADIO_6E))}),antenna_gain:a.A.number().nullable().default(null).label("COMMON_ANTENNA_GAIN").minOrEmpty(l.x8).max(l.Pe),channel:n?a.A.string().nullable():a.A.string().required((0,t.jsx)(s.sA,{id:"COMMON_VALIDATION_REQUIRED",values:{name:(0,t.jsx)(s.sA,{id:"COMMON_CHANNEL"})}}))}))}}},247593(e,n,i){i.d(n,{A:()=>A,q:()=>_});var t=i(274934),a=i(42220),s=i(625133),r=i(796091),o=i(470070),l=i(904614),d=i(846294),c=i(258325);const _="lock-2ghz-to-channel-6-field",A=({form:e})=>{const n=(0,a.FH)({control:e.control,name:"wlan_bands"}),i=(0,a.FH)({control:e.control,name:"iot_channel_lock"});return(0,t.jsx)(d.A,{reason:n.includes(l._$.NG)||i?void 0:(0,t.jsx)(o.sA,{id:"SETTINGS_IOT_CHANNEL_LOCK_DISABLED_REASON"}),children:(0,t.jsx)(r.A,{children:(0,t.jsxs)(s.A,{control:e.control,name:"iot_channel_lock",tooltip:(0,t.jsx)(o.sA,{id:"SETTINGS_IOT_CHANNEL_LOCK_DESC"}),children:[(0,t.jsx)("span",{ref:(0,c.A)(_)}),(0,t.jsx)(o.sA,{id:"SETTINGS_IOT_CHANNEL_LOCK"})]})})})}},761801(e,n,i){i.d(n,{A:()=>r});var t=i(274934),a=i(470070),s=i(581883);const r=({radio:e,suffix:n})=>s.U[e]?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.sA,{id:s.U[e]}),n?(0,t.jsxs)("span",{children:[" ",n]}):null]}):(0,t.jsx)(a.sA,{id:"COMMON_FALLBACK"})},808601(e,n,i){i.d(n,{A:()=>C});var t=i(274934),a=i(761047),s=i(141651),r=i(247816),o=i(100978),l=i(291508);const d=(0,r.A)(o.A,(0,l.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:a,innerColor:r,outerColor:o="#fff"})=>(0,t.jsx)(d,{innerColor:r,outerColor:o,children:(0,t.jsx)("svg",{width:e,height:n,className:c,children:a&&i?(0,t.jsx)(s.A,{hasAnimation:!1,x:a,y:i}):null})});var A=i(505817);const u=[20,10,30,50],h=(0,r.A)(o.A,(0,l.A)("topA","topB","leftA","leftB","chartHeight","useFullHeightConnector","chartMargin"))`
  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:t,chartHeight:a,useFullHeightConnector:s,chartMargin:r})=>`\n     top: ${s&&a?20-(r?(u?.[0]||0)-(r?.[0]||0):0):Math.min(e||0,n)}px;\n     height: ${s&&a?a-(50-(r?(u?.[0]||0)-(r?.[0]||0)+((u?.[2]||0)-(r?.[2]||0)):0)):Math.max(e||0,n)-Math.min(e||0,n)}px;\n     left: ${((i||0)+t)/2-1}px;\n   `}
`,E=({topA:e,leftA:n,topB:i,leftB:a,chartHeight:s,useFullHeightConnector:r,chartMargin:o})=>(0,t.jsx)(h,{topA:e,topB:i,leftA:n,leftB:a,chartHeight:s,useFullHeightConnector:r,chartMargin:o}),x=(e,n,i)=>i?(e||0)+((e||0)<Math.round(n/2)?8:-8):(e||0)-8,O=(e,n)=>((e||0)+(n||0))/(n?2:1),m=(e,n,i,t)=>({maxWidth:"auto",...!t?.position&&i&&e&&n&&{position:e<Math.round(n/2)?"right":"left"},portal:!0,...t}),C=({width:e=258,topA:n,leftA:i,topB:s,leftB:r,chartWidth:o,chartHeight:l,hidden:d,description:c,innerColor:A,tooltipRenderCondition:u,tooltipProps:h={},useSideSwapping:C=!0,useFullHeightConnector:p=!1,chartMargin:N})=>d?null:(0,t.jsxs)(t.Fragment,{children:[u?(0,t.jsx)(a.A,{width:e,left:x(i,o,C),top:O(n,s),description:c,hidden:d,topMargin:4,tooltipProps:m(i,o,C,h)}):null,r&&s?(0,t.jsx)(E,{topA:n,topB:s,leftA:i,leftB:r,chartHeight:l,useFullHeightConnector:p,chartMargin:N}):null,(0,t.jsx)(_,{chartWidth:o,chartHeight:l,top:n,left:i,innerColor:A})]})},638990(e,n,i){var t;i.d(n,{Z:()=>t}),function(e){e.AIRVIEW="AIRVIEW"}(t||(t={}))},201829(e,n,i){i.d(n,{w:()=>t});const t=12},846294(e,n,i){i.d(n,{A:()=>d});var t=i(274934),a=i(548941),s=i(409844),r=i(184931),o=i(877840);const l=s.AH`
  width: fit-content;
`,d=({reasons:e,reason:n,children:i,isInteractive:s,noWrap:d,position:c,fitContent:_})=>{const A=(0,r.pv)(),u=[n,...e||[]].filter(Boolean)[0]||null,h=!!u;return(0,t.jsx)(o.A,{isDisabled:{fields:h,labels:h,tooltipIcons:h,tooltipPopovers:!A.fields&&h},children:(0,t.jsx)(a.A,{description:A.fields?null:u,portal:!0,isInteractive:s,noWrap:d,position:c,className:_?l:void 0,children:i})})}},625133(e,n,i){i.d(n,{A:()=>c});var t=i(274934),a=i(42220),s=i(221835),r=i(309130),o=i(304151),l=i(100978),d=i(184931);const c=function({control:e,name:n,children:i,tooltip:c,tooltipProps:_,onToggle:A,renderCheckbox:u,inputClassName:h,isDisabled:E,isChecked:x}){const O=(0,d.mQ)()||E;return(0,t.jsx)(a.xI,{control:e,name:n,render:({field:e})=>{const n=(0,t.jsx)(s.A,{id:e.name,onChange:({target:{checked:n}})=>{e.onChange(n),A?.(n)},checked:x??!!e.value,disabled:O,inputClassName:h,children:i});return(0,t.jsxs)(l.A,{gap:r.YC,alignItems:"center",children:[u?u(n,e):n,c?(0,t.jsx)(o.A,{description:c,..._}):null]})}})}},258325(e,n,i){i.d(n,{A:()=>l});var t=i(602086),a=i(977872),s=i(205521),r=i(254585);const o={delay:100,behavior:"smooth"},l=e=>{const n=(0,a.wA)(),i=(0,a.d4)((0,r.Gg)()),l=(0,t.useRef)(null),d=(0,t.useRef)(null);return(0,t.useEffect)(()=>{if(l.current&&i?.scrollIntoViewId===e){d.current&&clearTimeout(d.current);const{scrollIntoViewId:e,...t}=i;d.current=setTimeout(()=>{l.current?.scrollIntoView({...o,...t}),n((0,s.tD)(t))},t.delay||100)}return()=>{d.current&&clearTimeout(d.current)}},[l,i,n,e]),l}},239875(e,n,i){i.d(n,{A:()=>s});var t=i(602086);function a(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,t.useRef)(void 0);i.current=n;const s=e.round||Math.round,r=(0,t.useRef)(void 0),[o,l]=(0,t.useState)({width:void 0,height:void 0}),d=(0,t.useRef)(!1);(0,t.useEffect)(()=>(d.current=!1,()=>{d.current=!0}),[]);const c=(0,t.useRef)({width:void 0,height:void 0}),_=function(e,n){const i=(0,t.useRef)(null),a=(0,t.useRef)(null);a.current=n;const s=(0,t.useRef)(null),r=(0,t.useCallback)(()=>{const n=a.current,t=s.current||(n?n instanceof Element?n:n.current:null);i.current&&i.current.element===t&&i.current.subscriber===e||(i.current&&i.current.cleanup&&i.current.cleanup(),i.current={element:t,subscriber:e,cleanup:t?e(t):void 0})},[e]);return(0,t.useEffect)(()=>{r()},[r]),(0,t.useEffect)(()=>()=>{i.current&&i.current.cleanup&&(i.current.cleanup(),i.current=null)},[]),(0,t.useCallback)(e=>{s.current=e,r()},[r])}((0,t.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 t=n[0],r="border-box"===e.box?"borderBoxSize":"device-pixel-content-box"===e.box?"devicePixelContentBoxSize":"contentBoxSize",o=a(t,r,"inlineSize"),_=a(t,r,"blockSize"),A=o?s(o):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||l(e)}})}),r.current.instance.observe(n,{box:e.box}),()=>{r.current&&r.current.instance.unobserve(n)}),[e.box,s]),e.ref);return(0,t.useMemo)(()=>({ref:_,width:o.width,height:o.height}),[_,o.width,o.height])}},735239(e,n,i){var t;i.d(n,{t:()=>t}),function(e){e.NONE="none",e.HEALTHY="healthy",e.WARNING="warning"}(t||(t={}))},950486(e,n,i){i.d(n,{T:()=>a});var t=i(735239);const a=(e=0,n=0)=>n>=80&&e>=30?t.t.WARNING:n>=50&&e>=15?t.t.HEALTHY:t.t.NONE},927027(e,n,i){i.d(n,{Y:()=>a,v:()=>s});var t=i(752572);const a=(e,n,i=!1)=>{const a=n-1;let s=Math.ceil(e);if(Number.isNaN(s))return[];const r=s%a;return 0!==r&&(s+=a-r),(0,t.A)(n,e=>{return{value:n=e?Math.ceil(e*(s/a)):0,label:i?e%2==0&&String(n)||null:String(n)};var n}).reverse()},s=(e,n)=>{const[i]=e,t=[i],a=e.length-1;for(let i=1;i<n-1;i+=1){const s=i*a/(n-1),r=Math.floor(s).toFixed();t[i]=Math.round(e[r]+(e[Math.ceil(s).toFixed()]-e[r])*(+s-+r))}return t[n-1]=e[a],t}}}]);