"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[43811],{71265:(e,t,l)=>{l.d(t,{R:()=>u,k:()=>p});var n=l(280258),a=l(190497),r=l(953048),o=l(175522),i=l(936621),s=l(305988);const c=[...new Set([n.H,o.Q.join(o.A),r.Zt,i.F,a.nc,s.Vr])],d={numeric:!0,sensitivity:"base"},u=(e,t)=>{const l=[];for(let n=e;n<=t;n+=1)l.push({value:n,label:String(n)});return l},p=e=>({value:t,label:l},{value:n,label:a})=>c.includes(t?.toString())||c.includes(n?.toString())?1/0:l?.toString().localeCompare(a?.toString(),e,d)??-1},79760:(e,t,l)=>{l.d(t,{F6:()=>s,If:()=>o,LE:()=>c,t$:()=>i});var n=l(296540),a=l(951272),r=l(699784);const o=(e,t,l,n)=>{const r=(0,a.O6)(t,e);return!(!(((0,a.O6)(l,e)??!1)||n>0)||!(r??!1))};function i(e,t,l,i){if(!o(e,t,l,i))return null;if(!e.length)return null;const s=(0,a.O6)(t,e);return s?(0,n.isValidElement)(s)||"string"==typeof s?s:n.createElement(r.sA,{...s.props}):null}const s=(e,t,l,n,a)=>!(!(n?.[e]||a>0)||!l?.[e]?.[t]),c=(e,t)=>{const l={...e},n=Object.keys(l),a=n.filter(e=>l[e]!==t[e]);return n.forEach(e=>{a.includes(e)||delete l[e],"object"==typeof a[e]&&(l[e]=c(a[e],t[e]))}),l}},143811:(e,t,l)=>{l.d(t,{A:()=>Z});var n=l(469733),a=l(296540),r=l(951272),o=l(284428),i=l(566723),s=l(602021),c=l(766624),d=l(294303),u=l(955161),p=l(429252),m=l.n(p),h=l(79760),g=l(438628),v=l(699784);const f=e=>{if(e)return"string"==typeof e?a.createElement(a.Fragment,null,e):"object"!=typeof e||!(0,a.isValidElement)(e)||e},b=({autoComplete:e="nope",label:t=null,labelValues:l={},placeholder:n=null,placeholderValues:r={},translatePlaceholder:o=!0,helperMessage:i=null,forwardedRef:s,value:c,onBlur:d,onChange:u,dirty:p,touched:m,invalid:h,...b})=>{const{formatMessage:C}=(0,v.tz)();return a.createElement(g.A,{ref:s,...t?{label:"string"==typeof t?C({id:t},l):t}:{},placeholder:n&&o?C({id:n},r).toString():n,helperMessage:i&&C({id:i},r),autoComplete:e,onChange:u,onBlur:d,value:c,invalid:f(h),...b})},C=(0,a.memo)(b),A=(0,a.memo)(({field:{name:e,value:t,onBlur:l,onChange:n},form:{dirty:o,errors:i,touched:s,submitCount:c},autoComplete:d="off",disabled:u=!1,...p})=>{const m=(0,h.t$)(e,i,s,c);return a.createElement(C,{id:e,name:e,value:t,onBlur:l,onChange:n,disabled:u,autoComplete:d,invalid:m,dirty:o,touched:(0,r.O6)(s,e)??!1,...p})},(e,t)=>{const{field:{name:l,value:n},form:{dirty:a,errors:o,submitCount:i,touched:s}}=e;return Object.entries(e).length===Object.entries(t).length&&!Object.entries(t).some(([t,c])=>{switch(t){case"form":{const e=(0,r.O6)(o,l),t=(0,r.O6)(c.errors,l);return!(t===e||e?.props?.id&&t?.props?.id&&t?.props?.id===e?.props?.id&&e?.props?.values&&t?.props?.values&&m()(t?.props?.values,e?.props?.values))||c.submitCount!==i||(0,r.O6)(c.touched,l)!==(0,r.O6)(s,l)||c.dirty!==a}case"field":return c?.value!==n;case"labelValues":case"placeholderValues":return!1;default:return c!==e[t]}})});var E=l(125510);const y=({field:{name:e,onBlur:t},form:{setFieldValue:l,values:n},type:o,className:i,id:s,value:c,onChange:d,children:u,isLabelCentered:p=!0,customFormFieldValue:m,...h})=>{const g=m?.()||(0,r.O6)(n,e),v=(0,a.useCallback)(t=>{l(e,t?[...g,c]:g.filter(e=>e!==c))},[e,g,l,c]);return a.createElement(E.A,{isSelected:g.includes(c),id:s!==e?s:`${e}-${c}`,name:e,onBlur:t,onChange:d||v,label:u,isLabelCentered:p,...h})};var k=l(436017),O=l(71479);const S=(0,O.A)(k.A)`
  display: inline-flex !important;

  --form-checkbox-size: 100%;

  input[type='checkbox'] {
    border: none !important;

    &::before {
      content: none !important;
    }
  }
