"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[59806],{946118(t,a,e){e.r(a),e.d(a,{default:()=>m});var o,i,s=e(296540),c=e(956347),r=e(469733);!function(t){t.LOCATION="location",t.ROUTE_MATCH="routeMatch"}(o||(o={})),function(t){t.HISTORY="history",t.DISPATCH="dispatch",t.LOCATION="location",t.ROUTE_MATCH="routeMatch"}(i||(i={}));var h=e(398300),n=e(845030),p=e(627440),u=e(596731),T=e(959341);const S=t=>new RegExp(`(?:^|/)${t}/[^/]+$`),E=t=>new RegExp(`(?:^|\\/)${t}\\/([^/]+.*)$`),$=t=>void 0!==t&&/^[A-Za-z0-9]+$/.test(t)&&/[A-Za-z]/.test(t)&&/\d/.test(t),O=[[({location:{pathname:t},routeMatch:{params:a}})=>t===(0,c.tW)(`${u.Si[p.VO.SETTINGS]}/security/cybersecure`,a),({history:t,routeMatch:{params:a}})=>{t.push((0,c.tW)(`${u.Si[p.VO.SETTINGS]}/${T.bB}/${T.Uy.CYBERSECURE}`,a))}],[({location:{pathname:t},routeMatch:{params:a}})=>t.includes((0,c.tW)(`${u.Si[p.VO.AIRVIEW]}`,a).replace(p.VO.AIRVIEW,"radios")),({history:t,routeMatch:{params:a}})=>{t.push((0,c.tW)(`${u.Si[p.VO.AIRVIEW]}`,a))}],[({location:{pathname:t},routeMatch:{params:a}})=>t===(0,c.tW)(`${u.Si[p.VO.SETTINGS]}/security/intrusion-prevention`,a),({history:t,routeMatch:{params:a}})=>{t.push((0,c.tW)(`${u.Si[p.VO.SETTINGS]}/${T.bB}/${T.Uy.CYBERSECURE}`,a))}],[({location:{pathname:t}})=>S(T._L).test(t),({dispatch:t,history:a,location:{pathname:e},routeMatch:{params:o}})=>{const i=E(T._L).exec(e)?.[1];$(i)&&(a.push((0,c.tW)(`${u.Si[p.VO.SETTINGS]}/${T._L}`,o)),setTimeout(()=>{t((0,n.XP)({type:h.H.WIFI,id:i}))},250))}],[({location:{pathname:t}})=>S(T.Cs).test(t),({dispatch:t,history:a,location:{pathname:e},routeMatch:{params:o}})=>{const i=E(T.Cs).exec(e)?.[1];$(i)&&(a.push((0,c.tW)(`${u.Si[p.VO.SETTINGS]}/${T.Cs}`,o)),setTimeout(()=>{t((0,n.XP)({type:h.H.NETWORK,id:i}))},250))}],[({location:{pathname:t}})=>S(`${T.Hp}/${T.iB.VPN_SERVER}/${T.fW}`).test(t),({dispatch:t,history:a,location:{pathname:e},routeMatch:{params:o}})=>{const i=E(`${T.Hp}/${T.iB.VPN_SERVER}/${T.fW}`).exec(e)?.[1];$(i)&&(a.push((0,c.tW)(`${u.Si[p.VO.SETTINGS]}/${T.Hp}`,o)),setTimeout(()=>{t((0,n.XP)({type:h.H.VPN_SERVER,id:i}))},250))}]],m=(0,s.memo)(()=>{const t=(0,c.zy)(),a=(0,c.W5)(),e=(0,c.W6)(),h=(0,r.useDispatch)();return(0,s.useEffect)(()=>{O.forEach(([s,c])=>{s({[o.LOCATION]:t,[o.ROUTE_MATCH]:a})&&c({[i.HISTORY]:e,[i.DISPATCH]:h,[i.LOCATION]:t,[i.ROUTE_MATCH]:a})})},[t,a,e,h]),null})}}]);