"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[39163],{306892(e,t,n){n.d(t,{A:()=>a});const a={MIN:1,MAX:65535}},175522(e,t,n){n.d(t,{A:()=>r,Q:()=>l});var a=n(416348);const r="_",l=[a.ZM,a.Je]},748152(e,t,n){n.d(t,{u:()=>l});var a=n(71479),r=n(143811);const l=(0,a.A)(r.A)`
  [class*='iconsContainer-number'] {
    display: none;
  }
`},335928(e,t,n){n.d(t,{A:()=>l});var a=n(951272),r=n(465543);const l=()=>{const{dirty:e}=(0,a.j7)();return(0,r.w)(e),null}},465543(e,t,n){n.d(t,{w:()=>i});var a=n(296540),r=n(469733),l=n(845030);const i=e=>{const t=(0,r.useDispatch)();(0,a.useEffect)(()=>{t((0,l.SQ)(e))},[t,e])}},263130(e,t,n){n.d(t,{A:()=>m});var a=n(822336),r=n(296540),l=n(217439),i=n(71479),o=n(382389),d=n(566723),c=n(294303);const s=(0,i.A)(l.A)`
  line-height: 20px;
`,m=({icon:e,description:t,action:n,footer:l,background:i,...m})=>{const{themeName:_}=(0,o.u)();return r.createElement(c.A,{flexGrow:1,borderRadius:d.YC,padding:d.kc,background:i||a.Ay[`desktop-color-neutral-01-${_}`],gap:d.kc,flexDirection:"column",...m},r.createElement(c.A,{flexGrow:1,gap:d.kc},e,t?r.createElement(s,{size:"medium"},t):null,n?r.createElement(c.A,{marginLeft:"auto"},r.createElement(s,{size:"medium"},n)):null),l)}},823084(e,t,n){n.d(t,{A:()=>d});var a=n(822336),r=n(296540),l=n(162420),i=n(382389),o=n(263130);const d=({children:e,icon:t,background:n,...d})=>{const{themeName:c}=(0,i.u)();return r.createElement(o.A,{icon:t||r.createElement(l.A,{variant:"fill",size:"original",color:a.Ay[`desktop-color-ublue-06-${c}`]}),description:e,background:n,...d})}},689965(e,t,n){n.d(t,{A:()=>E,I:()=>a});var a,r=n(296540),l=n(822336),i=n(963724),o=n(71479),d=n(825032),c=n(566723),s=n(294303),m=n(311785);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(a||(a={}));const _=(0,o.A)(s.A,(0,m.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||l.Ay[n===d.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:n})=>n||(t?`0 ${e.spacing["spacing-l"]}`:e.spacing["spacing-l"])};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:e="100%"})=>e};
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:e})=>e?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:e}})=>l.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,A=(0,o.A)(i.A,(0,m.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||l.Ay[n===d.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  ${({padding:e})=>e?`padding: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:e,theme:{themeName:t}})=>e||l.Ay[t===d.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${c.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${c.Ln} ${c.Ln};
      }
    }
  }
`,E=({type:e,marginBottom:t,margin:n,padding:l,flex:i,width:o,nested:d,...c})=>"items"in c?r.createElement(A,{marginBottom:t,margin:n,padding:l,flex:i,nested:d,...c}):r.createElement(_,{nested:d,width:o,marginBottom:t,margin:n,padding:l,flex:i,isButtonList:e===a.BUTTON_LIST,...c},c.children)},876773(e,t,n){n.d(t,{A:()=>i});var a=n(296540),r=n(758649),l=n(196010);const i=e=>a.createElement(r.A,{component:l.A,variant:"inline",size:"medium",...e})},363370(e,t,n){n.d(t,{A:()=>i});var a=n(296540),r=n(928085),l=n(876773);const i=e=>{const t=(0,r.A)(e.to);return a.createElement(l.A,{...e,to:t})}},391855(e,t,n){n.d(t,{A:()=>s});var a=n(296540),r=n(271856),l=n(858931),i=n(823858),o=n(71479),d=n(916537);const c=(0,o.A)(i.A)`
  color: #ffffff;