`,x=({field:{name:e,onChange:t,value:l},afterChange:n=null,form:r,checked:o=!1,...i})=>{const s=(0,a.useCallback)(e=>{t(e),n&&n(e.currentTarget.checked)},[n,t]);return a.createElement(S,{checked:!(!o&&!l),id:e,name:e,size:"medium",value:"true",onChange:s,...i})};var M=l(143401);const w=({label:e,field:{name:t,value:l},form:{setFieldValue:n},type:r,checked:o=!1,...i})=>{const s=(0,a.useCallback)((e,l)=>{n(t,l)},[t,n]),{formatMessage:c}=(0,v.tz)();return a.createElement(M.A,{onChange:s,label:e&&c({id:e}),value:l,...i})};var T=l(23835);const I=({field:{name:e,value:t},form:{setFieldValue:l,errors:n,touched:r,submitCount:o},...i})=>{const s=(0,a.useCallback)(({target:{value:t}})=>{l(e,t)},[e,l]);return a.createElement(T.A,{value:t,onChange:s,invalid:(0,h.t$)(e,n,r,o),...i})};var N=l(802);const V=({field:{name:e},form:{setFieldValue:t},onChange:l,type:n,...r})=>{const o=(0,a.useCallback)(({target:{value:l}})=>{t(e,l)},[t,e]);return a.createElement(N.A,{onChange:l||o,...r})};var L=l(877500),$=l(54227),F=l(311785);const B=(0,O.A)($.A,(0,F.A)("vertical"))`
  > :first-child {
    flex: none;
  }

  ${({vertical:e})=>e?"":`\n          display: inline-flex !important;\n          vertical-align: middle;\n\n          > div:first-child {\n            margin-right: ${i.kc};\n          }\n\n          input {\n            margin-right: ${i.kc};\n          }\n        `}
`,P=({field:{name:e},form:{setFieldValue:t,values:l},id:n,value:r,checked:o,...i})=>{const s=(0,a.useCallback)(({currentTarget:{checked:l}})=>{l&&t(e,r)},[e,t,r]);return a.createElement(B,{checked:o??(0,L.A)(l,e)===(void 0===r||r),id:void 0!==r?`${e}-${r}`:e,name:e,onChange:s,...i})};var _=l(836645),z=l(412933),W=l(119745),H=l(314714),j=l(86838);const D=(0,O.A)(W.A)`
  > div > div > div > div {
    align-items: flex-start;
  }
`,G=(0,O.A)(d.A)`
  label:not(:last-child) {
    margin-right: 16px;
  }
`,R=(0,O.A)("div")`
  width: 100%;
