"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[18817],{705228(e,t,n){n.d(t,{VT:()=>i,i9:()=>r,ng:()=>s,nt:()=>a});var o=n(888170);const r=n(132196).AH`
  font-size: ${o.Ay["font-size-m"]};
  font-weight: normal;
  border-radius: 0;
`,a=112,i=20,s=345},465543(e,t,n){n.d(t,{w:()=>i});var o=n(296540),r=n(469733),a=n(845030);const i=e=>{const t=(0,r.useDispatch)();(0,o.useEffect)(()=>{t((0,a.SQ)(e))},[t,e])}},853801(e,t,n){n.d(t,{y:()=>a});var o=n(349785),r=n(465543);const a=e=>{const t=(0,o.lN)(e);return(0,r.w)(t.isDirty)}},263130(e,t,n){n.d(t,{A:()=>m});var o=n(822336),r=n(296540),a=n(217439),i=n(71479),s=n(382389),l=n(566723),c=n(294303);const d=(0,i.A)(a.A)`
  line-height: 20px;
`,m=({icon:e,description:t,action:n,footer:a,background:i,...m})=>{const{themeName:u}=(0,s.u)();return r.createElement(c.A,{flexGrow:1,borderRadius:l.YC,padding:l.kc,background:i||o.Ay[`desktop-color-neutral-01-${u}`],gap:l.kc,flexDirection:"column",...m},r.createElement(c.A,{flexGrow:1,gap:l.kc},e,t?r.createElement(d,{size:"medium"},t):null,n?r.createElement(c.A,{marginLeft:"auto"},r.createElement(d,{size:"medium"},n)):null),a)}},823084(e,t,n){n.d(t,{A:()=>l});var o=n(822336),r=n(296540),a=n(162420),i=n(382389),s=n(263130);const l=({children:e,icon:t,background:n,...l})=>{const{themeName:c}=(0,i.u)();return r.createElement(s.A,{icon:t||r.createElement(a.A,{variant:"fill",size:"original",color:o.Ay[`desktop-color-ublue-06-${c}`]}),description:e,background:n,...l})}},689965(e,t,n){n.d(t,{A:()=>g,I:()=>o});var o,r=n(296540),a=n(822336),i=n(963724),s=n(71479),l=n(825032),c=n(566723),d=n(294303),m=n(311785);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(o||(o={}));const u=(0,s.A)(d.A,(0,m.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||a.Ay[n===l.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}})=>a.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,p=(0,s.A)(i.A,(0,m.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||a.Ay[n===l.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||a.Ay[t===l.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};
      }
    }
  }
`,g=({type:e,marginBottom:t,margin:n,padding:a,flex:i,width:s,nested:l,...c})=>"items"in c?r.createElement(p,{marginBottom:t,margin:n,padding:a,flex:i,nested:l,...c}):r.createElement(u,{nested:l,width:s,marginBottom:t,margin:n,padding:a,flex:i,isButtonList:e===o.BUTTON_LIST,...c},c.children)},349665(e,t,n){n.d(t,{A:()=>i});var o=n(296540),r=n(705228),a=n(294303);const i=({maxWidth:e,label:t,children:n,...i})=>o.createElement(a.A,{flexDirection:"column",width:"100%",maxWidth:"settingsGridContent"===e?r.ng:e,...i},t,n)},317672(e,t,n){n.d(t,{A:()=>c});var o=n(296540),r=n(498577),a=n(284428),i=n(566723),s=n(766624),l=n(294303);const c=({tooltip:e,htmlFor:t,children:n,labelProps:c,wrapperProps:d,tooltipProps:m})=>{const u=(0,a.iL)();return o.createElement(l.A,{alignItems:"center",gap:i.YC,...d},o.createElement(r.A,{htmlFor:t,color:"tertiary",...c,style:{opacity:u?i.xN:void 0,...c?.style}},n),e?o.createElement(s.A,{description:e,...m}):null)}},242366(e,t,n){n.d(t,{A:()=>i});var o=n(296540),r=n(566723),a=n(294303);const i=(0,o.forwardRef)((e,t)=>o.createElement(a.A,{ref:t,flexDirection:"column",gap:r.kc,width:"100%",...e}))},553432(e,t,n){n.d(t,{A:()=>s});var o=n(296540),r=n(454195),a=n(566723),i=n(294303);const s=e=>o.createElement(i.A,{paddingTop:a.YC,paddingBottom:a.YC,gap:a.Ln,rowGap:a.YC,flexWrap:"wrap",minHeight:r.b,alignItems:"center",...e})},42345(e,t,n){n.d(t,{A:()=>l});var o=n(296540),r=n(231755),a=n(566723),i=n(294303),s=n(689965);const l=({actions:e})=>o.createElement(s.A,{marginBottom:"none"},o.createElement(i.A,{flexDirection:"column",gap:a.kc,width:"100%"},e.filter(Boolean).map((e,t,n)=>o.createElement(o.Fragment,{key:[t,e.toString()].join()},e,t<n.length-1?o.createElement(i.A,{width:"100%",flexDirection:"column",paddingTop:a.YC,paddingBottom:a.YC},o.createElement(r.A,{orientation:"horizontal"})):null))))},175875(e,t,n){n.d(t,{A:()=>c});var o=n(469733),r=n(296540),a=n(592563),i=n(180524),s=n(602021),l=n(294303);const c=(0,r.forwardRef)(({allowReadOnly:e,disabledReason:t,...n},c)=>{const d=(0,o.useSelector)(s.EL)&&!e;return r.createElement(l.A,{alignItems:"center"},r.createElement(i.A,{description:t,placement:"left"},r.createElement(a.A,{fontSize:"medium",type:"button",...n,isDisabled:d||n.isDisabled||!!t,ref:c})))})},48925(e,t,n){n.d(t,{A:()=>E});var o=n(822336),r=n(296540),a=n(217439),i=n(71479),s=n(566723),l=n(968906),c=n(199582),d=n(311785),m=n(766624),u=n(294303),p=n(689965),g=n(242366);const A=(0,i.A)(p.A,(0,d.A)("isOutlined"))`
  border: ${({theme:{themeName:e},isOutlined:t})=>`1px solid ${t?o.Ay[`desktop-color-ublue-06-${e}`]:"transparent"}`};
`,E=({children:e,title:t,tooltip:n,tooltipProps:o,[c.L]:i,titleAction:d,isOutlined:p})=>{const E=(e=>r.Children.toArray(e).length>0)(e);return r.createElement(A,{marginBottom:"none",...l.A.addDataTestId(i??""),isOutlined:p},r.createElement(u.A,{flexDirection:"column",...E&&{gap:s.Ln},width:"100%"},t?r.createElement(u.A,{alignItems:"center",gap:s.YC,justifyContent:"space-between",width:"100%"},r.createElement(u.A,{gap:s.YC,alignItems:"center"},r.createElement(a.A,{variant:"heading-medium"},t),n?r.createElement(m.A,{description:n,portal:!0,...o}):null),d?r.createElement(u.A,null,d):null):null,E?r.createElement(g.A,null,e):null))}},704025(e,t,n){n.d(t,{i:()=>i});var o=n(296540),r=n(271856),a=n(805837);const i=e=>o.createElement(r.A,{description:e.option&&"tooltipDescription"in e.option?e.option.tooltipDescription:null,position:"left",portal:!0},o.createElement(a.q,{...e}))},373229(e,t,n){n.d(t,{A:()=>d});var o=n(296540),r=n(758649),a=n(71479),i=n(566723),s=n(916537),l=n(311785);const c=(0,a.A)("footer",(0,l.A)("hasFormResetButton"))`
  display: flex;
  justify-content: ${({hasFormResetButton:e})=>e?"space-between":"flex-end"};
  padding: ${i.S2} ${i.fS};
  gap: ${i.kc};
`,d=({allowCancel:e,isDirty:t,isInvalid:n,isSubmitting:a,onFormSubmit:i,onFormReset:l,onFormCancel:d,className:m,submitButtonText:u,customButton:p,applyButton:g,applyButtonFirst:A,hideCancelButton:E,form:f})=>{const h=(0,o.useMemo)(()=>g||o.createElement(r.A,{name:"submit",variant:"primary",type:"submit",onClick:i,disabled:!t||n||a,form:f},o.createElement(s.sA,{id:u||"COMMON_ACTION_APPLY_CHANGES"})),[g,f,t,n,a,i,u]);return o.createElement(c,{className:m,hasFormResetButton:!!l},A?h:p,E?null:o.createElement(r.A,{name:"cancel",variant:"default",type:"button",onClick:d,disabled:!e&&!t},o.createElement(s.sA,{id:"COMMON_ACTION_CANCEL"})),l?o.createElement(r.A,{name:"reset",variant:"default",type:"button",onClick:l,disabled:!t},o.createElement(s.sA,{id:"COMMON_ACTION_RESET_TO_DEFAULT"})):null,A?p:h)}},329109(e,t,n){n.d(t,{A:()=>d});var o=n(296540),r=n(691441),a=n(71479),i=n(132196),s=n(373229);const l=(0,a.A)("div")`
  height: 66px;
`,c=i.AH`
  padding: 0px !important;
`,d=({isDirty:e,onFormSubmit:t,onFormCancel:n,isInvalid:a,...i})=>e?o.createElement(r.A,null,o.createElement(s.A,{isDirty:e,onFormCancel:n,onFormSubmit:t,isInvalid:a,className:c,...i})):o.createElement(l,null)},504716(e,t,n){n.r(t),n.d(t,{default:()=>a});var o=n(296540),r=n(708390);const a=({activeItem:e})=>o.createElement(r.A,{key:e?._id,activeItem:e})},624461(e,t,n){n.d(t,{H5:()=>a,ZS:()=>i});var o=n(296540);const r=(0,o.createContext)(void 0),a=()=>{const e=(0,o.useContext)(r);return void 0===e?{sharedName:"",setSharedName:()=>{}}:e},i=({children:e})=>{const[t,n]=(0,o.useState)(""),a=(0,o.useMemo)(()=>({sharedName:t,setSharedName:n}),[t]);return o.createElement(r.Provider,{value:a},e)}},766624(e,t,n){n.d(t,{A:()=>l});var o=n(296540),r=n(271856),a=n(709690),i=n(284428),s=n(566723);const l=({description:e,isInteractive:t,portal:n=!0,cursorType:l,title:c,position:d,width:m,iconProps:u,disabled:p=!1})=>{const g=(0,i.Im)()||p,A=(0,i.q)();return o.createElement(r.A,{description:e,portal:n,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:l,title:c,position:d,width:m,disableHover:A},o.createElement(a.A,{isActive:!0,size:"original",opacity:g?s.xN:void 0,...u}))}},454195(e,t,n){n.d(t,{b:()=>o});const o=32},79786(e,t,n){n.d(t,{m:()=>s});var o=n(296540),r=n(349785),a=n(59116),i=n(870893);function s({schema:e,defaultValues:t,presets:n}){const s=(0,o.useMemo)(()=>n?(0,a.A)(n,e=>e.defaultValues):{},[n]),l=(0,o.useMemo)(()=>({...t,...s}),[s,t]),c=(0,r.mN)({resolver:(0,i.u)(e),shouldFocusError:!0,defaultValues:l,shouldUseNativeValidation:!1,mode:"onTouched"}),d=(0,o.useRef)(l);d.current=l;const m=(0,o.useCallback)((...e)=>{const[t,...n]=e;return c.reset(t?{...t,...s}:d.current,...n)},[s,c]);return{...c,reset:m,formState:{...c.formState,isDirty:!!Object.keys(c.formState.dirtyFields).length,isSubmitting:c.formState.isSubmitting},handleSubmit:(...e)=>c.handleSubmit(e[0],(t,...n)=>{const o=Object.keys(t)[0];if(o)try{const e=document.getElementsByName(o)?.[0];e?.scrollIntoView?.({behavior:"smooth",block:"center"}),e?.focus?.({preventScroll:!0})}catch{}e[1]?.(t,...n)})}}},451449(e,t,n){n.d(t,{I:()=>o});const o=(0,n(296540).createContext)({fields:!1,labels:!1,tooltipPopovers:!1,tooltipIcons:!1})},641777(e,t,n){n.d(t,{A:()=>i});var o=n(296540),r=n(284428),a=n(451449);const i=({isDisabled:e,isAdditive:t=!0,children:n})=>{const i=(0,r.pv)(),s=(0,o.useMemo)(()=>"boolean"==typeof e?{fields:e,labels:e,tooltipIcons:e,tooltipPopovers:!1}:e,[e]),l=(0,o.useMemo)(()=>({fields:t?s.fields||i.fields:s.fields,labels:t?s.labels||i.labels:s.labels,tooltipIcons:t?s.tooltipIcons||i.tooltipIcons:s.tooltipIcons,tooltipPopovers:t?s.tooltipPopovers||i.tooltipPopovers:s.tooltipPopovers}),[t,s.fields,s.labels,s.tooltipIcons,s.tooltipPopovers,i.fields,i.labels,i.tooltipIcons,i.tooltipPopovers]);return o.createElement(a.I.Provider,{value:l},n)}},284428(e,t,n){n.d(t,{Im:()=>l,iL:()=>c,mQ:()=>i,pv:()=>a,q:()=>s});var o=n(296540),r=n(451449);function a(){return(0,o.useContext)(r.I)}function i(){return a().fields}function s(){return a().tooltipPopovers}function l(){return a().tooltipIcons}function c(){return a().labels}},263963(e,t,n){n.d(t,{L_:()=>c,MS:()=>l,rn:()=>s});var o=n(296540),r=n(614476),a=n(916537);const i="{::}",s=(e,t)=>`${e}${i}${JSON.stringify(t??{})}`,l=(e,t)=>{if("string"!=typeof t)return;const[n,...o]=t.split(i);if(!n||!o.length)return t;let r={};try{r=Object.fromEntries(Object.entries(JSON.parse(o.join(i))).map(([t,n])=>[t,"string"==typeof n?l(e,n):n]))}catch{}return e.formatMessage({id:n},r)};function c(){const{formatMessage:e}=(0,a.tz)();return(0,o.useCallback)(t=>l({formatMessage:e},t),[e])}r.z.setErrorMap((e,t)=>e.message?{message:e.message}:e.code===r.z.ZodIssueCode.too_small&&"string"===e.type?{message:s("COMMON_MIN_CHARS",{min:Number(e.minimum)})}:e.code===r.z.ZodIssueCode.too_big&&"string"===e.type?{message:s("COMMON_MAX_CHARS",{name:s("COMMON_VALUE"),max:Number(e.maximum)})}:e.code===r.z.ZodIssueCode.invalid_type&&"array"===e.expected&&"undefined"===e.received?{message:s("COMMON_SELECT_AT_LEAST_ONE_ITEM")}:e.code===r.z.ZodIssueCode.too_small&&"array"===e.type?{message:s("COMMON_ADD_AT_LEAST_X_ITEMS",{min:Number(e.minimum)})}:e.code===r.z.ZodIssueCode.invalid_type&&"undefined"===e.received?{message:s("COMMON_VALIDATION_VALUE_REQUIRED")}:e.code===r.z.ZodIssueCode.invalid_type&&"number"===e.expected?{message:s("COMMON_VALIDATION_PLEASE_ENTER_A_NUMBER")}:{message:t.defaultError})},188738(e,t,n){n.d(t,{A:()=>u});var o=n(296540),r=n(436331),a=n(349785),i=n(704025),s=n(317672),l=n(349665),c=n(199582),d=n(263963),m=n(284428);const u=function({control:e,name:t,label:n,options:u,tooltip:p,tooltipProps:g,placeholder:A,renderOption:E,onChange:f,onAfterChange:h,searchable:I,searchableProps:v,portal:_,maxHeight:S,disableValidationMessage:b,isReadOnly:C,[c.L]:N}){const O=(0,m.mQ)(),T=(0,d.L_)();return o.createElement(a.xI,{control:e,name:t,render:({field:e,fieldState:c,formState:d})=>o.createElement(l.A,{gap:2},n?o.createElement(s.A,{htmlFor:t,tooltip:p,tooltipProps:{portal:!0,...g}},n):null,o.createElement(r.A,{variant:"secondary",width:"100%",renderOption:E??i.i,options:u,...e,readOnly:C,disabled:O,onChange:(t,n)=>{const o=f?f(n,{field:e,fieldState:c,formState:d}):e.onChange(n);return h?.(n),o},value:e.value??"",invalid:c.invalid&&!b?T((0,a.Jt)(d.errors,t)?.message)||!0:void 0,placeholder:A,searchable:I,searchableProps:v,portal:_,"data-testid":N,maxHeight:S}))})}},610356(e,t,n){n.d(t,{A:()=>d});var o=n(296540),r=n(349785),a=n(54227),i=n(566723),s=n(766624),l=n(294303),c=n(284428);const d=(0,o.forwardRef)(function({control:e,name:t,children:n,tooltip:d,tooltipProps:m,value:u,onCheck:p,...g},A){const E=(0,c.mQ)();return o.createElement(r.xI,{control:e,name:t,render:({field:e})=>o.createElement(l.A,{gap:i.YC,alignItems:"center",ref:A,...g},o.createElement(a.A,{id:e.name,onChange:({target:{checked:t}})=>{t&&(e.onChange(u),p?.())},checked:e.value===u,disabled:E,value:e.value},n),d?o.createElement(s.A,{description:d,...m}):null)})})},895424(e,t,n){n.d(t,{A:()=>d});var o=n(296540),r=n(349785),a=n(438628),i=n(705145),s=n(566723),l=n(263963),c=n(284428);const d=function({control:e,name:t,label:n,placeholder:d,tooltip:m,tooltipProps:u,autoFocus:p,motif:g,onChange:A,onBlur:E,onAfterChange:f,onPaste:h,onKeyDown:I,passwordToggle:v,type:_,helperMessage:S,autoComplete:b,contentBefore:C,contentAfter:N,onFocus:O,value:T,invalid:M}){const y=(0,c.mQ)(),D=(0,c.Im)(),L=(0,c.q)(),R=(0,l.L_)();return o.createElement(r.xI,{control:e,name:t,render:({field:e,fieldState:l,formState:c})=>o.createElement(a.A,{type:_||(v?"password":"text"),variant:"secondary",width:"100%",autoFocus:p,...e,onChange:t=>{A?A(t,e,c):e.onChange(t),f?.(t)},onBlur:t=>{E?E(t,e,c):e.onBlur()},onFocus:O,onPaste:h,disabled:y,value:T??e.value?.toString(),invalid:M||(l.invalid?o.createElement(i.A,{variant:"inherit",style:{overflowWrap:"break-word"}},R((0,r.Jt)(c.errors,t)?.message)||!0," "):void 0),label:n,placeholder:d,labelTooltip:m,labelTooltipProps:{style:{opacity:D?s.xN:void 0,pointerEvents:L?"none":void 0,...u?.style},...u},motif:g,passwordToggle:v,helperMessage:S,autoComplete:b,onKeyDown:I,contentBefore:C,contentAfter:N})})}},143985(e,t,n){n.d(t,{B:()=>s,b:()=>i});var o=n(614476),r=n(620637),a=n(263963);const i=o.z.string({message:(0,a.rn)("COMMON_VALIDATION_VALID_IPV4")}).refine(e=>!e||(0,r.isValidIpv4)(e),{message:(0,a.rn)("COMMON_VALIDATION_VALID_IPV4")}),s=o.z.string({message:(0,a.rn)("COMMON_VALIDATION_VALID_IPV4")}).refine(e=>(0,r.isValidIpv4)(e),{message:(0,a.rn)("COMMON_VALIDATION_VALID_IPV4")})},303303(e,t,n){n.d(t,{Jh:()=>s,XK:()=>i,m9:()=>l});var o=n(614476),r=n(383653),a=n(263963);const i=o.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")}),s=o.z.union([o.z.string().ip({version:"v6",message:(0,a.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}),o.z.literal("")]).optional().refine(e=>!e||!e.includes("%"),{message:(0,a.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_INVALID")}),l=i.refine(e=>!(0,r.m0)(e),{message:(0,a.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_IPV4_MAPPED_IPV6_INVALID")}).refine(e=>!(0,r.aN)(e),{message:(0,a.rn)("SETTINGS_NETWORKS_IPV6_ADDRESS_MULTICAST_INVALID")})},767028(e,t,n){n.d(t,{V:()=>i});var o=n(296540),r=n(977735);const a=e=>{const t=(0,o.useRef)(e);return(0,o.useEffect)(()=>{t.current=e},[e]),(0,o.useCallback)((...e)=>t.current(...e),[])};function i(e,t){const n=(0,o.useRef)([]),[,i]=(0,o.useState)(0),[s,l]=(0,o.useState)(null);(0,o.useEffect)(()=>{const e=setInterval(()=>{n.current.length&&t?.estimatedDurationMs&&i(e=>e+1)},1e3);return()=>clearInterval(e)},[t?.estimatedDurationMs]);const c=t?.dedupe??!1,d=a(t?.onSuccess||(()=>{})),m=a(t?.onError||(()=>{})),u=(0,o.useCallback)((...o)=>{if(c&&n.current.length)return Promise.reject();const a=(async()=>e(...o))();return n.current.push({promise:a,startedAt:Date.now()}),i(e=>e+1),a.then(e=>(d?.(e),l(e),e)).catch(async e=>{if(t?.delayOnErrorMs&&await(0,r.u)(t.delayOnErrorMs),l(null),!m)throw e;m(e)}).finally(async()=>{n.current=n.current.filter(e=>e.promise!==a),i(e=>e+1)})},[e,c,m,d,t?.delayOnErrorMs]),p=n.current.at(-1),g=p&&t?.estimatedDurationMs?Math.min((Date.now()-p.startedAt)/t.estimatedDurationMs,.9):void 0;return{execute:u,isLoading:!!n.current.length,lastData:s,estimatedProgress:g}}},464265(e,t,n){n.d(t,{A:()=>i});var o=n(296540),r=n(469733),a=n(792072);const i=e=>(0,r.useSelector)((0,o.useMemo)(()=>(0,a.jN)(e),[e]))},832468(e,t,n){n.d(t,{A:()=>h});var o=n(296540),r=n(42345),a=n(469733),i=n(742920),s=n(38671),l=n(767028),c=n(175875),d=n(675359),m=n(916537);const u=({onResume:e,disabledReason:t})=>{const n=(0,a.useDispatch)(),r=(0,l.V)(()=>e(),{onError:e=>{const t=(0,s.F)(e)?e:void 0;return n((0,d.ox)({icon:i.C.danger,message:"SETTINGS_POLICY_RESUME_FAILURE",values:{count:1},errorMessage:t?.msg,errorValues:t}))}});return o.createElement(c.A,{onPress:r.execute,isDisabled:r.isLoading,disabledReason:t},o.createElement(m.sA,{id:"COMMON_ACTION_RESUME"}))};var p=n(147606),g=n(294303),A=n(566723);const E=({onRemove:e,name:t,disabledReason:n,additionalMessage:r})=>{const u=(0,a.useDispatch)(),E=(0,l.V)(()=>e(),{onError:e=>{const t=(0,s.F)(e)?e:void 0;return u((0,d.ox)({icon:i.C.danger,message:"SETTINGS_POLICY_DELETE_FAILURE",values:{count:1},errorMessage:t?.msg,errorValues:t}))}});return o.createElement(p.A,{trigger:o.createElement(c.A,{variant:"destructive",disabledReason:n},o.createElement(m.sA,{id:"COMMON_ACTION_REMOVE"})),title:o.createElement(m.sA,{id:"SETTINGS_SECURITY_REMOVE_POLICY_TITLE",values:{count:1}}),message:r?o.createElement(g.A,{flexDirection:"column",gap:A.kc},o.createElement(m.sA,{id:"SETTINGS_SECURITY_REMOVE_FIREWALL_POLICY_SINGLE_MESSAGE",values:{name:t}}),r):o.createElement(m.sA,{id:"SETTINGS_SECURITY_REMOVE_FIREWALL_POLICY_SINGLE_MESSAGE",values:{name:t}}),onConfirm:()=>E.execute()})},f=({name:e,onPause:t,disabledReason:n})=>{const r=(0,a.useDispatch)(),u=(0,l.V)(()=>t(),{onError:e=>{const t=(0,s.F)(e)?e:void 0;return r((0,d.ox)({icon:i.C.danger,message:"SETTINGS_POLICY_PAUSE_FAILURE",values:{count:1},errorMessage:t?.msg,errorValues:t}))}});return o.createElement(p.A,{trigger:o.createElement(c.A,{isDisabled:u.isLoading,disabledReason:n},o.createElement(m.sA,{id:"COMMON_ACTION_PAUSE"})),confirmButtonVariant:"emphasis",title:o.createElement(m.sA,{id:"SETTINGS_SECURITY_PAUSE_POLICY_TITLE",values:{count:1}}),message:o.createElement(m.sA,{id:"SETTINGS_SECURITY_PAUSE_FIREWALL_POLICY_MESSAGE_SINGLE",values:{name:e}}),onConfirm:()=>u.execute()})},h=({enabled:e,name:t,onPause:n,pauseDisabledReason:a,onResume:i,resumeDisabledReason:s,onRemove:l,removeDisabledReason:c,removeAdditionalMessage:d})=>o.createElement(r.A,{actions:[e?o.createElement(f,{name:t,onPause:n,disabledReason:a}):o.createElement(u,{onResume:i,disabledReason:s}),o.createElement(E,{name:t,onRemove:l,disabledReason:c,additionalMessage:d})]})},977735(e,t,n){n.d(t,{u:()=>o});const o=e=>new Promise(t=>{setTimeout(t,e)})}}]);