"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[89965,96359],{38671:(e,t,n)=>{function r(e){return"object"==typeof e&&!!e&&"apiMsg"in e&&"status"in e}n.d(t,{F:()=>r})},39705:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(296540),i=n(705145),a=n(699784),o=n(115829),s=n(424135),c=n(819127);const l=function({items:e,renderMultipleItemsSummary:t,renderListItem:n,renderNoItems:l,getItemKey:d,enabled:m=!0,showListMarkers:u,cursorType:E,isInteractive:A}){const g=m?"inherit":"disabled";return e.length>1?r.createElement(s.A,{tooltip:r.createElement(c.A,{items:e,getItemKey:d,renderItem:n,showListMarkers:u,isInteractive:A,cursorType:E})},r.createElement(o.A,{color:g,cursorType:E},t(e))):1===e.length?r.createElement(o.A,{color:g,cursorType:E},n(e[0])):l?r.createElement(r.Fragment,null,l()):r.createElement(i.A,{isTruncated:!0,color:g},r.createElement(a.sA,{id:"COMMON_FALLBACK"}))}},42345:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(296540),i=n(231755),a=n(566723),o=n(294303),s=n(689965);const c=({actions:e})=>r.createElement(s.A,{marginBottom:"none"},r.createElement(o.A,{flexDirection:"column",gap:a.kc,width:"100%"},e.filter(Boolean).map((e,t,n)=>r.createElement(r.Fragment,{key:[t,e.toString()].join()},e,t<n.length-1?r.createElement(o.A,{width:"100%",flexDirection:"column",paddingTop:a.YC,paddingBottom:a.YC},r.createElement(i.A,{orientation:"horizontal"})):null))))},175875:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(469733),i=n(296540),a=n(718073),o=n(592563),s=n(602021),c=n(294303);const l=(0,i.forwardRef)(({allowReadOnly:e,disabledReason:t,...n},l)=>{const d=(0,r.useSelector)(s.EL)&&!e;return i.createElement(c.A,{alignItems:"center"},i.createElement(a.A,{description:t,placement:"left"},i.createElement(o.A,{fontSize:"medium",type:"button",...n,isDisabled:d||n.isDisabled||!!t,ref:l})))})},229817:(e,t,n)=>{n.d(t,{A:()=>m});var r=n(469733),i=n(296540),a=n(705145),o=n(566723),s=n(294303),c=n(703447),l=n(951106),d=n(239417);const m=({mac:e})=>{const t=(0,r.useSelector)(d.GB).find(t=>"mac"in t&&t.mac===e)||{};return i.createElement(s.A,{gap:o.kc,alignItems:"center"},i.createElement(s.A,{maxWidth:16,maxHeight:16},i.createElement(c.A,{client:{mac:e,...t}})),i.createElement(a.A,{variant:"inherit",isTruncated:!0},(0,l.tn)(t||{})||e))}},284428:(e,t,n)=>{n.d(t,{Im:()=>c,iL:()=>l,mQ:()=>o,pv:()=>a,q:()=>s});var r=n(296540),i=n(451449);function a(){return(0,r.useContext)(i.I)}function o(){return a().fields}function s(){return a().tooltipPopovers}function c(){return a().tooltipIcons}function l(){return a().labels}},321235:(e,t,n)=>{n.d(t,{A:()=>d});var r=n(296540),i=n(217439),a=n(705145),o=n(71479),s=n(699784),c=n(360113);const l=(0,o.A)(i.A)`
  white-space: nowrap;