`,U=({field:{name:e,value:t,onBlur:l},form:{errors:o,touched:i,setFieldValue:c,submitCount:d},disabled:u,full:p,id:m,inputProps:g,invalid:f,label:b,options:C,placeholder:A,searchEmptyMessage:E,translateLabel:y,translateLabelValues:k,translateOptions:O,translatePlaceholder:S,translateSearchEmptyMessage:x,validated:M,validationMessage:w,width:T,onChange:I,afterChange:N=null,responsiveField:V=!1,value:L,searchable:$=!0,...F})=>{const{formatMessage:B}=(0,v.tz)(),P=void 0!==L?L:t,_=(0,n.useSelector)(s.EL),W=(0,a.useMemo)(()=>({id:null!=m?m:e,name:e,onBlur:l,autoComplete:"off",...g}),[m,g,e,l]),U=(0,a.useMemo)(()=>O?(C||[]).map(({label:e,values:t,...l})=>({...l,label:B({id:e},t||{})})):C,[B,C,O]),Q=(0,a.useCallback)((t,l)=>{c(e,l)},[e,c]),q=M&&(0,h.If)(e,o,i,d),J=w||(0,r.O6)(o,e);let Y=b;"string"==typeof Y&&y&&(Y=B({id:Y},k||{}));let Z=B({id:"COMMON_SELECT"});A&&(Z=S?B({id:A}):A);let K=B({id:"COMMON_NO_RESULTS"});E&&(K=x?B({id:E}):E);const X=f??q,ee=(0,a.useCallback)((e,t=[])=>{I?I((0,z.cC)(e)?P:e,t):Q(e,t),N&&N(t)},[P,I,Q,N]);if(V&&U.length&&U.length<2)return a.createElement(G,{flexWrap:"wrap"},U.map(t=>a.createElement(H.A,{checked:P?.includes(t.value),id:e,onChange:({currentTarget:{checked:e}})=>{const l=P.filter(e=>e!==t.value);e&&l.push(t.value),I?I(t,l):Q(t,l)},key:`${e}-${t.value}`},t.label)));const te=$||V&&U.length>5;return a.createElement(R,null,a.createElement(D,{disabled:null!=u?u:_,inputProps:W,label:Y,options:U,placeholder:Z,searchEmptyMessage:K,value:P,width:p?"100%":T,invalid:X,onChange:ee,searchable:te,...F}),M&&X?a.createElement(j.A,{isInvalid:!0,style:{padding:0},label:X&&J}):null)};var Q=l(362412);const q=(0,O.A)(d.A)`
  label:not(:last-child) {
    margin-right: 16px;
  }
