PageSourceSearch

https://www.dashboard.dispatchino.com/assets/app-shell-CXtQ0RwH.js

js dispatchino.com collected 2026-10-02 01:28:20 UTC 15,131 bytes, 1 lines download raw bytes

1import{u as L,a as B,r as K,b as Y,c as F,P as C,j as e,d as S,e as G,f as p,z as W,B as $,C as q,L as m,M as A}from"./main-CZ-c2Wrd.js";import{r as u,u as k,f as Q,C as J,S as I,g as y,U as z}from"./vendor-clerk-UBWIno5X.js";import{a as x}from"./api-Cf_CG7SP.js";import{c as V,r as X,B as Z}from"./context-C4spomkL-DBONvrRm.js";import{A as T,a as h,S as E,b as ee}from"./auth-ChJHzqh7.js";import{p as te,R as P,s as se,i as ne,m as re}from"./posthog-identity-Cg3Snosg.js";import{B as v}from"./brand-wX-DKuV7.js";import{C as ie,a as ae,u as g}from"./vendor-convex-CowFFuwP.js";import{u as D}from"./use-onboarding-setup-Do5ss_xv.js";import{I as oe}from"./inbox-dGAbQq4w.js";import{T as ce,g as le,a as de}from"./settings-attention-JUgiNeOC.js";import{c as ue}from"./createLucideIcon-CZp-cS6-.js";import{S as me,M as pe}from"./sun-BvqN7BN-.js";import{C as fe}from"./circle-alert-B1wyz5Vd.js";function R(t){const s=L(),n=u.useRef(void 0);return B(s.stores.location,a=>{const i=t?.select?t.select(a):a;if(t?.structuralSharing??s.options.defaultStructuralSharing){const r=K(n.current,i);return n.current=r,r}return i})}const xe=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],ge=ue("settings-2",xe);function be(t){const s=R({select:i=>i.pathname}),n=R({select:i=>Object.fromEntries(Object.entries(i.search).filter(([r])=>t.includes(r)))}),{navigate:a}=L();return{searchParams:u.useMemo(()=>new URLSearchParams(Object.entries(n).flatMap(([i,r])=>Array.isArray(r)?r.map(c=>[i,c]):typeof r=="object"&&r!==null?[[i,JSON.stringify(r)]]:[[i,r]])),[n,t.join(",")]),updateUrl:u.useCallback((i,r)=>{u.startTransition(()=>{a({from:"/",to:s+X(i),replace:r.history==="replace",resetScroll:r.scroll,hash:c=>c??"",state:c=>c})})},[a,s]),rateLimitFactor:1}}const he=V(be),O="ph_auth_session",ve=new Set(["sign_in","sign_up"]);function je(t){return t!=null&&ve.has(t)?t:null}function Ne(){const{isLoaded:t,isSignedIn:s,sessionId:n,userId:a}=k(),{user:i}=Q(),r=Y(),c=F(),f=i?.primaryEmailAddress?.emailAddress;return u.useEffect(()=>{if(!C||typeof window>"u"||!r||!c)return;const l=te({isLoaded:t,isSignedIn:s,userId:a,email:f});if(!l)return;let d=null;try{d=window.localStorage.getItem(P)}catch{}if(se(l,d)){c.identify(l.distinctId,l.personProperties),re();try{window.localStorage.setItem(P,ne(l))}catch{}}},[f,t,s,c,r,a]),u.useEffect(()=>{if(!C||typeof window>"u"||!r||!c||!t||!s||!n)return;let l=null;try{l=window.localStorage.getItem(O)}catch{}if(l===n)return;let d=null;try{d=je(window.sessionStorage.getItem(T))}catch{}if(c.capture(d==="sign_up"?"user_signed_up":"user_signed_in")){try{window.sessionStorage.removeItem(T)}catch{}try{window.localStorage.setItem(O,n)}catch{}}},[t,s,r,c,n]),null}function ye(){return"https://optimistic-goose-640.convex.cloud".trim()}function Se(t){if(!t)return!1;try{const s=new URL(t);return s.protocol==="https:"||s.protocol==="http:"}catch{return!1}}function ke({children:t}){const s=ye(),n=u.useMemo(()=>Se(s)?new ie(s):null,[s]);return n?e.jsx(ae,{client:n,useAuth:k,children:t}):e.jsx(e.Fragment,{children:t})}const we=new Set(["all","needs_you","active","idle","just_wrapped","dead"]);function _e(){const t=S({select:o=>o.location.pathname}),s=S({select:o=>o.location.search}),n=G({from:"/"}),a=s.mode==="sandbox"?"sandbox":"production",i=g(x.app.sandbox.getAccess,a==="sandbox"?{}:"skip"),r=i===void 0?"loading":i.enabled?"allowed":"denied",c=a!=="sandbox"||r==="allowed",l=g(x.app.threads.getWorklistStats,c?{mode:a}:"skip")?.needsYouCount??0,d=D(),w=d.isLoading||d.guidedSetupComplete?0:d.remainingCount,N=s.tab,_=typeof N=="string"&&we.has(N)?N:"needs_you",M=[{label:"Negotiations",onClick:()=>{n({to:"/",search:a==="sandbox"?{tab:"active",mode:"sandbox"}:{tab:"active"}})},match:o=>o==="/"&&_!=="needs_you",icon:oe},{label:"Needs you",onClick:()=>{n({to:"/",search:a==="sandbox"?{tab:"needs_you",mode:"sandbox"}:{tab:"needs_you"}})},match:o=>o==="/"&&_==="needs_you",icon:ce,badge:l},{label:"Settings",onClick:()=>{n({to:"/settings"})},match:o=>o.startsWith("/settings"),icon:ge,badge:w}];return e.jsx("nav",{"aria-label":"Primary",className:p("md:hidden fixed bottom-0 inset-x-0 z-40 border-t border-border/70 bg-background/95 backdrop-blur","pb-[env(safe-area-inset-bottom)]"),children:e.jsx("ul",{className:"mx-auto grid max-w-md grid-cols-3",children:M.map(o=>{const H=o.icon,b=o.match(t);return e.jsx("li",{children:e.jsxs("button",{type:"button",onClick:o.onClick,"aria-current":b?"page":void 0,className:p("w-full","motion-base group relative flex h-[58px] flex-col items-center justify-center gap-0.5 text-[11px] font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 focu
1s-visible:ring-inset",b?"text-foreground":"text-muted-foreground"),children:[e.jsx("span",{"aria-hidden":!0,className:p("absolute inset-x-6 top-0 h-0.5 rounded-b-full bg-brand transition-opacity",b?"opacity-100":"opacity-0")}),e.jsxs("span",{className:"relative inline-flex items-center justify-center",children:[e.jsx(H,{className:p("size-5 transition-colors",b?"text-brand":"text-muted-foreground"),"aria-hidden":!0}),o.badge&&o.badge>0?e.jsx("span",{className:"absolute -right-2 -top-1.5 inline-flex min-w-4 items-center justify-center rounded-full bg-attention px-1 text-[10px] font-semibold leading-none text-attention-foreground ring-2 ring-background tabular-nums",children:o.badge>99?"99+":o.badge}):null]}),e.jsx("span",{children:o.label})]})},o.label)})})})}function U(){const{resolvedTheme:t,setTheme:s}=W(),[n,a]=u.useState(!1);u.useEffect(()=>{a(!0)},[]);const i=n?t==="dark":!1,r=i?"Switch to light theme":"Switch to dark theme";return e.jsx($,{type:"button",variant:"ghost",size:"icon","aria-label":r,title:r,className:"size-10 rounded-full border-0 bg-transparent shadow-none hover:bg-transparent",onClick:()=>s(i?"light":"dark"),children:i?e.jsx(me,{}):e.jsx(pe,{})})}const Ce="[email protected]",Ae=`mailto:${Ce}`,Ie=[{href:Ae,label:"Help & Support"},{href:`${A}/terms`,label:"Terms of Service"},{href:`${A}/privacy`,label:"Privacy Policy"}],Te="rounded-sm transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 focus-visible:ring-offset-2 focus-visible:ring-offset-background";function j(t){return p("motion-base inline-flex items-center gap-1.5 rounded-full px-3 py-1.5 font-medium text-[13px] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 focus-visible:ring-offset-2 focus-visible:ring-offset-background",t?"bg-brand-soft/70 text-brand dark:bg-brand-soft/40 dark:text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground dark:hover:bg-muted/30")}function Ee(t){return p("rounded-sm font-medium text-[13px] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 focus-visible:ring-offset-2 focus-visible:ring-offset-background",t?"text-foreground":"text-muted-foreground hover:text-foreground")}function Pe({pathname:t}){const s=g(x.app.settings.getDispatcherEndpointReadiness,{}),n=g(x.app.settings.getOrganizationSettings,{}),a=g(x.app.settings.listOrganizationDocuments,{}),i=le({dispatcherEndpointReadiness:s,documents:a,organizationSettings:n?{companyName:n.companyName,mcNumber:n.mcNumber,usdotNumber:n.usdotNumber}:void 0}),r=de(i),c=t.startsWith("/settings"),f=r?.severity==="critical"?"bg-alert text-alert-foreground":"bg-attention text-attention-foreground";return e.jsxs(m,{to:"/settings",className:j(c),children:[e.jsx("span",{children:"Settings"}),r?e.jsxs("span",{title:`${r.count} settings ${r.count===1?"issue":"issues"} need attention`,className:p("inline-flex size-4 items-center justify-center rounded-full text-[10px] font-semibold leading-none tabular-nums",f),children:[e.jsx("span",{"aria-hidden":"true",children:r.count}),e.jsxs("span",{className:"sr-only",children:[r.count," settings"," ",r.count===1?"issue":"issues"," need attention"]})]}):null]})}function Re(){const t=D();return t.isLoading||t.guidedSetupComplete||!t.dismissed&&!t.setupComplete?null:e.jsxs(m,{to:"/onboarding",className:j(!1),children:[e.jsx("span",{children:"Finish setup"}),e.jsxs("span",{className:"inline-flex size-4 items-center justify-center rounded-full bg-attention font-semibold text-[10px] text-attention-foreground leading-none tabular-nums",title:`${t.remainingCount} setup ${t.remainingCount===1?"step":"steps"} left`,children:[e.jsx("span",{"aria-hidden":"true",children:t.remainingCount}),e.jsxs("span",{className:"sr-only",children:[t.remainingCount," setup"," ",t.remainingCount===1?"step":"steps"," left"]})]})]})}function Xe({children:t,chromeless:s=!1}){return e.jsxs(J,{publishableKey:q,children:[e.jsx(Ne,{}),e.jsx(Oe,{children:e.jsxs(ke,{children:[null,e.jsx(he,{children:s?t:e.jsx(De,{children:t})})]})})]})}function Oe({children:t}){const{isLoaded:s,isSignedIn:n,orgId:a}=k();return s?n&&!a?e.jsx(ze,{}):e.jsx(e.Fragment,{children:t}):e.jsx(Le,{})}function Le(){return e.jsx("div",{"aria-busy":"true","aria-live":"polite",className:"flex min-h-svh items-center justify-center bg-background px-4 py-12",children:e.jsxs("div",{className:"flex w-full max-w-sm flex-col items-center gap-4 roun
1ded-2xl border border-border/70 bg-card/70 px-6 py-7 text-center shadow-sm backdrop-blur",children:[e.jsx(v,{decorative:!0,className:"h-9"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"font-semibold text-sm",children:"Opening Dispatchino..."}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Checking your session and workspace."})]}),e.jsx("span",{className:"sr-only",children:"Loading Dispatchino"})]})})}function ze(){return e.jsxs("div",{className:"relative isolate z-10 flex min-h-svh flex-col bg-background",children:[e.jsx("div",{"aria-hidden":!0,className:"-z-10 pointer-events-none absolute inset-x-0 top-0 h-[420px]",style:{background:"radial-gradient(ellipse 70% 100% at 50% 0%, color-mix(in oklch, var(--brand) 8%, transparent) 0%, transparent 70%)"}}),e.jsxs("header",{className:"sticky top-0 z-50 w-full border-border/60 border-b bg-background/85 backdrop-blur-xl dark:bg-background/75",children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-brand/25 to-transparent"}),e.jsxs("div",{className:"flex h-14 items-center justify-between gap-3 px-4 md:px-6",children:[e.jsx(m,{to:h,"aria-label":"Dispatchino home",className:"flex shrink-0 items-center rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:e.jsx(v,{className:"h-8 sm:h-9"})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(U,{}),e.jsx(z,{})]})]})]}),e.jsx("main",{className:"flex flex-1 items-center justify-center px-4 py-12 md:px-6 md:py-16",children:e.jsxs("section",{className:"w-full max-w-xl text-center",children:[e.jsx("div",{className:"mx-auto inline-flex size-12 items-center justify-center rounded-full border border-alert/25 bg-alert-soft text-alert",children:e.jsx(fe,{className:"size-5","aria-hidden":!0})}),e.jsx("p",{className:"mt-5 font-mono font-medium text-[11px] text-muted-foreground uppercase tracking-[0.22em]",children:"Account setup"}),e.jsx("h1",{className:"mt-2 font-display text-3xl font-semibold leading-tight sm:text-4xl",children:"Your account needs an organization"}),e.jsx("p",{className:"mt-4 text-muted-foreground text-sm leading-6 md:text-base",children:"Dispatchino accounts must belong to an organization before the app can open. Sign out from the account menu, then continue from your team invite or sign up again to create your Dispatchino workspace."}),e.jsx("div",{className:"mt-6 rounded-lg border border-border/70 bg-background/70 px-4 py-3 text-left text-sm",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx(Z,{className:"mt-0.5 size-4 shrink-0 text-brand","aria-hidden":!0}),e.jsx("p",{children:"Users should complete Clerk's organization step during sign-up or invite acceptance. This screen prevents org-scoped app data from loading until that account state is corrected."})]})})]})})]})}function De({children:t}){const s=S({select:n=>n.location.pathname});return e.jsxs("div",{className:"relative isolate z-10 flex min-h-svh flex-col bg-background",children:[e.jsx("div",{"aria-hidden":!0,className:"-z-10 pointer-events-none absolute inset-x-0 top-0 h-[420px]",style:{background:"radial-gradient(ellipse 70% 100% at 50% 0%, color-mix(in oklch, var(--brand) 8%, transparent) 0%, transparent 70%)"}}),e.jsxs("header",{className:"sticky top-0 z-50 w-full border-border/60 border-b bg-background/85 backdrop-blur-xl dark:bg-background/75",children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-brand/25 to-transparent"}),e.jsxs("div",{className:"flex h-14 items-center justify-between gap-3 px-4 md:px-6",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx(m,{to:h,"aria-label":"Dispatchino home",className:"flex shrink-0 items-center rounded-sm pr-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:e.jsx(v,{className:"h-8 sm:h-9"})}
1),e.jsx("span",{"aria-hidden":!0,className:"hidden h-5 w-px bg-border/60 md:block"}),e.jsxs("nav",{"aria-label":"Primary",className:"ml-2 hidden items-center gap-1 md:flex",children:[e.jsx(m,{to:h,className:j(s===h),children:"Negotiations"}),e.jsx(I,{children:e.jsx(m,{to:"/settings",className:j(s.startsWith("/settings")),children:"Settings"})}),e.jsxs(y,{children:[e.jsx(Re,{}),e.jsx(Pe,{pathname:s})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(U,{}),e.jsx(I,{children:e.jsxs("div",{className:"flex items-center gap-3 pl-1",children:[e.jsx(m,{to:E,className:Ee(s===E),children:"Sign in"}),e.jsx(m,{to:ee,className:p("motion-base rounded-full bg-brand px-3 py-1.5 font-medium text-[13px] text-brand-foreground transition-colors hover:bg-brand/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 focus-visible:ring-offset-2 focus-visible:ring-offset-background"),children:"Sign up"})]})}),e.jsx(y,{children:e.jsx(z,{})})]})]})]}),e.jsx("div",{className:"pb-[72px] md:pb-0",children:t}),e.jsx(y,{children:e.jsx(_e,{})}),e.jsx("footer",{className:"mt-auto border-t px-4 pt-4 pb-[calc(8rem+env(safe-area-inset-bottom))] md:px-6 md:py-4",children:e.jsxs("div",{className:"flex flex-col items-center justify-between gap-3 text-xs text-muted-foreground sm:flex-row",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(v,{decorative:!0,className:"h-6"}),e.jsxs("span",{children:["© ",new Date().getFullYear()," Dispatchino"]})]}),e.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-4 gap-y-2",children:Ie.map(n=>e.jsx("a",{href:n.href,className:Te,children:n.label},n.href))})]})})]})}export{Xe as AppShell};

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.