1import{D as f,G as e,aA as m,bn as g,a_ as b,cg as j,x as p,T as u,U as n,J as c,bH as x,M as y,z as w,$ as N,dA as v,H as _}from"./index-BI0TbYyM.js";import{u as C}from"./class-BnAXpylY.js";import{C as E}from"./index-IyXYJtVa.js";import{u as T}from"./useComponentLog-CVkOwFHS.js";import"./index-DPB_n5mk.js";import"./index-DRErVUvr.js";import"./ProgressBar-COXh5w8C.js";import"./index-TQfKjw0Q.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a.SENTRY_RELEASE={id:"[email protected]"};var s=new a.Error().stack;s&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[s]="b0ae17a3-8a62-4ca4-8f14-1d6e3ebfd27b",a._sentryDebugIdIdentifier="sentry-dbid-b0ae17a3-8a62-4ca4-8f14-1d6e3ebfd27b")}catch{}})();const S=({url:a,iframeTitle:s})=>{const[t,i]=f.useState(!0),r=()=>{i(!1)};return e.jsxs(e.Fragment,{children:[t&&e.jsx(m,{centered:!0,isLoading:!0}),e.jsx("iframe",{width:"100%",height:"100%",title:s??"Calendly Scheduling Page",onLoad:r,src:`${a}${a.includes("?")?"&":"?"}hide_landing_page_details=1&embed_type=Inline&embed_domain=1`})]})},I=({onModalClose:a,open:s,rootElement:t,url:i,iframeTitle:r})=>{if(!s)return null;if(!t)throw new Error("Root element is required for the modal to be rendered");return g.createPortal(e.jsxs("div",{className:"fixed inset-0 overflow-hidden z-[9999] bg-modal-overlay",children:[e.jsx("span",{role:"presentation","aria-label":"close modal from overlay",onClick:a,className:"absolute inset-0"}),e.jsx("div",{className:"box-border absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[80%] min-w-[900px] max-w-[1000px] h-[90%] max-h-[680px] max-[975px]:fixed max-[975px]:top-[50px] max-[975px]:left-0 max-[975px]:right-0 max-[975px]:bottom-0 max-[975px]:translate-x-0 max-[975px]:translate-y-0 max-[975px]:w-full max-[975px]:h-auto max-[975px]:min-w-0 max-[975px]:max-h-none [&_iframe]:inline [&_iframe]:w-full [&_iframe]:h-full [&_iframe]:border-0",children:e.jsx("div",{className:"h-full relative",children:e.jsx(S,{url:i,iframeTitle:r})})}),e.jsx("button",{className:"absolute top-[25px] right-[25px] cursor-pointer block border-none p-0 max-[975px]:top-[15px] max-[975px]:right-[15px]",onClick:a,"aria-label":"Close Calendly modal",children:e.jsx(b,{width:24,height:24,"aria-hidden":"true",className:"absolute top-[inherit] right-[inherit] text-background-primary"})})]}),t)},L=({tutor:a})=>{const[s,t]=j.useState(!1),i=p();return e.jsxs("div",{className:"py-4 first:pt-6",children:[e.jsx("img",{src:a.tutorPhoto,alt:a.fullName,className:"mb-4 h-[69px] w-[69px] rounded-full"}),e.jsx(u,{as:"h3",size:"large",className:"mb-4 whitespace-pre-line",children:a.fullName}),e.jsx(n,{className:"mb-4 whitespace-pre-line",children:a.description}),e.jsxs("div",{className:"flex justify-start gap-4",children:[e.jsx(c,{onClick:()=>{t(!0),i({type:x,payload:{from:"tutoring.view",to:"schedule.tutoring"}})},children:a.scheduleCta}),a.isContactable&&e.jsx(c,{onClick:()=>{i({type:y,payload:{modal:{type:"tutor.contact",title:a.fullName,tutorEmail:a.email}}}),i({type:x,payload:{from:"tutoring.view",to:"contact.tutor"}})},children:a.contactCta})]}),s&&e.jsx("div",{children:e.jsx(I,{url:a.calendlyUrl,iframeTitle:a.fullName,rootElement:document.getElementById("root"),open:s,onModalClose:()=>{t(!1),window.location.reload()}})})]})},z=()=>{T("Tutoring");const s=w(l=>l.progress)._id,{data:t,isError:i,isLoading:r}=C(s),o=i||!s,d=!!s&&r,h=p();return e.jsxs("div",{className:"grit screen flex flex-col min-h-[calc(100vh-60px)]","data-test":"tutoringScreen",children:[e.jsx(E,{isTest:!1,backButton:{text:"Back",callback:()=>{h({type:N,payload:{currentState:"dash.index"}}),v("/dash/index")},hideIcon:!1,"data-test":"courseExitButton"},preferencesEnabled:!0}),e.jsxs("div",{className:"mx-auto flex w-full max-w-[1024px] flex-col items-center justify-center px-4 py-8 min-[24rem]:px-8",children:[e.jsx("div",{className:"mb-6 flex flex-col items-center justify-between",children:e.jsx(u,{as:"h1",size:"xxlarge",className:"m-0",children:t?.title})}),e.jsxs("div",{"data-test":"tutoringSreen",children:[d&&e.jsx(m,{centered:!0,isLoading:!0}),o&&e.jsx(n,{children:"There was an error loading the tutors"}),!d&&!t&&!o&&e.jsx(n,{children:"No tutors available"}),!d&&t&&!o&&e.jsxs("div",{children:[e.jsx(n,{children:t.description}),t.creditNotice.isAvailable&&e.jsx(_,{extraClassName:"my-6 pb-2",variant:"success",description:t.creditNotice.description,title:t.creditNotice.title}),e.jsx("div",{children:t.tutorList.map(l=>e.jsx(L,{tutor:l},l.fullName))})]})]})]})]})};export{z as default}; 2//# sourceMappingURL=index-CBqHF3FV.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.