`,J=({field:{name:e,value:t,onBlur:l},form:{errors:o,touched:i,setFieldValue:c,submitCount:d},disabled:u,full:p,id:m,inputProps:g,invalid:f,label:b,multi:C,options:A,placeholder:E,searchEmptyMessage:y,translateLabel:k,translateLabelValues:O,translateOptions:S,translatePlaceholder:x,translateSearchEmptyMessage:M,validated:w,validationMessage:T,width:I,sortedDropdown:N=!1,onChange:V,afterChange:L=null,responsiveField:$=!1,...F})=>{const B=(0,n.useSelector)(s.EL),{formatMessage:P}=(0,v.tz)(),_=(0,a.useMemo)(()=>({id:null!=m?m:e,name:e,onBlur:l,autoComplete:"off",...g}),[m,g,e,l]),z=(0,a.useMemo)(()=>S?(A||[]).map(({label:e,values:t,...l})=>({...l,label:P({id:e},t||{})})):A,[P,A,S]),W=(0,a.useCallback)((t,l)=>c(e,l),[e,c]),D=w&&(0,h.If)(e,o,i,d),G=T||(0,r.O6)(o,e);let R=b;"string"==typeof R&&k&&(R=P({id:R},O||{}));let U=P({id:"COMMON_SELECT"});E&&(U=x?P({id:E}):E);let J=P({id:"COMMON_NO_RESULTS"});y&&(J=M?P({id:y}):y);const Y=f??D;if(C&&$&&z.length&&z.length<4)return a.createElement(q,{flexWrap:"wrap"},z.map(l=>a.createElement(H.A,{checked:t?.includes(l.value),id:e,onChange:({currentTarget:{checked:e}})=>{const n=t.filter(e=>e!==l.value);e&&n.push(l.value),V?V(l,n):W(l,n)},key:`${e}-${l.value}`},l.label)));const Z=F.searchable||$&&z.length>5,K=N?Q.A.Sorted:Q.A;return a.createElement(a.Fragment,null,a.createElement(K,{disabled:null!=u?u:B,inputProps:_,label:R,multi:C,options:z,placeholder:U,searchEmptyMessage:J,value:t,width:p?"100%":I,invalid:Y,searchable:Z,onChange:(e,t)=>{V?V(e,t):W(e,t),L&&L(t)},...F}),w&&Y&&G?a.createElement(j.A,{isInvalid:!0,style:{padding:0},label:G}):null)},Y=({field:{name:e,onChange:t,value:l},afterChange:n,form:r,type:o,checked:i,...s})=>{const c=(0,a.useCallback)(e=>{t(e),n&&n(e.currentTarget.checked)},[n,t]);return a.createElement(H.A,{checked:i??l,id:e,value:"true",onChange:c,...s})},Z=({allowReadOnly:e=!1,fast:t=!1,type:l="text",id:p,name:m,tooltipMessage:h,searchText:g,searchTags:v,searchIgnore:f,disabled:b,tooltipProps:C,...E})=>{const k=(0,n.useSelector)(s.EL),O=(e=>{switch(e){case"checkbox":return x;case"realCheckbox":return Y;case"dropdown":return J;case"multiInlineDropdown":return U;case"radio":return P;case"textarea":return I;case"toggleBox":return y;case"timeInput":return w;case"picklist":return _.A;case"slider":return V;default:return A}})(l),S=t?r.B0:r.D0,M=Boolean(h)&&("realCheckbox"===l||"radio"===l),T=(0,o.mQ)();return a.createElement(u.A,{condition:M,wrapper:e=>a.createElement(d.A,{alignItems:"center"},e)},a.createElement(S,{component:O,type:l,name:m,id:p||m,disabled:!e&&(k||b||T),size:"body",...E}),M?a.createElement(d.A,{paddingLeft:i.YC,pointerEvents:e||!k&&!b?void 0:"none",opacity:e||!k&&!b?void 0:i.xN},a.createElement(c.A,{description:h,portal:!0,...C})):null)}},175522:(e,t,l)=>{l.d(t,{A:()=>a,Q:()=>r});var n=l(416348);const a="_",r=[n.ZM,n.Je]},284428:(e,t,l)=>{l.d(t,{Im:()=>s,iL:()=>c,mQ:()=>o,pv:()=>r,q:()=>i});var n=l(296540),a=l(451449);function r(){return(0,n.useContext)(a.I)}function o(){return r().fields}function i(){return r().tooltipPopovers}function s(){return r().tooltipIcons}function c(){return r().labels}},317672:(e,t,l)=>{l.d(t,{A:()=>c});var n=l(296540),a=l(498577),r=l(284428),o=l(566723),i=l(766624),s=l(294303);const c=({tooltip:e,htmlFor:t,children:l,labelProps:c,wrapperProps:d,tooltipProps:u})=>{const p=(0,r.iL)();return n.createElement(s.A,{alignItems:"center",gap:o.YC,...d},n.createElement(a.A,{htmlFor:t,color:"tertiary",...c,style:{opacity:p?o.xN:void 0,...c?.style}},l),e?n.createElement(i.A,{description:e,...u}):null)}},362412:(e,t,l)=>{l.d(t,{A:()=>u});var n=l(469733),a=l(296540),r=l(436331),o=l(805837),i=l(282556),s=l(71265);const c=e=>a.createElement(r.A,{renderOption:o.q,...e}),d=e=>a.createElement(c,{...e});d.Sorted=e=>{const t=(0,n.useSelector)(i.zi),l=(0,a.useMemo)(()=>(0,s.k)(t),[t]);return a.createElement(c,{...e,sortBy:l})};const u=d},451449:(e,t,l)=>{l.d(t,{I:()=>n});const n=(0,l(296540).createContext)({fields:!1,labels:!1,tooltipPopovers:!1,tooltipIcons:!1})},454195:(e,t,l)=>{l.d(t,{b:()=>n});const n=32},662297:(e,t,l)=>{l.d(t,{A:()=>O});var n=l(296540),a=l(927099),r=l(888170),o=l(318195),i=l(86838),s=l(71479),c=l(132196),d=l(311785),u=l(454195),p=l(566723),m=l(699784),h=l(705228),g=l(294303),v=l(317672);const f=(e,t,l)=>c.AH`
  width: ${l?"100%":`${h.ng}px`};
  max-width: 100%;
  ${e&&`box-shadow: inset 0 0 0 1px ${r.Ay["red-1"]};`}
  ${!t&&"display: none;"}
`,b=c.AH`
  vertical-align: top;
`,C=e=>c.AH`
  div[class*='toggleWrap'] {
    ${e&&"width: 100%;"}
  }

  label > div[class*='selectorLabel'] {
    /* A bug in UIC causes the need for this override. If you can remove this without PickLists overflowing horizontally, please do. https://ui.slack.com/archives/GF9JUGVEV/p1739435275590989 */
    width: calc(100% - 24px) !important;
  }
`,A=(0,s.A)("div",(0,d.A)("disabled","isFullWidth"))`
  ${({isFullWidth:e})=>e&&"width: 100%;"}

  ${({disabled:e})=>e&&`\n  opacity: ${p.xN};\n  pointer-events: none;\n  cursor: default;\n`}
