"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[526],{41488(e,t,_){_.d(t,{iw:()=>I,Zb:()=>l,N0:()=>c,uE:()=>O,Je:()=>R,od:()=>N});var E=_(911513),s=_(961386),a=_(263963),n=_(282214),r=_(303303);const i=(0,s.S)([r.m9,n.q],{message:(0,a.rn)("SETTINGS_IPV6_ADDRESS_OR_SUBNET_VALIDATION")});var T=_(242299),o=_(16914),S=_(867955);const l={[S.B.PORT_GROUP]:"SETTINGS_DUPLICATE_PORT_VALIDATION",[S.B.ADDRESS_GROUP]:"SETTINGS_DUPLICATE_IP_VALIDATION",[S.B.IPV6_ADDRESS_GROUP]:"SETTINGS_DUPLICATE_IP_VALIDATION"},O={[S.B.PORT_GROUP]:{id:"COMMON_PLACEHOLDER_EG",values:{value:"1-10"}},[S.B.ADDRESS_GROUP]:{id:"SETTINGS_IP_SUBNET_RANGE",values:{version:o.oi.IPV4}},[S.B.IPV6_ADDRESS_GROUP]:{id:"SETTINGS_IP_SUBNET_RANGE",values:{version:o.oi.IPV6}}},I=[S.B.PORT_GROUP,S.B.ADDRESS_GROUP,S.B.IPV6_ADDRESS_GROUP],N={[S.B.PORT_GROUP]:"COMMON_PORT",[S.B.ADDRESS_GROUP]:"SETTINGS_PROFILES_NETWORK_OBJECT_TYPE_ADDRESS_GROUP",[S.B.IPV6_ADDRESS_GROUP]:"SETTINGS_PROFILES_NETWORK_OBJECT_TYPE_IPV6_ADDRESS_GROUP"},c={[S.B.PORT_GROUP]:"COMMON_PORT",[S.B.ADDRESS_GROUP]:"COMMON_ADDRESS",[S.B.IPV6_ADDRESS_GROUP]:"COMMON_ADDRESS"},R={[S.B.PORT_GROUP]:E.c,[S.B.ADDRESS_GROUP]:T.q.refine(e=>!e.endsWith("/32"),{message:(0,a.rn)("SETTINGS_REMOVE_SUBNET_SUFFIX",{subnet:32})}),[S.B.IPV6_ADDRESS_GROUP]:i.refine(e=>!e.endsWith("/128"),{message:(0,a.rn)("SETTINGS_REMOVE_SUBNET_SUFFIX",{subnet:128})})}},867955(e,t,_){var E;_.d(t,{B:()=>E}),function(e){e.PORT_GROUP="port-group",e.ADDRESS_GROUP="address-group",e.IPV6_ADDRESS_GROUP="ipv6-address-group"}(E||(E={}))},175522(e,t,_){_.d(t,{A:()=>s,Q:()=>a});var E=_(416348);const s="_",a=[E.ZM,E.Je]},210484(e,t,_){_.d(t,{A:()=>a});var E=_(71479),s=_(566723);const a=(0,E.A)("div")`
  div {
    flex-wrap: wrap;
  }

  svg {
    max-width: 20px;
    flex: 1;
  }
  span {
    flex: 1;
  }

  span + div:last-child {
    flex-basis: 100%;
    margin-left: ${s.ED};
  }
`},465543(e,t,_){_.d(t,{w:()=>n});var E=_(296540),s=_(469733),a=_(845030);const n=e=>{const t=(0,s.useDispatch)();(0,E.useEffect)(()=>{t((0,a.SQ)(e))},[t,e])}},853801(e,t,_){_.d(t,{y:()=>a});var E=_(349785),s=_(465543);const a=e=>{const t=(0,E.lN)(e);return(0,s.w)(t.isDirty)}},263130(e,t,_){_.d(t,{A:()=>S});var E=_(822336),s=_(296540),a=_(217439),n=_(71479),r=_(382389),i=_(566723),T=_(294303);const o=(0,n.A)(a.A)`
  line-height: 20px;
