"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[6087],{611717(e,t,n){var r,i,a,o,c;n.d(t,{c_:()=>c,fP:()=>a,ku:()=>o,us:()=>i,zb:()=>r}),function(e){e.CLIENTS="CLIENTS",e.NETWORKS="NETWORKS",e.USERS="USERS",e.GROUPS="GROUPS",e.IDENTITIES="IDENTITIES"}(r||(r={})),function(e){e.MAC="MAC",e.NETWORK_ID="NETWORK_ID",e.NETWORK_GROUP_ID="NETWORK_GROUP_ID",e.ULP_USER_ID="ULP_USER_ID",e.ULP_USER_GROUP_ID="ULP_USER_GROUP_ID"}(i||(i={})),function(e){e.DISABLED="DISABLED",e.SHORT="SHORT",e.LONG="LONG"}(a||(a={})),function(e){e.LIMIT="LIMIT",e.PRIORITIZE="PRIORITIZE",e.LIMIT_AND_PRIORITIZE="LIMIT_AND_PRIORITIZE"}(o||(o={})),function(e){e.ALLOWLIST="ALLOWLIST",e.BLOCKLIST="BLOCKLIST",e.TURN_OFF_INTERNET="TURN_OFF_INTERNET",e.QUARANTINE="QUARANTINE"}(c||(c={}))},689965(e,t,n){n.d(t,{A:()=>E,I:()=>r});var r,i=n(296540),a=n(822336),o=n(963724),c=n(71479),l=n(825032),s=n(566723),d=n(294303),m=n(311785);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(r||(r={}));const u=(0,c.A)(d.A,(0,m.A)("marginBottom","isButtonList","margin","flex","width","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||a.Ay[n===l.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  `:""}
`,A=(0,c.A)(o.A,(0,m.A)("marginBottom","margin","flex","padding","nested","background"))`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||a.Ay[n===l.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===l.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${s.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0;
      > div {
        padding: 0 ${s.Ln} ${s.Ln};
      }
    }
  }
`,E=({type:e,marginBottom:t,margin:n,padding:a,flex:o,width:c,nested:l,...s})=>"items"in s?i.createElement(A,{marginBottom:t,margin:n,padding:a,flex:o,nested:l,...s}):i.createElement(u,{nested:l,width:c,marginBottom:t,margin:n,padding:a,flex:o,isButtonList:e===r.BUTTON_LIST,...s},s.children)},229817(e,t,n){n.d(t,{A:()=>m});var r=n(469733),i=n(296540),a=n(705145),o=n(566723),c=n(294303),l=n(703447),s=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(c.A,{gap:o.kc,alignItems:"center"},i.createElement(c.A,{maxWidth:16,maxHeight:16},i.createElement(l.A,{client:{mac:e,...t}})),i.createElement(a.A,{variant:"inherit",isTruncated:!0},(0,s.tn)(t||{})||e))}},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})},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})}},42345(e,t,n){n.d(t,{A:()=>l});var r=n(296540),i=n(231755),a=n(566723),o=n(294303),c=n(689965);const l=({actions:e})=>r.createElement(c.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:()=>s});var r=n(469733),i=n(296540),a=n(592563),o=n(180524),c=n(602021),l=n(294303);const s=(0,i.forwardRef)(({allowReadOnly:e,disabledReason:t,...n},s)=>{const d=(0,r.useSelector)(c.EL)&&!e;return i.createElement(l.A,{alignItems:"center"},i.createElement(o.A,{description:t,placement:"left"},i.createElement(a.A,{fontSize:"medium",type:"button",...n,isDisabled:d||n.isDisabled||!!t,ref:s})))})},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:c,showListMarkers:l,title:s,position:d,isInteractive:m,cursorType:u,listGap:A,iconProps:E}){return r.createElement(i.A,{title:s,position:d,isInteractive:m,cursorType:u,description:r.createElement(a.A,{items:e,getItemKey:t,renderItem:n,maxItemCount:o,listGap:A,renderShowMore:c,showListMarkers:l}),iconProps:E})}},39705(e,t,n){n.d(t,{A:()=>s});var r=n(296540),i=n(705145),a=n(916537),o=n(115829),c=n(424135),l=n(819127);const s=function({items:e,renderMultipleItemsSummary:t,renderListItem:n,renderNoItems:s,getItemKey:d,enabled:m=!0,showListMarkers:u,cursorType:A,isInteractive:E}){const g=m?"inherit":"disabled";return e.length>1?r.createElement(c.A,{tooltip:r.createElement(l.A,{items:e,getItemKey:d,renderItem:n,showListMarkers:u,isInteractive:E,cursorType:A})},r.createElement(o.A,{color:g,cursorType:A},t(e))):1===e.length?r.createElement(o.A,{color:g,cursorType:A},n(e[0])):s?r.createElement(r.Fragment,null,s()):r.createElement(i.A,{isTruncated:!0,color:g},r.createElement(a.sA,{id:"COMMON_FALLBACK"}))}},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"},e?r.createElement(a.A,{flex:1,overflow:"hidden"},e):null,t)},321235(e,t,n){n.d(t,{A:()=>d});var r=n(296540),i=n(217439),a=n(705145),o=n(71479),c=n(916537),l=n(360113);const s=(0,o.A)(i.A)`
  white-space: nowrap;
