"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[20197],{752104(e,t,l){l.d(t,{A:()=>n,Q:()=>s});var a=l(765567);const n="_",s=[a.ZM,a.Je]},486061(e,t,l){l.d(t,{VT:()=>i,i9:()=>n,ng:()=>r,nt:()=>s});var a=l(241365);const n=l(409844).AH`
  font-size: ${a.Ay["font-size-m"]};
  font-weight: normal;
  border-radius: 0;
`,s=112,i=20,r=345},120197(e,t,l){l.d(t,{A:()=>q});var a=l(274934),n=l(977872),s=l(843871),i=l(184931),r=l(309130),o=l(897166),d=l(304151),c=l(100978),u=l(408402),h=l(602086),p=l(396489),m=l.n(p),g=l(318087),v=l(843615),b=l(470070);const C=e=>{if(e)return"string"==typeof e?(0,a.jsx)(a.Fragment,{children:e}):"object"!=typeof e||!(0,h.isValidElement)(e)||e},f=(0,h.memo)(({autoComplete:e="nope",label:t=null,labelValues:l={},placeholder:n=null,placeholderValues:s={},translatePlaceholder:i=!0,helperMessage:r=null,forwardedRef:o,value:d,onBlur:c,onChange:u,dirty:h,touched:p,invalid:m,...g})=>{const{formatMessage:f}=(0,b.tz)();return(0,a.jsx)(v.A,{ref:o,...t?{label:"string"==typeof t?f({id:t},l):t}:{},placeholder:n&&i?f({id:n},s).toString():n,helperMessage:r&&f({id:r},s),autoComplete:e,onChange:u,onBlur:c,value:d,invalid:C(m),...g})}),x=(0,h.memo)(({field:{name:e,value:t,onBlur:l,onChange:n},form:{dirty:i,errors:r,touched:o,submitCount:d},autoComplete:c="off",disabled:u=!1,...h})=>{const p=(0,g.t$)(e,r,o,d);return(0,a.jsx)(f,{id:e,name:e,value:t,onBlur:l,onChange:n,disabled:u,autoComplete:c,invalid:p,dirty:i,touched:(0,s.O6)(o,e)??!1,...h})},(e,t)=>{const{field:{name:l,value:a},form:{dirty:n,errors:i,submitCount:r,touched:o}}=e;return Object.entries(e).length===Object.entries(t).length&&!Object.entries(t).some(([t,d])=>{switch(t){case"form":{const e=(0,s.O6)(i,l),t=(0,s.O6)(d.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))||d.submitCount!==r||(0,s.O6)(d.touched,l)!==(0,s.O6)(o,l)||d.dirty!==n}case"field":return d?.value!==a;case"labelValues":case"placeholderValues":return!1;default:return d!==e[t]}})});var A=l(31231);const y=({field:{name:e,onBlur:t},form:{setFieldValue:l,values:n},type:i,className:r,id:o,value:d,disabled:c,onChange:u,children:p,isLabelCentered:m=!0,customFormFieldValue:g,...v})=>{const b=g?.()||(0,s.O6)(n,e),C=(0,h.useCallback)(t=>{l(e,t?[...b,d]:b.filter(e=>e!==d))},[e,b,l,d]);return(0,a.jsx)(A.A,{isSelected:b.includes(d),id:o!==e?o:`${e}-${d}`,name:e,onBlur:t,onChange:u||C,label:p,isLabelCentered:m,isDisabled:c,...v})};var k=l(770698),O=l(247816);const j=(0,O.A)(k.A)`
  display: inline-flex !important;

  --form-checkbox-size: 100%;

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

    &::before {
      content: none !important;
    }
  }
