"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[50078],{287654(e,t,n){n.d(t,{A:()=>o});const o=(0,n(602086).createContext)({isStandalone:!0,header:[null,()=>{}],footer:[null,()=>{}]})},388294(e,t,n){n.d(t,{A:()=>i});var o=n(602086),r=n(287654);function i(e){const{children:t}=e,{isStandalone:n,footer:[,i]}=(0,o.useContext)(r.A);return(0,o.useLayoutEffect)(()=>{if(!n)return i(t),()=>i(null)},[n,t]),o.createElement(o.Fragment,null,n&&t)}},840800(e,t,n){n.d(t,{A:()=>N});var o=n(602086),r=n(692741),i=n(162141),a=n(148742),s=n(222542),l=n(830990),d=n(470153),c=n(369456),h=n(861956),m=n(419488),u=n(73774),p=n(907901),g=n(496807),f=n(285489),A=n(185589),v=n(54895),x=n(310749),b=n(572806),I=n(62129),E=n(490138);const C=(0,x.c)(A.A),w=({targetRef:e,render:t})=>{const{width:n=0,height:o=0}=(0,i.A)({targetRef:e});return t({width:n,height:o})},S=({children:e,...t})=>{const{props:{tableClassName:n,renderPlaceholder:r,placeholderClassName:i,motif:a},noItems:s,tableBody:d}=(0,o.useContext)(p.A);return o.createElement(o.Fragment,null,o.createElement(c.A,{className:n,...t},o.createElement(m.A,{ref:d},e)),s&&void 0!==r&&o.createElement("div",{className:C.concat(i)("placeholder")},o.createElement(l.A,{variant:"fill",className:C("placeholderIcon",`placeholderIcon-${a}`),size:"large"}),r()))},T=({index:e,data:t,style:n,rowComponent:r})=>{const i=(0,o.useContext)(p.A);return o.createElement(g.A,{row:t[e],rowIndex:e,calculatedStyles:n,context:i,rowComponent:r})},_=(0,s.A)((e,t,n,o,r=8,i=8)=>o+i<n*t?e+r:e),y=(0,s.A)((e,t,n,o,r)=>o&&r&&r+n<e?e:t),N=(0,E.A)(class extends o.Component{constructor(e){super(e),this.tableBodyRef=(0,o.createRef)(),this.onColumnFilterChanged=({checked:e,id:t,headerWidth:n})=>{if(!1===e){if(this.state.headerWidth){const e=this.columnWidths[t];e&&e>0&&this.setState({headerWidth:this.state.headerWidth-e}),delete this.columnWidths[t]}}else this.setState({headerWidth:n})},this.renderRow=e=>o.createElement(T,{rowComponent:this.props.renderRow,...e}),this.state={headerWidth:void 0},this.columnWidths={}}render(){const e=(0,a.A)({},this.props,this.props.variant===v.p.NARROW?f.BC:v.q),{headerHeight:t,rowHeight:n,motif:i="light",renderFooter:s,className:l,width:m,tableClassName:g,overscanCount:x,forwardedRef:E,listRef:T,scrollbarWidth:N=8,horizontalOverflow:L,showSkeleton:$,columns:j,variant:R,onScroll:O,outerRef:M}=e;return $?o.createElement(b.A,{width:m},o.createElement(I.A.Table,{motif:i,columns:I.A.utils.safeConvertSkeletonColumns(j),rowHeight:n,headerHeight:t})):o.createElement(u.A,{virtualize:!0,...e,onColumnFilterChanged:this.onColumnFilterChanged.bind(this),ref:E},o.createElement(p.A.Consumer,null,({visibleColumns:e,props:t,isHierarchy:a,renderedItems:u})=>{const p=function(e,t,n){const{multiSelectMode:o,renderPopoverContent:r,renderRowPopoverContent:i,disableColumnFilters:a}=t;return e.reduce((e,t)=>e+Math.max(t.width||0,t.minWidth||0,40),0)+(o?40:0)+(n?32:0)+("function"==typeof r||"function"==typeof i?50:0)+(a?2:50)}(e,t,a),v=this.state.headerWidth?Math.max(this.state.headerWidth,p):p;return o.createElement(d.A,{className:C.concat(l)(A.A.virtualizedTableContainer,A.A[`virtualizedTableContainer-${i}`],L&&A.A["virtualizedTableContainer-scrollable"]),motif:i,width:(0,f.OG)(m),style:{minWidth:L?"unset":`${v}px`},variant:R},o.createElement(c.A,{className:C.concat(g)(A.A.noBorderBottom),motif:i},o.createElement(h.A,null)),o.createElement("div",{className:C(A.A.virtualizedTableContent),ref:this.tableBodyRef},o.createElement(w,{targetRef:this.tableBodyRef,render:({height:e,width:t})=>{var a;return o.createElement(r.Y1,{height:e,width:y(_(Math.max(t,v),u.length,n,e,N),Math.max(t,v),N,L,null===(a=this.tableBodyRef.current)||void 0===a?void 0:a.clientWidth),itemSize:n,itemCount:u.length,itemData:u,overscanCount:x,innerElementType:S,ref:T,className:C(A.A.scrollBar,A.A[`scrollBar-${i}`]),onScroll:O,outerRef:M},this.renderRow)}})),"function"==typeof s&&o.createElement("div",{className:C(A.A.footer,A.A[i])},s()))}))}})},547967(e,t,n){n.d(t,{AC:()=>u,D7:()=>p,Ie:()=>E,JL:()=>v,JX:()=>I,KY:()=>g,O2:()=>m,Op:()=>h,Rm:()=>f,e$:()=>x,t7:()=>A,yr:()=>b});var o=n(179102),r=n(505817),i=n(247816),a=n(409844),s=n(291508),l=n(61322),d=n(309130),c=n(100978);const h=(0,i.A)(c.A,(0,s.A)("inline","wrap"))`
  position: relative;
  flex: ${({inline:e})=>e?"1 1 0":"0 0 100%"};
  align-items: flex-start;
  flex-flow: ${({wrap:e})=>"row "+(e?"wrap":"nowrap")};
  gap: ${d.kc};