`,d=({id:e,color:t,values:n,children:i})=>r.createElement(l.A,null,r.createElement(s,{color:"text-2",size:"medium"},r.createElement(c.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:()=>s});var r=n(296540),i=n(71479),a=n(566723),o=n(294303),c=n(311785);const l=(0,i.A)(o.A,(0,c.A)("valueMaxWidth","keyMinWidth","compact"))`
  &: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;
    }
  }
`,s=({children:e,valueMaxWidth:t=215,keyMinWidth:n=0,flexProps:i={},compact:o=!1})=>r.createElement(l,{width:"100%",justifyContent:"space-between",gap:a.kc,height:o?void 0:24,valueMaxWidth:t,keyMinWidth:n,compact:o,...i},e)},796359(e,t,n){n.r(t),n.d(t,{default:()=>L});var r=n(469733),i=n(296540),a=n(297454),o=n(742920),c=n(38671),l=n(767028),s=n(566723),d=n(39705),m=n(175875),u=n(42345),A=n(147606),E=n(363370),g=n(294303),h=n(734616),p=n(229817),I=n(689965),f=n(675359),O=n(916537),T=n(611717),v=n(432680),M=n(959341),N=n(321235);const L=({activeItem:e})=>{const t=(0,r.useDispatch)(),n=(0,l.V)(()=>t((0,v.XR)(e.id)),{onError:e=>{const n=(0,c.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(N.A,{id:"COMMON_TARGET"},e.target_type===T.zb.CLIENTS||e.target_type===T.zb.GROUPS?i.createElement(d.A,{items:e.targets.map(e=>e.value),getItemKey:e=>e,renderListItem:e=>i.createElement(p.A,{mac:e}),renderMultipleItemsSummary:e=>i.createElement(O.sA,{id:"COMMON_DEVICE_COUNT_PLURAL",values:{count:e.length}})}):e.target_type===T.zb.NETWORKS?i.createElement(d.A,{items:e.targets.map(e=>e.value),getItemKey:e=>e,renderListItem:e=>i.createElement(h.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(N.A,{id:"SETTINGS_SECURE"},e.secure?.enabled?i.createElement(a.A,{size:"original"}):i.createElement(g.A,{width:s.Er,justifyContent:"center",alignItems:"center",height:"100%"},i.createElement(O.sA,{id:"COMMON_FALLBACK"}))),i.createElement(N.A,{id:"COMMON_ROUTE"},e.route?.enabled?i.createElement(a.A,{size:"original"}):i.createElement(g.A,{width:s.Er,justifyContent:"center",alignItems:"center",height:"100%"},i.createElement(O.sA,{id:"COMMON_FALLBACK"}))),i.createElement(N.A,{id:"COMMON_QOS"},e.qos?.enabled?i.createElement(a.A,{size:"original"}):i.createElement(g.A,{width:s.Er,justifyContent:"center",alignItems:"center",height:"100%"},i.createElement(O.sA,{id:"COMMON_FALLBACK"}))),i.createElement(g.A,null,i.createElement(E.A,{to:`${M.Db}/${e.id}`},i.createElement(O.sA,{id:"SETTINGS_OPEN_OBJECT"})))),i.createElement(u.A,{actions:[i.createElement(A.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()})]}))}},766624(e,t,n){n.d(t,{A:()=>l});var r=n(296540),i=n(271856),a=n(709690),o=n(284428),c=n(566723);const l=({description:e,isInteractive:t,portal:n=!0,cursorType:l,title:s,position:d,width:m,iconProps:u,disabled:A=!1})=>{const E=(0,o.Im)()||A,g=(0,o.q)();return r.createElement(i.A,{description:e,portal:n,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:l,title:s,position:d,width:m,disableHover:g},r.createElement(a.A,{isActive:!0,size:"original",opacity:E?c.xN:void 0,...u}))}},451449(e,t,n){n.d(t,{I:()=>r});const r=(0,n(296540).createContext)({fields:!1,labels:!1,tooltipPopovers:!1,tooltipIcons:!1})},284428(e,t,n){n.d(t,{Im:()=>l,iL:()=>s,mQ:()=>o,pv:()=>a,q:()=>c});var r=n(296540),i=n(451449);function a(){return(0,r.useContext)(i.I)}function o(){return a().fields}function c(){return a().tooltipPopovers}function l(){return a().tooltipIcons}function s(){return a().labels}},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),[c,l]=(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 s=t?.dedupe??!1,d=a(t?.onSuccess||(()=>{})),m=a(t?.onError||(()=>{})),u=(0,r.useCallback)((...r)=>{if(s&&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),l(e),e)).catch(async e=>{if(t?.delayOnErrorMs&&await(0,i.u)(t.delayOnErrorMs),l(null),!m)throw e;m(e)}).finally(async()=>{n.current=n.current.filter(e=>e.promise!==a),o(e=>e+1)})},[e,s,m,d,t?.delayOnErrorMs]),A=n.current.at(-1),E=A&&t?.estimatedDurationMs?Math.min((Date.now()-A.startedAt)/t.estimatedDurationMs,.9):void 0;return{execute:u,isLoading:!!n.current.length,lastData:c,estimatedProgress:E}}},977735(e,t,n){n.d(t,{u:()=>r});const r=e=>new Promise(t=>{setTimeout(t,e)})},383149(e,t,n){n.d(t,{A:()=>i});var r=n(885205);const i=function(e,t){return!(null==e||!e.length)&&(0,r.A)(e,t,0)>-1}},887809(e,t,n){n.d(t,{A:()=>r});const r=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},458043(e,t,n){n.d(t,{A:()=>s});var r=n(8300),i=n(383149),a=n(887809),o=n(45572),c=n(552789),l=n(764099);const s=function(e,t,n,s){var d=-1,m=i.A,u=!0,A=e.length,E=[],g=t.length;if(!A)return E;n&&(t=(0,o.A)(t,(0,c.A)(n))),s?(m=a.A,u=!1):t.length>=200&&(m=l.A,u=!1,t=new r.A(t));e:for(;++d<A;){var h=e[d],p=null==n?h:n(h);if(h=s||0!==h?h:0,u&&p==p){for(var I=g;I--;)if(t[I]===p)continue e;E.push(h)}else m(t,p,s)||E.push(h)}return E}},144757(e,t,n){n.d(t,{A:()=>c});var r=n(458043),i=n(187671),a=n(224326),o=n(153533);const c=(0,a.A)(function(e,t){return(0,o.A)(e)?(0,r.A)(e,(0,i.A)(t,1,o.A,!0)):[]})}}]);