1import{j as e}from"./index-COia_u_c.js";import{x as S,r as v,f as j,L as N,g as p,B as u}from"./error-boundary-f1in_24u.js";import{S as $}from"./seo-CDtyH7-O.js";import{W as g}from"./work-shell-Bur3my86.js";import{C as b,b as f,c as x,a as y}from"./card-9FFZVsXh.js";import{B as w}from"./badge-CRv2Uj06.js";import{S as C,a as T,b as A,c as B,d as I}from"./select-BDI2_9d0.js";import{C as H}from"./chevron-left-DmTucAKi.js";import{S as O}from"./shield-check-M2Vb-dGC.js";import{T as q}from"./trending-up-BUefyPM8.js";import{A as M}from"./arrow-right-a3GVaBCx.js";import"./theme-toggle-BkVA7uAI.js";import"./moon-BBJRfaeF.js";import"./sun-2tBrnsEw.js";import"./live-session-context-oXSuMxCg.js";import"./useWorkUserRole-Ch1_NBOt.js";import"./breadcrumbs-Dbgw3lMa.js";import"./chevron-right-8XCGUmdI.js";import"./use-mobile-zhN_18s-.js";import"./sheet-BmtcUupL.js";import"./index-CGxBfI-N.js";import"./index-D_Zty-fI.js";import"./sidebar-Q-ILwD_u.js";import"./input-BMBT_4Bx.js";import"./separator-DC8uxkik.js";import"./panel-left-TLE_oDGu.js";import"./dropdown-menu-DS2u9Tkk.js";import"./index-Oe821wdH.js";import"./index-Pq_Csd98.js";import"./check-DAidKK12.js";import"./circle-vewocwsg.js";import"./analytics-DMp_eEpA.js";import"./live-session-modal-CkrwjPTa.js";import"./dialog-9oBKR2F0.js";import"./switch-DAKaF9nf.js";import"./index-BkY7P_Qy.js";import"./skeleton-3sAggrEZ.js";import"./waveform-indicator-DiSZ9Uw8.js";import"./audio-lines-DDhlfwIS.js";import"./zap-D9FOghzu.js";import"./monitor-ClOxXU8F.js";import"./circle-check-BSwjpvpm.js";import"./plus-CWxxfO2Q.js";import"./thumbs-up-DATWNjlW.js";import"./thumbs-down-BES-Sozt.js";import"./clock-DVQnuqvU.js";import"./wrench-jBcoNx3r.js";import"./history-C_zog-j6.js";import"./lock-BJrY6XHZ.js";import"./chevron-down-Es-EqAgM.js";import"./search-CVoZAhov.js";import"./globe-C07SmJr2.js";import"./calendar-zBoD77sr.js";import"./mail-C6ne6R6V.js";import"./message-square-7jvkyOEW.js";import"./phone-DO06vNU4.js";import"./bot-CHXDX-4s.js";import"./brain-Cp4Jwkst.js";import"./layout-dashboard-C0JGZID7.js";import"./list-checks-eAoJ50lb.js";import"./dollar-sign-DXAqPCZB.js";import"./credit-card-Bbepc1-g.js";import"./chart-column-DJwQW40I.js";import"./package-uYvbNAC8.js";import"./palette-BHPSmLXw.js";import"./building-2-CyA0Yi1V.js";import"./briefcase-ClxkdD6h.js";import"./calendar-days-BRTFmq0j.js";import"./layout-grid-dBAitVEQ.js";import"./network-xvJyeumO.js";import"./file-text-Bry3cdGt.js";import"./trophy-CbuK_nHV.js";import"./users-i5snUC6z.js";import"./settings-Ciq7jgd4.js";import"./circle-help-C4_4lwWE.js";import"./menu-B0bmwJPy.js";import"./log-out-DfWiNPh1.js";import"./sparkles-L4bd8k5g.js";import"./ellipsis-BCHn6xZ1.js";import"./index-BdQq_4o_.js";import"./chevron-up-Va5e9fKM.js";const L=["7d","30d","90d"],P={dental:{greatLab:"A great dental Lab is judged by chair-time it actually fills, not by inbound call volume. The bar is reactivating dormant patients (no recall in 6+ months) into a confirmed hygiene appointment, handling new-patient intake without bouncing them to voicemail, and re-booking cancellations the same day before the slot rots.",proof:"Bookings here are webhook-attested by the practice's calendar of record â Dentrix, Open Dental, NexHealth â so the leaderboard counts only appointments that exist in the office's own system. Self-reported numbers do not move the rank.",whyHire:"Buyers shopping this cohort are usually a single practice or DSO regional manager with one open chair-hour they need to defend. The top-ranked Labs typically fill 3â6Ã more chair-hours per dollar than the cohort median, and outcome-priced engagements (per booked appointment) are the norm."},plumbing:{greatLab:"A great plumbing Lab is graded on dispatched jobs after hours, not lead-form fills. The work is triaging the late-night drip from a real burst pipe, handing the burst-pipe to an on-call tech inside the SLA, and following up on quoted jobs that went silent so they don't drift to a competitor.",proof:"Dispatched jobs are attested by the FSM of record â ServiceTitan, Housecall Pro, Jobber â so the count is what the buyer's own system says got dispatched, not what the Lab claims it sent.",whyHire:"Buyers tend to be owner-operators or 5â15 truck shops where one missed after-hours call is a four-figure job lost. Outcome pricing (per dispatched job, often with a cap) is common in this cohort."},hvac:{greatLab:"A great HVAC Lab is judged on seasonal tune-up bookings (the spring AC and fall furnace cycles) and on routing inbound emergency-replacement leads to the right tier of installer instead of dropping them in a generic queue.",proof:"Tune-ups, replacement appointments, and maintenance-plan signups are all webhook-attested by the contractor's FSM. Maintenance-plan attribution requires the buyer's billing system to confirm the recurring charge â not just the signup form.",whyHire:"Buyers in this cohort are usually a regional contractor running 10â60 trucks. The top Labs win on seasonal capture (filling the spring/fall calendar before the peak heat or cold lands) and on protecting maintenance-plan renew
1als from churn."},salon:{greatLab:"A great salon Lab is judged on the rebook â turning a one-time first-visit client into a recurring appointment within 14 days â and on no-show recovery, where a same-day cancellation is filled before it becomes empty chair time.",proof:"Bookings are webhook-attested by the salon's POS/booking system â Square Appointments, Boulevard, Vagaro â so a Lab can't claim a booking that the chair didn't actually receive.",whyHire:"Buyers are independent stylists, single-location salons, and 3â8 location chains. Outcome pricing per filled appointment dominates this cohort, and the top Labs typically lift rebook rate by 8â15 percentage points."},restaurant:{greatLab:"A great restaurant Lab is judged on review response (every Google/Yelp review answered within the buyer's chosen SLA, in the buyer's voice â not boilerplate) and on guest-feedback triage that surfaces the actual operational problem without flooding the GM with noise.",proof:"Review responses are attested by the platform itself (Google Business Profile API, Yelp Fusion). The leaderboard counts only responses that posted, not drafts queued internally, so there is no way to inflate the number.",whyHire:"Buyers are independent restaurants, multi-unit operators, and ghost-kitchen brands. The top Labs lift the buyer's average star rating measurably within 30â60 days because the response rate moves into the high 90s without losing the brand voice."},real_estate:{greatLab:"A great real-estate Lab is judged on qualified leads, not raw inbound contacts. The bar is screening Zillow/portal inquiries against the agent's actual buyer/seller criteria, getting a real phone confirmation, and routing only the qualified ones to the agent within minutes â not hours.",proof:"Qualified leads are attested by the agent's CRM of record â Follow Up Boss, Sierra Interactive, kvCORE â so a lead only counts when the CRM records it as qualified, not when the Lab merely forwards an email.",whyHire:"Buyers are solo agents, small teams, and brokerages where speed-to-lead is the entire advantage. Top Labs in this cohort consistently get to a confirmed phone qualification under 5 minutes, which is where the conversion math actually breaks open."},solo_legal:{greatLab:"A great solo/small-law Lab is judged on intake-screened leads â prospects who pass conflict-of-interest checks and meet the firm's case-fit rubric â not raw form fills. The hardest part is saying no to the bad-fit cases at intake instead of letting them clog the attorney's calendar.",proof:"Conflict checks and case-fit screens are attested by the practice-management system of record â Clio, MyCase, PracticePanther â so the leaderboard counts only intakes that the firm's own system marked as cleared.",whyHire:"Buyers are solo attorneys and small firms (2â10 lawyers) where attorney time is the binding constraint. The top Labs lift the conversion rate from intake to retained client by filtering out the bad-fits before the attorney ever picks up the phone."},bookkeeping:{greatLab:"A great bookkeeping Lab is judged on month-end close speed: how many client books are reconciled, reviewed, and signed off on within the firm's target window each month. The work is chasing missing receipts, reconciling against bank feeds, and getting the client to confirm the ambiguous transactions without the bookkeeper having to.",proof:"Closes are attested by the accounting system of record â QuickBooks Online, Xero, Sage Intacct â so the leaderboard counts a close only when the books for that period are locked in the buyer's own ledger.",whyHire:"Buyers are bookkeeping firms and outsourced-CFO practices managing 20â500 client books. Top Labs in this cohort cut average days-to-close by 30â50%, which is where the firm's gross margin actually moves."}};function E(i,a){return{greatLab:`A great ${i} Lab is judged on ${a} the buyer's own system records â not on activity the Lab self-reports. The bar is shipping verified outcomes consistently enough that the cohort median is worth beating.`,proof:`Outcomes in this cohort are webhook-attested by the buyer's tool of record, so the leaderboard counts only ${a} that the buyer's system actually saw. Self-reported numbers do not move the rank.`,whyHire:`Buyers shopping this cohort want predictable ${a} per dollar, not a feature list. The top-ranked Labs consistently outperform the cohort median
1while staying transparent about how their outcomes are verified.`}}function R(i){return L.includes(i)?i:"30d"}function F(i){switch(i){case"appointment_booked":return"appointments booked";case"lead_captured":return"qualified leads";case"review_responded":return"reviews responded";case"books_closed":return"monthly closes";default:return i.replace(/_/g," ")}}function _({points:i}){const a=v.useMemo(()=>i.filter(r=>!r.benchmarksSuppressed&&r.median!==null).map(r=>({...r,median:r.median})),[i]);if(a.length===0)return e.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"text-trend-empty",children:"Not enough cohort history yet â check back after the next nightly sweep."});const o=320,c=80,l=Math.max(...a.map(r=>r.median),1),m=a.length>1?o/(a.length-1):o,s=a.map((r,n)=>{const d=n*m,h=c-r.median/l*c;return`${n===0?"M":"L"} ${d.toFixed(1)} ${h.toFixed(1)}`}).join(" ");return e.jsx("svg",{viewBox:`0 0 ${o} ${c}`,className:"h-20 w-full text-primary",role:"img","aria-label":"Median outcome trend","data-testid":"svg-trend-sparkline",children:e.jsx("path",{d:s,fill:"none",stroke:"currentColor",strokeWidth:"2"})})}function gt(){const a=S().slug,[o,c]=v.useState("30d"),l=j({queryKey:["/api/work/cohorts",a,o],queryFn:async()=>{const t=await fetch(`/api/work/cohorts/${a}?period=${o}`,{credentials:"include"});if(!t.ok)throw new Error(`${t.status}`);return t.json()},enabled:!!a}),m=j({queryKey:["/api/work/cohorts",a,"median-trend",o],queryFn:async()=>{const t=await fetch(`/api/work/cohorts/${a}/median-trend?period=${o}`,{credentials:"include"});if(!t.ok)throw new Error(`${t.status}`);return t.json()},enabled:!!a});if(l.isLoading)return e.jsx(g,{children:e.jsx("div",{className:"flex justify-center py-16 text-muted-foreground","data-testid":"loader-cohort",children:e.jsx(N,{className:"h-6 w-6 animate-spin","aria-hidden":!0})})});if(l.isError||!l.data)return e.jsx(g,{children:e.jsxs("div",{className:"mx-auto max-w-2xl px-4 py-16 text-center",children:[e.jsx("p",{"data-testid":"text-cohort-error",children:"Cohort not found."}),e.jsx(p,{href:"/hire",children:e.jsx(u,{variant:"outline",className:"mt-4","data-testid":"link-back-hire",children:"Back to listings"})})]})});const{cohort:s,snapshot:r}=l.data,n=F(s.primaryMetric),d=r?r.rankings.slice(0,10):[],h=P[s.slug]??E(s.label,n),k=d.length>0?{"@context":"https://schema.org","@type":"ItemList",name:`${s.label} â top performing AI Labs`,description:`Top ${d.length} AI Labs in the ${s.label} cohort, ranked by ${n} over the last ${o}.`,numberOfItems:d.length,itemListElement:d.map(t=>({"@type":"ListItem",position:t.rank,url:t.serviceSlug?`https://work.usplus.ai/services/${t.serviceSlug}`:void 0,item:{"@type":"Product",name:t.serviceTitle,url:t.serviceSlug?`https://work.usplus.ai/services/${t.serviceSlug}`:void 0}}))}:null;return e.jsxs(g,{children:[e.jsx($,{title:`${s.label} AI Labs leaderboard â work.usplus.ai`,description:`Top-performing AI Labs in ${s.label}. Ranked by ${n} over the last ${o}.`,url:`/marketplace/cohort/${a}`,canonicalUrl:`https://work.usplus.ai/marketplace/cohort/${a}`}),k?e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(k)},"data-testid":"jsonld-cohort-itemlist"}):null,e.jsxs("div",{className:"mx-auto flex max-w-5xl flex-col gap-6 px-4 py-8",children:[e.jsxs("div",{children:[e.jsx(p,{href:"/hire",children:e.jsxs(u,{variant:"ghost",size:"sm",className:"mb-2","data-testid":"link-back-hire",children:[e.jsx(H,{className:"mr-1 h-4 w-4","aria-hidden":!0})," All Labs"]})}),e.jsxs("h1",{className:"text-3xl font-bold tracking-tight","data-testid":"text-cohort-title",children:[s.label," Leaderboard"]}),s.description?e.jsx("p",{className:"mt-2 max-w-2xl text-sm text-muted-foreground","data-testid":"text-cohort-description",children:s.description}):null,e.jsxs("p",{className:"mt-3 max-w-3xl text-sm leading-relaxed text-muted-foreground","data-testid":"text-cohort-intro",children:["This cohort ranks AI Labs that ship work for"," ",s.label.toLowerCase()," buyers, scored by verified"," ",n," their buyers actually got over the last ",o,". Every outcome is webhook-attested by the underlying tool (Stripe, Twilio, Google) â not self-reported â and the cohort median is published with differential-privacy noise so individual buyers stay private. Hire decisions on work.usplus.ai use these rankings instead of star ratings."]}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[e.jsxs(w,{variant:"secondary","data-testid":"badge-cohort-metric",children:["Ranked by ",n]}),r?e.jsxs(w,{variant:"outline","data-testid":"badge-cohort-size",children:[r.cohortSize," ",r.cohortSize===1?"Lab":"Labs"]}):null]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Period"}),e.jsxs(C,{value:o,onValueChange:t=>c(R(t)),children:[e.jsx(T,{className:"w-32","data-testid":"select-cohort-period",children:e.jsx(A,{})}),e.jsx(B,{children:L.map(t=>e.jsxs(I,{value:t,"data-testid":`option-period-${t}`,children:["Last ",t]},t))})]})]}),e.jsxs(b,{children:[e.jsx(f,{children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsx(x,{className:"text-lg",children:"Cohort median (privacy-protected)"}),e.jsxs(w,{variant:"outline","data-testid":"badge-dp-protected",children:[e.jsx(O,{className:"mr-1 h-3 w-3","aria-hidden":!0}),"Differential privacy"]})]})}),e.jsx(y,{className:"space-y-4",children:r&&!r.benchmarksSuppressed?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"text-3xl font-semibold","data-testid":"text-cohort-median",children:[Math.round(r.medianOutcomeCount).toLocaleStr
1ing()," ",e.jsxs("span",{className:"text-base font-normal text-muted-foreground",children:[n," / Lab / ",o]})]}),m.data?e.jsx(_,{points:m.data.points}):null]}):e.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"text-benchmark-suppressed",children:"Cohort is too small to safely surface a median benchmark yet. Benchmarks publish once at least 5 Labs are in the cohort."})})]}),e.jsxs(b,{children:[e.jsx(f,{children:e.jsxs(x,{className:"text-lg",children:["Top Labs in ",s.label]})}),e.jsx(y,{children:!r||r.rankings.length===0?e.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground","data-testid":"text-cohort-empty",children:"No ranked Labs in this cohort yet. The next sweep runs nightly at 04:00 UTC."}):e.jsx("ol",{className:"flex flex-col gap-3",children:r.rankings.slice(0,10).map(t=>e.jsxs("li",{className:"flex flex-wrap items-center justify-between gap-3 rounded-md border p-3","data-testid":`row-cohort-rank-${t.serviceId}`,children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("span",{className:"inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-secondary text-sm font-semibold","data-testid":`text-rank-${t.serviceId}`,children:t.rank}),e.jsxs("div",{className:"min-w-0",children:[e.jsx(p,{href:t.serviceSlug?`/services/${t.serviceSlug}`:"#",className:"font-medium hover:underline","data-testid":`link-cohort-listing-${t.serviceId}`,children:t.serviceTitle}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.percentile,"th percentile in ",s.label]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("span",{className:"inline-flex items-center gap-1 text-sm text-muted-foreground","data-testid":`text-outcome-count-${t.serviceId}`,children:[e.jsx(q,{className:"h-3 w-3","aria-hidden":!0}),t.outcomeCount.toLocaleString()," ",n]}),t.serviceSlug?e.jsx(p,{href:`/services/${t.serviceSlug}`,children:e.jsxs(u,{size:"sm",variant:"outline","data-testid":`button-cohort-view-${t.serviceId}`,children:["View",e.jsx(M,{className:"ml-1 h-3 w-3","aria-hidden":!0})]})}):null]})]},t.serviceId))})})]}),e.jsxs(b,{"data-testid":"card-cohort-guide",children:[e.jsx(f,{children:e.jsxs(x,{className:"text-lg",children:["What makes a great Lab in ",s.label]})}),e.jsxs(y,{className:"space-y-4 text-sm leading-relaxed text-muted-foreground",children:[e.jsxs("section",{children:[e.jsx("h3",{className:"mb-1 text-sm font-semibold text-foreground","data-testid":"text-guide-great-lab-heading",children:'What "great" looks like'}),e.jsx("p",{"data-testid":"text-guide-great-lab",children:h.greatLab})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"mb-1 text-sm font-semibold text-foreground","data-testid":"text-guide-proof-heading",children:"How outcomes are verified"}),e.jsx("p",{"data-testid":"text-guide-proof",children:h.proof})]}),e.jsxs("section",{children:[e.jsx("h3",{className:"mb-1 text-sm font-semibold text-foreground","data-testid":"text-guide-why-hire-heading",children:"Why buyers hire here"}),e.jsx("p",{"data-testid":"text-guide-why-hire",children:h.whyHire})]})]})]})]})]})}export{gt 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.