PageSourceSearch

https://transportsimple.com/assets/Faq-ByXO8oRR.js

js transportsimple.com collected 2026-10-01 23:53:40 UTC 13,719 bytes, 6 lines download raw bytes

1import{j as e,q as y}from"./vendor-ui-A12DDDPJ.js";import{r as i,L as w}from"./vendor-react-zaFybfsY.js";import{e as z,m as I,l as M,aE as L,k as E,n as T,O as F,g as H,X as R,B as j,A as N,s as k}from"./index-D_1QbJPd.js";import B from"./Footer-D5XUTpnF.js";import{A as O,a as Q,b as P,c as U}from"./accordion-DJNdTz_d.js";import{S}from"./search-CROWAjai.js";import{H as V}from"./headphones-B8zp5CDh.js";import"./preload-helper-CZ5Qg0oT.js";import"./vendor-supabase-BBbWDq57.js";import"./vendor-i18n-nJJiGX0r.js";import"./chevron-down-Bh50g0Q1.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const X=z("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]),D="/assets/business-analytics-CjmIzXd8.gif",G=p=>p.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),q=p=>{let l=p;return l=l.replace(/`([^`]+)`/g,(f,g)=>`<code class="px-1 py-0.5 rounded bg-muted text-foreground text-[0.9em]">${g}</code>`),l=l.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),l=l.replace(/(^|[^*])\*([^*]+)\*/g,"$1<em>$2</em>"),l=l.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,(f,g,n)=>{const h=/^https?:\/\//.test(n);return`<a href="${n.replace(/"/g,"&quot;")}"${h?' target="_blank" rel="noopener noreferrer"':""} class="text-primary underline hover:no-underline">${g}</a>`}),l},J=p=>{if(!p)return"";const f=G(p).split(/\r?\n/),g=[];let n=null,h=[],r=[];const d=()=>{if(n&&h.length){const c=n,m=c==="ul"?"list-disc pl-5 space-y-1 my-2":"list-decimal pl-5 space-y-1 my-2";g.push(`<${c} class="${m}">${h.map(u=>`<li>${q(u)}</li>`).join("")}</${c}>`)}n=null,h=[]},b=()=>{if(r.length){const c=r.join(" ").trim();c&&g.push(`<p class="my-2 leading-relaxed">${q(c)}</p>`)}r=[]};for(const c of f){const m=c.trimEnd(),u=m.match(/^\s*[-*]\s+(.*)$/),x=m.match(/^\s*\d+\.\s+(.*)$/);u?(b(),n!=="ul"&&d(),n="ul",h.push(u[1])):x?(b(),n!=="ol"&&d(),n="ol",h.push(x[1])):m.trim()===""?(d(),b()):(d(),r.push(m))}return d(),b(),g.join("")},le=()=>{const[p,l]=i.useState([]),[f,g]=i.useState([]),[n,h]=i.useState(!0),[r,d]=i.useState(""),[b,c]=i.useState(""),m=i.useRef({});i.useEffect(()=>{(async()=>{const[a,s]=await Promise.all([k.from("faq_sections").select("id, name, slug, description, display_order").eq("is_published",!0).order("display_order",{ascending:!0}),k.from("faq_items").select("id, section_id, question, answer, display_order").eq("is_published",!0).order("display_order",{ascending:!0})]);l(a.data||[]),g(s.data||[]),h(!1)})()},[]);const u=i.useMemo(()=>{const t=r.trim().toLowerCase(),a=t?f.filter(o=>o.question.toLowerCase().includes(t)||o.answer.toLowerCase().includes(t)):f,s=new Map;for(const o of a)s.has(o.section_id)||s.set(o.section_id,[]),s.get(o.section_id).push(o);return s},[f,r]),x=i.useMemo(()=>p.filter(t=>(u.get(t.id)||[]).length>0),[p,u]);i.useEffect(()=>{if(n||x.length===0)return;const t=new IntersectionObserver(a=>{const s=a.filter(o=>o.isIntersecting).sort((o,$)=>o.boundingClientRect.top-$.boundingClientRect.top);if(s[0]){const o=s[0].target.getAttribute("data-slug");o&&c(o)}},{rootMargin:"-180px 0px -60% 0px",threshold:0});return x.forEach(a=>{const s=m.current[a.slug];s&&t.observe(s)}),()=>t.disconnect()},[n,x]);const C=t=>{const a=m.current[t];if(a){const s=a.getBoundingClientRect().top+window.scrollY-180;window.scrollTo({top:s,behavior:"smooth"})}},_=f.map(t=>({q:t.question,a:t.answer})),A=[I(_),M([{name:"Home",url:"/"},{name:"FAQ",url:"/faq"}]),L("/faq",["h1","h2",".faq-answer"])],v=i.useMemo(()=>Array.from(u.values()).reduce((t,a)=>t+a.length,0),[u]);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[e.jsx(E,{title:"FAQ & Help Center",description:"Answers to common questions about TransportSimple — pricing, setup, features, integrations, and support.",canonical:"/faq",jsonLd:A}),e.jsx(T,{}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-primary/10 via-background to-secondary/10",children:[e.jsx("div",{className:"absolute -top-24 -left-24 w-96 h-96 rounded-full bg-primary/20 blur-3xl pointer-events-none"}),e.jsx("div",{className:"absolute -bottom-32 right-0 w-[28rem] h-[28rem] rounded-full bg-secondary/15 blur-3xl pointer-events-none"}),e.jsx("div",{className:"absolute top-20 right-1/3 w-64 h-64 roun
6ded-full bg-accent/15 blur-3xl pointer-events-none"}),e.jsx("div",{className:"absolute inset-0 opacity-[0.05] pointer-events-none",style:{backgroundImage:"radial-gradient(circle, hsl(var(--foreground)) 1px, transparent 1px)",backgroundSize:"22px 22px"}}),e.jsx("div",{className:"container relative z-10 max-w-6xl mx-auto pt-14 pb-12 md:pt-20 md:pb-16",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1.1fr_1fr] gap-10 lg:gap-12 items-center",children:[e.jsxs("div",{className:"text-center lg:text-left",children:[e.jsxs(y.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.4},className:"inline-flex items-center gap-1.5 text-[11px] font-mono font-semibold tracking-wider mb-5 px-3 py-1.5 rounded-full uppercase bg-primary/10 text-primary border border-primary/20",children:[e.jsx(F,{className:"w-3 h-3"}),"Frequently Asked Questions"]}),e.jsxs(y.h1,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5},className:"text-4xl md:text-5xl lg:text-6xl font-extrabold text-foreground leading-[1.05] tracking-tight",children:["How can we"," ",e.jsxs("span",{className:"relative inline-block",children:[e.jsx("span",{className:"relative z-10 text-primary",children:"help"}),e.jsx("span",{className:"absolute left-0 right-0 bottom-1 h-3 bg-accent/40 -z-0 rounded-sm"})]})," ","you today?"]}),e.jsx(y.p,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"mt-5 text-base md:text-lg text-muted-foreground max-w-xl mx-auto lg:mx-0",children:"Everything you need to know about TransportSimple — pricing, setup, features, integrations and beyond."})]}),e.jsx(y.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.6,delay:.15},className:"relative mx-auto w-full max-w-xs lg:max-w-sm",children:e.jsx("img",{src:D,alt:"TransportSimple business analytics dashboard at your fingertips",loading:"eager",className:"w-full h-auto drop-shadow-2xl rounded-2xl"})})]})})]}),e.jsx("div",{className:"sticky top-20 z-30 bg-background/90 backdrop-blur-md border-y border-border shadow-sm",children:e.jsxs("div",{className:"container max-w-4xl mx-auto py-3",children:[e.jsxs("div",{className:"relative group",children:[e.jsx(S,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4.5 h-4.5 text-muted-foreground group-focus-within:text-primary transition-colors"}),e.jsx(H,{value:r,onChange:t=>d(t.target.value),placeholder:"Search for answers...",className:"pl-11 pr-11 h-11 text-sm rounded-xl border border-border bg-card focus-visible:ring-2 focus-visible:ring-primary/20 focus-visible:border-primary/40 transition-all shadow-sm"}),r&&e.jsx("button",{type:"button",onClick:()=>d(""),"aria-label":"Clear search",className:"absolute right-3 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(R,{className:"w-4 h-4"})})]}),r&&e.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:v===0?e.jsxs(e.Fragment,{children:["No results for"," ",e.jsxs("span",{className:"font-semibold text-foreground",children:['"',r,'"']})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"font-semibold text-foreground",children:v})," ",v===1?"result":"results"," for"," ",e.jsxs("span",{className:"font-semibold text-foreground",children:['"',r,'"']})]})})]})}),e.jsx("section",{className:"py-12 md:py-16 flex-1",children:e.jsx("div",{className:"container max-w-6xl",children:n?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"w-8 h-8 border-2 border-primary border-t-transparent rounded-full animate-spin"})}):x.length===0?e.jsxs("div",{className:"text-center py-16 max-w-md mx-auto",children:[e.jsx("div",{className:"w-14 h-14 mx-auto mb-4 rounded-xl bg-muted flex items-center justify-center",children:e.jsx(S,{className:"w-6 h-6 text-muted-foreground"})}),e.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:"No questions found"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-5",children:r?`We couldn't find anything matching "${r}". Try a different keyword.`:"No FAQs available yet. Please check back soon."}),r&&e.jsx(j,{variant:"outline",onClick:()=>d(""),children:"Clear search"})]}):e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[240px_1fr] gap-8 lg:gap-12",children:[e.jsxs("aside",{className:"lg:sticky lg:top-44 lg:self-start",children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-[0.12em] text-muted-foreground mb-3 px-1",children:"Browse topics"}),e.jsx("nav",{className:"flex flex-row lg:flex-col gap-1 overflow-x-auto lg:overflow-visible -mx-4 lg:mx-0 px-4 lg:px-0 pb-2 lg:pb-0 lg:border-l lg:border-border",children:x.map(t=>{const a=b===t.slug;return e.jsx("button",{type:"button",onClick:()=>C(t.slug),className:`shrink-0 lg:shrink text-left px-3 py-2 text-sm font-medium transition-all relative lg:-ml-px lg:border-l-2 ${a?"text-primary lg:border-primary bg-primary/5 lg:bg-transparent roun
6ded-md lg:rounded-none":"text-muted-foreground lg:border-transparent hover:text-foreground hover:bg-muted/60 lg:hover:bg-transparent rounded-md lg:rounded-none"}`,children:e.jsx("span",{className:"truncate",children:t.name})},t.id)})}),e.jsxs("div",{className:"hidden lg:block mt-8 p-5 rounded-xl bg-card border border-border",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-lg bg-primary/10 text-primary mb-3",children:e.jsx(V,{className:"w-4 h-4"})}),e.jsx("p",{className:"text-sm font-semibold text-foreground mb-1",children:"Still stuck?"}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3 leading-relaxed",children:"Talk to a real human and get answers tailored to your fleet."}),e.jsx(j,{asChild:!0,size:"sm",variant:"default",className:"w-full",children:e.jsxs(w,{to:"/contact-us",children:["Contact support ",e.jsx(N,{className:"w-3.5 h-3.5"})]})})]})]}),e.jsx("div",{className:"space-y-14 min-w-0",children:x.map(t=>{const a=u.get(t.id)||[];return e.jsx("div",{id:t.slug,"data-slug":t.slug,ref:s=>m.current[t.slug]=s,className:"scroll-mt-44",children:e.jsxs(y.div,{initial:{opacity:0,y:12},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.4},children:[e.jsxs("div",{className:"mb-5 pb-4 border-b border-border",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("span",{className:"h-1 w-8 rounded-full bg-primary"}),e.jsxs("span",{className:"text-[11px] font-semibold uppercase tracking-[0.12em] text-primary",children:[String(x.indexOf(t)+1).padStart(2,"0")," · Section"]})]}),e.jsx("h2",{className:"text-2xl md:text-[1.7rem] font-bold text-foreground tracking-tight",children:t.name}),t.description&&e.jsx("p",{className:"mt-2 text-sm text-muted-foreground max-w-2xl leading-relaxed",children:t.description})]}),e.jsx(O,{type:"single",collapsible:!0,className:"w-full space-y-2",children:a.map(s=>e.jsxs(Q,{value:s.id,className:"bg-card rounded-lg border border-border px-5 hover:border-primary/30 transition-colors duration-200",children:[e.jsx(P,{className:"text-left text-[15px] font-semibold text-foreground hover:no-underline py-4 hover:text-primary transition-colors duration-200 [&[data-state=open]]:text-primary",children:s.question}),e.jsx(U,{className:"text-muted-foreground text-sm leading-relaxed pb-4 pt-0",children:e.jsx("div",{className:"faq-answer max-w-none border-t border-border pt-3",dangerouslySetInnerHTML:{__html:J(s.answer)}})})]},s.id))})]})},t.id)})})]})})}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-primary via-primary to-primary-dark text-primary-foreground",children:[e.jsx("div",{className:"absolute -top-20 -left-20 w-80 h-80 rounded-full bg-secondary/30 blur-3xl pointer-events-none"}),e.jsx("div",{className:"absolute -bottom-24 -right-16 w-96 h-96 rounded-full bg-accent/30 blur-3xl pointer-events-none"}),e.jsx("div",{className:"absolute inset-0 opacity-[0.08] pointer-events-none",style:{backgroundImage:"radial-gradient(circle, white 1px, transparent 1px)",backgroundSize:"20px 20px"}}),e.jsxs("div",{className:"container relative z-10 max-w-3xl text-center py-14 md:py-20",children:[e.jsx("span",{className:"inline-flex items-center justify-center w-14 h-14 rounded-2xl bg-white/15 backdrop-blur text-white mb-5 ring-1 ring-white/20",children:e.jsx(X,{className:"w-6 h-6"})}),e.jsx("h2",{className:"text-3xl md:text-4xl font-extrabold tracking-tight",children:"Still have questions?"}),e.jsx("p",{className:"mt-3 text-white/85 text-sm md:text-base max-w-xl mx-auto",children:"Tell us about your fleet — our team replies within a business day and points you to exactly what you need."}),e.jsxs("div",{className:"mt-7 flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsx(j,{asChild:!0,variant:"cta",size:"lg",children:e.jsxs(w,{to:"/get-started",children:["Book a Demo ",e.jsx(N,{size:18,className:"ml-1"})]})}),e.jsx(j,{asChild:!0,size:"lg",variant:"outline",className:"bg-transparent border-white/40 text-white hover:bg-white/10 hover:text-white",children:e.jsx(w,{to:"/contact-us",children:"Contact Support"})})]})]})]}),e.jsx(B,{})]})};export{le 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.