1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a0a841-ea3f-0000-80d7-56c4faceb82d";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="16eb50fa-1af9-5a03-8ca1-51bd0046fe96")}catch(e){}}();const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfViewer-DknjzuhE.js","assets/index-Dv0XZx9Q.js","assets/index-BCbyZ6LM.css","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/PdfViewer-Ba6KnLQT.css"])))=>i.map(i=>d[i]); 2import{a as Ce,u as Re,r as l,o as Se,y as Ee,R as Le,c as r,b as i,f,e as a,j as c,g as u,m as U,t as Q,d as y,n as ee,h as Te,F as De,D as k,E as te,aW as Ie,k as ae,l as oe,p as C,w as $e,K as Ue,_ as Me}from"./index-Dv0XZx9Q.js";import{_ as Pe,l as je,g as se,v as Ae,a as Ve,P as Be}from"./ReviewStart-DwhhGzuk.js";import{u as Oe}from"./courseStore-D80bR-Ph.js";import"./index-JiNenWEI.js";import"./CommentListItemReview--vS1eRnk.js";import"./FileAttachments-Cgusgbxx.js";import"./Avatar-DuRMdzIT.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./AttachmentUploader-CCsOMX24.js";import"./presignedUpload-BLh-DFf_.js";import"./vue-contenteditable.es-CAAHPHUj.js";const We={key:0},ze={class:"hero min-h-screen bg-base-200"},Ne={class:"hero-content text-center"},qe={key:0,class:"max-w-xl"},Fe={class:"text-5xl font-bold"},He={class:"flex flex-col items-center justify-center gap-3 sm:flex-row"},Xe=["href"],Ye={key:1,class:"max-w-xl"},Ze={class:"text-5xl font-bold"},Ke={class:"py-6 text-xl"},Ge={key:2,class:"max-w-md"},Je={class:"text-5xl font-bold"},Qe={key:3,class:"max-w-md"},et={class:"text-5xl font-bold"},tt={key:4,class:"max-w-md"},at={class:"text-5xl font-bold"},ot={key:5,class:"max-w-md"},st={key:1,class:"grid grid-cols-1 gap-4 h-screen"},lt={key:0,class:"flex flex-col items-center justify-center text-center px-6"},nt={key:0,class:"text-gray-500 max-w-md mt-3 text-sm"},it={key:1,"aria-live":"polite",class:"flex flex-col items-center justify-center text-center px-6"},rt={key:2,role:"alert",class:"flex flex-col items-center justify-center text-center px-6"},ct={class:"text-gray-600 max-w-md"},ut={key:2,class:"p-0"},dt={key:0,class:"border-l-4 border-yellow-400 bg-yellow-50 p-3 flex items-center"},vt=["height","width","src"],mt=["height","width"],pt={class:"h-full w-full overflow-y-auto pb-3"},ft={class:"navbar bg-gray-100 shadow"},wt={class:"navbar-start"},ht={class:"tooltip tooltip-right","data-tip":"Support"},yt={href:"//kb.reviewmyelearning.com",target:"_blank",class:"btn btn-sm btn-ghost"},gt={class:"navbar-center"},_t={key:0,class:"join rounded-md"},bt={class:"navbar-end gap-1"},xt={class:"tooltip tooltip-left","data-tip":"View all cycles or only the current cycle."},kt={key:0,class:"tooltip tooltip-success tooltip-left","data-tip":"Mark Review Complete"},Ct={href:"#complete-modal",class:"btn btn-sm btn-outline btn-success"},Rt=9e4,Vt={__name:"Review",setup(St){const le=Ue(()=>Me(()=>import("./PdfViewer-DknjzuhE.js"),__vite__mapDeps([0,1,2,3,4]))),m=Ce(),ne=Oe(),X=Re(),M=l(!1),d=Ee(),n=l(),P=l(),j=l(!1),_=l("800"),b=l("400"),ie=l(null),T=l(""),R=l({width:0,height:0}),v=l("full"),A=l({slide:"0",title:"Loading..."}),Y=l(!1),w=l(!0),V=l(!1),h=l(""),D=l(!1);l(!1);const B=l(Math.random().toString(36).substring(2,15)),g=l(!1),O=l(!1),I=l(""),W=l(!1),x=l(!1),z=l(!1),N=l(!1);let re="/content";const Z=["rise","storyline","storyline2","storyline3","captivate","captivatecharm","lectora","ispringpro7","gomo","essemble","sapenable"],ce=()=>{if(!g.value){const o=n.value.review_cycle.tool,e=!Z.includes(o),t=document.createElement("script");e?(window.__coursegraphCourseId=n.value.course._id,t.src="/scorm/tracker-coursegraph.js"):t.src=`/scorm/tracker-${o}.js`,t.async=!0,t.onload=()=>{},document.body.appendChild(t)}if(!M.value){const o=document.createElement("script");o.src="/recorder.js",o.async=!0,o.onload=()=>{},document.body.appendChild(o)}},ue=async o=>{const e=await k.post("/api/reviewer/create",{review_cycle:n.value._id,reviewer:
2o});m.user=e.data.user;const t=await H(e.data._id);window.rid=e.data._id,t&&$()},de=()=>!g.value&&!Z.includes(n.value.review_cycle.tool),q=async()=>{try{const o=await fetch(`/api/course/${n.value.course._id}/coursegraph-bridge.js`,{cache:"no-store"}),e=o.headers.get("X-Coursegraph-Bridge");if(e)return e==="ready";const t=await o.text();return o.ok&&t.indexOf("/* coursegraph bridge not ready */")!==0}catch{return!1}},ve=async()=>{if(n.value.review_cycle.expire&&new Date(n.value.review_cycle.expire)<new Date&&!n.value.elevated){w.value=!1,h.value="expired";return}if(de()&&!await q()){x.value=!0;const e=Date.now()+Rt;let t=0;for(;x.value&&Date.now()<e&&!await q();)t+=1,t>=12&&(z.value=!0),await new Promise(s=>setTimeout(s,5e3));if(!x.value)return;Date.now()>=e&&!await q()&&(N.value=!0),x.value=!1,z.value=!1}if(!g.value){O.value=!0;try{await je()}catch(e){console.error("Unable to load the SCORM runtime",e),I.value="The course player could not be loaded. Check your connection or content blocker, then try again.";return}finally{O.value=!1}}let o=n.value.review_cycle.link;P.value=`${re}/${n.value.course.public_id}/${o}`,j.value=!0},$=async()=>{if(!W.value){W.value=!0,I.value="";try{await ve()}finally{W.value=!1}}},me=()=>{try{setUpTracker(),M.value||pushRecorderCodeToFrame(B.value)}catch(o){console.error("error loading replay",o)}};function pe({width:o,height:e}){R.value={width:o,height:e},v.value==="full"&&(b.value=R.value.height,_.value=R.value.width)}const F=async o=>{o==="full"?(b.value=R.value.height,_.value=R.value.width,T.value="",v.value=o):o==="port"?(v.value=o,b.value=650,_.value=380,T.value="min-w-[385px]"):o==="land"&&(v.value=o,b.value=400,_.value=700,T.value="min-w-[705px]")},fe=()=>{const o=document.getElementById("course-frame");o.style.pointerEvents="none"},we=()=>{const o=document.getElementById("course-frame");o.style.pointerEvents="auto"},K=(o,e=5)=>{if(typeof recordSlideChange=="function"){const t=recordSlideChange(o);t&&(B.value=t);return}e>0&&setTimeout(()=>K(o,e-1),1e3)},he=o=>{N.value=!1,o.detail.slide!==A.value.slide&&(A.value=o.detail,K(o.detail))},ye=o=>{const e=`/api/reviewer/scorm/${rid}`;k.post(e,o.detail).then(t=>{window.scormData=t.data.scormdata}).catch(t=>{var s;if(((s=t==null?void 0:t.response)==null?void 0:s.status)!==409)throw t})},ge=()=>typeof window<"u"?`/login?redirect=${window.location.pathname}`:"",_e=()=>({path:"/signup",query:{account:"collaborator",role:"reviewer",redirect:d.currentRoute.value.path}}),H=async o=>{window.rid=o;const e=`/api/reviewer/start/${o}`;return await k.get(e).then(s=>{var p,S,E,L,G,J;return s.data.error?(w.value=!1,V.value=!0,h.value=s.data.type,!1):(m.user.email||(m.user=s.data.user),m.user.elevated=s.data.elevated,(p=s.data)!=null&&p.course&&ne.fetchCourseUsers((S=s.data.course)==null?void 0:S._id),Ie({reviewerId:o,userId:(E=s.data.user)==null?void 0:E._id}),ae("review_started",{course_id:(L=s.data.course)==null?void 0:L._id,cycle_id:(G=s.data.review_cycle)==null?void 0:G._id,tool:(J=s.data.review_cycle)==null?void 0:J.tool,view:d.currentRoute.value.name}),n.value=s.data,g.value=s.data.review_cycle.tool==="pdf"||s.data.review_cycle.tool==="word"||s.data.review_cycle.tool==="powerpoint",Y.value=s.data.review_cycle.hide_pane||!1,window.contentType=s.data.review_cycle.tool,d.currentRoute.value.query.comment?xe(d.currentRoute.value.query.comment):s.data.scormdata?window.scormData=s.data.scormdata:window.scormData={cmi:{suspend_data:{value:s.data.suspend_data}}},ce(),!0)}).catch(s=>(console.error("err",s),s.response?(s.response.status===401&&d.push("/login"),s.response.status===403&&d.push("/"),s.response.status===404&&(w.value=!1),!1):(te(s),!1)))},be=async o=>{const e=`/api/reviewer/member/start/${o}`;k.get(e).then(async t=>{if(t.data.error){w.value=!1,h.value=t.data.type;return}n.value=t.data,g.value=t.data.review_cycle.tool==="pdf"||t.data.review_cycle.tool==="word"||t.data.review_cycle.tool==="powerpoint",await H(t.data._id)&&$()}).catch(t=>{if(!t.response){te(t);return}t.response.status===404&&(w.value=!1)})},xe=async o=>{const e=`/api/comments/${o}`;k.get(e,{headers:window.rid?{"X-Reviewer-Id":window.rid}:{}}).then(t=>{t.data.scormdata?window.scormData=t.data.scormdata:window.scormData={cmi:{suspend_data:{value:t.data.suspend_data}}}}).catch(t=>{console.error("getComment err",t),t.response.status===404&&(w.value=!1)})};Se(()=>{window.rid=d.currentRoute.value.params.rid,document.addEventListener("slideChanged",he),document.addEventListener("scormUpdate",ye),d.currentRoute.value.name==="View"?be(d.currentRoute.value.params.rid):H(d.currentRoute.value.params.rid),X.features.plan!=="enterprise"&&X.features.plan!=="premium"&&(M.value=!0,window.limitedAccount=!0)}),Le(()=>{x.value=!1,window.rid=void 0});const ke=()=>{const o=`/api/reviewer/complete/${rid}`;k.post(o).then(e=>{var t,s,p,S,E,L;ae("review_completed",{course_id:(s=(t=n.value)==null?void 0:t.course)==null?void 0:s._id,cycle_id:(S=(p=n.value)==null?void 0:p.review_cycle)==null?void 0:S._id,tool:(L=(E=n.value)==null?void 0:E.review_cycle)==null?void 0:L.tool}),m.user.loggedin?d.push("/courses"):d.push("/")}
2).catch(e=>{console.error("err",e)})};return(o,e)=>{const t=oe("font-awesome-icon"),s=oe("router-link");return i(),r(De,null,[w.value?f("",!0):(i(),r("div",We,[a("div",ze,[a("div",Ne,[V.value&&h.value==="login"?(i(),r("div",qe,[a("h1",Fe,[c(t,{icon:"fa-solid fa-shield"}),e[4]||(e[4]=u(" Login Required "))]),e[6]||(e[6]=a("p",{class:"py-6 text-xl"},[u(" Hello! It seems you are not logged in. "),a("br"),u(" To access the content through the invite link, please log in to the account for which the invite was intended. If you do not have an account, you may need to create one or check that you are using the correct invite link. ")],-1)),a("div",He,[a("a",{role:"button",href:`${ge()}`,class:"btn rme-btn rme-btn-primary btn-md"},"Login",8,Xe),c(s,{to:_e(),class:"btn btn-outline btn-md"},{default:U(()=>e[5]||(e[5]=[u("Create a free Reviewer account")])),_:1},8,["to"])])])):V.value&&h.value==="access"?(i(),r("div",Ye,[a("h1",Ze,[c(t,{icon:["fas","link-slash"]}),e[7]||(e[7]=u(" Invite Link Mismatch "))]),a("p",Ke,[u(" Hello "+Q(y(m).user.name)+", you are successfully logged in!",1),e[8]||(e[8]=a("br",null,null,-1)),e[9]||(e[9]=u(" However, it seems that the invite link you used was intended for a different account. Please make sure you have the correct invite link and try again.")),e[10]||(e[10]=a("br",null,null,-1)),e[11]||(e[11]=u(" If you believe this is an error, please contact the person that sent the invite. "))])])):h.value==="oldlink"?(i(),r("div",Ge,[a("h1",Je,[c(t,{icon:["fas","link-slash"]})]),e[12]||(e[12]=a("p",{class:"py-6 text-xl"},[u(" It looks like that is an old link."),a("br"),u(" Please check with the course owner or developer to get a new link. ")],-1))])):h.value==="locked"?(i(),r("div",Qe,[a("h1",et,[c(t,{icon:"fa-solid fa-lock"})]),e[13]||(e[13]=a("p",{class:"py-6 text-xl"},[u(" It looks like this review has been locked."),a("br"),u(" Please check with the course owner or developer to access the course. ")],-1))])):h.value==="expired"?(i(),r("div",tt,[a("h1",at,[c(t,{icon:"fa-solid fa-calendar-xmark"})]),e[14]||(e[14]=a("p",{class:"py-6 text-xl"},[u(" It looks like this review has expired."),a("br"),u(" Please check with the course owner or developer to access the course. ")],-1))])):(i(),r("div",ot,e[15]||(e[15]=[a("h1",{class:"text-5xl font-bold"},"Uh Oh..",-1),a("p",{class:"py-6 text-xl"},[u(" It doesn't look like this course exists."),a("br"),u(" Please check the link and try again. ")],-1)])))])])])),!j.value&&n.value?(i(),r("div",st,[x.value?(i(),r("div",lt,[e[16]||(e[16]=Te('<svg aria-hidden="true" class="w-10 h-10 mb-4 text-gray-200 animate-spin fill-gray-600" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"></path><path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"></path></svg><h2 class="text-xl font-semibold text-gray-800 mb-2">Preparing this course for review</h2><p class="text-gray-600 max-w-md"> We're setting up slide tracking so your comments attach to the right slide. The review will start automatically as soon as it's ready. </p>',3)),z.value?(i(),r("p",nt," Still working â this can take a few minutes the first time a course is opened. ")):f("",!0)])):O.value?(i(),r("div",it,e[17]||(e[17]=[a("span",{class:"loading loading-spinner loading-lg text-primary mb-4","aria-hidden":"true"}
2,null,-1),a("h2",{class:"text-xl font-semibold text-gray-800 mb-2"},"Loading the course player",-1),a("p",{class:"text-gray-600 max-w-md"},"This should only take a moment.",-1)]))):I.value?(i(),r("div",rt,[e[18]||(e[18]=a("h2",{class:"text-xl font-semibold text-gray-800 mb-2"},"Course player unavailable",-1)),a("p",ct,Q(I.value),1),a("button",{type:"button",class:"rme-btn rme-btn-primary mt-4",onClick:$}," Try again ")])):w.value?(i(),ee(Pe,{key:3,"review-cycle":n.value,user:y(m).user,onStartReview:$,onNewReviewer:ue},null,8,["review-cycle","user"])):f("",!0)])):f("",!0),j.value?(i(),r("div",ut,[N.value?(i(),r("div",dt,e[19]||(e[19]=[a("span",{class:"loading loading-spinner loading-xs text-yellow-600"},null,-1),a("p",{class:"ml-3 text-sm text-yellow-800"}," Slide tracking is taking longer than usual to connect. You can review now â it will catch up automatically, but comments made before it does may need their slide confirmed. ",-1)]))):f("",!0),c(y(Be),{class:"default-theme",onResize:fe,onResized:we},{default:U(()=>[c(y(se),{size:"75"},{default:U(()=>[a("div",{class:C(["w-full bg-white",T.value])}
2,[$e((i(),r("div",{ref_key:"frameWrapper",ref:ie,id:"course-wrapper",class:"min-h-screen p-0","data-ph-no-autocapture":""},[g.value?(i(),r("div",{key:1,height:b.value,width:_.value,id:"course-frame"},[c(y(le),{pdf:P.value},null,8,["pdf"])],8,mt)):(i(),r("iframe",{key:0,class:C(["m-auto shadow-gray-900",{framed:v.value!=="full","drop-shadow-md":v.value==="full","shadow-xl":v.value!=="full"}]),height:b.value,width:_.value,src:P.value,frameborder:"0",id:"course-frame",onLoad:me},null,42,vt))])),[[y(Ae),pe]])],2)]),_:1}),Y.value?f("",!0):(i(),ee(y(se),{key:0,size:"25","min-size":"20","max-size":"45",class:"h-screen"},{default:U(()=>[a("div",pt,[a("div",ft,[a("div",wt,[a("div",ht,[a("a",yt,[c(t,{icon:"fa-solid fa-circle-info"})])])]),a("div",gt,[g.value?f("",!0):(i(),r("div",_t,[a("button",{class:C(["btn btn-outline btn-sm join-item",{"btn-active":v.value==="port"}]),onClick:e[0]||(e[0]=p=>F("port"))},[c(t,{icon:"fa-solid fa-mobile-screen"})],2),a("button",{class:C(["btn btn-outline btn-sm join-item",{"btn-active":v.value==="land"}]),onClick:e[1]||(e[1]=p=>F("land"))},[c(t,{icon:"fa-solid fa-mobile-screen ",rotation:"90"})],2),a("button",{class:C(["btn btn-outline btn-sm join-item",{"btn-active":v.value==="full"}]),onClick:e[2]||(e[2]=p=>F("full"))},[c(t,{icon:"fa-solid fa-desktop"})],2)]))]),a("div",bt,[a("div",xt,[a("button",{class:C(["btn btn-sm btn-outline",{"btn-active":D.value}]),onClick:e[3]||(e[3]=p=>D.value=!D.value)},[c(t,{icon:"fa-regular fa-clock"})],2)]),n.value.read_only!==!0&&n.value.status!=="completed"?(i(),r("div",kt,[a("a",Ct,[c(t,{icon:"fa-solid fa-square-check"})])])):f("",!0)])]),c(Ve,{course:n.value.course,reviewCycle:n.value.review_cycle,currentSlide:A.value,user:y(m).user,uuid:B.value,viewAllCycles:D.value,readOnly:n.value.read_only===!0,readOnlyReason:n.value.read_only_reason},null,8,["course","reviewCycle","currentSlide","user","uuid","viewAllCycles","readOnly","readOnlyReason"])])]),_:1}))]),_:1})])):f("",!0),a("div",{class:"modal",id:"complete-modal"},[a("div",{class:"modal-box"},[e[21]||(e[21]=a("h3",{class:"font-bold text-lg"},"Mark Your Review Complete?",-1)),e[22]||(e[22]=a("p",{class:"py-4"}," This will mark your review as complete. You will no longer be able to add new comments, but you can still read the review and reply to existing comments. ",-1)),a("div",{class:"modal-action"},[e[20]||(e[20]=a("a",{href:"#",class:"btn btn-ghost"},"Cancel",-1)),a("button",{onClick:ke,class:"btn btn-outline btn-success"}," Mark Complete ")])])])],64)}}};export{Vt as default}; 3//# sourceMappingURL=Review-DZtvTSKB.js.map 4 5//# chunkId=16eb50fa-1af9-5a03-8ca1-51bd0046fe96
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.