`,d=({id:e,color:t,values:n,children:i})=>r.createElement(c.A,null,r.createElement(l,{color:"text-2",size:"medium"},r.createElement(s.sA,{id:e,values:n})),r.createElement(a.A,{color:t||"text-3",size:"medium",isTruncated:!0},i))},360113:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(296540),i=n(71479),a=n(566723),o=n(294303);const s=(0,i.A)(o.A,{shouldForwardProp:e=>!["valueMaxWidth","keyMinWidth","compact"].includes(e)})`
  &:not(:last-child) {
    ${({compact:e})=>e?"":`margin-bottom: ${a.kc};`}
  }
  & > {
    &:nth-child(1) {
      min-width: ${({keyMinWidth:e})=>e}px;
    }
    &:nth-child(2) {
      max-width: ${({valueMaxWidth:e})=>e}px;
    }
  }
`,c=({children:e,valueMaxWidth:t=215,keyMinWidth:n=0,flexProps:i={},compact:o=!1})=>r.createElement(s,{width:"100%",justifyContent:"space-between",gap:a.kc,height:o?void 0:24,valueMaxWidth:t,keyMinWidth:n,compact:o,...i},e)},363370:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(296540),i=n(928085),a=n(876773);const o=e=>{const t=(0,i.A)(e.to);return r.createElement(a.A,{...e,to:t})}},424135:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(296540),i=n(566723),a=n(294303);const o=({children:e,tooltip:t})=>r.createElement(a.A,{maxWidth:"100%",overflow:"hidden",gap:i.YC,alignItems:"center"},r.createElement(a.A,{flex:1,overflow:"hidden"},e),t)},451449:(e,t,n)=>{n.d(t,{I:()=>r});const r=(0,n(296540).createContext)({fields:!1,labels:!1,tooltipPopovers:!1,tooltipIcons:!1})},530813:(e,t,n)=>{n.d(t,{A:()=>E,d:()=>u});var r=n(296540),i=n(217439),a=n(705145),o=n(71479),s=n(311785),c=n(566723),l=n(699784),d=n(795097),m=n(294303);const u=(0,o.A)(d.A,(0,s.A)("showListMarkers","gap"))`
  padding-left: ${({showListMarkers:e})=>e?c.Ln:0};
  display: flex;
  flex-direction: column;
  gap: ${({gap:e})=>e??c.YC};

  > li {
    list-style-type: ${({showListMarkers:e})=>e?"disc":"none"};
  }
