PageSourceSearch

https://smartvakheel.ai/assets/GlobalModulesPanel-xpKeHbwu.js

js smartvakheel.ai collected 2026-10-05 15:03:40 UTC 4,504 bytes, 2 lines download raw bytes

1import{u as S,i as I,d as q,e as H,r as o,k as T,j as s,f as r,X as B,C as w,h as D,n as F}from"./app-E59A6xg4.js";import{L as v}from"./layout-grid-DGGfqp54.js";const G="(min-width: 768px)",x="(max-width: 767px)";function p(){return typeof window<"u"&&typeof window.matchMedia=="function"}function $(){const _=S(),j=I(),{isAuthenticated:y,user:d}=q(),{isRemindersPanelOpen:N}=H(),[l,i]=o.useState(!1),[E,M]=o.useState(()=>p()?window.matchMedia(x).matches:!1),u=o.useRef(null),f=o.useRef(null),t=_.pathname,k=t==="/plans"||t.startsWith("/plans/")||t==="/advocate/plans"||t.startsWith("/advocate/plans/")||t==="/intern/plans"||t.startsWith("/intern/plans/")||t==="/lawfirm/plans"||t.startsWith("/lawfirm/plans/"),R=t==="/login"||t==="/signup"||t==="/launch"||t==="/confirm-email"||t==="/reset-password"||t.startsWith("/login/")||t.startsWith("/signup/")||k,b=T(d==null?void 0:d.role,t),m=y&&!R&&b.length>0,h=E&&N,c=()=>{const e=u.current,a=document.activeElement;a instanceof HTMLElement&&(e!=null&&e.contains(a))&&a.blur(),i(!1),queueMicrotask(()=>{var n;return(n=f.current)==null?void 0:n.focus({preventScroll:!0})})},W=()=>i(!0);if(o.useEffect(()=>{if(!p())return;const e=window.matchMedia(x),a=()=>M(e.matches);return a(),e.addEventListener("change",a),()=>e.removeEventListener("change",a)},[]),o.useEffect(()=>{m||i(!1)},[m]),o.useEffect(()=>{h&&i(!1)},[h]),o.useEffect(()=>{if(!l)return;const e=a=>{a.key==="Escape"&&c()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[l]),o.useEffect(()=>{const e=u.current;if(!e)return;if(l){e.removeAttribute("inert");return}const a=document.activeElement;a instanceof HTMLElement&&e.contains(a)&&a.blur(),e.setAttribute("inert","")},[l]),o.useEffect(()=>{if(!l||!p()||!window.matchMedia(G).matches)return;const a=document.documentElement,n=document.body,P=a.style.overflow,A=n.style.overflow,O=n.style.paddingRight,g=window.innerWidth-a.clientWidth;return a.style.overflow="hidden",n.style.overflow="hidden",g>0&&(n.style.paddingRight=`${g}px`),()=>{a.style.overflow=P,n.style.overflow=A,n.style.paddingRight=O}},[l]),o.useEffect(()=>{i(!1)},[t]),!m||h)return null;const C=e=>t===e||t.startsWith(`${e}/`),L=async e=>{c(),await F(j,e)};return s.jsxs(s.Fragment,{children:[l?s.jsx("button",{type:"button",className:"global-modules-backdrop","aria-label":"Close modules",onClick:c}):null,s.jsxs("aside",{ref:u,id:"global-modules-panel",className:r("global-modules-panel",l&&"global-modules-panel--open"),"aria-hidden":!l,role:"dialog","aria-label":"Modules",children:[s.jsxs("header",{className:"global-modules-panel__header",children:[s.jsx("span",{className:"global-modules-panel__icon","aria-hidden":"true",children:s.jsx(v,{})}),s.jsxs("div",{className:"global-modules-panel__heading",children:[s.jsx("span",{className:"global-modules-panel__mark","aria-hidden":"true"}),s.jsx("div",{className:"global-modules-panel__heading-text",children:s.jsx("h2",{className:"global-modules-panel__title",children:"Modules"})})]}),s.jsx("button",{type:"button",className:"global-modules-panel__icon-btn",onClick:c,"aria-label":"Close modules panel",children:s.jsx(B,{className:"h-3.5 w-3.5",strokeWidth:2.25})})]}),s.jsx("div",{className:"global-modules-panel__body",children:s.jsx("ul",{className:"global-modules-panel__list",children:b.map(e=>{const a=e.icon,n=C(e.path);return s.jsx("li",{children:s.jsxs("button",{type:"button",className:r("global-modules-panel__item",n&&"global-modules-panel__item--active"),onClick:()=>{L(e.path)},"aria-current":n?"page":void 0,children:[s.jsx("span",{className:r("global-modules-panel__item-icon",e.iconClass),children:s.jsx(a,{strokeWidth:2})}),s.jsx("span",{className:"global-modules-panel__item-label",children:e.label}),s.jsx(w,{className:"global-modules-panel__item-chevron",strokeWidth:2.25,"aria-hidden":"true"})]})},e.path)})})})]}),s.jsxs("button",{ref:f,type:"button",className:r("global-modules-tab",l&&"global-modules-tab--open"),onClick:()=>{l?c():W()},"aria-expanded":l,"aria-controls":"global-modules-panel",title:l?"Hide modules":"Show modules","data-allow-without-plan":"true",children:[s.jsx("span",{className:"global-modules-tab__glow","aria-hidden":"true"}),l?s.jsx(D,{className:"h-4 w-4",strokeWidth:2.25}):s.jsx(w,{className:"h-4 w-4",strokeWidth:2.25}),s.jsx(v,{className:"h-4 w-4",strokeWidth:2}),s.jsx("span",{className:"global-modules-tab__label",children:"Modules"})]})]})}export{$ as GlobalModulesPanel};
2//# sourceMappingURL=GlobalModulesPanel-xpKeHbwu.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.