"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[48787],{847883(e,t,n){n.d(t,{A:()=>d});var i=n(296540),l=n(222588),o=n(14463),r=n(457856),c=n(722860),s=n(394756),u=n(772776);const a=(0,c.c)(l.A),d=i.forwardRef((e,t)=>{const{className:n,disabled:l=!1,highlight:c=!1,highlightClassName:d,highlightColor:h,highlightNoAutoScroll:m=!1,motif:g,unlimitedWidth:f=!1,style:p,children:E,inline:v=!1,...w}=(0,s.b)(e),b=(0,u.p)(e),I=(0,i.useRef)(null),W=(0,i.useRef)(null);return(0,r.iz)(!m&&c,null,I,"outline",W),i.createElement("div",{...w,className:a.concat(n)("settingsGridRow",!f&&"settingsGridRow-limitedWidth",v&&"settingsGridRow-inline",l&&"disabled"),ref:e=>{W.current=e,"function"==typeof t?t(e):t&&(t.current=e)},style:{...p,...b}},c&&i.createElement(o.A,{ref:I,className:d,color:h,show:!0}),E)})},457856(e,t,n){n.d(t,{gH:()=>r,iz:()=>o});var i=n(296540);const l=e=>{const t=(0,i.useRef)(!1),[n,l]=(0,i.useState)(0),o=n>=(e||0);return(0,i.useEffect)(()=>{e&&Number.isFinite(e)&&e>n&&t&&l(n+1)},[n]),o},o=(e,t,n,o,r)=>{const c=l(t);(0,i.useEffect)(()=>{if(r&&r.current&&e&&"none"!==o&&c){const e=r.current;let t=null==e?void 0:e.parentElement,i=null;for(;null!==t;){const e=t&&window.getComputedStyle(t).overflowY;if("auto"===e||"scroll"===e){i=t||null;break}t=null!==t&&null!==t.parentElement?t.parentElement:null}if(i&&e){const{bottom:t,height:l,top:o}=e.getBoundingClientRect(),{bottom:r,height:c,top:s}=i.getBoundingClientRect(),u=16+((null==n?void 0:n.current)?-1*parseInt(window.getComputedStyle(n.current).top,10):0),a=t+u>r;o-u<s||l+2*u>c?i.scrollTo({behavior:"smooth",top:i.scrollTop-s+o-u}):a&&i.scrollTo({behavior:"smooth",top:i.scrollTop+t-r+u})}}},[e,c])},r=(e,t,n,o,r)=>{const c=(0,i.useCallback)(()=>{var e,t;if(!r||!r.current)return{elementWithMatchingId:null,hasElementWithMatchingId:!1,isElementWithMatchingIdActive:!1};const n=o&&document.getElementById(o);return{elementWithMatchingId:n,hasElementWithMatchingId:!(!n||!(null===(t=null===(e=r.current)||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.contains(n))),isElementWithMatchingIdActive:!(!n||n.disabled)}},[o,r]),s=l(t);(0,i.useEffect)(()=>{if(!r||!r.current)return;const{elementWithMatchingId:t,hasElementWithMatchingId:i,isElementWithMatchingIdActive:l}=c();i&&e&&("auto"===n||"focus"===n)&&l&&s&&t&&(null==t||t.focus({preventScroll:!0}))},[e,s]);const{hasElementWithMatchingId:u,isElementWithMatchingIdActive:a}=c();return r&&null===r.current?null:u&&a}},394756(e,t,n){n.d(t,{b:()=>o});var i=n(165126),l=n(772776);function o(e){return(0,i.A)(e,l.D)}},772776(e,t,n){n.d(t,{D:()=>l,p:()=>o});var i=n(296540);const l=["padding","paddingLeft","paddingRight","paddingTop","paddingBottom","margin","marginLeft","marginRight","marginTop","marginBottom","height","width","maxHeight","minHeight","maxWidth","minWidth"];function o(e){const t=(0,i.useMemo)(()=>Object.keys(e).filter(e=>l.includes(e)),[e]);return(0,i.useMemo)(()=>{const n={};return t.forEach(t=>n[t]=e[t]),n},[t])}},705426(e,t,n){n.d(t,{A:()=>r});var i=n(296540),l=n(617147),o=n(248543);const r=({children:e=null,hideModal:t,onRequestClose:n,portalSelector:r=o.J,forwardedRef:c=null,...s})=>i.createElement(l.A,{isOpen:!0,shouldCloseOnEsc:!0,onRequestClose:n||t,parentSelector:r,ref:c,...s},e)},248543(e,t,n){n.d(t,{J:()=>i,g:()=>l});const i=()=>document.getElementById("modal-container"),l=()=>document.getElementById("modal-settings-container")}}]);