`;const E=function({items:e,getItemKey:t,renderItem:n,maxItemCount:o=20,renderShowMore:s,showListMarkers:d,listGap:E}){return r.createElement(m.A,{flexDirection:"column",gap:c.YC},r.createElement(u,{showListMarkers:d,gap:E},e.slice(0,o).map((e,i)=>r.createElement("li",{key:t(e,i)},r.createElement(a.A,{variant:"inherit",isTruncated:!0},n(e))))),o&&e.length>o?s?s(e):r.createElement(i.A,{variant:"inherit"},r.createElement(l.sA,{id:"COMMON_X_MORE",values:{count:e.length-o}})):null)}},611717:(e,t,n)=>{var r,i,a,o;n.d(t,{c_:()=>o,fP:()=>i,ku:()=>a,zb:()=>r}),function(e){e.CLIENTS="CLIENTS",e.NETWORKS="NETWORKS",e.USERS="USERS",e.GROUPS="GROUPS"}(r||(r={})),function(e){e.DISABLED="DISABLED",e.SHORT="SHORT",e.LONG="LONG"}(i||(i={})),function(e){e.LIMIT="LIMIT",e.PRIORITIZE="PRIORITIZE",e.LIMIT_AND_PRIORITIZE="LIMIT_AND_PRIORITIZE"}(a||(a={})),function(e){e.ALLOWLIST="ALLOWLIST",e.BLOCKLIST="BLOCKLIST",e.TURN_OFF_INTERNET="TURN_OFF_INTERNET",e.QUARANTINE="QUARANTINE"}(o||(o={}))},689965:(e,t,n)=>{n.d(t,{A:()=>E,I:()=>r});var r,i=n(296540),a=n(822336),o=n(427853),s=n(71479),c=n(825032),l=n(566723),d=n(294303);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(r||(r={}));const m=(0,s.A)(d.A,{shouldForwardProp:e=>!["marginBottom","isButtonList","margin","flex","width","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||a.Ay[n===c.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}})=>a.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,u=(0,s.A)(o.A,{shouldForwardProp:e=>!["marginBottom","margin","flex","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||a.Ay[n===c.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||a.Ay[t===c.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${l.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0 ${l.Ln} ${l.Ln};
      > div {
        padding: 0;
      }
    }
  }
`,E=({type:e,marginBottom:t,margin:n,padding:a,flex:o,width:s,nested:c,...l})=>"items"in l?i.createElement(u,{marginBottom:t,margin:n,padding:a,flex:o,nested:c,...l}):i.createElement(m,{nested:c,width:s,marginBottom:t,margin:n,padding:a,flex:o,isButtonList:e===r.BUTTON_LIST,...l},l.children)},734616:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(469733),i=n(296540),a=n(705145),o=n(366188);const s=({id:e})=>{const t=(0,r.useSelector)(o.Ct).find(t=>t._id===e);return t?i.createElement(a.A,{variant:"inherit",isTruncated:!0},t.name):null}},766624:(e,t,n)=>{n.d(t,{A:()=>c});var r=n(296540),i=n(271856),a=n(709690),o=n(284428),s=n(566723);const c=({description:e,isInteractive:t,portal:n=!0,cursorType:c,title:l,position:d,width:m,iconProps:u,disabled:E=!1})=>{const A=(0,o.Im)()||E,g=(0,o.q)();return r.createElement(i.A,{description:e,portal:n,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:c,title:l,position:d,width:m,disableHover:g},r.createElement(a.A,{isActive:!0,size:"original",opacity:A?s.xN:void 0,...u}))}},767028:(e,t,n)=>{n.d(t,{V:()=>o});var r=n(296540),i=n(977735);const a=e=>{const t=(0,r.useRef)(e);return(0,r.useEffect)(()=>{t.current=e},[e]),(0,r.useCallback)((...e)=>t.current(...e),[])};function o(e,t){const n=(0,r.useRef)([]),[,o]=(0,r.useState)(0),[s,c]=(0,r.useState)(null);(0,r.useEffect)(()=>{const e=setInterval(()=>{n.current.length&&t?.estimatedDurationMs&&o(e=>e+1)},1e3);return()=>clearInterval(e)},[t?.estimatedDurationMs]);const l=t?.dedupe??!1,d=a(t?.onSuccess||(()=>{})),m=a(t?.onError||(()=>{})),u=(0,r.useCallback)((...r)=>{if(l&&n.current.length)return Promise.reject();const a=(async()=>e(...r))();return n.current.push({promise:a,startedAt:Date.now()}),o(e=>e+1),a.then(e=>(d?.(e),c(e),e)).catch(async e=>{if(t?.delayOnErrorMs&&await(0,i.u)(t.delayOnErrorMs),c(null),!m)throw e;m(e)}).finally(async()=>{n.current=n.current.filter(e=>e.promise!==a),o(e=>e+1)})},[e,l,m,d,t?.delayOnErrorMs]),E=n.current[n.current.length-1],A=E&&t?.estimatedDurationMs?Math.min((Date.now()-E.startedAt)/t.estimatedDurationMs,.9):void 0;return{execute:u,isLoading:!!n.current.length,lastData:s,estimatedProgress:A}}},795097:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(71479),i=n(566723);const a=(0,r.A)("ul")`
  padding-left: ${i.Er};
  margin-bottom: 0;
  margin-top: 0;
`},796359:(e,t,n)=>{n.r(t),n.d(t,{default:()=>N});var r=n(469733),i=n(296540),a=n(297454),o=n(742920),s=n(38671),c=n(767028),l=n(566723),d=n(39705),m=n(175875),u=n(42345),E=n(147606),A=n(363370),g=n(294303),p=n(734616),h=n(229817),I=n(689965),f=n(675359),O=n(699784),M=n(611717),T=n(432680),v=n(959341),L=n(321235);const N=({activeItem:e})=>{const t=(0,r.useDispatch)(),n=(0,c.V)(()=>t((0,T.XR)(e.id)),{onError:e=>{const n=(0,s.F)(e)?e:void 0;return t((0,f.ox)({icon:o.C.danger,message:"SETTINGS_REMOVE_OBJECT_FAILED",errorMessage:n?.msg,errorValues:n}))}});return i.createElement(i.Fragment,null,i.createElement(I.A,null,i.createElement(L.A,{id:"COMMON_TARGET"},e.target_type===M.zb.CLIENTS?i.createElement(d.A,{items:e.targets.map(e=>e),getItemKey:e=>e,renderListItem:e=>i.createElement(h.A,{mac:e}),renderMultipleItemsSummary:e=>i.createElement(O.sA,{id:"COMMON_DEVICE_COUNT_PLURAL",values:{count:e.length}})}):e.target_type===M.zb.NETWORKS?i.createElement(d.A,{items:e.targets.map(e=>e),getItemKey:e=>e,renderListItem:e=>i.createElement(p.A,{id:e}),renderMultipleItemsSummary:e=>i.createElement(O.sA,{id:"COMMON_NETWORK_COUNT",values:{count:e.length}})}):i.createElement(O.sA,{id:"COMMON_FALLBACK"})),i.createElement(L.A,{id:"SETTINGS_SECURE"},e.secure?.enabled?i.createElement(a.A,{size:"original"}):i.createElement(g.A,{width:l.Er,justifyContent:"center",alignItems:"center",height:"100%"},i.createElement(O.sA,{id:"COMMON_FALLBACK"}))),i.createElement(L.A,{id:"COMMON_ROUTE"},e.route?.enabled?i.createElement(a.A,{size:"original"}):i.createElement(g.A,{width:l.Er,justifyContent:"center",alignItems:"center",height:"100%"},i.createElement(O.sA,{id:"COMMON_FALLBACK"}))),i.createElement(L.A,{id:"COMMON_QOS"},e.qos?.enabled?i.createElement(a.A,{size:"original"}):i.createElement(g.A,{width:l.Er,justifyContent:"center",alignItems:"center",height:"100%"},i.createElement(O.sA,{id:"COMMON_FALLBACK"}))),i.createElement(g.A,null,i.createElement(A.A,{to:`${v.Db}/${e.id}`},i.createElement(O.sA,{id:"SETTINGS_OPEN_OBJECT"})))),i.createElement(u.A,{actions:[i.createElement(E.A,{trigger:i.createElement(m.A,{variant:"destructive"},i.createElement(O.sA,{id:"COMMON_ACTION_REMOVE"})),title:i.createElement(O.sA,{id:"COMMON_QUESTION_REMOVE",values:{name:e.name}}),message:i.createElement(O.sA,{id:"SETTINGS_REMOVE_OBJECT_CONFIRMATION",values:{count:1}}),isActionPending:n.isLoading,onConfirm:()=>n.execute()})]}))}},819127:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(296540),i=n(766624),a=n(530813);const o=function({items:e,getItemKey:t,renderItem:n,maxItemCount:o,renderShowMore:s,showListMarkers:c,title:l,position:d,isInteractive:m,cursorType:u,listGap:E}){return r.createElement(i.A,{title:l,position:d,isInteractive:m,cursorType:u,description:r.createElement(a.A,{items:e,getItemKey:t,renderItem:n,maxItemCount:o,listGap:E,renderShowMore:s,showListMarkers:c})})}},876773:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(296540),i=n(758649),a=n(196010);const o=e=>r.createElement(i.A,{component:a.A,variant:"inline",size:"medium",...e})},977735:(e,t,n)=>{n.d(t,{u:()=>r});const r=e=>new Promise(t=>{setTimeout(t,e)})}}]);