`,M=({field:{name:e,onChange:t,value:l},afterChange:n=null,form:s,checked:i=!1,...r})=>{const o=(0,h.useCallback)(e=>{t(e),n&&n(e.currentTarget.checked)},[n,t]);return(0,a.jsx)(j,{checked:!(!i&&!l),id:e,name:e,size:"medium",value:"true",onChange:o,...r})};var S=l(654970);const w=({label:e,field:{name:t,value:l},form:{setFieldValue:n},type:s,checked:i=!1,disabled:o,containerStyle:d,...c})=>{const u=(0,h.useCallback)((e,l)=>{n(t,l)},[t,n]),{formatMessage:p}=(0,b.tz)();return(0,a.jsx)(S.A,{onChange:u,label:e&&p({id:e}),value:l,disabled:o,containerStyle:{opacity:o?r.xN:void 0,...d},...c})};var T=l(335220);const E=({field:{name:e,value:t},form:{setFieldValue:l,errors:n,touched:s,submitCount:i},...r})=>{const o=(0,h.useCallback)(({target:{value:t}})=>{l(e,t)},[e,l]);return(0,a.jsx)(T.A,{value:t,onChange:o,invalid:(0,g.t$)(e,n,s,i),...r})};var B=l(925845);const N=({field:{name:e},form:{setFieldValue:t},onChange:l,type:n,...s})=>{const i=(0,h.useCallback)(({target:{value:l}})=>{t(e,l)},[t,e]);return(0,a.jsx)(B.A,{onChange:l||i,...s})};var V=l(918365),$=l(956976),F=l(291508);const L=(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: ${r.kc};\n          }\n\n          input {\n            margin-right: ${r.kc};\n          }\n        `}
`,I=({field:{name:e},form:{setFieldValue:t,values:l},id:n,value:s,checked:i,afterChange:r,...o})=>{const d=(0,h.useCallback)(({currentTarget:{checked:l}})=>{l&&(t(e,s),r?.(s))},[e,t,s,r]);return(0,a.jsx)(L,{checked:i??(0,V.A)(l,e)===(void 0===s||s),id:void 0!==s?`${e}-${s}`:e,name:e,onChange:d,...o})};var P=l(531302),_=l(256498),z=l(916784),W=l(762705),D=l(104669);const H=(0,O.A)(z.A)`
  > div > div > div > div {
    align-items: flex-start;
  }
`,G=(0,O.A)(c.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:i,touched:r,setFieldValue:d,submitCount:c},disabled:u,full:p,id:m,inputProps:v,invalid:C,label:f,options:x,placeholder:A,searchEmptyMessage:y,translateLabel:k,translateLabelValues:O,translateOptions:j,translatePlaceholder:M,translateSearchEmptyMessage:S,validated:w,validationMessage:T,width:E,onChange:B,afterChange:N=null,responsiveField:V=!1,value:$,searchable:F=!0,...L})=>{const{formatMessage:I}=(0,b.tz)(),P=void 0!==$?$:t,z=(0,n.d4)(o.EL),U=(0,h.useMemo)(()=>({id:null!=m?m:e,name:e,onBlur:l,autoComplete:"off",...v}),[m,v,e,l]),Q=(0,h.useMemo)(()=>j?(x||[]).map(({label:e,values:t,...l})=>({...l,label:I({id:e},t||{})})):x,[I,x,j]),Y=(0,h.useCallback)((t,l)=>{d(e,l)},[e,d]),J=w&&(0,g.If)(e,i,r,c),Z=T||(0,s.O6)(i,e);let q=f;"string"==typeof q&&k&&(q=I({id:q},O||{}));let K=I({id:"COMMON_SELECT"});A&&(K=M?I({id:A}):A);let X=I({id:"COMMON_NO_RESULTS"});y&&(X=S?I({id:y}):y);const ee=C??J,te=(0,h.useCallback)((e,t=[])=>{B?B((0,_.cC)(e)?P:e,t):Y(e,t),N&&N(t)},[P,B,Y,N]);return V&&Q.length&&Q.length<2?(0,a.jsx)(G,{flexWrap:"wrap",children:Q.map(t=>(0,a.jsx)(W.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),B?B(t,l):Y(t,l)},children:t.label},`${e}-${t.value}`))}):(0,a.jsxs)(R,{children:[(0,a.jsx)(H,{disabled:null!=u?u:z,inputProps:U,label:q,options:Q,placeholder:K,searchEmptyMessage:X,value:P,width:p?"100%":E,invalid:ee,onChange:te,searchable:F||V&&Q.length>5,...L}),w&&ee?(0,a.jsx)(D.A,{isInvalid:!0,style:{padding:0},label:ee&&Z}):null]})};var Q=l(237887);const Y=(0,O.A)(c.A)`
  label:not(:last-child) {
    margin-right: 16px;
  }