`,S=({icon:e,description:t,action:_,footer:a,background:n,...S})=>{const{themeName:l}=(0,r.u)();return s.createElement(T.A,{flexGrow:1,borderRadius:i.YC,padding:i.kc,background:n||E.Ay[`desktop-color-neutral-01-${l}`],gap:i.kc,flexDirection:"column",...S},s.createElement(T.A,{flexGrow:1,gap:i.kc},e,t?s.createElement(o,{size:"medium"},t):null,_?s.createElement(T.A,{marginLeft:"auto"},s.createElement(o,{size:"medium"},_)):null),a)}},823084(e,t,_){_.d(t,{A:()=>i});var E=_(822336),s=_(296540),a=_(162420),n=_(382389),r=_(263130);const i=({children:e,icon:t,background:_,...i})=>{const{themeName:T}=(0,n.u)();return s.createElement(r.A,{icon:t||s.createElement(a.A,{variant:"fill",size:"original",color:E.Ay[`desktop-color-ublue-06-${T}`]}),description:e,background:_,...i})}},998386(e,t,_){_.d(t,{H:()=>a,v:()=>s});var E=_(765562);const s=e=>`${E.A.fabricsOrchestration}?orchestrationId=${e?.template_id||""}&orgId=${e?.organization_id||""}`,a=e=>`${E.A.fabricsDeviceTemplates}/${e?.template_id||""}?orgId=${e?.organization_id||""}`},83683(e,t,_){_.r(t),_.d(t,{default:()=>J});var E=_(469733),s=_(296540),a=_(742920),n=_(853801),r=_(606081),i=_(675291),T=_(169568),o=_(895424),S=_(641777),l=_(79786),O=_(398300),I=_(566723),N=_(48925),c=_(294303),R=_(845030),A=_(675359),m=_(916537),d=_(210484),u=_(446367),G=_(867955),P=_(711748),C=_(323013),v=_(959341),D=_(602021),L=_(329109),M=_(614476),g=_(263963);const p=e=>M.z.string().max(64,{message:(0,g.rn)("SETTINGS_COMMON_FIELD_SHOULD_NOT_EXCEED_MAX_LENGTH",{name:(0,g.rn)("COMMON_NAME"),limit:64})}).refine(t=>!e.some(e=>e.name===t),{message:(0,g.rn)("COMMON_PLEASE_ENTER_UNIQUE_NAME")});var F=_(349785),U=_(610356),h=_(553432),f=_(317672),W=_(349665),b=_(41488);const V=({form:e,isExistingRecord:t})=>{const _=(0,F.FH)({control:e.control,name:"group_members"});return s.createElement(W.A,null,s.createElement(f.A,null,s.createElement(m.sA,{id:"COMMON_TYPE"})),s.createElement(S.A,{isDisabled:_.length>0||t},s.createElement(h.A,{flexDirection:"column",alignItems:"flex-start"},b.iw.map(t=>s.createElement(U.A,{key:t,control:e.control,name:"group_type",value:t},s.createElement(m.sA,{id:b.od[t]}))))))};var y=_(823084),B=_(349107),K=_(998386);const w=({existingRecord:e})=>s.createElement(y.A,null,s.createElement(c.A,{flexDirection:"column"},s.createElement(m.sA,{id:"COMMON_MANAGED_BY_FABRIC",values:{feature:s.createElement(m.sA,{id:"COMMON_NETWORK_LIST"})}}),s.createElement(B.A,{id:"COMMON_VIEW_IN_SITE_MANAGER",href:(0,K.v)(e?.cloud_template)})));var H=_(617883),Y=_(348466),x=_(383725),z=_(968906),k=_(976118);const Q=e=>{const t=e.split(Y.jr);return 2===t.length&&(0,k.w)(t[0])&&(0,k.w)(t[1])&&Number(t[0])<Number(t[1])?[Number(t[0]),Number(t[1])]:(0,k.w)(e)?[Number(e),Number(e)]:null},j=({form:e})=>{const{formatMessage:t}=(0,m.tz)(),_=(0,F.FH)({control:e.control,name:"group_type"}),E=b.N0[_],a=b.uE[_],n=t({id:a.id},a.values),r=(0,s.useCallback)((e,t)=>{const _=Q(e);if(!_)return!0;for(const e of t){const t=Q(e);if(t&&_[0]<=t[1]&&t[0]<=_[1])return s.createElement(m.sA,{id:"SETTINGS_PORT_RANGE_OVERLAP_VALIDATION",values:{entry:e}})}return!0},[]);return s.createElement(W.A,{...z.A.addDataTestId(x.b.POLICY_BASED_ROUTES_DOMAIN)},s.createElement(f.A,null,s.createElement(m.sA,{id:E})),s.createElement(H.A,{form:e,name:"group_members",fieldLabel:E,modalTitle:s.createElement(m.sA,{id:"SETTINGS_ADD_MULTIPLE_NETWORK_LIST_VALUES"}),modalFieldPlaceholder:n,itemSchema:b.Je[_],placeholder:n,getDuplicationMessage:()=>t({id:b.Zb[_]}),splitBy:_===G.B.PORT_GROUP?Y.KE:void 0,validateInArray:_===G.B.PORT_GROUP?r:void 0}))},X="network-list-profile-form",J=({activeItem:e})=>{const t=(0,E.useDispatch)(),_=e._id===v.R6,F=(0,E.useSelector)(P.O9),U=(0,l.m)({schema:(h=F.filter(({_id:t})=>t!==e._id),M.z.union([M.z.object({group_type:M.z.literal(G.B.PORT_GROUP),name:p(h),group_members:M.z.array(M.z.string()).min(1,{message:(0,g.rn)("SETTINGS_PROFILES_PORT_IP_GROUPS_FORM_FIELD_GROUP_MEMBERS_PORT_MIN")})}),M.z.object({group_type:M.z.union([M.z.literal(G.B.ADDRESS_GROUP),M.z.literal(G.B.IPV6_ADDRESS_GROUP)]),name:p(h),group_members:M.z.array(M.z.string()).min(1,{message:(0,g.rn)("SETTINGS_PROFILES_PORT_IP_GROUPS_FORM_FIELD_GROUP_MEMBERS_ADDRESS_MIN")})})])),defaultValues:{group_type:e._id===v.R6?G.B.PORT_GROUP:e.group_type,name:e.name,group_members:e._id===v.R6?[]:e.group_members}});var h;const f=(0,r.S)(T.v.NETWORK_OBJECTS),W=(0,E.useSelector)(D.EL),b=(0,u.A)(e);(0,n.y)(U);const y=U.handleSubmit(async E=>{t((0,C.Qe)({...E,_id:_?null:e._id,group_members:(E.group_members||[]).filter(e=>!!e)})).then(e=>{t((0,R.SQ)(!1)),_&&t((0,R.XP)({id:e._id,type:O.H.NETWORK_LIST_PROFILE}))}).then(()=>{U.reset()}).catch(e=>{t((0,A.ox)({errorMessage:e.msg,errorValues:e,icon:a.C.danger,message:"SETTINGS_PROFILES_NETWORK_OBJECT_FORM_SAVE_FAILURE",values:{name:E.name}}))})});return s.createElement(S.A,{isDisabled:f||W||b},s.createElement("form",{onSubmit:y,id:X},s.createElement(c.A,{width:"100%",gap:I.Ln,flexDirection:"column"},s.createElement(i.A,{feature:T.v.NETWORK_OBJECTS,renderWarning:({children:e})=>s.createElement(d.A,null,s.createElement(N.A,null,e))}),s.createElement(N.A,null,b?s.createElement(w,{existingRecord:e}):null,s.createElement(o.A,{autoFocus:!0,control:U.control,name:"name",label:s.createElement(m.sA,{id:"COMMON_NAME"})})),s.createElement(N.A,null,s.createElement(V,{form:U,isExistingRecord:!_}),s.createElement(j,{form:U})),s.createElement(L.A,{onFormCancel:()=>U.reset(),isDirty:U.formState.isDirty||_&&!f,hideCancelButton:!U.formState.isDirty,submitButtonText:_?"COMMON_ACTION_ADD":void 0,form:X,isSubmitting:U.formState.isSubmitting}))))}},280258(e,t,_){_.d(t,{H:()=>E});const E=""},675344(e,t,_){_.d(t,{By:()=>E,Ko:()=>n,Qb:()=>a,uE:()=>s,xh:()=>r});const E="800px",s="832px",a="1362px",n="664px",r="100px"},596441(e,t,_){_.d(t,{I:()=>E});const E={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,t,_,E){return Math.min((E||this.ROW_HEIGHT)*e+(_??this.HEADER_HEIGHT),(E||this.ROW_HEIGHT)*t+(_??this.HEADER_HEIGHT))},getEditContainerHeight(e,t,_){return Math.min((_||this.EDIT_FIELD_HEIGHT)*e,(_||this.EDIT_FIELD_HEIGHT)*t)}}},617883(e,t,_){_.d(t,{A:()=>o});var E=_(296540),s=_(349785),a=_(263963),n=_(284428),r=_(294303),i=_(916537),T=_(859510);const o=function({form:e,name:t,fieldLabel:_,modalTitle:o,modalFieldPlaceholder:S,placeholder:l,itemSchema:O,transformValue:I,getDuplicationMessage:N,extraDisplayColumns:c,actions:R,max:A,disableMultiEdit:m=!1,splitBy:d,validateInArray:u}){const G=(0,n.mQ)(),P=(0,a.L_)(),{formatMessage:C}=(0,i.tz)(),v=(0,E.useMemo)(()=>({fieldLabel:_,modalTitle:o,modalFieldPlaceholder:S}),[_,S,o]),D=(0,E.useMemo)(()=>({getDuplicationMessage:N??(()=>C({id:"SETTINGS_VALUE_UNIQUE"})),validateInArray:u,validate:e=>{if(d&&"string"==typeof e){const t=e.split(d).map(e=>e.trim()).filter(Boolean);for(const _ of t.length>0?t:[e]){const e=O.safeParse(_);if(!e.success)return E.createElement(E.Fragment,null,P(e.error.issues[0]?.message))}return!0}const t=O.safeParse(e);return!!t.success||E.createElement(E.Fragment,null,P(t.error.issues[0]?.message))}}),[C,P,N,O,d,u]),L=(0,E.useMemo)(()=>({placeholder:l,translatePlaceholder:!1,parser:I?e=>I(e?.[0]?.target?.value):void 0}),[l,I]);return E.createElement(s.xI,{control:e.control,name:t,render:({field:e,fieldState:t,formState:_})=>E.createElement(r.A,{flexDirection:"column",width:"100%"},E.createElement(T.A,{disabled:G,labels:v,fieldValidation:D,extraFieldConfig:L,value:e.value||[],onChange:t=>e.onChange(t),invalid:t.invalid?P((0,s.Jt)(_.errors,e.name)?.message)||!0:void 0,extraDisplayColumns:c,actions:R,disableMultiEdit:m,max:A,splitBy:d}))})}},79786(e,t,_){_.d(t,{m:()=>r});var E=_(296540),s=_(349785),a=_(59116),n=_(870893);function r({schema:e,defaultValues:t,presets:_}){const r=(0,E.useMemo)(()=>_?(0,a.A)(_,e=>e.defaultValues):{},[_]),i=(0,E.useMemo)(()=>({...t,...r}),[r,t]),T=(0,s.mN)({resolver:(0,n.u)(e),shouldFocusError:!0,defaultValues:i,shouldUseNativeValidation:!1,mode:"onTouched"}),o=(0,E.useRef)(i);o.current=i;const S=(0,E.useCallback)((...e)=>{const[t,..._]=e;return T.reset(t?{...t,...r}:o.current,..._)},[r,T]);return{...T,reset:S,formState:{...T.formState,isDirty:!!Object.keys(T.formState.dirtyFields).length,isSubmitting:T.formState.isSubmitting},handleSubmit:(...e)=>T.handleSubmit(e[0],(t,..._)=>{const E=Object.keys(t)[0];if(E)try{const e=document.getElementsByName(E)?.[0];e?.scrollIntoView?.({behavior:"smooth",block:"center"}),e?.focus?.({preventScroll:!0})}catch{}e[1]?.(t,..._)})}}},641777(e,t,_){_.d(t,{A:()=>n});var E=_(296540),s=_(284428),a=_(451449);const n=({isDisabled:e,isAdditive:t=!0,children:_})=>{const n=(0,s.pv)(),r=(0,E.useMemo)(()=>"boolean"==typeof e?{fields:e,labels:e,tooltipIcons:e,tooltipPopovers:!1}:e,[e]),i=(0,E.useMemo)(()=>({fields:t?r.fields||n.fields:r.fields,labels:t?r.labels||n.labels:r.labels,tooltipIcons:t?r.tooltipIcons||n.tooltipIcons:r.tooltipIcons,tooltipPopovers:t?r.tooltipPopovers||n.tooltipPopovers:r.tooltipPopovers}),[t,r.fields,r.labels,r.tooltipIcons,r.tooltipPopovers,n.fields,n.labels,n.tooltipIcons,n.tooltipPopovers]);return E.createElement(a.I.Provider,{value:i},_)}},610356(e,t,_){_.d(t,{A:()=>o});var E=_(296540),s=_(349785),a=_(54227),n=_(566723),r=_(766624),i=_(294303),T=_(284428);const o=(0,E.forwardRef)(function({control:e,name:t,children:_,tooltip:o,tooltipProps:S,value:l,onCheck:O,...I},N){const c=(0,T.mQ)();return E.createElement(s.xI,{control:e,name:t,render:({field:e})=>E.createElement(i.A,{gap:n.YC,alignItems:"center",ref:N,...I},E.createElement(a.A,{id:e.name,onChange:({target:{checked:t}})=>{t&&(e.onChange(l),O?.())},checked:e.value===l,disabled:c,value:e.value},_),o?E.createElement(r.A,{description:o,...S}):null)})})},895424(e,t,_){_.d(t,{A:()=>o});var E=_(296540),s=_(349785),a=_(438628),n=_(705145),r=_(566723),i=_(263963),T=_(284428);const o=function({control:e,name:t,label:_,placeholder:o,tooltip:S,tooltipProps:l,autoFocus:O,motif:I,onChange:N,onBlur:c,onAfterChange:R,onPaste:A,onKeyDown:m,passwordToggle:d,type:u,helperMessage:G,autoComplete:P,contentBefore:C,contentAfter:v,onFocus:D,value:L,invalid:M}){const g=(0,T.mQ)(),p=(0,T.Im)(),F=(0,T.q)(),U=(0,i.L_)();return E.createElement(s.xI,{control:e,name:t,render:({field:e,fieldState:i,formState:T})=>E.createElement(a.A,{type:u||(d?"password":"text"),variant:"secondary",width:"100%",autoFocus:O,...e,onChange:t=>{N?N(t,e,T):e.onChange(t),R?.(t)},onBlur:t=>{c?c(t,e,T):e.onBlur()},onFocus:D,onPaste:A,disabled:g,value:L??e.value?.toString(),invalid:M||(i.invalid?E.createElement(n.A,{variant:"inherit",style:{overflowWrap:"break-word"}},U((0,s.Jt)(T.errors,t)?.message)||!0," "):void 0),label:_,placeholder:o,labelTooltip:S,labelTooltipProps:{style:{opacity:p?r.xN:void 0,pointerEvents:F?"none":void 0,...l?.style},...l},motif:I,passwordToggle:d,helperMessage:G,autoComplete:P,onKeyDown:m,contentBefore:C,contentAfter:v})})}},143985(e,t,_){_.d(t,{B:()=>r,b:()=>n});var E=_(614476),s=_(620637),a=_(263963);const n=E.z.string({message:(0,a.rn)("COMMON_VALIDATION_VALID_IPV4")}).refine(e=>!e||(0,s.isValidIpv4)(e),{message:(0,a.rn)("COMMON_VALIDATION_VALID_IPV4")}),r=E.z.string({message:(0,a.rn)("COMMON_VALIDATION_VALID_IPV4")}).refine(e=>(0,s.isValidIpv4)(e),{message:(0,a.rn)("COMMON_VALIDATION_VALID_IPV4")})},242299(e,t,_){_.d(t,{q:()=>O});var E=_(961386),s=_(263963),a=_(950700),n=_(614476),r=_(620637),i=_(149133),T=_(546391),o=_(348466);const S=n.z.string({message:(0,s.rn)("COMMON_VALIDATION_IPV4_SUBNET")}).refine(e=>{const t=e.split(o.jr),[_,E]=t;return 2===t.length&&_&&E&&T.zF.test(_)&&T.zF.test(E)&&(0,r.isValidIpv4)(_)&&(0,r.isValidIpv4)(E)&&(0,i.GQ)(_)<(0,i.GQ)(E)},{message:(0,s.rn)("COMMON_VALIDATION_IPV4_SUBNET")});var l=_(143985);const O=(0,E.S)([l.B,a.K,S],{message:(0,s.rn)("SETTINGS_ROUTING_NAT_FORM_IP_OR_SUBNET_OR_RANGE_VALIDATION")})},950700(e,t,_){_.d(t,{K:()=>r});var E=_(614476),s=_(149133),a=_(546391),n=_(263963);const r=E.z.string({message:(0,n.rn)("COMMON_VALIDATION_IPV4_SUBNET")}).regex(a.wK,{message:(0,n.rn)("COMMON_VALIDATION_IPV4_SUBNET")}).refine(s.N7,{message:(0,n.rn)("COMMON_VALIDATION_IPV4_SUBNET")})},303303(e,t,_){_.d(t,{Jh:()=>r,XK:()=>n,m9:()=>i});var E=_(614476),s=_(383653),a=_(263963);const n=E.z.string().ip({version:"v6",message:(0,a.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}).refine(e=>!e||!e.includes("%"),{message:(0,a.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}),r=E.z.union([E.z.string().ip({version:"v6",message:(0,a.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}),E.z.literal("")]).optional().refine(e=>!e||!e.includes("%"),{message:(0,a.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}),i=n.refine(e=>!(0,s.m0)(e),{message:(0,a.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_IPV4_MAPPED_IPV6_INVALID")}).refine(e=>!(0,s.aN)(e),{message:(0,a.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_MULTICAST_INVALID")})},282214(e,t,_){_.d(t,{q:()=>n});var E=_(614476),s=_(383653),a=_(263963);const n=E.z.string({message:(0,a.rn)("COMMON_VALIDATION_IPV6_SUBNET")}).refine(s.In,{message:(0,a.rn)("COMMON_VALIDATION_IPV6_SUBNET")})},911513(e,t,_){_.d(t,{c:()=>r});var E=_(961386),s=_(263963),a=_(976118),n=_(790163);const r=(0,E.S)([a.L,n.i],{message:(0,s.rn)("SETTINGS_COMMON_PORT_VALIDATION_REQUIRED")})},790163(e,t,_){_.d(t,{i:()=>r});var E=_(614476),s=_(348466),a=_(263963),n=_(976118);const r=E.z.string().refine(e=>{const t=e.split(s.jr);return 2===t.length&&(0,n.w)(t[0])&&(0,n.w)(t[1])&&Number(t[0])<Number(t[1])},{message:(0,a.rn)("SETTINGS_COMMON_SINGLE_PORT_RANGE_VALIDATION_REQUIRED")})},976118(e,t,_){_.d(t,{L:()=>r,w:()=>n});var E=_(614476),s=_(263963);const a=/^\d+$/,n=e=>{if(!a.test(e)||e.startsWith("0"))return!1;const t=Number.parseInt(e,10);return!Number.isNaN(t)&&Number.isInteger(t)&&t>=1&&t<=65535},r=E.z.string().refine(e=>n(e),{message:(0,s.rn)("SETTINGS_COMMON_SINGLE_PORT_VALIDATION_REQUIRED")})},961386(e,t,_){_.d(t,{S:()=>s});var E=_(614476);function s(e,{message:t}){return E.z.custom(t=>E.z.union(e).safeParse(t).success,{message:t})}},267691(e,t,_){_.d(t,{u:()=>r});var E=_(296540),s=_(469733),a=_(528644),n=_(674319);function r(e){const t=(0,s.useSelector)(a.C);return(0,E.useMemo)(()=>(0,n.TM)(e,t),[e,t])}},675291(e,t,_){_.d(t,{A:()=>A});var E=_(296540),s=_(469733),a=_(847883),n=_(758649),r=_(162420),i=_(687370),T=_(958372),o=_(267691),S=_(675344),l=_(566723),O=_(294303),I=_(263130),N=_(916537),c=_(789768);const R={maxWidth:S.By,margin:`${l.Ln} 0 0 0`,style:{flex:0}},A=({feature:e,children:t,rowProps:_,skipApproval:S=!1,renderWarning:A})=>{const m=(0,s.useDispatch)(),d=(0,o.u)(e),u=(0,i.r)(e),G=(0,E.useCallback)(()=>{m((0,c.ct)(e))},[m,e]),P=u?null:E.createElement(I.A,{icon:E.createElement(r.A,{variant:"fill",size:"original",isActive:!0}),description:E.createElement(N.sA,{id:T.b[e]?.(d||S)||"COMMON_LOCKED_FEATURE"}),action:d||S?null:E.createElement(n.A,{type:"button",onClick:G,variant:"inline"},E.createElement(N.sA,{id:"COMMON_LOCKED_PRECONFIGURE"}))});return E.createElement(E.Fragment,null,P?E.createElement(E.Fragment,null,A?A({children:P}):E.createElement(a.A,{unlimitedWidth:!0,...R,..._},P)):null,t?E.createElement(a.A,{unlimitedWidth:!0,disabled:!u&&!d&&!S,marginBottom:0},E.createElement(O.A,{width:"100%",flexDirection:"column",gap:l.Ln},t)):null)}},674319(e,t,_){_.d(t,{A:()=>r,TM:()=>o,f9:()=>T});var E=_(598796),s=_(780811),a=_(169568);const n={[a.v.SETTINGS_WIFI]:e=>!e.devicesHaveLastFetchTime||e.hasApAdopted,[a.v.SETTINGS_WIFI_SPEED_LIMIT_PROFILES]:e=>!e.devicesHaveLastFetchTime||e.hasApAdopted,[a.v.SETTINGS_NETWORKS]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway||e.hasSwitchAdopted||e.hasApAdopted,[a.v.SETTINGS_INTERNET]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway,[a.v.SETTINGS_TELEPORT]:e=>e.features.has(E.Xj.TELEPORT),[a.v.SETTING_ROUTING]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway||e.hasL3SwitchAdopted,[a.v.SETTINGS_SECURITY]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway||e.hasL3SwitchAdopted,[a.v.SETTINGS_RADIUS]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway,[a.v.NETWORK_OBJECTS]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway,[a.v.SETTINGS_ETHERNET_PORTS]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway||e.hasSwitchAdopted,[a.v.SETTINGS_PROFILES]:e=>!e.devicesHaveLastFetchTime||e.hasApAdopted||e.hasSiteGateway||e.hasSwitchAdopted,[a.v.SETTINGS_VPN]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway,[a.v.SETTINGS_VPN_CLIENT]:e=>e.hasSiteGateway&&!(0,s.oWO)({type:e.siteGatewayInterfaces.type})&&!(0,s.ziy)({model:e.siteGatewayInterfaces.model}),[a.v.SETTINGS_POLICY]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway||e.hasL3SwitchAdopted||e.features.has(E.Xj.SWITCH_CUSTOM_ACL_RULES)||e.features.has(E.Xj.ZONE_BASED_FIREWALL)||e.features.has(E.Xj.USER_DEFINED_NAT_RULES)||e.features.has(E.Xj.STATIC_DNS),[a.v.SETTINGS_POLICY_ACL]:e=>!e.devicesHaveLastFetchTime||e.features.has(E.Xj.SWITCH_CUSTOM_ACL_RULES),[a.v.SETTINGS_POLICY_QOS]:e=>!e.devicesHaveLastFetchTime||e.features.has(E.Xj.ZONE_BASED_FIREWALL),[a.v.SETTINGS_POLICY_NAT]:e=>!e.devicesHaveLastFetchTime||e.features.has(E.Xj.USER_DEFINED_NAT_RULES),[a.v.SETTINGS_POLICY_DNS]:e=>!e.devicesHaveLastFetchTime||e.features.has(E.Xj.STATIC_DNS),[a.v.SETTINGS_POLICY_PORT_FORWARDING]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway,[a.v.SETTINGS_POLICY_FIREWALL]:e=>!e.devicesHaveLastFetchTime||e.features.has(E.Xj.ZONE_BASED_FIREWALL),[a.v.SETTINGS_POLICY_ROUTE]:e=>!e.devicesHaveLastFetchTime||e.hasSiteGateway||e.hasL3SwitchAdopted,[a.v.SETTINGS_CONTENT_FILTER]:e=>!e.devicesHaveLastFetchTime||e.features.has(E.Xj.CLOUDFLARE_CONTENT_FILTERING)},r=(e,t)=>!!n[e]?.(t),i={[a.v.SETTINGS_WIFI]:()=>!0,[a.v.SETTINGS_WIFI_SPEED_LIMIT_PROFILES]:()=>!0,[a.v.SETTINGS_NETWORKS]:()=>!0,[a.v.SETTINGS_INTERNET]:()=>!0,[a.v.SETTINGS_TELEPORT]:()=>!0,[a.v.SETTING_ROUTING]:()=>!0,[a.v.SETTINGS_SECURITY]:()=>!0,[a.v.SETTINGS_RADIUS]:()=>!0,[a.v.NETWORK_OBJECTS]:()=>!0,[a.v.SETTINGS_ETHERNET_PORTS]:()=>!0,[a.v.SETTINGS_PROFILES]:()=>!0,[a.v.SETTINGS_VPN]:()=>!0,[a.v.SETTINGS_VPN_CLIENT]:()=>!0,[a.v.SETTINGS_POLICY]:()=>!0,[a.v.SETTINGS_POLICY_ACL]:()=>!1,[a.v.SETTINGS_POLICY_QOS]:()=>!1,[a.v.SETTINGS_POLICY_NAT]:()=>!1,[a.v.SETTINGS_POLICY_DNS]:()=>!1,[a.v.SETTINGS_POLICY_PORT_FORWARDING]:()=>!0,[a.v.SETTINGS_POLICY_FIREWALL]:()=>!1,[a.v.SETTINGS_POLICY_ROUTE]:()=>!0,[a.v.SETTINGS_CONTENT_FILTER]:()=>!1},T=(e,t)=>i[e]?.(t),o=(e,t)=>!!t.selfPreconfigureApprovals?.includes(e)&&T(e,t)},169568(e,t,_){var E;_.d(t,{v:()=>E}),function(e){e.SETTINGS_WIFI="settingsWifi",e.SETTINGS_NETWORKS="settingsNetworks",e.SETTINGS_INTERNET="settingsInternet",e.SETTINGS_TELEPORT="settingsTeleport",e.SETTINGS_VPN="settingsVpn",e.SETTING_ROUTING="settingsRouting",e.SETTINGS_SECURITY="settingsSecurity",e.SETTINGS_ETHERNET_PORTS="settingsEthernetPorts",e.SETTINGS_WIFI_SPEED_LIMIT_PROFILES="settingsWifiSpeedLimitProfiles",e.SETTINGS_RADIUS="settingsRadius",e.NETWORK_OBJECTS="settingsNetworkObjects",e.SETTINGS_PROFILES="settingsProfiles",e.SETTINGS_VPN_CLIENT="vpnClient",e.SETTINGS_CONTENT_FILTER="settingsContentFilter",e.SETTINGS_POLICY="settingsPolicy",e.SETTINGS_POLICY_ACL="settingsPolicyAcl",e.SETTINGS_POLICY_QOS="settingsPolicyQos",e.SETTINGS_POLICY_NAT="settingsPolicyNat",e.SETTINGS_POLICY_DNS="settingsPolicyDns",e.SETTINGS_POLICY_PORT_FORWARDING="settingsPolicyPortForwarding",e.SETTINGS_POLICY_FIREWALL="settingsPolicyFirewall",e.SETTINGS_POLICY_ROUTE="settingsPolicyRoute"}(E||(E={}))},528644(e,t,_){_.d(t,{C:()=>r});var E=_(801081),s=_(198494),a=_(792072),n=_(532419);const r=(0,E.Mz)(n.$8,n.m9,n.N4,n.at,n.Tp,a.et,s.UP,n.IP,n.C$,(e,t,_,E,s,a,n,r,i)=>({devicesHaveLastFetchTime:e,hasSiteGateway:t,hasApAdopted:_,hasSwitchAdopted:E,hasL3SwitchAdopted:s,features:a,selfPreconfigureApprovals:n,siteGatewayInterfaces:r,isUsg:i}))},958372(e,t,_){_.d(t,{D:()=>o,b:()=>S});var E=_(296540),s=_(169568),a=_(916537),n=_(196010),r=_(928085),i=_(959341);const T=()=>{const e=(0,r.A)(i.tz);return E.createElement(n.A,{to:e},E.createElement(a.sA,{id:"COMMON_ACTION_MANAGE"}))},o={[s.v.SETTINGS_POLICY_ACL]:E.createElement(a.sA,{id:"SETTINGS_POLICY_TYPE_ACL_UNSUPPORTED"}),[s.v.SETTINGS_POLICY_QOS]:E.createElement(a.sA,{id:"SETTINGS_ZONE_BASED_FIREWALL_REQUIRED",values:{link:E.createElement(T,null)}}),[s.v.SETTINGS_POLICY_FIREWALL]:E.createElement(a.sA,{id:"SETTINGS_ZONE_BASED_FIREWALL_REQUIRED",values:{link:E.createElement(T,null)}}),[s.v.SETTINGS_POLICY_NAT]:E.createElement(a.sA,{id:"SETTINGS_NAT_NOT_SUPPORTED"}),[s.v.SETTINGS_POLICY_DNS]:E.createElement(a.sA,{id:"SETTINGS_DNS_NOT_SUPPORTED"}),[s.v.SETTINGS_POLICY_PORT_FORWARDING]:E.createElement(a.sA,{id:"SETTINGS_PORT_FORWARDING_NOT_SUPPORTED"}),[s.v.SETTINGS_POLICY_ROUTE]:E.createElement(a.sA,{id:"SETTINGS_ROUTING_NOT_SUPPORTED"})},S={[s.v.SETTINGS_WIFI]:e=>e?"COMMON_LOCKED_FEATURE_AP_PRECONFIGURED":"COMMON_LOCKED_FEATURE_AP",[s.v.SETTINGS_NETWORKS]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW_OR_AP",[s.v.SETTINGS_INTERNET]:e=>e?"COMMON_LOCKED_FEATURE_GW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW",[s.v.SETTINGS_TELEPORT]:e=>e?"COMMON_LOCKED_FEATURE_GW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW",[s.v.SETTING_ROUTING]:e=>e?"COMMON_LOCKED_FEATURE_GW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW",[s.v.SETTINGS_SECURITY]:e=>e?"COMMON_LOCKED_FEATURE_GW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW",[s.v.SETTINGS_ETHERNET_PORTS]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[s.v.SETTINGS_WIFI_SPEED_LIMIT_PROFILES]:e=>e?"COMMON_LOCKED_FEATURE_AP_PRECONFIGURED":"COMMON_LOCKED_FEATURE_AP",[s.v.NETWORK_OBJECTS]:e=>e?"COMMON_LOCKED_FEATURE_GW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW",[s.v.SETTINGS_VPN]:e=>e?"COMMON_LOCKED_FEATURE_GW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW",[s.v.SETTINGS_POLICY]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[s.v.SETTINGS_POLICY_ACL]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[s.v.SETTINGS_POLICY_QOS]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[s.v.SETTINGS_POLICY_NAT]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[s.v.SETTINGS_POLICY_DNS]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[s.v.SETTINGS_POLICY_PORT_FORWARDING]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[s.v.SETTINGS_POLICY_FIREWALL]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW",[s.v.SETTINGS_POLICY_ROUTE]:e=>e?"COMMON_LOCKED_FEATURE_GW_OR_SW_PRECONFIGURED":"COMMON_LOCKED_FEATURE_GW_OR_SW"}},687370(e,t,_){_.d(t,{r:()=>r});var E=_(296540),s=_(469733),a=_(528644),n=_(674319);function r(e){const t=(0,s.useSelector)(a.C);return(0,E.useMemo)(()=>(0,n.A)(e,t),[e,t])}},606081(e,t,_){_.d(t,{S:()=>r});var E=_(296540),s=_(469733),a=_(528644),n=_(674319);function r(e){const t=(0,s.useSelector)(a.C);return(0,E.useMemo)(()=>!(0,n.TM)(e,t)&&!(0,n.A)(e,t),[e,t])}},362412(e,t,_){_.d(t,{A:()=>S});var E=_(296540),s=_(469733),a=_(436331),n=_(805837),r=_(282556),i=_(71265);const T=e=>E.createElement(a.A,{renderOption:n.q,...e}),o=e=>E.createElement(T,{...e});o.Sorted=e=>{const t=(0,s.useSelector)(r.zi),_=(0,E.useMemo)(()=>(0,i.k)(t),[t]);return E.createElement(T,{...e,sortBy:_})};const S=o},71265(e,t,_){_.d(t,{R:()=>S,k:()=>l});var E=_(280258),s=_(190497),a=_(953048),n=_(175522),r=_(936621),i=_(742525);const T=[...new Set([E.H,n.Q.join(n.A),a.Zt,r.F,s.nc,i.Vr])],o={numeric:!0,sensitivity:"base"},S=(e,t)=>{const _=[];for(let E=e;E<=t;E+=1)_.push({value:E,label:String(E)});return _},l=e=>({value:t,label:_},{value:E,label:s})=>T.includes(t?.toString())||T.includes(E?.toString())?1/0:_?.toString().localeCompare(s?.toString(),e,o)??-1}}]);