"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[47122],{470591(e,t,n){n.d(t,{A:()=>o});const o=(0,n(296540).createContext)({isStandalone:!0,header:[null,()=>{}],footer:[null,()=>{}]})},691441(e,t,n){n.d(t,{A:()=>i});var o=n(296540),l=n(470591);function i(e){const{children:t}=e,{isStandalone:n,footer:[,i]}=(0,o.useContext)(l.A);return(0,o.useLayoutEffect)(()=>{if(!n)return i(t),()=>i(null)},[n,t]),o.createElement(o.Fragment,null,n&&t)}},75622(e,t,n){n.d(t,{A:()=>I});var o=n(296540),l=n(881663),i=n(958941),r=n(783908),a=n(998936),s=n(566401),c=n(269592),d=n(703024),m=n(555771),u=n(144239),p=n(90458),A=n(139041),g=n(751299),h=n(798740),f=n(494509),E=n(152632),v=n(297265),b=n(670628),y=n(575422),C=n(713404),S=n(687602),_=n(231755);const O=o.forwardRef((e,t)=>{const{searchInputProps:n,customSearchFilter:O,items:I=[],localizationTexts:M,selectedKeys:N,indeterminateKeys:x,onSelectionChange:L,onIndeterminateKeysChange:T,isVirtualized:k,treeProps:w,onSelectAll:D,onDeselectAll:P,searchInputRef:B,searchInputControl:R,height:$=h.iq,footerActions:F,onClearFilter:z,layout:K="list",autoFocus:V=!1,isAllSelected:U,isSelectAllDisabled:H=!1,hasSelectAllControl:j=!0,virtualizerProps:Q,setSelectedKeys:G,gap:X="spacious",loadMore:W,isLoading:Y,treeLoadMoreItemProps:Z,onKeyDown:q,treeMetadata:J,...ee}=e,te=o.useMemo(()=>({...h.nX,...M}),[M]),ne=(0,r.U)(B),{value:oe,defaultValue:le,onChange:ie,...re}=o.useMemo(()=>(0,l.v)(h.Ul,n),[n]),{items:ae,onValueChange:se,clearFilter:ce,isItemsEmpty:de,isSearching:me}=(0,v.A)(I,O,ie,le),ue="tree"===K?b.A:y.A,pe=o.useMemo(()=>"tree"===K?(0,f.FS)(I):void 0,[I,K]);o.useEffect(()=>{z&&z(ce)},[ce,z]);const{keyboardProps:Ae}=(0,i.d)({onKeyDown:e=>{null==q||q(e),(0,C.Ay)(e,()=>{var e,t;null===(t=null===(e=ne.current)||void 0===e?void 0:e.querySelector("input"))||void 0===t||t.focus()},{whitelistedKeys:new Set(["Escape"])})}}),ge=o.useCallback(()=>(0,E.Qu)(ae,null==w?void 0:w.disabledKeys),[ae,null==w?void 0:w.disabledKeys]),he=o.useCallback(()=>null==D?void 0:D(ge()),[D,ge]),fe=o.useCallback(()=>null==P?void 0:P(ge()),[P,ge]),Ee=!!U&&U(ge()),ve=o.useCallback(()=>o.createElement(g.A,{height:h.rh},te.NO_RESULTS_LABEL),[te.NO_RESULTS_LABEL]),be=(0,s.A)(ae)&&(0,c.A)(null==w?void 0:w.renderEmptyState)?ve:null==w?void 0:w.renderEmptyState,ye=o.useMemo(()=>(0,E.nI)(ae,null==w?void 0:w.disabledKeys),[ae,null==w?void 0:w.disabledKeys]),Ce=me?void 0:W,Se=!me&&Y,_e=H||de||ye;return o.createElement(d.A,{ref:t,height:$,isVirtualized:k,...Ae,...ee},o.createElement(S.A,{ref:ne,variant:"inline",placeholder:te.SEARCH_PLACEHOLDER,value:oe,onChange:se,defaultValue:(0,a.A)(le,""),...re,"aria-label":te.SEARCH_PLACEHOLDER,control:R,autoFocus:V}),!de&&o.createElement(_.A,null),o.createElement(A.A,{isVirtualized:k},o.createElement(ue,{items:ae,width:"full",height:k?h.rh:"auto",isVirtualized:k,onSelectionChange:L,selectedKeys:N,indeterminateKeys:x,onIndeterminateKeysChange:T,escapeKeyBehavior:"none",defaultExpandedKeys:pe,virtualizerProps:Q,gap:X,loadMore:Ce,isLoading:Se,treeLoadMoreItemProps:Z,renderEmptyState:be,dependencies:[ae],...w})),(j||F&&F.length>0)&&o.createElement(m.A,{hasCustomButtons:!!(F&&F.length>0)},j&&o.createElement(u.A,{isAllSelected:!_e&&Ee,onSelectAllPress:he,onDeselectAllPress:fe,localizationTexts:te,isDisabled:_e}),F&&F.length>0&&o.createElement(p.A,{controls:F})))});O.displayName="PickList_Default";var I=o.memo(O)},705483(e,t,n){n.d(t,{c:()=>r,z:()=>i});var o=n(614476),l=n(263963);const i=e=>o.z.string().min(1).max(32).refine(t=>!e.some(e=>e.name===t),{message:(0,l.rn)("COMMON_PLEASE_ENTER_UNIQUE_NAME")}),r=e=>o.z.object({name:i(e),member_macs:o.z.array(o.z.string()).min(1)})},183970(e,t,n){var o;n.d(t,{k:()=>o}),function(e){e.CLIENTS="CLIENTS",e.USERS="USERS"}(o||(o={}))},705228(e,t,n){n.d(t,{VT:()=>r,i9:()=>l,ng:()=>a,nt:()=>i});var o=n(888170);const l=n(132196).AH`
  font-size: ${o.Ay["font-size-m"]};
  font-weight: normal;
  border-radius: 0;