`,J=({field:{name:e,value:t,onBlur:l},form:{errors:i,touched:r,setFieldValue:d,submitCount:c},disabled:u,full:p,id:m,inputProps:v,invalid:C,label:f,multi:x,options:A,placeholder:y,searchEmptyMessage:k,translateLabel:O,translateLabelValues:j,translateOptions:M,translatePlaceholder:S,translateSearchEmptyMessage:w,validated:T,validationMessage:E,width:B,sortedDropdown:N=!1,onChange:V,afterChange:$=null,responsiveField:F=!1,...L})=>{const I=(0,n.d4)(o.EL),{formatMessage:P}=(0,b.tz)(),_=(0,h.useMemo)(()=>({id:null!=m?m:e,name:e,onBlur:l,autoComplete:"off",...v}),[m,v,e,l]),z=(0,h.useMemo)(()=>M?(A||[]).map(({label:e,values:t,...l})=>({...l,label:P({id:e},t||{})})):A,[P,A,M]),H=(0,h.useCallback)((t,l)=>d(e,l),[e,d]),G=T&&(0,g.If)(e,i,r,c),R=E||(0,s.O6)(i,e);let U=f;"string"==typeof U&&O&&(U=P({id:U},j||{}));let J=P({id:"COMMON_SELECT"});y&&(J=S?P({id:y}):y);let Z=P({id:"COMMON_NO_RESULTS"});k&&(Z=w?P({id:k}):k);const q=C??G;return x&&F&&z.length&&z.length<4?(0,a.jsx)(Y,{flexWrap:"wrap",children:z.map(l=>(0,a.jsx)(W.A,{checked:t?.includes(l.value),id:e,onChange:({currentTarget:{checked:e}})=>{const a=t.filter(e=>e!==l.value);e&&a.push(l.value),V?V(l,a):H(l,a)},children:l.label},`${e}-${l.value}`))}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(N?Q.A.Sorted:Q.A,{disabled:null!=u?u:I,inputProps:_,label:U,multi:x,options:z,placeholder:J,searchEmptyMessage:Z,value:t,width:p?"100%":B,invalid:q,searchable:L.searchable||F&&z.length>5,onChange:(e,t)=>{V?V(e,t):H(e,t),$&&$(t)},...L}),T&&q&&R?(0,a.jsx)(D.A,{isInvalid:!0,style:{padding:0},label:R}):null]})},Z=({field:{name:e,onChange:t,value:l},afterChange:n,form:s,type:i,checked:r,id:o,...d})=>{const c=(0,h.useCallback)(e=>{t(e),n&&n(e.currentTarget.checked)},[n,t]);return(0,a.jsx)(W.A,{checked:r??l,id:o||e,value:"true",onChange:c,...d})},q=({allowReadOnly:e=!1,fast:t=!1,type:l="text",id:h,name:p,tooltipMessage:m,searchText:g,searchTags:v,searchIgnore:b,disabled:C,tooltipProps:f,...A})=>{const k=(0,n.d4)(o.EL),O=(e=>{switch(e){case"checkbox":return M;case"realCheckbox":return Z;case"dropdown":return J;case"multiInlineDropdown":return U;case"radio":return I;case"textarea":return E;case"toggleBox":return y;case"timeInput":return w;case"picklist":return P.A;case"slider":return N;default:return x}})(l),j=t?s.B0:s.D0,S=Boolean(m)&&("realCheckbox"===l||"radio"===l),T=(0,i.mQ)();return(0,a.jsxs)(u.A,{condition:S,wrapper:e=>(0,a.jsx)(c.A,{alignItems:"center",children:e}),children:[(0,a.jsx)(j,{component:O,type:l,name:p,id:h||p,disabled:!e&&(k||C||T),size:"body",...A}),S?(0,a.jsx)(c.A,{paddingLeft:r.YC,children:(0,a.jsx)(d.A,{description:m,portal:!0,disabled:!(e||!k&&!C),...f})}):null]})}},164487(e,t,l){l.d(t,{A:()=>d});var a=l(274934),n=l(632622),s=l(184931),i=l(309130),r=l(304151),o=l(100978);const d=({tooltip:e,htmlFor:t,children:l,labelProps:d,wrapperProps:c,tooltipProps:u})=>{const h=(0,s.iL)();return(0,a.jsxs)(o.A,{alignItems:"center",gap:i.YC,...c,children:[(0,a.jsx)(n.A,{as:"label",htmlFor:t,color:"tertiary",...d,style:{opacity:h?i.xN:void 0,...d?.style},children:l}),e?(0,a.jsx)(r.A,{description:e,...u}):null]})}},897396(e,t,l){l.d(t,{A:()=>j});var a=l(274934),n=l(602086),s=l(938984),i=l(241365),r=l(561247),o=l(104669),d=l(247816),c=l(409844),u=l(291508),h=l(833466),p=l(309130),m=l(470070),g=l(486061),v=l(100978),b=l(164487);const C=(e,t,l)=>c.AH`
  width: ${l?"100%":`${g.ng}px`};
  max-width: 100%;
  ${e&&`box-shadow: inset 0 0 0 1px ${i.Ay["red-1"]};`}
  ${!t&&"display: none;"}