`,s=(0,a.memo)(({isDisabled:e,showLoader:t,showWarning:n,showWarningIcon:i,warning:o,label:s="COMMON_ACTION_APPLY_CHANGES",onSubmit:m,form:_})=>a.createElement(r.A,{description:n?o??a.createElement(d.sA,{id:"COMMON_FORM_CHANGES_TRIGGER_PROVISION"}):null,portal:!0,width:240},a.createElement(l.A,{disabled:e,type:"submit",onClick:m,variant:"primary",Icon:n||i?a.createElement(c,{variant:"fill"}):null,loader:t?"loading":void 0,form:_},a.createElement(d.sA,{id:s}))))},242366(e,t,n){n.d(t,{A:()=>i});var a=n(296540),r=n(566723),l=n(294303);const i=(0,a.forwardRef)((e,t)=>a.createElement(l.A,{ref:t,flexDirection:"column",gap:r.kc,width:"100%",...e}))},48925(e,t,n){n.d(t,{A:()=>p});var a=n(822336),r=n(296540),l=n(217439),i=n(71479),o=n(566723),d=n(968906),c=n(199582),s=n(311785),m=n(766624),_=n(294303),A=n(689965),E=n(242366);const u=(0,i.A)(A.A,(0,s.A)("isOutlined"))`
  border: ${({theme:{themeName:e},isOutlined:t})=>`1px solid ${t?a.Ay[`desktop-color-ublue-06-${e}`]:"transparent"}`};
`,p=({children:e,title:t,tooltip:n,tooltipProps:a,[c.L]:i,titleAction:s,isOutlined:A})=>{const p=(e=>r.Children.toArray(e).length>0)(e);return r.createElement(u,{marginBottom:"none",...d.A.addDataTestId(i??""),isOutlined:A},r.createElement(_.A,{flexDirection:"column",...p&&{gap:o.Ln},width:"100%"},t?r.createElement(_.A,{alignItems:"center",gap:o.YC,justifyContent:"space-between",width:"100%"},r.createElement(_.A,{gap:o.YC,alignItems:"center"},r.createElement(l.A,{variant:"heading-medium"},t),n?r.createElement(m.A,{description:n,portal:!0,...a}):null),s?r.createElement(_.A,null,s):null):null,p?r.createElement(E.A,null,e):null))}},373229(e,t,n){n.d(t,{A:()=>s});var a=n(296540),r=n(758649),l=n(71479),i=n(566723),o=n(916537),d=n(311785);const c=(0,l.A)("footer",(0,d.A)("hasFormResetButton"))`
  display: flex;
  justify-content: ${({hasFormResetButton:e})=>e?"space-between":"flex-end"};
  padding: ${i.S2} ${i.fS};
  gap: ${i.kc};
`,s=({allowCancel:e,isDirty:t,isInvalid:n,isSubmitting:l,onFormSubmit:i,onFormReset:d,onFormCancel:s,className:m,submitButtonText:_,customButton:A,applyButton:E,applyButtonFirst:u,hideCancelButton:p,form:b})=>{const g=(0,a.useMemo)(()=>E||a.createElement(r.A,{name:"submit",variant:"primary",type:"submit",onClick:i,disabled:!t||n||l,form:b},a.createElement(o.sA,{id:_||"COMMON_ACTION_APPLY_CHANGES"})),[E,b,t,n,l,i,_]);return a.createElement(c,{className:m,hasFormResetButton:!!d},u?g:A,p?null:a.createElement(r.A,{name:"cancel",variant:"default",type:"button",onClick:s,disabled:!e&&!t},a.createElement(o.sA,{id:"COMMON_ACTION_CANCEL"})),d?a.createElement(r.A,{name:"reset",variant:"default",type:"button",onClick:d,disabled:!t},a.createElement(o.sA,{id:"COMMON_ACTION_RESET_TO_DEFAULT"})):null,u?A:g)}},329109(e,t,n){n.d(t,{A:()=>s});var a=n(296540),r=n(691441),l=n(71479),i=n(132196),o=n(373229);const d=(0,l.A)("div")`
  height: 66px;
