import{c as u}from"./chunk-HJJJ4ZT2.js";import{b as s}from"./chunk-7CQSSHSC.js";import{Ud as a,ra as e}from"./chunk-GJDGQISV.js";var g=(t,c)=>{let r=e(a),i=e(u);if(i.isTokenExpired())return i.returnUrl=c.url,r.navigate(["/"]),!1;let d=e(s),o=t.data?.roles;if(o){let n=t.data?.unauthorizedRedirect;if(!o.some(l=>d.isUserHasRole(l)))return n?r.navigate([n]):r.navigate(["menu/Unauthorized/Main/Unauthorized"]),!1}return!0};export{g as a};
