1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2221],{17257:function(e,n,t){t.r(n);var i=t(27573),o=t(82537),a=t(63562),r=t(24842),l=t(26537);n.default=e=>{let{message:n,size:t="lg"}=e;return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(o.M,{position:"absolute",inset:0,zIndex:9999,children:(0,i.jsxs)(a.g,{children:[(0,i.jsx)(l.$,{thickness:"4px",speed:"0.65s",color:"blue.500",size:t,mb:2}),(0,i.jsx)(r.x,{children:n})]})})})}},12221:function(e,n,t){t.r(n),t.d(n,{default:function(){return Notification}});var i,o,a=t(27573),r=t(7653),l=t(62759),d=t(9803),s=t(53504),c=t(37839),u=t(84556),g=t(96293),mcp_icons_NotiIcon=e=>(0,a.jsx)(g.J,{width:"20px",height:"20px",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,a.jsx)("path",{d:"M7.79642 17.4974C8.38403 18.016 9.15591 18.3307 10.0013 18.3307C10.8466 18.3307 11.6185 18.016 12.2061 17.4974M15.0013 6.66406C15.0013 5.33798 14.4745 4.06621 13.5368 3.12853C12.5991 2.19085 11.3274 1.66406 10.0013 1.66406C8.6752 1.66406 7.40343 2.19085 6.46574 3.12853C5.52806 4.06621 5.00128 5.33798 5.00128 6.66406C5.00128 9.23922 4.35167 11.0024 3.626 12.1686C3.01388 13.1523 2.70783 13.6442 2.71905 13.7814C2.73147 13.9333 2.76366 13.9912 2.88609 14.082C2.99666 14.1641 3.4951 14.1641 4.49199 14.1641H15.5106C16.5075 14.1641 17.0059 14.1641 17.1165 14.082C17.2389 13.9912 17.2711 13.9333 17.2835 13.7814C17.2947 13.6442 16.9887 13.1523 16.3766 12.1686C15.6509 11.0024 15.0013 9.23922 15.0013 6.66406Z",stroke:"#667085",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),v=t(32859),h=t(82771),p=t(31462),x=t(24842),m=t(34380),f=t(98187),C=t(66645),j=t(82537),M=t(40604),y=t(98910),b=t.n(y),E=t(39342),I=t.n(E),k=t(20428),w=t.n(k),T=t(6429),R=t.n(T),_=t(81773),N=t(17257),W=t(42007),q=t(35085),mcp_icons_ArrowBlockUpIcon=e=>(0,a.jsx)(g.J,{width:"20px",height:"20px",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,a.jsx)("path",{d:"M8.16675 17.5C7.93339 17.5 7.81671 17.5 7.72759 17.4546C7.64918 17.4146 7.58544 17.3509 7.5455 17.2725C7.50008 17.1834 7.50008 17.0667 7.50008 16.8333V8.33333H4.16675L10.0001 2.5L15.8334 8.33333H12.5001V16.8333C12.5001 17.0667 12.5001 17.1834 12.4547 17.2725C12.4147 17.3509 12.351 17.4146 12.2726 17.4546C12.1834 17.5 12.0668 17.5 11.8334 17.5H8.16675Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),mcp_icons_MessageDotsSquareIcon=e=>(0,a.jsx)(g.J,{width:"24px",height:"24px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,a.jsx)("path",{d:"M7.5 10.5H7.51M12 10.5H12.01M16.5 10.5H16.51M7 18V20.3355C7 20.8684 7 21.1348 7.10923 21.2716C7.20422 21.3906 7.34827 21.4599 7.50054 21.4597C7.67563 21.4595 7.88367 21.2931 8.29976 20.9602L10.6852 19.0518C11.1725 18.662 11.4162 18.4671 11.6875 18.3285C11.9282 18.2055 12.1844 18.1156 12.4492 18.0613C12.7477 18 13.0597 18 13.6837 18H16.2C17.8802 18 18.7202 18 19.362 17.673C19.9265 17.3854 20.3854 16.9265 20.673 16.362C21 15.7202 21 14.8802 21 13.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V14C3 14.93 3 15.395 3.10222 15.7765C3.37962 16.8117 4.18827 17.6204 5.22354 17.8978C5.60504 18 6.07003 18 7 18ZM8 10.5C8 10.7761 7.77614 11 7.5 11C7.22386 11 7 10.7761 7 10.5C7 10.2239 7.22386 10 7.5 10C7.77614 10 8 10.2239 8 10.5ZM12.5 10.5C12.5 10.7761 12.2761 11 12 11C11.7239 11 11.5 10.7761 11.5 10.5C11.5 10.2239 11.7239 10 12 10C12.2761 10 12.5 10.2239 12.5 10.5ZM17 10.5C17 10.7761 16.7761 11 16.5 11C16.2239 11 16 10.7761 16 10.5C16 10.2239 16.2239 10 16.5 10C16.7761 10 17 10.2239 17 10.5Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Y=t(22499),P=t(50309),D=t(73460),H=t(97105),A=t(13742),F=t(97699),L=t.n(F),S=t(2521),Notification_NotificationDescription=e=>{var n,t,i,o,r,l,d,s,c,u,g,v,h,p,m,f,C,j,M,y,E,I,k,w,T,R,_,N,W,q,Y,P,D,H,A,F,z,V,U,Z,B,J,O,Q,G,$,K,X,ee,en,et,ei,eo,ea,er,el,ed,es,ec,eu,eg,ev,eh;let{item:ep}=e;switch(null==ep?void 0:ep.type){case S.ET.MeetingWaitingForConfirmationIntegrationEvent:return(0,a.jsxs)(x.x,{children:["You have booked a meeting with coach\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:null==ep?void 0:null===(i=ep.payload)||void 0===i?void 0:null===(t=i.meeting)||void 0===t?void 0:null===(n=t.coach)||void 0===n?void 0:n.name}),"\xa0for a\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:L()(null==ep?void 0:null===(r=ep.payload)||void 0===r?void 0:null===(o=r.meeting)||void 0===o?void 0:o.serviceType)}),"."]});case S.ET.MeetingConfirmedIntegrationEvent:return(0,a.jsxs)(x.x,{children:["Coach\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:null==ep?void 0:null===(s=ep.payload)||void 0===s?void 0:null===(d=s.meeting)||void 0===d?void 0:null===(l=d.coach)||void 0===l?void 0:l.name}),"\xa0has comfirmed your\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:L()(null==ep?void 0:null===(u=ep.payload)||void 0===u?void 0:null===(c=u.meeting)||void 0===c?void 0:c.serviceType)}),"\xa0meeting."]});case S.ET.MeetingCancelledIntegrationEvent:return(0,a.jsx)(a.Fragment,{children:(null==ep?void 0:null===(v=ep.payload)||void 0===v?void 0:null===(g=v.request)||void 0===g?void 0:g.reason)==="coach_rejected"?(0,a.jsxs)(x.x,{children:["Your booking with coach\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:null==ep?void 0:null===(m=ep.payload)||void 0===m?void 0:null===(p=m.meeting)||void 0===p?void 0:null===(h=p.coach)||void 0===h?void 0:h.name}),"\xa0on\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:b()(null==ep?void 0:null===(C=ep.payload)||void 0===C?void 0:null===(f=C.meeting)||void 0===f?void 0:f.schedule.startTime).format("HH:mm - MMM DD YYYY")}),"\xa0for\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:L()(null==ep?void 0:null===(M=ep.payload)||void 0===M?void 0:null===(j=M.meeting)||void 0===j?void 0:j.serviceType)}),"\xa0has been rejected. Chat with the coach to choose another suitable timeslot"]}):(0,a.jsxs)(x.x,{children:["Your\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:L()(null==ep?void 0:null===(E=ep.payload)||void 0===E?void 0:null===(y=E.meeting)||void 0===y?void 0:y.serviceType)}),"\xa0booking with the coach\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:null==ep?void 0:null===(w=ep.payload)||void 0===w?void 0:null===(k=w.meeting)||void 0===k?void 0:null===(I=k.coach)||void 0===I?void 0:I.name}),"\xa0on\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:b()(null==ep?void 0:null===(R=ep.payload)||void 0===R?void 0:null===(T=R.meeting)||void 0===T?void 0:T.schedule.startTime).format("HH:mm - MMM DD YYYY")}),"\xa0has been cancelled. You cannot have a meeting in the past."]})});case S.ET.MeetingInProgressIntegrationEvent:return(0,a.jsxs)(x.x,{children:["Your\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:L()(null==ep?void 0:null===(N=ep.payload)||void 0===N?void 0:null===(_=N.meeting)||void 0===_?void 0:_.serviceType)}),"\xa0with coach\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:null==ep?void 0:null===(Y=ep.payload)||void 0===Y?void 0:null===(q=Y.meeting)||void 0===q?void 0:null===(W=q.coach)||void 0===W?void 0:W.name}),"\xa0on\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:b()(null==ep?void 0:null===(D=ep.payload)||void 0===D?void 0:null===(P=D.meeting)||void 0===P?void 0:P.schedule.startTime).format("HH:mm - MMM DD YYYY")}),"\xa0has started. Join the meeting now!"]});case S.ET.MeetingEndedIntegrationEvent:return(0,a.jsxs)(x.x,{children:["Your\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:L()(null==ep?void 0:null===(A=ep.payload)||void 0===A?void 0:null===(H=A.meeting)||void 0===H?void 0:H.serviceType)}),"\xa0with coach\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:null==ep?void 0:null===(V=ep.payload)||void 0===V?void 0:null===(z=V.meeting)||void 0===z?void 0:null===(F=z.coach)||void 0===F?void 0:F.name}),"\xa0on\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:b()(null==ep?void 0:null===(Z=ep.payload)||void 0===Z?void 0:null===(U=Z.meeting)||void 0===U?void 0:U.schedule.startTime).format("HH:mm - MMM DD YYYY")}),"\xa0has ended. You need to mark the meeting 'Completed' as soon as possible."]});case S.ET.MeetingCompletedIntegrationEvent:return(0,a.jsxs)(x.x,{children:["Your\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:L()(null==ep?void 0:null===(J=ep.payload)||void 0===J?void 0:null===(B=J.meeting)||void 0===B?void 0:B.serviceType)}),"\xa0with coach\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:L()(null==ep?void 0:null===(G=ep.payload)||void 0===G?void 0:null===(Q=G.meeting)||void 0===Q?void 0:null===(O=Q.coach)||void 0===O?void 0:O.name)}),"\xa0on\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:b()(null==ep?void 0:null===(K=ep.payload)||void 0===K?void 0:null===($=K.meeting)||void 0===$?void 0:$.schedule.startTime).format("HH:mm - MMM DD YYYY")}),"\xa0has completed."]});case S.ET.MeetingRequestCreatedIntegrationEvent:return(0,a.jsxs)(x.x,{children:["Coach\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:null==ep?void 0:null===(en=ep.payload)||void 0===en?void 0:null===(ee=en.meeting)||void 0===ee?void 0:null===(X=ee.coach)||void 0===X?void 0:X.name}),"\xa0has requested to reschedule a\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:L()(null==ep?void 0:null===(ei=ep.payload)||void 0===ei?void 0:null===(et=ei.meeting)||void 0===et?void 0:et.serviceType)}),". Confirm the changed time as soon as possible!"]});case S.ET.MeetingRequestApprovedIntegrationEvent:return(0,a.jsxs)(x.x,{children:["Coach\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:null==ep?void 0:null===(er=ep.payload)||void 0===er?void 0:null===(ea=er.meeting)||void 0===ea?void 0:null===(eo=ea.coach)||void 0===eo?void 0:eo.name}),"\xa0has confirmed your reschedule request. The new time for\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:L()(null==ep?void 0:null===(ed=ep.payload)||void 0===ed?void 0:null===(el=ed.meeting)||void 0===el?void 0:el.serviceType)}),"\xa0 will happen on."]});case S.ET.MeetingRequestDeclinedIntegrationEvent:return(0,a.jsxs)(x.x,{children:["Coach\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:null==ep?void 0:null===(eu=ep.payload)||void 0===eu?void 0:null===(ec=eu.meeting)||void 0===ec?void 0:null===(es=ec.coach)||void 0===es?void 0:es.name}),"\xa0has rejected your reschedule request for the\xa0",(0,a.jsx)(x.x,{as:"span",fontWeight:"bold",children:L()(null==ep?void 0:null===(ev=ep.payload)||void 0===ev?void 0:null===(eg=ev.meeting)||void 0===eg?void 0:eg.serviceType)}),"."]});case S.ET.MeetingProposalAcceptedIntegrationEvent:case S.ET.MeetingReminded:case S.ET.MeetingRequestRescheduleIntegrationEvent:case S.ET.MeetingProposalRejectedIntegrationEvent:case S.ET.MeetingProposalCreatedIntegrationEvent:case S.ET.UpcomingMeetingCancelledIntegrationEvent:return(0,a.jsx)(x.x,{fontSize:"sm",dangerouslySetInnerHTML:{__html:null==ep?void 0:null===(eh=ep.payload)||void 0===eh?void 0:eh.message}});default:return null}},z=t(34902),Notification_NotificationFooter=e=>{let{startTime:n,endTime:t,type:i,timezone:o}=e,l=(0,r.useMemo)(()=>
1{switch(i){case"coaching_booking.MeetingRequestCreatedIntegrationEvent":return"blue.600";case"coaching_booking.MeetingRequestDeclinedIntegrationEvent":return"gray.400";default:return"gray.600"}},[i]);return(0,a.jsx)(q.k,{style:{color:l},gap:2.5,mt:4,children:(()=>{switch(i){case"coaching_booking.MeetingWaitingForConfirmationIntegrationEvent":case"coaching_booking.MeetingConfirmedIntegrationEvent":case"coaching_booking.MeetingRequestApprovedIntegrationEvent":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(z.Z,{color:l}),(0,a.jsx)(x.x,{fontWeight:"bold",fontSize:"sm",children:b()(n).format("HH:mm - MMM DD YYYY")})]});case"coaching_booking.MeetingRequestCreatedIntegrationEvent":case"coaching_booking.MeetingRequestDeclinedIntegrationEvent":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(z.Z,{color:l}),(0,a.jsxs)(x.x,{fontWeight:"bold",fontSize:"sm",color:l,textDecoration:"underline",children:["From"," ",b()(n).format("HH:mm - MMM DD YYYY"),(0,a.jsx)("br",{}),"To"," ",b()(t).format("HH:mm - MMM DD YYYY")]})]});default:return null}})()})},Notification_NotificationContent=e=>{var n,t,i,o,r,l;let{title:d,item:c}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(q.k,{gap:"5px",justifyContent:"space-between",children:[(0,a.jsx)(q.k,{flex:"1",gap:"2",alignItems:"center",flexWrap:"wrap",children:(0,a.jsx)(x.x,{color:"gray.700",fontSize:"sm",fontWeight:"medium",children:d})}),!(null==c?void 0:c.readAt)&&(0,a.jsx)(s.xu,{bg:"blue.500",boxSize:"8px",rounded:"full"})]}),(0,a.jsx)(Notification_NotificationDescription,{item:c}),(0,a.jsx)(q.k,{gap:"5px",children:(0,a.jsx)(Notification_NotificationFooter,{startTime:null==c?void 0:null===(t=c.payload)||void 0===t?void 0:null===(n=t.meeting)||void 0===n?void 0:n.schedule.startTime,endTime:null==c?void 0:null===(o=c.payload)||void 0===o?void 0:null===(i=o.meeting)||void 0===i?void 0:i.schedule.endTime,type:null==c?void 0:c.type,timezone:null==c?void 0:null===(l=c.payload)||void 0===l?void 0:null===(r=l.meeting)||void 0===r?void 0:r.candidateTimezone})}),(0,a.jsx)(x.x,{fontSize:"xs",color:(null==c?void 0:c.readAt)?"gray.600":"blue.600",children:b()(null==c?void 0:c.createdAt).fromNow(!0)})]})},V=t(27723),U=t(42536),Z=t.n(U);(i=o||(o={})).Json="application/json",i.FormData="multipart/form-data",i.UrlEncoded="application/x-www-form-urlencoded";
1let HttpClient=class HttpClient{mergeRequestParams(e,n){return{...this.instance.defaults,...e,...n||{},headers:{...this.instance.defaults.headers||{},...e.headers||{},...n&&n.headers||{}}}}createFormData(e){return Object.keys(e||{}).reduce((n,t)=>{let i=e[t];return n.append(t,i instanceof Blob?i:"object"==typeof i&&null!==i?JSON.stringify(i):"".concat(i)),n},new FormData)}constructor({securityWorker:e,secure:n,format:t,...i}={}){this.securityData=null,this.setSecurityData=e=>{this.securityData=e},this.request=async e=>{let{secure:n,path:t,type:i,query:o,format:a,body:r,...l}=e,d=("boolean"==typeof n?n:this.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},s=this.mergeRequestParams(l,d),c=a&&this.format||void 0;return"multipart/form-data"===i&&r&&null!==r&&"object"==typeof r&&(s.headers.common={Accept:"*/*"},s.headers.post={},s.headers.put={},r=this.createFormData(r)),this.instance.request({...s,headers:{...i&&"multipart/form-data"!==i?{"Content-Type":i}:{},...s.headers||{}},params:o,responseType:c,data:r,url:t})},this.instance=Z().create({...i,baseURL:i.baseURL||""}),this.secure=n,this.format=t,this.securityWorker=e}};var B=t(80187),J=t.n(B);let securityWorker=async()=>({headers:{accept:"application/json;charset=UTF-8","Content-type":"application/json"}}),O=new class extends HttpClient{constructor(...e){var n;super(...e),n=this,this.notifications={notificationControllerIndex:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.request({path:"/notifications",method:"GET",query:e,secure:!0,format:"json",...t})},notificationControllerSend:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.request({path:"/notifications",method:"POST",body:e,secure:!0,type:"application/json",...t})},notificationControllerMarkAsRead:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.request({path:"/notifications/".concat(e,"/mark-as-read"),method:"PUT",secure:!0,...t})},notificationControllerMarkAllAsRead:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.request({path:"/notifications/mark-as-read",method:"PUT",secure:!0,...e})}}}}({securityWorker,withCredentials:!0,paramsSerializer:e=>e?J().stringify(e,{arrayFormat:"repeat"}):"",baseURL:"https://notification-service.mconsultingprep.com"});var Notification_NotificationItem=e=>{var n,t;let{item:i,refetch:o,onSelected:r=()=>{},isLast:l}=e,d=(0,v.useRouter)(),c=(0,M.useMutation)(e=>O.notifications.notificationControllerMarkAsRead(e));return(0,a.jsx)(W.f,{display:"block",px:3,borderBottom:l?"none":"1px solid",borderColor:"gray.200",_hover:{bg:"gray.100",rounded:"md"},children:(0,a.jsx)(W.A,{onClick:()=>{c.mutate(i.id,{onSuccess:()=>{var e,n,t,a,l,s,c,u;if(r(),o(),null==i?void 0:i.type.includes("community."))return(null==i?void 0:null===(a=i.payload)||void 0===a?void 0:null===(t=a.target)||void 0===t?void 0:t.postId)&&(location.href="/community/consulting/".concat(null==i?void 0:null===(s=i.payload)||void 0===s?void 0:null===(l=s.target)||void 0===l?void 0:l.postId,"#").concat(null==i?void 0:null===(u=i.payload)||void 0===u?void 0:null===(c=u.target)||void 0===c?void 0:c.commentId)),d.push("/community/consulting");if(null==i?void 0:i.type.includes("case-partner."))return(null==i?void 0:i.type)===S.ET.MeetingCompletedIntegrationEvent?d.push("/dashboard/appointments/case-partner/PastMeetings"):(null==i?void 0:i.type)===S.ET.MeetingRequestRescheduleIntegrationEvent?d.push("/dashboard/appointments/case-partner/MyProposals"):d.push("/dashboard/appointments/case-partner/UpcomingMeetings");let g=null==i?void 0:null===(n=i.payload)||void 0===n?void 0:null===(e=n.meeting)||void 0===e?void 0:e.id;d.push("/dashboard/appointments/meeting-management/".concat(g))}})},cursor:"pointer",children:(0,a.jsxs)(q.k,{gap:3,py:4,children:[(0,a.jsxs)(s.xu,{position:"relative",height:"fit-content",children:[(0,a.jsxs)(D.q,{className:"w-12 h-12",children:[(0,a.jsx)(A.F,{src:(0,V.Jn)({path:null==i?void 0:null===(t=i.payload.meeting)||void 0===t?void 0:null===(n=t.coach)||void 0===n?void 0:n.avatar,width:48,height:48})}),(0,a.jsx)(H.Q,{children:(0,a.jsx)(Y.Z,{boxSize:"24px"})})]}),(0,a.jsx)(s.xu,{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",bottom:0,right:0,rounded:"full",boxSize:4,border:"1px solid",borderColor:"white",bg:"blue.50",children:(()=>{switch(null==i?void 0:i.type){case S.ET.CommentAddedIntegrationEvent:return(0,a.jsx)(mcp_icons_MessageDotsSquareIcon,{fill:"blue.600",color:"blue.600",boxSize:"12px"});case S.ET.CommentVotedIntegrationEvent:case S.ET.PostVotedIntegrationEvent:return(0,a.jsx)(mcp_icons_ArrowBlockUpIcon,{fill:"blue.600",color:"blue.600",boxSize:"12px"});default:return(0,a.jsx)(P.Z,{fill:"#6938EF",color:"#6938EF",boxSize:"12px"})}})()})]}),(0,a.jsx)(s.xu,{flex:1,children:(()=>{switch(null==i?void 0:i.type){case S.ET.MeetingWaitingForConfirmationIntegrationEvent:return(0,a.jsx)(Notification_NotificationContent,{title:"Waiting for Confirmation",item:i});case S.ET.MeetingConfirmedIntegrationEvent:return(0,a.jsx)(Notification_NotificationContent,{title:"Meeting confirmed",item:i});case S.ET.MeetingCancelledIntegrationEvent:var e,n;return(0,a.jsx)(Notification_NotificationContent,{title:(null==i?void 0:null===(n=i.payload)||void 0===n?void 0:null===(e=n.request)||void 0===e?void 0:e.reason)==="coach_rejected"?"Booking rejected":"Booking cancelled",item:i});case S.ET.MeetingInProgressIntegrationEvent:return(0,a.jsx)(Notification_NotificationContent,{title:"Meeting started",item:i});case S.ET.MeetingEndedIntegrationEvent:return(0,a.jsx)(Notification_NotificationContent,{title:"Mark your meeting Completed",item:i});case S.ET.MeetingRequestCreatedIntegrationEvent:return(0,a.jsx)(Notification_NotificationContent,{title:"You have a reschedule request",item:i});case S.ET.MeetingRequestApprovedIntegrationEvent:return(0,a.jsx)(Notification_NotificationContent,{title:"Reschedule request accepted",item:i});case S.ET.MeetingRequestDeclinedIntegrationEvent:return(0,a.jsx)(Notification_NotificationContent,{title:"Reschedule request rejected",item:i});default:return null}})()})]})})})};b().extend(I()),b().extend(w()),b().extend(R());var Notification_NotificationList=e=>{var n,t,i;let{notification:o,refetch:l=()=>{},onSelected:d=()=>{},isLoading:c,fetchNextPage:u,hasNextPage:g,isFetchingNextPage:v}=e,{ref:y,inView:b}=(0,_.YD)(),E=(0,M.useMutation)(["notificationControllerMarkAllAsRead"],O.notifications.notificationControllerMarkAllAsRead);return(0,r.useEffect)(()=>{b&&g&&u&&u()},[b,g]),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(h.y,{w:{base:"sm",lg:"417px"},children:[(0,a.jsxs)(p.Y,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,a.jsx)(x.x,{fontWeight:600,fontSize:"2xl",color:"gray.900",children:"Notification"}),(0,a.jsx)(m.z,{variant:"link",onClick:()=>{E.mutate(void 0,{onSuccess:()=>{l(),d()}})},colorScheme:(null==o?void 0:null===(n=o.pages[0])||void 0===n?void 0:n.unread)?"blue":"gray",color:(null==o?void 0:null===(t=o.pages[0])||void 0===t?void 0:t.unread)?"blue":"gray",fontWeight:600,children:"Mark all read"})]}),(0,a.jsx)(f.Q,{}),(0,a.jsx)(C.b,{maxHeight:"85vh",overflowY:"auto",paddingRight:0,children:(null==o?void 0:null===(i=o.pages[0].data)||void 0===i?void 0:i.length)?null==o?void 0:o.pages.map(e=>{var n;return(0,a.jsxs)(r.Fragment,{children:[c&&(0,a.jsx)(N.default,{size:"md"}),null===(n=e.data)||void 0===n?void 0:n.map((n,t)=>{var i;return(0,a.jsx)(Notification_NotificationItem,{item:n,refetch:l,onSelected:d,isLast:t===Number(null===(i=e.data)||void 0===i?void 0:i.length)-1},n.id)}),(0,a.jsx)(s.xu,{ref:y,pos:"relative",children:v&&(0,a.jsx)(N.default,{size:"md"})})]},null==e?void 0:e.pagination.currentPage)}):(0,a.jsx)(j.M,{p:5,children:(0,a.jsx)(x.x,{children:"There is no notification yet"})})})]})})},Q=t(31708),G=t(65895);let useNotifications=()=>{let{isLogged:e}=(0,G.L)(),{refetch:n,data:t,isLoading:i,fetchNextPage:o,...a}=(0,Q.useInfiniteQuery)(["notificationControllerIndex"],e=>{let{pageParam:n}=e;return O.notifications.notificationControllerIndex({page:n||1,limit:10}).then(e=>e.data)},{enabled:e,refetchOnReconnect:!0,refetchOnWindowFocus:!0,getNextPageParam:e=>{let{pagination:{hasNextPage:n,currentPage:t}}=e;return n?t+1:void 0}});return{data:t,isLoading:i,fetchNextPage:o,refetch:n,...a}};var Notification=()=>{let e=r.useRef(null),n=(0,v.usePathname)(),{data:t,refetch:i,isLoading:o,fetchNextPage:g,hasNextPage:h,isFetchingNextPage:p}=useNotifications();return null==n||n.startsWith("/online-class/"),(0,a.jsx)(l.J,{initialFocusRef:e,placement:"bottom",isLazy:!0,children:e=>{var n,r;let{onClose:l}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.x,{children:(0,a.jsxs)(s.xu,{position:"relative",children:[(0,a.jsx)(c.h,{"aria-label":"Notification",isRound:!0,size:"md",icon:(0,a.jsx)(mcp_icons_NotiIcon,{color:"gray.400"})}),!!(null==t?void 0:null===(n=t.pages[0])||void 0===n?void 0:n.unread)&&(0,a.jsx)(u.C,{cursor:"pointer",bg:"red.500",color:"white",position:"absolute",top:-2,right:-2,children:null==t?void 0:null===(r=t.pages[0])||void 0===r?void 0:r.unread})]})}),(0,a.jsx)(Notification_NotificationList,{notification:t,refetch:i,onSelected:l,isLoading:o,fetchNextPage:g,hasNextPage:h,isFetchingNextPage:p})]})}})}},2521:function(e,n,t){var i,o,a,r,l,d,s,c;t.d(n,{ET:function(){return a},o:function(){return r},re:function(){return i},zR:function(){return o}}),(l=i||(i={})).Text="Text",l.TextArea="TextArea",l.Input="Input",l.Number="Number",l.PhoneNumber="PhoneNumber",l.Radio="Radio",l.Select="Select",l.UploadAvatar="UploadAvatar",l.Upload="Upload",l.DatePicker="DatePicker",(d=o||(o={}
1))["meeting.created"]="",d["meeting.waiting_for_confirmation"]="Waiting for Confirmation",d["meeting.confirmed"]="Meeting Confirmed",d["meeting.in_progress"]="Meeting In Progress",d["meeting.ended"]="Meeting Ended",d["meeting.completed"]="Meeting Completed",d["meeting.cancelled"]="Meeting Cancelled",d["meeting.refunded"]="Meeting Refunded",d["meeting.rescheduled"]="Meeting Rescheduled",d["meeting.request_approved"]="Rescheduling Request Accepted",d["meeting.request_declined"]="Rescheduling Request Rejected",d["meeting.request_created"]="Request to Reschedule",(s=a||(a={})).MeetingWaitingForConfirmationIntegrationEvent="coaching_booking.MeetingWaitingForConfirmationIntegrationEvent",s.MeetingConfirmedIntegrationEvent="coaching_booking.MeetingConfirmedIntegrationEvent",s.MeetingCancelledIntegrationEvent="coaching_booking.MeetingCancelledIntegrationEvent",s.MeetingInProgressIntegrationEvent="coaching_booking.MeetingInProgressIntegrationEvent",s.MeetingEndedIntegrationEvent="coaching_booking.MeetingEndedIntegrationEvent",s.MeetingRequestCreatedIntegrationEvent="coaching_booking.MeetingRequestCreatedIntegrationEvent",s.MeetingRequestApprovedIntegrationEvent="coaching_booking.MeetingRequestApprovedIntegrationEvent",s.MeetingRequestDeclinedIntegrationEvent="coaching_booking.MeetingRequestDeclinedIntegrationEvent",s.CommentVotedIntegrationEvent="community.CommentVotedIntegrationEvent",s.CommentAddedIntegrationEvent="community.CommentAddedIntegrationEvent",s.PostVotedIntegrationEvent="community.PostVotedIntegrationEvent",s.MeetingProposalAcceptedIntegrationEvent="case-partner.MeetingProposalAcceptedIntegrationEvent",s.MeetingReminded="case-partner.MeetingReminded",s.MeetingCompletedIntegrationEvent="case-partner.MeetingCompletedIntegrationEvent",s.MeetingProposalCreatedIntegrationEvent="case-partner.MeetingProposalCreatedIntegrationEvent",s.MeetingRequestRescheduleIntegrationEvent="case-partner.MeetingProposalCreatedIntegrationEvent",s.MeetingProposalRejectedIntegrationEvent="case-partner.MeetingProposalRejectedIntegrationEvent",s.UpcomingMeetingCancelledIntegrationEvent="case-partner.MeetingCancelledIntegrationEvent",(c=r||(r={}))["order.created"]="Order Created",c["order.completed"]="Order Completed",c["order.changedToPaymentProcessing"]="Order Changed to Payment Processing"},34902:function(e,n,t){var i=t(27573);t(7653);var o=t(96293);n.Z=e=>(0,i.jsx)(o.J,{width:"20px",height:"20px",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,i.jsx)("path",{d:"M17.5 8.33073H2.5M13.3333 1.66406V4.9974M6.66667 1.66406V4.9974M6.5 18.3307H13.5C14.9001 18.3307 15.6002 18.3307 16.135 18.0582C16.6054 17.8186 16.9878 17.4361 17.2275 16.9657C17.5 16.4309 17.5 15.7309 17.5 14.3307V7.33073C17.5 5.9306 17.5 5.23053 17.2275 4.69575C16.9878 4.22535 16.6054 3.8429 16.135 3.60321C15.6002 3.33073 14.9001 3.33073 13.5 3.33073H6.5C5.09987 3.33073 4.3998 3.33073 3.86502 3.60321C3.39462 3.8429 3.01217 4.22535 2.77248 4.69575C2.5 5.23053 2.5 5.9306 2.5 7.33073V14.3307C2.5 15.7309 2.5 16.4309 2.77248 16.9657C3.01217 17.4361 3.39462 17.8186 3.86502 18.0582C4.3998 18.3307 5.09987 18.3307 6.5 18.3307Z",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})},50309:function(e,n,t){var i=t(27573);t(7653);var o=t(96293);n.Z=e=>(0,i.jsxs)(o.J,{width:"20px",height:"14px",viewBox:"0 0 20 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentcolor",...e,children:[(0,i.jsx)("path",{d:"M18.3332 4.44289C18.3332 3.93804 18.3332 3.68562 18.2333 3.56873C18.1467 3.46731 18.0168 3.41349 17.8838 3.42395C17.7306 3.43602 17.5521 3.61451 17.1951 3.97149L14.1665 7.00008L17.1951 10.0287C17.5521 10.3857 17.7306 10.5641 17.8838 10.5762C18.0168 10.5867 18.1467 10.5328 18.2333 10.4314C18.3332 10.3145 18.3332 10.0621 18.3332 9.55727V4.44289Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M1.6665 5.16675C1.6665 3.76662 1.6665 3.06655 1.93899 2.53177C2.17867 2.06137 2.56112 1.67892 3.03153 1.43923C3.56631 1.16675 4.26637 1.16675 5.6665 1.16675H10.1665C11.5666 1.16675 12.2667 1.16675 12.8015 1.43923C13.2719 1.67892 13.6543 2.06137 13.894 2.53177C14.1665 3.06655 14.1665 3.76662 14.1665 5.16675V8.83341C14.1665 10.2335 14.1665 10.9336 13.894 11.4684C13.6543 11.9388 13.2719 12.3212 12.8015 12.5609C12.2667 12.8334 11.5666 12.8334 10.1665 12.8334H5.6665C4.26637 12.8334 3.56631 12.8334 3.03153 12.5609C2.56112 12.3212 2.17867 11.9388 1.93899 11.4684C1.6665 10.9336 1.6665 10.2335 1.6665 8.83341V5.16675Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}}]);
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.