`,f=c.AH`
  vertical-align: top;
`,x=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,d.A)("div",(0,u.A)("disabled","isFullWidth"))`
  ${({isFullWidth:e})=>e?"width: 100%;":""}

  ${({disabled:e})=>e?`\n  opacity: ${p.xN};\n  pointer-events: none;\n  cursor: default;\n`:""}
`,y={padding:0},k={margin:0},O={keys:["label","additionalInfo"]},j=({name:e,options:t,onChange:l,value:i,disabled:d=!1,label:u,invalid:p,triggerButtonText:g="COMMON_EDIT_SELECTIONS",triggerButtonHeight:j,translateTriggerButtonText:M=!0,alwaysShowTriggerButtonText:S=!1,popoverClassName:w="",placement:T="bottom start",isWindowed:E,isFullWidth:B=!1,tooltipVisibility:N,maxSelections:V=null,isDefaultOpen:$=!1,onCheckConfirm:F,isSelectAllVisible:L,onCheckSelectAllConfirm:I,onChangeSelectAll:P,onOpenChange:_,onOptionCheck:z,truncateLabels:W,selectAllText:D,siteGroups:H,showSiteGroups:G,tooltipDescription:R,chipClassName:U,imageWidth:Q,searchOptions:Y,tooltipProps:J})=>{const{formatMessage:Z}=(0,m.tz)(),q=(i?.length||0)>0,[K,X]=(0,n.useState)($),ee=(0,n.useMemo)(()=>({...O,...Y}),[Y]),{searchPlaceholder:te,saveButtonText:le,cancelButtonText:ae}=(0,n.useMemo)(()=>({searchPlaceholder:Z({id:"COMMON_SEARCH"}),saveButtonText:Z({id:"COMMON_ACTION_SAVE"}),cancelButtonText:Z({id:"COMMON_ACTION_CANCEL"})}),[Z]),ne=(0,n.useCallback)(e=>{_?.(e),X(e)},[_]),se=(0,n.useCallback)(()=>(0,a.jsx)(r.A.Trigger,{options:t,chipClassName:(0,c.cx)(f,U),chipContainerClassName:C(!!p,q,B),editSelectionsButtonStyle:k,maxLines:6,overflowBehavior:"truncate",editSelectionsButtonText:q&&!S?(0,a.jsxs)(s.A,{size:"medium",color:"inherit",children:[S,(0,a.jsx)(m.sA,{id:"COMMON_ACTION_EDIT"})," (",i?.length||0,")"]}):(0,a.jsx)(v.A,{height:j??h.b,alignItems:"center",children:M&&"string"==typeof g?(0,a.jsx)(m.sA,{id:g}):g})}),[t,U,p,q,B,j,M,g,i,S]);return(0,a.jsxs)(A,{disabled:d,isFullWidth:B,children:[u?(0,a.jsx)(b.A,{htmlFor:e,tooltip:R,tooltipProps:J,children:"string"==typeof u?(0,a.jsx)(m.sA,{id:u}):u}):null,(0,a.jsx)(r.A.Popover,{isOpen:K,options:t,value:i,onOpenChange:ne,searchOptions:ee,onCheckConfirm:F,onCheckSelectAllConfirm:I,onChangeSelectAll:P,isSelectAllVisible:L,onSave:l,onOptionCheck:z,searchPlaceholder:te,saveButtonText:le,cancelButtonText:ae,className:(0,c.cx)(x(B),w),placement:T,isWindowed:E,maxSelections:D&&null===V?void 0:V??void 0,tooltipVisibility:N,truncateLabels:W,selectAllText:D?Z({id:D}):void 0,siteGroups:H,showSiteGroups:G,imageWidth:Q,renderToggle:se}),p?(0,a.jsx)(o.A,{isInvalid:!0,style:y,label:p}):null]})}},531302(e,t,l){l.d(t,{A:()=>c});var a=l(274934),n=l(977872),s=l(602086),i=l(318087),r=l(897166),o=l(897396);const d=[],c=({field:e,form:t,list:l,onChange:c,value:u,validationMessage:h,disabled:p,...m})=>{const g=(0,n.d4)(r.EL),v=(0,s.useCallback)(l=>{t&&e&&t.setFieldValue(e.name,l)},[t,e]);return(0,a.jsx)(o.A,{value:u||e?.value||l||d,onChange:c||v,disabled:p||g,name:e?.name,invalid:h||(t&&e?(0,i.t$)(e.name,t.errors,t.touched,t.submitCount):void 0),...m})}},696049(e,t,l){l.d(t,{H:()=>a});const a=""},833466(e,t,l){l.d(t,{b:()=>a});const a=32},237887(e,t,l){l.d(t,{A:()=>h});var a=l(274934),n=l(602086),s=l(977872),i=l(693371),r=l(767822),o=l(820633),d=l(308111);const c=e=>(0,a.jsx)(i.A,{renderOption:r.q,...e}),u=e=>(0,a.jsx)(c,{...e});u.Sorted=e=>{const t=(0,s.d4)(o.zi),l=(0,n.useMemo)(()=>(0,d.k)(t),[t]);return(0,a.jsx)(c,{...e,sortBy:l})};const h=u},308111(e,t,l){l.d(t,{R:()=>u,k:()=>h});var a=l(696049),n=l(350068),s=l(177173),i=l(752104),r=l(64222),o=l(332530);const d=[...new Set([a.H,i.Q.join(i.A),s.Zt,r.F,n.nc,o.Vr])],c={numeric:!0,sensitivity:"base"},u=(e,t)=>{const l=[];for(let a=e;a<=t;a+=1)l.push({value:a,label:String(a)});return l},h=e=>({value:t,label:l},{value:a,label:n})=>d.includes(t?.toString())||d.includes(a?.toString())?1/0:l?.toString().localeCompare(n?.toString(),e,c)??-1},318087(e,t,l){l.d(t,{DY:()=>r,F6:()=>c,If:()=>o,LE:()=>u,t$:()=>d});var a=l(274934),n=l(602086),s=l(843871),i=l(470070);const r=(e,t)=>({props:{id:e,values:t}}),o=(e,t,l,a)=>{const n=(0,s.O6)(t,e);return!(!((0,s.O6)(l,e)||a>0)||!n)};function d(e,t,l,r){if(!o(e,t,l,r))return null;if(!e.length)return null;const d=(0,s.O6)(t,e);return d?(0,n.isValidElement)(d)||"string"==typeof d?d:(0,a.jsx)(i.sA,{...d.props}):null}const c=(e,t,l,a,n)=>!(!(a?.[e]||n>0)||!l?.[e]?.[t]),u=(e,t)=>{const l={...e},a=Object.keys(l),n=a.filter(e=>l[e]!==t[e]);return a.forEach(e=>{n.includes(e)||delete l[e],"object"==typeof n[e]&&(l[e]=u(n[e],t[e]))}),l}}}]);