1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},i=(new e.Error).stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="699d58d4-7cd5-486d-ad32-fa43266957d6",e._sentryDebugIdIdentifier="sentry-dbid-699d58d4-7cd5-486d-ad32-fa43266957d6")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6480],{31422:function(e,i,t){t.d(i,{Z:function(){return K}});var r=t(85893),n=t(67294),o=t(6459),l=t(5490),s=t(34614),a=t(26840),d=t(57391),c=t(8186),u=t(90092),x=t(21360),p=t(70010),f=t(68029),h=t(73636),g=t(54506),b=t(30980),y=t(74032),j=t(62893),m=t(54795),v=t(12553),S=t(73244),w=t(64831),C=t(45443),z=t(38491),I=t(45007),_=t(65631),B=t(25593),T=t(2248);let E=e=>(0,T.X8)("get","".concat(T.Ne,"/core/bid-intake-fields/profession/").concat(e));var P=t(82206),W=t(42845),k=t(33316),O=t(18118),R=t(86058),F=e=>{let{fields:i,values:t,errors:n,onChange:o,title:l="A Few More Details"}=e;if(!i||0===i.length)return null;let s=[...i].sort((e,i)=>e.displayOrder-i.displayOrder);return(0,r.jsxs)(c.g,{align:"stretch",spacing:4,children:[(0,r.jsx)(u.x,{fontSize:"14px",fontWeight:"600",children:l}),s.map(e=>{var i,l;let s=t[e.fieldKey],a=null==n?void 0:n[e.fieldKey];return(0,r.jsxs)(g.NI,{isInvalid:!!a,children:[(0,r.jsxs)(b.l,{fontSize:"14px",fontWeight:"500",children:[e.label," ",!e.required&&(0,r.jsx)(u.x,{as:"span",color:"gray.400",fontSize:"xs",children:"(Optional)"})]}),"text"===e.fieldType&&(0,r.jsx)(P.I,{value:null!=s?s:"",onChange:i=>o(e.fieldKey,i.target.value),placeholder:"Enter ".concat(e.label.toLowerCase()),fontSize:"14px"}),"single_select"===e.fieldType&&(0,r.jsx)(W.P,{value:null!=s?s:"",onChange:i=>o(e.fieldKey,i.target.value),placeholder:"Select ".concat(e.label.toLowerCase()),fontSize:"14px",children:null===(i=e.options)||void 0===i?void 0:i.map(e=>(0,r.jsx)("option",{value:e,children:e},e))}),"multi_select"===e.fieldType&&(0,r.jsx)(k.c,{value:s||[],onChange:i=>o(e.fieldKey,i),children:(0,r.jsx)(O.E,{bg:"gray.50",borderRadius:"8px",border:"1px solid",borderColor:"gray.200",p:3,children:null===(l=e.options)||void 0===l?void 0:l.map(e=>(0,r.jsx)(O.U,{children:(0,r.jsx)(R.X,{value:e,children:e})},e))})}),(0,r.jsx)(m.J1,{fontSize:"12px",children:a})]},e.id)})]})},N=t(23961),A=t(18471),K=e=>{var i;let{isOpen:t,onClose:T,request:P,onSuccess:W}=e,k=(0,I.I0)(),O=(0,o.p)(),R=(0,A.$V)(),{loading:K,error:D}=(0,I.v9)(e=>e.bid),[U,Y]=(0,n.useState)(""),[V,L]=(0,n.useState)(""),[Z,q]=(0,n.useState)(""),[H,J]=(0,n.use
1State)(""),[M,Q]=(0,n.useState)({}),[X,$]=(0,n.useState)({}),[G,ee]=(0,n.useState)([]);(0,n.useEffect)(()=>{t&&(Y(""),L(""),q(""),J(""),Q({}),$({}))},[t]),(0,n.useEffect)(()=>{if(!t||!(null==P?void 0:P.serviceType))return;let e=!1;return(async()=>{try{let i=await E(P.serviceType);if(e)return;ee(i),Q(Object.fromEntries(i.map(e=>[e.fieldKey,"multi_select"===e.fieldType?[]:""])))}catch(e){}})(),()=>{e=!0}},[t,null==P?void 0:P.serviceType]);let ei=()=>{let e={},i=parseFloat(U);if(U&&(null==P?void 0:P.minBidPrice)&&i<(null==P?void 0:P.minBidPrice)?e.estimatedCost="Price must be at least ".concat((0,B.nd)(null==P?void 0:P.minBidPrice)):U&&(null==P?void 0:P.maxBidPrice)&&i>(null==P?void 0:P.maxBidPrice)&&(e.estimatedCost="Price must not exceed ".concat((0,B.nd)(null==P?void 0:P.maxBidPrice))),V){let i=parseFloat(V);(isNaN(i)||i<=0)&&(e.estimatedDuration="Please enter a valid duration in hours")}let t={};for(let e of G){let i=M[e.fieldKey],r=null==i||""===i||Array.isArray(i)&&0===i.length;e.required&&r&&(t[e.fieldKey]="".concat(e.label," is required"))}return Object.keys(t).length>0&&(e.customFields=t),$(e),0===Object.keys(e).length},et=async()=>{if(!ei())return;let e={requestId:null==P?void 0:P.id,estimatedCost:U?parseFloat(U):null,estimatedDuration:V?parseFloat(V):void 0,coverLetter:Z||void 0,availableFrom:H||void 0,...G.length>0?{customFieldResponses:M}:{},...(null==R?void 0:R.activeBusinessId)?{businessId:R.activeBusinessId}:{}};try{await k((0,_.m)(e)).unwrap(),O({title:"Bid submitted successfully!",description:"The customer will be notified about your bid.",status:"success",duration:5e3,isClosable:!0}),T(),W&&W()}catch(e){O({title:"Failed to submit bid",description:e||"An error occurred while submitting your bid.",status:"error",duration:5e3,isClosable:!0})}};return(0,r.jsxs)(l.u_,{isOpen:t,onClose:T,size:"xl",scrollBehavior:"inside",motionPreset:"slideInBottom",children:[(0,r.jsx)(s.Z,{}),(0,r.jsxs)(a.h,{mb:{base:0,md:"auto"},mt:{base:"auto",md:"auto"},borderTopRadius:{base:"xl",md:"md"},borderBottomRadius:{base:0,md:"md"},mx:{base:0,md:"auto"},maxH:{base:"90vh",md:"85vh"},children:[(0,r.jsx)(d.x,{px:6,pt:6,pb:4,children:(0,r.jsxs)(c.g,{align:"start",spacing:1,children:[(0,r.jsx)(u.x,{fontSize:"22px",fontWeight:"800",color:"#222E50",letterSpacing:"-0.3px",children:"Place a Bid"}),(0,r.jsxs)(u.x,{fontSize:"13px",fontWeight:"400",color:"gray.500",children:["For ",null==P?void 0:null===(i=P.serviceType)||void 0===i?void 0:i.replace(/_/g," ")]})]})}),(0,r.jsx)(x.o,{}),(0,r.jsx)(p.f,{children:(0,r.jsxs)(c.g,{spacing:4,align:"stretch",children:[(0,r.jsx)(f.x,{mb:6,children:(0,r.jsxs)(h.U,{align:"center",justify:"center",spacing:4,children:[(0,r.jsxs)(h.U,{align:"center",spacing:2,children:[(0,r.jsx)(f.x,{bg:"#222E50",color:"white",w:"24px",h:"24px",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",fontWeight:"700",children:"1"}),(0,r.jsx)(u.x,{fontSize:"14px",fontWeight:"700",color:"#222E50",children:"Bid"})]}),(0,r.jsx)(f.x,{h:"1px",w:"40px",bg:"gray.300"}),(0,r.jsxs)(h.U,{align:"center",spacing:2,children:[(0,r.jsx)(f.x,{bg:"gray.200",color:"gray.500",w:"24px",h:"24px",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",fontWeight:"600",children:"2"}),(0,r.jsxs)(u.x,{fontSize:"12px",fontWeight:"500",color:"gray.500",lineHeight:"1.2",children:["Quotation sets the",(0,r.jsx)("br",{}),"price"]})]})]})}),(0,r.jsxs)(g.NI,{isInvalid:!!X.estimatedCost,children:[(0,r.jsxs)(h.U,{justify:"space-between",align:"center",mb:2,children:[(0,r.jsx)(b.l,{fontSize:"12px",fontWeight:"800",color:"gray.700",textTransform:"uppercase",letterSpacing:"0.6px",mb:0,children:"ESTIMATED COST"}),(0,r.jsx)(y.C,{bg:"gray.100",color:"gray.500",fontSize:"10px",px:2,py:.5,borderRadius:"full",fontWeight:"700",letterSpacing:"0.4px",children:"OPTIONAL"})]}),(0,r.jsxs)(h.U,{bg:"gray.50",borderWidth:"1.5px",borderColor:"gray.300",borderRadius:"12px",px:4,py:1,align:"center",children:[(0,r.jsx)(u.x,{fontSize:"20px",fontWeight:"700",color:"#222E50",children:"â¦"}),(0,r.jsx)(j.Y2,{value:U,onChange:e=>Y(e),min:(null==P?void 0:P.minBidPrice)||0,max:null==P?void 0:P.maxBidPrice,format:e=>e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),parse:e=>e.replace(/,/g,""),border:"none",flex:1,children:(0,r.jsx)(j.zu,{placeholder:"0",fontSize:"20px",fontWeight:"700",color:"#222E50",border:"none",_focus:{boxShadow:"none"},px:2})})]}),X.estimatedCost?(0,r.jsx)(m.J1,{fontSize:"12px",children:X.estimatedCost}):(0,r.jsxs)(h.U,{mt:2,align:"flex-start",color:"gray.500",children:[(0,r.jsx)(v.J,{as:N.Z,boxSize:3,mt:"2px",mr:1})," ",(0,r.jsx)(g.Q6,{fontSize:"12px",mt:0,lineHeight:"1.4",color:"gray.500",children:"A rough idea of what the job may cost. You'll send an exact quotation if the customer takes you forward."})]})]}),(0,r.jsxs)(g.NI,{children:[(0,r.jsxs)(h.U,{justify:"space-between",align:"center",mb:2,children:[(0,r.jsx)(b.l,{fontSize:"16px",fontWeight:"700",color:"gray.800",mb:0,children:"Cover note"}),(0,r.jsx)(y.C,{bg:"gray.100",color:"gray.500",fontSize:"10px",px:2,py:.5,borderRadius:"full",fontWeight:"700",letterSpacing:"0.4px",children:"OPTIONAL"})]}),(0,r.jsx)(S.g,{value:Z,onChange:e=>q(e.target.value),placeholder:"Briefly describe your approach, experience or timeline...",fontSize:"14px",bg:"gray.50",borderWidth:"1.5px",borderColor:"gray.200",borderRadius:"12px",rows:4,resize:"vertical"}),(0,r.jsxs)(u.x,{fontSize:"11px",color:"gray.400",textAlign:"right",mt:1,children:[Z.length,"/500"]})]}),G.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w.i,{}),(0,r.jsx)(F,{fields:G,values:M,errors:X.customFields,onChange:(e,i)=>{Q(t=>({...t,[e]:i}))}})]}),D&&(0,r.jsx)(f.x,{p:3,bg:"red.50",borderRadius:"8px",border:"1px solid",borderColor:"red.200",children:(0,r.jsx)(u.x,{fontSize:"13px",color:"red.700",children:D})})]})}),(0,r.jsx)(C.m,{pb:6,px:6,children:(0,r.jsx)(z.z,{bg:"#222E50",color:"white",_hover:{bg:"#1a233c"},onClick:et,isLoading:K,loadingText:"Submitting...",w:"full",size:"lg",borderRadius:"full",fontSize:"16px",fontWeight:"700",children:"Submit Bid â"})})]})]})}},29138:function(e,i,t){t.d(i,{u:function(){return g}});var r=t(85893);t(67294);var n=t(5490),o=t(34614),l=t(26840),s=t(70010),a=t(8186),d=t(68029),c=t(12553),u=t(90092),x=t(38491),p=t(11163),f=t(24836);let h={kyc:{title:"Identity Verification Needed",message:"You need to complete your identity verification (KYC) before you can view or bid on jobs.",cta:"Complete Verification"},application:{title:"Provider Application Pending",message:"Your provider application needs to be approved before you can view or bid on jobs.",cta:"Check Application Status"},kyc_and_application:{title:"Verification Needed",message:"Your provider application and your identity verification (KYC) both need to be approved before you can view or bid on jobs.",cta:"View Status"},owner_kyc:{title:"Owner Verification Needed",message:"This business can't view or bid on jobs yet â the owner's identity verification (KYC) needs to be approved first.",cta:"Complete Verification"}};function g(e){return e.reason?h[e.reason].message:void 0}i.Z=e=>{let{isOpen:i,onClose:t,gate:g}=e,b=(0,p.useRouter)();if(!g.reason)return null;let y=h[g.reason],j="owner_kyc"!==g.reason||g.viewerIsOwner;return(0,r.jsxs)(n.u_,{isOpen:i,onClose:t,isCentered:!0,size:"sm",children:[(0,r.jsx)(o.Z,{}),(0,r.jsx)(l.h,{borderRadius:"18px",p:2,children:(0,r.jsx)(s.f,{py:6,children:(0,r.jsxs)(a.g,{spacing:4,align:"center",textAlign:"center",children:[(0,r.jsx)(d.x,{w:"52px",h:"52px",borderRadius:"26px",bg:"#FEF3C7",display:"flex",alignItems:"center",justifyContent:"center",children:(0,r.jsx)(c.J,{as:f.Z,boxSize:"26px",color:"#B45309"})}),(0,r.jsx)(u.x,{fontSize:"16.5px",fontWeight:800,color:"#101828",children:y.title}),(0,r.jsx)(u.x,{fontSize:"13.5px",color:"#475467",lineHeight:"1.5",children:y.message}),j&&y.cta&&(0,r.jsx)(x.z,{w:"full",bg:"#222E50",color:"#fff",_hover:{bg:"#1a2340"},onClick:()=>{t(),b.push("/onboarding/status")},children:y.cta}),(0,r.jsx)(x.z,{w:"full",variant:"ghost",color:"#667085",onClick:t,children:j&&y.cta?"Not now":"OK"})]})})})]})}}}]);
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.