1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8506],{8506:function(e,l,a){a.d(l,{Y:function(){return x},G:function(){return m}});var t=a(7437),s=a(2265),n=a(994),i=a(4801),r=a(2780);function o(e){let{token:l,dealId:a,channel:t,action:s}=e;if(l&&a&&["phone","email"].includes(t)&&["tap","copy"].includes(s))try{fetch("/api/activity",{method:"POST",keepalive:!0,headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(l)},body:JSON.stringify({type:"provider_contact",dealId:a,channel:t,action:s})}).catch(()=>{})}catch(e){}}function c(e){let{icon:l,label:a,width:s}=e;return(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(l,{className:"h-4 w-4 flex-shrink-0 text-plat-mute/50"}),(0,t.jsx)("span",{className:"w-20 flex-shrink-0 text-xs font-medium text-plat-mute",children:a}),(0,t.jsx)("span",{className:"h-3.5 rounded-full bg-plat-chip",style:{width:s},"aria-hidden":"true"})]})}function d(e){let{value:l,label:a,onCopied:n}=e,[i,o]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{if(!i)return;let e=setTimeout(()=>o(!1),1600);return()=>clearTimeout(e)},[i]),(0,t.jsx)("button",{type:"button",onClick:()=>{var e;
1null===(e=navigator.clipboard)||void 0===e||e.writeText(l).then(()=>{o(!0),null==n||n()}).catch(()=>{})},"aria-label":"Copy ".concat(a),className:"rounded-md p-1.5 text-plat-mute transition-colors hover:bg-plat-chip hover:text-plat-body",children:i?(0,t.jsx)(r.Jr,{className:"h-3.5 w-3.5 text-emerald-500"}):(0,t.jsx)(r.CK,{className:"h-3.5 w-3.5"})})}function h(e){let{icon:l,label:a,value:s,href:n,copyable:i,onUse:r}=e;return s?(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(l,{className:"h-4 w-4 flex-shrink-0 text-plat-mute"}),(0,t.jsx)("span",{className:"w-20 flex-shrink-0 text-xs font-medium text-plat-mute",children:a}),n?(0,t.jsx)("a",{href:n,onClick:()=>null==r?void 0:r("tap"),className:"min-w-0 flex-1 truncate text-sm font-semibold text-find hover:text-find-dk hover:underline",children:s}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold text-plat-ink",children:s}),i&&(0,t.jsx)(d,{value:s,label:a,onCopied:()=>null==r?void 0:r("copy")})]}):null}function m(e){let{dealId:l,plan:a,planLoading:d}=e,{session:m,isAuthenticated:p}=(0,n.a)(),u=(null==m?void 0:m.accessToken)||null,[f,j]=(0,s.useState)({loading:!0,wholesaler:null});if((0,s.useEffect)(()=>{if(!l||"pro"!==a||!u){j({loading:!1,wholesaler:null});return}let e=new AbortController;return j({loading:!0,wholesaler:null}),fetch("/api/deals/".concat(encodeURIComponent(l),"/wholesaler"),{headers:{Authorization:"Bearer ".concat(u),Accept:"application/json"},cache:"no-store",signal:e.signal}).then(e=>e.json()).then(e=>j({loading:!1,wholesaler:(null==e?void 0:e.wholesaler)||null})).catch(e=>{(null==e?void 0:e.name)!=="AbortError"&&j({loading:!1,wholesaler:null})}),()=>e.abort()},[l,a,u]),"pro"===a){var b;let e=f.wholesaler,a=null==e?void 0:null===(b=e.wholesaler_phone)||void 0===b?void 0:b.replace(/[^0-9+]/g,"");return(0,t.jsxs)(i.Zb,{className:"overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-plat-line bg-emerald-50/70 px-5 py-3.5 sm:px-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.fU,{className:"h-4 w-4 text-emerald-600"}),(0,t.jsx)("h3",{className:"text-[15px] font-extrabold tracking-[-0.01em] text-plat-ink",children:"Wholesaler Contact"})]}),(0,t.jsx)(i.Ct,{className:"bg-emerald-100 text-emerald-700",children:"Pro"})]}),(0,t.jsx)("div",{className:"p-5 sm:p-6",children:f.loading?(0,t.jsx)("div",{className:"space-y-3",children:[0,1,2].map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"h-4 w-4 animate-pulse rounded bg-plat-chip"}),(0,t.jsx)("div",{className:"h-3.5 w-20 animate-pulse rounded bg-plat-chip"}),(0,t.jsx)("div",{className:"h-3.5 flex-1 animate-pulse rounded bg-plat-chip"})]},e))}):e&&(e.wholesaler_name||e.wholesaler_phone||e.wholesaler_email||e.wholesaler_company)?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"rounded-xl border border-emerald-200 bg-emerald-50 px-3.5 py-2.5 text-xs leading-relaxed text-emerald-900",children:"Reach out whenever you like â tap the phone or email below. Say you found the deal on JDL Deals."}),(0,t.jsx)(h,{icon:r.n5,label:"Name",value:e.wholesaler_name}),(0,t.jsx)(h,{icon:r.vY,label:"Company",value:e.wholesaler_company}),(0,t.jsx)(h,{icon:r.LP,label:"Phone",value:e.wholesaler_phone,href:a?"tel:".concat(a):void 0,copyable:!0,onUse:e=>o({token:u,dealId:l,channel:"phone",action:e})}),(0,t.jsx)(h,{icon:r.Mh,label:"Email",value:e.wholesaler_email,href:e.wholesaler_email?"mailto:".concat(e.wholesaler_email):void 0,copyable:!0,onUse:e=>o({token:u,dealId:l,channel:"email",action:e})})]}):(0,t.jsx)("p",{className:"text-sm text-plat-mute",children:"This listing didn't come with contact details. Our team reaches this seller through the source listing â message us and we will chase it for you."})})]})}return(0,t.jsxs)(i.Zb,{className:"overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-plat-line bg-plat-alt px-5 py-3.5 sm:px-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.HE,{className:"h-4 w-4 text-plat-mute"}),(0,t.jsx)("h3",{className:"text-[15px] font-extrabold tracking-[-0.01em] text-plat-ink",children:"Wholesaler Contact"})]}),(0,t.jsx)(i.Ct,{className:"bg-plat-chip text-plat-body",children:"Locked"})]}),(0,t.jsxs)("div",{className:"relative p-5 sm:p-6",children:[(0,t.jsx)("p",{className:"mb-4 rounded-xl border border-plat-line bg-plat-alt px-3.5 py-2.5 text-xs leading-relaxed text-plat-body",children:"Pro unlocks the wholesaler's company, name, direct phone and email on this deal and every other one â so you can call the seller yourself, today, without waiting on anyone."}),(0,t.jsxs)("div",{className:"space-y-3","aria-hidden":"true",children:[(0,t.jsx)(c,{icon:r.vY,label:"Company",width:"50%"}),(0,t.jsx)(c,{icon:r.n5,label:"Name",width:"42%"}),(0,t.jsx)(c,{icon:r.LP,label:"Phone",width:"35%"}),(0,t.jsx)(c,{icon:r.Mh,label:"Email",width:"64%"})]}),(0,t.jsxs)("div",{className:"mt-5 rounded-plat border border-find/25 bg-find-tint p-4 sm:p-5",children:[(0,t.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,t.jsx)(r.P$,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-find"}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-sm font-extrabold tracking-[-0.01em] text-plat-ink",children:"Contact this seller directly with JDL Deals Pro"}),(0,t.jsxs)("p",{className:"mt-1 text-xs leading-relaxed text-plat-body",children:["Unlock the wholesaler's name, direct phone and email on ",(0,t.jsx)("strong",{children:"every"})," deal in the marketplace â skip the wait and negotiate direct."]})]})]}),(0,t.jsx)("ul",{className:"mt-3 space-y-1.5",children:["Direct contact on every listing","Unlimited deal underwriting","Introductions from the JDL team, still included"].map(e=>(0,t.jsxs)("li",{className:"flex items-start gap-2 text-xs text-plat-body",children:[(0,t.jsx)(r.fU,{className:"mt-0.5 h-3.5 w-3.5 flex-shrink-0 text-find"}),e]},e))}),(0,t.jsx)(x,{isAuthenticated:p}),(0,t.jsx)("p",{className:"mt-2 text-center text-[11px] text-plat-mute",children:"Monthly or annual \xb7 cancel anytime"})]})]})]})}function x(e){let{isAuthenticated:l,className:a=""}=e;return(0,t.jsxs)(i.zx,{as:"a",href:l?"/upgrade":"/signup?next=%2Fupgrade",className:"mt-4 flex w-full items-center justify-center gap-1.5 ".concat(a),children:[l?"See plans & upgrade":"Sign up to unlock"," ",(0,t.jsx)(r.ol,{className:"h-4 w-4"})]})}}}]);
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.