`,i=112,r=20,a=345},465543(e,t,n){n.d(t,{w:()=>r});var o=n(296540),l=n(469733),i=n(845030);const r=e=>{const t=(0,l.useDispatch)();(0,o.useEffect)(()=>{t((0,i.SQ)(e))},[t,e])}},853801(e,t,n){n.d(t,{y:()=>i});var o=n(349785),l=n(465543);const i=e=>{const t=(0,o.lN)(e);return(0,l.w)(t.isDirty)}},689965(e,t,n){n.d(t,{A:()=>A,I:()=>o});var o,l=n(296540),i=n(822336),r=n(963724),a=n(71479),s=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,a.A)(d.A,(0,m.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||i.Ay[n===s.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}})=>i.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,p=(0,a.A)(r.A,(0,m.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||i.Ay[n===s.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||i.Ay[t===s.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};
      }
    }
  }
`,A=({type:e,marginBottom:t,margin:n,padding:i,flex:r,width:a,nested:s,...c})=>"items"in c?l.createElement(p,{marginBottom:t,margin:n,padding:i,flex:r,nested:s,...c}):l.createElement(u,{nested:s,width:a,marginBottom:t,margin:n,padding:i,flex:r,isButtonList:e===o.BUTTON_LIST,...c},c.children)},349665(e,t,n){n.d(t,{A:()=>r});var o=n(296540),l=n(705228),i=n(294303);const r=({maxWidth:e,label:t,children:n,...r})=>o.createElement(i.A,{flexDirection:"column",width:"100%",maxWidth:"settingsGridContent"===e?l.ng:e,...r},t,n)},317672(e,t,n){n.d(t,{A:()=>c});var o=n(296540),l=n(498577),i=n(284428),r=n(566723),a=n(766624),s=n(294303);const c=({tooltip:e,htmlFor:t,children:n,labelProps:c,wrapperProps:d,tooltipProps:m})=>{const u=(0,i.iL)();return o.createElement(s.A,{alignItems:"center",gap:r.YC,...d},o.createElement(l.A,{htmlFor:t,color:"tertiary",...c,style:{opacity:u?r.xN:void 0,...c?.style}},n),e?o.createElement(a.A,{description:e,...m}):null)}},242366(e,t,n){n.d(t,{A:()=>r});var o=n(296540),l=n(566723),i=n(294303);const r=(0,o.forwardRef)((e,t)=>o.createElement(i.A,{ref:t,flexDirection:"column",gap:l.kc,width:"100%",...e}))},48925(e,t,n){n.d(t,{A:()=>h});var o=n(822336),l=n(296540),i=n(217439),r=n(71479),a=n(566723),s=n(968906),c=n(199582),d=n(311785),m=n(766624),u=n(294303),p=n(689965),A=n(242366);const g=(0,r.A)(p.A,(0,d.A)("isOutlined"))`
  border: ${({theme:{themeName:e},isOutlined:t})=>`1px solid ${t?o.Ay[`desktop-color-ublue-06-${e}`]:"transparent"}`};
`,h=({children:e,title:t,tooltip:n,tooltipProps:o,[c.L]:r,titleAction:d,isOutlined:p})=>{const h=(e=>l.Children.toArray(e).length>0)(e);return l.createElement(g,{marginBottom:"none",...s.A.addDataTestId(r??""),isOutlined:p},l.createElement(u.A,{flexDirection:"column",...h&&{gap:a.Ln},width:"100%"},t?l.createElement(u.A,{alignItems:"center",gap:a.YC,justifyContent:"space-between",width:"100%"},l.createElement(u.A,{gap:a.YC,alignItems:"center"},l.createElement(i.A,{variant:"heading-medium"},t),n?l.createElement(m.A,{description:n,portal:!0,...o}):null),d?l.createElement(u.A,null,d):null):null,h?l.createElement(A.A,null,e):null))}},373229(e,t,n){n.d(t,{A:()=>d});var o=n(296540),l=n(758649),i=n(71479),r=n(566723),a=n(916537),s=n(311785);const c=(0,i.A)("footer",(0,s.A)("hasFormResetButton"))`
  display: flex;
  justify-content: ${({hasFormResetButton:e})=>e?"space-between":"flex-end"};
  padding: ${r.S2} ${r.fS};
  gap: ${r.kc};
`,d=({allowCancel:e,isDirty:t,isInvalid:n,isSubmitting:i,onFormSubmit:r,onFormReset:s,onFormCancel:d,className:m,submitButtonText:u,customButton:p,applyButton:A,applyButtonFirst:g,hideCancelButton:h,form:f})=>{const E=(0,o.useMemo)(()=>A||o.createElement(l.A,{name:"submit",variant:"primary",type:"submit",onClick:r,disabled:!t||n||i,form:f},o.createElement(a.sA,{id:u||"COMMON_ACTION_APPLY_CHANGES"})),[A,f,t,n,i,r,u]);return o.createElement(c,{className:m,hasFormResetButton:!!s},g?E:p,h?null:o.createElement(l.A,{name:"cancel",variant:"default",type:"button",onClick:d,disabled:!e&&!t},o.createElement(a.sA,{id:"COMMON_ACTION_CANCEL"})),s?o.createElement(l.A,{name:"reset",variant:"default",type:"button",onClick:s,disabled:!t},o.createElement(a.sA,{id:"COMMON_ACTION_RESET_TO_DEFAULT"})):null,g?p:E)}},329109(e,t,n){n.d(t,{A:()=>d});var o=n(296540),l=n(691441),i=n(71479),r=n(132196),a=n(373229);const s=(0,i.A)("div")`
  height: 66px;
`,c=r.AH`
  padding: 0px !important;
`,d=({isDirty:e,onFormSubmit:t,onFormCancel:n,isInvalid:i,...r})=>e?o.createElement(l.A,null,o.createElement(a.A,{isDirty:e,onFormCancel:n,onFormSubmit:t,isInvalid:i,className:c,...r})):o.createElement(s,null)},639942(e,t,n){n.r(t),n.d(t,{default:()=>H});var o=n(296540),l=n(469733),i=n(742920),r=n(38671),a=n(853801),s=n(895424),c=n(641777),d=n(79786),m=n(349785),u=n(784045),p=n(376618),A=n(974388),g=n(294303),h=n(703447),f=n(951106),E=n(239417);const v=function({form:e,name:t,additionalInfo:n="mac",excludeUnifiDevices:i,getGroup:r,groups:a,...s}){const c=(0,m.FH)({control:e.control,name:t}),d=(0,l.useSelector)(E.GB),v=(0,o.useMemo)(()=>{const e=d.filter(e=>!(i&&"unifi_device"in e&&e.unifi_device)),t=(c||[]).filter(t=>!e.some(e=>"mac"in e&&e.mac===t)).map(e=>({mac:e,name:e})),n=[...e,...t].flatMap(e=>"mac"in e?[e]:[]);return(a&&r?(0,u.A)(Object.entries((0,p.A)(n,r)),([e])=>a[e]?.order??0).map(([e,t])=>({id:e,label:a[e]?.label,options:t})).filter(e=>e.options.length>0):[{id:void 0,label:void 0,options:n}]).flatMap(({options:e,label:t,id:n})=>[...t&&n?[{type:"SECTION",title:t,id:n,children:[]}]:[],...e.map(e=>({type:"CHECKBOX",title:(0,f.tn)(e),id:e.mac,checkboxProps:{symbol:o.createElement(g.A,{maxWidth:24,maxHeight:24},o.createElement(h.A,{client:e}))},children:[]}))])},[n,d.length,c,i]),b=(0,o.useCallback)(()=>{e.setValue(t,v.map(e=>e.id),{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})},[v,e,t]),y=(0,o.useCallback)(()=>{const n=new Set(e.getValues(t));return v.length>0&&v.every(e=>n.has(e.id))},[v,e,t]);return o.createElement(A.A,{control:e.control,name:t,options:v,isVirtualized:!0,onSelectAll:b,isAllSelected:y,...s})};var b=n(398300),y=n(566723),C=n(48925),S=n(689965),_=n(845030),O=n(675359),I=n(916537),M=n(183970),N=n(861509),x=n(705483),L=n(642597),T=n(602021),k=n(959341),w=n(329109),D=n(217439),P=n(732881),B=n(117982),R=n(900956),$=n(592563),F=n(74750),z=n(432680);const K=({existingRecord:e})=>{const t=(0,l.useDispatch)();return o.createElement("div",null,o.createElement(R.A,null,o.createElement(B.A,null,o.createElement($.A,{fontSize:"medium",variant:"destructive"},o.createElement(I.sA,{id:"COMMON_ACTION_DELETE"}))),o.createElement(P.A,{actionButtons:o.createElement(F.A,{variant:"destructive",onPress:async()=>{await t((0,L.aX)(e.id)),await t((0,z.rt)())}},o.createElement(I.sA,{id:"COMMON_ACTION_DELETE"})),title:o.createElement(I.sA,{id:"COMMON_ARE_YOU_SURE"})},o.createElement(D.A,{variant:"inherit",size:"medium"},o.createElement(I.sA,{id:"COMMON_CLIENT_GROUP_DELETE_CONFIRMATION",values:{name:e?.name}})))))},V="network-members-group-form",U=({activeItem:e})=>{const t=e&&e.id!==k.R6?e:void 0,n=(0,l.useDispatch)(),m=(0,l.useSelector)(T.EL),u=(0,l.useSelector)(N.y),p=(0,o.useMemo)(()=>u.filter(e=>e.id!==t?.id),[t?.id,u]),A=(0,o.useMemo)(()=>(0,x.c)(p),[p]),h=(0,d.m)({schema:A,defaultValues:{name:t?.name||"",member_macs:t?.members||[]}});(0,a.y)(h);const f=h.handleSubmit(e=>n((0,L.YH)({id:t?.id,name:e.name,members:e.member_macs,type:t?.type||M.k.CLIENTS})).then(async e=>(await n((0,L.O$)(void 0,{resolveWithExisting:!1})),e)).then(e=>{n((0,_.SQ)(!1)),n((0,_.XP)({type:b.H.NETWORK_MEMBERS_GROUP,id:e.id}))}).then(()=>h.reset()).catch(e=>{const t=(0,r.F)(e)?e:void 0;n((0,O.ox)({icon:i.C.danger,message:"COMMON_CLIENT_GROUP_FAILED_SAVE",errorMessage:t?.msg,errorValues:t?.details}))}));return o.createElement("form",{onSubmit:f,id:V},o.createElement(c.A,{isDisabled:m},o.createElement(g.A,{gap:y.kc,flexDirection:"column",width:"100%"},o.createElement(C.A,null,o.createElement(s.A,{control:h.control,name:"name",label:o.createElement(I.sA,{id:"COMMON_NAME"})}),o.createElement(v,{form:h,name:"member_macs"})),t?o.createElement(S.A,null,o.createElement(K,{existingRecord:t})):null),o.createElement(w.A,{onFormCancel:()=>h.reset(),isDirty:h.formState.isDirty||!t,hideCancelButton:!h.formState.isDirty,form:V,isSubmitting:h.formState.isSubmitting,submitButtonText:t?"COMMON_ACTION_SAVE":"COMMON_ACTION_CREATE"})))},H=({activeItem:e})=>o.createElement(U,{key:e.id,activeItem:e})},766624(e,t,n){n.d(t,{A:()=>s});var o=n(296540),l=n(271856),i=n(709690),r=n(284428),a=n(566723);const s=({description:e,isInteractive:t,portal:n=!0,cursorType:s,title:c,position:d,width:m,iconProps:u,disabled:p=!1})=>{const A=(0,r.Im)()||p,g=(0,r.q)();return o.createElement(l.A,{description:e,portal:n,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:s,title:c,position:d,width:m,disableHover:g},o.createElement(i.A,{isActive:!0,size:"original",opacity:A?a.xN:void 0,...u}))}},79786(e,t,n){n.d(t,{m:()=>a});var o=n(296540),l=n(349785),i=n(59116),r=n(870893);function a({schema:e,defaultValues:t,presets:n}){const a=(0,o.useMemo)(()=>n?(0,i.A)(n,e=>e.defaultValues):{},[n]),s=(0,o.useMemo)(()=>({...t,...a}),[a,t]),c=(0,l.mN)({resolver:(0,r.u)(e),shouldFocusError:!0,defaultValues:s,shouldUseNativeValidation:!1,mode:"onTouched"}),d=(0,o.useRef)(s);d.current=s;const m=(0,o.useCallback)((...e)=>{const[t,...n]=e;return c.reset(t?{...t,...a}:d.current,...n)},[a,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:()=>r});var o=n(296540),l=n(284428),i=n(451449);const r=({isDisabled:e,isAdditive:t=!0,children:n})=>{const r=(0,l.pv)(),a=(0,o.useMemo)(()=>"boolean"==typeof e?{fields:e,labels:e,tooltipIcons:e,tooltipPopovers:!1}:e,[e]),s=(0,o.useMemo)(()=>({fields:t?a.fields||r.fields:a.fields,labels:t?a.labels||r.labels:a.labels,tooltipIcons:t?a.tooltipIcons||r.tooltipIcons:a.tooltipIcons,tooltipPopovers:t?a.tooltipPopovers||r.tooltipPopovers:a.tooltipPopovers}),[t,a.fields,a.labels,a.tooltipIcons,a.tooltipPopovers,r.fields,r.labels,r.tooltipIcons,r.tooltipPopovers]);return o.createElement(i.I.Provider,{value:s},n)}},284428(e,t,n){n.d(t,{Im:()=>s,iL:()=>c,mQ:()=>r,pv:()=>i,q:()=>a});var o=n(296540),l=n(451449);function i(){return(0,o.useContext)(l.I)}function r(){return i().fields}function a(){return i().tooltipPopovers}function s(){return i().tooltipIcons}function c(){return i().labels}},263963(e,t,n){n.d(t,{L_:()=>c,MS:()=>s,rn:()=>a});var o=n(296540),l=n(614476),i=n(916537);const r="{::}",a=(e,t)=>`${e}${r}${JSON.stringify(t??{})}`,s=(e,t)=>{if("string"!=typeof t)return;const[n,...o]=t.split(r);if(!n||!o.length)return t;let l={};try{l=Object.fromEntries(Object.entries(JSON.parse(o.join(r))).map(([t,n])=>[t,"string"==typeof n?s(e,n):n]))}catch{}return e.formatMessage({id:n},l)};function c(){const{formatMessage:e}=(0,i.tz)();return(0,o.useCallback)(t=>s({formatMessage:e},t),[e])}l.z.setErrorMap((e,t)=>e.message?{message:e.message}:e.code===l.z.ZodIssueCode.too_small&&"string"===e.type?{message:a("COMMON_MIN_CHARS",{min:Number(e.minimum)})}:e.code===l.z.ZodIssueCode.too_big&&"string"===e.type?{message:a("COMMON_MAX_CHARS",{name:a("COMMON_VALUE"),max:Number(e.maximum)})}:e.code===l.z.ZodIssueCode.invalid_type&&"array"===e.expected&&"undefined"===e.received?{message:a("COMMON_SELECT_AT_LEAST_ONE_ITEM")}:e.code===l.z.ZodIssueCode.too_small&&"array"===e.type?{message:a("COMMON_ADD_AT_LEAST_X_ITEMS",{min:Number(e.minimum)})}:e.code===l.z.ZodIssueCode.invalid_type&&"undefined"===e.received?{message:a("COMMON_VALIDATION_VALUE_REQUIRED")}:e.code===l.z.ZodIssueCode.invalid_type&&"number"===e.expected?{message:a("COMMON_VALIDATION_PLEASE_ENTER_A_NUMBER")}:{message:t.defaultError})},974388(e,t,n){n.d(t,{A:()=>m});var o=n(296540),l=n(349785),i=n(86838),r=n(75622),a=n(317672),s=n(349665),c=n(263963),d=n(284428);const m=function({control:e,name:t,tooltip:n,label:m,options:u,isVirtualized:p,isAllSelected:A,onSelectAll:g,disabledKeys:h}){const f=(0,d.mQ)(),E=(0,c.L_)(),v=(0,o.useMemo)(()=>h||u.flatMap(e=>"CHECKBOX"===e.type&&e.checkboxProps?.isDisabled?[e.id]:[]),[h,u]);return o.createElement(l.xI,{control:e,name:t,render:({field:e,fieldState:c,formState:d})=>o.createElement(s.A,null,m?o.createElement(a.A,{tooltip:n},m):null,o.createElement(r.A,{onSelectionChange:t=>e.onChange([...t]),"aria-disabled":f,selectedKeys:new Set(e.value),treeProps:{disabledKeys:v},items:u,isVirtualized:p,setSelectedKeys:()=>{},onSelectAll:g,onDeselectAll:()=>e.onChange([]),isAllSelected:A}),c.invalid?o.createElement(i.A,{isInvalid:!0,label:E((0,l.Jt)(d.errors,t)?.message)}):void 0)})}},895424(e,t,n){n.d(t,{A:()=>d});var o=n(296540),l=n(349785),i=n(438628),r=n(705145),a=n(566723),s=n(263963),c=n(284428);const d=function({control:e,name:t,label:n,placeholder:d,tooltip:m,tooltipProps:u,autoFocus:p,motif:A,onChange:g,onBlur:h,onAfterChange:f,onPaste:E,onKeyDown:v,passwordToggle:b,type:y,helperMessage:C,autoComplete:S,contentBefore:_,contentAfter:O,onFocus:I,value:M,invalid:N}){const x=(0,c.mQ)(),L=(0,c.Im)(),T=(0,c.q)(),k=(0,s.L_)();return o.createElement(l.xI,{control:e,name:t,render:({field:e,fieldState:s,formState:c})=>o.createElement(i.A,{type:y||(b?"password":"text"),variant:"secondary",width:"100%",autoFocus:p,...e,onChange:t=>{g?g(t,e,c):e.onChange(t),f?.(t)},onBlur:t=>{h?h(t,e,c):e.onBlur()},onFocus:I,onPaste:E,disabled:x,value:M??e.value?.toString(),invalid:N||(s.invalid?o.createElement(r.A,{variant:"inherit",style:{overflowWrap:"break-word"}},k((0,l.Jt)(c.errors,t)?.message)||!0," "):void 0),label:n,placeholder:d,labelTooltip:m,labelTooltipProps:{style:{opacity:L?a.xN:void 0,pointerEvents:T?"none":void 0,...u?.style},...u},motif:A,passwordToggle:b,helperMessage:C,autoComplete:S,onKeyDown:v,contentBefore:_,contentAfter:O})})}},383149(e,t,n){n.d(t,{A:()=>l});var o=n(885205);const l=function(e,t){return!(null==e||!e.length)&&(0,o.A)(e,t,0)>-1}},887809(e,t,n){n.d(t,{A:()=>o});const o=function(e,t,n){for(var o=-1,l=null==e?0:e.length;++o<l;)if(n(t,e[o]))return!0;return!1}},458043(e,t,n){n.d(t,{A:()=>c});var o=n(8300),l=n(383149),i=n(887809),r=n(45572),a=n(552789),s=n(764099);const c=function(e,t,n,c){var d=-1,m=l.A,u=!0,p=e.length,A=[],g=t.length;if(!p)return A;n&&(t=(0,r.A)(t,(0,a.A)(n))),c?(m=i.A,u=!1):t.length>=200&&(m=s.A,u=!1,t=new o.A(t));e:for(;++d<p;){var h=e[d],f=null==n?h:n(h);if(h=c||0!==h?h:0,u&&f==f){for(var E=g;E--;)if(t[E]===f)continue e;A.push(h)}else m(t,f,c)||A.push(h)}return A}},144757(e,t,n){n.d(t,{A:()=>a});var o=n(458043),l=n(187671),i=n(224326),r=n(153533);const a=(0,i.A)(function(e,t){return(0,r.A)(e)?(0,o.A)(e,(0,l.A)(t,1,r.A,!0)):[]})},376618(e,t,n){n.d(t,{A:()=>r});var o=n(152528),l=n(313184),i=Object.prototype.hasOwnProperty;const r=(0,l.A)(function(e,t,n){i.call(e,n)?e[n].push(t):(0,o.A)(e,n,[t])})}}]);