1import{u as E,a as j,b as N,r,j as e,c as S,S as L,B as c,X as y}from"./index-ByYYWl6V.js";const A=["/auth","/admin","/onboarding","/share","/templates","/terms","/privacy","/canvas","/collaboration","/ai-monitor","/blog","/file-share","/portfolio-websites","/booking","/b"];function T(){const{user:m,subscription:s,isAdmin:b}=E(),t=j(),u=N(),[h,l]=r.useState(null),[p,x]=r.useState(!1),[f,g]=r.useState(!1);r.useEffect(()=>{const n=o=>{const a=o.detail;x(!!(a!=null&&a.active))},d=o=>{const a=o.detail;g(!!(a!=null&&a.open))};return window.addEventListener("fs-selection-change",n),window.addEventListener("welcome-modal-open",d),()=>{window.removeEventListener("fs-selection-change",n),window.removeEventListener("welcome-modal-open",d)}},[]);const i=t.pathname+t.search;r.useEffect(()=>{l(null)},[i]);const v=t.pathname==="/"||A.some(n=>t.pathname===n||t.pathname.startsWith(n+"/"));if(!m||b||s.loading||s.subscribed||s.onTrial||s.standaloneFileSharing||s.standaloneAio||!s.trialEligible||v||f||h===i||p)return null;const w=()=>{l(i)},k=()=>{t.pathname==="/dashboard"?window.dispatchEvent(new CustomEvent("start-trial")):(u("/dashboard"),setTimeout(()=>{window.dispatchEvent(new CustomEvent("start-trial"))},100))};return e.jsx("div",{className:S("fixed inset-x-0 top-0 z-50","border-b border-amber-200/60 dark:border-amber-900/50","bg-amber-50/95 dark:bg-amber-950/40 backdrop-blur supports-[backdrop-filter]:bg-amber-50/80","shadow-[0_2px_12px_-4px_rgba(0,0,0,0.15)]"),style:{paddingTop:"env(safe-area-inset-top)"},role:"region","aria-label":"Preview mode banner",children:e.jsxs("div",{className:"mx-auto flex max-w-7xl items-center gap-3 px-4 py-2 sm:gap-4",children:[e.jsx(L,{className:"hidden h-4 w-4 shrink-0 text-amber-700 dark:text-amber-400 sm:block"}),e.jsx("div",{className:"min-w-0 flex-1 text-amber-900 dark:text-amber-100",children:e.jsxs("p",{className:"truncate text-sm font-semibold",children:[e.jsx("span",{className:"sm:hidden",children:"Preview Mode â "}),e.jsx("span",{className:"hidden sm:inline",children:"You're in Preview Mode â "}),e.jsx("span",{className:"font-normal text-amber-800/90 dark:text-amber-100/80",children:"Look around and explore Vsble. Start your 14-day free trial to unlock templates, Canvas, AI Pages, file sharing, publishing and more."})]})}),e.jsx(c,{size:"sm",onClick:k,className:"h-8 shrink-0 bg-amber-600 text-white hover:bg-amber-700 dark:bg-amber-500 dark:hover:bg-amber-600",children:"Start free trial"}),e.jsx(c,{variant:"ghost",size:"icon",onClick:w,"aria-label":"Dismiss",className:"h-7 w-7 shrink-0 text-amber-900 hover:bg-amber-100 dark:text-amber-100 dark:hover:bg-amber-900/40",children:e.jsx(y,{className:"h-4 w-4"})})]})})}export{T as TrialPromoBanner,T as default};
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.