`,c=i.AH`
  padding: 0px !important;
`,s=({isDirty:e,onFormSubmit:t,onFormCancel:n,isInvalid:l,...i})=>e?a.createElement(r.A,null,a.createElement(o.A,{isDirty:e,onFormCancel:n,onFormSubmit:t,isInvalid:l,className:c,...i})):a.createElement(d,null)},870340(e,t,n){n.r(t),n.d(t,{default:()=>$});var a=n(469733),r=n(296540),l=n(951272),i=n(335928),o=n(302167),d=n(457311),c=n(140614),s=n(602021),m=n(60320),_=n(566723),A=n(48925),E=n(391855),u=n(363370),p=n(294303),b=n(689965),g=n(916537),S=n(959341),N=n(823084),I=n(264184),h=n(329109),R=n(454195),C=n(766624),T=n(143811);const O=({disabled:e})=>r.createElement(p.A,{alignItems:"center",minHeight:R.b},r.createElement(p.A,{alignItems:"center",gap:_.YC},r.createElement(T.A,{type:"realCheckbox",name:"wireless_networks_enabled",disabled:e},r.createElement(g.sA,{id:"COMMON_WIRELESS_NETWORKS"})),r.createElement(C.A,{description:r.createElement(g.sA,{id:"SETTINGS_ADVANCED_RADIUS_PROFILE_FORM_LABEL_ENABLE_WIRELESS_NETWORKS_DESC"})}))),D=({disabled:e})=>r.createElement(p.A,{alignItems:"center",minHeight:R.b},r.createElement(p.A,{alignItems:"center",gap:_.YC},r.createElement(T.A,{type:"realCheckbox",name:"wired_networks_enabled",disabled:e},r.createElement(g.sA,{id:"COMMON_WIRED_NETWORKS"})),r.createElement(C.A,{description:r.createElement(g.sA,{id:"SETTINGS_ADVANCED_RADIUS_PROFILE_FORM_LABEL_ENABLE_WIRED_NETWORKS_DESC"})}))),w=({disabled:e})=>r.createElement(p.A,{alignItems:"center",minHeight:R.b},r.createElement(p.A,{alignItems:"center",gap:_.YC},r.createElement(T.A,{type:"realCheckbox",name:"tunneled_reply",disabled:e},r.createElement(g.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_LABEL_TUNNELED_REPLY"})),r.createElement(C.A,{description:r.createElement(g.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_DESCRIPTIONS_TUNNELED_REPLY"})}))),f=({disabled:e})=>r.createElement(T.A,{full:!0,passwordToggle:!0,type:"password",name:"x_secret",variant:"secondary",disabled:e,label:r.createElement(g.sA,{id:"COMMON_SHARED_SECRET"})}),k=({disabled:e})=>r.createElement(T.A,{width:168,type:"number",name:"interim_update_interval",variant:"secondary",contentAfter:r.createElement(g.sA,{id:"COMMON_UNIT_SECONDS"}),disabled:e,label:r.createElement(p.A,{alignItems:"center",gap:_.YC},r.createElement(g.sA,{id:"COMMON_INTERIM_UPDATE_INTERVAL"}),r.createElement(C.A,{description:r.createElement(g.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_DESCRIPTIONS_ACCOUNTING_INTERIM_INTERVAL"})}))});var v=n(748152);const L=({disabled:e})=>r.createElement(v.u,{width:168,type:"number",name:"auth_port",variant:"secondary",disabled:e,label:r.createElement(p.A,{alignItems:"center",gap:_.YC},r.createElement(g.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_LABEL_AUTHENTICATION_PORT"}),r.createElement(C.A,{description:r.createElement(g.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_DESCRIPTION_AUTHENTICATION_PORT"})}))}),M=({disabled:e})=>r.createElement(v.u,{width:168,type:"number",name:"acct_port",variant:"secondary",disabled:e,label:r.createElement(p.A,{alignItems:"center",gap:_.YC},r.createElement(g.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_LABEL_ACCOUNTING_PORT"}),r.createElement(C.A,{description:r.createElement(g.sA,{id:"SETTINGS_ADVANCED_RADIUS_SERVER_FORM_DESCRIPTION_ACCOUNTING_PORT"})}))}),y="defaultRadiusProfileSidePanelForm",x=({defaultProfile:e,disabled:t})=>{const{values:n,resetForm:i,handleSubmit:d,dirty:c,isSubmitting:s,submitForm:m,isValid:R}=(0,l.j7)(),C=(0,a.useSelector)(o.fX),T=(0,I.B_)(e._id,C);return r.createElement("form",{onSubmit:d,style:{height:"100%"},id:y},r.createElement(p.A,{flexDirection:"column",gap:_.xO,width:"100%",overflow:"hidden"},r.createElement(A.A,null,r.createElement(f,{disabled:t}),T&&(0,I.RC)({...e,x_secret:n.x_secret})?r.createElement(N.A,null,r.createElement(g.sA,{id:"SETTINGS_ADVANCED_RADIUS_PROFILE_HOTSPOT_SECRET_TOO_LONG"})):null),r.createElement(A.A,{title:r.createElement(g.sA,{id:"SETTINGS_ADVANCED_RADIUS_PROFILE_FORM_TITLE_RADIUS_VLAN"})},r.createElement(D,{disabled:t}),r.createElement(O,{disabled:t})),r.createElement(A.A,null,r.createElement(L,{disabled:t}),r.createElement(M,{disabled:t}),r.createElement(k,{disabled:t}),r.createElement(w,{disabled:t})),r.createElement(b.A,null,r.createElement("div",null,r.createElement(u.A,{to:`${S.Cs}/${S.Ik}`},r.createElement(g.sA,{id:"SETTINGS_LOCAL_CREDENTIALS"}))))),r.createElement(h.A,{onFormCancel:i,allowCancel:c,applyButton:r.createElement(E.A,{isDisabled:t,showLoader:s,label:e?"COMMON_ACTION_APPLY_CHANGES":"COMMON_ACTION_ADD",form:y,onSubmit:m}),isDirty:c,isSubmitting:s,isInvalid:!R}))};var F=n(667368);const $=({activeItem:e})=>{const t=(0,a.useDispatch)(),n=(0,a.useSelector)(o.QC),_=(0,a.useSelector)(s.EL),A=(0,r.useMemo)(()=>(0,m.dE)(e,n),[e,n]),E=(0,r.useCallback)(async(e,{resetForm:n})=>{(0,m.fr)(e,A)&&await t((0,c.updateDefaultRadiusProfile)((0,m.Wo)(e))),(0,m.Ct)(e,A)&&await t((0,d.$I)((0,m.F8)(e))),n({values:e})},[t,A]);return r.createElement(l.l1,{initialValues:A,onSubmit:E,validationSchema:F.sD},r.createElement(r.Fragment,null,r.createElement(i.A,null),r.createElement(x,{defaultProfile:e,disabled:_})))}},667368(e,t,n){n.d(t,{KW:()=>m,XE:()=>A,fR:()=>c,l9:()=>s,sD:()=>E,ww:()=>_});var a=n(296540),r=n(870443),l=n(306892),i=n(546391),o=n(916537),d=n(379040);const c=60,s=86400,m=3600,_=1812,A=1813,E=r.A.object().shape({x_secret:r.A.string().label("COMMON_SHARED_SECRET").min(1).max(d.IF).matches(i.Aq,{message:a.createElement(o.sA,{id:"SETTINGS_RADIUS_SHARED_SECRET_VALIDATION"})}).required(),auth_port:r.A.number().label("SETTINGS_ADVANCED_RADIUS_SERVER_FORM_LABEL_AUTHENTICATION_PORT").min(l.A.MIN).max(l.A.MAX).required(),acct_port:r.A.number().label("SETTINGS_ADVANCED_RADIUS_SERVER_FORM_LABEL_ACCOUNTING_PORT").min(l.A.MIN).max(l.A.MAX).required(),interim_update_interval:r.A.number().label("COMMON_INTERIM_UPDATE_INTERVAL").required().min(c).max(s),tunneled_reply:r.A.boolean()})},60320(e,t,n){n.d(t,{Ct:()=>m,F8:()=>d,Wo:()=>o,dE:()=>i,fr:()=>s,zr:()=>c});var a=n(261218),r=n(689956),l=n(667368);const i=(e,t)=>({_id:e._id,name:e.name,enabled:t.enabled,configure_whole_network:t.configure_whole_network,attr_hidden_id:e.attr_hidden_id,attr_no_delete:e.attr_no_delete,attr_no_edit:e.attr_no_edit,x_secret:t.x_secret,auth_port:t.auth_port??l.ww,acct_port:t.acct_port??l.XE,tunneled_reply:t.tunneled_reply??!0,interim_update_interval:t.interim_update_interval??l.KW,wireless_networks_enabled:e.vlan_wlan_mode===r.z.ENABLED,wired_networks_enabled:e.vlan_enabled||!1}),o=e=>{const{wired_networks_enabled:t,wireless_networks_enabled:n,...a}=e;return{...a,vlan_wlan_mode:e.wireless_networks_enabled?r.z.ENABLED:r.z.DISABLED,vlan_enabled:e.wired_networks_enabled}},d=e=>({key:a.FP.RADIUS,enabled:e.enabled,configure_whole_network:e.configure_whole_network,x_secret:e.x_secret,auth_port:e.auth_port,acct_port:e.acct_port,tunneled_reply:e.tunneled_reply,interim_update_interval:e.interim_update_interval}),c=e=>({acct_port:e.acct_port||l.XE,auth_port:e.auth_port||l.ww}),s=(e,t)=>e.wired_networks_enabled!==t.wired_networks_enabled||e.wireless_networks_enabled!==t.wireless_networks_enabled,m=(e,t)=>e.enabled!==t.enabled||e.configure_whole_network!==t.configure_whole_network||e.x_secret!==t.x_secret||e.auth_port!==t.auth_port||e.acct_port!==t.acct_port||e.tunneled_reply!==t.tunneled_reply||e.interim_update_interval!==t.interim_update_interval},280258(e,t,n){n.d(t,{H:()=>a});const a=""},362412(e,t,n){n.d(t,{A:()=>m});var a=n(296540),r=n(469733),l=n(436331),i=n(805837),o=n(282556),d=n(71265);const c=e=>a.createElement(l.A,{renderOption:i.q,...e}),s=e=>a.createElement(c,{...e});s.Sorted=e=>{const t=(0,r.useSelector)(o.zi),n=(0,a.useMemo)(()=>(0,d.k)(t),[t]);return a.createElement(c,{...e,sortBy:n})};const m=s},71265(e,t,n){n.d(t,{R:()=>m,k:()=>_});var a=n(280258),r=n(190497),l=n(953048),i=n(175522),o=n(936621),d=n(742525);const c=[...new Set([a.H,i.Q.join(i.A),l.Zt,o.F,r.nc,d.Vr])],s={numeric:!0,sensitivity:"base"},m=(e,t)=>{const n=[];for(let a=e;a<=t;a+=1)n.push({value:a,label:String(a)});return n},_=e=>({value:t,label:n},{value:a,label:r})=>c.includes(t?.toString())||c.includes(a?.toString())?1/0:n?.toString().localeCompare(r?.toString(),e,s)??-1}}]);