1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/backend-CGjTTLP9.js","assets/index-c7pORbp_.js","assets/index-CnNvgmjE.css"])))=>i.map(i=>d[i]); 2import{c as L,f as q,r as a,j as e,A as _,ay as E,w as T,L as D,o as l,I,az as P,G as M,aA as R,aB as B}from"./index-c7pORbp_.js";import{C as F}from"./copy-CDM4ALY4.js";import{S as O}from"./send-DowkZG-h.js";/** 3 * @license lucide-react v1.48.0 - ISC 4 * 5 * This source code is licensed under the ISC license. 6 * See the LICENSE file in the root directory of this source tree. 7 */const v={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};v.node;const Q=L(v),m="[email protected]";function $(){const o=q(),w=(o==null?void 0:o.tenant.name)??"your workspace",[x,u]=a.useState(!1),[p,S]=a.useState("takeoff"),[h,b]=a.useState(""),[g,f]=a.useState(""),[c,j]=a.useState(!1),[r,n]=a.useState(null),C=async()=>{try{await navigator.clipboard.writeText(m),u(!0),window.setTimeout(()=>u(!1),2e3)}catch{n({kind:"error",text:`Copy failed. Select the address: ${m}`})}},A=s=>{var N;s.preventDefault();const k=h.trim(),y=g.trim(),d=k.length<3?"subject":y.length<10?"message":null;if(d){n({kind:"error",text:d==="subject"?"Add a subject with at least 3 characters.":"Add at least 10 characters in Details."}),(N=s.currentTarget.elements.namedItem(d))==null||N.focus();return}j(!0),n(null),B(async()=>{const{sendSupportRequest:t}=await import("./backend-CGjTTLP9.js");return{sendSupportRequest:t}},__vite__mapDeps([0,1,2])).then(({sendSupportRequest:t})=>t({category:p,subject:k,message:y,page:window.location.pathname})).then(({requestId:t})=>{b(""),f(""),n({kind:"success",text:`Request sent. Reference ${t.slice(-8)}.`})},t=>{const z=t instanceof Error&&t.message.includes("RATE_LIMITED")?"You've sent several requests recently. Email support if this is urgent.":"Couldn't send the request. Your message is still hereâtry again.";n({kind:"error",text:z})}).finally(()=>j(!1))},i="flex min-h-24 items-start gap-3 rounded-xl border border-edge bg-surface p-4 shadow-xs hover:border-edge-strong hover:bg-raised";return e.jsx(_,{children:e.jsxs("main",{id:"main-content",className:"mx-auto flex w-full max-w-4xl flex-col gap-7 px-4 py-7 sm:px-8 sm:py-9 xl:px-10",children:[e.jsxs("header",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-primary/10 text-primary",children:e.jsx(E,{size:20,"aria-hidden":"true"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-ink",children:"Help and support"}),e.jsx("p",{className:"mt-1 text-sm text-ink-muted",children:"Get unstuck without leaving your BuildVision workspace."})]})]}),e.jsxs("section",{className:"rounded-xl border border-edge bg-surface p-5 shadow-soft sm:flex sm:items-center sm:justify-between sm:gap-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-ink",children:"Email support"}),e.jsxs("p",{className:"mt-1 max-w-xl text-sm text-ink-muted",children:["Use any email service you prefer. Your workspace is ",e.jsx("span",{className:"font-medium text-ink",children:w}),"."]})]}),e.jsxs("div",{className:"mt-4 flex shrink-0 items-center gap-2 rounded-md border border-edge-strong bg-bg p-1 pl-3 sm:mt-0",children:[e.jsx("span",{className:"select-all text-sm text-ink",children:m}),e.jsxs("button",{type:"button",onClick:()=>void C(),className:"flex h-8 items-center gap-1.5 rounded bg-surface px-2.5 text-xs font-medium text-ink-muted shadow-xs hover:bg-raised hover:text-ink",children:[x?e.jsx(T,{size:13,className:"text-success"}):e.jsx(F,{size:13}),x?"Copied":"Copy"]})]})]}),e.jsxs("section",{className:"rounded-xl border border-edge bg-surface p-5 shadow-soft",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-semibold text-ink",children:"Send a support request"}),e.jsx("p",{className:"mt-1 text-sm text-ink-muted",children:"Send this directly from the appâno email program or website form required. Weâll CC your account email so you have a copy."})]}),r&&e.jsx("p",{role:r.kind==="error"?"alert":"status",className:`mt-4 rounded-lg border px-3 py-2 text-xs ${r.kind==="error"?"border-error/40 bg-error/5 text-error":"border-success/40 bg-success/5 text-success"}`,children:r.text}),e.jsxs("form",{noValidate:!0,onSubmit:A,className:"mt-4 grid gap-3 sm:grid-cols-[12rem_minmax(0,1fr)]",children:[e.jsxs("label",{className:"flex flex-col gap-1.5 text-xs font-medium text-ink-muted",children:["Area",e.jsxs("select",{value:p,onChange:s=>S(s.target.value),className:"h-10 rounded-md border border-edge-strong bg-bg px-3 text-sm text-ink focus:border-primary focus:outline-none",children:[e.jsx("option",{value:"takeoff",children:"Takeoff"}),e.jsx("option",{value:"projects",children:"Projects"}),e.jsx("option",{value:"quotes",children:"Quotes"}),e.jsx("option",{value:"billing",children:"Billing"}),e.jsx("option",{value:"account",children:"Account"}),e.jsx("option",{value:"other",children:"Other"})]})]}),e.jsxs("label",{className:"flex flex-col gap-1.5 text-xs font-medium text-ink-muted",children:["Subject",e.jsx("input",{name:"subject","aria-label":"Subject",required:!0,minLength:3,maxLength:120,"aria-describedby":"support-subject-hint",value:h,onChange:s=>b(s.target.value),placeholder:"What do you need help with?",className:"h-10 rounded-md border border-edge-strong bg-bg px-3 text-sm text-ink placeholder:text-ink-faint focus:border-primary focus:outline-none"}),e.jsx("span",{id:"support-subject-hint",className:"font-normal text-ink-faint",children:"At least 3 characters."})]}),e.jsxs("label",{className:"flex flex-col gap-1.5 text-xs font-medium text-ink-muted sm:col-span-2",children:["Details",e.jsx("textarea",{name:"message","aria-label":"Details",required:!0,minLength:10,maxLength:4e3,"aria-describedby":"support-details-hint",rows:6,value:g,onChange:s=>
7f(s.target.value),placeholder:"Tell us what happened, what you expected, and the project or file name.",className:"resize-y rounded-md border border-edge-strong bg-bg px-3 py-2.5 text-sm text-ink placeholder:text-ink-faint focus:border-primary focus:outline-none"}),e.jsx("span",{id:"support-details-hint",className:"font-normal text-ink-faint",children:"At least 10 characters."})]}),e.jsx("div",{className:"flex justify-end sm:col-span-2",children:e.jsxs("button",{type:"submit",disabled:c,className:"flex h-10 items-center gap-2 rounded-md bg-primary px-4 text-sm font-semibold text-on-primary disabled:opacity-40",children:[c?e.jsx(D,{size:15,className:"animate-spin"}):e.jsx(O,{size:15}),c?"Sendingâ¦":"Send request"]})})]})]}),e.jsxs("section",{children:[e.jsx("div",{className:"mb-3 flex items-center justify-between gap-3",children:e.jsx("h2",{className:"text-sm font-semibold text-ink",children:"Quick help"})}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs(l,{to:"/takeoff",className:i,children:[e.jsx(I,{size:18,className:"shrink-0 text-primary"}),e.jsxs("span",{children:[e.jsx("span",{className:"block text-sm font-semibold text-ink",children:"Takeoff help"}),e.jsx("span",{className:"mt-1 block text-xs leading-5 text-ink-muted",children:"Open plans, review AI results, and continue recent takeoffs."})]})]}),e.jsxs(l,{to:"/",className:i,children:[e.jsx(P,{size:18,className:"shrink-0 text-primary"}),e.jsxs("span",{children:[e.jsx("span",{className:"block text-sm font-semibold text-ink",children:"Projects and uploads"}),e.jsx("span",{className:"mt-1 block text-xs leading-5 text-ink-muted",children:"Find project folders and start a PDF or ZIP upload."})]})]}),e.jsxs(l,{to:"/quotes",className:i,children:[e.jsx(M,{size:18,className:"shrink-0 text-primary"}),e.jsxs("span",{children:[e.jsx("span",{className:"block text-sm font-semibold text-ink",children:"Quotes"}),e.jsx("span",{className:"mt-1 block text-xs leading-5 text-ink-muted",children:"Build, preview, send, and track customer quotes."})]})]}),e.jsxs(l,{to:"/settings",search:{tab:"billing"},className:i,children:[e.jsx(R,{size:18,className:"shrink-0 text-primary"}),e.jsxs("span",{children:[e.jsx("span",{className:"block text-sm font-semibold text-ink",children:"Account and billing"}),e.jsx("span",{className:"mt-1 block text-xs leading-5 text-ink-muted",children:"Manage workspace access, subscription, and billing details."})]})]})]})]}),e.jsxs("p",{className:"flex items-center gap-2 rounded-lg border border-edge bg-bg/60 px-3 py-2.5 text-xs text-ink-faint",children:[e.jsx(Q,{size:14,"aria-hidden":"true"}),"For the fastest answer, include the file name and what you expected to happen."]})]})})}export{$ as SupportPage};
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.