PageSourceSearch

https://useevently.com/_next/static/chunks/pages/vendor-dashboard/inquiries-082e1377b4d25ae6.js

js useevently.com collected 2026-10-09 04:14:39 UTC 39,548 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8055],{23107:(e,s,t)=>{"use strict";t.d(s,{J:()=>x});var r=t(42969),n=t(59860),a=t(14232),i=t(59773),l=t(47137),c=t(11192),u=t(37876),o=["className"];function d(e,s){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);s&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,r)}return t}var m=(0,l.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),x=a.forwardRef(function(e,s){var t=e.className,a=(0,n.A)(e,o);return(0,u.jsx)(i.b,function(e){for(var s=1;s<arguments.length;s++){var t=null!=arguments[s]?arguments[s]:{};s%2?d(Object(t),!0).forEach(function(s){(0,r.A)(e,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s))})}return e}({ref:s,className:(0,c.cn)(m(),t)},a))});x.displayName=i.b.dis
1playName},54081:(e,s,t)=>{"use strict";t.d(s,{V:()=>p});var r=t(42969),n=t(59860);t(14232);var a=t(4384),i=t(9869),l=t(74008),c=t(11192),u=t(89979),o=t(37876),d=["className","classNames","showOutsideDays"],m=["className"],x=["className"];function h(e,s){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);s&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,r)}return t}function f(e){for(var s=1;s<arguments.length;s++){var t=null!=arguments[s]?arguments[s]:{};s%2?h(Object(t),!0).forEach(function(s){(0,r.A)(e,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):h(Object(t)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s))})}return e}function p(e){var s=e.className,t=e.classNames,r=e.showOutsideDays,h=(0,n.A)(e,d);return(0,o.jsx)(l.hv,f({showOutsideDays:void 0===r||r,className:(0,c.cn)("p-3",s),classNames:f({months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:(0,c.cn)((0,u.r)({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:(0,c.cn)((0,u.r)({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible"},t),components:{IconLeft:function(e){var s=e.className,t=(0,n.A)(e,m);return(0,o.jsx)(a.A,f({className:(0,c.cn)("h-4 w-4",s)},t))},IconRight:function(e){var s=e.className,t=(0,n.A)(e,x);return(0,o.jsx)(i.A,f({className:(0,c.cn)("h-4 w-4",s)},t))}}},h))}p.displayName="Calendar"},73962:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>z});var r=t(70236),n=t(59860),a=t(45794),i=t(42969),l=t(63857),c=t(43081),u=t.n(c),o=t(14232),d=t(14e3),m=t(16153),x=t(49834),h=t(16042),f=t(78862),p=t(82964),b=t(39482),j=t(89979),v=t(95313),g=t(64725),N=t(82507),w=t(88413),y=t(81572),O=t(81995),A=t(25444),C=t(69487),P=t(35739),k=t(43515),q=t(48500),I=t(7303),S=t(23107),E=t(54081),D=t(23355),_=t(27212),L=t(99422),U=t(27947),R=t(80833),T=t(78293),M=t(37876);function H(e,s){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);s&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,r)}return t}function F(e){for(var s=1;s<arguments.length;s++){var t=null!=arguments[s]?arguments[s]:{};s%2?H(Object(t),!0).forEach(function(s){(0,i.A)(e,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):H(Object(t)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s))})}return e}function V(e){var s,t=e.currentUser,n=(0,o.useState)([]),i=n[0],c=n[1],d=(0,o.useState)([]),m=d[0],x=d[1],h=(0,o.useState)(null),f=h[0],v=h[1],g=(0,o.useState)(""),N=g[0],y=g[1],O=(0,o.useState)(!1),A=O[0],C=O[1],P=(0,o.useRef)(null),k=function(){var e;null==(e=P.current)||e.scrollIntoView({behavior:"smooth"})};(0,o.useEffect)(function(){k()},[i]),(0,o.useEffect)(function(){if(!t)return void x([]);var e=(0,p.rJ)(b.db,"users",t.uid,"messages"),s=(0,p.P)(e,(0,p.My)("lastUpdated","desc")),r=(0,p.aQ)(s,function(e){x(e.docs.map(function(e){var s,t,r=e.data(),n=null!=(s=null==(t=r.messages)?void 0:t[r.messages.length-1])?s:{};return{threadId:e.id,partnerId:r.partnerId,partnerName:r.partnerName,lastText:n.text||"",timestamp:r.lastUpdated,unread:(r.unreadCount||0)>0}}))});return function(){return r()}},[t]),(0,o.useEffect)(function(){if(!t||!f)return void c([]);var e=(0,p.H9)(b.db,"users",t.uid,"messages",f),s=(0,p.aQ)(e,function(e){e.exists()&&c((e.data().messages||[]).sort(function(e,s){return(e.ts.toMillis()||0)-(s.ts.toMillis()||0)}
1))});return function(){return s()}},[t,f]),(0,o.useEffect)(function(){if(t&&f&&i.length){var e=i.filter(function(e){return!e.isRead&&e.from!==t.uid});if(e.length){var s=(0,p.H9)(b.db,"users",t.uid,"messages",f);(0,p.mZ)(s,{unreadCount:0,messages:p.C3.apply(void 0,(0,r.A)(e.map(function(e){return F(F({},e),{},{isRead:!1})})))}).then(function(){(0,p.mZ)(s,{messages:p.hq.apply(void 0,(0,r.A)(e.map(function(e){return F(F({},e),{},{isRead:!0})})))})})}}},[i,t,f]);var q=(s=(0,l.A)(u().mark(function e(){var s,r,n,i,l,c,o,d,m,x,h,j,v;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!t||!f||!N.trim())){e.next=2;break}return e.abrupt("return");case 2:return C(!0),r=(s=f.split("_"))[0]===t.uid?s[1]:s[0],n=(0,p.H9)(b.db,"users",t.uid,"messages",f),i=(0,p.H9)(b.db,"users",r,"messages",f),l={id:"".concat(Date.now(),"_").concat(Math.random().toString(36).substr(2,9)),from:t.uid,text:N.trim(),ts:p.Dc.now(),isRead:!0},e.prev=8,e.next=11,Promise.all([(0,p.x7)(n),(0,p.x7)(i)]);case 11:if(d=e.sent,x=(m=(0,a.A)(d,2))[0],h=m[1],!(!x.exists()||!h.exists())){e.next=17;break}throw Error("Message thread not found. Please refresh the page and try again.");case 17:if(!((v=(j=(null==(c=x.data())?void 0:c.messages)||[])[j.length-1])&&v.text===l.text&&((null==(o=v.ts)?void 0:o.toMillis())||0)>Date.now()-5e3)){e.next=22;break}return C(!1),e.abrupt("return");case 22:return e.next=24,Promise.all([(0,p.mZ)(n,{messages:(0,p.hq)(l),lastUpdated:(0,p.O5)()}),(0,p.mZ)(i,{messages:(0,p.hq)(F(F({},l),{},{isRead:!1})),lastUpdated:(0,p.O5)(),unreadCount:(0,p.GV)(1)})]);case 24:y(""),e.next=30;break;case 27:e.prev=27,e.t0=e.catch(8),e.t0 instanceof Error?alert(e.t0.message):alert("Failed to send message. Please try again.");case 30:return e.prev=30,C(!1),e.finish(30);case 33:case"end":return e.stop()}},e,null,[[8,27,30,33]])})),function(){return s.apply(this,arguments)});return(0,M.jsxs)(w.Zp,{className:"bg-white border-slate-100 shadow-sm",children:[(0,M.jsxs)(w.aR,{children:[(0,M.jsx)(w.ZB,{className:"text-slate-800",children:"Messages"}),(0,M.jsx)(w.BT,{className:"text-slate-500",children:"Communicate with your clients"})]}),(0,M.jsx)(w.Wu,{className:"p-0",children:(0,M.jsxs)("div",{className:"flex h-[600px]",children:[(0,M.jsxs)("div",{className:"w-1/3 border-r",children:[(0,M.jsx)("div",{className:"p-4 border-b",children:(0,M.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,M.jsx)(L.A,{className:"w-5 h-5"}),"Conversations"]})}),m.length?(0,M.jsx)("div",{className:"overflow-y-auto max-h-[calc(600px-120px)]",children:m.map(function(e){var s;return(0,M.jsxs)(D.P.button,{onClick:function(){return v(e.threadId)},className:"w-full p-4 text-left hover:bg-gray-50 transition-colors ".concat(f===e.threadId?"bg-gray-50":""," ").concat(e.unread?"font-semibold":""),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,M.jsx)("div",{className:"font-medium",children:e.partnerName}),(0,M.jsx)("div",{className:"text-sm text-muted-foreground truncate",children:e.lastText}),(0,M.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:null==(s=e.timestamp)?void 0:s.toDate().toLocaleString()})]},e.threadId)})}):(0,M.jsx)("div",{className:"p-4 text-center text-muted-foreground",children:"No messages yet"})]}),(0,M.jsx)("div",{className:"flex-1 flex flex-col",children:f?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[(0,M.jsx)(_.N,{children:i.map(function(e){var s;return(0,M.jsxs)(D.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"max-w-[80%] ".concat(e.from===(null==t?void 0:t.uid)?"ml-auto":"mr-auto"),children:[(0,M.jsx)("div",{className:"p-3 rounded-lg ".concat(e.from===(null==t?void 0:t.uid)?"bg-blue-500 text-white":"bg-gray-100"),children:(0,M.jsx)("div",{className:"text-sm whitespace-pre-wrap",children:e.text})}),(0,M.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:null==(s=e.ts)?void 0:s.toDate().toLocaleString()})]},e.id)})}),(0,M.jsx)("div",{ref:P})]}),(0,M.jsx)("div",{className:"p-4 border-t",children:(0,M.jsxs)("div",{className:"flex gap-2",children:[(0,M.jsx)(T.T,{value:N,onChange:function(e){return y(e.target.value)},placeholder:"Type your message...",className:"flex-1",rows:1,onKeyDown:function(e){"Enter"!==e.key||e.shiftKey||(e.preventDefault(),q())}}),(0,M.jsx)(j.$,{onClick:q,disabled:A||!N.trim(),children:A?(0,M.jsx)(U.A,{className:"w-4 h-4 animate-spin"}):(0,M.jsx)(R.A,{className:"w-4 h-4"})})]})})]}):(0,M.jsx)("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Select a conversation to start messaging"})})]})})]})}var Z=t(33129),B=t(70108),W=t(38100),$=["archivedAt"];function Q(e,s){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);s&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,r)}return t}function X(e){for(var s=1;s<arguments.length;s++){var t=null!=arguments[s]?arguments[s]:{};
1s%2?Q(Object(t),!0).forEach(function(s){(0,i.A)(e,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Q(Object(t)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s))})}return e}function G(e){var s,t=e.open,r=e.onClose,n=e.inquiry,i=e.currentUser,c=e.refreshInquiries,d=(0,o.useState)("");d[0],d[1];var m=(0,o.useState)("New"),x=m[0],h=m[1];(0,o.useEffect)(function(){n&&n.status?h(n.status):h("New")},[n]);var f=(s=(0,l.A)(u().mark(function e(s,t){var r,n,a;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(!i||!s.id)){e.next=3;break}return e.abrupt("return");case 3:return r=(0,p.H9)(b.db,"users",i.uid),e.next=6,(0,p.x7)(r);case 6:if(!(n=e.sent).exists()){e.next=14;break}return a=(n.data().receivedInquiries||[]).map(function(e){return e.inquiryId===s.id?X(X({},e),{},{status:t}):e}),e.next=13,(0,p.mZ)(r,{receivedInquiries:a});case 13:c();case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(0);case 18:case"end":return e.stop()}},e,null,[[0,16]])})),function(e,t){return s.apply(this,arguments)});if(!n)return(0,M.jsx)(I.lG,{open:t,onOpenChange:r,children:(0,M.jsxs)(I.Cf,{className:"sm:max-w-[500px] bg-white",children:[(0,M.jsx)(I.c7,{children:(0,M.jsx)(I.L3,{className:"text-slate-800",children:"Inquiry Details"})}),(0,M.jsx)("p",{className:"text-slate-500",children:"No inquiry selected."}),(0,M.jsx)(I.Es,{children:(0,M.jsx)(j.$,{variant:"ghost",onClick:r,children:"Close"})})]})});var g=["Full Name","Email","Phone Number"],N=["businessUID","timeOfSubmission","userUID","inquiryId","isClicked","allowRating","booked","rating","status","id"],w=[];return g.forEach(function(e){null!=n[e]&&w.push({key:e,value:n[e]})}),Object.entries(n).forEach(function(e){var s=(0,a.A)(e,2),t=s[0],r=s[1];N.includes(t)||g.includes(t)||null==r||w.push({key:t,value:r})}),(0,M.jsx)(I.lG,{open:t,onOpenChange:r,children:(0,M.jsxs)(I.Cf,{className:"sm:max-w-[600px] bg-white",children:[(0,M.jsx)(I.c7,{children:(0,M.jsx)(I.L3,{className:"text-slate-800",children:"Inquiry Details"})}),(0,M.jsxs)("div",{className:"mb-4",children:[(0,M.jsx)(S.J,{className:"block mb-1",children:"Status"}),(0,M.jsxs)(O.l6,{value:x,onValueChange:function(e){return f(n,e)},children:[(0,M.jsx)(O.bq,{className:"w-full bg-white border-slate-200",children:(0,M.jsx)(O.yv,{placeholder:"Select status"})}),(0,M.jsxs)(O.gC,{children:[(0,M.jsx)(O.eb,{value:"New",children:"New"}),(0,M.jsx)(O.eb,{value:"In Progress",children:"In Progress"}),(0,M.jsx)(O.eb,{value:"Quoted",children:"Quoted"}),(0,M.jsx)(O.eb,{value:"Closed (Won)",children:"Closed (Won)"}),(0,M.jsx)(O.eb,{value:"Closed (Lost)",children:"Closed (Lost)"})]})]})]}),(0,M.jsx)("div",{className:"space-y-4",children:w.map(function(e){var s=e.key,t=e.value;return(0,M.jsxs)("div",{children:[(0,M.jsx)(S.J,{className:"mb-1",children:s}),(0,M.jsx)(v.p,{value:t,readOnly:!0,className:"bg-slate-50 border-slate-200"})]},s)})}),(0,M.jsx)(I.Es,{})]})})}function z(){var e,s,t,a,i,c=(0,d.useRouter)(),S=(0,o.useState)(null),D=S[0],_=S[1],L=(0,o.useState)(!0),U=L[0],R=L[1],T=(0,o.useState)([]),H=T[0],F=T[1],Q=(0,o.useState)(""),z=Q[0],ee=Q[1],es=(0,o.useState)("all"),et=es[0],er=es[1],en=(0,o.useState)(!1),ea=en[0],ei=en[1],el=(0,o.useState)(null),ec=el[0],eu=el[1],eo=(0,o.useState)(null),ed=eo[0],em=eo[1],ex=(0,o.useState)([]),eh=ex[0],ef=ex[1],ep=(0,o.useState)(!1),eb=ep[0],ej=ep[1],ev=(0,o.useState)("messages"),eg=ev[0],eN=ev[1],ew=(0,Z.d)(),ey=ew.isBasicSubscriber,eO=ew.isPremiumSubscriber,eA=ew.isExceptionUser,eC=ew.loading,eP=(0,o.useState)("desc"),ek=eP[0],eq=eP[1],eI=(0,o.useState)({from:void 0,to:void 0}),eS=eI[0],eE=eI[1],eD=(0,o.useState)(!1),e_=eD[0],eL=eD[1],eU=function(e){return e.status||"New"},eR=(e=(0,l.A)(u().mark(function e(s){var t,r,n,a,i;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!D||!s.id)){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,t=(0,p.H9)(b.db,"users",D.uid),e.next=6,(0,p.x7)(t);case 6:if(!(r=e.sent).exists()||(a=(n=r.data()).receivedInquiries||[],n.archivedInquiries,!(i=a.find(function(e){return e.inquiryId===s.id})))){e.next=16;break}return e.next=15,(0,p.mZ)(t,{receivedInquiries:(0,p.C3)(i),archivedInquiries:(0,p.hq)(X(X({},i),{},{archivedAt:new Date}))});case 15:eB();case 16:e.next=20;break;case 18:e.prev=18,e.t0=e.catch(2);case 20:case"end":return e.stop()}},e,null,[[2,18]])})),function(s){return e.apply(this,arguments)}),eT=(s=(0,l.A)(u().mark(function e(s){var t,r,a,i;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!D||!s.id)){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,t=(0,p.H9)(b.db,"users",D.uid),e.next=6,(0,p.x7)(t);
1case 6:if(!(r=e.sent).exists()||!(a=(r.data().archivedInquiries||[]).find(function(e){return e.inquiryId===s.id}))){e.next=16;break}return a.archivedAt,i=(0,n.A)(a,$),e.next=15,(0,p.mZ)(t,{archivedInquiries:(0,p.C3)(a),receivedInquiries:(0,p.hq)(X(X({},i),{},{isUnarchived:!0}))});case 15:eB();case 16:e.next=20;break;case 18:e.prev=18,e.t0=e.catch(2);case 20:case"end":return e.stop()}},e,null,[[2,18]])})),function(e){return s.apply(this,arguments)});(0,o.useEffect)(function(){var e=(0,h.Sx)();(0,f.Ay)(e,{provider:new f._u("6LfBXGcqAAAAALa8wOMMPMWBBZ3f-f-qzUU7I4te"),isTokenAutoRefreshEnabled:!0});var s=b.auth.onAuthStateChanged(function(e){_(e)});return function(){return s()}},[]),(0,o.useEffect)(function(){var e;(e=(0,l.A)(u().mark(function e(){var s;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=(0,x.xI)().onAuthStateChanged(function(){var e=(0,l.A)(u().mark(function e(s){var t;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s){e.next=4;break}return R(!1),ej(!1),e.abrupt("return");case 4:return e.prev=4,e.next=7,(0,p.x7)((0,p.H9)(b.db,"users",s.uid));case 7:(t=e.sent).exists()&&ej(!!t.data().business),R(!1),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(4),R(!1),ej(!1);case 16:case"end":return e.stop()}},e,null,[[4,12]])}));return function(s){return e.apply(this,arguments)}}()),e.abrupt("return",function(){return s()});case 3:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})()},[]),(0,o.useEffect)(function(){var e,s=(0,x.hg)(b.auth,(e=(0,l.A)(u().mark(function e(s){return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!s){e.next=6;break}return _(s),e.next=4,eH(s);case 4:e.next=8;break;case 6:_(null),F([]);case 8:R(!1);case 9:case"end":return e.stop()}},e)})),function(s){return e.apply(this,arguments)}));return function(){return s()}},[]);var eM=(0,o.useMemo)(function(){var e=H.filter(function(e){var s=(e["Full Name"]||"").toLowerCase().includes(z.toLowerCase())||(e.Email||"").toLowerCase().includes(z.toLowerCase())||(e["Phone Number"]||"").toLowerCase().includes(z.toLowerCase()),t="all"===et||e.status===et;return s&&t}).filter(function(e){if(!eS.from||!eS.to)return!0;if(!e.timeOfSubmission)return!1;var s=K(e.timeOfSubmission);return!!s&&s>=eS.from&&s<=eS.to});return(0,r.A)(e).sort(function(e,s){var t=K(e.timeOfSubmission)||new Date(0),r=K(s.timeOfSubmission)||new Date(0);return"desc"===ek?r.getTime()-t.getTime():t.getTime()-r.getTime()})},[H,z,et,eS,ek]),eH=(t=(0,l.A)(u().mark(function e(s){var t,r,n,a,i,l,c,o;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,R(!0),t=(0,p.aU)(),r=(0,p.H9)(t,"users",s.uid),e.next=6,(0,p.x7)(r);case 6:(n=e.sent).exists()?(i=(a=n.data()).receivedInquiries||[],l=a.archivedInquiries||[],c=i.map(function(e){return X({id:e.inquiryId,status:e.status||"New","Full Name":e["Full Name"],Email:e.Email,"Phone Number":e["Phone Number"],timeOfSubmission:e.timeOfSubmission},e)}),o=l.map(function(e){return X({id:e.inquiryId,status:e.status||"New","Full Name":e["Full Name"],Email:e.Email,"Phone Number":e["Phone Number"],timeOfSubmission:e.timeOfSubmission,archivedAt:e.archivedAt},e)}),F(c),ef(o)):(F([]),ef([])),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(0),F([]),ef([]);case 14:return e.prev=14,R(!1),e.finish(14);case 17:case"end":return e.stop()}},e,null,[[0,10,14,17]])})),function(e){return t.apply(this,arguments)});if(U||eC)return(0,M.jsx)("div",{className:"flex items-center justify-center min-h-screen",children:(0,M.jsx)("div",{className:"text-center",children:(0,M.jsx)("p",{className:"text-slate-600",children:"Loading..."})})});if(!eb)return(0,M.jsx)("div",{className:"flex items-center justify-center min-h-screen bg-slate-50",children:(0,M.jsxs)("div",{className:"text-center max-w-md p-6 bg-white rounded-lg shadow-sm",children:[(0,M.jsx)("h2",{className:"text-2xl font-bold text-slate-800 mb-4",children:"Access Denied"}),(0,M.jsx)("p",{className:"text-slate-600 mb-6",children:"You don't have access to the vendor dashboard."}),(0,M.jsx)(j.$,{onClick:function(){return c.push("/")},className:"bg-blue-500 hover:bg-blue-600 text-white",children:"Return to Home"})]})});if(!ey&&!eO&&!eA)return(0,M.jsx)("div",{className:"flex items-center justify-center min-h-screen bg-slate-50",children:(0,M.jsxs)("div",{className:"text-center max-w-md p-6 bg-white rounded-lg shadow-sm",children:[(0,M.jsx)("h2",{className:"text-2xl font-bold text-slate-800 mb-4",children:"Subscription Required"}),(0,M.jsx)("p",{className:"text-slate-600 mb-6",children:"Access to inquiries requires a subscription. Please subscribe to start managing your customer inquiries effectively."}),(0,M.jsxs)("div",{className:"flex gap-2 justify-center",children:[(0,M.jsx)(j.$,{onClick:function(){return c.push("/pricing")},className:"bg-blue-500 hover:bg-blue-600 text-white",children:"View Pricing"}),(0,M.jsx)(j.$,{onClick:function(){return c.push("/")},variant:"outline",children:"Go Home"})]})]})});var eF=(a=(0,l.A)(u().mark(function e(s,t){var r,n,a,i,l,c,o,d,m;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(D){e.next=2;break}return e.abrupt("return");case 2:return r=(0,p.aU)(),n=(0,p.H9)(r,"users",D.uid),e.prev=4,e.next=7,(0,p.x7)(n);case 7:if(!(a=e.sent).exists()){e.next=27;break}return l=(i=a.data().receivedInquiries||[]).map(function(e){return e.inquiryId===s?X(X({},e),{},{booked:t}):e}),e.next=14,(0,p.mZ)(n,{receivedInquiries:l});case 14:if(!t||!((c=i.find(function(e){return e.inquiryId===s}))&&c.userUID)){e.next=27;break}return o=(0,p.H9)(r,"users",c.userUID),e.next=20,(0,p.x7)(o);case 20:if(!(d=e.sent).exists()){e.next=27;break}return m=(d.data().inquiries||[]).map(function(e){return e.inquiryId===s?X(X({},e),{},{allowRating:!0}):e}),e.next=27,(0,p.mZ)(o,{inquiries:m});case 27:e.next=31;break;case 29:e.prev=29,e.t0=e.catch(4);case 31:case"end":return e.stop()}},e,null,[[4,29]])})),function(e,s){return a.apply(this,arguments)}),eV=(i=(0,l.A)(u().mark(function e(s,t){var r,n,a;return u().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(!D||!s.id)){e.next=3;break}return e.abrupt("return");case 3:return r=(0,p.H9)(b.db,"users",D.uid),e.next=6,(0,p.x7)(r);case 6:if(!(n=e.sent).exists()){e.next=17;break}return a=(n.data().receivedInquiries||[]).map(function(e){return e.inquiryId===s.id?X(X({},e),{},{status:t}):e}),e.next=13,(0,p.mZ)(r,{receivedInquiries:a});case 13:if(eB(),"Closed (Won)"!==t&&"Closed (Lost)"!==t){e.next=17;break}return e.next=17,eF(s.id,"Closed (Won)"===t);case 17:e.next=21;break;case 19:e.prev=19,e.t0=e.catch(0);case 21:case"end":return e.stop()}},e,null,[[0,19]])})),function(e,s){return i.apply(this,arguments)}),eZ=function(e){eu(e),ei(!0)},eB=function(){D&&eH(D)};return U?(0,M.jsx)(m.A,{children:(0,M.jsx)("div",{className:"flex items-center justify-center h-[400px]",children:(0,M.jsxs)("div",{className:"flex flex-col items-center",children:[(0,M.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-500 mb-4"}),(0,M.jsx)("p",{className:"text-slate-500",children:"Loading inquiries..."})]})})}):D?(0,M.jsx)(M.Fragment,{children:(0,M.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-blue-50 to-purple-50",children:[(0,M.jsx)(W.w,{pageTitle:"Lead Management"}),(0,M.jsxs)(m.A,{children:[(0,M.jsxs)("div",{className:"space-y-6",children:[(0,M.jsxs)("div",{className:"flex justify-between items-center",children:[(0,M.jsxs)("div",{children:[(0,M.jsx)("h2",{className:"text-2xl font-semibold tracking-tight text-slate-800",children:"Lead Management"}),(0,M.jsx)("p",{className:"text-slate-500",children:"Manage your inquiries, leads, and follow-ups"})]}),(0,M.jsx)("div",{className:"flex space-x-2",children:(0,M.jsxs)(j.$,{onClick:eB,variant:"outline",className:"border-slate-200 text-slate-700",disabled:!ey&&!eO&&!eA,children:[(0,M.jsx)(C.A,{className:"h-4 w-4 mr-2"}),"Refresh"]})})]}),(0,M.jsx)(B.qf,{feature:"Advanced Lead Management",description:"Organize, track, and manage all your leads and inquiries. View messages, manage pipeline, and export data for better business insights."}),(0,M.jsx)(B.H$,{feature:"Advanced Lead Management",description:"Organize, track, and manage all your leads and inquiries. View messages, manage pipeline, and export data for better business insights.",children:(0,M.jsxs)(N.tU,{value:eg,onValueChange:eN,className:"w-full",children:[(0,M.jsxs)(N.j7,{className:"grid w-full grid-cols-4 mb-4",children:[(0,M.jsx)(N.Xi,{value:"messages",children:"Messages"}),(0,M.jsx)(N.Xi,{value:"list",children:"List View"}),(0,M.jsx)(N.Xi,{value:"pipeline",children:"Pipeline View"}),(0,M.jsx)(N.Xi,{value:"archived",children:"Archived"})]}),(0,M.jsx)(N.av,{value:"list",children:(0,M.jsxs)(w.Zp,{className:"bg-white border-slate-100 shadow-sm",children:[(0,M.jsxs)(w.aR,{className:"pb-3",children:[(0,M.jsxs)("div",{className:"flex items-center justify-between",children:[(0,M.jsx)(w.ZB,{className:"text-slate-800",children:"All Inquiries"}),(0,M.jsxs)(A.rI,{children:[(0,M.jsx)(A.ty,{asChild:!0,children:(0,M.jsx)(j.$,{variant:"outline",size:"sm",className:"border-slate-200 text-slate-700",children:"Export"})}),(0,M.jsxs)(A.SQ,{align:"end",children:[(0,M.jsxs)(A._2,{onClick:function(){if(0!==H.length){var e=H.map(function(e){return[e["Full Name"]||"",e.Email||"",e["Phone Number"]||"",e.status||"New"]}),s=encodeURI("data:text/csv;charset=utf-8,"+["Full Name,Email,Phone Number,Status"].concat((0,r.A)(e.map(function(e){return e.join(",")}))).join("\n")),t=document.createElement("a");t.setAttribute("href",s),t.setAttribute("download","inquiries.csv"),document.body.appendChild(t),t.click(),document.body.removeChild(t)}},disabled:!ey&&!eO&&!eA,children:[(0,M.jsx)(P.A,{className:"h-4 w-4 mr-2"})," Export as CSV"]}),(0,M.jsx)(A.mB,{})]})]})]}),(0,M.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 mt-4",children:[(0,M.jsxs)("div",{className:"relative flex-grow",children:[(0,M.jsx)(k.A,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-slate-400 h-4 w-4"}),(0,M.jsx)(v.p,{placeholder:"Search inquiries...",className:"pl-10 bg-white",value:z,onChange:function(e){return ee(e.target.value)}})]}),(0,M.jsxs)(O.l6,{value:et,onValueChange:er,children:[(0,M.jsx)(O.bq,{className:"w-full sm:w-[180px] bg-white border-slate-200",children:(0,M.jsx)(O.yv,{placeholder:"Filter by status"})}),(0,M.jsxs)(O.gC,{children:[(0,M.jsx)(O.eb,{value:"all",children:"All Statuses"}),(0,M.jsx)(O.eb,{value:"New",children:"New"}),(0,M.jsx)(O.eb,{value:"In Progress",children:"In Progress"}),(0,M.jsx)(O.eb,{value:"Quoted",children:"Quoted"}),(0,M.jsx)(O.eb,{value:"Closed (Won)",children:"Closed (Won)"}),(0,M.jsx)(O.eb,{value:"Closed (Lost)",children:"Closed (Lost)"})]})]}),(0,M.jsxs)(O.l6,{value:ek,onValueChange:function(e){return eq(e)},children:[(0,M.jsx)(O.bq,{className:"w-full sm:w-[180px] bg-white border-slate-200",children:(0,M.jsx)(O.yv,{placeholder:"Sort by date"})}),(0,M.jsxs)(O.gC,{children:[(0,M.jsx)(O.eb,{value:"desc",children:"Newest to Oldest"}),(0,M.jsx)(O.eb,{value:"asc",children:"Oldest to Newest"})]})]})]})]}),(0,M.jsx)(w.Wu,{className:"p-0",children:U?(0,M.jsx)("div",{className:"flex items-center justify-center h-[400px]",children:(0,M.jsxs)("div",{className:"flex flex-col items-center",children:[(0,M.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-500 mb-4"}),(0,M.jsx)("p",{className:"text-slate-500",children:"Loading inquiries..."})]})}):0===eM.length?(0,M.jsxs)("div",{className:"flex flex-col items-center justify-center h-[400px] text-center p-4",children:[(0,M.jsx)("div",{className:"bg-slate-100 rounded-full p-4 mb-4",children:(0,M.jsx)(k.A,{className:"h-8 w-8 text-slate-500"})}),(0,M.jsx)("h3",{className:"text-lg font-medium text-slate-800 mb-2",children:"No inquiries found"}),(0,M.jsx)("p",{className:"text-slate-500 max-w-md",children:z||"all"!==et?"Try adjusting your search or filter criteria":"Get started by adding your first inquiry"})]}):(0,M.jsx)("div",{className:"overflow-auto",children:(0,M.jsxs)(g.XI,{children:[(0,M.jsx)(g.A0,{className:"bg-slate-50",children:(0,M.jsxs)(g.Hj,{children:[(0,M.jsx)(g.nd,{className:"text-slate-600",children:"Customer"}),(0,M.jsx)(g.nd,{className:"text-slate-600",children:"Email"}),(0,M.jsx)(g.nd,{className:"text-slate-600",children:"Phone"}),(0,M.jsx)(g.nd,{className:"text-slate-600",children:"Status"}),(0,M.jsx)(g.nd,{className:"text-slate-600",children:"View Inquiry"}),(0,M.jsx)(g.nd,{className:"text-slate-600",children:"Date Recieved"}),(0,M.jsx)(g.nd,{className:"text-slate-600",children:"Actions"})]})}),(0,M.jsx)(g.BF,{children:eM.map(function(e){var s;return(0,M.jsxs)(g.Hj,{className:"hover:bg-slate-50",children:[(0,M.jsx)(g.nA,{children:(0,M.jsx)("p",{className:"font-medium text-slate-800",children:null!=(s=e["Full Name"])?s:"No Name"})}),(0,M.jsx)(g.nA,{children:e.Email||"N/A"}),(0,M.jsx)(g.nA,{children:e["Phone Number"]||"N/A"}),(0,M.jsx)(g.nA,{onClick:function(){return em(e.id)},className:"cursor-pointer",children:ed===e.id?(0,M.jsxs)(O.l6,{defaultValue:eU(e),onValueChange:function(s){eV(e,s),em(null)},children:[(0,M.jsx)(O.bq,{className:"w-full bg-white border-slate-200",children:(0,M.jsx)(O.yv,{placeholder:"Select status"})}),(0,M.jsxs)(O.gC,{children:[(0,M.jsx)(O.eb,{value:"New",children:"New"}),(0,M.jsx)(O.eb,{value:"In Progress",children:"In Progress"}),(0,M.jsx)(O.eb,{value:"Quoted",children:"Quoted"}),(0,M.jsx)(O.eb,{value:"Closed (Won)",children:"Closed (Won)"}),(0,M.jsx)(O.eb,{value:"Closed (Lost)",children:"Closed (Lost)"})]})]}):J(eU(e))}),(0,M.jsx)(g.nA,{children:(0,M.jsx)("span",{onClick:function(){return eZ(e)},className:"text-blue-500 underline cursor-pointer",children:"View Inquiry"})}),(0,M.jsx)(g.nA,{children:Y(e.timeOfSubmission)}),(0,M.jsx)(g.nA,{children:(0,M.jsxs)(A.rI,{children:[(0,M.jsx)(A.ty,{asChild:!0,children:(0,M.jsx)(j.$,{variant:"ghost",size:"sm",children:(0,M.jsx)(q.A,{className:"h-4 w-4"})})}),(0,M.jsxs)(A.SQ,{align:"end",children:[(0,M.jsx)(A._2,{onClick:function(){return eZ(e)},children:"View Details"}),(0,M.jsx)(A._2,{onClick:function(){return eR(e)},children:"Archive"})]})]})})]},e.id)})})]})})})]})}),(0,M.jsx)(N.av,{value:"pipeline",children:(0,M.jsxs)(w.Zp,{className:"bg-white border-slate-100 shadow-sm",children:[(0,M.jsxs)(w.aR,{children:[(0,M.jsx)(w.ZB,{className:"text-slate-800",children:"Inquiry Pipeline"}),(0,M.jsx)(w.BT,{className:"text-slate-500",children:"Track where each inquiry is in your sales process"})]}),(0,M.jsx)(w.Wu,{children:(0,M.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-5 ga
1p-4",children:["New","In Progress","Quoted","Closed (Won)","Closed (Lost)"].map(function(e){var s=eM.filter(function(s){return eU(s)===e});return(0,M.jsxs)("div",{className:"bg-slate-50 rounded-lg p-3",children:[(0,M.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,M.jsx)("h3",{className:"font-semibold text-slate-800",children:e}),(0,M.jsx)(y.E,{children:s.length})]}),(0,M.jsx)("div",{className:"space-y-2",children:s.map(function(e){var s;return(0,M.jsxs)("div",{className:"bg-white p-3 rounded-md shadow-sm cursor-pointer hover:shadow-md transition-shadow",onClick:function(){return eZ(e)},children:[(0,M.jsx)("p",{className:"font-medium text-slate-800 truncate",children:null!=(s=e["Full Name"])?s:"No Name"}),(0,M.jsx)("p",{className:"text-xs text-slate-500 truncate",children:e.Email}),(0,M.jsx)("div",{className:"flex items-center justify-between mt-2",children:(0,M.jsx)("span",{className:"text-xs text-slate-500",children:e["Phone Number"]})})]},e.id)})})]},e)})})})]})}),(0,M.jsx)(N.av,{value:"archived",children:(0,M.jsxs)(w.Zp,{className:"bg-white border-slate-100 shadow-sm",children:[(0,M.jsxs)(w.aR,{className:"pb-3",children:[(0,M.jsx)("div",{className:"flex items-center justify-between",children:(0,M.jsx)(w.ZB,{className:"text-slate-800",children:"Archived Inquiries"})}),(0,M.jsx)("div",{className:"flex flex-col sm:flex-row gap-4 mt-4",children:(0,M.jsxs)("div",{className:"relative flex-grow",children:[(0,M.jsx)(k.A,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-slate-400 h-4 w-4"}),(0,M.jsx)(v.p,{placeholder:"Search archived inquiries...",className:"pl-10 bg-white",value:z,onChange:function(e){return ee(e.target.value)}})]})})]}),(0,M.jsx)(w.Wu,{className:"p-0",children:U?(0,M.jsx)("div",{className:"flex items-center justify-center h-[400px]",children:(0,M.jsxs)("div",{className:"flex flex-col items-center",children:[(0,M.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-500 mb-4"}),(0,M.jsx)("p",{className:"text-slate-500",children:"Loading archived inquiries..."})]})}):0===eh.length?(0,M.jsxs)("div",{className:"flex flex-col items-center justify-center h-[400px] text-center p-4",children:[(0,M.jsx)("div",{className:"bg-slate-100 rounded-full p-4 mb-4",children:(0,M.jsx)(k.A,{className:"h-8 w-8 text-slate-500"})}),(0,M.jsx)("h3",{className:"text-lg font-medium text-slate-800 mb-2",children:"No archived inquiries"}),(0,M.jsx)("p",{className:"text-slate-500 max-w-md",children:"Archived inquiries will appear here"})]}):(0,M.jsx)("div",{className:"overflow-auto",children:(0,M.jsxs)(g.XI,{children:[(0,M.jsx)(g.A0,{className:"bg-slate-50",children:(0,M.jsxs)(g.Hj,{children:[(0,M.jsx)(g.nd,{className:"text-slate-600",children:"Customer"}),(0,M.jsx)(g.nd,{className:"text-slate-600",children:"Email"}),(0,M.jsx)(g.nd,{className:"text-slate-600",children:"Phone"}),(0,M.jsx)(g.nd,{className:"text-slate-600",children:"Status"}),(0,M.jsx)(g.nd,{className:"text-slate-600",children:"Archived Date"}),(0,M.jsx)(g.nd,{className:"text-slate-600",children:"Actions"})]})}),(0,M.jsx)(g.BF,{children:eh.map(function(e){var s;return(0,M.jsxs)(g.Hj,{className:"hover:bg-slate-50",children:[(0,M.jsx)(g.nA,{children:(0,M.jsx)("p",{className:"font-medium text-slate-800",children:null!=(s=e["Full Name"])?s:"No Name"})}),(0,M.jsx)(g.nA,{children:e.Email||"N/A"}),(0,M.jsx)(g.nA,{children:e["Phone Number"]||"N/A"}),(0,M.jsx)(g.nA,{children:J(eU(e))}),(0,M.jsx)(g.nA,{children:Y(e.archivedAt)}),(0,M.jsx)(g.nA,{children:(0,M.jsx)(j.$,{variant:"outline",size:"sm",onClick:function(){return eT(e)},children:"Unarchive"})})]},e.id)})})]})})})]})}),(0,M.jsx)(N.av,{value:"messages",children:(0,M.jsx)(V,{currentUser:D})})]})})]}),(0,M.jsx)(G,{open:ea,onClose:function(){ei(!1),eu(null)},inquiry:ec,currentUser:D,refreshInquiries:eB}),(0,M.jsx)(I.lG,{open:e_,onOpenChange:eL,children:(0,M.jsxs)(I.Cf,{className:"max-w-[420px] bg-white",children:[(0,M.jsx)(I.c7,{children:(0,M.jsx)(I.L3,{className:"text-slate-800",children:"Select Date Range"})}),(0,M.jsx)("div",{className:"py-4",children:(0,M.jsx)(E.V,{mode:"range",selected:null!=eS&&eS.from?eS:void 0,onSelect:function(e){eE({from:null==e?void 0:e.from,to:null==e?void 0:e.to})}})}),(0,M.jsxs)(I.Es,{children:[(0,M.jsx)(j.$,{variant:"outline",onClick:function(){return eL(!1)},children:"Close"}),(0,M.jsx)(j.$,{onClick:function(){return eL(!1)},children:"Apply"})]})]})})]})]})}):(0,M.jsx)(m.A,{children:(0,M.jsxs)("div",{className:"p-8",children:[(0,M.jsx)("h2",{className:"text-xl font-bold",children:"Please sign in to view your inquiries."}),(0,M.jsx)(j.$,{variant:"outline",className:"mt-4",onClick:function(){return c.push("/login")},children:"Go to Login"})]})})}function J(e){switch(e){case"New":return(0,M.jsx)(y.E,{className:"bg-blue-100 text-blue-800",children:e});case"In Progress":return(0,M.jsx)(y.E,{className:"bg-yellow-100 text-yellow-800",children:e});case"Quoted":return(0,M.jsx)(y.E,{className:"bg-purple-100 text-purple-800",children:e});case"Closed (Won)":return(0,M.jsx)(y.E,{className:"bg-green-100 text-green-800",children:e});case"Closed (Lost)":return(0,M.jsx)(y.E,{className:"bg-red-100 text-red-800",children:e});default:return(0,M.jsx)(y.E,{className:"bg-slate-100 text-slate-800",children:e})}}function K(e){if(!e)return null;if("string"==typeof e){var s=e.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{1,2}):(\d{2})\s*(AM|PM)$/i);if(s){var t=(0,a.A)(s,7),r=(t[0],t[1]),n=t[2],i=t[3],l=t[4],c=t[5],u=t[6],o=parseInt(l,10);return"PM"===u.toUpperCase()&&o<12?o+=12:"AM"===u.toUpperCase()&&12===o&&(o=0),new Date(parseInt(r,10),parseInt(n,10)-1,parseInt(i,10),o,parseInt(c,10),0)}var d=new Date(e);return isNaN(d.getTime())?null:d}if("object"==typeof e&&"function"==typeof e.toDate)return e.toDate();var m=new Date(e);return isNaN(m.getTime())?null:m}function Y(e){var s=K(e);return s?new Intl.DateTimeFormat("en-US",{month:"numeric",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}).format(s):"Invalid Date"}},78293:(e,s,t)=>{"use strict";t.d(s,{T:()=>o});var r=t(42969),n=t(59860),a=t(14232),i=t(11192),l=t(37876),c=["className"];function u(e,s){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);s&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,r)}return t}var o=a.forwardRef(function(e,s){var t=e.className,a=(0,n.A)(e,c);return(0,l.jsx)("textarea",function(e){for(var s=1;s<arguments.length;s++){var t=null!=arguments[s]?arguments[s]:{};
1s%2?u(Object(t),!0).forEach(function(s){(0,r.A)(e,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s))})}return e}({className:(0,i.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:s},a))});o.displayName="Textarea"},82507:(e,s,t)=>{"use strict";t.d(s,{Xi:()=>p,av:()=>b,j7:()=>f,tU:()=>h});var r=t(42969),n=t(59860),a=t(14232),i=t(90491),l=t(11192),c=t(37876),u=["className"],o=["className"],d=["className"];function m(e,s){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);s&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,r)}return t}function x(e){for(var s=1;s<arguments.length;s++){var t=null!=arguments[s]?arguments[s]:{};s%2?m(Object(t),!0).forEach(function(s){(0,r.A)(e,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s))})}return e}var h=i.bL,f=a.forwardRef(function(e,s){var t=e.className,r=(0,n.A)(e,u);return(0,c.jsx)(i.B8,x({ref:s,className:(0,l.cn)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t)},r))});f.displayName=i.B8.displayName;var p=a.forwardRef(function(e,s){var t=e.className,r=(0,n.A)(e,o);return(0,c.jsx)(i.l9,x({ref:s,className:(0,l.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t)},r))});p.displayName=i.l9.displayName;var b=a.forwardRef(function(e,s){var t=e.className,r=(0,n.A)(e,d);return(0,c.jsx)(i.UC,x({ref:s,className:(0,l.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t)},r))});b.displayName=i.UC.displayName},86393:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/vendor-dashboard/inquiries",function(){return t(73962)}])}},e=>{var s=s=>e(e.s=s);e.O(0,[6671,4695,722,4287,438,4e3,8230,6090,8212,215,1579,4699,2140,4879,9495,8176,2889,3355,1598,5689,6153,2345,8662,636,6593,8792],()=>s(86393)),_N_E=e.O()}]);

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.