`,E={padding:0},y={margin:0},k={keys:["label","additionalInfo"]},O=({name:e,options:t,onChange:l,value:r,disabled:s=!1,label:d,invalid:p,triggerButtonText:h="COMMON_EDIT_SELECTIONS",triggerButtonHeight:O,translateTriggerButtonText:S=!0,alwaysShowTriggerButtonText:x=!1,popoverClassName:M="",placement:w="bottom start",isWindowed:T,isFullWidth:I=!1,tooltipVisibility:N,maxSelections:V=null,isDefaultOpen:L=!1,onCheckConfirm:$,isSelectAllVisible:F,onCheckSelectAllConfirm:B,onChangeSelectAll:P,onOpenChange:_,truncateLabels:z,selectAllText:W,siteGroups:H,showSiteGroups:j,tooltipDescription:D,chipClassName:G,imageWidth:R,searchOptions:U,tooltipProps:Q})=>{const{formatMessage:q}=(0,m.tz)(),J=(r?.length||0)>0,[Y,Z]=(0,n.useState)(L),K=(0,n.useMemo)(()=>({...k,...U}),[U]);return n.createElement(A,{disabled:s,isFullWidth:I},d?n.createElement(v.A,{htmlFor:e,tooltip:D,tooltipProps:Q},"string"==typeof d?n.createElement(m.sA,{id:d}):d):null,n.createElement(o.A.Popover,{isOpen:Y,options:t,value:r,onOpenChange:e=>{_?.(e),Z(e)},searchOptions:K,onCheckConfirm:$,onCheckSelectAllConfirm:B,onChangeSelectAll:P,isSelectAllVisible:F,onSave:l,searchPlaceholder:q({id:"COMMON_SEARCH"}),saveButtonText:q({id:"COMMON_ACTION_SAVE"}),cancelButtonText:q({id:"COMMON_ACTION_CANCEL"}),className:(0,c.cx)(C(I),M),placement:w,isWindowed:T,maxSelections:W&&null===V?void 0:V,tooltipVisibility:N,truncateLabels:z,selectAllText:W?q({id:W}):void 0,siteGroups:H,showSiteGroups:j,imageWidth:R,renderToggle:()=>n.createElement(o.A.Trigger,{options:t,chipClassName:(0,c.cx)(b,G),chipContainerClassName:f(!!p,J,I),editSelectionsButtonStyle:y,maxLines:6,overflowBehavior:"truncate",editSelectionsButtonText:J&&!x?n.createElement(a.A,{size:"body",color:"inherit"},x,n.createElement(m.sA,{id:"COMMON_ACTION_EDIT"})," (",r?.length||0,")"):n.createElement(g.A,{height:O??u.b,alignItems:"center"},S&&"string"==typeof h?n.createElement(m.sA,{id:h}):h)})}),p?n.createElement(i.A,{isInvalid:!0,style:E,label:p}):null)}},705228:(e,t,l)=>{l.d(t,{KA:()=>i,VT:()=>o,i9:()=>a,ng:()=>s,nt:()=>r});var n=l(888170);const a=l(132196).AH`
  font-size: ${n.Ay["font-size-m"]};
  font-weight: normal;
  border-radius: 0;
`,r=112,o=20,i=256,s=345},766624:(e,t,l)=>{l.d(t,{A:()=>s});var n=l(296540),a=l(271856),r=l(709690),o=l(284428),i=l(566723);const s=({description:e,isInteractive:t,portal:l=!0,cursorType:s,title:c,position:d,width:u,iconProps:p,disabled:m=!1})=>{const h=(0,o.Im)()||m,g=(0,o.q)();return n.createElement(a.A,{description:e,portal:l,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:s,title:c,position:d,width:u,disableHover:g},n.createElement(r.A,{isActive:!0,size:"original",opacity:h?i.xN:void 0,...p}))}},836645:(e,t,l)=>{l.d(t,{A:()=>c});var n=l(469733),a=l(296540),r=l(79760),o=l(602021),i=l(662297);const s=[],c=({field:e,form:t,list:l,onChange:c,value:d,validationMessage:u,disabled:p,...m})=>{const h=(0,n.useSelector)(o.EL),g=(0,a.useCallback)(l=>{t&&e&&t.setFieldValue(e.name,l)},[t,e]),v=t&&e?(0,r.t$)(e.name,t.errors,t.touched,t.submitCount):void 0;return a.createElement(i.A,{value:d||e?.value||l||s,onChange:c||g,disabled:p||h,name:e?.name,invalid:u||v,...m})}}}]);