PageSourceSearch

https://bankruptcy.manus.space/assets/AdminLeads-G8-OELvM.js

js bankruptcy.manus.space collected 2026-10-03 05:00:30 UTC 42,198 bytes, 7 lines download raw bytes

vendor: 15,659 bytes, lines 1-6
1import{r as i,j as e}from"./vendor-BMTqjksT.js";import{A as Ge}from"./AdminLayout-Cd2syILU.js";import{r as Ve,aJ as H,ak as B,aK as qe,aL as Ke,aM as He,aN as Qe,aO as ae,ao as se,aD as De,t as te,i as re,k as Ie,Q as Je,R as We,V as Xe,W as Ye,Y as me,O as Ze,I as we,v as ce,a8 as et,X as tt,B as D,ay as at,aP as st,D as he,l as fe,m as ve,o as be,p as Ae,q as Ne,ag as nt,aa as dt,aG as it,a0 as lt}from"./index-C0VezhcQ.js";import{C as $e}from"./checkbox-D6Hx3CuH.js";import{F as rt}from"./filter-BUdas-WS.js";import{D as ct}from"./download-EuNlI9nL.js";import{R as Se}from"./route-ZVFl2Rsv.js";import{T as ke}from"./trash-2-CA8IhsIs.js";import{M as ot}from"./mail-open-B_hXajM1.js";import"./sparkles-D2L2V_UA.js";import"./chart-no-axes-column-D7MgvIiw.js";import"./trpc-c2OaEmLI.js";import"./d3-ngNJxV2x.js";/**
2 * @license lucide-react v0.453.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 Te=Ve("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);var Ce=1,mt=.9,xt=.8,ut=.17,xe=.1,ue=.999,pt=.9999,gt=.99,ht=/[\\\/_+.#"@\[\(\{&]/,ft=/[\\\/_+.#"@\[\(\{&]/g,vt=/[\s-]/,Me=/[\s-]/g;function ye(t,n,a,m,l,o,p){if(o===n.length)return l===t.length?Ce:gt;var x=`${l},${o}`;if(p[x]!==void 0)return p[x];for(var A=m.charAt(o),c=a.indexOf(A,l),f=0,v,y,N,k;c>=0;)v=ye(t,n,a,m,c+1,o+1,p),v>f&&(c===l?v*=Ce:ht.test(t.charAt(c-1))?(v*=xt,N=t.slice(l,c-1).match(ft),N&&l>0&&(v*=Math.pow(ue,N.length))):vt.test(t.charAt(c-1))?(v*=mt,k=t.slice(l,c-1).match(Me),k&&l>0&&(v*=Math.pow(ue,k.length))):(v*=ut,l>0&&(v*=Math.pow(ue,c-l))),t.charAt(c)!==n.charAt(o)&&(v*=pt)),(v<xe&&a.charAt(c-1)===m.charAt(o+1)||m.charAt(o+1)===m.charAt(o)&&a.charAt(c-1)!==m.charAt(o))&&(y=ye(t,n,a,m,c+1,o+2,p),y*xe>v&&(v=y*xe)),v>f&&(f=v),c=a.indexOf(A,c+1);return p[x]=f,f}function Ee(t){return t.toLowerCase().replace(Me," ")}function bt(t,n,a){return t=a&&a.length>0?`${t+" "+a.join(" ")}`:t,ye(t,n,Ee(t),Ee(n),0,0,{})}var ee='[cmdk-group=""]',pe='[cmdk-group-items=""]',At='[cmdk-group-heading=""]',Oe='[cmdk-item=""]',Re=`${Oe}:not([aria-disabled="true"])`,Le="cmdk-item-select",q="data-value",yt=(t,n,a)=>bt(t,n,a),Fe=i.createContext(void 0),ne=()=>i.useContext(Fe),Pe=i.createContext(void 0),je=()=>i.useContext(Pe),_e=i.createContext(void 0),Be=i.forwardRef((t,n)=>{let a=K(()=>{var s,u;return{search:"",value:(u=(s=t.value)!=null?s:t.defaultValue)!=null?u:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),m=K(()=>new Set),l=K(()=>new Map),o=K(()=>new Map),p=K(()=>new Set),x=Ue(t),{label:A,children:c,value:f,onValueChange:v,filter:y,shouldFilter:N,loop:k,disablePointerSelection:J=!1,vimBindings:C=!0,...T}=t,U=H(),de=H(),M=H(),E=i.useRef(null),L=It();G(()=>{if(f!==void 0){let s=f.trim();a.current.value=s,w.emit()}},[f]),G(()=>{L(6,F)},[]);let w=i.useMemo(()=>({subscribe:s=>(p.current.add(s),()=>p.current.delete(s)),snapshot:()=>a.current,setState:(s,u,h)=>{var r,b,d,g;if(!Object.is(a.current[s],u)){if(a.current[s]=u,s==="search")O(),I(),L(1,R);else if(s==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let j=document.getElementById(M);j?j.focus():(r=document.getElementById(U))==null||r.focus()}if(L(7,()=>{var j;a.current.selectedItemId=(j=$())==null?void 0:j.id,w.emit()}),h||L(5,F),((b=x.current)==null?void 0:b.value)!==void 0){let j=u??"";(g=(d=x.current).onValueChange)==null||g.call(d,j);return}}w.emit()}},emit:()=>{p.current.forEach(s=>s())}}),[]),z=i.useMemo(()=>({value:(s,u,h)=>{var r;u!==((r=o.current.get(s))==null?void 0:r.value)&&(o.current.set(s,{value:u,keywords:h}),a.current.filtered.items.set(s,V(u,h)),L(2,()=>{I(),w.emit()}))},item:(s,u)=>(m.current.add(s),u&&(l.current.has(u)?l.current.get(u).add(s):l.current.set(u,new Set([s]))),L(3,()=>{O(),I(),a.current.value||R(),w.emit()}),()=>{o.current.delete(s),m.current.delete(s),a.current.filtered.items.delete(s);let h=$();L(4,()=>{O(),h?.getAttribute("id")===s&&R(),w.emit()})}),group:s=>(l.current.has(s)||l.current.set(s,new Set),()=>{o.current.delete(s),l.current.delete(s)}),filter:()=>x.current.shouldFilter,label:A||t["aria-label"],getDisablePointerSelection:()=>x.current.disablePointerSelection,listId:U,inputId:M,labelId:de,listInnerRef:E}),[]);function V(s,u){var h,r;let b=(r=(h=x.current)==null?void 0:h.filter)!=null?r:yt;return s?b(s,a.current.search,u):0}function I(){if(!a.current.search||x.current.shouldFilter===!1)return;let s=a.current.filtered.items,u=[];a.current.filtered.groups.forEach(r=>{let b=l.current.get(r),d=0;b.forEach(g=>{let j=s.get(g);d=Math.max(j,d)}),u.push([r,d])});let h=E.current;P().sort((r,b)=>{var d,g;let j=r.getAttribute("id"),le=b.getAttribute("id");return((d=s.get(le))!=null?d:0)-((g=s.get(j))!=null?g:0)}).forEach(r=>{let b=r.closest(pe);b?b.appendChild(r.parentElement===b?r:r.closest(`${pe} > *`)):h.appendChild(r.parentElement===h?r:r.closest(`${pe} > *`))}),u.sort((r,b)=>b[1]-r[1]).forEach(r=>{var b;let d=(b=E.current)==null?void 0:b.querySelector(`${ee}[${q}="${encodeURIComponent(r[0])}"]`);d?.parentElement.appendChild(d)})}function R(){let s=P().find(h=>h.getAttribute("aria-disabled")!=="true"),u=s?.getAttribute(q);w.setState("value",u||void 0)}function O(){var s,u,h,r;if(!a.current.search||x.current.shouldFilter===!1){a.current.filtered.count=m.current.size;return}a.current.filtered.groups=new Set;let b=0;for(let d of m.current){let g=(u=(s=o.current.get(d))==null?void 0:s.value)!=null?u:"",j=(r=(h=o.current.get(d))==null?void 0:h.keywords)!=null?r:[],le=V(g,j);a.current.filtered.items.set(d,le),le>0&&b++}for(let[d,g]of l.current)for(let j of g)if(a.current.filtered.items.get(j)>0){a.current.filtered.groups.add(d);break}a.current.filtered.count=b}function F(){var s,u,h;let r=$();r&&(((s=r.parentElement)==null?void 0:s.firstChild)===r&&((h=(u=r.closest(ee))==null?void 0:u.querySelector(At))==null||h.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function $(){var s;return(s=E.current)==null?void 0:s.querySelector(`${Oe}[aria-selected="true"]`)}function P(){var s;return Array.from(((s=E.current)==null?void 0:s.querySelectorAll(Re))||[])}function W(s){let u=P()[s];u&&w.setState("value",u.getAttribute(q))}function X(s){var u;let h=$(),r=P(),b=r.findIndex(g=>g===h),d=r[b+s];(u=x.current)!=null&&u.loop&&(d=b+s<0?r[r.length-1]:b+s===r.length?r[0]:r[b+s]),d&&w.setState("value",d.getAttribute(q))}function Y(s){let u=$(),h=u?.closest(ee),r;for(;h&&!r;)h=s>0?Rt(h,ee):Dt(h,ee),r=h?.querySelector(Re);r?w.setState("value",r.getAttribute(q)):X(s)}let S=()=>W(P().length-1),Z=s=>{s.preventDefault(),s.metaKey?S():s.altKey?Y(1):X(1)},ie=s=>{s.preventDefault(),s.metaKey?W(0):s.altKey?Y(-1):X(-1)};return i.createElement(B.div,{ref:n,tabIndex:-1,...T,"cmdk-root":"",onKeyDown:s=>{var u;(u=T.onKeyDown)==null||u.call(T,s);let h=s.nativeEvent.isComposing||s.keyCode===229;if(!(s.defaultPrevented||h))switch(s.key){case"n":case"j":{C&&s.ctrlKey&&Z(s);break}case"ArrowDown":{Z(s);break}case"p":case"k":{C&&s.ctrlKey&&ie(s);break}case"ArrowUp":{ie(s);break}case"Home":{s.preventDefault(),W(0);break}case"End":{s.preventDefault(),S();break}case"Enter":{s.preventDefault();let r=$();if(r){let b=new Event(Le);r.dispatchEvent(b)}}}}},i.createElement("label",{"cmdk-label":"",htmlFor:z.inputId,id:z.labelId,style:Tt},A),oe(t,s=>i.createElement(Pe.Provider,{value:w},i.createElement(Fe.Provider,{value:z},s))))}),Lt=i.forwardRef((t,n)=>{var a,m;let l=H(),o=i.useRef(null),p=i.useContext(_e),x=ne(),A=Ue(t),c=(m=(a=A.current)==null?void 0:a.forceMount)!=null?m:p?.forceMount;G(()=>{if(!c)return x.item(l,p?.id)},[c]);let f=ze(l,o,[t.value,t.children,o],t.keywords),v=je(),y=_(L=>L.value&&L.value===f.current),N=_(L=>c||x.filter()===!1?!0:L.search?L.filtered.items.get(l)>0:!0);i.useEffect(()=>{let L=o.current;if(!(!L||t.disabled))return L.addEventListener(Le,k),()=>L.removeEventListener(Le,k)},[N,t.onSelect,t.disabled]);function k(){var L,w;J(),(w=(L=A.current).onSelect)==null||w.call(L,f.current)}function J(){v.setState("value",f.current,!0)}if(!N)return null;let{disabled:C,value:T,onSelect:U,forceMount:de,keywords:M,...E}=t;return i.createElement(B.div,{ref:ae(o,n),...E,id:l,"cmdk-item":"",role:"option","aria-disabled":!!C,"aria-selected":!!y,"data-disabled":!!C,"data-selected":!!y,onPointerMove:C||x.getDisablePointerSelection()?void 0:J,onClick:C?void 0:k},t.children)}),jt=i.forwardRef((t,n)=>{let{heading:a,children:m,forceMount:l,...o}=t,p=H(),x=i.useRef(null),A=i.useRef(null),c=H(),f=ne(),v=_(N=>l||f.filter()===!1?!0:N.search?N.filtered.groups.has(p):!0);G(()=>f.group(p),[]),ze(p,x,[t.value,t.heading,A]);let y=i.useMemo(()=>({id:p,forceMount:l}),[l]);return i.createElement(B.div,{ref:ae(x,n),...o,"cmdk-group":"",role:"presentation",hidden:v?void 0:!0},a&&i.createElement("div",{ref:A,"cmdk-group-heading":"","aria-hidden":!0,id:c},a),oe(t,N=>i.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?c:void 0},i.createElement(_e.Provider,{value:y},N))))}),wt=i.forwardRef((t,n)=>{let{alwaysRender:a,...m}=t,l=i.useRef(null),o=_(p=>!p.search);return!a&&!o?null:i.createElement(B.div,{ref:ae(l,n),...m,"cmdk-separator":"",role:"separator"})}),Nt=i.forwardRef((t,n)=>{let{onValueChange:a,...m}=t,l=t.value!=null,o=je(),p=_(c=>c.search),x=_(c=>c.selectedItemId),A=ne();return i.useEffect(()=>{t.value!=null&&o.setState("search",t.value)},[t.value]),i.createElement(B.input,{ref:n,...m,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":A.listId,"aria-labelledby":A.labelId,"aria-activedescendant":x,id:A.inputId,type:"text",value:l?t.value:p,onChange:c=>{l||o.setState("search",c.target.value),a?.(c.target.value)}})}),St=i.forwardRef((t,n)=>{let{children:a,label:m="Suggestions",...l}=t,o=i.useRef(null),p=i.useRef(null),x=_(c=>c.selectedItemId),A=ne();return i.useEffect(()=>{if(p.current&&o.current){let c=p.current,f=o.current,v,y=new ResizeObserver(()=>{v=requestAnimationFrame(()=>{let N=c.offsetHeight;f.style.setProperty("--cmdk-list-height",N.toFixed(1)+"px")})});return y.observe(c),()=>{cancelAnimationFrame(v),y.unobserve(c)}}},[]),i.createElement(B.div,{ref:ae(o,n),...l,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":x,"aria-label":m,id:A.listId},oe(t,c=>i.createElement("div",{ref:ae(p,A.listInnerRef),"cmdk-list-sizer":""},c)))}),kt=i.forwardRef((t,n)=>{let{open:a,onOpenChange:m,overlayClassName:l,contentClassName:o,container:p,...x}=t;return i.createElement(qe,{open:a,onOpenChange:m},i.createElement(Ke,{container:p},i.createElement(He,{"cmdk-overlay":"",className:l}),i.createElement(Qe,{"aria-label":t.label,"cmdk-dialog":"",className:o},i.createElement(Be,{ref:n,...x}))))}),Ct=i.forwardRef((t,n)=>_(a=>a.filtered.count===0)?i.createElement(B.div,{ref:n,...t,"cmdk-empty":"",role:"presentation"}):null),Et=i.forwardRef((t,n)=>{let{progress:a,children:m,label:l="Loading...",...o}=t;return i.createElement(B.div,{ref:n,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":l},oe(t,p=>i.createElement("div",{"aria-hidden":!0},p)))}),Q=Object.assign(Be,{List:St,Item:Lt,Input:Nt,Group:jt,Separator:wt,Dialog:kt,Empty:Ct,Loading:Et});function Rt(t,n){let a=t.nextElementSibling;for(;a;){if(a.matches(n))return a;a=a.nextElementSibling}}function Dt(t,n){let a=t.previousElementSibling;for(;a;){if(a.matches(n))return a;a=a.previousElementSibling}}function Ue(t){let n=i.useRef(t);return G(()=>{n.current=t}),n}var G=typeof window>"u"?i.useEffect:i.useLayoutEffect;function K(t){let n=i.useRef();return n.current===void 0&&(n.current=t()),n}function _(t){let n=je(),a=()=>t(n.snapshot());return i.useSyncExternalStore(n.subscribe,a,a)}function ze(t,n,a,m=[]){let l=i.useRef(),o=ne();return G(()=>{var p;let x=(()=>{var c;for(let f of a){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(c=f.current.textContent)==null?void 0:c.trim():l.current}})(),A=m.map(c=>c.trim());o.value(t,x,A),(p=n.current)==null||p.setAttribute(q,x),l.current=x}),l}var It=()=>{let[t,n]=i.useState(),a=K(()=>new Map);return G(()=>{a.current.forEach(m=>m()),a.current=new Map},[t]),(m,l)=>{a.current.set(m,l),n({})}};function $t(t){let n=t.type;return typeof n=="function"?n(t.props):"render"in n?n.render(t.props):t}function oe({asChild:t,children:n},a){return t&&i.isValidElement(n)?i.cloneElement($t(n),{ref:n.ref},a(n.props.children)):a(n)}var Tt={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Mt({className:t,...n}){return e.jsx(Q,{"data-loc":"client/src/components/ui/command.tsx:21","data-slot":"command",className:se("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...n})}function Ot({className:t,...n}){return e.jsxs("div",{"data-loc":"client/src/components/ui/command.tsx:68","data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[e.jsx(De,{"data-loc":"client/src/components/ui/command.tsx:72",className:"size-4 shrink-0 opacity-50"}),e.jsx(Q.Input,{"data-loc":"client/src/components/ui/command.tsx:73","data-slot":"command-input",className:se("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),...n})]})}function Ft({className:t,...n}){return e.jsx(Q.List,{"data-loc":"client/src/components/ui/command.tsx:90","data-slot":"command-list",className:se("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...n})}function ge({...t}){return e.jsx(Q.Empty,{"data-loc":"client/src/components/ui/command.tsx:105","data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function Pt({className:t,...n}){return e.jsx(Q.Group,{"data-loc":"client/src/components/ui/command.tsx:118","data-slot":"command-group",className:se("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...n})}function _t({className:t,...n}){return e.jsx(Q.Item,{"data-loc":"client/src/components/ui/command.tsx:147","data-slot":"command-item",className:se("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...n})}const Bt={chapter7:"Chapter 7",chapter11:"Chapter 11",chapter12:"Chapter 12",chapter13:"Chapter 13",debtRelief:"Debt Relief",foreclosureDefense:"Foreclosure Defense",other:"Other"},Ut={under10k:"< $10k","10k_25k":"$10k–$25k","25k_50k":"$25k–$50k","50k_100k":"$50k–$100k",over100k:"> $100k"},zt={new:"bg-amber-100 text-amber-700 border border-amber-200",viewed:"bg-blue-100 text-blue-700 border border-blue-200",contacted:"bg-indigo-100 text-indigo-700 border border-indigo-200",converted:"bg-emerald-100 text-emerald-700 border border-emerald-200",invali
6d:"bg-red-100 text-red-700 border border-red-200"};function Gt(t,n){if(!t.length)return;const a=Object.keys(t[0]),m=[a.join(","),...t.map(o=>a.map(p=>JSON.stringify(o[p]??"")).join(","))].join(`
7`),l=document.createElement("a");l.href=URL.createObjectURL(new Blob([m],{type:"text/csv"})),l.download=n,l.click()}function Vt({summary:t,isSelected:n,onClick:a}){const m=t.total>0?Math.round(t.unclaimed/t.total*100):0;return e.jsxs("button",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:107",onClick:a,className:`w-full text-left p-3 rounded-lg border transition-all ${n?"border-amber-400 bg-amber-50 ring-1 ring-amber-200":"border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm"}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:115",className:"flex items-center justify-between mb-1.5",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:116",className:"text-sm font-bold text-gray-900",children:t.state||"Unknown"}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:117",className:"text-xs font-semibold text-gray-500",children:t.total})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:119",className:"flex gap-3 text-[11px]",children:[e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:120",className:"flex items-center gap-1 text-yellow-700",children:[e.jsx(Ie,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:121",className:"w-3 h-3"})," ",t.unclaimed," unclaimed"]}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:123",className:"flex items-center gap-1 text-emerald-700",children:[e.jsx(Te,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:124",className:"w-3 h-3"})," ",t.delivered," assigned"]})]}),t.unclaimed>0&&e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:128",className:"mt-2 h-1.5 bg-gray-100 rounded-full overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:129",className:"h-full bg-yellow-400 rounded-full",style:{width:`${m}%`}})})]})}function qt({lead:t,isSelected:n,onToggle:a}){const m=t.routingTier==="unverified_notify"&&!t.attorneyId,l=!!t.attorneyId;return e.jsxs("tr",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:149",className:`border-b border-gray-50 hover:bg-gray-50/50 transition-colors ${n?"bg-amber-50/40":""}`,children:[e.jsx("td",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:150",className:"px-3 py-3 w-10",children:e.jsx($e,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:151",checked:n,onCheckedChange:()=>a(t.id),className:"border-gray-300"})}),e.jsxs("td",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:157",className:"px-4 py-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:158",className:"font-semibold text-gray-900 text-sm",children:[t.firstName," ",t.lastName]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:159",className:"text-xs text-gray-400",children:t.email}),t.phone&&e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:160",className:"text-xs text-gray-400",children:t.phone})]}),e.jsxs("td",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:162",className:"px-4 py-3",children:[e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:163",className:"text-xs font-medium text-gray-800",children:Bt[t.caseType??""]??t.caseType}),t.debtAmount&&e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:164",className:"text-xs text-gray-400",children:Ut[t.debtAmount]??t.debtAmount})]}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:166",className:"px-4 py-3",children:e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:167",className:"text-xs text-gray-500",children:[t.city,t.state].filter(Boolean).join(", ")||"—"})}),e.jsxs("td",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:171",className:"px-4 py-3",children:[e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:172",className:"text-xs text-gray-500",children:new Date(t.createdAt).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:175",className:"text-[10px] text-gray-400",children:new Date(t.createdAt).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})})]}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:179",className:"px-4 py-3",children:m?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:181",children:[e.jsx(ce,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:182",variant:"outline",className:"text-[10px] font-semibold bg-yellow-50 text-yellow-700 border-yellow-200",children:"Unclaimed"}),t.notificationsSent!==null&&t.notificationsSent>0&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:186",className:"flex items-center gap-1 mt-1 text-[10px] text-yellow-600",children:[e.jsx(ot,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:187",className:"w-3 h-3"}),t.notificationsSent," notification",t.notificationsSent!==1?"s":""," sent"]}),t.notificationTracking==="unavailable"&&e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:192",className:"text-[10px] text-gray-400 mt-1 italic",children:"Historical sends not individually tracked"}),t.notificationTracking!=="unavailable"&&(t.notificationsSent===null||t.notificationsSent===0)&&e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:195",className:"text-[10px] text-gray-400 mt-1 italic",children:"No notifications sent"})]}):l?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:199",children:[e.jsx(ce,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:200",variant:"outline",className:"text-[10px] font-semibold bg-blue-50 text-blue-700 border-blue-200",children:"Assigned"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:203",className:"mt-1",children:[t.firmName?e.jsxs("a",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:205",href:`https://bankruptcylawyersin.
7com/attorney/${t.attorneySlug}`,target:"_blank",rel:"noopener noreferrer",className:"text-[11px] text-amber-600 hover:underline flex items-center gap-0.5",children:[t.firmName," ",e.jsx(nt,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:211",className:"w-2.5 h-2.5"})]}):e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:214",className:"text-[11px] text-gray-500",children:["Attorney #",t.attorneyId]}),t.deliveryGroupCount&&t.deliveryGroupCount>1&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:217",className:"text-[10px] text-gray-400 mt-0.5",children:["Routed to ",t.deliveryGroupCount," attorney",t.deliveryGroupCount>1?"s":""," total"]})]}),t.deliveryEvidence==="confirmed_delivered"?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:223",className:"flex items-center gap-1 mt-1 text-[10px] text-emerald-700",children:[e.jsx(dt,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:224",className:"w-3 h-3"})," SMTP2GO delivery confirmed"]}):t.deliveryEvidence==="accepted_pending"?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:227",className:"flex items-center gap-1 mt-1 text-[10px] text-blue-700",children:[e.jsx(it,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:228",className:"w-3 h-3"})," SMTP2GO accepted; awaiting delivery event"]}):e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:231",className:"mt-1 text-[10px] text-gray-400 italic",children:"No individual email evidence retained"}),t.isExclusive&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:234",className:"flex items-center gap-1 mt-0.5 text-[10px] text-purple-600",children:[e.jsx(lt,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:235",className:"w-2.5 h-2.5"})," Exclusive"]})]}):e.jsx(ce,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:240",variant:"outline",className:"text-[10px] font-semibold bg-gray-50 text-gray-500 border-gray-200",children:t.routingTier?.replace(/_/g," ")??"Unknown"})}),e.jsx("td",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:245",className:"px-4 py-3",children:e.jsx("span",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:246",className:`inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-semibold ${zt[t.status]??"bg-gray-100 text-gray-600"}`,children:t.status})})]})}function Kt({open:t,onClose:n,onSelect:a}){const[m,l]=i.useState(""),{data:o,isLoading:p}=te.leads.adminSearchAttorneys.useQuery({query:m,limit:15},{enabled:m.length>=2});return e.jsx(he,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:267",open:t,onOpenChange:x=>{x||n()},children:e.jsxs(fe,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:268",className:"sm:max-w-md",children:[e.jsxs(ve,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:269",children:[e.jsx(be,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:270",children:"Select Attorney"}),e.jsx(Ae,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:271",children:"Search for an attorney to re-route the selected leads to."})]}),e.jsxs(Mt,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:273",className:"border rounded-lg",shouldFilter:!1,children:[e.jsx(Ot,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:274",placeholder:"Search by name, firm, or slug...",value:m,onValueChange:l}),e.jsxs(Ft,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:279",className:"max-h-[300px]",children:[m.length<2&&e.jsx(ge,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:281",children:"Type at least 2 characters to search..."}),m.length>=2&&p&&e.jsx(ge,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:284",children:"Searching..."}),m.length>=2&&!p&&(!o||o.length===0)&&e.jsx(ge,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:287",children:"No attorneys found."}),o&&o.length>0&&e.jsx(Pt,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:290",heading:"Results",children:o.map(x=>e.jsx(_t,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:292",value:String(x.id),onSelect:()=>{a(x),n(),l("")},className:"cursor-pointer",children:e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:298",className:"flex flex-col",children:[e.jsx("span",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:299",className:"font-medium text-sm",children:x.firmName}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:300",className:"text-xs text-gray-500",children:[x.attorneyName?`${x.attorneyName} · `:"",x.city??"",x.city&&x.stateAbbreviation?", ":"",x.stateAbbreviation??""]})]})},x.id))})]})]})]})})}function ia(){const[t,n]=i.useState("all"),[a,m]=i.useState(""),[l,o]=i.useState(""),[p,x]=i.useState(""),[A,c]=i.useState(0),f=50,[v,y]=i.useState(new Set),[N,k]=i.useState(!1),[J,C]=i.useState(!1),[T,U]=i.useState(null),[de,M]=i.useState(!1);te.useUtils();const{data:E,isLoading:L,refetch:w}=te.leads.adminLeadsOverview.useQuery({stateFilter:a||void 0,statusFilter:t,dateFrom:l||void 0,dateTo:p||void 0,limit:f,offset:A*f}),z=te.leads.adminBulkDeleteLeads.useMutation({onSuccess:d=>{re.success(`Deleted ${d.deletedCount} lead${d.deletedCount!==1?"s":""}`),y(new Set),k(!1),w()},onError:d=>re.error(`Delete failed: ${d.message}`)}),V=te.leads.adminBulkRerouteLeads.useMutation({onSuccess:d=>{re.success(`Re-routed ${d.reroutedCount} lead${d.reroutedCount!==1?"s":""} to ${d.attorneyName}`),y(new Set),M(!1),U(null),w()},onError:d=>re.error(`Re-route failed: ${d.message}`)}),I=E?.stateSummary??[],R=E?.leads??[],O=E?.total??0,F=I.reduce((d,g)=>d+g.total,0),$=I.reduce((d,g)=>d+g.unclaimed,0),P=I.reduce((d,g)=>d+g.delivered,0),W=i.useCallback(d=>{y(g=>{const j=new Set(g);
7return j.has(d)?j.delete(d):j.add(d),j})},[]),X=i.useCallback(()=>{y(new Set(R.map(d=>d.id)))},[R]),Y=i.useCallback(()=>{y(new Set)},[]),S=v.size,Z=R.length>0&&R.every(d=>v.has(d.id)),ie=()=>{Z?Y():X()},s=d=>{a===d?m(""):(m(d),c(0)),y(new Set)},u=()=>{const d=R.map(g=>({id:g.id,name:`${g.firstName} ${g.lastName}`,email:g.email,phone:g.phone??"",caseType:g.caseType,debtAmount:g.debtAmount??"",city:g.city??"",state:g.state??"",status:g.status,routingStatus:g.routingTier==="unverified_notify"&&!g.attorneyId?"unclaimed":"assigned",assignedTo:g.firmName??"",emailEvidence:g.deliveryEvidence??"not_applicable",notificationsSent:g.notificationsSent??0,deliveryGroupCount:g.deliveryGroupCount??0,createdAt:new Date(g.createdAt).toISOString()}));Gt(d,"leads-overview.csv")},h=d=>{U(d),C(!1),M(!0)},r=()=>{T&&V.mutate({leadIds:Array.from(v),attorneyId:T.id})},b=()=>{z.mutate({leadIds:Array.from(v)})};return e.jsxs(Ge,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:448",title:"Leads Overview",breadcrumb:"Admin / Leads",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:449",className:"space-y-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:451",className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:452",className:"bg-white border border-gray-200 rounded-xl p-4",children:[e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:453",className:"text-xs font-semibold text-gray-400 uppercase tracking-wide mb-1",children:"Total Leads"}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:454",className:"text-2xl font-bold text-gray-900",children:F})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:456",className:"bg-white border border-yellow-200 rounded-xl p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:457",className:"text-xs font-semibold text-yellow-600 uppercase tracking-wide mb-1 flex items-center gap-1",children:[e.jsx(Ie,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:458",className:"w-3 h-3"})," Unclaimed"]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:460",className:"text-2xl font-bold text-yellow-700",children:$}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:461",className:"text-[11px] text-gray-400 mt-0.5",children:[F>0?Math.round($/F*100):0,"% of total"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:465",className:"bg-white border border-emerald-200 rounded-xl p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:466",className:"text-xs font-semibold text-emerald-600 uppercase tracking-wide mb-1 flex items-center gap-1",children:[e.jsx(Te,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:467",className:"w-3 h-3"})," Assigned"]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:469",className:"text-2xl font-bold text-emerald-700",children:P}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:470",className:"text-[11px] text-gray-400 mt-0.5",children:[F>0?Math.round(P/F*100):0,"% of total"]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:477",className:"bg-white border border-gray-200 rounded-xl p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:478",className:"flex flex-col sm:flex-row sm:items-center gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:480",className:"flex items-center gap-2",children:[e.jsx(rt,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:481",className:"w-4 h-4 text-gray-400"}),e.jsxs(Je,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:482",value:t,onValueChange:d=>{n(d),c(0),y(new Set)},children:[e.jsx(We,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:483",className:"w-[160px] text-sm bg-white",children:e.jsx(Xe,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:484",placeholder:"Status"})}),e.jsxs(Ye,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:486",children:[e.jsx(me,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:487",value:"all",children:"All Leads"}),e.jsx(me,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:488",value:"unclaimed",children:"Unclaimed Only"}),e.jsx(me,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:489",value:"delivered",children:"Assigned Only"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:495",className:"flex items-center gap-2",children:[e.jsx(Ze,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:496",className:"w-4 h-4 text-gray-400"}),e.jsx(we,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:497",type:"date",value:l,onCh
7ange:d=>{o(d.target.value),c(0),y(new Set)},className:"w-[140px] text-xs bg-white",placeholder:"From"}),e.jsx("span",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:504",className:"text-xs text-gray-400",children:"to"}),e.jsx(we,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:505",type:"date",value:p,onChange:d=>{x(d.target.value),c(0),y(new Set)},className:"w-[140px] text-xs bg-white",placeholder:"To"})]}),a&&e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:516",className:"flex items-center gap-1.5",children:e.jsxs(ce,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:517",variant:"outline",className:"text-xs bg-amber-50 text-amber-700 border-amber-200 gap-1",children:[e.jsx(et,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:518",className:"w-3 h-3"})," ",a,e.jsx("button",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:519",onClick:()=>{m(""),c(0),y(new Set)},className:"ml-1 hover:text-red-600",children:e.jsx(tt,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:520",className:"w-3 h-3"})})]})}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:526",className:"flex-1"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:529",className:"flex gap-2",children:[e.jsxs(D,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:530",variant:"outline",size:"sm",className:"gap-2 text-xs bg-white",onClick:u,children:[e.jsx(ct,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:531",className:"w-3.5 h-3.5"})," Export"]}),e.jsxs(D,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:533",variant:"outline",size:"sm",className:"gap-2 text-xs bg-white",onClick:()=>w(),children:[e.jsx(at,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:534",className:"w-3.5 h-3.5"})," Refresh"]})]})]})}),S>0&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:542",className:"bg-amber-50 border border-amber-200 rounded-xl p-3 flex items-center gap-3 shadow-sm animate-in slide-in-from-top-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:543",className:"flex items-center gap-2",children:[e.jsx(st,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:544",className:"w-4 h-4 text-amber-600"}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:545",className:"text-sm font-semibold text-amber-800",children:[S," lead",S!==1?"s":""," selected"]})]}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:547",className:"flex-1"}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:548",className:"flex gap-2",children:[e.jsxs(D,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:549",variant:"outline",size:"sm",className:"gap-1.5 text-xs bg-white border-amber-300 text-amber-700 hover:bg-amber-100",onClick:()=>C(!0),children:[e.jsx(Se,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:555",className:"w-3.5 h-3.5"})," Re-route to Attorney"]}),e.jsxs(D,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:557",variant:"outline",size:"sm",className:"gap-1.5 text-xs bg-white border-red-300 text-red-600 hover:bg-red-50",onClick:()=>k(!0),children:[e.jsx(ke,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:563",className:"w-3.5 h-3.5"})," Delete"]}),e.jsx(D,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:565",variant:"ghost",size:"sm",className:"text-xs text-gray-500",onClick:Y,children:"Clear"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:578",className:"grid grid-cols-1 lg:grid-cols-4 gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:580",className:"lg:col-span-1",children:e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:581",className:"bg-white border border-gray-200 rounded-xl p-3 space-y-2 max-h-[600px] overflow-y-auto",children:[e.jsxs("h3",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:582",className:"text-xs font-bold text-gray-500 uppercase tracking-wide px-1 mb-2",children:["By State (",I.length,")"]}),I.map(d=>e.jsx(Vt,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:586",summary:d,isSelected:a===d.state,onClick:()=>s(d.state)},d.state)),I.length===0&&!L&&e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:594",className:"text-xs text-gray-400 text-center py-4",children:"No leads found"})]})}),e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:600",className:"lg:col-span-3",children:e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:601",className:"bg-white border border-gray-200 rounded-xl overflow-hidden shadow-sm",children:[L?e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:603",className:"flex items-center justify-center h-40 text-gray-400 text-sm",children:"Loading leads..."}):R.length===0?e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:605",className:"flex flex-col items-center justify-center h-40 text-gray-400 text-sm gap-2",children:[e.jsx(De,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:606",className:"w-8 h-8 text-gray-200"}),"No leads found for the selected filters"]}):e.jsx("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:610",className:"overflow-x-auto",children:e.jsxs("table",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:611",className:"w-full text-sm",children:[e.jsx("thead",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:612",children:e.jsxs("tr",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:613",className:"border-b border-gray-100 bg-gray-50",children:[e.jsx("th",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:614",className:"px-3 py-3 w-10",children:e.jsx($e,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:615",checked:Z,onCheckedChange:ie,className:"border-gray-300"})}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:621",className:"text-left px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Lead"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:622",className:"text-left px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Case"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:623",className:"text-left px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Location"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:624",className:"text-left px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Date"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:625",className:"text-left px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Routing"}),e.jsx("th",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:626",className:"text-left px-4 py-3 text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Status"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:629",children:R.map(d=>e.jsx(qt,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:631",lead:d,isSelected:v.has(d.id),onToggle:W},d.id))})]})}),O>f&&e.jsxs("div",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:645",className:"flex items-center justify-between px-4 py-3 border-t border-gray-100",children:[e.jsx(D,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:646",variant:"outline",size:"sm",onClick:()=>{c(d=>Math.max(0,d-1)),y(new Set)},disabled:A===0,className:"text-xs bg-white",children:"Previous"}),e.jsxs("span",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:649",className:"text-xs text-gray-500",children:["Page ",A+1," of ",Math.
7ceil(O/f)," (",O," total)"]}),e.jsx(D,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:652",variant:"outline",size:"sm",onClick:()=>{c(d=>d+1),y(new Set)},disabled:(A+1)*f>=O,className:"text-xs bg-white",children:"Next"})]})]})})]})]}),e.jsx(he,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:663",open:N,onOpenChange:k,children:e.jsxs(fe,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:664",className:"sm:max-w-md",children:[e.jsxs(ve,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:665",children:[e.jsxs(be,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:666",className:"flex items-center gap-2 text-red-600",children:[e.jsx(ke,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:667",className:"w-5 h-5"})," Delete ",S," Lead",S!==1?"s":""]}),e.jsxs(Ae,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:669",children:["This action cannot be undone. The selected lead",S!==1?"s":""," will be permanently removed from the database."]})]}),e.jsxs(Ne,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:673",className:"gap-2",children:[e.jsx(D,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:674",variant:"outline",onClick:()=>k(!1),className:"bg-white",children:"Cancel"}),e.jsx(D,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:677",variant:"destructive",onClick:b,disabled:z.isPending,children:z.isPending?"Deleting...":`Delete ${S} Lead${S!==1?"s":""}`})]})]})}),e.jsx(Kt,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:689",open:J,onClose:()=>C(!1),onSelect:h}),e.jsx(he,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:696",open:de,onOpenChange:M,children:e.jsxs(fe,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:697",className:"sm:max-w-md",children:[e.jsxs(ve,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:698",children:[e.jsxs(be,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:699",className:"flex items-center gap-2 text-amber-700",children:[e.jsx(Se,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:700",className:"w-5 h-5"})," Confirm Re-route"]}),e.jsxs(Ae,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:702",children:["Re-route ",S," lead",S!==1?"s":""," to ",e.jsx("span",{"data-loc":"client/src/pages/admin/AdminLeads.tsx:703",className:"font-semibold text-gray-900",children:T?.firmName}),"? The leads will be marked as assigned (non-exclusive) to this attorney. SMTP2GO delivery evidence appears only after provider acceptance and webhook processing."]})]}),e.jsxs(Ne,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:707",className:"gap-2",children:[e.jsx(D,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:708",variant:"outline",onClick:()=>{M(!1),U(null)},className:"bg-white",children:"Cancel"}),e.jsx(D,{"data-loc":"client/src/pages/admin/AdminLeads.tsx:711",onClick:r,disabled:V.isPending,className:"bg-amber-600 hover:bg-amber-700 text-white",children:V.isPending?"Re-routing...":`Re-route ${S} Lead${S!==1?"s":""}`})]})]})})]})}export{ia 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.