`,m=(0,i.A)(c.A,(0,s.A)("editMaxHeight","editFieldWrap"))`
  flex-direction: column;
  max-height: ${({editMaxHeight:e})=>`${e||300}px`};
  overflow-y: auto;
  overflow-x: hidden;
  gap: ${d.YC};

  ${({editFieldWrap:e,theme:{themeName:t}})=>e?`\n    gap: 0;\n\n    > * {\n      border-bottom: ${r.Ay[`desktop-border-divider-${t}`]};\n      padding-bottom: ${d.kc};\n      padding-top: ${d.kc};\n    }\n\n    > *:first-child {\n      padding-top: 0;\n    }\n\n    > *:last-child {\n      border-bottom: none;\n      padding-bottom: 0;\n    }\n  `:""}
`,u=(0,i.A)("div",(0,s.A)("isWindowsTable","rows","tableMaxHeight","marginTop"))`
  width: 100%;
  // windows table inherits height from parent container
  height: ${({rows:e,isWindowsTable:t})=>t&&`${l.I.ROW_HEIGHT*e+l.I.HEADER_HEIGHT}`}px;
  max-height: ${({tableMaxHeight:e})=>e?`${e}px`:"auto"};
  margin-top: ${({marginTop:e})=>e||d.Ln};

  table {
    td {
      max-width: 170px;

      span {
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }
  }
`,p=(0,i.A)(o.A)`
  margin-right: ${d.YC};
`,g=a.AH`
  :first-of-type {
    padding: 0 ${d.fS} 0 0px;
  }
`,f="drag-and-drop-table-row-placeholder",A=(0,i.A)(c.A)`
  flex-direction: column;

  /* Adjust weird padding on the right side for the ID column when right aligned (drag & drop table) */
  table > thead > tr > th:last-of-type {
    padding-right: ${d.kc};
  }

  /* Add missing border between drag and drop groups (tbody elements) */
  table > tbody {
    border-bottom: ${({theme:{themeName:e}})=>r.Ay[`desktop-border-divider-${e}`]};
  }
  /* Last cell in table is hover content which is not used in this table */
  table > tbody[data-rbd-droppable-context-id] td:not(:last-of-type),
  table > thead > tr > th {
    /* Align drag & drop table cell padding to regular table padding */
    padding-right: ${d.kc} !important;
  }
  /* Align drop zone placeholder row when a row is dragged to matched the CSS overrides for drag and drop table we use */
  table .${f} {
    display: flex;
  }
`,v=a.AH`
  /* This is default for the table rows, so we need it for the header. */
  display: flex;
  width: 100%;

  > th:first-child {
    /* Since we flex the header, we must specify this to align with the table rows. */
    width: 24px;
  }
  > th:not(:first-child) {
    /* Something inside UIC sets the padding to 8px for table header and 5px for table rows. This aligns it to make flex work. */
    padding-right: ${d.kc} !important;
  }
`,x=a.AH`
  /* Override the padding-right of the first column to align with manage + drop modes. */
  > th:first-child {
    padding-right: ${d.kc} !important;
  }
  > th:first-child:has(> label) {
    padding-right: 1px !important;
    width: 36px;
  }
`,b=a.AH`
  /* UIC already does this for some table states, like drag and drop and when in manage mode. If we just use this ALWAYS, we're avoiding many issues related to using different alignment techniques in different places. */
  display: flex;
`,I=a.AH`
  tbody {
    display: flex;
    flex-direction: column;
  }
`;function E(e,t){return a.AH`
    width: ${t.width?`${t.width}px`:"auto"};
    min-width: ${t.minWidth?`${t.minWidth}px`:"0px"};
    flex: ${t.growthFactor||0} !important;
    padding-left: ${d.kc} !important;
    padding-right: ${d.kc} !important;
  `}},256468(e,t,n){var o;n.d(t,{EE:()=>i,Uh:()=>o,Vf:()=>r}),function(e){e.SINGLE="single",e.PLURAL="plural"}(o||(o={}));const r="editActive",i=20},531984(e,t,n){n.d(t,{w:()=>a});var o=n(602086),r=n(977872),i=n(205521);const a=e=>{const t=(0,r.wA)();(0,o.useEffect)(()=>{t((0,i.SQ)(e))},[t,e])}},762542(e,t,n){n.d(t,{y:()=>r});var o=n(531984);const r=e=>(0,o.w)(e.formState.isDirty)},612389(e,t,n){n.d(t,{A:()=>h});var o=n(274934),r=n(505817),i=n(179102),a=n(247816),s=n(263705),l=n(309130),d=n(100978);const c=(0,a.A)(i.A)`
  line-height: 20px;
`,h=({icon:e,description:t,action:n,footer:i,background:a,...h})=>{const{themeName:m}=(0,s.u)();return(0,o.jsxs)(d.A,{flexGrow:1,borderRadius:l.YC,padding:l.kc,background:a||r.Ay[`desktop-color-neutral-01-${m}`],gap:l.kc,flexDirection:"column",...h,children:[(0,o.jsxs)(d.A,{flexGrow:1,gap:l.kc,children:[e,t?(0,o.jsx)(c,{size:"medium",children:t}):null,n?(0,o.jsx)(d.A,{marginLeft:"auto",children:(0,o.jsx)(c,{size:"medium",children:n})}):null]}),i]})}},753959(e,t,n){n.d(t,{A:()=>l});var o=n(274934),r=n(505817),i=n(247368),a=n(263705),s=n(612389);const l=({children:e,icon:t,background:n,...l})=>{const{themeName:d}=(0,a.u)();return(0,o.jsx)(s.A,{icon:t||(0,o.jsx)(i.A,{variant:"fill",size:"original",color:r.Ay[`desktop-color-ublue-06-${d}`]}),description:e,background:n,...l})}},535322(e,t,n){n.d(t,{A:()=>p,I:()=>o});var o,r=n(274934),i=n(505817),a=n(753583),s=n(247816),l=n(565527),d=n(309130),c=n(100978),h=n(291508);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(o||(o={}));const m=(0,s.A)(c.A,(0,h.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||i.Ay[n===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-${l.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${l.S.LIGHT}`]};
  ${({nested:e,theme:{themeName:t}})=>e?`border: ${i.Ay[`desktop-border-divider-${t}`]};`:""}
  padding: ${({isButtonList:e,padding:t})=>t||(e?`0 ${d.Ln}`:d.Ln)};
  margin-bottom: ${({marginBottom:e})=>e||d.Ln};
  ${({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}})=>i.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,u=(0,s.A)(a.A,(0,h.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||i.Ay[n===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-${l.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${l.S.LIGHT}`]};
  ${({nested:e,theme:{themeName:t}})=>e?`border: ${i.Ay[`desktop-border-divider-${t}`]};`:""}
  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,nested:t,theme:{themeName:n}})=>e||i.Ay[n===l.S.DARK?`desktop-color-neutral-${t?"00":"01"}-${l.S.DARK}`:`desktop-color-neutral-${t?"01":"00"}-${l.S.LIGHT}`]};
      height: 48px;
      padding: 0 ${d.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${d.Ln} ${d.Ln};
      }
    }
  }
`,p=({type:e,marginBottom:t,margin:n,padding:i,flex:a,width:s,nested:l,...d})=>"items"in d?(0,r.jsx)(u,{marginBottom:t,margin:n,padding:i,flex:a,nested:l,...d}):(0,r.jsx)(m,{nested:l,width:s,marginBottom:t,margin:n,padding:i,flex:a,isButtonList:e===o.BUTTON_LIST,...d,children:d.children})},506770(e,t,n){n.d(t,{A:()=>s});var o=n(274934),r=n(179102),i=n(654181),a=n(470070);const s=()=>(0,o.jsx)(i.A,{type:"warning",text:(0,o.jsx)(r.A,{size:"medium",color:"text-2",children:(0,o.jsx)(a.sA,{id:"COMMON_PRIVATE_MAC_BANNER"})})})},796091(e,t,n){n.d(t,{A:()=>s});var o=n(274934),r=n(833466),i=n(309130),a=n(100978);const s=e=>(0,o.jsx)(a.A,{paddingTop:i.YC,paddingBottom:i.YC,gap:i.Ln,rowGap:i.YC,flexWrap:"wrap",minHeight:r.b,alignItems:"center",...e})},199742(e,t,n){n.d(t,{A:()=>d});var o=n(274934),r=n(602086),i=n(798282),a=n(309130),s=n(100978),l=n(535322);const d=({actions:e})=>(0,o.jsx)(l.A,{marginBottom:"none",children:(0,o.jsx)(s.A,{flexDirection:"column",gap:a.kc,width:"100%",children:e.filter(Boolean).map((e,t,n)=>(0,o.jsxs)(r.Fragment,{children:[e,t<n.length-1?(0,o.jsx)(s.A,{width:"100%",flexDirection:"column",paddingTop:a.YC,paddingBottom:a.YC,children:(0,o.jsx)(i.A,{orientation:"horizontal"})}):null]},[t,e.toString()].join()))})})},963428(e,t,n){n.d(t,{A:()=>c});var o=n(274934),r=n(977872),i=n(602086),a=n(266824),s=n(669439),l=n(897166),d=n(100978);const c=(0,i.forwardRef)(({allowReadOnly:e,disabledReason:t,...n},i)=>{const c=(0,r.d4)(l.EL)&&!e;return(0,o.jsx)(d.A,{alignItems:"center",children:(0,o.jsx)(s.A,{description:t,placement:"left",children:(0,o.jsx)(a.A,{fontSize:"medium",type:"button",...n,isDisabled:c||n.isDisabled||!!t,ref:i})})})})},480562(e,t,n){n.d(t,{i:()=>a});var o=n(274934),r=n(548941),i=n(711892);const a=e=>(0,o.jsx)(r.A,{description:e.option&&"tooltipDescription"in e.option?e.option.tooltipDescription:null,position:"left",portal:!0,children:(0,o.jsx)(i.q,{...e})})},139748(e,t,n){n.r(t),n.d(t,{default:()=>i});var o=n(274934),r=n(305793);const i=({activeItem:e})=>(0,o.jsx)(r.A,{activeItem:e},e?._id)},420174(e,t,n){n.d(t,{H5:()=>a,ZS:()=>s});var o=n(274934),r=n(602086);const i=(0,r.createContext)(void 0),a=()=>{const e=(0,r.useContext)(i);return void 0===e?{sharedName:"",setSharedName:()=>{}}:e},s=({children:e})=>{const[t,n]=(0,r.useState)(""),a=(0,r.useMemo)(()=>({sharedName:t,setSharedName:n}),[t]);return(0,o.jsx)(i.Provider,{value:a,children:e})}},61322(e,t,n){n.d(t,{I:()=>o});const o={HEADER_HEIGHT:32,ROW_HEIGHT:32,EDIT_FIELD_HEIGHT:36,getHeight(e,t,n,o){return Math.min((o||this.ROW_HEIGHT)*e+(n??this.HEADER_HEIGHT),(o||this.ROW_HEIGHT)*t+(n??this.HEADER_HEIGHT))},getEditContainerHeight(e,t,n){return Math.min((n||this.EDIT_FIELD_HEIGHT)*e,(n||this.EDIT_FIELD_HEIGHT)*t)}}},858098(e,t,n){n.d(t,{A:()=>h});var o=n(274934),r=n(602086),i=n(42220),a=n(260334),s=n(184931),l=n(100978),d=n(470070),c=n(680163);const h=function({form:e,name:t,fieldLabel:n,modalTitle:h,modalFieldPlaceholder:m,placeholder:u,itemSchema:p,transformValue:g,getDuplicationMessage:f,extraDisplayColumns:A,actions:v,max:x,disableMultiEdit:b=!1,splitBy:I,validateInArray:E,sortValue:C,hideBatchAddLabel:w=!1}){const S=(0,s.mQ)(),T=(0,a.L_)(),{formatMessage:_}=(0,d.tz)(),y=(0,r.useMemo)(()=>({fieldLabel:n,modalTitle:h,modalFieldPlaceholder:m}),[n,m,h]),N=(0,r.useMemo)(()=>({getDuplicationMessage:f??(()=>_({id:"SETTINGS_VALUE_UNIQUE"})),validateInArray:E,validate:e=>{if(I&&"string"==typeof e){const t=e.split(I).map(e=>e.trim()).filter(Boolean);for(const n of t.length>0?t:[e]){const e=p.safeParse(n);if(!e.success)return T(e.error.issues[0]?.message)}return!0}const t=p.safeParse(e);return!!t.success||T(t.error.issues[0]?.message)}}),[_,T,f,p,I,E]),L=(0,r.useMemo)(()=>({placeholder:u,translatePlaceholder:!1,parser:g?e=>g(e?.[0]?.target?.value):void 0}),[u,g]);return(0,o.jsx)(i.xI,{control:e.control,name:t,render:({field:e,fieldState:t,formState:n})=>(0,o.jsx)(l.A,{flexDirection:"column",width:"100%",children:(0,o.jsx)(c.A,{disabled:S,labels:y,fieldValidation:N,extraFieldConfig:L,value:C?C(e.value||[]):e.value||[],onChange:t=>e.onChange(t),invalid:t.invalid?T((0,i.Jt)(n.errors,e.name)?.message)||!0:void 0,extraDisplayColumns:A,actions:v,disableMultiEdit:b,max:x,splitBy:I,transformValue:g,hideBatchAddLabel:w})})})}},846294(e,t,n){n.d(t,{A:()=>d});var o=n(274934),r=n(548941),i=n(409844),a=n(184931),s=n(877840);const l=i.AH`
  width: fit-content;
`,d=({reasons:e,reason:t,children:n,isInteractive:i,noWrap:d,position:c,fitContent:h})=>{const m=(0,a.pv)(),u=[t,...e||[]].filter(Boolean)[0]||null,p=!!u;return(0,o.jsx)(s.A,{isDisabled:{fields:p,labels:p,tooltipIcons:p,tooltipPopovers:!m.fields&&p},children:(0,o.jsx)(r.A,{description:m.fields?null:u,portal:!0,isInteractive:i,noWrap:d,position:c,className:h?l:void 0,children:n})})}},877840(e,t,n){n.d(t,{A:()=>s});var o=n(274934),r=n(602086),i=n(184931),a=n(712642);const s=({isDisabled:e,isAdditive:t=!0,children:n})=>{const s=(0,i.pv)(),l=(0,r.useMemo)(()=>"boolean"==typeof e?{fields:e,labels:e,tooltipIcons:e,tooltipPopovers:!1}:e,[e]),d=(0,r.useMemo)(()=>({fields:t?l.fields||s.fields:l.fields,labels:t?l.labels||s.labels:l.labels,tooltipIcons:t?l.tooltipIcons||s.tooltipIcons:l.tooltipIcons,tooltipPopovers:t?l.tooltipPopovers||s.tooltipPopovers:l.tooltipPopovers}),[t,l.fields,l.labels,l.tooltipIcons,l.tooltipPopovers,s.fields,s.labels,s.tooltipIcons,s.tooltipPopovers]);return(0,o.jsx)(a.I.Provider,{value:d,children:n})}},625133(e,t,n){n.d(t,{A:()=>c});var o=n(274934),r=n(42220),i=n(221835),a=n(309130),s=n(304151),l=n(100978),d=n(184931);const c=function({control:e,name:t,children:n,tooltip:c,tooltipProps:h,onToggle:m,renderCheckbox:u,inputClassName:p,isDisabled:g,isChecked:f}){const A=(0,d.mQ)()||g;return(0,o.jsx)(r.xI,{control:e,name:t,render:({field:e})=>{const t=(0,o.jsx)(i.A,{id:e.name,onChange:({target:{checked:t}})=>{e.onChange(t),m?.(t)},checked:f??!!e.value,disabled:A,inputClassName:p,children:n});return(0,o.jsxs)(l.A,{gap:a.YC,alignItems:"center",children:[u?u(t,e):t,c?(0,o.jsx)(s.A,{description:c,...h}):null]})}})}},689941(e,t,n){n.d(t,{A:()=>m});var o=n(274934),r=n(310075),i=n(42220),a=n(480562),s=n(164487),l=n(597750),d=n(147045),c=n(260334),h=n(184931);const m=function({control:e,name:t,label:n,options:m,tooltip:u,tooltipProps:p,placeholder:g,renderOption:f,onChange:A,onAfterChange:v,searchable:x,searchableProps:b,portal:I,maxHeight:E,variant:C="secondary",disableValidationMessage:w,isReadOnly:S,[d.L]:T}){const _=(0,h.mQ)(),y=(0,c.L_)();return(0,o.jsx)(i.xI,{control:e,name:t,render:({field:e,fieldState:d,formState:c})=>(0,o.jsxs)(l.A,{gap:2,children:[n?(0,o.jsx)(s.A,{htmlFor:t,tooltip:u,tooltipProps:{portal:!0,...p},children:n}):null,(0,o.jsx)(r.A,{variant:C,width:"100%",renderOption:f??a.i,options:m,...e,readOnly:S,disabled:_,onChange:(t,n)=>{const o=A?A(n,{field:e,fieldState:d,formState:c}):e.onChange(n);return v?.(n),o},value:e.value??"",invalid:d.invalid&&!w?y((0,i.Jt)(c.errors,t)?.message)||!0:void 0,placeholder:g,searchable:x,searchableProps:b,portal:I,"data-testid":T,maxHeight:E})]})})}},749445(e,t,n){n.d(t,{A:()=>h});var o=n(274934),r=n(42220),i=n(309130),a=n(897396),s=n(470070),l=n(260334),d=n(184931);const c=[],h=function({control:e,name:t,tooltip:n,options:h,triggerButtonText:m,truncateLabels:u=!0,isWindowed:p,searchOptions:g,maxSelections:f,narrowTrigger:A,chipClassName:v,label:x,onAfterChange:b}){const I=(0,d.mQ)(),E=(0,l.L_)();return(0,o.jsx)(r.xI,{control:e,name:t,render:({field:e,fieldState:l,formState:d})=>(0,o.jsx)(a.A,{name:e.name,onChange:t=>{e.onChange(t),b?.(t)},disabled:I,value:e.value||c,tooltipDescription:n,options:h,truncateLabels:u,invalid:l.invalid?E((0,r.Jt)(d.errors,t)?.message)||!0:void 0,translateTriggerButtonText:!1,triggerButtonText:m??(0,o.jsx)(s.sA,{id:"COMMON_EDIT_SELECTIONS"}),isWindowed:p,searchOptions:g,maxSelections:f,isFullWidth:!0,triggerButtonHeight:A?i.S2:void 0,chipClassName:v,label:x})})}},482609(e,t,n){n.d(t,{A:()=>h});var o=n(274934),r=n(602086),i=n(42220),a=n(87562),s=n(309130),l=n(304151),d=n(100978),c=n(184931);const h=(0,r.forwardRef)(function({control:e,name:t,children:n,tooltip:r,tooltipProps:h,value:m,onCheck:u,...p},g){const f=(0,c.mQ)();return(0,o.jsx)(i.xI,{control:e,name:t,render:({field:e})=>(0,o.jsxs)(d.A,{gap:s.YC,alignItems:"center",ref:g,...p,children:[(0,o.jsx)(a.A,{id:e.name,onChange:({target:{checked:t}})=>{t&&(e.onChange(m),u?.())},checked:e.value===m,disabled:f,value:e.value,children:n}),r?(0,o.jsx)(l.A,{description:r,...h}):null]})})})},635891(e,t,n){n.d(t,{A:()=>c});var o=n(274934),r=n(42220),i=n(699709),a=n(775250),s=n(309130),l=n(260334),d=n(184931);const c=function({control:e,name:t,label:n,placeholder:c,tooltip:h,tooltipProps:m,autoFocus:u,motif:p,onChange:g,onBlur:f,onAfterChange:A,onPaste:v,onKeyDown:x,passwordToggle:b,type:I,helperMessage:E,autoComplete:C,contentBefore:w,contentAfter:S,onFocus:T,value:_,invalid:y}){const N=(0,d.mQ)(),L=(0,d.Im)(),$=(0,d.q)(),j=(0,l.L_)();return(0,o.jsx)(r.xI,{control:e,name:t,render:({field:e,fieldState:l,formState:d})=>(0,o.jsx)(i.A,{type:I||(b?"password":"text"),variant:"secondary",width:"100%",autoFocus:u,...e,onChange:t=>{g?g(t,e,d):e.onChange(t),A?.(t)},onBlur:t=>{f?f(t,e,d):e.onBlur()},onFocus:T,onPaste:v,disabled:N,value:_??e.value?.toString(),invalid:y||(l.invalid?(0,o.jsxs)(a.A,{variant:"inherit",style:{overflowWrap:"break-word"},children:[j((0,r.Jt)(d.errors,t)?.message)||!0," "]}):void 0),label:n,placeholder:c,labelTooltip:h,labelTooltipProps:{style:{opacity:L?s.xN:void 0,pointerEvents:$?"none":void 0,...m?.style},...m},motif:p,passwordToggle:b,helperMessage:E,autoComplete:C,onKeyDown:x,contentBefore:w,contentAfter:S})})}},149450(e,t,n){n.d(t,{B:()=>s,b:()=>a});var o=n(241792),r=n(745454),i=n(260334);const a=o.Yj({message:(0,i.rn)("COMMON_VALIDATION_VALID_IPV4")}).refine(e=>!e||(0,r.isValidIpv4)(e),{message:(0,i.rn)("COMMON_VALIDATION_VALID_IPV4")}),s=o.Yj({message:(0,i.rn)("COMMON_VALIDATION_VALID_IPV4")}).refine(e=>(0,r.isValidIpv4)(e),{message:(0,i.rn)("COMMON_VALIDATION_VALID_IPV4")})},847849(e,t,n){n.d(t,{K:()=>s});var o=n(241792),r=n(810024),i=n(570866),a=n(260334);const s=o.Yj({message:(0,a.rn)("COMMON_VALIDATION_IPV4_SUBNET")}).regex(i.wK,{message:(0,a.rn)("COMMON_VALIDATION_IPV4_SUBNET")}).refine(r.N7,{message:(0,a.rn)("COMMON_VALIDATION_IPV4_SUBNET")})},627625(e,t,n){n.d(t,{S:()=>r});var o=n(241792);function r(e,{message:t}){return o.Ie(t=>o.KC(e).safeParse(t).success,{message:t})}},509927(e,t,n){n.d(t,{V:()=>a});var o=n(602086),r=n(603606);const i=e=>{const t=(0,o.useRef)(e);return(0,o.useEffect)(()=>{t.current=e},[e]),(0,o.useCallback)((...e)=>t.current(...e),[])};function a(e,t){const n=(0,o.useRef)([]),[,a]=(0,o.useState)(0),[s,l]=(0,o.useState)(null);(0,o.useEffect)(()=>{const e=setInterval(()=>{n.current.length&&t?.estimatedDurationMs&&a(e=>e+1)},1e3);return()=>clearInterval(e)},[t?.estimatedDurationMs]);const d=t?.dedupe??!1,c=i(t?.onSuccess||(()=>{})),h=i(t?.onError||(()=>{})),m=(0,o.useCallback)((...o)=>{if(d&&n.current.length)return Promise.reject();const i=(async()=>e(...o))();return n.current.push({promise:i,startedAt:Date.now()}),a(e=>e+1),i.then(e=>(c?.(e),l(e),e)).catch(async e=>{if(t?.delayOnErrorMs&&await(0,r.u)(t.delayOnErrorMs),l(null),!h)throw e;h(e)}).finally(async()=>{n.current=n.current.filter(e=>e.promise!==i),a(e=>e+1)})},[e,d,h,c,t?.delayOnErrorMs]),u=n.current.at(-1),p=u&&t?.estimatedDurationMs?Math.min((Date.now()-u.startedAt)/t.estimatedDurationMs,.9):void 0;return{execute:m,isLoading:!!n.current.length,lastData:s,estimatedProgress:p}}},292027(e,t,n){n.d(t,{A:()=>f});var o=n(274934),r=n(199742),i=n(977872),a=n(159469),s=n(464920),l=n(509927),d=n(963428),c=n(700444),h=n(470070);const m=({onResume:e,disabledReason:t})=>{const n=(0,i.wA)(),r=(0,l.V)(()=>e(),{onError:e=>{const t=(0,s.F)(e)?e:void 0;return n((0,c.ox)({icon:a.C.danger,message:"SETTINGS_POLICY_RESUME_FAILURE",values:{count:1},errorMessage:t?.msg,errorValues:t}))}});return(0,o.jsx)(d.A,{onPress:r.execute,isDisabled:r.isLoading,disabledReason:t,children:(0,o.jsx)(h.sA,{id:"COMMON_ACTION_RESUME"})})};var u=n(404056),p=n(146215);const g=({name:e,onPause:t,disabledReason:n})=>{const r=(0,i.wA)(),m=(0,l.V)(()=>t(),{onError:e=>{const t=(0,s.F)(e)?e:void 0;return r((0,c.ox)({icon:a.C.danger,message:"SETTINGS_POLICY_PAUSE_FAILURE",values:{count:1},errorMessage:t?.msg,errorValues:t}))}});return(0,o.jsx)(p.A,{trigger:(0,o.jsx)(d.A,{isDisabled:m.isLoading,disabledReason:n,children:(0,o.jsx)(h.sA,{id:"COMMON_ACTION_PAUSE"})}),confirmButtonVariant:"emphasis",title:(0,o.jsx)(h.sA,{id:"SETTINGS_SECURITY_PAUSE_POLICY_TITLE",values:{count:1}}),message:(0,o.jsx)(h.sA,{id:"SETTINGS_SECURITY_PAUSE_FIREWALL_POLICY_MESSAGE_SINGLE",values:{name:e}}),onConfirm:()=>m.execute()})},f=({enabled:e,name:t,onPause:n,pauseDisabledReason:i,onResume:a,resumeDisabledReason:s,onRemove:l,removeDisabledReason:d,removeAdditionalMessage:c})=>(0,o.jsx)(r.A,{actions:[e?(0,o.jsx)(g,{name:t,onPause:n,disabledReason:i}):(0,o.jsx)(m,{onResume:a,disabledReason:s}),(0,o.jsx)(u.A,{name:t,onRemove:l,disabledReason:d,additionalMessage:c})]})},404056(e,t,n){n.d(t,{A:()=>p});var o=n(274934),r=n(977872),i=n(159469),a=n(464920),s=n(509927),l=n(963428),d=n(146215),c=n(700444),h=n(470070),m=n(100978),u=n(309130);const p=({onRemove:e,name:t,disabledReason:n,additionalMessage:p})=>{const g=(0,r.wA)(),f=(0,s.V)(()=>e(),{onError:e=>{const t=(0,a.F)(e)?e:void 0;return g((0,c.ox)({icon:i.C.danger,message:"SETTINGS_POLICY_DELETE_FAILURE",values:{count:1},errorMessage:t?.msg,errorValues:t}))}});return(0,o.jsx)(d.A,{trigger:(0,o.jsx)(l.A,{variant:"destructive",disabledReason:n,children:(0,o.jsx)(h.sA,{id:"COMMON_ACTION_REMOVE"})}),title:(0,o.jsx)(h.sA,{id:"SETTINGS_SECURITY_REMOVE_POLICY_TITLE",values:{count:1}}),message:p?(0,o.jsxs)(m.A,{flexDirection:"column",gap:u.kc,children:[(0,o.jsx)(h.sA,{id:"SETTINGS_SECURITY_REMOVE_FIREWALL_POLICY_SINGLE_MESSAGE",values:{name:t}}),p]}):(0,o.jsx)(h.sA,{id:"SETTINGS_SECURITY_REMOVE_FIREWALL_POLICY_SINGLE_MESSAGE",values:{name:t}}),onConfirm:()=>f.execute()})}},603606(e,t,n){n.d(t,{u:()=>o});const o=e=>new Promise(t=>{setTimeout(t,e)})},489714(e,t,n){n.d(t,{Z:()=>r});var o=n(570866);const r=e=>e?e.replace(o.SD,"").replace(o.fA,"$&:").substring(0,17).toLowerCase():e},721533(e,t,n){n.d(t,{u:()=>c});var o=n(42220);const r=(e,t,n)=>{if(e&&"reportValidity"in e){const r=(0,o.Jt)(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},i=(e,t)=>{for(const n in t.fields){const o=t.fields[n];o&&o.ref&&"reportValidity"in o.ref?r(o.ref,n,e):o&&o.refs&&o.refs.forEach(t=>r(t,n,e))}},a=(e,t)=>{t.shouldUseNativeValidation&&i(e,t);const n={};for(const r in e){const i=(0,o.Jt)(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(s(t.names||Object.keys(e),r)){const e=Object.assign({},(0,o.Jt)(n,r));(0,o.hZ)(e,"root",a),(0,o.hZ)(n,r,e)}else(0,o.hZ)(n,r,a)}return n},s=(e,t)=>{const n=l(t);return e.some(e=>l(e).match(`^${n}\\.\\d+`))};function l(e){return e.replace(/\]|\[/g,"")}function d(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,s=r.path.join(".");if(!n[s])if("unionErrors"in r){var l=r.unionErrors[0].errors[0];n[s]={message:l.message,type:l.code}}else n[s]={message:a,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var d=n[s].types,c=d&&d[r.code];n[s]=(0,o.Gb)(s,t,n,i,c?[].concat(c,r.message):r.message)}e.shift()}return n}function c(e,t,n){return void 0===n&&(n={}),function(o,r,s){try{return Promise.resolve(function(r,a){try{var l=Promise.resolve(e["sync"===n.mode?"parse":"parseAsync"](o,t)).then(function(e){return s.shouldUseNativeValidation&&i({},s),{errors:{},values:n.raw?Object.assign({},o):e}})}catch(e){return a(e)}return l&&l.then?l.then(void 0,a):l}(0,function(e){if(function(e){return Array.isArray(null==e?void 0:e.errors)}(e))return{values:{},errors:a(d(e.errors,!s.shouldUseNativeValidation&&"all"===s.criteriaMode),s)};throw e}))}catch(e){return Promise.reject(e)}}}}}]);