PageSourceSearch

https://medsy.ai/_next/static/chunks/5380.b6092ca83a6390de.js

js medsy.ai collected 2026-10-05 12:17:52 UTC 49,110 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5380],{15380:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>X});var l=n(95155),s=n(19749),i=n(12115),a=n(47650),r=n(84014),o=n(56047),c=n(8257),u=n(20274);function d(e){let t,n,i,a,r,o=(0,s.c)(10);o[0]!==e?({children:t,size:i,strokeWidth:a,...n}=e,o[0]=e,o[1]=t,o[2]=n,o[3]=i,o[4]=a):(t=o[1],n=o[2],i=o[3],a=o[4]);let c=void 0===i?16:i,u=void 0===a?2:a;return o[5]!==t||o[6]!==n||o[7]!==c||o[8]!==u?(r=(0,l.jsx)("svg",{width:c,height:c,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:u,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n,children:t}),o[5]=t,o[6]=n,o[7]=c,o[8]=u,o[9]=r):r=o[9],r}n(96566);let m=e=>{let t,n,i=(0,s.c)(3);return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"M22 12h-4l-3 8-6-16-3 8H2"}),i[0]=t):t=i[0],i[1]!==e?(n=(0,l.jsx)(d,{...e,children:t}),i[1]=e,i[2]=n):n=i[2],n},h=e=>{let t,n,i,a,r=(0,s.c)(5);return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"m12 3 10 18H2Z"}),n=(0,l.jsx)("path",{d:"M12 9v4"}),i=(0,l.jsx)("path",{d:"M12 17h.01"}),r[0]=t,r[1]=n,r[2]=i):(t=r[0],n=r[1],i=r[2]),r[3]!==e?(a=(0,l.jsxs)(d,{...e,children:[t,n,i]}),r[3]=e,r[4]=a):a=r[4],a},p=e=>{let t,n,i,a=(0,s.c)(4);return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"M19 12H5"}),n=(0,l.jsx)("path",{d:"m12 19-7-7 7-7"}),a[0]=t,a[1]=n):(t=a[0],n=a[1]),a[2]!==e?(i=(0,l.jsxs)(d,{...e,children:[t,n]}),a[2]=e,a[3]=i):i=a[3],i},x=e=>{let t,n,i,a=(0,s.c)(4);return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"M5 12h14"}),n=(0,l.jsx)("path",{d:"m12 5 7 7-7 7"}),a[0]=t,a[1]=n):(t=a[0],n=a[1]),a[2]!==e?(i=(0,l.jsxs)(d,{...e,children:[t,n]}),a[2]=e,a[3]=i):i=a[3],i},f=e=>{let t,n,i,a=(0,s.c)(4);return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("circle",{cx:"12",cy:"12",r:"9"}),n=(0,l.jsx)("path",{d:"m9 12 2 2 4-5"}),a[0]=t,a[1]=n):(t=a[0],n=a[1]),a[2]!==e?(i=(0,l.jsxs)(d,{...e,children:[t,n]}),a[2]=e,a[3]=i):i=a[3],i},v=e=>{let t,n,i,a,r=(0,s.c)(5);return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"M3 5a2 2 0 0 1 2-2h6v18H5a2 2 0 0 1-2-2Z"}),n=(0,l.jsx)("path",{d:"M21 5a2 2 0 0 0-2-2h-6v18h6a2 2 0 0 0 2-2Z"}),i=(0,l.jsx)("path",{d:"m7 11 1.5 1.5L11 9"}),r[0]=t,r[1]=n,r[2]=i):(t=r[0],n=r[1],i=r[2]),r[3]!==e?(a=(0,l.jsxs)(d,{...e,children:[t,n,i]}),r[3]=e,r[4]=a):a=r[4],a},g=e=>{let t,n,i,a,r,o=(0,s.c)(6);return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"M8 2v4"}),n=(0,l.jsx)("path",{d:"M16 2v4"}),i=(0,l.jsx)("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),a=(0,l.jsx)("path",{d:"M3 10h18"}),o[0]=t,o[1]=n,o[2]=i,o[3]=a):(t=o[0],n=o[1],i=o[2],a=o[3]),o[4]!==e?(r=(0,l.jsxs)(d,{...e,children:[t,n,i,a]}),o[4]=e,o[5]=r):r=o[5],r},y=e=>{let t,n,i,a=(0,s.c)(4);return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("circle",{cx:"12",cy:"12",r:"9"}),n=(0,l.jsx)("path",{d:"M12 7v5l3 2"}),a[0]=t,a[1]=n):(t=a[0],n=a[1]),a[2]!==e?(i=(0,l.jsxs)(d,{...e,children:[t,n]}),a[2]=e,a[3]=i):i=a[3],i},b=e=>{let t,n,i,a=(0,s.c)(4);return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"M2 12s4-7 10-7 10 7 10 7-4 7-10 7-10-7-10-7Z"}),n=(0,l.jsx)("circle",{cx:"12",cy:"12",r:"3"}),a[0]=t,a[1]=n):(t=a[0],n=a[1]),a[2]!==e?(i=(0,l.jsxs)(d,{...e,children:[t,n]}),a[2]=e,a[3]=i):i=a[3],i},j=e=>{let t,n,i,a,r,o=(0,s.c)(6);return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8Z"}),n=(0,l.jsx)("path",{d:"M14 2v6h6"}),i=(0,l.jsx)("path",{d:"M8 13h8"}),a=(0,l.jsx)("path",{d:"M8 17h5"}),o[0]=t,o[1]=n,o[2]=i,o[3]=a):(t=o[0],n=o[1],i=o[2],a=o[3]),o[4]!==e?(r=(0,l.jsxs)(d,{...e,children:[t,n,i,a]}),o[4]=e,o[5]=r):r=o[5],r},k=e=>{let t,n,i,a,r,o,c=(0,s.c)(7);return c[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"M12 11c0 3-1 5-3 7"}),n=(0,l.jsx)("path",{d:"M15 13c-.2 2.4-.9 4.4-2 6"}),i=(0,l.jsx)("path",{d:"M18 14c0-4-2.5-7-6-7s-6 3-6 7"}),a=(0,l.jsx)("path",{d:"M8 4.7A8 8 0 0 1 20 12"}),r=(0,l.jsx)("path",{d:"M4 12a8 8 0 0 1 1.5-4.7"}),c[0]=t,c[1]=n,c[2]=i,c[3]=a,c[4]=r):(t=c[0],n=c[1],i=c[2],a=c[3],r=c[4]),c[5]!==e?(o=(0,l.jsxs)(d,{...e,children:[t,n,i,a,r]}),c[5]=e,c[6]=o):o=c[6],o},N=e=>{let t,n,i,a=(0,s.c)(4);return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"m22 10-10-5-10 5 10 5 10-5Z"}),n=(0,l.jsx)("path",{d:"M6 12v5c3 2 9 2 12 0v-5"}),a[0]=t,a[1]=n):(t=a[0],n=a[1]),a[2]!==e?(i=(0,l.jsxs)(d,{...e,children:[t,n]}),a[2]=e,a[3]=i):i=a[3],i},S=e=>{let t,n,i,a,r,o=(0,s.c)(6);return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("rect",{x:"3",y:"5",width:"14",height:"14",rx:"2"}),n=(0,l.jsx)("path",{d:"M7 9h.01"}),i=(0,l.jsx)("path",{d:"m3 16 4-4 3 3 2-2 5 5"}),a=(0,l.jsx)("path",{d:"M7 3h12a2 2 0 0 1 2 2v12"}),o[0]=t,o[1]=n,o[2]=i,o[3]=a):(t=o[0],n=o[1],i=o[2],a=o[3]),o[4]!==e?(r=(0,l.jsxs)(d,{...e,children:[t,n,i,a]}),o[4]=e,o[5]=r):r=o[5],r},w=e=>{let t,n,i,a,r,o=(0,s.c)(6);return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"M6 18h8"}),n=(0,l.jsx)("path",{d:"M3 22h18"}),i=(0,l.jsx)("path",{d:"M14 22a7 7 0 0 0 0-14h-1"}),a=(0,l.jsx)("path",{d:"m9 14-6-6 3-3 6 6Z"}),o[0]=t,o[1]=n,o[2]=i,o[3]=a):(t=o[0],n=o[1],i=o[2],a=o[3]),o[4]!==e?(r=(0,l.jsxs)(d,{...e,children:[t,n,i,a]}),o[4]=e,o[5]=r):r=o[5],r},C=e=>{let t,n,i,a,r=(0,s.c)(5);return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("circle",{cx:"7",cy:"7",r:"4"}),n=(0,l.jsx)("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"}),i=(0,l.jsx)("path",{d:"m7 14 4 7H3Z"}),r[0]=t,r[1]=n,r[2]=i):(t=r[0],n=r[1],i=r[2]),r[3]!==e?(a=(0,l.jsxs)(d,{...e,children:[t,n,i]}),r[3]=e,r[4]=a):a=r[4],a},_=e=>{let t,n,i=(0,s.c)(3);return i[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"m8 5 11 7-11 7Z"}),i[0]=t):t=i[0],i[1]!==e?(n=(0,l.jsx)(d,{...e,children:t}),i[1]=e,i[2]=n):n=i[2],n},A=e=>{let t,n,i,a=(0,s.c)(4);return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"m3 3 18 9-18 9 4-9Z"}),n=(0,l.jsx)("path",{d:"M7 12h14"}),a[0]=t,a[1]=n):(t=a[0],n=a[1]),a[2]!==e?(i=(0,l.jsxs)(d,{...e,children:[t,n]}),a[2]=e,a[3]=i):i=a[3],i},M=e=>{let t,n,i,a=(0,s.c)(4);return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z"}),n=(0,l.jsx)("path",{d:"m9 12 2 2 4-5"}),a[0]=t,a[1]=n):(t=a[0],n=a[1]),a[2]!==e?(i=(0,l.jsxs)(d,{...e,children:[t,n]}),a[2]=e,a[3]=i):i=a[3],i},I=e=>{let t,n,i,a,r=(0,s.c)(5);return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"M6 3v5a4 4 0 0 0 8 0V3"}),n=(0,l.jsx)("path",{d:"M10 12v3a5 5 0 0 0 10 0v-2"}),i=(0,l.jsx)("circle",{cx:"20",cy:"10",r:"2"}),r[0]=t,r[1]=n,r[2]=i):(t=r[0],n=r[1],i=r[2]),r[3]!==e?(a=(0,l.jsxs)(d,{...e,children:[t,n,i]}),r[3]=e,r[4]=a):a=r[4],a},q=e=>{let t,n,i,a=(0,s.c)(4);return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("circle",{cx:"12",cy:"8",r:"4"}),n=(0,l.jsx)("path",{d:"M4 21a8 8 0 0 1 16 0"}),a[0]=t,a[1]=n):(t=a[0],n=a[1]),a[2]!==e?(i=(0,l.jsxs)(d,{...e,children:[t,n]}),a[2]=e,a[3]=i):i=a[3],i},E=e=>{let t,n,i,a,r,o=(0,s.c)(6);return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)("path",{d:"M16 21a6 6 0 0 0-12 0"}),n=(0,l.jsx)("circle",{cx:"10",cy:"8",r:"4"}),i=(0,l.jsx)("path",{d:"M22 21a5 5 0 0 0-5-5"}),a=(0,l.jsx)("path",{d:"M17 4a4 4 0 0 1 0 8"}),o[0]=t,o[1]=n,o[2]=i,o[3]=a):(t=o[0],n=o[1],i=o[2],a=o[3]),o[4]!==e?(r=(0,l.jsxs)(d,{...e,children:[t,n,i,a]}),o[4]=e,o[5]=r):r=o[5],r},D="Enter Answer",T=/_{3,}/g,F=(e,t)=>"".concat(e," - ").concat(t," Questions"),z={id:"fallback-student-exam",title:"Student Activity",type:"Interpretation",createdDate:"08/04/2026",attemptCount:"0 / 1",examData:{assignContent:{question:!0,form:!1,scaffolding:!0},durationMinutes:null,proctoring:{mode:"Online Proctoring",fullscreenRequired:!1,autoSubmitOnTimeout:!0},modules:{referenceImages:[],questions:[{id:"fallback-question-1",type:"Descriptive",prompt:"Review the clinical prompt and write the most appropriate interpretation.",marks:"5",placeholder:D,domain:"Cognitive",isCritical:!0}],form:[],scaffolding:[{id:"fallback-scaffold-1",type:"Descriptive",prompt:"State one supporting point for your interpretation.",marks:"1",placeholder:D,domain:"Cognitive"}]}}},W=(e,t)=>(null==e?void 0:e.trim())||t,L=e=>null!=e?e:"Not Applicable",R=e=>String.fromCharCode(65+e%26),O=(e,t)=>{var n,l,s,i,a,r,o,c,u,d,m,h,p;
1if("string"==typeof e){let n=String(e).trim();return n?{id:"reference-".concat(t+1),src:n,label:"Image ".concat(R(t)),tag:R(t)}:{id:"reference-".concat(t+1),src:"",label:"Image ".concat(R(t)),tag:R(t)}}let x=null!=(r=null!=(a=null!=(i=null!=(s=null!=(l=null!=(n=null==e?void 0:e.src)?n:null==e?void 0:e.previewUrl)?l:null==e?void 0:e.url)?s:null==e?void 0:e.image_url)?i:null==e?void 0:e.imageUrl)?a:null==e?void 0:e.href)?r:"";return{...e,id:null!=(d=null!=(u=null!=(c=null!=(o=null==e?void 0:e.id)?o:null==e?void 0:e.key)?c:x)?u:null==e?void 0:e.previewUrl)?d:"reference-".concat(t+1),src:String(x||"").trim(),label:null!=(h=null!=(m=null==e?void 0:e.label)?m:null==e?void 0:e.title)?h:"Image ".concat(R(t)),tag:null!=(p=null==e?void 0:e.tag)?p:R(t)}},Q=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Activity";if("form"===e)return{key:"form",label:"Activity Form",title:"Activity form started",description:"Complete the observation and calculation fields for this station before moving ahead.",icon:C,tone:"is-form"};if("scaffolding"===e)return{key:"scaffolding",label:"Scaffolded Questions",title:"Scaffolded questions",description:"Read and answer these guided questions one by one. They help check the reasoning behind the activity response.",icon:m,tone:"is-scaffolding"};let n=P(t);return{key:"question",label:"".concat(t||"Activity"," Questions"),title:"".concat(t||"Activity"," questions"),description:"Read each question carefully, and make sure to submit a complete answer.",icon:n.icon,tone:n.tone}},P=e=>{let t=String(null!=e?e:"").toLowerCase();return t.includes("image")?{tone:"is-type-image",icon:S}:t.includes("interpretation")?{tone:"is-type-interpretation",icon:I}:t.includes("ospe")?{tone:"is-type-ospe",icon:w}:t.includes("osce")?{tone:"is-type-osce",icon:I}:t.includes("scaffolding")?{tone:"is-type-scaffolding",icon:m}:t.includes("form")?{tone:"is-type-form",icon:C}:t.includes("mcq")||t.includes("true or false")?{tone:"is-type-question",icon:v}:{tone:"is-type-question",icon:j}},Z=e=>{var t,n,l,s,i,a,r,o,c,u,d;return!!(null!=(d=null!=(u=null!=(c=null!=(o=null!=(r=null==e?void 0:e.certifiable)?r:null==e?void 0:e.isCertifiable)?o:null==e||null==(t=e.examData)?void 0:t.certifiable)?c:null==e||null==(n=e.examData)?void 0:n.isCertifiable)?u:null==e||null==(s=e.activityData)||null==(l=s.activity)?void 0:l.certifiable)?d:null==e||null==(a=e.activityData)||null==(i=a.activity)?void 0:i.isCertifiable)},B=e=>{if(null==e)return"—";let t=String(e).trim();return""===t?"—":t},H=e=>{var t,n,l,s,i,a,r,o,c;let u=null!=e?e:z,d=null!=(t=u.examData)?t:z.examData,m=null!=(n=d.assignContent)?n:{question:!0,form:!1,scaffolding:!1,checklist:!1},h=null!=(l=d.modules)?l:{},p=(null!=(s=h.referenceImages)?s:[]).map(O),x="image"===String(null!=(i=u.type)?i:"").trim().toLowerCase(),f=m.checklist&&Array.isArray(h.checklist)&&h.checklist.length?(null!=(a=h.checklist)?a:[]).map((e,t)=>{var n,l,s,i,a,r,o,c,u,d,m,h,p;return{id:null!=(n=e.id)?n:"checklist-".concat(t+1),section:"checklist",kind:"Checklist",title:null!=(l=e.title)?l:"",prompt:W(null!=(i=null!=(s=e.questionText)?s:e.prompt)?i:e.item_text,"Faculty checklist item."),marks:null!=(a=e.marks)?a:"1",cognitive:L(null!=(o=null!=(r=e.cognitive)?r:e.cognitive_level)?o:e.cognitive_domain),affective:L(null!=(u=null!=(c=e.affective)?c:e.affective_level)?u:e.affective_domain),psychomotor:L(null!=(m=null!=(d=e.psychomotor)?d:e.psychomotor_level)?m:e.psychomotor_domain),isCritical:!!(null!=(h=e.isCritical)?h:e.is_critical),tags:null!=(p=e.tags)?p:[]}}):[],v=m.question?(null!=(r=h.questions)?r:[]).map((e,t)=>{var n,l,s,i,a,r,o,c,u,d,m,h,f,v;return{id:null!=(n=e.id)?n:"question-".concat(t+1),section:"question",kind:null!=(l=e.type)?l:"Descriptive",fieldType:null!=(s=e.fieldType)?s:e.field_type,title:null!=(i=e.title)?i:"",prompt:W(null!=(a=e.questionText)?a:e.prompt,"Add the main question prompt here."),marks:null!=(r=e.marks)?r:"1",placeholder:D,options:null!=(o=e.options)?o:[],domain:null!=(c=e.domain)?c:"Cognitive",cognitive:L(null!=(u=e.cognitive)?u:"Cognitive"===e.domain?e.domain:void 0),affective:L(e.affective),psych
1omotor:L(e.psychomotor),isCritical:!!(null!=(d=e.isCritical)?d:e.is_critical),tags:null!=(m=e.tags)?m:[],imageQuestionTag:x?R(t):"",referenceImages:x?(null!=(f=null!=(h=e.referenceImages)?h:e.images)?f:[]).length?(null!=(v=e.referenceImages)?v:e.images).map(O):p:[]}}):[],g=m.form?(null!=(o=h.form)?o:[]).map((e,t)=>{var n,l,s,i,a,r,o,c,u,d;return{id:null!=(n=e.id)?n:"form-".concat(t+1),section:"form",kind:null!=(l=e.formType)?l:"single",title:null!=(s=e.title)?s:"",prompt:W(null!=(i=e.questionText)?i:e.prompt,"Add the form prompt here."),marks:null!=(a=e.marks)?a:"1",responses:(null!=(r=e.responses)?r:[]).map((t,n,l)=>{var s,i,a;return{id:null!=(i=t.key)?i:"".concat(null!=(s=e.id)?s:"form","-response-").concat(n+1),label:null!=(a=t.label)?a:"Response ".concat(n+1),placeholder:l.length>1?"".concat(D," ").concat(n+1):D}}),domain:null!=(o=e.domain)?o:"Psychomotor",cognitive:L(e.cognitive),affective:L(e.affective),psychomotor:L(null!=(c=e.psychomotor)?c:"Psychomotor"===e.domain?e.domain:void 0),isCritical:!!(null!=(u=e.isCritical)?u:e.is_critical),tags:null!=(d=e.tags)?d:[],referenceImages:x?p:[]}}):[],y=m.scaffolding?(null!=(c=h.scaffolding)?c:[]).map((e,t)=>{var n,l,s,i,a,r,o,c,u,d,m;return{id:null!=(n=e.id)?n:"scaffold-".concat(t+1),section:"scaffolding",kind:null!=(l=e.type)?l:"Descriptive",fieldType:null!=(s=e.fieldType)?s:e.field_type,title:null!=(i=e.title)?i:"",prompt:W(null!=(a=e.questionText)?a:e.prompt,"Add the scaffolding prompt here."),marks:null!=(r=e.marks)?r:"1",placeholder:D,options:null!=(o=e.options)?o:[],domain:null!=(c=e.domain)?c:"Cognitive",cognitive:L(null!=(u=e.cognitive)?u:"Cognitive"===e.domain?e.domain:void 0),affective:L(e.affective),psychomotor:L(e.psychomotor),isCritical:!!(null!=(d=e.isCritical)?d:e.is_critical),tags:null!=(m=e.tags)?m:[],referenceImages:[]}}):[];return{resolved:u,examData:d,referenceImages:p,checklistSections:f,questionSections:v,formSections:g,scaffoldingSections:y,examItems:[...v,...g,...y]}};function G(e){return{questions:Object.fromEntries(e.questionSections.map(e=>[e.id,""])),forms:Object.fromEntries(e.formSections.flatMap(e=>e.responses.map(e=>[e.id,""]))),scaffolding:Object.fromEntries(e.scaffoldingSections.map(e=>[e.id,""]))}}function V(e){var t,n,r,o,c,u,d,m,p,x,v,g,y;let b,j,k,N,w,C,_,A,M,I,q,E,F,z,W,L,O,Q,P,Z,B,H,G=(0,s.c)(100),{item:V,activityType:X,value:$,formValues:K,onChangeQuestion:ee,onChangeForm:et,referenceImages:en}=e,[el,es]=(0,i.useState)(null);G[0]!==el?(b=()=>{if(!el)return;let e=e=>{"Escape"===e.key&&es(null)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},j=[el],G[0]=el,G[1]=b,G[2]=j):(b=G[1],j=G[2]),(0,i.useEffect)(b,j);let ei=String(null!=(n=V.kind)?n:"");G[3]!==ei?(k=ei.trim().toLowerCase(),G[3]=ei,G[4]=k):k=G[4];let ea=k,er="true or false"===ea,eo="mcq"===ea||er;G[5]!==er||G[6]!==V.options?(N=er&&0===V.options.length?[{value:"True",label:"True"},{value:"False",label:"False"}]:V.options,G[5]=er,G[6]=V.options,G[7]=N):N=G[7];let ec=N;G[8]===Symbol.for("react.memo_cache_sentinel")?(w=["fill in the blanks","numeric","calculation","observation"],G[8]=w):w=G[8];let eu=w.includes(ea);if(G[9]!==X||G[10]!==K||G[11]!==V.affective||G[12]!==V.cognitive||G[13]!==V.id||G[14]!==V.isCritical||G[15]!==V.marks||G[16]!==V.prompt||G[17]!==V.psychomotor||G[18]!==V.referenceImages||G[19]!==(null==(t=V.responses)?void 0:t[0])||G[20]!==V.section||G[21]!==V.tags||G[22]!==et||G[23]!==ee||G[24]!==en||G[25]!==eu||G[26]!==$){let e,t,n,s,i,a,b,j,k=null!=(y=null==(g=String(null!=(v=V.prompt)?v:"").match(T))?void 0:g.length)?y:0,N=(C=k>0&&("form"===V.section||eu))?((e,t)=>{let n=String(null!=e?e:"").split(" | ");return Array.from({length:t},(e,t)=>{var l;return null!=(l=n[t])?l:""})})("form"===V.section?null!=(u=K[null==(o=V.responses)||null==(r=o[0])?void 0:r.id])?u:"":$,k):[];_="image"===String(null!=X?X:"").trim().toLowerCase(),G[37]!==en?(e=Array.isArray(en)?en:[],G[37]=en,G[38]=e):e=G[38];let S=e;G[39]!==V.referenceImages?(t=Array.isArray(V.referenceImages)?V.referenceImages:[],G[39]=V.referenceImages,G[40]=t):t=G[40];let w=t;A=S.length?S:w,M=!!("scaffolding"!==V.section&&A.length&&_&&("question"===V.section||"form"===V.section));let D="COG ".concat(null!=(d=V.cognitive)?d:"Not Applicable");G[41]!==D?(n={label:D,tone:"is-domain-cognitive"},G[41]=D,G[42]=n):n=G[42];let L="AFF ".concat(null!=(m=V.affective)?m:"Not Applicable");G[43]!==L?(s={label:L,tone:"is-domain-affective"},G[43]=L,G[44]=s):s=G[44];let R="PSY ".concat(null!=(p=V.psychomotor)?p:"Not Applicable");G[45]!==R?(i={label:R,tone:"is-domain-psychomotor"},G[45]=R,G[46]=i):i=G[46],G[47]!==V.isCritical?(a=V.isCritical?[{label:"Criticality",tone:"is-critical",icon:h}]:[],G[47]=V.isCritical,G[48]=a):a=G[48];let O="".concat(V.marks," Mark").concat("1"===String(V.marks)?"":"s");G[49]!==O?(b={label:O,tone:"is-marks",icon:f},G[49]=O,G[50]=b):b=G[50],G[51]!==V.tags||G[52]!==n||G[53]!==s||G[54]!==i||G[55]!==a||G[56]!==b?(j=[n,s,i,...a,b,...(null!=(x=V.tags)?x:[]).map(J)],G[51]=V.tags,G[52]=n,G[53]=s,G[54]=i,G[55]=a,G[56]=b,G[57]=j):j=G[57];let Q=j;E="student-exam-question-stage ".concat(V.isCritical?"is-critical":""),I="student-exam-question-top",G[58]!==Q||G[59]!==V.id?(q=(0,l.jsx)("div",{className:"student-exam-badge-row",children:Q.map(e=>{var t;return(0,l.jsxs)("span",{className:"student-exam-badge ".concat(null!=(t=e.tone)?t:""),children:[e.icon?(0,l.jsx)(e.icon,{size:12,strokeWidth:2}):null,e.label]},"".concat(V.id,"-").concat(e.label))})}
1),G[58]=Q,G[59]=V.id,G[60]=q):q=G[60],W="student-exam-question-copy",F=C?"has-inline-blanks":"",z=(()=>{var e;if(!C)return V.prompt;let t=String(null!=(e=V.prompt)?e:"").split(T);return t.flatMap((e,n)=>{var s;return n===t.length-1?[e]:[e,(0,l.jsx)("input",{className:"student-exam-inline-blank-input",value:null!=(s=N[n])?s:"",onChange:e=>((e,t)=>{let n=N.map((n,l)=>l===e?t:n).map(e=>String(null!=e?e:"")).join(" | ");if("form"===V.section){var l;let e=null==(l=V.responses)?void 0:l[0];e&&et(e.id,n);return}ee(V.id,n,V.section)})(n,e.target.value),"aria-label":"Blank ".concat(n+1)},"".concat(V.id,"-blank-").concat(n+1))]})})(),G[9]=X,G[10]=K,G[11]=V.affective,G[12]=V.cognitive,G[13]=V.id,G[14]=V.isCritical,G[15]=V.marks,G[16]=V.prompt,G[17]=V.psychomotor,G[18]=V.referenceImages,G[19]=null==(c=V.responses)?void 0:c[0],G[20]=V.section,G[21]=V.tags,G[22]=et,G[23]=ee,G[24]=en,G[25]=eu,G[26]=$,G[27]=C,G[28]=_,G[29]=A,G[30]=M,G[31]=I,G[32]=q,G[33]=E,G[34]=F,G[35]=z,G[36]=W}else C=G[27],_=G[28],A=G[29],M=G[30],I=G[31],q=G[32],E=G[33],F=G[34],z=G[35],W=G[36];return G[61]!==F||G[62]!==z?(L=(0,l.jsx)("h2",{className:F,children:z}),G[61]=F,G[62]=z,G[63]=L):L=G[63],G[64]!==L||G[65]!==W?(O=(0,l.jsx)("div",{className:W,children:L}),G[64]=L,G[65]=W,G[66]=O):O=G[66],G[67]!==I||G[68]!==q||G[69]!==O?(Q=(0,l.jsxs)("div",{className:I,children:[q,O]}),G[67]=I,G[68]=q,G[69]=O,G[70]=Q):Q=G[70],G[71]!==_||G[72]!==V.id||G[73]!==V.section||G[74]!==A||G[75]!==M?(P=M?(0,l.jsx)("div",{className:"student-exam-stage-media".concat(_&&("question"===V.section||"form"===V.section)?" student-exam-stage-media--image-centered":""),children:A.map((e,t)=>{var n,s,i,a,r,o,c,u;let d=null!=(i=null!=(s=null!=(n=e.previewUrl)?n:e.src)?s:e.url)?i:"",m=null!=(r=null!=(a=e.label)?a:e.title)?r:"Reference Image ".concat(t+1);return(0,l.jsxs)("figure",{className:"student-exam-stage-media-card",children:[d?(0,l.jsx)("button",{type:"button",className:"student-exam-stage-media-zoom",onClick:()=>es({src:d,alt:m}),"aria-label":"View larger image: ".concat(m),children:(0,l.jsx)("img",{src:d,alt:m,onError:U})}):(0,l.jsx)(S,{size:24,strokeWidth:2}),(0,l.jsxs)("figcaption",{children:[(0,l.jsx)("span",{children:null!=(o=e.tag)?o:R(t)}),m]})]},null!=(u=null!=(c=e.id)?c:d)?u:"".concat(V.id,"-").concat(t+1))})}):null,G[71]=_,G[72]=V.id,G[73]=V.section,G[74]=A,G[75]=M,G[76]=P):P=G[76],G[77]!==el?(Z=el&&"undefined"!=typeof document?(0,a.createPortal)((0,l.jsxs)("div",{className:"student-exam-image-lightbox",role:"dialog","aria-modal":"true","aria-label":"Enlarged reference image",onClick:()=>es(null),children:[(0,l.jsx)("button",{type:"button",className:"student-exam-image-lightbox-close","aria-label":"Close enlarged image",onClick:e=>{e.stopPropagation(),es(null)},children:"\xd7"}),(0,l.jsx)("img",{src:el.src,alt:el.alt,onClick:Y})]}),document.body):null,G[77]=el,G[78]=Z):Z=G[78],G[79]!==K||G[80]!==C||G[81]!==eo||G[82]!==V.id||G[83]!==V.placeholder||G[84]!==V.prompt||G[85]!==V.responses||G[86]!==V.section||G[87]!==ea||G[88]!==et||G[89]!==ee||G[90]!==ec||G[91]!==eu||G[92]!==$?(B=C?null:"form"===V.section?(0,l.jsx)("div",{className:"student-exam-form-stack",children:V.responses.map(e=>{var t;let n;return(0,l.jsxs)("label",{className:"student-exam-field",children:[(n=e.label,/^Q\d+$/i.test(String(null!=n?n:"").trim()))?null:(0,l.jsx)("span",{children:e.label}),(0,l.jsx)("input",{"aria-label":e.label||D,value:null!=(t=K[e.id])?t:"",onChange:t=>et(e.id,t.target.value),placeholder:e.placeholder})]},e.id)})}):eo&&ec.length?(0,l.jsx)("div",{className:"student-exam-choice-grid",role:"radiogroup","aria-label":V.prompt,children:ec.map((e,t)=>{var n,s,i,a,r,o,c,u,d,m;let h=e&&"object"==typeof e?String(null!=(o=null!=(r=null!=(a=null!=(i=null!=(s=null!=(n=e.value)?n:e.id)?s:e.key)?i:e.option)?a:e.label)?r:e.text)?o:""):String(null!=e?e:""),p=e&&"object"==typeof e?String(null!=(m=null!=(d=null!=(u=null!=(c=e.label)?c:e.text)?u:e.option)?d:e.value)?m:""):String(null!=e?e:"");return(0,l.jsxs)("label",{className:"student-exam-choice-card ".concat(String($)===h?"is-selected":""),children:[(0,l.jsx)("input",{type:"radio",name:V.id,checked:String($)===h,onChange:()=>ee(V.id,h,V.section)}),(0,l.jsx)("span",{children:p})]},"".concat(V.id,"-").concat(h||t))})}):eu?(0,l.jsx)("input",{className:"student-exam-answer-input",type:"numeric"===ea?"number":"text",value:$,onChange:e=>ee(V.id,e.target.value,V.section),placeholder:V.placeholder}):(0,l.jsx)("textarea",{rows:7,className:"student-exam-answer-area",value:$,onChange:e=>ee(V.id,e.target.value,V.section),placeholder:V.placeholder}),G[79]=K,G[80]=C,G[81]=eo,G[82]=V.id,G[83]=V.placeholder,G[84]=V.prompt,G[85]=V.responses,G[86]=V.section,G[87]=ea,G[88]=et,G[89]=ee,G[90]=ec,G[91]=eu,G[92]=$,G[93]=B):B=G[93],G[94]!==E||G[95]!==Q||G[96]!==P||G[97]!==Z||G[98]!==B?(H=(0,l.jsxs)("article",{className:E,
1children:[Q,P,Z,B]}),G[94]=E,G[95]=Q,G[96]=P,G[97]=Z,G[98]=B,G[99]=H):H=G[99],H}function Y(e){return e.stopPropagation()}function U(e){e.currentTarget.onerror=null,e.currentTarget.src="/assests/png/fallback-image.png"}function J(e){return{label:e,tone:"is-tag"}}function X(e){var t,n,s,a,d,v,S,w,I,D,T,z,W,L,R,O,Y,U,J,X,$,K,ee,et,en,el,es,ei,ea,er,eo,ec,eu,ed,em;let eh,{assignment:ep,onBackToActivities:ex,onSubmitExam:ef,onAlert:ev,onRecordExamLog:eg}=e,[ey,eb]=(0,i.useState)(ep),[ej,ek]=(0,i.useState)(null),[eN,eS]=(0,i.useState)(!0);(0,i.useEffect)(()=>{var e,t,n,l,s,i,a;eb(ep),ek(null),(null==ep||null==(e=ep.examData)?void 0:e.modules)&&((null!=(s=null==(t=ep.examData.modules.questions)?void 0:t.length)?s:0)>0||(null!=(i=null==(n=ep.examData.modules.form)?void 0:n.length)?i:0)>0||(null!=(a=null==(l=ep.examData.modules.scaffolding)?void 0:l.length)?a:0)>0)||(null==ep?void 0:ep.__loadedFromApi)?eS(!1):eS(!0)},[ep]),(0,i.useEffect)(()=>{var e,t,n,l,s,i,a,u;let d=null!=(s=null==ep?void 0:ep.activityId)?s:null==ep?void 0:ep.id,m=r.A.get("token"),h=(null==ep||null==(e=ep.examData)?void 0:e.modules)&&((null!=(i=null==(t=ep.examData.modules.questions)?void 0:t.length)?i:0)>0||(null!=(a=null==(n=ep.examData.modules.form)?void 0:n.length)?a:0)>0||(null!=(u=null==(l=ep.examData.modules.scaffolding)?void 0:l.length)?u:0)>0);if(h||(null==ep?void 0:ep.__loadedFromApi)||!d||!m){(h||(null==ep?void 0:ep.__loadedFromApi))&&eS(!1);return}let p=!1;return eS(!0),(0,o.mH)(d,m).then(async e=>{let t=await e.json().catch(()=>({}));if(!p){if(!e.ok||!(null==t?void 0:t.data)){ek(String((null==t?void 0:t.Details)||(null==t?void 0:t.message)||"Could not load activity content.")),eS(!1);return}eb((0,c.k)(t.data,ep)),eS(!1)}}).catch(()=>{p||(ek("Could not load activity content."),eS(!1))}),()=>{p=!0}},[ep]);let ew=(0,i.useMemo)(()=>H(ey),[ey]),{resolved:eC,examData:e_,examItems:eA,referenceImages:eM}=ew,eI=(0,i.useMemo)(()=>((e,t,n)=>{var l,s,i,a,r,o,c,d,m,h,p,x,f,v,g,y,b,j,k,N,S;let w=(null==n?void 0:n.learner)&&"object"==typeof n.learner?n.learner:{};return{studentName:B(null!=(m=null!=(d=null!=(c=null!=(o=null!=(r=null==n?void 0:n.studentName)?r:w.name)?o:e.studentName)?c:null==(l=e.student)?void 0:l.name)?d:e.assignedStudentName)?m:e.assigneeName),studentId:B(null!=(v=null!=(f=null!=(x=null!=(p=null!=(h=null==n?void 0:n.studentRegisterId)?h:w.register_id)?p:e.studentId)?x:null==(s=e.student)?void 0:s.id)?f:e.assignedStudentId)?v:e.registrationNumber),year:B((0,u.FE)(null!=(g=null==n?void 0:n.yearLabel)?g:w.year,null!=(y=w.year_name)?y:w.yearName)||e.year||(null==(i=e.student)?void 0:i.year)||e.targetYear||e.assigningYear),sgt:B(null!=(S=null!=(N=null!=(k=null!=(j=null!=(b=null==n?void 0:n.sectionLabel)?b:w.section)?j:e.sgt)?k:null==(a=e.student)?void 0:a.sgt)?N:e.targetSgt)?S:e.assigningSgt),questionCount:t.length}})(eC,eA,ey),[eC,eA,ey]),eq="nil"===String(null!=(s=null!=(n=null==eC?void 0:eC.marks)?n:null==ep?void 0:ep.marks)?s:"").trim().toLowerCase(),eE=Z(eC)||Z(ep),[eD,eT]=(0,i.useState)("prestart"),[eF,ez]=(0,i.useState)(()=>G(ew)),[eW,eL]=(0,i.useState)((null!=(a=e_.durationMinutes)?a:0)*60),[eR,eO]=(0,i.useState)([]),[eQ,eP]=(0,i.useState)(0),[eZ,eB]=(0,i.useState)(null),[eH,eG]=(0,i.useState)(!1),[eV,eY]=(0,i.useState)(!!(null==ep?void 0:ep.fullscreenPromptOnOpen)),[eU,eJ]=(0,i.useState)(()=>new Set),[eX,e$]=(0,i.useState)(""),eK=(0,i.useRef)(!1),e0=(0,i.useMemo)(()=>(e=>{var t,n,l,s,i,a,r,o,c,u,d,m,h;let p=null!=(a=null!=(i=null!=(s=null==e?void 0:e.activityId)?s:null==e?void 0:e.id)?i:null==e?void 0:e.oid)?a:"unknown-activity",x=null!=(d=null!=(u=null!=(c=null!=(o=null!=(r=null==e?void 0:e.studentRegisterId)?r:null==e?void 0:e.studentId)?o:null==e||null==(t=e.learner)?void 0:t.register_id)?c:null==e||null==(n=e.learner)?void 0:n.id)?u:null==e||null==(l=e.student)?void 0:l.id)?d:"unknown-student",f=null!=(h=null!=(m=null==e?void 0:e.attemptNumber)?m:null==e?void 0:e.attempt_count)?h:1;return"".concat("student-exam-session",":").concat(x,":").concat(p,":").concat(f)})(null!=ey?ey:ep),[ey,ep]);(0,i.useEffect)(()=>{var e,t,n,l,s,i,a,r,o;let c=H(ey),u=(e=>{try{let t=window.sessionStorage.getItem(e);if(!t)return null;let n=JSON.parse(t);return n&&"object"==typeof n?n:null}catch(e){return null}})(e0),d=Number(null!=(t=null!=(e=null==ey?void 0:ey.attemptNumber)?e:null==ey?void 0:ey.attempt_count)?t:1),m=(null==ey?void 0:ey.hasSubmitted)===!1||(null==ey?void 0:ey.has_submitted)===!1||(null==ey?void 0:ey.status)==="Assigned"||(null==ey?void 0:ey.status)==="Live Activity";if(u&&"object"==typeof u){let e=Number(null!=(n=u.attemptNumber)?n:d);if("submitted"===u.phase&&(m||e!==d)){ez(G(c)),eL((null!=(l=c.examData.durationMinutes)?l:0)*60),eO([]),eP(0),eB(null),eG(!1),eY(!!(null==ey?void 0:ey.fullscreenPromptOnOpen)),eJ(new Set),e$(""),eT("prestart"),eK.current=!1;return}let t=c.examItems.length,o=G(c),h=u.answers&&"object"==typeof u.answers?u.answers:{},p=Number.isFinite(Number(u.currentIndex))?Math.max(0,Math.min(t>0?t-1:0,Number(u.currentIndex))):0,x="string"==typeof u.pendingSectionIntro?u.pendingSectionIntro:null,f=!!x&&c.examItems.some(e=>e.section===x),v=Array.isArray(u.visitedQuestionIds)?u.visitedQuestionIds.filter(e=>"string"==typeof e):[];ez({questions:{...o.questions,...null!=(s=h.questions)?s:{}},forms:{...o.forms,...null!=(i=h.forms)?i:{}},scaffolding:{...o.scaffolding,...null!=(a=h.scaffolding)?a:{}}}),eL(Number.isFinite(Number(u.remainingSeconds))?Math.max(0,Number(u.remainingSeconds)):(null!=(r=c.examData.durationMinutes)?r:0)*60),eO(Array.isArray(u.proctoringLog)?u.proctoringLog:[]),eP(p),eB(f?x:null),eG(!1),eY("active"===u.phase),eJ(new Set(v)),e$("string"==typeof u.submittedAt?u.submittedAt:""),eT(["prestart","active","submitted"].includes(u.phase)?u.phase:"prestart"),eK.current="submitted"===u.phase;return}ez(G(c)),eL((null!=(o=c.examData.durationMinutes)?o:0)*60),eO([]),eP(0),eB(null),eG(!1),eY(!!(null==ey?void 0:ey.fullscreenPromptOnOpen)),eJ(new Set),e$(""),eT("prestart"),eK.current=!1},[e0,ey]);let e1=e=>{var t;return"form"===e.section?e.responses.every(e=>{var t;return String(null!=(t=eF.forms[e.id])?t:"").trim()}):!!String(null!=(t=("scaffolding"===e.section?eF.scaffolding:eF.questions)[e.id])?t:"").trim()},e2=eA.filter(e1).length,e4=null!=(d=eA[eQ])?d:null,e3=e4?"form"===e4.section?e4.responses[0]?String(null!=(v=eF.forms[e4.responses[0].id])?v:""):"":"scaffolding"===e4.section?null!=(S=eF.scaffolding[e4.id])?S:"":null!=(w=eF.questions[e4.id])?w:"":"",e5=!!e4&&("form"===e4.section?e4.responses.every(e=>{var t;return String(null!=(t=eF.forms[e.id])?t:"").trim()}):!!String(e3).trim()),e6=eA.length>0&&e2===eA.length,e7=e=>{var t,n,l,s,i,a;
1let{message:r,eventType:o="Info",severity:c="info",detail:u=r}=e,d=new Date;eO(e=>[{id:"".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,6)),message:r,time:d.toLocaleTimeString("en-GB")},...e].slice(0,10)),null==eg||eg({activityId:null!=(n=null!=(t=eC.id)?t:null==ep?void 0:ep.id)?n:"unknown-activity",activityName:null!=(s=null!=(l=eC.title)?l:null==ep?void 0:ep.title)?s:"Student Activity",activityType:null!=(a=null!=(i=eC.type)?i:null==ep?void 0:ep.type)?a:"Activity",studentId:eI.studentId,studentName:eI.studentName,eventType:o,detail:u,severity:c,timestamp:d.toISOString(),status:"submitted"===eD?"Completed":"Live"})};(0,i.useEffect)(()=>{var e,t,n={phase:eD,attemptNumber:null!=(t=null!=(e=null==ey?void 0:ey.attemptNumber)?e:null==ey?void 0:ey.attempt_count)?t:1,answers:eF,remainingSeconds:eW,proctoringLog:eR,currentIndex:eQ,pendingSectionIntro:eZ,visitedQuestionIds:Array.from(eU),submittedAt:eX};try{window.sessionStorage.setItem(e0,JSON.stringify(n))}catch(e){}},[eF,eQ,e0,null==ey?void 0:ey.attemptNumber,null==ey?void 0:ey.attempt_count,eZ,eD,eR,eW,eX,eU]),(0,i.useEffect)(()=>{},[!1,eD]),(0,i.useEffect)(()=>{},[!1,eD,eW]),(0,i.useEffect)(()=>{"active"===eD&&!eZ&&e4&&eJ(e=>{if(e.has(e4.id))return e;let t=new Set(e);return t.add(e4.id),t})},[e4,eZ,eD]),(0,i.useEffect)(()=>{if("active"!==eD)return;let e=()=>{document.fullscreenElement||eK.current||(eY(!0),e7({message:"Fullscreen was exited during the activity.",eventType:"Fullscreen Exit",severity:"warning",detail:"Student left fullscreen mode during the activity."}))};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[eD]);let e8=async()=>{var e;if("undefined"==typeof document)return!0;if(document.fullscreenElement)return eY(!1),!0;if(!(null==(e=document.documentElement)?void 0:e.requestFullscreen))return eY(!0),!1;try{return await document.documentElement.requestFullscreen(),eY(!1),!0}catch(e){return eY(!0),!1}},e9=async()=>{if("undefined"!=typeof document&&document.fullscreenElement&&document.exitFullscreen)try{await document.exitFullscreen()}catch(e){}},te=async()=>{eY(!1),await e9(),null==ex||ex()},tt=async()=>{var e,t;if(eq){null==ev||ev({tone:"warning",message:"This activity is unavailable because marks are disabled."});return}await e8()&&(e7({message:"Activity started.",eventType:"Exam Started",severity:"info",detail:"Student started the activity."}),eB(null!=(t=null==(e=eA[0])?void 0:e.section)?t:null),eP(0),eT("active"))},tn=e=>{if(eA.length){if(eZ){if(e>0)return void eB(null);let t=Math.max(0,eQ-1);return eB(null),void eP(t)}eP(t=>{var n,l,s,i;let a=Math.max(0,Math.min(eA.length-1,t+e));return e>0&&(null==(n=eA[a])?void 0:n.section)!==(null==(l=eA[t])?void 0:l.section)&&eB(null!=(i=null==(s=eA[a])?void 0:s.section)?i:null),a})}},tl=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=eA.findIndex(t=>t.id===e.id);n<0||(eP(n),eB(t?e.section:null))},ts=async function(){var e,t,n,l,s;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"manual";if(eq||eK.current||eN)return;if("manual"===i&&!e6){null==ev||ev({tone:"warning",message:"Complete every mandatory question before final submission."});return}let a=null!=(t=null!=(e=null==ep?void 0:ep.activityId)?e:null==ep?void 0:ep.id)?t:null==eC?void 0:eC.id,c=null!=(n=null==ep?void 0:ep.assignmentRowId)?n:null==ep?void 0:ep.assignment_row_id,u=Number(null==ep?void 0:ep.attemptNumber)||void 0,d=r.A.get("token"),m=[];if(ew.questionSections.forEach(e=>{var t;return m.push(String(null!=(t=eF.questions[e.id])?t:""))}),ew.formSections.forEach(e=>(e.responses||[]).forEach(e=>{var t;m.push(String(null!=(t=eF.forms[e.id])?t:""))})),ew.scaffoldingSections.forEach(e=>{var t;return m.push(String(null!=(t=eF.scaffolding[e.id])?t:""))}),!d||!a){null==ev||ev({tone:"warning",message:"Session expired. Sign in again before submitting."});return}try{let e=await (0,o.lZ)(d,{assignment_id:a,assignment_row_id:c||void 0,attempt_count:u,answers:m}),t=await e.json().catch(()=>({}));if(!e.ok){null==ev||ev({tone:"warning",message:(null==t?void 0:t.message)||(null==t?void 0:t.Details)||"Could not submit answers."});return}}catch(e){null==ev||ev({tone:"warning",message:"Network error while submitting."});return}eK.current=!0;
1let h=new Date().toLocaleString("en-GB");eG(!1),e$(h),eT("submitted"),await e9(),e7({message:"timeout"===i?"Activity was auto-submitted.":"Activity submitted successfully.",eventType:"timeout"===i?"Auto Submitted":"Exam Submitted",severity:"timeout"===i?"warning":"success",detail:"timeout"===i?"Exam was automatically submitted when the timer ended.":"Student completed and submitted the exam."}),null==ef||ef({...eC,status:"Completed",attemptCount:"".concat(null!=(l=null==ep?void 0:ep.attemptNumber)?l:1," / ").concat(null!=(s=null==ep?void 0:ep.attemptNumber)?s:1),submittedAt:h,answers:eF,proctoring:{warningCount:0,tabSwitchCount:0,fullscreenExitCount:0,events:eR,timedOut:"timeout"===i}})},ti=P(null!=(I=eC.type)?I:"Activity"),ta=[{...Q("question",eh=null!=(D=eC.type)?D:"Activity"),count:ew.questionSections.length},{...Q("form",eh),count:ew.formSections.length},{...Q("scaffolding",eh),count:ew.scaffoldingSections.length}].filter(e=>e.count>0).sort((e,t)=>{let n=eA.findIndex(t=>t.section===e.key),l=eA.findIndex(e=>e.section===t.key);return(n<0?Number.MAX_SAFE_INTEGER:n)-(l<0?Number.MAX_SAFE_INTEGER:l)}),tr=Q(null!=(z=null!=(T=null==e4?void 0:e4.section)?T:eZ)?z:"question",null!=(W=eC.type)?W:"Activity"),to=e4?eA.filter(e=>e.section===e4.section):[],tc=e4?to.findIndex(e=>e.id===e4.id)+1:0,tu=ta.find(e=>e.key===eZ),td=tr.icon,tm=null!=(L=null==tu?void 0:tu.icon)?L:tr.icon,th=null!=(O=null!=(R=null!=eZ?eZ:null==e4?void 0:e4.section)?R:null==(t=ta[0])?void 0:t.key)?O:"question",tp=eA.filter(e=>e.section===th),tx=Q(th,null!=(Y=eC.type)?Y:"Activity"),tf=tp.filter(e1).length,tv=[{label:"Assessment Type",value:null!=(U=eC.type)?U:"Activity",icon:C},{label:"Total Questions",value:String(eA.length),icon:j},{label:"Marks",value:eA.reduce((e,t)=>e+(Number(t.marks)||0),0)||"Nil",icon:f},{label:"Duration",value:"Flexible",icon:y},{label:"Attempt",value:(e=>{var t;let n=Number.parseInt(null==(t=String(null!=e?e:"").split("/")[0])?void 0:t.trim(),10);return Number.isFinite(n)&&n>=1?String(n):"1"})(null!=(J=eC.attemptNumber)?J:eC.attemptCount),icon:m},{label:"Assigned On",value:null!=(X=eC.createdDate)?X:"Not set",icon:g}],tg=ew.questionSections.length||eA.length,ty=F(null!=($=eC.type)?$:"Activity",tg),tb=!["osce","ospe"].includes(String(null!=(K=eC.type)?K:"").trim().toLowerCase()),tj=String(null!=(ee=eC.title)?ee:"Student Activity"),tk=tj.length>72;if(eN&&!ej)return(0,l.jsx)("section",{className:"student-exam-page",children:(0,l.jsxs)("div",{className:"student-exam-shell",style:{padding:"48px 24px",textAlign:"center"},children:[(0,l.jsxs)("button",{type:"button",className:"student-exam-back-link",onClick:ex,children:[(0,l.jsx)(p,{size:15,strokeWidth:2.2}),"Back to My Skills"]}),(0,l.jsx)("p",{style:{marginTop:24},children:"Loading activity…"})]})});if(ej)return(0,l.jsx)("section",{className:"student-exam-page",children:(0,l.jsxs)("div",{className:"student-exam-shell",style:{padding:"48px 24px",textAlign:"center"},children:[(0,l.jsxs)("button",{type:"button",className:"student-exam-back-link",onClick:ex,children:[(0,l.jsx)(p,{size:15,strokeWidth:2.2}),"Back to My Skills"]}),(0,l.jsx)("p",{style:{marginTop:24},children:ej})]})});let tN=[...tg&&tb?[{label:ty,tone:"".concat(ti.tone," is-activity-count"),icon:ti.icon}]:[],...ew.formSections.length?[{label:F("Form",ew.formSections.length),tone:"is-form",icon:C}]:[],...ew.scaffoldingSections.length?[{label:F("Scaffolding",ew.scaffoldingSections.length),tone:"is-scaffolding",icon:m}]:[],...eq?[{label:"Marks Disabled",tone:"is-critical",icon:h}]:[],...eE?[{label:"Certifiable",tone:"is-certifiable",icon:f}]:[]];return(0,l.jsxs)("section",{className:"student-exam-page",children:[(0,l.jsxs)("div",{className:"student-exam-shell",children:["prestart"===eD?(0,l.jsxs)("section",{className:"student-exam-entry",children:[(0,l.jsxs)("div",{className:"student-exam-entry-copy",children:[(0,l.jsxs)("button",{type:"button",className:"student-exam-back-link",onClick:ex,children:[(0,l.jsx)(p,{size:15,strokeWidth:2.2}),"Back to My Skills"]}),(0,l.jsxs)("span",{className:"student-exam-kicker is-briefing",children:[(0,l.jsx)(b,{size:12,strokeWidth:2.1}),"Assessment Briefing"]}),(0,l.jsxs)("h1",{className:"student-exam-entry-title ".concat(tk?"is-long":""),tabIndex:0,children:[tj,(0,l.jsxs)("span",{className:"student-exam-title-tooltip",role:"tooltip",children:[(0,l.jsx)("span",{children:null!=(el=null!=(en=null!=(et=eC.code)?et:eC.tag)?en:eC.activityCode)?el:"Activity"}),tj]})]}),(0,l.jsx)("p",{children:"Review the activity details before you begin this attempt."}),(0,l.jsx)("div",{className:"student-exam-badge-row student-exam-summary-badges",children:tN.map(e=>{let t=e.icon;return(0,l.jsxs)("span",{className:"student-exam-badge ".concat(e.tone),children:[(0,l.jsx)(t,{size:12,strokeWidth:2}),e.label]},e.label)})}),(0,l.jsx)("div",{className:"student-exam-summary-grid",children:tv.map(e=>(0,l.jsxs)("article",{className:"student-exam-summary-card",children:[(0,l.jsxs)("span",{children:[(0,l.jsx)(e.icon,{size:14,strokeWidth:2}),e.label]}),(0,l.jsx)("strong",{children:e.value})]},e.label))})]}),(0,l.jsx)("div",{className:"student-exam-entry-side",children:(0,l.jsxs)("div",{className:"student-exam-entry-panel",children:[(0,l.jsxs)("div",{className:"student-exam-entry-panel-head",children:[(0,l.jsx)("span",{className:"student-exam-panel-kicker",children:"Before You Start"}),(0,l.jsx)("strong",{children:"Instructions"})]}),(0,l.jsxs)("div",{className:"student-exam-entry-rule",children:[(0,l.jsx)(M,{size:18,strokeWidth:2.1}),(0,l.jsx)("span",{children:"Fullscreen is required to start and continue this activity."})]}),(0,l.jsxs)("div",{className:"student-exam-entry-rule",children:[(0,l.jsx)(y,{size:18,strokeWidth:2.1}),(0,l.jsx)("span",{children:"No timer is configured for this activity."})]}),eq?(0,l.jsxs)("div",{className:"student-exam-entry-rule",children:[(0,l.jsx)(h,{size:18,strokeWidth:2.1}),(0,l.jsx)("span",{children:"This activity is disabled because marks were turned off during activity creation."})]}):null,(0,l.jsx)("div",{className:"student-exam-instruction-list",children:(eq?["This activity is locked for students until marks are enabled for the assigned activity."]:["Read each question fully before answering.","Submit the activity only after reviewing all answers."]).map(e=>(0,l.jsxs)("div",{className:"student-exam-instruction-item",children:[(0,l.jsx)("span",{className:"student-exam-instruction-dot","aria-hidden":"true"}),(0,l.jsx)("span",{children:e})]},e))}),(0,l.jsxs)("button",{type:"button",className:"student-exam-primary-btn",onClick:tt,disabled:eq,children:[(0,l.jsx)(_,{size:16,strokeWidth:2.2}),eq?"Activity Disabled":"Start Activity"]})]})})]}):null,"active"===eD&&e4?(0,l.jsxs)("div",{className:"student-exam-stage",children:[(0,l.jsxs)("section",{className:"student-exam-session-banner",children:[(0,l.jsxs)("div",{className:"student-exam-session-banner-copy",children:[(0,l.jsx)("h1",{children:eC.title}),(0,l.jsx)("p",{children:"Attempt in progress."}),(0,l.jsxs)("div",{className:"student-exam-session-banner-tags",children:[(0,l.jsxs)("span",{className:"student-exam-badge ".concat(ti.tone),children:[(0,l.jsx)(ti.icon,{size:12,strokeWidth:2}),null!=(es=eC.type)?es:"Activity"]}),eE?(0,l.jsxs)("span",{className:"student-exam-badge is-certifiable",children:[(0,l.jsx)(f,{size:12,strokeWidth:2}),"Certifiable"]}):null]})]}),(0,l.jsxs)("div",{className:"student-exam-session-banner-grid",children:[(0,l.jsxs)("article",{className:"student-exam-session-tile",children:[(0,l.jsxs)("span",{children:[(0,l.jsx)(q,{size:13,strokeWidth:2}
1),"Student Name"]}),(0,l.jsx)("strong",{children:eI.studentName})]}),(0,l.jsxs)("article",{className:"student-exam-session-tile",children:[(0,l.jsxs)("span",{children:[(0,l.jsx)(k,{size:13,strokeWidth:2}),"Student ID"]}),(0,l.jsx)("strong",{children:eI.studentId})]}),(0,l.jsxs)("article",{className:"student-exam-session-tile",children:[(0,l.jsxs)("span",{children:[(0,l.jsx)(N,{size:13,strokeWidth:2}),"Year"]}),(0,l.jsx)("strong",{children:eI.year})]}),(0,l.jsxs)("article",{className:"student-exam-session-tile",children:[(0,l.jsxs)("span",{children:[(0,l.jsx)(E,{size:13,strokeWidth:2}),"SGT"]}),(0,l.jsx)("strong",{children:eI.sgt})]})]}),(0,l.jsx)("div",{className:"student-exam-session-banner-status",children:null})]}),(0,l.jsxs)("div",{className:"student-exam-stage-workspace",children:[(0,l.jsxs)("section",{className:"student-exam-stage-card",children:[eZ?(0,l.jsxs)("article",{className:"student-exam-section-start",children:[(0,l.jsx)("span",{className:"student-exam-section-start-icon ".concat(null!=(ei=null==tu?void 0:tu.tone)?ei:tr.tone),children:(0,l.jsx)(tm,{size:24,strokeWidth:2.1})}),(0,l.jsxs)("div",{className:"student-exam-section-start-copy",children:[(0,l.jsx)("span",{className:"student-exam-panel-kicker",children:"Section:1"}),(0,l.jsx)("h2",{children:null!=(ea=null==tu?void 0:tu.title)?ea:tr.title}),(0,l.jsx)("p",{children:null!=(er=null==tu?void 0:tu.description)?er:tr.description})]}),(0,l.jsxs)("div",{className:"student-exam-badge-row",children:[(0,l.jsxs)("span",{className:"student-exam-badge ".concat(null!=(eo=null==tu?void 0:tu.tone)?eo:tr.tone),children:[(0,l.jsx)(tm,{size:12,strokeWidth:2}),null!=(ec=null==tu?void 0:tu.label)?ec:tr.label]}),(0,l.jsxs)("span",{className:"student-exam-badge is-progress",children:[null!=(eu=null==tu?void 0:tu.count)?eu:to.length," Question",(null!=(ed=null==tu?void 0:tu.count)?ed:to.length)===1?"":"s"]})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"student-exam-active-section-bar",children:[(0,l.jsxs)("span",{className:"student-exam-badge ".concat(tr.tone),children:[(0,l.jsx)(td,{size:12,strokeWidth:2}),tr.label]}),(0,l.jsxs)("span",{children:["Question ",tc||eQ+1," of ",to.length||eA.length]})]}),(0,l.jsx)(V,{item:e4,activityType:eC.type,value:e3,formValues:eF.forms,onChangeQuestion:(e,t,n)=>{let l="scaffolding"===n?"scaffolding":"questions";ez(n=>({...n,[l]:{...n[l],[e]:t}}))},onChangeForm:(e,t)=>{ez(n=>({...n,forms:{...n.forms,[e]:t}}))},referenceImages:"scaffolding"===e4.section?[]:null!=(em=null!=eM?eM:e4.referenceImages)?em:[]})]}),(0,l.jsxs)("footer",{className:"student-exam-stage-footer",children:[(0,l.jsxs)("div",{className:"student-exam-stage-progress",children:[(0,l.jsxs)("span",{children:[tf," of ",tp.length," ",tx.label," completed"]}),(0,l.jsx)("div",{className:"student-exam-stage-progress-bar","aria-hidden":"true",children:(0,l.jsx)("span",{style:{width:"".concat(tf/Math.max(tp.length,1)*100,"%")}})})]}),(0,l.jsxs)("div",{className:"student-exam-nav",children:[(0,l.jsxs)("button",{type:"button",className:"student-exam-secondary-btn",onClick:()=>{0!==eQ&&tn(-1)},disabled:0===eQ,children:[(0,l.jsx)(p,{size:16,strokeWidth:2.1}),"Previous"]}),eZ?(0,l.jsxs)("button",{type:"button",className:"student-exam-primary-btn",onClick:()=>tn(1),children:["Start Section",(0,l.jsx)(x,{size:16,strokeWidth:2.1})]}):eQ<eA.length-1?(0,l.jsxs)("button",{type:"button",className:"student-exam-primary-btn",onClick:()=>tn(1),children:["Next",(0,l.jsx)(x,{size:16,strokeWidth:2.1})]}):(0,l.jsxs)("button",{type:"button",className:"student-exam-primary-btn",onClick:()=>{if(!e6){null==ev||ev({tone:"warning",message:"Complete every mandatory question before final submission."});return}eG(!0)},disabled:!e5,children:[(0,l.jsx)(A,{size:16,strokeWidth:2.1}),"Submit Activity"]})]})]})]}),(0,l.jsxs)("aside",{className:"student-exam-question-navigator","aria-label":"Question navigator",children:[(0,l.jsx)("div",{className:"student-exam-navigator-legend",children:[["answered","Answered"],["not-visited","Not Visited"],["not-answered","Not Answered"]].map(e=>{let[t,n]=e;return(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{className:"student-exam-status-dot is-".concat(t),"aria-hidden":"true"}),n]},t)})}),(0,l.jsx)("div",{className:"student-exam-section-tabs",role:"tablist","aria-label":"Activity sections",children:ta.map(e=>(0,l.jsx)("button",{type:"button",role:"tab","aria-selected":th===e.ke
1y,className:th===e.key?"is-active":"",onClick:()=>(e=>{let t=eA.find(t=>t.section===e);t&&tl(t,(null==e4?void 0:e4.section)!==e)})(e.key),children:"form"===e.key?"Form":"scaffolding"===e.key?"Scaffold":"Questions"},e.key))}),(0,l.jsxs)("div",{className:"student-exam-navigator-head",children:[(0,l.jsx)("span",{children:tx.label}),(0,l.jsxs)("strong",{children:[tp.length," Question",1===tp.length?"":"s"]})]}),(0,l.jsx)("div",{className:"student-exam-question-number-grid",children:tp.map((e,t)=>{let n=e1(e)?"answered":eU.has(e.id)?"not-answered":"not-visited",s=e.id===(null==e4?void 0:e4.id)&&!eZ;return(0,l.jsx)("button",{type:"button",className:"is-".concat(n," ").concat(s?"is-active":""),onClick:()=>tl(e),"aria-label":"".concat(tx.label," question ").concat(t+1,", ").concat(n.replace("-"," ")),children:t+1},e.id)})})]})]})]}):null,"submitted"===eD?(0,l.jsxs)("section",{className:"student-exam-submitted-stage",children:[(0,l.jsx)("div",{className:"student-exam-submitted-icon",children:(0,l.jsx)(f,{size:28,strokeWidth:2.1})}),(0,l.jsxs)("div",{className:"student-exam-submitted-copy",children:[(0,l.jsx)("span",{className:"student-exam-panel-kicker",children:"Submitted"}),(0,l.jsx)("h2",{children:"Activity submitted successfully"}),(0,l.jsx)("p",{children:eX?"Submission recorded on ".concat(eX,"."):"Submission recorded successfully."})]}),(0,l.jsx)("div",{className:"student-exam-badge-row",children:(0,l.jsxs)("span",{className:"student-exam-badge",children:["Completed ",e2," / ",eA.length]})}),(0,l.jsx)("button",{type:"button",className:"student-exam-secondary-btn",onClick:ex,children:"Back to My Skill Activity"})]}):null]}),eH?(0,l.jsx)("div",{className:"student-exam-confirm-backdrop",onClick:()=>eG(!1),"aria-hidden":"true",children:(0,l.jsxs)("div",{className:"student-exam-confirm-dialog",onClick:e=>e.stopPropagation(),children:[(0,l.jsx)("span",{className:"student-exam-panel-kicker",children:"Final Submission"}),(0,l.jsx)("h3",{children:"Submit this activity now?"}),(0,l.jsx)("p",{children:"You cannot edit your answers after final submission."}),(0,l.jsxs)("div",{className:"student-exam-confirm-actions",children:[(0,l.jsx)("button",{type:"button",className:"student-exam-secondary-btn",onClick:()=>eG(!1),children:"Cancel"}),(0,l.jsx)("button",{type:"button",className:"student-exam-primary-btn",onClick:()=>ts("manual"),children:"Submit Final"})]})]})}):null,eV&&!eK.current?(0,l.jsx)("div",{className:"student-exam-confirm-backdrop","aria-hidden":"true",children:(0,l.jsxs)("div",{className:"student-exam-confirm-dialog",onClick:e=>e.stopPropagation(),children:[(0,l.jsx)("span",{className:"student-exam-panel-kicker",children:"Fullscreen Required"}),(0,l.jsx)("h3",{children:"Resume fullscreen to continue"}),(0,l.jsx)("p",{children:"This activity must stay in fullscreen mode. Resume fullscreen to continue, or cancel and return to My Skill Activity."}),(0,l.jsxs)("div",{className:"student-exam-confirm-actions",children:[(0,l.jsx)("button",{type:"button",className:"student-exam-secondary-btn",onClick:te,children:"Cancel Activity"}),(0,l.jsx)("button",{type:"button",className:"student-exam-primary-btn",onClick:e8,children:"Resume Fullscreen"})]})]})}):null]})}},96566:()=>{}}]);

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.