PageSourceSearch

https://dmeet.org/assets/BookedMeetingPage-Cfh3SSrW.js

js dmeet.org collected 2026-10-03 20:15:00 UTC 15,537 bytes, 2 lines download raw bytes

1import{j as e}from"./privy-C70SmBOt.js";import{l as ue,j as xe,k as ke,r as s}from"./vendor-BhTrWUXb.js";import{u as fe,bD as be,a0 as je,bE as ve,l as g,W as we,m as Ne}from"./main-BBzA3FFg.js";import{b as u}from"./bookingApi-Desj0YpI.js";import{S as Ce}from"./copy-NVE4vvpr.js";import{S as Se}from"./edit-BLQD0rTH.js";import{S as Me}from"./report-06HkIqnj.js";import{S as Be}from"./chevron-left-CYrrhRcP.js";import{S as _e}from"./workspacePaymentSuccessIcon-CjoRaRtL.js";import{S as ye,b as H,a as Te}from"./outlookCalendar-BjFs_uN3.js";import{b as De}from"./trophy-DQYCRlFU.js";import{S as Le}from"./check-DmYtuhFp.js";import{S as Re}from"./download-DeIOPaPA.js";import{S as Ae}from"./link-BdCGhMWL.js";import{S as $e}from"./no-show-ClrAgFcO.js";import{S as Ee}from"./show-wHS-8NRK.js";import{S as ze}from"./time-Cg5UFwQd.js";import{B as i}from"./Button-BPRjJCRv.js";import{A as f}from"./format-BivSU3Yd.js";import{a as Ie,g as He,U as Oe,D as Fe,C as Ge}from"./UpcomingMeetingReportModal-BdImUrDc.js";import{H as w,n as Pe}from"./Header-BvVDjABu.js";import{M as Qe}from"./MeetingStatusBadge-Bpnk3IIV.js";import{u as Ue}from"./useMeetingStatus-DuQT4vQH.js";import{a as m}from"./showToast-CGOq3eyy.js";import{f as O}from"./initialData-CRnLLGbO.js";import{u as Ke}from"./useTranslation-CekkJpM5.js";import"./livekit-Dp_s88T_.js";import"./ConfirmModal-DyvNspTs.js";import"./ModalWrapper-DMZyDz8V.js";import"./ReportReasonForm-Uh4oj-aR.js";import"./block-CAR6lDR7.js";import"./DMeetLogoIconWhite-TQ--9nCw.js";import"./twitter-8m99xLfh.js";import"./logo-Dy7UsQvX.js";import"./EditWorkspaceModal-DX_3g4e3.js";import"./externalLinks-CsZiAj85.js";import"./browser-1FmHklo7.js";import"./dijkstra-COg3n3zL.js";import"./CreateWorkspaceModal-BYR0rdcw.js";import"./PremiumBadge-B0nVveQO.js";import"./paid-V5pnzsMr.js";import"./LanguageFlag-BYsD_9RQ.js";import"./vietnamese-CQPx1B_6.js";import"./useChat-D2fgR6yS.js";import"./useClickOutside-D8UHsvkV.js";import"./chevron-up-gEhGzwby.js";import"./UiLanguageSelector-C8v9XWwE.js";const Xe="page_RLd75",Ze="main_MXDec",qe="content_lR6B3",We="backButton_sKACZ",Ye="hero_pKPKL",Je="heroBadges_eGB7P",Ve="badge_14X2H",en="badgeBooked_YM5gX",nn="badgeCancelled_rZ3y0",tn="badgeNoSh
1ow_TPglq",on="titleText_p9ysj",an="title_-xqzb",sn="subtitle_oBvZ5",cn="infoGrid_nzEbi",rn="card_ro1og",ln="cardFull_1FSTw",dn="cancelledCard_f03BC",mn="cardHeader_W9DsK",hn="cardContent_QOp-7",gn="noteCard_djUuM",pn="noteTitle_HJIQQ",un="noteText_RE20H",xn="noteTextExpanded_0HfRm",kn="noteShowMore_BfXdD",fn="infoRow_iUiYq",bn="infoText_vvTyS",jn="cancelledInfoRow_Nyi6i",vn="timeZone_QQzby",wn="cancelledDateContent_kC-e1",Nn="timeBlock_kc4g-",Cn="linkRow_QEg-O",Sn="linkText_iIIBD",Mn="cancellationContent_-nk7i",Bn="cancellationReason_8jmTg",_n="cancelledBy_66A6f",yn="cancellationActor_zoail",Tn="participantCount_tSWcY",Dn="participantsSection_Emhqb",Ln="sectionLabel_r4N1e",Rn="chips_onQr8",An="chip_7dp3C",$n="chipDeclined_RYD-e",En="chipAvatarDeclined_BsVCu",zn="chipName_malFn",In="chipNameDeclined_CjonJ",Hn="organizerBadge_rNQhr",On="workspaceBadge_8XnD2",Fn="guestsCount_kLo2-",Gn="calendarRow_bcKW6",Pn="calendarLabel_RMNIm",Qn="calendarButtons_HKBkG",Un="calendarBtnSoon_dTqnx",Kn="soonLabel_X26-A",Xn="actions_9KbL2",Zn="pastAction_HQ6ry",qn="rebookButton_F1niq",Wn="errorState_IXV2E",Yn="errorTitle_2LbfR",n={page:Xe,main:Ze,content:qe,backButton:We,hero:Ye,heroBadges:Je,badge:Ve,badgeBooked:en,badgeCancelled:nn,badgeNoShow:tn,titleText:on,title:an,subtitle:sn,infoGrid:cn,card:rn,cardFull:ln,cancelledCard:dn,cardHeader:mn,cardContent:hn,noteCard:gn,noteTitle:pn,noteText:un,noteTextExpanded:xn,noteShowMore:kn,infoRow:fn,infoText:bn,cancelledInfoRow:jn,timeZone:vn,cancelledDateContent:wn,timeBlock:Nn,linkRow:Cn,linkText:Sn,cancellationContent:Mn,cancellationReason:Bn,cancelledBy:_n,cancellationActor:yn,participantCount:Tn,participantsSection:Dn,sectionLabel:Ln,chips:Rn,chip:An,chipDeclined:$n,chipAvatarDeclined:En,chipName:zn,chipNameDeclined:In,organizerBadge:Hn,workspaceBadge:On,guestsCount:Fn,calendarRow:Gn,calendarLabel:Pn,calendarButtons:Qn,calendarBtnSoon:Un,soonLabel:Kn,actions:Xn,pastAction:Zn,rebookButton:qn,errorState:Wn,errorTitle:Yn},Kt=()=>{const{t:a}=Ke(),{bookedMeetingId:r}=ue(),l=xe(),b=fe(),x=ke().state,[t,p]=s.useState(null),[F,G]=s.useState(!0),[P,Q]=s.useState(!1),[U,j]=s.useState(!1),[K,v]=s.useState(!1),[X,N]=s.useState(!1),[C,S]=s.useState(!1),[Z,M]=s.useState(!1),B=s.useRef(null),[q,_]=s.useState(!1),[W,y]=s.useState(!1),[Y,T]=s.useState(!1),[J,V]=s.useState(!1);s.useEffect(()=>{r&&x?.rescheduled&&m({icon:e.jsx(Le,{width:16,height:16}),text:a("bookedMeeting.rescheduleToast")})},[r,x,a]),s.useEffect(()=>{if(!r)return;(async()=>{try{const c=await u.getBookedMeeting(r);S(!1),p(c)}catch(c){g.error("Failed to load booked meeting",c);const d=we(c);if(d.status===401){l("/",{replace:!0});return}if(d.code==="not_found"||d.status===403){p(null),await O(b),l("/meetings",{replace:!0});return}p(null),Q(!0)}finally{G(!1)}})()},[r,b,l]),s.useEffect(()=>{const o=B.current;if(!t?.note||!o){M(!1);return}const c=()=>{M(o.scrollHeight>o.clientHeight)};c();const d=new ResizeObserver(c);return d.observe(o),()=>d.disconnect()},[t?.id,t?.note]),s.useEffect(()=>{let o=!1;return(async()=>{try{const d=await u.getDashboard();o||V(d.google.connected)}catch(d){g.error("Failed to load calendar connection",d)}})(),()=>{o=!0}},[]);const ee=t?Math.round((t.endAt-t.startAt)/6e4):null,D=Ue(t?.startAt,ee),ne=D?.kind==="live",te=()=>{t?.roomId&&l(`/join/${t.roomId}`)},oe=()=>{if(x?.activeTab){l("/meetings",{state:{activeTab:x.activeTab}});return}Pe(l,{fallbackTo:"/meetings"})},ae=()=>{r&&l(`/booking/${r}/reschedule`)},se=async o=>{if(r){_(!0);try{const c=await u.cancelBookedMeeting(r,{reason:o||void 0});m({text:a("bookedMeeting.cancelledToast")}),j(!1),p(c)}catch(c){g.error("Failed to cancel booked meeting",c),m({text:a("bookedMeeting.cancelError")})}finally{_(!1)}}},ie=async()=>{if(r){y(!0);try{await u.declineBookedMeeting(r),m({text:a("meetingDetail.declinedToast")}),v(!1),await O(b),l("/meetings",{replace:!0})}catch(o){g.error("Failed to decline booked meeting",o),m({text:a("bookedMeeting.cancelError")})}finally{y(!1)}}},ce=async()=>{if(!(!t||t.role!=="host")){T(!0);try{const o=await u.setBookedMeetingNoShow(t.id,{noShow:!t.noShow});p(o),m({text:a("bookedMeeting.noShowUpdated")})}catch(o){g.error("Failed to update booked meeting no-show status",o),m({text:a("bookedMeeting.noShowError")})}finally{T(!1)}}},re=async()=>
1{if(!(!t?.host.userId||!t.type.slug)){try{const o=await Ne.getUserById(t.host.userId);if(o?.username){l(`/u/${o.username}/${t.type.slug}`);return}}catch(o){g.error("Failed to resolve host profile for booking",o)}m({text:a("booking.saveError")})}};if(F)return e.jsxs("div",{className:n.page,children:[e.jsx(w,{showMenu:!0,activeTab:"meetings"}),e.jsx("main",{className:n.main})]});if(P||!t)return e.jsxs("div",{className:n.page,children:[e.jsx(w,{showMenu:!0,activeTab:"meetings"}),e.jsx("main",{className:n.main,children:e.jsx("div",{className:n.content,children:e.jsxs("div",{className:n.errorState,children:[e.jsx("p",{className:n.errorTitle,children:a("bookedMeeting.notFound")}),e.jsx(i,{size:"l",variant:"primary",onClick:()=>l("/"),children:a("bookedMeeting.goHome")})]})})})]});const h=t.status==="cancelled",le=t.status==="past",L=Ie(t.status,ne),R=He(t.role,L,t),A=`${window.location.origin}/join/${t.roomId}`,de=1+(t.invitee.name?1:0)+t.guestCount,me=t.role==="host"?t.invitee:t.host,$=async()=>{try{await navigator.clipboard.writeText(A),m({text:a("bookedMeeting.linkCopied")})}catch(o){g.error("Failed to copy meeting link",o),m({text:a("bookedMeeting.cancelError")})}},he=()=>{window.open(t.calendar.google,"_blank","noopener,noreferrer")},ge=()=>{window.open(t.calendar.outlook,"_blank","noopener,noreferrer")},pe=()=>{const o=document.createElement("a");o.href=t.calendar.ics,o.download=`${t.title}.ics`,document.body.appendChild(o),o.click(),document.body.removeChild(o)},E=(t.role==="host"||t.role==="invitee")&&t.guests.length>0,z=t.guests.filter(o=>!o.declined),k=t.guests.filter(o=>o.declined),I=(o,c)=>e.jsxs("div",{className:n.chip,children:[e.jsx(f,{src:o.avatarUrl,name:o.name,size:"s"}),e.jsx("span",{className:n.chipName,children:o.name}),c&&e.jsx("span",{className:n.organizerBadge,children:a("bookedMeeting.hostBadge")})]});return e.jsxs("div",{className:n.page,children:[e.jsx(w,{showMenu:!0,activeTab:"meetings"}),e.jsx("main",{className:n.main,children:e.jsxs("div",{className:n.content,children:[e.jsxs("div",{className:n.hero,children:[e.jsx(i,{size:"m",variant:"secondary",className:n.backButton,iconLeft:e.jsx(Be,{width:20,height:20}),"aria-label":a("common.back"),onClick:oe}),e.jsxs("div",{className:n.heroBadges,children:[e.jsx("span",{className:h?`${n.badge} ${n.badgeCancelled}`:t.noShow?`${n.badge}
1 ${n.badgeNoShow}`:`${n.badge} ${n.badgeBooked}`,children:h?a("bookedMeeting.statusCancelled"):t.noShow?a("bookedMeeting.noShowBadge"):a("bookedMeeting.statusBooked")}),!h&&t.status==="upcoming"&&e.jsx(Qe,{status:D})]}),e.jsxs("div",{className:n.titleText,children:[e.jsx("h1",{className:n.title,children:t.title}),e.jsx("p",{className:n.subtitle,children:t.role==="host"?a("bookedMeeting.bookedBy",{name:t.invitee.name}):a("bookedMeeting.subtitle",{name:t.host.name})})]})]}),e.jsxs("div",{className:n.infoGrid,children:[e.jsxs("div",{className:`${n.card} ${h?n.cancelledCard:""}`,children:[e.jsx("div",{className:n.cardHeader,children:a("bookedMeeting.dateTime")}),e.jsxs("div",{className:`${n.cardContent} ${h?n.cancelledDateContent:""}`,children:[e.jsxs("div",{className:`${n.infoRow} ${h?n.cancelledInfoRow:""}`,children:[e.jsx(De,{width:16,height:16}),e.jsx("span",{className:n.infoText,children:be(t.startAt)})]}),e.jsxs("div",{className:`${n.infoRow} ${h?n.cancelledInfoRow:""}`,children:[e.jsx(ze,{width:16,height:16}),e.jsxs("div",{className:n.timeBlock,children:[e.jsx("span",{className:n.infoText,children:je(new Date(t.startAt).toISOString(),Math.round((t.endAt-t.startAt)/6e4))}),e.jsx("span",{className:n.timeZone,children:ve(t.startAt,{variant:"without-gmt"})})]})]})]})]}),h?e.jsxs("div",{className:`${n.card} ${n.cancelledCard}`,children:[e.jsx("div",{className:n.cardHeader,children:a("bookedMeeting.reason")}),e.jsxs("div",{className:n.cancellationContent,children:[e.jsx("span",{className:n.cancellationReason,children:t.cancellation?.reason||a("bookedMeeting.noCancellationReason")}),e.jsxs("span",{className:n.cancelledBy,children:[a("bookedMeeting.cancelledBy")," ",e.jsx("span",{className:n.cancellationActor,children:t.cancellation?.role===t.role?a("bookedMeeting.you"):t.cancellation?.name||"-"})]})]})]}):e.jsxs("div",{className:n.card,children:[e.jsx("div",{className:n.cardHeader,children:a("bookedMeeting.meetingLink")}),e.jsxs("div",{className:n.cardContent,children:[e.jsxs("div",{className:n.linkRow,children:[e.jsx(Ae,{width:16,height:16}),e.jsx("span",{className:n.linkText,children:A})]}),e.jsx(i,{size:"s",variant:"tertiary",onClick:$,children:a("common.copyLink")})]})]}),!h&&e.jsxs("div",{className:`${n.card} ${n.cardFull}`,children:[e.jsxs("div",{className:n.cardHeader,children:[a("common.participants"),e.jsx("span",{className:n.participantCount,children:de})]}),e.jsxs("div",{className:n.participantsSection,children:[k.length>0&&e.jsxs("span",{className:n.sectionLabel,children:[a("common.invited")," (",1+(t.invitee.name?1:0)+z.length,")"]}),e.jsxs("div",{className:n.chips,children:[I(t.host,!0),t.workspace&&e.jsxs("span",{className:n.workspaceBadge,children:[e.jsx(f,{src:t.workspace.avatarUrl,name:t.workspace.name,size:"xxs"}),e.jsx("span",{children:t.workspace.name})]}),t.invitee.name&&I(t.invitee,!1),E?z.map(o=>o.email?e.jsxs("div",{className:n.chip,children:[e.jsx(f,{src:void 0,name:o.email,size:"s"}),e.jsx("span",{className:n.chipName,children:o.email})]},o.email):null):t.guests.length>0&&e.jsx("span",{className:n.guestsCount,children:a("bookedMeeting.guestsCount",{guests:t.guestCount})})]})]}),E&&k.length>0&&e.jsxs("div",{className:n.participantsSection,children:[e.jsxs("span",{className:n.sectionLabel,children:[a("common.declined")," (",k.length,")"]}),e.jsx("div",{className:n.chips,children:k.map(o=>o.email?e.jsxs("div",{className:`${n.chip} ${n.chipDeclined}`,children:[e.jsx(f,{src:void 0,name:o.email,size:"s",className:n.chipAvatarDeclined}),e.jsx("span",{className:`${n.chipName} ${n.chipNameDeclined}`,children:o.email})]},o.email):null)})]})]}),(t.role==="host"||t.role==="invitee")&&t.note&&e.jsxs("div",{className:`${n.card} ${n.cardFull} ${n.noteCard}`,children:[e.jsx("div",{className:n.noteTitle,children:a("common.note")}),e.jsx("p",{ref:B,className:`${n.noteText} ${C?n.noteTextExpanded:""}`,children:t.note}),!C&&Z&&e.jsx(i,{className:n.noteShowMore,size:"s",variant:"transparent",onClick:()=>S(!0),children:a("meetings.showMore")})]}),!J&&t.status==="upcoming"&&e.jsxs("div",{className:n.calendarRow,children:[e.jsx("span",{className:n.calendarLabel,children:a("bookedMeeting.calendarIcs")}),e.jsxs("div",{className:n.calendarButtons,children:[e.jsx(i,{size:"m",variant:"tertiary",iconLeft:e.jsx(ye,{width:16,height:16}),onClick:he,children:a("booking.calendarGoogle")}),e.jsx(i,{size:"m",variant:"tertiary",iconLeft:e.jsx(Re,{width:16,height:16}),onClick:pe,children:a("bookedMeeting.ics")}),t.calendar.outlook?e.jsx(i,{size:"m",variant:"tertiary",iconLeft:e.jsx(H,{width:16,height:16}),onClick:ge,children:a("booking.calendarOutlook")}):e.jsxs("span",{className:n.calendarBtnSoon,children:[e.jsx(H,{width:16,height:16}),a("booking.calendarOutlook"),e.jsx("span",{className:n.soonLabel,children:a("scheduling.soon")})]}),e.jsxs("span",{className:n.calendarBtnSoon,children:[e.jsx(Te,{width:16,height:16}),a("scheduling.apple"),e.jsx("span",{className:n.soonLabel,children:a("scheduling.soon")})]})]})]})]}),R.length>0?e.jsx("div",{className:n.actions,children:R.map(o=>{switch(o){case"join":return e.jsx(i,{size:"l",variant:"primary",iconLeft:e.jsx(_e,{width:20,height:20}),disabled:L!=="live",onClick:te,children:a("bookedMeeting.join")},o);case"copyLink":return e.jsx(i,{size:"l",variant:"secondary",iconLeft:e.jsx(Ce,{width:20,height:20}),onClick:()=>{$()},children:a("common.copyLink")},o);case"noShow":return e.jsx(i,{className:n.pastAction,size:"l",variant:"tertiary",iconLeft:t.noShow?e.jsx(Ee,{}):e.jsx($e,{}),disabled:Y,onClick:()=>{ce()},children:t.noShow?a("bookedMeeting.removeNoShow"):a("bookedMeeting.markNoShow")},o);case"edit":return e.jsx(i,{size:"l",variant:"secondary",iconLeft:e.jsx(Se,{width:20,height:20}),onClick:ae,children:a("common.edit")},o);case"cancel":return e.jsx(i,{size:"l",variant:"dangerOutline",onClick:()=>j(!0),children:a("bookedMeeting.cancel")},o);case"decline":return e.jsx(i,{size:"l",variant:"dangerOutline",onClick:()=>v(!0),children:a("meetingDetail.declineMeeting")},o);case"report":return e.jsx(i,{className:le?n.pastAction:void 0,size:"l",variant:"tertiary",iconLeft:e.jsx(Me,{width:20,height:20}),onClick:()=>N(!0),children:a("bookedMeeting.reportSpam")},o);case"bookAnotherTime":return e.jsx(i,{className:n.rebookButton,size:"l",variant:"primary",onClick:()=>{re()},children:a("bookedMeeting.bookAnotherTime")},o);default:return null}})}):null]})}),X&&e.jsx(Oe,{meetingId:t.id,onClose:()=>N(!1)}),e.jsx(Fe,{isOpen:K,meeting:t,onClose:()=>v(!1),onConfirm:()=>{ie()},pending:W}),e.jsx(Ge,{isOpen:U,meeting:t,participantName:me.name,onClose:()=>j(!1),onConfirm:o=>{se(o)},pending:q})]})};export{Kt as default};
2//# sourceMappingURL=BookedMeetingPage-Cfh3SSrW.js.map

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.