1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/leads-pwAjbNNg.js","assets/index-kdBC86R3.js","assets/react-vendor-DNsy_oCe.js","assets/towns-data-YsDaoonu.js","assets/motion-vendor-i2FhmE7w.js","assets/icons-vendor-C2eoPtgt.js","assets/Skeletons-zQo3NBAg.js","assets/query-vendor-CUxMEYOH.js","assets/form-vendor-umSIiqr9.js","assets/index-DZiXtbMR.css"])))=>i.map(i=>d[i]); 2import{b as G,r as l,j as e}from"./react-vendor-DNsy_oCe.js";import{a4 as U,D as J,a3 as z,b as K,l as Q,H as X,e as Z}from"./Skeletons-zQo3NBAg.js";import{F as $}from"./IntakeChooser-bb1XNXVd.js";import{I as ee}from"./IntakeShell-Y4JebuLL.js";import{F as te,W as oe,_ as re,t as ae}from"./index-kdBC86R3.js";import{d as ne,b as se}from"./towns-data-YsDaoonu.js";import{A as ie,n as le,u as de,s as ce}from"./intake-uploads-Ck33lnPO.js";import{d as ue}from"./lead-routing-DouYcrvw.js";import{I as pe,S as me,L as s,C as p,a as m,F as h,H as v,b as he,T as fe,c as ye}from"./IntakeConfirmation-CzBk32Iu.js";import{a as be,u as ge}from"./FastLeadForm-DhazU1gw.js";import{F as xe,a as je}from"./CostContextBlock-C9qp7bVT.js";import{A as ve,m as we}from"./motion-vendor-i2FhmE7w.js";import{J as _e,A,L as ke}from"./icons-vendor-C2eoPtgt.js";import"./query-vendor-CUxMEYOH.js";import"./form-vendor-umSIiqr9.js";import"./supabase-vendor-DQDCy1Uk.js";import"./PageContext-BvpuD3zg.js";import"./leads-pwAjbNNg.js";import"./ReviewCard-sfzb9B_V.js";const B=[{value:"replacement",label:"Roof Replacement",sub:"Full system, end-of-life"},{value:"repair",label:"Roof Repair",sub:"Active leak or known issue"},{value:"storm",label:"Storm Damage",sub:"Recent weather event"},{value:"metal",label:"Metal Roofing",sub:"Standing seam / metal system"},{value:"synthetic",label:"Brava / Synthetic",sub:"Premium synthetic shake or slate"},{value:"inspection",label:"Inspection Only",sub:"Pre-purchase or peace-of-mind"}],O=[{value:"emergency",label:"Emergency",sub:"Active leak now"},{value:"30days",label:"Within 30 days",sub:"Ready to move"},{value:"90days",label:"Within 90 days",sub:"Planning ahead"},{value:"6months",label:"3â6 months",sub:"Researching"}],Te=[{value:"none",label:"No claim",sub:"Out of pocket"},{value:"considering",label:"Considering filing"},{value:"active_claim",label:"Active claim",sub:"Adjuster involved"}],L=[{value:"primary",label:"Primary residence"},{value:"second_home",label:"Second home"},{value:"rental",label:"Rental / investment"},{value:"commercial",label:"Commercial building"}],Se={projectType:"",timeline:"",insuranceStatus:"",propertyType:"",town:"",description:"",name:"",email:"",phone:""},Ce=()=>{var N,R,P;const[f]=G(),[a,y]=l.useState(0),[t,w]=l.useState({...Se,projectType:f.get("type")||"",town:f.get("town")||""}),[b,H]=l.useState([]),[_,k]=l.useState(!1),[T,q]=l.useState(!1),[M,g]=l.useState(null),[D,S]=l.useState([]),i=(o,n)=>w(d=>({...d,[o]:n})),C=be("roofing-intake",t,{step:a,enabled:!T,onRestore:(o,n)=>{w(d=>({...d,...o})),typeof n=="number"&&y(n)}}),r=ge({name:t.name,email:t.email,phone:t.phone,town:t.town,require:{name:!0,town:!0}}),F=l.useMemo(()=>a===0?!!(t.projectType&&t.timeline):a===1?!!t.propertyType&&!r.errors.town:a===2?!0:a===3?r.valid:!1,[a,t,r.valid,r.errors.town]),W=()=>{F&&(U({form_name:"Roofing Intake",form_id:"roofing-intake",step_index:a,total_steps:4}),y(o=>Math.min(3,o+1)))},V=()=>y(o=>Math.max(0,o-1)),Y=async()=>{if(!r.markAttempted()){g("We need a little more before we can send this."),S(Object.values(r.errors).filter(Boolean));return}S([]),k(!0),g(null);try{const o=le();let n=[],d=[];if(b.length){const c=await de(o,b);n=c.ok.map(j=>j.path),d=c.errors}const u=J({serviceCategory:"roofing",projectType:t.projectType,timeline:t.timeline,insuranceStatus:t.insuranceStatus,propertyType:t.propertyType,town:t.town,hasPhotos:n.length>0,description:t.description}),{routing:x,jobtread:I}=ue({source:"roofing_intake",score:u,contact:{name:t.name,email:t.email,phone:t.phone},projectType:t.projectType,timeline:t.timeline,propertyType:t.propertyType,town:t.town,hasPhotos:n.length>0,insuranceStatus:t.insuranceStatus}),{error:E}=await ce.from("consultation_requests").insert({name:r.values.name,email:r.values.email,phone:r.values.phone,town:r.values.town,project_type:t.projectType,service_category:"roofing",timeline:t.timeline,urgency:t.timeline==="emergency"?"high":t.timeline==="30days"?"medium":"low",insurance_status:t.insuranceStatus||null,property_type:t.propertyType,project_description:t.description||null,source:"roofing_intake",lead_score:u,status:x.lane==="emergency"?"urgent":"new",metadata:{routing:x,jobtread:I,upload_folder:o,upload_paths:n,upload_errors:d,referrer:typeof document<"u"?document.referrer:null,utm:Object.fromEntries(f.entries())}});if(E)throw E;try{const{submitLead:c}=await re(async()=>{const{submitLead:j}=await import("./leads-pwAjbNNg.js");return{submitLead:j}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));await c({source:"roofing_intake_form",lead_type:"roofing",full_name:r.values.name,email:r.values.email,phone:r.values.phone,property_town:r.values.town,property_state:"NC",service_category:"roofing",project_type:t.projectType,timeline:t.timeline,urgency:t.timeline==="emergency"?"high":t.timeline==="30days"?"medium":"low",insurance_status:t.insuranceStatus||null,roofing_issue_type:t.projectType,property_type:t.propertyType,project_description:t.description||null,lead_score:u,attachments:n,attachment_errors:d,metadata:{routing:x,jobtread:I,upload_folder:o}})}catch(c){console.error(c)}ae("form_submit",{label:"Roofing Intake",elementId:"roofing-intake",metadata:{project:t.projectType,timeline:t.timeline,score:u,photos:n.length}}),q(!0),C.clear()}catch(o){g(z(o,"lead"))}finally{k(!1)}};return T?e.jsx(pe,{title:"Your request is in good hands.",town:t.town,category:"roofing",summary:[{label:"Project",value:(N=B.find(o=>o.value===t.projectType))==null?void 0:N.label},{label:"Timeline",value:(R=O.find(o=>o.value===t.timeline))==null?void 0:R.label},{label:"Property",value:(P=L.find(o=>o.value===t.propertyType))==null?void 0:P.label},{label:"Town",value:t.town},{label:"We'll reach you at",value:t.phone||t.email}],body:t.timeline==="emergency"?"An advisor will contact you within hours. If you have active interior leaking, place a bucket and avoid touching ceiling drywall.":"A Highlander project advisor will personally review your request and reach out as soon as possible."}):e.jsxs("form",{onSubmit:o=>{o.preventDefault(),a<3?W():Y()},noValidate:!0,children:[e.jsxs("div",{className:"flex items-center justify-between mb-7",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-caption font-body font-bold uppercase tracking-[0.22em] text-foreground
2/80 mb-1",children:["Step ",a+1," of 4"]}),e.jsxs("h2",{className:"text-body md:text-body-lg font-heading font-bold text-foreground tracking-tight",children:[a===0&&"Tell us about the roof",a===1&&"Where & what type of property",a===2&&"Photos & details (optional)",a===3&&"How should we reach you"]})]}),e.jsx(me,{total:4,current:a})]}),e.jsx(te,{show:C.restored,className:"mb-5"}),e.jsx(ve,{mode:"wait",children:e.jsxs(we.div,{initial:{opacity:0,x:12},animate:{opacity:1,x:0},exit:{opacity:0,x:-12},transition:{duration:.25,ease:[.22,1,.36,1]},className:"space-y-6",children:[a===0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx(s,{required:!0,id:"lbl-what-kind-of-roofing-project",children:"What kind of roofing project"}),e.jsx(p,{labelledBy:"lbl-what-kind-of-roofing-project",options:B,value:t.projectType,onChange:o=>i("projectType",o),columns:2})]}),e.jsxs("div",{children:[e.jsx(s,{required:!0,id:"lbl-timeline",children:"Timeline"}),e.jsx(p,{labelledBy:"lbl-timeline",options:O,value:t.timeline,onChange:o=>i("timeline",o),columns:2})]}),t.timeline==="emergency"&&e.jsxs("p",{className:"text-body-xs font-body text-[hsl(var(--gold-ink))] bg-[hsl(var(--highland-gold)/0.06)] border border-[hsl(var(--highland-gold)/0.25)] rounded-md px-4 py-3",children:["Emergency response: complete the form and we'll call you directly â or dial ",e.jsx("a",{className:"underline font-semibold",href:ne,children:se})," now."]})]}),a===1&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx(s,{required:!0,id:"lbl-property-type",children:"Property type"}),e.jsx(p,{labelledBy:"lbl-property-type",options:L,value:t.propertyType,onChange:o=>i("propertyType",o),columns:2})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(s,{required:!0,htmlFor:"fld-property-address",children:"Property address"}),e.jsx(m,{id:"fld-property-address",placeholder:"e.g. 120 Chestnut St, Highlands, NC",value:t.town,onChange:o=>i("town",o.target.value),onBlur:()=>r.blur("town"),invalid:!!r.errorFor("town")}),e.jsx(h,{children:r.errorFor("town")}),e.jsx(v,{children:"Full address allows us to prepare a more accurate assessment."})]}),e.jsxs("div",{children:[e.jsx(s,{id:"lbl-insurance-claim-status",children:"Insurance claim status"}),e.jsx(p,{labelledBy:"lbl-insurance-claim-status",options:Te,value:t.insuranceStatus,onChange:o=>i("insuranceStatus",o),columns:3})]})]})]}),a===2&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx(s,{id:"lbl-roof-photos",children:"Roof photos"}),e.jsx(he,{labelledBy:"lbl-roof-photos",files:b,onChange:H,accept:ie,helper:"A few photos help us prepare. Phone photos are fine. Max 8 files, 8MB each."})]}),e.jsxs("div",{children:[e.jsx(s,{htmlFor:"fld-roofing-notes",children:"Anything specific we should know?"}),e.jsx(fe,{id:"fld-roofing-notes",rows:5,placeholder:"Roof age, known leaks, recent storm, prior repairs, specific design concernsâ¦",value:t.description,onChange:o=>i("description",o.target.value)}),e.jsx(v,{children:"Optional. The more we know, the better-prepared your advisor will be."})]})]}),a===3&&e.jsxs(e.Fragment,{children:[e.jsxs(ye,{children:[e.jsxs("div",{children:[e.jsx(s,{required:!0,htmlFor:"fld-full-name",children:"Full name"}),e.jsx(m,{id:"fld-full-name",value:t.name,onChange:o=>i("name",o.target.value),onBlur:()=>r.blur("name"),invalid:!!r.errorFor("name"),autoComplete:"name"}),e.jsx(h,{children:r.errorFor("name")})]}),e.jsxs("div",{children:[e.jsx(s,{required:!0,htmlFor:"fld-phone",children:"Phone"}),e.jsx(m,{id:"fld-phone",type:"tel",inputMode:"tel",value:t.phone,onChange:o=>i("phone",r.formatPhoneInput(o.target.value)),onBlur:()=>r.blur("phone"),invalid:!!r.errorFor("phone"),autoComplete:"tel",placeholder:"(828) 555-0123"}),e.jsx(h,{children:r.errorFor("phone")})]})]}),e.jsxs("div",{children:[e.jsx(s,{required:!0,htmlFor:"fld-email",children:"Email"}),e.jsx(m,{id:"fld-email",type:"email",value:t.email,onChange:o=>i("email",o.target.value),onBlur:()=>r.blur("email"),invalid:!!r.errorFor("email"),autoComplete:"email",maxLength:255}),e.jsx(h,{children:r.errorFor("email")}),e.jsx(v,{children:"Used for proposal documents and project updates. No marketing list."})]})]}),e.jsx(xe,{message:M,issues:D})]},a)}),a===3&&e.jsx(oe,{className:"mt-8"}),e.jsxs("div",{className:"flex items-center justify-between gap-3 mt-8 pt-6 border-t border-border",children:[a>0?e.jsxs("button",{type:"button",onClick:V,className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground text-body-xs font-body transition-colors",children:[e.jsx(_e,{className:"w-4 h-4","aria-hidden":"true"})," Back"]}):e.jsx("span",{}),a<3?e.jsxs("button",{type:"submit",disabled:!F,className:"cta-gradient text-accent-foreground font-body font-bold text-base px-10 py-4 rounded-none inline-flex items-center gap-3 disabled:opacity-40 disabled:cursor-not-allowed hover:opacity-95 transition-all uppercase tracking-widest shadow-raised",children:["Continue ",e.jsx(A,{className:"w-4 h-4","aria-hidden":"true"})]}):e.jsx("button",{type:"submit",disabled:_,className:"cta-gradient text-accent-foreground font-body font-bold text-base px-10 py-4 rounded-none inline-flex items-center gap-3 disabled:opacity-40 disabled:cursor-not-allowed hover:opacity-95 transition-all uppercase tracking-widest shadow-raised",children:_?e.jsxs(e.Fragment,{children:[e.jsx(ke,{className:"w-4 h-4 animate-spin","aria-hidden":"true"})," Sendingâ¦"]}):e.jsxs(e.Fragment,{children:["Get My Roof Assessed ",e.jsx(A,{className:"w-4 h-4","aria-hidden":"true"})]})})]}),a===3&&e.jsx(je,{className:"mt-4"})]})},Je=()=>e.jsxs(e.Fragment,{children:[e.jsx(K,{title:"Request a Roof Assessment | Highlander Building Services",description:"Tell us about your roof. A Highlander project advisor responds as soon as possible across Western North Carolina.",path:"/roofing-intake",noindex:!0,jsonLd:Q([{name:"Home",url:"/"},{name:"Roofing Intake",url:"/roofing-intake"}])}),e.jsx(X,{}),e.jsx("main",{id:"main-content",children:e.jsx(ee,{eyebrow:"Roofing Intake",title:"Request a roof assessment.",subhead:"Replacement, repair, storm, metal, or synthetic â start with a few details and a Highlander advisor responds as soon as possible. No call centers, no high-pressure quotes.",sidebarBullets:["Team-led team, local crews, written scope before any work begins.","CertainTeed ShingleMaster Credentialed Contractor and Licensed General Contractor.","Rapid storm response across 8 Western NC counties."],otherIntakeLabel:"Construction Intake",otherIntakeHref:"/construction-intake",children:e.jsx(Ce,{})})}),e.jsx($,{}),e.jsx(Z,{})]});
2export{Je 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.