1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunk.Ci-BjNYea6Ft.js","assets/chunk.DMiigLJ6-phQ.js"])))=>i.map(i=>d[i]); 2var ma=Object.defineProperty,fa=Object.defineProperties;var pa=Object.getOwnPropertyDescriptors;var Vt=Object.getOwnPropertySymbols;var un=Object.prototype.hasOwnProperty,dn=Object.prototype.propertyIsEnumerable;var ln=(e,t,o)=>t in e?ma(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,z=(e,t)=>{for(var o in t||(t={}))un.call(t,o)&&ln(e,o,t[o]);if(Vt)for(var o of Vt(t))dn.call(t,o)&&ln(e,o,t[o]);return e},ee=(e,t)=>fa(e,pa(t));var cn=(e,t)=>{var o={};for(var n in e)un.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&Vt)for(var n of Vt(e))t.indexOf(n)<0&&dn.call(e,n)&&(o[n]=e[n]);return o};var Q=(e,t,o)=>new Promise((n,s)=>{var i=r=>{try{c(o.next(r))}catch(p){s(p)}},d=r=>{try{c(o.throw(r))}catch(p){s(p)}},c=r=>r.done?n(r.value):Promise.resolve(r.value).then(i,d);c((o=o.apply(e,t)).next())});import{j as ha,u as lt,l as at,b as nt,B as Io,m as ut,n as _a,o as Ro,A as yt,q as pe,r as Je,F as Qe,K as ga,a as st,R as Uo,t as va,v as os,w as Xt,x as ba,y as le,I as eo,z as ns,G as We,J as io,T as _t,L as ro,M as it,N as rt,k as ss,O as as,U as Mt,_ as Qt,V as ya,W as Fe,X as ne,Y as to,Z as is,$ as Sa,a0 as Pt,a1 as mn,a2 as wa,a3 as Et,a4 as Ao,a5 as xa,a6 as ka,a7 as fn,a8 as Ca,a9 as Ea,aa as Ta,S as Ma,d as Ia,ab as Aa,g as oo,ac as $a,ad as pn,ae as Pa}from"./entry.CoPCKUW3BkOv.js";import{q as Da}from"./chunk.DMiigLJ6-phQ.js";import{P as La}from"./chunk.vKmSb7iagUEM.js";import{e as Nt,p as Fa,u as Na}from"./chunk.B4QarU3hy3ta.js";import{u as zo,_ as Oa,i as Ba,I as Vo,e as Ra}from"./chunk.DziIWGdLwMWa.js";import{w as oe,r as M,c as F,k as Y,ab as lo,V as we,s as f,z as x,x as m,a3 as Ua,v as g,C as u,y as re,B as hn,X as a,F as me,T as Pe,S as G,u as T,a1 as Wo,q as j,N as I,A as h,E as S,D as Se,i as qo,U as ce,R as za,G as rs,a4 as fe,a5 as Re,n as Va,a0 as ls,O as xt,al as Wa,a9 as qa,a8 as us,_ as ja,ae as $o,am as Ha,P as Ga,H as Za}from"./chunk.BhnF8lqErK1Y.js";import{g as Ya,B as uo,D as ds}from"./chunk.CxcVzCX0ujj8.js";import{i as cs,S as Ja,M as It,G as Wt,s as Qa,t as ms,a as Ka,d as Xa,g as ei,b as ti,c as oi,e as ni,f as si,h as ai}from"./chunk.CW6EhA_z8g3y.js";import{T as ii}from"./chunk.CzTLjHNhLNYa.js";import{d as ri,c as li}from"./chunk.DGksOcLQgZEB.js";import{L as ui}from"./chunk.BvU9CCozck2w.js";import{t as l,S as ve,P as he,T as Ot,a as W,l as He,u as dt,s as fs,_ as di,B as Bt,I as _e,f as ci,a4 as no,D as ps,az as mi,aA as fi,a3 as ho,aB as pi,aC as hi}from"./chunk.C6PXV3Pxc_ps.js";import{_ as hs}from"./chunk.BY4R_htcd2D3.js";import{B as _i,R as _s}from"./chunk.BYYn09UaC-Rz.js";import{a as gi}from"./chunk.BbsOHERBN9xX.js";import{g as vi,r as _o}from"./chunk.3iD_jAYknItT.js";import{q as bi}from"./chunk.Bfqamqz0Xj3Y.js";import{C as Kt,e as yi,H as Si}from"./chunk.De7rQLLjLy7u.js";import{N as Dt}from"./chunk.CNprI4YmNo3n.js";import{s as Ye,i as gs,a as wi,b as vs,g as xi}from"./chunk.B24uO4CbZ5Co.js";import{s as gt}from"./chunk.BDU3fSxGx4NH.js";import{s as Po}from"./chunk.Ct6L_48m9-Sj.js";import{R as ki}from"./chunk.C3tHvm3bCyBK.js";import{B as jo}from"./chunk.BxGqqr4rYvx-.js";import{F as _n}from"./chunk.BKpYHMymaIYp.js";import{D as Ci}from"./chunk.IoJiRcMSDtUd.js";import{s as Ei}from"./chunk.mFDYeA7vDQXs.js";import{N as Ti,S as Ho}from"./chunk.C0KluKnte55-.js";import{p as Mi}from"./chunk.CVJ3qk6gptU6.js";import{h as bs}from"./chunk.b6-6ZA_3MRBA.js";import{s as Ii,a as Ai,b as qt}from"./chunk.C7H1bMZZ1nyS.js";import{_ as $i}from"./chunk.DbSEshNrmVP7.js";import"./chunk.BbtcIZGqd4iu.js";import"./chunk.D7u4Z2KhBOI5.js";import"./chunk.B9ZqxUQeceBB.js";import"./chunk.CzAYEoXEVuZB.js";import"./chunk.CJxdWAVkF9BP.js";import"./chunk.BcYndHRU-QOO.js";import"./chunk.DwqTvbU1d2pe.js";import"./chunk.B3U-hymdOXX2.js";import"./chunk.C5AmUhEsgkcM.js";import"./chunk.D5aHjNbf8pAh.js";import"./chunk.DHobIHYcYShQ.js";import"./chunk.CPd1t_aXeIFX.js";import"./chunk.BcI8AjCmesA3.js";import"./chunk.Ci-BjNYea6Ft.js";import"./chunk.Bp1CXZvQiX5a.js";import"./chunk.BQ5Se8eo1dOd.js";import"./chunk.CYM7lKLEDQIc.js";import"./chunk.TDtrdbi37hy-.js";import"./chunk.De_R8el4I_uh.js";import"./chunk.BvdY-38ehWl1.js";import"./chunk.CYb5VoSWUqQa.js";import"./chunk.CBTSrM8H8osD.js";import"./chunk.CikXL8VgIIyA.js";const Pi=`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M10.984 18.0214L8.06878 8.10963C8.01294 7.91979 8.18932 7.74341 8.37916 7.79925L18.291 10.7145C18.3954 10.7452 18.4134 10.8856 18.32 10.9416L15.5767 12.5876C15.507 12.6294 15.4952 12.7256 15.5527 12.7831L18.3877 15.6181C18.4853 15.7158 18.4853 15.8741 18.3877 15.9717L16.2412 18.1181C16.1436 18.2158 15.9853 18.2158 15.8877 18.1181L13.0527 15.2831C12.9952 15.2256 12.8989 15.2375 12.8571 15.3072L11.2111 18.0505C11.1551 18.1439 11.0147 18.1259 10.984 18.0214Z" stroke="#515151" stroke-width="1.25"/><line x1="8.35185" y1="3.97269" x2="8.81298" y2="1.73416" stroke="#515151" stroke-width="1.25" stroke-linecap="round"/><line x1="5.09268" y1="4.89598" x2="3.47748" y2="3.27894" stroke="#515151" stroke-width="1.25" stroke-linecap="round"/><line x1="4.22794" y1="8.08653" x2="1.99384" y2="8.56866" stroke="#515151" stroke-width="1.25" stroke-linecap="round"/></svg> 3`;function Ve(e,t,o){o===3&&ii.set(e,t)}const ue=ha("examCreator",()=>{const e=zo(),t=lt(),o=Ya(),n=M(null),s=M(o.allowTTS),i=M(o.anonymous),d=M(o.backendSettings),c=M(o.calculator),r=M(o.formulaChosen),p=M(o.googleClassroomCourseID),_=M(o.ownFormulas),v=M(o.spellChecking),w=M(o.started),y=M(o.teacherId),C=M(o.schoolId),k=M(o.teamsClassId),E=M(o.numShared),A=M(o.isHidden),R=M(o.isHiddenFromCoordinator),B=M(o.examKey),X=M(o.discoverable),O=M(o.origin),L=M(o.customAttributeName),D=M(o.translate),N=M(!0),$=M(o.bucket),q=M(null),H=M(o.examName),xe=M(0),$e=M(null),ze=M(o.deviceSecurity),je=M(o.browserSecurityMode),ke=M(o.requiredStudentInformation),Ge=M(!1),ct=M(o.showAutomarkingOnSubmission),Xe=M(o.forPractice),mt=M(o.automaticSubmissionTimer),ft=M(!1),et=M(o.studentSelfResume),pt=M(o.studentExamNameSettings),Be=M(o.accessibilityPresets),ht=M(o.viewMode),U=M(""),b=M(!1),V=M(""),Z=M(1),P=M(null),te=M(o.content),ge=M(null),De=M(o.extraSettings),Le=M(o.resources),tt=M(o.writeArea),zt=M(!1),Js=M(!1),nn=M(!1),Qs=F(()=>{let J=H.value.slice(0,200);J||(J="Untitled Exam"),J=J.replace(/^\[DRAFT\]\s/,""),!n.value&&!nn.value&&(J=`[DRAFT] ${J}`);const ot=z({},De.value),po=z({},te.value);return po.choice!=="fillable-pdf"&&delete po.formSchema,{allowTTS:s.value,anonymous:i.value,calculator:c.value,backendSettings:d.value,formulaChosen:r.value,ownFormulas:_.value,spellChecking:v.value,translate:D.value,writeArea:te.value.choice==="builder"?!1:tt.value,showAutomarkingOnSubmission:ct.value,forPractice:Xe.value,automaticSubmissionTimer:mt.value,studentSelfResume:et.value,googleClassroomCourseID:p.value||null,browserSecurityMode:je.value,deviceSecurity:ze.value,bucket:$.value,content:po,examName:J,requiredStudentInformation:ke.value,resources:Le.value,extraSettings:ot,teacherId:y.value,started:w.value,schoolId:C.value,teamsClassId:k.value||null,numShared:E.value,isHidden:A.value,isHiddenFromCoordinator:R.value,examKey:B.value,discoverable:X.value,origin:O.value,studentExamNameSettings:pt.value,accessibilityPresets:Be.value,customAttributeName:L.value,viewMode:ht.value}}),Ks=F(()=>N.value||!t.currentTeacher?!1:y.value!==null&&Number(y.value)!==Number(t.currentTeacher.id)),Xs=F(()=>{switch(te.value.choice){case"builder":return te.value.examBuilderId>0&&Object.keys(e.questions).length>0;case"write":return te.value.text.length>0;case"pdf":case"fillable-pdf":return te.value.documentPDF.length>0;default:return!1}}),ea=F(()=>!!Le.value.geogebra),ta=F(()=>
3({noExamName:!H.value,invalidStudentInformation:!sn.value,invalidFileUploadTypes:Le.value.fileUpload&&(!Le.value.fileUploadTypes||Le.value.fileUploadTypes.length===0)||!1})),sn=F(()=>{const J=["firstName","lastName","email","studentId"];return ke.value.some(ot=>J.includes(ot))}),oa=F(()=>an.value||rn.value),na=F(()=>Number(p.value)>0),an=F(()=>Number(p.value)!==0),rn=F(()=>Number(k.value)!==0);function sa(J){De.value.prohibitedProcesses.length>0&&(Ge.value=!0),zt.value=!0,$e.value=J.id}function aa(J,ot){te.value.documentPDF=ot,te.value.documentPages=J,delete te.value.formSchema}function ia(J){te.value.documentPages=J}function ra(J){if(J){te.value.formSchema=J;return}delete te.value.formSchema}function la(J){J?(te.value.choice="fillable-pdf",zt.value||(tt.value=!1)):(te.value.choice="pdf",zt.value||(tt.value=!0))}function ua(){return Q(this,null,function*(){const J=$e.value||n.value;U.value&&J&&(yield Nt.attachToGroup(J,Number(U.value)))})}function da(){Le.value.allowResumeByName=!1,Xe.value=!1,ke.value.includes("email")||ke.value.push("email")}function ca(){var J;je.value="6",ze.value="NO_SEB",ke.value=["firstName","lastName"],cs(Be.value)&&ke.value.push("email"),((J=P.value)==null?void 0:J.requiredStudentInformation)==="nameAndEmail"&&!ke.value.includes("email")&&ke.value.push("email"),Le.value.camera=!1,Le.value.fileUpload=!1,i.value=!1,Le.value.audio=!0,et.value=!1}return oe(()=>De.value.limit,J=>{Ve("extraSettings.limit",J,Z.value)}),oe(()=>De.value.sebStartCheck,J=>{Ve("extraSettings.sebStartCheck",J,Z.value)}),oe(()=>De.value.quitPassword,J=>{Ve("extraSettings.quitPassword",J,Z.value)}),oe(()=>De.value.ignoreService,J=>{Ve("extraSettings.ignoreService",J,Z.value)}),oe(()=>De.value.allowedClientVersions,J=>{Ve("extraSettings.allowedClientVersions",J,Z.value)}),oe(()=>De.value.requireHighSecurityOn,J=>{Ve("extraSettings.requireHighSecurityOn",J,Z.value)}),oe(()=>De.value.screenMonitoring,J=>{Ve("screenMonitoring",J,Z.value)},{deep:!0}),oe(()=>je.value,J=>{Ve("browserSecurityMode",J,Z.value)}),oe(()=>ze.value,J=>{Ve("deviceSecurity",J,Z.value)}),oe(()=>ke.value,J=>{Ve("chosenInfo",J.filter(ot=>ot!=="studentId"),Z.value)}),{id:n,allowTTS:s,anonymous:i,backendSettings:d,calculator:c,formulaChosen:r,googleClassroomCourseID:p,ownFormulas:_,spellChecking:v,started:w,teacherId:y,schoolId:C,teamsClassId:k,numShared:E,isHidden:A,isHiddenFromCoordinator:R,examKey:B,discoverable:X,origin:O,customAttributeName:L,translate:D,writeArea:tt,writeAreaManuallySet:zt,isNewExam:N,bucket:$,schoolLicense:q,examName:H,studentCount:xe,autoSaveId:$e,deviceSecurity:ze,browserSecurityMode:je,requiredStudentInformation:ke,prohibitedProcessesBeta:Ge,showAutomarkingOnSubmission:ct,forPractice:Xe,automaticSubmissionTimer:mt,practiceBeta:ft,studentSelfResume:et,studentExamNameSettings:pt,accessibilityPresets:Be,viewMode:ht,group:U,demo:b,focusError:V,currentStep:Z,schoolSettings:P,content:te,analyticsExamFormat:ge,extraSettings:De,resources:Le,readonly:Js,isSavingExamExplicitly:nn,examData:Qs,isSharedExam:Ks,hasQuestions:Xs,hasGeogebra:ea,errors:ta,hasValidRequiredStudentInformation:sn,isExternalClassroomConnected:oa,isExternalClassroomCourseSelected:na,isGoogleClassroomConnected:an,isMicrosoftTeamsConnected:rn,setExamSpecialStates:sa,setContentDocumentPDF:aa,setContentDocumentPages:ia,setContentFormSchema:ra,toggleFillablePdf:la,attachExamToGroup:ua,enableStudentSelfResume:da,setExamForPractice:ca}}),Di={id:"ExamCreatorTopBar",class:"ExamCreatorTopBar ExamCreatorTopBar--rounded"},Li={class:"ExamCreatorTopBar__buttons"},Fi=Y({__name:"ExamCreatorTopBar",props:{hasError:{type:Boolean},isSavingExam:{type:Boolean},isPreparingPreview:{type:Boolean}},emits:["next","previous","save","preview"],setup(e,{emit:t}){const o=ue(),n=t,s=lo("nameInput"),i=M(!1);oe(()=>o.focusError,k=>{k==="examName"&&w()});const d={type:ve,label:l("Preview exam"),faIcon:"eye",hideLabel:!0,loading:e.isPreparingPreview,tooltip:void 0,onClick:()=>n("preview")},c=F(()=>({type:he,label:l("Save"),faIcon:"floppy-o",loading:e.isSavingExam,disabled:o.readonly,tooltip:o.readonly?l("This exam is configured as read-only and cannot be edited."):void 0,onClick:_})),r={type:he,label:l("Configure"),faIcon:"arrow-right",iconAfterLabel:!0,tooltip:void 0,onClick:()=>n("next")}
3,p={type:Ot,label:l("Edit exam content"),faIcon:"arrow-left",tooltip:void 0,onClick:()=>n("previous")};function _(){o.isSavingExamExplicitly=!0,n("save")}function v(k){i.value=k}function w(){s.value&&s.value.focusInput()}function y(){return o.currentStep===1?[]:o.currentStep===2?[d,r]:o.currentStep===3?o.content.choice==="nothing"?[d,c.value]:[p,d,c.value]:[]}function C(){window.open(l("https://support.exam.net/s/article/create-an-exam?language=en_US"),"_blank")}return(k,E)=>{const A=we("tooltip");return f(),x("div",Di,[m(_i,hn({ref_key:"nameInput",ref:s},k.$attrs,{modelValue:a(o).examName,"onUpdate:modelValue":E[0]||(E[0]=R=>a(o).examName=R),class:["ExamCreatorTopBar__input",{"ExamCreatorTopBar__input--focused":i.value,"ExamCreatorTopBar__input--error":e.hasError}],placeholder:a(l)("Enter the exam name"),onFocus:E[1]||(E[1]=R=>v(!0)),onBlur:E[2]||(E[2]=R=>v(!1))}),Ua({_:2},[i.value||e.hasError?{name:"button",fn:g(()=>[u("i",{class:re(["ExamCreatorTopBar__input__button fa fa-pencil",{"ExamCreatorTopBar__input__button--error":e.hasError}])},null,2)]),key:"0"}:void 0]),1040,["modelValue","class","placeholder"]),u("div",Li,[(f(!0),x(me,null,Pe(y(),R=>G((f(),T(Wo(R.type),hn({key:R.label},{ref_for:!0},R),null,16)),[[A,R.tooltip]])),128))]),m(hs,{class:"ExamCreatorTopBar__help-icon",onClick:C})])}}}),Ni=W(Fi,[["__scopeId","data-v-0340167e"]]),Oi="https://exam.net/cdn/images/exam-creator/",jt={builder:{name:"question type",label:"Use question types",image:"question-types-example-exam.png",articleNameSv:"provformatet-anvand-uppgiftstyper",articleNameEn:"the-exam-format-use-question-types",infoText:"If you use question types to create your exam, the student will answer each question in a structured manner. Depending on the set-up of these exams, they can be fully auto-marked or consist of a mix of manually marked questions."},pdfOrWrite:{name:"PDF/document based",label:"Upload or create a document",image:"pdf-write-example-exam.png",articleNameSv:"provformatet-ladda-upp-eller-skapa-ett-dokument",articleNameEn:"the-exam-format-upload-or-create-a-document",infoText:`If you're creating an essay exam or prefer the flexibility to include questions in a more open format, we recommend using the "Upload or create a document" option. This choice allows your students to respond in a free-text area with formatting options, making it suitable for longer written responses.`}},Bi={components:{ExamModal:at,SecondaryButton:ve},data(){return{STATIC_URL:Oi,examTypes:jt,selectedExamType:"builder",EventBus:nt}},computed:{examTypeKeys(){return Object.keys(jt)},numberOfExamTypes(){return this.examTypeKeys.length},currentIndex(){return this.examTypeKeys.findIndex(e=>e===this.selectedExamType)},articleUrl(){return He("sv")?`https://support.exam.net/s/article/${jt[this.selectedExamType].articleNameSv}?language=sv`:`https://support.exam.net/s/article/${jt[this.selectedExamType].articleNameEn}?language=en_US`}},methods:{isActive(e){return this.selectedExamType===e},resetSelection(){this.selectedExamType="builder"},showPreviousTab(){const e=this.currentIndex===0?this.numberOfExamTypes-1:this.currentIndex-1;this.selectedExamType=this.examTypeKeys[e]},showNextTab(){const e=(this.currentIndex+1)%this.numberOfExamTypes;this.selectedExamType=this.examTypeKeys[e]}}},Ri={class:"ModalExample__body"},Ui={class:"ModalExample__tabs"},zi=["onClick"],Vi={key:0,class:"ModalExample__tabs__tab--separator"},Wi={class:"ModalExample__carousel"},qi=["src"],ji={class:"ModalExample__info"},Hi=["href"];function Gi(e,t,o,n,s,i){const d=j("SecondaryButton"),c=j("ExamModal");return f(),T(c,{ref:"modal",size:"xl",class:"ModalExample"},{body:g(()=>[u("span",{"data-dismiss":"modal",class:"ModalExample__close-icon",onClick:t[0]||(t[0]=(...r)=>i.resetSelection&&i.resetSelection(...r))},[...t[3]||(t[3]=[u("i",{class:"fa fa-times"},null,-1)])]),u("div",Ri,[u("div",Ui,[(f(!0),x(me,null,Pe(s.examTypes,(r,p,_)=>(f(),x("div",{key:p,class:re(["ModalExample__tabs__tab",{"ModalExample__tabs__tab--active":i.isActive(p)}]),onClick:v=>s.selectedExamType=p},[I(h(e.__(r.label))+" ",1),_<i.numberOfExamTypes-1?(f(),x("span",Vi," / ")):S("",!0)],10,zi))),128))]),u("div",Wi,[u("span",{class:"ModalExample__carousel__button",onClick:t[1]||(t[1]=(...r)=>i.showPreviousTab&&i.showPreviousTab(...r))},[...t[4]||(t[4]=[u("i",{class:"fa fa-chevron-left"},null,-1)])]),u("img",{src:`${s.STATIC_URL}${s.examTypes[s.selectedExamType].image}`},null,8,qi),u("span",{class:"ModalExample__carousel__button",onClick:t[2]||(t[2]=(...r)=>i.showNextTab&&i.showNextTab(...r))},[...t[5]||(t[5]=[u("i",{class:"fa fa-chevron-right"},null,-1)])])]),u("div",ji,[u("p",null,h(e.__(s.examTypes[s.selectedExamType].infoText)),1
3),u("a",{class:"ModalExample__info__support-link",href:i.articleUrl,target:"_blank",rel:"noopener"},[I(h(e.__("Read more about"))+" "+h(e.__(s.examTypes[s.selectedExamType].name))+" "+h(e.__("exams in our support pages"))+" ",1),t[6]||(t[6]=u("i",{class:"fa fa-external-link"},null,-1))],8,Hi)]),m(d,{label:e.__("Close"),"data-dismiss":"modal",class:"ModalExample__close-button",onClick:i.resetSelection},null,8,["label","onClick"])])]),_:1},512)}const Zi=W(Bi,[["render",Gi],["__scopeId","data-v-8977a27e"]]),Yi=["src","alt"],Ji="https://exam.net/cdn/images/exam-creator/",Qi=Y({__name:"ExamTypeImage",props:{altText:{},imageName:{}},setup(e){return(t,o)=>(f(),x("img",{src:`${Ji}${e.imageName}`,alt:e.altText},null,8,Yi))}}),Ki=W(Qi,[["__scopeId","data-v-509c2c1f"]]),Xi={class:"ExamTypeItem__title"},er={key:0},tr={class:"ExamTypeItem__label"},or=Y({__name:"ExamTypeItem",props:{title:{},subtitle:{},examType:{},disabled:{type:Boolean}},emits:["click"],setup(e){const t=e,o=F(()=>t.examType==="builder"?"use-question-types.png":"upload-or-create-doc.png");return(n,s)=>(f(),T(Io,{class:re(["ExamTypeItem",{"ExamTypeItem--disabled":e.disabled}]),disabled:e.disabled,onClick:s[0]||(s[0]=i=>n.$emit("click"))},{default:g(()=>[m(Ki,{altText:e.title,imageName:o.value}
3,null,8,["altText","imageName"]),u("div",Xi,[u("h3",null,h(e.title),1),e.subtitle?(f(),x("p",er,h(e.subtitle),1)):S("",!0)]),u("div",tr,[Se(n.$slots,"default",{},void 0,!0)])]),_:3},8,["class","disabled"]))}}),gn=W(or,[["__scopeId","data-v-8f152f76"]]),nr={class:"PDFtoAutoMarkedSelector"},sr={class:"PDFtoAutoMarkedSelector__info"},ar=Y({__name:"PDFtoAutoMarkedSelector",emits:["pdfToAutoMarked"],setup(e,{emit:t}){const o=t,n=lt(),s=F(()=>n.customizations.areAIFeaturesDisabled),{showDialog:i,bookingUrl:d,requiresLicenseUpgrade:c,isRestricted:r}=ut();function p(){c("pdfToAutomarked")||(yt.capture("exam_format_selected",{format:"pdf-convert"}),o("pdfToAutoMarked"))}return(_,v)=>{const w=we("tooltip");return f(),x(me,null,[u("div",nr,[u("p",sr,[I(h(a(l)("Convert a PDF exam to auto-marked questions"))+" ",1),m(uo)]),G(m(ve,{svgIcon:a(_a),label:a(l)("Convert PDF"),showBasicLicenseLock:a(r)("pdfToAutomarked"),disabled:s.value,onClick:p},null,8,["svgIcon","label","showBasicLicenseLock","disabled"]),[[w,s.value?a(l)("Features using AI are disabled for your school. Contact your administrator for information."):null]])]),m(Ro,{visible:a(i),"onUpdate:visible":v[0]||(v[0]=y=>qo(i)?i.value=y:null),url:a(d)},null,8,["visible","url"])],64)}}}),ir=W(ar,[["__scopeId","data-v-55701446"]]),rr={class:"ExamTypeSelector"},lr={class:"ExamTypeSelector__title text-style"},ur={class:"ExamTypeSelector__examTypes"},dr={class:"ExamTypeSelector__examTypes__item-label"},cr=["alt"],mr=["alt"],fr={class:"ExamTypeSelector__no-digital-exam"},pr=Y({__name:"ExamTypeSelector",emits:["showPDFToAutoMarked"],setup(e,{emit:t}){const o=ue(),n=lo("modalExample"),s=t;function i(){d("builder"),o.analyticsExamFormat="pdf-convert",s("showPDFToAutoMarked")}function d(v){o.content.choice=v,o.analyticsExamFormat=null,p()}const c={builder:"question-types",nothing:"no-digital-questions"};function r(v){const w=c[v];w&&yt.capture("exam_format_selected",{format:w}),d(v)}function p(){o.content.choice==="nothing"?o.currentStep=3:o.currentStep=2}function _(){pe.show(n.value)}return(v,w)=>(f(),x("div",rr,[u("h2",lr,h(a(l)("Choose exam format")),1),m(Ot,{class:"ExamTypeSelector__examples-link text-style",label:a(l)("How will this look for the students?"),onClick:_},null,8,["label"]),u("div",ur,[m(gn,{examType:"builder",disabled:!a(o).isNewExam,title:a(l)("Use question types"),subtitle:a(l)("With corresponding answer areas"),onClick:w[0]||(w[0]=y=>r("builder"))},{default:g(()=>[u("div",dr,h(a(l)("Auto-marking available")),1)]),_:1},8,["disabled","title","subtitle"]),m(gn,{examType:"toBeDetermined",disabled:!a(o).isNewExam,title:a(l)("Upload or create a document"),subtitle:a(l)("With one large answer area"),onClick:w[1]||(w[1]=y=>r("toBeDetermined"))},{default:g(()=>[u("img",{src:"https://exam.net/cdn/icons/16/solid/pdf-red.svg",alt:a(l)("PDF")},null,8,cr),u("img",{src:"https://exam.net/cdn/icons/16/solid/text-document-blue.svg",alt:a(l)("Documents")},null,8,mr)]),_:1},8,["disabled","title","subtitle"])]),u("div",fr,[m(Ot,{disabled:!a(o).isNewExam,label:a(l)("Neither, skip digital questions"),onClick:w[2]||(w[2]=y=>r("nothing"))},null,8,["disabled","label"]),w[3]||(w[3]=u("i",{class:"fa fa-angle-double-right"},null,-1))]),m(ir,{onPdfToAutoMarked:i}),m(Zi,{ref_key:"modalExample",ref:n},null,512)]))}}),hr=W(pr,[["__scopeId","data-v-5508dcae"]]),_r={class:"PDFWriteSelector"},gr={class:"PDFWriteSelector__selector"},vr={class:"PDFWriteSelector__selector__title text-style"},br={class:"PDFWriteSelector__selector__buttons"},yr=["alt"],Sr={class:"PDFWriteSelector__button__title text-style"},wr=["alt"],xr={class:"PDFWriteSelector__button__title text-style"},kr=Y({__name:"PDFWriteSelector",setup(e){const t=ue(),o=n=>{yt.capture("exam_format_selected",{format:n}),t.content.choice=n};return(n,s)=>(f(),x("div",_r,[u("div",gr,[u("h2",vr,h(a(l)("Select how to add content")),1),u("div",br,[m(Io,{class:"PDFWriteSelector__button",onClick:s[0]||(s[0]=i=>o("pdf"))},{default:g(()=>[u("img",{src:"https://exam.net/cdn/icons/16/solid/pdf-red.svg",alt:a(l)("PDF")},null,8,yr),u("div",Sr,h(a(l)("Upload exam questions as PDF")),1)]),_:1}
3),m(Io,{class:"PDFWriteSelector__button",onClick:s[1]||(s[1]=i=>o("write"))},{default:g(()=>[u("img",{src:"https://exam.net/cdn/icons/16/solid/text-document-blue.svg",alt:a(l)("Documents")},null,8,wr),u("div",xr,h(a(l)("Write or paste in exam questions")),1)]),_:1})])])]))}}),Cr=W(kr,[["__scopeId","data-v-368187fc"]]),Er={},Tr={class:"AutoMarkedMenu"},Mr={class:"AutoMarkedMenu__container"},Ir={class:"AutoMarkedMenu__buttons"};function Ar(e,t){return f(),x("div",Tr,[u("div",Mr,[u("div",Ir,[Se(e.$slots,"default",{},void 0,!0)])])])}const $r=W(Er,[["render",Ar],["__scopeId","data-v-d63f77a9"]]),Pr={name:"AutoMarkedEditor",components:{AutoMarkedMenu:$r,ExamBuilder:Oa,InformationAlert:Je},emits:["contentUpdated"],setup(){const e=ue(),t=dt();return{examCreatorStore:e,toast:t}},data(){return{interactionMode:this.examCreatorStore.isSharedExam||this.examCreatorStore.readonly?"preview":"edit"}},computed:{hasLimitedEditing(){return this.examCreatorStore.studentCount>0},isReadOnly(){return this.examCreatorStore.isSharedExam||this.examCreatorStore.readonly||this.isPreviewMode},isEditMode(){return this.interactionMode==="edit"},isPreviewMode(){return this.interactionMode==="preview"},infoText(){const e=this.__("You can duplicate the exam from the exam list to create one that you can edit.");return this.examCreatorStore.readonly?`${this.__("This exam is configured as read-only and cannot be edited.")} ${e}`:this.examCreatorStore.isSharedExam?`${this.__("You can't edit a colleague's exam.")} ${e}`:`${this.__("This exam has been conducted. You can therefore only edit existing questions.")} ${e} ${this.__("Changes to the exam settings are not reflected for students that are currently taking the exam.")}`}},created(){Ba.init((o,n)=>Q(this,[o,n],function*(e,{questionId:t}){if(!Vo.valid(e)){this.toast.add({severity:"error",summary:this.__("Only image files can be added")});return}const s=yield Qe.builderUpload(t,e);return console.info(`Image uploaded: ${s} for question ${t}`),s}))},methods:{showExamList(){window.location.href="/admin/exams"},updateExamBuilderContent(){this.$emit("contentUpdated",!0)}}},Dr={class:"AutoMarkedEditor"},Lr=["aria-pressed","aria-label"],Fr=["alt"],Nr={class:"sr-only"},Or=["aria-pressed","aria-label"],Br=["alt"],Rr={class:"sr-only"},Ur={class:"AutoMarkedEditor__wrapper"},zr={key:0,class:"AutoMarkedEditor__info"};function Vr(e,t,o,n,s,i){const d=j("AutoMarkedMenu"),c=j("InformationAlert"),r=j("ExamBuilder"),p=we("tooltip");return f(),x("div",Dr,[m(d,{class:"AutoMarkedEditor__AutoMarkedMenu"},{default:g(()=>[G((f(),x("button",{class:re(["AutoMarkedEditor__AutoMarkedMenu__tab",{"AutoMarkedEditor__AutoMarkedMenu__tab--active":i.isEditMode}]),type:"button","aria-pressed":i.isEditMode,"aria-label":e.__("Edit exam"),onClick:t[0]||(t[0]=_=>s.interactionMode="edit")},[u("img",{src:"https://exam.net/cdn/icons/64/edit-mode.svg",alt:e.__("Edit logo")},null,8,Fr),u("span",Nr,h(e.__("Edit exam")),1)],10,Lr)),[[ce,!n.examCreatorStore.isSharedExam&&!n.examCreatorStore.readonly],[p,e.__("Edit")]]),G((f(),x("button",{class:re(["AutoMarkedEditor__AutoMarkedMenu__tab",{"AutoMarkedEditor__AutoMarkedMenu__tab--active":i.isPreviewMode}]),type:"button","aria-pressed":i.isPreviewMode,"aria-label":e.__("Preview marking"),onClick:t[1]||(t[1]=_=>s.interactionMode="preview")},[u("img",{src:"https://exam.net/cdn/icons/64/preview-mode.svg",alt:e.__("Preview logo")},null,8,Br),u("span",Rr,h(e.__("Preview marking")),1)],10,Or)),[[p,e.__("Preview marking")]])]),_:1}),u("div",Ur,[i.hasLimitedEditing||n.examCreatorStore.isSharedExam||n.examCreatorStore.readonly?(f(),x("div",zr,[m(c,{mode:"primary",text:i.infoText,secondaryActionText:e.__("Exam list"),onSecondaryAction:i.showExamList},null,8,["text","secondaryActionText","onSecondaryAction"])])):S("",!0),m(r,{modelValue:n.examCreatorStore.content.examBuilderId,"onUpdate:modelValue":t[2]||(t[2]=_=>n.examCreatorStore.content.examBuilderId=_),class:"AutoMarkedEditor__exam-builder",limitedEditing:i.hasLimitedEditing,isReadonly:i.isReadOnly,froalaConfig:{config:{iconsTemplate:"font_awesome"}},onUpdate:i.updateExamBuilderContent},null,8,["modelValue","limitedEditing","isReadonly","onUpdate"])])])}const Wr=W(Pr,[["render",Vr],["__scopeId","data-v-46eb0d12"]]),ys={run(e){const t=`froala-placeholder-fix-${e.replace(".","")}`;let o;if(document.getElementById(t))o=document.getElementById(t);else{const s=document.querySelector(e);s&&new ResizeObserver(n).observe(s),o=document.createElement("style"),o.id=t,document.getElementsByTagName("head")[0].appendChild(o)}n();function n(){o.innerHTML=`${e} .fr-placeholder { display: none !important; }`,setTimeout(()=>{var d,c;const s=(d=document.querySelector(`${e} .fr-wrapper.show-placeholder`))==null?void 0:d.clientWidth,i=(c=document.querySelector(`${e} .fr-element.fr-view`))==null?void 0:c.clientWidth;if(s&&i){const r=(s-i)/2;o&&(o.innerHTML=`${e} .fr-placeholder { margin-left: ${r}px !important; }`)}},20)}}},qr={name:"DeleteWarningModal",components:{PrimaryButton:he,TertiaryButton:Ot},emits:["delete"]},jr={class:"DeleteWarningModal__body"},Hr={class:"DeleteWarningModal__body__title"},Gr={class:"DeleteWarningModal__body__info"},Zr={class:"DeleteWarningModal__body__actions"};function Yr(e,t,o,n,s,i){const d=j("TertiaryButton"),c=j("PrimaryButton"),r=j("ExamModal");return f(),T(r,{size:"md",class:"DeleteWarningModal"},{body:g(()=>[t[1]||(t[1]=u("span",{"data-dismiss":"modal",class:"DeleteWarningModal__close-icon"},[u("i",{class:"fa fa-times"})],-1)),u("div",jr,[u("p",Hr,h(e.__("Are you sure you want to delete the sheet?")),1),u("p",Gr,h(e.__("Note that the content you have written will be permanently removed, and cannot be recovered.")),1),u("div",Zr,[m(d,{"data-dismiss":"modal",label:e.__("Cancel")},null,8,["label"]),m(c,{"data-dismiss":"modal",label:e.__("Delete"),severity:"danger",onClick:t[0]||(t[0]=p=>e.$emit("delete"))},null,8,["label"])])])]),_:1})}const Jr=W(qr,[["render",Yr],["__scopeId","data-v-67184b9e"]]),Qr=Y({__name:"PDFWriteMenu",props:{showPrintButton:{type:Boolean},showDeleteButton:{type:Boolean}},emits:["printSheet","deleteSheet"],setup(e){const t=M(0),o=M(null);return za(()=>
3{if(!o.value){t.value=0;return}const n=o.value.getBoundingClientRect();t.value=n.top}),(n,s)=>(f(),x("div",{ref_key:"wrapper",ref:o,class:"PDFWriteMenu"},[u("div",{class:"PDFWriteMenu__buttons",style:rs({top:t.value+"px"})},[e.showPrintButton?(f(),x("button",{key:0,class:"PDFWriteMenu__button",onClick:s[0]||(s[0]=i=>n.$emit("printSheet"))},[s[2]||(s[2]=u("i",{class:"fa fa-print"},null,-1)),u("p",null,h(a(l)("Print sheet")),1)])):S("",!0),e.showDeleteButton?(f(),x("button",{key:1,class:"PDFWriteMenu__button",onClick:s[1]||(s[1]=i=>n.$emit("deleteSheet"))},[s[3]||(s[3]=u("i",{class:"fa fa-trash"},null,-1)),u("p",null,h(a(l)("Delete sheet")),1)])):S("",!0)],4)],512))}}),Kr=W(Qr,[["__scopeId","data-v-77a440f6"]]),Xr={name:"WriteEditor",components:{DeleteWarningModal:Jr,PDFWriteMenu:Kr},emits:["contentUpdated"],setup(){const e=ue(),t=dt();return{examCreatorStore:e,toast:t}},data(){return{contentText:fs(this.examCreatorStore.content.text),shouldShowPDFWriteMenu:!0}},mounted(){this.renderKatex(),ys.run(".WriteEditor")},methods:{handleShowingEquationEditor(e){e?this.shouldShowPDFWriteMenu=!1:setTimeout(()=>{this.shouldShowPDFWriteMenu=!0},300)},handleDeleteSheet(){this.examCreatorStore.hasQuestions?pe.show(this.$refs.deleteWarningModal):this.deleteDoc()},saveExamDraft(){this.examCreatorStore.content.text!==this.contentText&&(this.examCreatorStore.content.text=this.contentText,this.$emit("contentUpdated"))},imageUploader(e){return Q(this,null,function*(){if(!Vo.valid(e)){this.toast.add({severity:"error",summary:this.__("Only image files can be added")});return}try{return yield Qe.uploadCached(this.examCreatorStore.bucket,e)}catch(t){}})},renderKatex(){this.examCreatorStore.hasQuestions&&ga.render()},printDoc(){this.$refs.froalaEditor.editor.print.run()},deleteDoc(){this.examCreatorStore.content.text="",this.$emit("contentUpdated"),this.examCreatorStore.content.choice="toBeDetermined",window.scrollTo(0,0)}}},el={class:"WriteEditor"},tl={class:"WriteEditor__container"};function ol(e,t,o,n,s,i){const d=j("FroalaEditor"),c=j("PDFWriteMenu"),r=j("DeleteWarningModal");return f(),x("div",el,[u("div",tl,[m(d,{ref:"froalaEditor",modelValue:s.contentText,"onUpdate:modelValue":t[0]||(t[0]=p=>s.contentText=p),placeholderText:e.__("Write the exam questions here ..."),iconsTemplate:"font_awesome",pasteProtection:!1,math:"",katex:"",safariKatexBugFix:"",reRenderEqOnNoChangeUpdate:"",table:"",print:"",hidePrintButton:"",color:"",image:"",indent:!1,"font-size":"","font-family":"",lineHeight:"",heightMin:"500px",heightMax:"100%",skeuomorphism:"",wordCount:!1,focus:"",zIndex:2,maximize:!1,onImageUploader:i.imageUploader,onBlur:i.saveExamDraft,onShowingEquationEditor:i.handleShowingEquationEditor},null,8,["modelValue","placeholderText","onImageUploader","onBlur","onShowingEquationEditor"]),s.shouldShowPDFWriteMenu?(f(),T(c,{key:0,class:"WriteEditor__PDFWriteMenu",showPrintButton:"",showDeleteButton:n.examCreatorStore.isNewExam,onPrintSheet:i.printDoc,onDeleteSheet:i.handleDeleteSheet},null,8,["showDeleteButton","onPrintSheet","onDeleteSheet"])):S("",!0)]),m(r,{ref:"deleteWarningModal",onDelete:i.deleteDoc},null,8,["onDelete"])])}const nl=W(Xr,[["render",ol],["__scopeId","data-v-aee1827a"]]);function sl(e){return Q(this,null,function*(){const t=[];try{const{PDFBool:o,PDFButton:n,PDFCheckBox:s,PDFDict:i,PDFDocument:d,PDFName:c,PDFRadioGroup:r,PDFSignature:p}=yield di(()=>Q(null,null,function*(){const{PDFBool:A,PDFButton:R,PDFCheckBox:B,PDFDict:X,PDFDocument:O,PDFName:L,PDFRadioGroup:D,PDFSignature:N}=yield import("./chunk.Ci-BjNYea6Ft.js").then($=>$.k);return{PDFBool:A,PDFButton:R,PDFCheckBox:B,PDFDict:X,PDFDocument:O,PDFName:L,PDFRadioGroup:D,PDFSignature:N}}),__vite__mapDeps([0,1])),_=yield d.load(e),v=_.context.lookup(_.catalog.get(c.of("AcroForm")));if(!(v instanceof i))return e;const w=v.lookup(c.of("NeedAppearances"));if(!(w instanceof o&&w.asBoolean()))return e;const C=_.getForm(),k=C.getDefaultFont();let E=0;return C.getFields().forEach(A=>{if(A instanceof n||A instanceof p)return;const R=new Map([A.acroField.dict,...A.acroField.getWidgets().map(B=>B.dict)].map(B=>[B,B.get(c.of("DA"))]));try{if(A instanceof s&&(A.isChecked()?A.check():A.uncheck()),A instanceof r){const B=A.getSelected();B?A.select(B):A.clear()}A.defaultUpdateAppearances(k),E++}catch(B){t.push(`${A.getName()}: ${B instanceof Error?B.message:String(B)}`)}finally{R.forEach((B,X)=>{B?X.set(c.of("DA"),B):X.delete(c.of("DA"))})}}),t.length&&console.error(`Could not redraw every stale PDF field appearance: ${t.join("; ")}`),E?(t.length||v.delete(c.of("NeedAppearances")),yield _.save({updateFieldAppearances:!1})):e}catch(o){return console.error("Could not redraw the stale field a
3ppearances in this PDF",o),e}})}const Ss={cacheControl:"public, max-age=31536000"};function vn(e,t,o){const n=Uo.randomString(30);return va(t,{drawFormFields:o}).then(s=>Promise.all(s.map((i,d)=>Qe.upload(e,`${n}/${d}.png`,i,Ss))))}const Do={upload({bucket:e,file:t,sizeLimitMB:o=50}){return o&&t.size>o*1024*1024?Promise.reject(new Error("File size too large.")):new Promise((n,s)=>{const i=new FileReader;i.onload=function(){const d=new Uint8Array(this.result),c=Uo.randomString(30);sl(d).then(r=>{const p=r===d?t:new Blob([r],{type:"application/pdf"});return Qe.upload(e,`${c}/original.pdf`,p,Ss).then(_=>vn(e,r,!0).then(v=>n({urls:v,documentPDF:_})))}).catch(s)},i.readAsArrayBuffer(t)})},uploadPageImages(n){return Q(this,arguments,function*({bucket:e,documentPDF:t,drawFormFields:o}){const s=yield st.get(t,{responseType:"arraybuffer"});return vn(e,new Uint8Array(s.data),o)})}},al=1;function il(e){return e.subtype==="Widget"&&!!e.fieldName&&!e.hidden}function rl(e){switch(e.fieldType){case"Tx":return"text";case"Ch":return e.combo?"dropdown":"listbox";case"Btn":return e.pushButton?"pushButton":e.radioButton?"radio":e.checkBox?"checkbox":"unknown";case"Sig":return"signature";default:return"unknown"}}function ll(e){return e!=="pushButton"&&e!=="signature"&&e!=="unknown"}function ul(e,t,o,n){const s=ee(z({id:e.fieldName,name:e.fieldName,readOnly:!!e.readOnly,required:!!e.required},e.alternativeText?{label:e.alternativeText}:{}),{page:o,order:n});return t==="text"?ee(z({},s),{kind:t,multiline:!!e.multiLine}):t==="listbox"?ee(z({},s),{kind:t,multiSelect:!!e.multiSelect}):ee(z({},s),{kind:t})}function dl(e){return Q(this,null,function*(){if(!e||typeof e!="string")return{schema:null,unfillable:[]};const t=yield vi({url:e,verbosity:0,isEvalSupported:!1}).promise;try{const o=[],n=[],s=new Set;for(let i=1;i<=t.numPages;i++){const d=yield t.getPage(i);let c=[];try{c=yield d.getAnnotations()}catch(r){throw new Error(`Fillable PDF: could not read the annotations on page ${i}`,{cause:r})}for(const r of c){if(!il(r)||s.has(r.fieldName))continue;s.add(r.fieldName);const p=rl(r),_=Array.isArray(r.rect)?r.rect:[];if(ll(p)){o.push(ul(r,p,i,o.length)),r.readOnly&&n.push({name:r.fieldName,page:i,reason:"readOnly",rect:_});continue}p==="unknown"&&console.warn(`[PDFForms] Unhandled field type: fieldType="${r.fieldType}"`,r),n.push({name:r.fieldName,page:i,reason:p,rect:_})}}return{schema:{version:al,fields:o},unfillable:n}}finally{yield t.destroy()}})}const cl={class:"DocumentEditorLayout"},ml={class:"DocumentEditorLayout__content"},fl=Y({__name:"DocumentEditorLayout",setup(e){const t=lo("sidebar"),{top:o}=ri(t);return(n,s)=>(f(),x("div",cl,[u("section",ml,[Se(n.$slots,"default",{},void 0,!0)]),u("aside",{ref_key:"sidebar",ref:t,class:"DocumentEditorLayout__sidebar",style:rs({top:a(o)+"px"})},[Se(n.$slots,"sidebar",{},void 0,!0)],4)]))}}),pl=W(fl,[["__scopeId","data-v-3b2c7425"]]),hl={class:"DocumentEditorMenuItem"},_l={class:"DocumentEditorMenuItem__label"},gl=Y({__name:"DocumentEditorMenuItem",props:{label:{default:""}},setup(e){return(t,o)=>(f(),x("div",hl,[u("div",_l,[Se(t.$slots,"label",{},()=>[I(h(e.label),1)],!0)]),Se(t.$slots,"default",{label:e.label},void 0,!0)]))}}),go=W(gl,[["__scopeId","data-v-40084595"]]),Ne={NO_FILE_SELECTED:"NO_FILE_SELECTED",WRONG_FILE_TYPE:"WRONG_FILE_TYPE",FILE_TOO_LARGE:"FILE_TOO_LARGE",PASSWORD:"PASSWORD",PAGE_RENDER:"PAGE_RENDER",UNKNOWN:"UNKNOWN"},vl={[Ne.NO_FILE_SELECTED]:{title:l("No file selected"),info:l("You must select a file to continue.")},[Ne.WRONG_FILE_TYPE]:{title:l("Wrong file format"),info:l("You can only add pdf files")},[Ne.FILE_TOO_LARGE]:{title:l("The file is too large"),info:l("The file you have uploaded is too large.")},[Ne.PASSWORD]:{title:l("Password protected file"),info:l("The file you have chosen is password protected. You need to remove the password protection before you can upload the file.")},[Ne.PAGE_RENDER]:{title:l("The PDF could not be prepared"),info:l("We could not prepare the pages of this PDF. Nothing has been changed. Please try again.")},[Ne.UNKNOWN]:{title:l("Unknown error"),info:l("An unknown error has occurred")},"":{title:l("Unknown error"),info:l("An unknown error has occurred")}},bl={name:"PDFErrorModal",components:{PrimaryButton:he},props:{currentError:{type:String,default:""}}
3,emits:["hidden"],setup(){return{ERRORS:Ne,ERROR_MESSAGE:vl}}},yl={class:"text-center"};function Sl(e,t,o,n,s,i){const d=j("PrimaryButton"),c=j("ExamModal");return f(),T(c,{size:"sm",onHidden:t[0]||(t[0]=r=>e.$emit("hidden"))},{title:g(()=>[u("h3",null,h(n.ERROR_MESSAGE[o.currentError].title),1)]),body:g(()=>[u("div",yl,[u("p",null,h(n.ERROR_MESSAGE[o.currentError].info),1)])]),footer:g(()=>[u("div",null,[m(d,{label:"Ok","data-dismiss":"modal"})])]),_:1})}const wl=W(bl,[["render",Sl]]),xl={class:"UnfillableFieldList"},kl=["aria-expanded"],Cl={class:"UnfillableFieldList__heading"},El={class:"UnfillableFieldList__count"},Tl={key:0,class:"UnfillableFieldList__list"},Ml=["title","onClick","onMouseenter","onFocus"],Il={class:"UnfillableFieldList__name"},Al={class:"UnfillableFieldList__meta"},$l=Y({__name:"UnfillableFieldList",props:Re({fields:{},selectedFieldName:{default:""}},{expanded:{type:Boolean,default:!1},expandedModifiers:{},hoveredFieldName:{default:""},hoveredFieldNameModifiers:{}}),emits:Re(["show"],["update:expanded","update:hoveredFieldName"]),setup(e){const t=fe(e,"expanded"),o=fe(e,"hoveredFieldName");function n(s){return s==="signature"?l("Signature"):s==="pushButton"?l("Button"):s==="readOnly"?l("Read-only"):l("Unknown field type")}return(s,i)=>(f(),x("div",xl,[u("button",{type:"button",class:"UnfillableFieldList__summary","aria-expanded":t.value,onClick:i[0]||(i[0]=d=>t.value=!t.value)},[m(os,{isExpanded:t.value},null,8,["isExpanded"]),u("span",Cl,h(a(l)("Unfillable fields")),1),u("span",El,h(e.fields.length),1)],8,kl),t.value?(f(),x("ul",Tl,[(f(!0),x(me,null,Pe(e.fields,d=>(f(),x("li",{key:d.name},[u("button",{type:"button",class:re(["UnfillableFieldList__row",{"UnfillableFieldList__row--hovered":d.name===o.value,"UnfillableFieldList__row--selected":d.name===e.selectedFieldName}]),title:d.name,onClick:c=>s.$emit("show",d),onMouseenter:c=>o.value=d.name,onMouseleave:i[1]||(i[1]=c=>o.value=""),onFocus:c=>o.value=d.name,onBlur:i[2]||(i[2]=c=>o.value="")},[u("span",Il,h(d.name),1),u("span",Al,h(n(d.reason))+" · "+h(a(l)("page :page",{page:String(d.page)})),1)],42,Ml)]))),128))])):S("",!0)]))}}),Pl=W($l,[["__scopeId","data-v-79298544"]]),Dl={class:"PDFEditor"},Ll={class:"PDFEditor__upload-pdf_wrapper"},Fl={class:"PDFEditor__upload-pdf"},Nl={class:"PDFEditor__upload-pdf__title text-style"},Ol={class:"PDFEditor__upload-pdf__info text-style"},Bl={class:"PDFEditor__preview-wrapper"},Rl={key:1,class:"PDFEditor__rendering"},bn=1e3*1e3*50,Ul=.8,zl={__name:"PDFEditor",emits:["contentUpdated"],setup(e,{emit:t}){const o=l("Print sheet"),n=l("Delete sheet"),s=t,i=ue(),{isRestricted:d}=ut(),c=M(null),r=M(!1),p=M(!1),_=M(""),v=M(null),w=M([]),y=M(""),C=M(!1),k=M(!1),E=M(""),A=M(null),R=M(""),B=M(""),X=M(!1),O=F(()=>i.hasQuestions&&!r.value),L=F(()=>O.value&&!i.studentCount),D=F(()=>[...w.value].sort((b,V)=>b.page-V.page)),N=F(()=>!!v.value||!!i.content.formSchema||i.content.choice==="fillable-pdf"),$=F(()=>O.value&&!i.studentCount&&!i.isSharedExam&&!i.readonly),q=F(()=>!i.hasQuestions&&!r.value),H=F(()=>!N.value||d("fillablePDFs")||p.value),xe=F({get:()=>i.content.choice==="fillable-pdf"&&!d("fillablePDFs"),set:b=>{b&&d("fillablePDFs")||ze(b)}});function $e(b,V){i.toggleFillablePdf(b),i.setContentFormSchema(V)}function ze(b){return Q(this,null,function*(){var De,Le;const{documentPDF:V,choice:Z,formSchema:P}=i.content,te=()=>$e(Z==="fillable-pdf",P!=null?P:null);$e(b,(Le=(De=b?v.value:null)!=null?De:P)!=null?Le:null);let ge=null;try{ge=yield ke(b,V)}catch(tt){console.error("Failed to render the PDF page images",tt),je(V,b)||(_o(tt,{stage:"pageRender",isFillable:b,examId:i.id,teacherId:i.teacherId,schoolId:i.schoolId}),te(),s("contentUpdated",!1,{silent:!0}),Be(Ne.PAGE_RENDER));return}je(V,b)||(ge&&i.setContentDocumentPages(ge),s("contentUpdated"))})}function je(b,V){const{content:Z}=i;return Z.documentPDF!==b||Z.choice!==(V?"fillable-pdf":"pdf")}function ke(b,V){return Q(this,null,function*(){if(!V)return null;p.value=!0;try{return yield Do.uploadPageImages({bucket:i.bucket,documentPDF:V,drawFormFields:!b})}finally{p.value=!1}})}const Ge=F(()=>L.value&&w.value.length>0&&(xe.value||!N.value));oe(xe,b=>X.value=b,{immediate:!0});const ct=F(()=>Ge.value&&X.value?D.value.map(b=>ee(z({},b),{severity:"warning"})):[]);function Xe(b){var V;B.value=b.name,(V=A.value)==null||V.scrollToPage(b.page,b.name)}const mt=F(()=>N.value?d("fillablePDFs")?l("Upgrade your license to use fillable PDFs"):"":k.value?"":C.value?l("This PDF could not be checked for fillable fields. Upload it again to try once more."):w.value.length?l("None of the fields in this PDF can be filled
3in by students"):l("No fillable fields were detected in this PDF"));oe([()=>i.content.documentPDF,L],([b])=>{et(b)},{immediate:!0});function ft(){i.content.documentPDF&&window.open(i.content.documentPDF)}function et(b){return Q(this,null,function*(){const V=typeof b=="string"?b:"";if(y.value=V,!V||!L.value){V===E.value&&!r.value&&(E.value=""),v.value=null,w.value=[],C.value=!1,k.value=!1;return}k.value=!0;try{const{schema:Z,unfillable:P}=yield dl(V);if(y.value!==V)return;v.value=Z!=null&&Z.fields.some(te=>!te.readOnly)?Z:null,w.value=P,C.value=!1,k.value=!1,E.value===V&&(yt.capture("fillable_pdf_compatibility_checked",{outcome:"success",unsupported_field_count:P.length,unsupported_field_types:[...new Set(P.map(te=>te.reason))]}),E.value="")}catch(Z){if(y.value!==V)return;console.error("Failed to detect fillable PDF fields",Z),_o(Z,{stage:"detection",examId:i.id,teacherId:i.teacherId,schoolId:i.schoolId}),v.value=null,w.value=[],C.value=!0,k.value=!1,E.value===V&&(yt.capture("fillable_pdf_compatibility_checked",{outcome:"detection_failed",unsupported_field_count:null,unsupported_field_types:null}),E.value="")}})}function pt(){v.value=null,i.toggleFillablePdf(!1),i.setContentDocumentPDF([],""),s("contentUpdated"),window.scrollTo(0,0)}function Be(b){_.value=b,pe.show(c.value)}function ht(){_.value=""}function U(b){const V=b[0];r.value=!0,v.value=null,w.value=[],C.value=!1,i.toggleFillablePdf(!1),i.setContentDocumentPDF([],""),Do.upload({bucket:i.bucket,file:V}).then(({urls:Z,documentPDF:P})=>{E.value=P,i.setContentDocumentPDF(Z,P),s("contentUpdated")}).catch(Z=>{if(Z.message==="No password given"){Be(Ne.PASSWORD);return}console.error(Z),_o(Z,{stage:"upload",examId:i.id,teacherId:i.teacherId,schoolId:i.schoolId}),Be(Ne.UNKNOWN)}).finally(()=>{Va(()=>{r.value=!1})})}return(b,V)=>{const Z=we("tooltip");return f(),x(me,null,[u("div",Dl,[r.value?(f(),T(Xt,{key:0,class:"PDFEditor__loader"})):S("",!0),G(u("div",Ll,[u("div",Fl,[u("h2",Nl,h(a(l)("Upload a PDF")),1),u("p",Ol,h(a(l)("Max file size"))+": "+h(bn/1e3/1e3)+" MB",1),m(ds,{ref:"dropAndClickArea",accept:[".pdf"],maxFileSize:bn,label:a(l)("Drag and drop or click to upload a PDF file"),onFilesAdded:U,onFileTooBig:V[0]||(V[0]=P=>Be(a(Ne).FILE_TOO_LARGE)),onInvalidFileType:V[1]||(V[1]=P=>Be(a(Ne).WRONG_FILE_TYPE)),onNoFileSelected:V[2]||(V[2]=P=>Be(a(Ne).NO_FILE_SELECTED))},null,8,["label"])])],512),[[ce,q.value]]),G(m(pl,null,{sidebar:g(()=>[L.value?(f(),T(go,{key:0},{label:g(()=>[I(h(a(l)("Fillable"))+" ",1),a(d)("fillablePDFs")?(f(),T(Bt,{key:0,size:"small"})):S("",!0),m(uo)]),default:g(()=>[G((f(),x("span",null,[m(le,{modelValue:xe.value,"onUpdate:modelValue":V[5]||(V[5]=P=>xe.value=P),disabled:H.value},null,8,["modelValue","disabled"])])),[[Z,mt.value,void 0,{top:!0}]])]),_:1})):S("",!0),Ge.value?(f(),T(Pl,{key:1,expanded:X.value,"onUpdate:expanded":V[6]||(V[6]=P=>X.value=P),hoveredFieldName:R.value,"onUpdate:hoveredFieldName":V[7]||(V[7]=P=>R.value=P),selectedFieldName:B.value,fields:D.value,onShow:Xe},null,8,["expanded","hoveredFieldName","selectedFieldName","fields"])):S("",!0),a(i).hasQuestions?(f(),T(go,{key:2,label:a(o)},{default:g(()=>[m(eo,{label:a(o),variant:"outlined",iconSize:"tiny",icon:"print",onClick:ft},null,8,["label"])]),_:1},8,["label"])):S("",!0),$.value?(f(),T(go,{key:3,label:a(n)},{default:g(()=>[m(eo,{label:a(n),icon:"trash",onClick:pt},null,8,["label"])]),_:1},8,["label"])):S("",!0)]),default:g(()=>[u("div",Bl,[a(i).content.documentPDF?(f(),T(ba,{key:0,ref_key:"pdfPreview",ref:A,hoveredFieldMarker:R.value,"onUpdate:hoveredFieldMarker":V[3]||(V[3]=P=>R.value=P),selectedFieldMarker:B.value,"onUpdate:selectedFieldMarker":V[4]||(V[4]=P=>B.value=P),class:"PDFEditor__pdf-preview",forceImageRendering:!xe.value,formFieldMode:xe.value?"static":"hidden",url:a(i).content.documentPDF,images:a(i).content.documentPages,zoom:Ul,fieldMarkers:ct.value},null,8,["hoveredFieldMarker","selectedFieldMarker","forceImageRendering","formFieldMode","url","images","fieldMarkers"])):S("",!0),p.value?(f(),x("div",Rl,[m(Xt)])):S("",!0)])]),_:1}
3,512),[[ce,O.value]])]),m(wl,{ref_key:"errorModal",ref:c,currentError:_.value,onHidden:ht},null,8,["currentError"])],64)}}},yn=W(zl,[["__scopeId","data-v-565b5e62"]]),Vl={class:"ContentCreator"},Wl=Y({__name:"ContentCreator",setup(e){const t=dt(),o=ue(),n=F(()=>({builder:Wr,write:nl,pdf:yn,"fillable-pdf":yn,toBeDetermined:Cr})[o.content.choice]);function s(){return Q(this,arguments,function*(d=!1,{silent:c=!1}={}){if(o.autoSaveId){if(yield Nt.update(o.autoSaveId,o.examData),c||t.add({severity:"success",summary:l("Exam saved")}),sessionStorage.setItem("examHasChanges","false"),o.studentCount>0&&d)try{yield gi({examId:o.autoSaveId,examBuilderId:o.content.examBuilderId,force:!0})}catch(r){console.error("Best-effort regrading failed",r)}return}i({silent:c})})}function i(){return Q(this,arguments,function*({silent:d=!1}={}){const c=yield Nt.create(o.examData);o.autoSaveId=c.examID,o.attachExamToGroup(),setTimeout(()=>{sessionStorage.setItem("examHasChanges","false")},200),d||t.add({severity:"success",summary:l("Exam saved")})})}return(d,c)=>(f(),x("div",Vl,[(f(),T(Wo(n.value),{class:"ContentCreator__editor",onContentUpdated:s},null,32))]))}}),ql=W(Wl,[["__scopeId","data-v-8555fb91"]]),jl=["href","aria-label"],Hl=Y({__name:"SupportLinkIcon",props:{href:{}},setup(e){return(t,o)=>{const n=we("tooltip");return G((f(),x("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",class:"SupportLinkIcon","aria-label":a(l)("Read more in our support center"),onClick:o[0]||(o[0]=ls(()=>{},["stop"]))},[...o[1]||(o[1]=[u("i",{class:"fa fa-question-circle SupportLinkIcon__icon","aria-hidden":"true"},null,-1)])],8,jl)),[[n,a(l)("Read more in our support center")]])}}}),Go=W(Hl,[["__scopeId","data-v-a35a69c8"]]),Gl={class:"ConfigurationsSubTitle"},Zl={class:"ConfigurationsSubTitle__title"},Yl=Y({__name:"ConfigurationsSubTitle",props:{isBeta:{type:Boolean,default:!1},showBasicLicenseLock:{type:Boolean},supportLink:{default:null}},setup(e){return(t,o)=>(f(),x("div",Gl,[u("span",Zl,[Se(t.$slots,"default",{},void 0,!0)]),e.isBeta?(f(),T(uo,{key:0})):S("",!0),e.showBasicLicenseLock?(f(),T(Bt,{key:1,size:"small"})):S("",!0),e.supportLink?(f(),T(Go,{key:2,href:e.supportLink},null,8,["href"])):S("",!0)]))}}),Zo=W(Yl,[["__scopeId","data-v-c1d43bc6"]]),Jl={class:"ConfigurationsSubSection"},Ql={class:"ConfigurationsSubSection__title-row"},Kl={class:"ConfigurationsSubSection__content"},Xl=Y({__name:"ConfigurationsSubSection",props:{modelValue:{type:Boolean,default:void 0},title:{default:""},disabled:{type:Boolean,default:!1},isBeta:{type:Boolean,default:!1},showBasicLicenseLock:{type:Boolean},tooltip:{default:""},supportLink:{default:null}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,n=t,s=F({get(){return!!o.modelValue},set(i){n("update:modelValue",i)}});return(i,d)=>{const c=we("tooltip");return f(),x("div",Jl,[u("div",Ql,[o.modelValue!==void 0?G((f(),T(le,{key:0,modelValue:s.value,"onUpdate:modelValue":d[0]||(d[0]=r=>s.value=r),disabled:e.disabled},null,8,["modelValue","disabled"])),[[c,e.tooltip]]):S("",!0),e.title?(f(),T(Zo,{key:1,isBeta:e.isBeta,showBasicLicenseLock:e.showBasicLicenseLock,supportLink:e.supportLink},{default:g(()=>[I(h(o.title),1)]),_:1},8,["isBeta","showBasicLicenseLock","supportLink"])):S("",!0)]),u("div",Kl,[Se(i.$slots,"default",{},void 0,!0)])])}}}),Oe=W(Xl,[["__scopeId","data-v-a5ae23cc"]]),se={anonymizeExam:{sv:"https://support.exam.net/s/article/utfora-och-ratta-ett-anonymiserat-prov?language=sv",en:"https://support.exam.net/s/article/conduct-an-anonymized-exam?language=en_US"},setTimeLimit:{sv:"https://support.exam.net/s/article/tidsbegransa-prov?language=sv",en:"https://support.exam.net/s/article/set-a-time-limit?language=en_US"},studentSelfResume:{sv:"https://support.exam.net/s/article/genomfora-prov-over-flera-lektioner-ateruppta-prov?language=sv",en:"https://support.exam.net/s/article/conduct-exams-over-several-sessions-resume-exam?language=en_US"},connectLms:{sv:"https://support.exam.net/s/article/koppla-ett-prov-till-lms-google-classroom-eller-microsoft-teams-for-education?language=sv",en:"https://support.exam.net/s/article/connect-an-exam
3-to-lms-google-classroom-or-microsoft-teams-for-education?language=en_US"},studentInformation:{sv:"https://support.exam.net/s/article/hantera-elevinformation?language=sv",en:"https://support.exam.net/s/article/manage-student-information?language=en_US"},oneQuestionAtATime:{sv:"https://support.exam.net/s/article/visa-en-uppgift-i-taget-for-elever?language=sv",en:"https://support.exam.net/s/article/show-students-one-question-at-a-time?language=en_US"},spellcheck:{sv:"https://support.exam.net/s/article/stavningskontroll?language=sv",en:"https://support.exam.net/s/article/spellcheck?language=en_US"},showResults:{sv:"https://support.exam.net/s/article/elevsvar-och-resultat-ladda-ner-skriva-ut-exportera-skicka?language=sv",en:"https://support.exam.net/s/article/send-share-exam-results-to-students?language=en_US"},drawingTool:{sv:"https://support.exam.net/s/article/ritverktyg-och-annotera-pa-bilder?language=sv",en:"https://support.exam.net/s/article/drawing-tool-and-image-annotation?language=en_US"},calculator:{sv:"https://support.exam.net/s/article/miniraknare?language=sv",en:"https://support.exam.net/s/article/calculator?language=en_US"},geogebra:{sv:"https://support.exam.net/s/article/geogebra?language=sv",en:"https://support.exam.net/s/article/geogebra?language=en_US"},desmos:{sv:"https://support.exam.net/s/article/desmos?language=sv",en:"https://support.exam.net/s/article/desmos?language=en_US"},programming:{sv:"https://support.exam.net/s/article/kodeditor-programmeringsverktyg?language=sv",en:"https://support.exam.net/s/article/programming-code-editor?language=en_US"},audioRecorder:{sv:"https://support.exam.net/s/article/ljudinspelningsverktyget?language=sv",en:"https://support.exam.net/s/article/the-audio-recording-function?language=en_US"},physicsTables:{sv:"https://support.exam.net/s/article/tabeller-och-formler-fysik?language=sv"},mathFormulas:{sv:"https://support.exam.net/s/article/formelblad-matematik?language=sv",en:"https://support.exam.net/s/article/mathematics-formulas?language=en_US"},chemistryTables:{sv:"https://support.exam.net/s/article/tabeller-och-formler-kemi?language=sv",en:"https://support.exam.net/s/article/table-and-formulas-for-chemistry?language=en_US"},audioFiles:{sv:"https://support.exam.net/s/article/ljudfiler-i-prov?language=sv",en:"https://support.exam.net/s/article/audio-files-in-an-exam?language=en_US"},textToSpeech:{sv:"https://support.exam.net/s/article/talsyntes?language=sv",en:"https://support.exam.net/s/article/text-to-speech?language=en_US"},translation:{sv:"https://support.exam.net/s/article/oversattningsverktyg-i-prov?language=sv",en:"https://support.exam.net/s/article/allow-translation-help?language=en_US"},swedishDictionary:{sv:"https://support.exam.net/s/article/svensk-ordbok?language=sv"},multilingualDictionary:{sv:"https://support.exam.net/s/article/flersprakig-ordbok?language=sv"},englishSynonyms:{sv:"http://support.exam.net/s/article/engelsk-synonymordbok?language=sv"},dictionary:{en:"https://support.exam.net/s/article/Dictionary?language=en_US"},phoneQRScanner:{sv:"https://support.exam.net/s/article/scanna-handskrivna-losningar-med-en-mobiltelefon?language=sv",en:"https://support.exam.net/s/article/scan-handwritten-solutions-with-a-mobile-phone?language=en_US"},computerFiles:{sv:"https://support.exam.net/s/article/Ladda-upp-bilder-som-elev?language=sv",en:"https://support.exam.net/s/article/upload-images-as-a-student?language=en_US"},resources:{sv:"https://support.exam.net/s/article/lagga-till-en-resurs-pdfer-webbsidor-formular-moln-filer-videoklipp?language=sv",en:"https://support.exam.net/s/article/add-a-resource-pdf-external-website-video-embedding?language=en_US"},lockdownMode:{sv:"https://support.exam.net/s/article/sakerhetsinstallningar?language=sv",en:"https://support.exam.net/s/article/security-settings-in-exams?language=en_US"}};function ae(e){var t,o,n;return e?He("sv")?(o=(t=e.sv)!=null?t:e.en)!=null?o:null:(n=e.en)!=null?n:null:null}const eu={},tu={class:"ConfigurationsBodyText"};function ou(e,t){return f(),x("div",tu,[Se(e.$slots,"default",{},void 0,!0)])}const Ee=W(eu,[["render",ou],["__scopeId","data-v-62c6a056"]]),nu={},su={class:"ConfigurationsHeading"};function au(e,t){return f(),x("h1",su,[Se(e.$slots,"default",{},void 0,!0)])}const iu=W(nu,[["render",au],["__scopeId","data-v-a19715a6"]]),ru={class:"ConfigurationsSection"},lu={class:"ConfigurationsSection__content"},uu=Y({__name:"ConfigurationsSection",props:{title:{default:""}},setup(e){return(t,o)=>(f(),x("div",ru,[m(iu,null,{default:g(()=>
3[I(h(e.title),1)]),_:1}),u("div",lu,[Se(t.$slots,"default",{},void 0,!0)])]))}}),kt=W(uu,[["__scopeId","data-v-fed9e8a5"]]),du={class:"ConfigurationsAutoMarked"},cu=Y({__name:"ConfigurationsAutoMarked",setup(e){const t=ue();return(o,n)=>(f(),x("div",du,[m(kt,{title:a(l)("Exam type settings")},{default:g(()=>[m(Oe,{modelValue:a(t).resources.hidePointsForStudents,"onUpdate:modelValue":n[0]||(n[0]=s=>a(t).resources.hidePointsForStudents=s),title:a(l)("Hide points for students during the exam")},{default:g(()=>[m(Ee,null,{default:g(()=>[I(h(a(l)("The students will not be able to see how many points each task can give until the exam has been marked.")),1)]),_:1})]),_:1},8,["modelValue","title"]),m(Oe,{modelValue:a(t).showAutomarkingOnSubmission,"onUpdate:modelValue":n[1]||(n[1]=s=>a(t).showAutomarkingOnSubmission=s),title:a(l)("Show exam results directly to students upon submission"),supportLink:a(ae)(a(se).showResults)},{default:g(()=>[m(Ee,null,{default:g(()=>[I(h(a(l)("Students will immediately see the result of the auto-marking. If the exam has tasks that need to be manually marked, this will be mentioned to the student and these are excluded from the result.")),1)]),_:1})]),_:1},8,["modelValue","title","supportLink"])]),_:1},8,["title"])]))}}),mu=W(cu,[["__scopeId","data-v-6af54b7f"]]),fu={components:{NotificationCard:Dt},data(){return{show:!1}}},pu={class:"trial-cheat-wrapper"},hu={style:{"margin-top":"20px"}},_u={class:"bold-paragraph"};function gu(e,t,o,n,s,i){const d=j("NotificationCard");return f(),x("div",pu,[u("div",{class:"cheat-information",onClick:t[0]||(t[0]=c=>s.show=!s.show)},[t[1]||(t[1]=u("img",{src:"https://static.exam.net/myicons/shield3.svg"},null,-1)),I(" "+h(e.__("Read more about our cheat-prevention systems")),1)]),G(m(d,{type:"warning",class:"NotificationCard"},{default:g(()=>[u("p",hu,h(e.__("In addition to our standard cheat protection, Exam.net has an extra layer of backend controls and logs to detect advanced cheating involving software, split screens, variable integrity, events, source code, settings, or the use of virtual machines and remote desktop solutions.")),1),u("p",null,[I(h(e.__("This extra layer applies to both browser and high-security mode, enhancing security in browser mode and making the high-security mode very secure. Should the backend controls detect anomalies, Exam.net emails a cheating report to the teacher, during or after an exam."))+" See ",1),t[2]||(t[2]=u("a",{href:"https://exam.net/cheat",target:"_blank"}," https://exam.net/cheat ",-1)),t[3]||(t[3]=I(" for more information. ",-1))]),u("p",_u,h(e.__("Backend cheat detection is enabled by default for all paid licenses but is not available during trials.")),1)]),_:1},512),[[ce,s.show]])])}const vu=W(fu,[["render",gu],["__scopeId","data-v-0b9e5aa7"]]),bu={class:"SecurityILevelExplainedBox"},yu={class:"SecurityILevelExplainedBox__title-row"},Su={class:"SecurityILevelExplainedBox__title-row__additional"},wu=Y({__name:"SecurityILevelExplainedBox",props:{icon:{},title:{},listItems:{},titleAdditionalInfo:{}},setup(e){return(t,o)=>{const n=we("sanitized-html");return f(),x("div",bu,[u("div",yu,[m(_e,{class:"SecurityILevelExplainedBox__icon",width:"var(--width-6)",svg:e.icon.svg,color:e.icon.color},null,8,["svg","color"]),u("h3",null,[I(h(e.title)+" ",1),u("span",Su,h(e.titleAdditionalInfo),1)])]),(f(!0),x(me,null,Pe(e.listItems,s=>(f(),x("div",{key:s,class:"SecurityILevelExplainedBox__list-item"},[m(_e,{class:"SecurityILevelExplainedBox__list-item__icon",color:"var(--yellow-400)",width:"var(--width-5)",svg:a(ns)},null,8,["svg"]),G(u("p",null,null,512),[[n,s]])]))),128))])}}}),Ht=W(wu,[["__scopeId","data-v-b3501d1d"]]),xu={class:"SecurityLevelInformationModal__content"},ku={class:"SecurityLevelInformationModal__title"},Cu={class:"SecurityLevelInformationModal__information-boxes"},Eu={class:"SecurityLevelInformationModal__information-boxes__row"},Tu={style:{display:"flex",gap:"24px"}},Mu={class:"SecurityLevelInformationModal__actions"},Iu=Y({__name:"SecurityLevelInformationModal",emits:["close"],setup(e,{emit:t}
3){const o=t,n=He("sv")?"https://support.exam.net/s/article/installera-hogsakerhetslage-exam-net-appen-seb-kiosk-app-till-chromebook?language=sv":"https://support.exam.net/s/article/install-high-security-software-seb-exam-net-app-kiosk-app-for-chromebooks?language=en_US";return(s,i)=>(f(),T(at,{class:"SecurityLevelInformationModal",size:"lg",noPadding:""},{body:g(()=>[u("div",xu,[m(_e,{role:"button",svg:a(ci),class:"SecurityLevelInformationModal__close-icon",width:"var(--width-3)",color:"var(--gray-500)",onClick:i[0]||(i[0]=d=>o("close"))},null,8,["svg"]),u("div",ku,[u("h3",null,h(a(l)("Choosing the right lockdown mode")),1),u("p",null,h(a(l)("Exam.net offers many different security customizations to fit your needs. This guide is meant to help you understand when to use the different lockdown modes.")),1)]),u("div",Cu,[u("div",Eu,[m(Ht,{icon:a(Ye).high.icon,title:a(l)("High"),titleAdditionalInfo:`(${a(l)("Lockdown app only")})`,listItems:[a(l)("Students are not able to access any other content on their devices until after submitting the exam."),a(l)(":highSecurityInstallationLink should be completed on the studentsâ devices in good time before the exam starts. ",{highSecurityInstallationLink:`<a href=${a(n)} target='_blank' rel='noopener noreferrer'>${a(l)("Installation of a high security software")}</a>`})]},null,8,["icon","title","titleAdditionalInfo","listItems"]),m(Ht,{icon:a(Ye)["high-preferred"].icon,title:a(l)("High"),titleAdditionalInfo:`(${a(l)("Allow students to continue with medium lockdown mode")})`,listItems:[a(l)("Students are recommended to enter the exam in high security mode, but can choose to stay in the browser if they cannot install the high security app."),a(l)("You should be prepared to keep an extra eye in the monitoring view on the students who have entered in a browser. ")]},null,8,["icon","title","titleAdditionalInfo","listItems"])]),u("div",Tu,[m(Ht,{icon:a(Ye).medium.icon,title:a(l)("Medium"),titleAdditionalInfo:`(${a(l)("Browser")})`,listItems:[a(l)("The students will be able to start the exam in a regular browser. If they try to leave the exam, you will be notified. Depending on your choice of consequences, they may be temporarily locked out of the exam."),a(l)("You should be prepared to keep an extra eye on each individual student through the monitoring view.")]},null,8,["icon","title","titleAdditionalInfo","listItems"]),m(Ht,{icon:a(Ye).none.icon,title:a(l)("Disabled"),listItems:[a(l)("Disable security if you are unconcerned that students will be able to access other programs and resources on their devices."),a(l)("The students will be able to access other programs and resources on their devices.")]},null,8,["icon","title","listItems"])])]),u("div",Mu,[m(ve,{label:a(l)("Ok"),onClick:i[1]||(i[1]=d=>o("close"))},null,8,["label"])])])]),_:1}))}}),ws=W(Iu,[["__scopeId","data-v-b5b7ecf5"]]),Au={class:"SecurityLevelSelector"},$u={class:"SecurityLevelSelector__delimiter"},Pu=Y({__name:"SecurityLevelSelector",props:{deviceSecurity:{},deviceSecurityModifiers:{},browserSecurityMode:{},browserSecurityModeModifiers:{},screenRecordingEnabled:{type:Boolean,required:!0},screenRecordingEnabledModifiers:{}},emits:["update:deviceSecurity","update:browserSecurityMode","update:screenRecordingEnabled"],setup(e){const t=fe(e,"deviceSecurity"),o=fe(e,"browserSecurityMode"),n=fe(e,"screenRecordingEnabled"),s=F({get:()=>gs(t.value),set:r=>{r&&c("ONLY_SEB")}}),i=F({get:()=>wi(t.value,o.value),set:r=>{r&&c("NO_SEB")}}),d=F({get:()=>vs(t.value,o.value),set:r=>{r&&c("off")}});function c(r){if(r==="off"){n.value=!1,o.value="6",t.value="NO_SEB";return}o.value=o.value==="6"?"1":o.value,t.value=r}return(r,p)=>(f(),x("div",Au,[m(Kt,{selected:s.value,"onUpdate:selected":p[0]||(p[0]=_=>s.value=_),label:a(l)("High"),style:{"margin-right":"var(--spacing-3)"}},null,8,["selected","label"]),m(Kt,{selected:i.value,"onUpdate:selected":p[1]||(p[1]=_=>i.value=_),label:a(l)("Medium")},null,8,["selected","label"]),u("span",$u,h(a(l)("or")),1),m(Kt,{selected:d.value,"onUpdate:selected":p[2]||(p[2]=_=>d.value=_),label:a(l)("Disabled")},null,8,["selected","label"])]))}}),Du=W(Pu,[["__scopeId","data-v-8c0006c8"]]),Lu={class:"NoSecurityLevelDetails"},Fu={class:"NoSecurityLevelDetails__content"},Nu=Y({__name:"NoSecurityLevelDetails",setup(e){return(t,o)=>(f(),x("div",Lu,[u("div",Fu,[m(_e,{width:"var(--width-8)",svg:a(Ye).none.icon.svg},null,8,["svg"]),u("h3",null,h(a(l)("Lockdown mode is turned off")),1),u("p",null,h(a(l)("Your students will be able to enter the exam in any browser, and will be able to use other documents and programs on the device while taking the exam.")),1)])]))}}),Ou=W(Nu,[["__scopeId","data-v-0028e21a"]]),Bu={class:"SecurityDetailsHeader"},Ru={class:"SecurityDetailsHeader__content"},Uu={class:"SecurityDetailsHeader__title-container"},zu={class:"SecurityDetailsHeader__title"},Vu={class:"SecurityDetailsHeader__title-additional"},Wu={class:"SecurityDetailsHeader__note"},qu=Y({__name:"SecurityDetailsHeader",props:{svgIcon:{},title:{},titleAdditional:{},note:{}},setup(e){return(t,o)=>(f(),x("div",Bu,[m(_e,{class:"SecurityDetailsHeader__icon",width:"var(--width-6)",color:"var(--blue-600)",svg:e.svgIcon},null,8,["svg"]),u("div",Ru,[u("div",Uu,[u("span",zu,h(e.title),
31),u("span",Vu,h(e.titleAdditional),1)]),u("span",Wu,h(e.note),1)])]))}}),xs=W(qu,[["__scopeId","data-v-ecdaf2d1"]]),ju={class:"ScreenMonitoringToggle"},Hu={class:"ScreenMonitoringToggle__label"},Gu=Y({__name:"ScreenMonitoringToggle",props:{enableToggle:{type:Boolean},enableToggleModifiers:{}},emits:["update:enableToggle"],setup(e){const t=fe(e,"enableToggle"),{isRestricted:o}=ut(),n=M(!1),s=F(()=>!t.value&&o("screenMonitoring")),i=window.K$.locale.sv==="sv"?"https://support.exam.net/s/article/skarmovervakning?language=sv":"https://support.exam.net/s/article/Screen-monitoring?language=en_US";return(d,c)=>(f(),x("div",ju,[u("div",Hu,[m(Zo,{showBasicLicenseLock:a(o)("screenMonitoring"),supportLink:a(i)},{default:g(()=>[I(h(a(l)("Enable screen monitoring")),1)]),_:1},8,["showBasicLicenseLock","supportLink"]),m(le,{modelValue:t.value,"onUpdate:modelValue":c[0]||(c[0]=r=>t.value=r),disabled:s.value,"data-testid":"toggle-screen-monitoring"},null,8,["modelValue","disabled"])]),m(Ee,null,{default:g(()=>[I(h(a(l)("Records a student's screen during the exam session."))+" "+h(a(l)("Screenshots are only collected for students that use supported modes."))+" ",1),u("button",{type:"button",class:"ScreenMonitoringToggle__support-link",onClick:c[1]||(c[1]=r=>n.value=!0)},h(a(l)("Screenshot device support")),1)]),_:1}),m(Ja,{visible:n.value,"onUpdate:visible":c[2]||(c[2]=r=>n.value=r)},null,8,["visible"])]))}}),ks=W(Gu,[["__scopeId","data-v-e4cc9d80"]]),Zu={class:"MediumSecurityLevelDetails"},Yu={class:"MediumSecurityLevelDetails__browser-security"},Ju=Y({__name:"MediumSecurityLevelDetails",props:Re({browserSecurityOptions:{}},{browserSecurityMode:{},browserSecurityModeModifiers:{},screenRecordingEnabled:{type:Boolean},screenRecordingEnabledModifiers:{}}),emits:["update:browserSecurityMode","update:screenRecordingEnabled"],setup(e){const t=fe(e,"browserSecurityMode"),o=fe(e,"screenRecordingEnabled");return(n,s)=>{const i=we("sanitized-html");return f(),x("div",Zu,[m(xs,{svgIcon:a(Ye).medium.icon.svg,title:a(Ye).medium.label,titleAdditional:a(l)("Browser")},null,8,["svgIcon","title","titleAdditional"]),G(u("p",null,null,512),[[i,a(l)("Students can enter the exam in a browser such as :chrome, :firefox, :safari, etc. In this mode, we prevent many cheating attempts, but we cannot completely lock the device.",{chrome:"<b>Chrome</b>",firefox:"<b>Firefox</b>",safari:"<b>Safari</b>"})]]),u("div",Yu,[u("p",null,h(a(l)("When the exam starts, the exam will automatically go into full screen. Choose the consequence if the student leaves this mode:")),1),m(We,{modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=d=>t.value=d),autoWidth:"",name:"browserSecurityMode medium-security-level",options:e.browserSecurityOptions},null,8,["modelValue","options"])]),m(ks,{enableToggle:o.value,"onUpdate:enableToggle":s[1]||(s[1]=d=>o.value=d)},null,8,["enableToggle"])])}}}),Qu=W(Ju,[["__scopeId","data-v-71e84577"]]),Ku={class:"HighSecurityLevelDetails"},Xu={class:"HighSecurityLevelDetails__title-container"},ed={class:"HighSecurityLevelDetails__information"},td={class:"HighSecurityLevelDetails__medium-mode-settings"},od={class:"HighSecurityLevelDetails__medium-mode-toggle"},nd={class:"HighSecurityLevelDetails__require-high-security"},sd={class:"HighSecurityLevelDetails__require-high-security-title-row"},ad={class:"HighSecurityLevelDetails__require-high-security-title"},id=["aria-label"],rd={class:"HighSecurityLevelDetails__require-high-security-checkboxes"},ld={class:"HighSecurityLevelDetails__require-high-security-text"},ud={class:"HighSecurityLevelDetails__require-high-security-text"},dd=Y({__name:"HighSecurityLevelDetails",props:Re({browserSecurityOptions:{}},{browserSecurityMode:{},browserSecurityModeModifiers:{},deviceSecurity:{},deviceSecurityModifiers:{},screenRecordingEnabled:{type:Boolean},screenRecordingEnabledModifiers:{},requireHighSecurityOn:{default:()=>[]},requireHighSecurityOnModifiers:{}}),emits:Re(["showHighSecurityModal"],["update:browserSecurityMode","update:deviceSecurity","update:screenRecordingEnabled","update:requireHighSecurityOn"]),setup(e,{emit:t}){const o=fe(e,"browserSecurityMode"),n=fe(e,"deviceSecurity"),s=fe(e,"screenRecordingEnabled"),i=fe(e,"requireHighSecurityOn"),d=F({get:()=>n.value==="PREFER_SEB",set:y=>{n.value=y?"PREFER_SEB":"ONLY_SEB"}}),c=[{value:"windows",label:l("Windows"),testId:"checkbox-allow-medium-windows"},{value:"mac",label:l("macOS & iOS"),testId:"checkbox-allow-medium-mac"},{value:"chromeos",label:l("Chrome OS"),testId:"checkbox-allow-medium-chromeos"}],r=c.map(y=>y.value),p=F({get:()=>r.filter(y=>
3!i.value.includes(y)),set:y=>{i.value=r.filter(C=>!y.includes(C))}}),_=l("Devices that cannot install a high security application, or whose operating system cannot be identified, will always be able to use medium lockdown mode."),v=t,w=He("sv")?"https://support.exam.net/s/article/installera-hogsakerhetslage-exam-net-appen-seb-kiosk-app-till-chromebook?language=sv":"https://support.exam.net/s/article/install-high-security-software-seb-exam-net-app-kiosk-app-for-chromebooks?language=en_US";return(y,C)=>{const k=we("sanitized-html"),E=we("tooltip");return f(),x("div",Ku,[u("div",Xu,[m(xs,{svgIcon:a(xi)(n.value,o.value).svg,title:a(Ye).high.label,titleAdditional:a(l)("Lockdown app"),note:a(l)("Recommended for graded exams")},null,8,["svgIcon","title","titleAdditional","note"]),m(ve,{class:"HighSecurityLevelDetails__configure-button",faIcon:"cog",label:a(l)("Configure apps"),onClick:C[0]||(C[0]=A=>v("showHighSecurityModal"))},null,8,["label"])]),G(u("p",ed,null,512),[[k,a(l)("Students will be prompted to enter through a :highSecurityApplicationLink. They will not be able to leave the application before submitting the exam.",{highSecurityApplicationLink:`<a href=${a(w)} target='_blank' rel='noopener noreferrer'>${a(l)("high-security application")}</a>`})]]),u("div",td,[u("div",od,[u("span",null,h(a(l)("Prefer High but allow students to continue with medium lockdown mode")),1),m(le,{modelValue:d.value,"onUpdate:modelValue":C[1]||(C[1]=A=>d.value=A)},null,8,["modelValue"])]),G(u("div",nd,[u("span",sd,[u("h4",ad,h(a(l)("Allow on the following operating systems:")),1),G(u("i",{class:"fa fa-question-circle HighSecurityLevelDetails__require-high-security-hint",tabindex:"0",role:"img","aria-label":a(_)},null,8,id),[[E,a(_)]])]),u("div",rd,[(f(),x(me,null,Pe(c,A=>m(io,{key:A.value,modelValue:p.value,"onUpdate:modelValue":C[2]||(C[2]=R=>p.value=R),label:A.label,value:A.value,"data-testid":A.testId},null,8,["modelValue","label","value","data-testid"])),64))]),G(u("p",ld,null,512),[[k,a(l)("In the monitoring view, students with a :lock next to their name are using the high-security mode. Students without a lock have entered in the medium lockdown mode.",{lock:`<b>${a(l)("lock")}</b> <i class='fa fa-lock'></i>`})]]),u("p",ud,h(a(l)("When the exam starts, the exam will automatically go into full screen. Choose the consequence if the student leaves this mode:")),1),m(We,{modelValue:o.value,"onUpdate:modelValue":C[3]||(C[3]=A=>o.value=A),autoWidth:"",name:"browserSecurityMode high-security-level",options:e.browserSecurityOptions},null,8,["modelValue","options"])],512),[[ce,d.value]])]),m(ks,{enableToggle:s.value,"onUpdate:enableToggle":C[4]||(C[4]=A=>s.value=A),class:"HighSecurityLevelDetails__screen-monitoring"},null,8,["enableToggle"])])}}}),cd=W(dd,[["__scopeId","data-v-dfc32936"]]),md={class:"ModalHighSecuritySettings__container"},fd={key:0,class:"ModalHighSecuritySettings__section"},pd={class:"ModalHighSecuritySettings__row"},hd={class:"ModalHighSecuritySettings__section-title"},_d={class:"ModalHighSecuritySettings__checkbox-options"},gd={class:"ModalHighSecuritySettings__section"},vd={class:"ModalHighSecuritySettings__row"},bd={class:"ModalHighSecuritySettings__section-title"},yd={key:1,class:"ModalHighSecuritySettings__section"},Sd={class:"ModalHighSecuritySettings__row"},wd={class:"ModalHighSecuritySettings__section-title"},xd={class:"ModalHighSecuritySettings__description"},kd={key:2,class:"ModalHighSecuritySettings__section"},Cd={class:"ModalHighSecuritySettings__row"},Ed={class:"ModalHighSecuritySettings__description"},Td={key:3,class:"ModalHighSecuritySettings__section"},Md={class:"ModalHighSecuritySettings__row"},Id={class:"ModalHighSecuritySettings__section-title"},Ad={key:4,class:"ModalHighSecuritySettings__section"},$d={class:"ModalHighSecuritySettings__force-quit"},Pd={class:"ModalHighSecuritySettings__force-quit-title"},Dd={class:"ModalHighSecuritySettings__description"},Ld={class:"ModalHighSecuritySettings__radio-group"},Fd={class:"ModalHighSecuritySettings__radio-option"},Nd={class:"ModalHighSecuritySettings__radio-option"}
3,Od={key:0,class:"ModalHighSecuritySettings__custom-password-input"},Bd={class:"ModalHighSecuritySettings__description"},Rd=3,vo="both",Ud=Y({__name:"ModalHighSecuritySettings",props:Re({sebStartCheck:{type:String,default:"soft"},limit:{type:String,default:""},ignoreService:{type:Boolean,default:!1},prohibitedProcesses:{type:Array,default:()=>[]},prohibitedProcessesBeta:{type:Boolean,default:!1},customQuitPassword:{type:String,default:""},allowedClientVersions:{type:String,default:"recommended"}},{visible:{type:Boolean,default:!1},visibleModifiers:{}}),emits:Re(["update:sebStartCheck","update:limit","update:prohibitedProcesses","update:ignoreService","update:quitPassword","update:allowedClientVersions"],["update:visible"]),setup(e,{emit:t}){var N;const o=fe(e,"visible"),n=e,s=t,i=M(n.sebStartCheck),d=M(String(n.ignoreService)),c=M(n.limit),r=M(n.prohibitedProcesses),p=M(n.allowedClientVersions),_=M(!0),w=M((N={1:"sebEXAMkey",2:"SECUREexamination",3:"1alternativePASSWORD",4:"SEBredSCREEN",5:"Ga58_evbjKr"}[n.customQuitPassword])!=null?N:n.customQuitPassword),y=M("default"),C=F(()=>y.value!=="custom"?!0:w.value.length>=Rd),k=F(()=>C.value||w.value.length===0?null:l("Password must be at least 3 characters long"));xt(()=>{n.customQuitPassword&&(y.value="custom")}),_t.register("altQuitPassword",()=>{_.value=!0},{description:"Enable the alternative SEB quit password beta"});const E=[{value:"seb",label:l("Limit to SEB only")},{value:vo,label:l("Allow both SEB and TaT")},{value:"tat",label:l("Limit to TaT only")}],A=F({get:()=>c.value===""?vo:c.value,set:$=>{c.value=$===vo?"":$}}),R=[{value:"recommended",label:l("Only recent versions")},{value:"all-supported",label:l("All supported versions")}],B=[{value:"hard",label:l("Refuse to proceed if disallowed applications are running")},{value:"soft",label:l("Try to close disallowed applications")}],X=[{value:"false",label:l("SEB Service is active")},{value:"true",label:l("SEB Service is ignored")}],O=[{value:"chrome",label:l("Prohibit Google Chrome")}],L=()=>{const $=He("sv")?"https://support.exam.net/s/article/installera-hogsakerhetslage-exam-net-appen-seb-kiosk-app-till-chromebook?language=sv":"https://support.exam.net/s/article/install-high-security-software-seb-exam-net-app-kiosk-app-for-chromebooks?language=en_US";window.open($,"_blank")},D=()=>{o.value=!1};return oe(i,$=>s("update:sebStartCheck",$)),oe(c,$=>s("update:limit",$)),oe(r,$=>s("update:prohibitedProcesses",$)),oe(d,$=>s("update:ignoreService",$)),oe(p,$=>s("update:allowedClientVersions",$)),oe(y,$=>{$==="default"&&(w.value="",s("update:quitPassword",""))}),oe(w,$=>{s("update:quitPassword",$!=null?$:"")}),($,q)=>(f(),T(ro,{visible:o.value,"onUpdate:visible":q[8]||(q[8]=H=>o.value=H),modal:"",class:"ModalHighSecuritySettings",header:a(l)("Configure apps")},{footer:g(()=>[m(ps,{primary:{label:a(l)("Confirm"),onAction:D,disabled:!C.value,testId:"high-security-settings-confirm"}},null,8,["primary"])]),default:g(()=>[u("div",md,[e.prohibitedProcessesBeta?(f(),x("div",fd,[u("div",pd,[u("div",hd,h(a(l)("Prohibit specific processes")),1),u("div",_d,[(f(),x(me,null,Pe(O,H=>m(io,{key:H.value,modelValue:r.value,"onUpdate:modelValue":q[0]||(q[0]=xe=>r.value=xe),label:H.label,value:H.value},null,8,["modelValue","label","value"])),64))])])])):S("",!0),u("div",gd,[u("div",vd,[u("div",bd,h(a(l)("Limit security options for Windows 10")),1),m(gt,{modelValue:A.value,"onUpdate:modelValue":q[1]||(q[1]=H=>A.value=H),options:E,optionLabel:"label",optionValue:"value",class:"ModalHighSecuritySettings__select","data-testid":"limit-options"},null,8,["modelValue"])])]),c.value!=="tat"?(f(),x("div",yd,[u("div",Sd,[u("div",wd,[I(h(a(l)("Lockdown app versions allowed"))+" ",1),m(hs,{onClick:L})]),m(gt,{modelValue:p.value,"onUpdate:modelValue":q[2]||(q[2]=H=>p.value=H),options:R,optionLabel:"label",optionValue:"value",class:"ModalHighSecuritySettings__select","data-testid":"allowed-client-version-options"},null,8,["modelValue"])]),u("p",xd,h(a(l)('Configure the SEB and Exam.net app (macOS/iOS) versions that students are allowed to use. For the highest security, we recommend to limit this to "Only recent versions".')),1)])):S("",!0),c.value!=="tat"?(f
3(),x("div",kd,[u("div",Cd,[q[9]||(q[9]=u("div",{class:"ModalHighSecuritySettings__section-title"},"SEB Service",-1)),m(gt,{modelValue:d.value,"onUpdate:modelValue":q[3]||(q[3]=H=>d.value=H),options:X,optionLabel:"label",optionValue:"value",class:"ModalHighSecuritySettings__select","data-testid":"seb-service-options"},null,8,["modelValue"])]),u("p",Ed,h(a(l)("SEB uses a Windows service process for some of its features. In some rare scenarios, this causes problems on student devices leading to frequent red lock screens. Disabling this feature may reduce the issues but remove some cheat prevention measures.")),1)])):S("",!0),c.value!=="tat"?(f(),x("div",Td,[u("div",Md,[u("div",Id,h(a(l)("SEB check at launch")),1),m(gt,{modelValue:i.value,"onUpdate:modelValue":q[4]||(q[4]=H=>i.value=H),options:B,optionLabel:"label",optionValue:"value",class:"ModalHighSecuritySettings__select","data-testid":"seb-start-check-options"},null,8,["modelValue"])])])):S("",!0),c.value!=="tat"?(f(),x("div",Ad,[u("div",$d,[u("div",Pd,h(a(l)("Quit SEB")),1),u("p",Dd,h(a(l)("If SEB refuses to launch due to disallowed applications, it can be quit with CTRL+Q and password.")),1),u("div",Ld,[u("label",Fd,[m(Po,{modelValue:y.value,"onUpdate:modelValue":q[5]||(q[5]=H=>y.value=H),name:"quitPassword",value:"default"},null,8,["modelValue"]),I(" "+h(a(l)("Use default password EXAMnetQUIT2017")),1)]),u("label",Nd,[m(Po,{modelValue:y.value,"onUpdate:modelValue":q[6]||(q[6]=H=>y.value=H),name:"quitPassword",value:"custom"},null,8,["modelValue"]),I(" "+h(a(l)("Use custom password")),1)])]),y.value==="custom"?(f(),x("div",Od,[m(no,{modelValue:w.value,"onUpdate:modelValue":q[7]||(q[7]=H=>w.value=H),fluid:"","aria-label":a(l)("Quit password"),placeholder:"EXAMnetQUIT2017",invalid:k.value!==null},null,8,["modelValue","aria-label","invalid"]),k.value?(f(),T(it,{key:0,class:"ModalHighSecuritySettings__error",severity:"error",variant:"simple",size:"small"},{default:g(()=>[I(h(k.value),1)]),_:1})):S("",!0),u("p",Bd,h(a(l)("Do not use a personal password. This password may be shared with colleagues and students.")),1)])):S("",!0)])])):S("",!0)])]),_:1},8,["visible","header"]))}}),zd=W(Ud,[["__scopeId","data-v-1ab31d32"]]),Vd={class:"SecurityLevel"},Wd={class:"SecurityLevel__information-text"},qd=Y({__name:"SecurityLevel",setup(e){const t=[{value:1,label:l("Require explanation but unlock immediately")},{value:2,label:l("Require explanation and wait 30 seconds")},{value:3,label:l("Require explanation and wait 60 seconds")},{value:4,label:l("Require explanation and wait 90 seconds")},{value:5,label:l("Require explanation and manual unlock (by the teacher)")},{value:10,label:l("Notify the teacher but don't lock the student")}],o=ue(),n=M(null),s=M(!1),i=F(()=>o.resources.external.length===0||o.deviceSecurity==="ONLY_SEB"?!1:Number(o.browserSecurityMode)!==10&&Number(o.browserSecurityMode)!==6),d=F(()=>vs(o.deviceSecurity,o.browserSecurityMode)?Ou:gs(o.deviceSecurity)?cd:Qu);return(c,r)=>(f(),x("div",Vd,[i.value?(f(),T(rt,{key:0,class:"SecurityLevel__external-resources-warning",mode:"primary",text:a(l)("You have added external resources for this exam, which are not compatible with the Medium lockdown mode. Either select High lockdown mode or disable cheat prevention.")},null,8,["text"])):S("",!0),m(Du,{deviceSecurity:a(o).deviceSecurity,"onUpdate:deviceSecurity":r[0]||(r[0]=p=>a(o).deviceSecurity=p),browserSecurityMode:a(o).browserSecurityMode,"onUpdate:browserSecurityMode":r[1]||(r[1]=p=>a(o).browserSecurityMode=p),screenRecordingEnabled:a(o).extraSettings.screenMonitoring.enabled,"onUpdate:screenRecordingEnabled":r[2]||(r[2]=p=>a(o).extraSettings.screenMonitoring.enabled=p),class:"SecurityLevel__SecurityLevelSelector"},null,8,["deviceSecurity","browserSecurityMode","screenRecordingEnabled"]),m(ss,{mode:"out-in"},{default:g(()=>[(f(),T(Wa,null,[(f(),T(Wo(d.value),{browserSecurityMode:a(o).browserSecurityMode,"onUpdate:browserSecurityMode":r[3]||(r[3]=p=>a(o).browserSecurityMode=p),deviceSecurity:a(o).deviceSecurity,"onUpdate:deviceSecurity":r[4]||(r[4]=p=>a(o).deviceSecurity=p),screenRecordingEnabled:a(o).extraSettings.screenMonitoring.enabled,"onUpdate:screenRecordingEnabled":r[5]||(r[5]=p=>a(o).extraSettings.screenMonitoring.enabled=p),requireHighSecurityOn:a(o).extraSettings.requireHighSecurityOn,"onUpdate:requireHighSecurityOn":r[6]||(r[6]=p=>a(o).extraSettings.requireHighSecurityOn=p),browserSecurityOptions:t,onShowHighSecurityModal:r[7]||(r[7]=p=>s.value=!0)},null,40,["browserSecurityMode","deviceSecurity","screenRecordingEnabled","requireHighSecurityOn"]))],1024))]),_:1}),u("div",{class:"SecurityLevel__information",onClick:r[8]||(r[8]=p=>a(pe).show(n.value))}
3,[m(_e,{width:"var(--width-4)",svg:a(as)},null,8,["svg"]),u("span",Wd,h(a(l)("Choosing the right lockdown mode")),1)]),m(ws,{ref_key:"securityLevelInformationModal",ref:n,onClose:r[9]||(r[9]=p=>a(pe).hide(n.value))},null,512),m(zd,{visible:s.value,"onUpdate:visible":r[10]||(r[10]=p=>s.value=p),prohibitedProcesses:a(o).extraSettings.prohibitedProcesses,prohibitedProcessesBeta:a(o).prohibitedProcessesBeta,limit:a(o).extraSettings.limit,sebStartCheck:a(o).extraSettings.sebStartCheck,ignoreService:a(o).extraSettings.ignoreService,customQuitPassword:a(o).extraSettings.quitPassword,allowedClientVersions:a(o).extraSettings.allowedClientVersions,"onUpdate:prohibitedProcesses":r[11]||(r[11]=p=>a(o).extraSettings.prohibitedProcesses=p),"onUpdate:limit":r[12]||(r[12]=p=>a(o).extraSettings.limit=p),"onUpdate:quitPassword":r[13]||(r[13]=p=>a(o).extraSettings.quitPassword=p),"onUpdate:sebStartCheck":r[14]||(r[14]=p=>a(o).extraSettings.sebStartCheck=p),"onUpdate:ignoreService":r[15]||(r[15]=p=>a(o).extraSettings.ignoreService=String(p)==="true"),"onUpdate:allowedClientVersions":r[16]||(r[16]=p=>a(o).extraSettings.allowedClientVersions=p)},null,8,["visible","prohibitedProcesses","prohibitedProcessesBeta","limit","sebStartCheck","ignoreService","customQuitPassword","allowedClientVersions"])]))}}),jd=W(qd,[["__scopeId","data-v-277302c6"]]),Hd={key:0},Gd={style:{"font-size":"16px","margin-top":"30px"}},Zd={href:"/demo-access",target:"_blank"},Yd=Y({__name:"ConfigurationsSecurity",setup(e){const t=ue(),o=M(null);return(n,s)=>(f(),T(kt,{class:"ConfigurationsSecurity",title:a(l)("Cheat prevention")},{default:g(()=>[a(t).demo?(f(),T(Dt,{key:1,type:"success",style:{width:"520px"}},{default:g(()=>[u("p",Gd,h(a(l)("In the demo version of Exam.net, exams can only be created with the cheat protection disabled.")),1),u("a",Zd,h(a(l)("Click here to read more about the demo license and to request a free trial of the full version of Exam.net")),1),s[3]||(s[3]=u("p",null,null,-1))]),_:1})):(f(),x("div",Hd,[a(t).content.choice==="builder"?(f(),T(Oe,{key:0,modelValue:a(t).resources.coverAnswers,"onUpdate:modelValue":s[0]||(s[0]=i=>a(t).resources.coverAnswers=i),"data-testid":"hide-questions-toggle",title:a(l)("Cover answered questions")},{default:g(()=>[m(Ee,null,{default:g(()=>[I(h(a(l)("This prevents students from seeing answers on other students' screens. The answers are shown when the question is active but hidden when it is left.")),1)]),_:1})]),_:1},8,["modelValue","title"])):S("",!0),a(t).content.choice==="builder"?(f(),T(Oe,{key:1,modelValue:a(t).resources.randomizeQuestions,"onUpdate:modelValue":s[1]||(s[1]=i=>a(t).resources.randomizeQuestions=i),title:a(l)("Randomize question order")},{default:g(()=>[m(Ee,null,{default:g(()=>[I(h(a(l)("If you place information blocks in the exam, these will retain their position, and the questions before/after will be shuffled internally.")),1)]),_:1})]),_:1},8,["modelValue","title"])):S("",!0),m(Oe,{title:a(l)("Select lockdown mode"),supportLink:a(ae)(a(se).lockdownMode)},{default:g(()=>[m(jd)]),_:1},8,["title","supportLink"]),a(t).schoolLicense&&a(t).schoolLicense.type==="TRIAL"?(f(),T(vu,{key:2})):S("",!0)])),m(ws,{ref_key:"securityLevelInformationModal",ref:o,onClose:s[2]||(s[2]=i=>a(pe).hide(o.value))},null,512)]),_:1},8,["title"]))}}),Jd=W(Yd,[["__scopeId","data-v-9cc50b33"]]),Qd={name:"ConfigurationsSideMenu",components:{PrimaryButton:he},props:{hasExamTypeSettings:Boolean,hasError:Boolean,shouldDisableShareButton:Boolean},emits:["clickedShare"],setup(){const e=["General","examType","StudentInformation","StudentWorkspace","Accessibility","security"],t=["General","examType","StudentWorkspace","Accessibility"],o=ue();return{SECTION_IDS:e,PRACTICE_SECTION_IDS:t,examCreatorStore:o}},data(){return{selectedMenuItem:"",initialTop:255,lastSectionBottomOffset:50,availableSections:[]}},watch:{hasExamTypeSettings:{immediate:!0,handler(){const e=this.examCreatorStore.forPractice?this.PRACTICE_SECTION_IDS:this.SECTION_IDS;this.availableSections=e.filter(o=>o!=="examType"||this.hasExamTypeSettings);const t=document.getElementById(this.availableSections[0]);t&&this.$nextTick(()=>{this.initialTop=t.getBoundingClientRect().height})}},hasError(){window.scrollTo({top:0,behavior:"smooth"})},"examCreatorStore.forPractice"(e){e?(document.removeEventListener("scroll",this.setSelectedMenuItem,{passive:!0}),this.availableSections=this.PRACTICE_SECTION_IDS.filter(t=>t!=="examType"||this.hasExamTypeSettings),this.examCreatorStore.started||this.setSelectedMenuItem(),this.addMenuListener()):this.initSelectedMenuItem()}},mounted(){this.initSelectedMenuItem()},beforeUnmount(){document.removeEventListener("scroll",this.setSelectedMenuItem,{passive:!0})},methods:{initSelectedMenuItem(){this.availableSections=this.SECTION_IDS.filter(e=>e!=="examType"||this.hasExamTypeSettings),this.examCreatorStore.started||this.setSelectedMenuItem(),this.addMenuListener()},addMenuListener(){document.addEventListener("scroll",this.setSelectedMenuItem,{passive:!0})},shouldLastSectionBeSelected(){const e=document.body.scrollHeight;return window.scrollY+window.innerHeight+this.lastSectionBottomOffset/4>e},setSelectedMenuItem(){if(this.shouldLastSectionBeSelected()){this.selectedMenuItem=this.availableSections[this.availableSections.length-1];return}this.selectedMenuItem=this.availableSections.find(e=>{const t=document.getElementById(e);return t?this.isSelected(t.getBoundingClientRect()):!1}),!this.examCreatorStore.started&&(this.selectedMenuItem||(this.selectedMenuItem=window.scrollY===0?"General":"security"))},scrollTo(e){const t=document.getElementById(e);if(!t)return;const n=t.getBoundingClientRect().top+window.pageYOffset+-144;if(this.availableSections.indexOf(e)===this.availableSections.length-2&&n>=document.body.scrollHeight-window.innerHeight){const i=document.body.scrollHeight-window.innerHeight-this.lastSectionBottomOffset;window.scrollTo({top:i,behavior:"smooth"});return}window.scrollTo({top:n,behavior:"smooth"})},isExamStarted(){return this.examCreatorStore.started},isSelected(e){const t=e.height/4;return e.height>=Math.floor(Math.abs(e.top-(this.initialTop+t)))}}},Kd={class:"ConfigurationsSideMenu"},Xd={class:"ConfigurationsSideMenu__container"},ec={class:"ConfigurationsSideMenu__title"},tc={class:"ConfigurationsSideMenu__menu"},oc={class:"ConfigurationsSideMenu__share-button"};function nc(e,t,o,n,s,i){const d=j("PrimaryButton"),c=we("tooltip");return f(),x("div",Kd,[u("div",Xd,[u("h2",ec,h(e.__("Configurations")),1),u("ul",tc,[u("li",{ref:"General",class:re([{"ConfigurationsSideMenu__menu__item--selected":s.selectedMenuItem==="General"},"ConfigurationsSideMenu__menu__item"]),onClick:t[0]||(t[0]=r=>i.scrollTo("General"))},h(e.__("General")),3),o.hasExamTypeSettings?(f(),x("li",{key:0,ref:"examType",class:re([{"ConfigurationsSideMenu__menu__item--selected":s.selectedMenuItem==="examType"},"ConfigurationsSideMenu__menu__item"]),onClick:t[1]||(t[1]=r=>i.scrollTo("examType"))},h(e.__("Exam type settings")),3)):S("",!0),n.examCreatorStore.forPractice?S("",!0):(f(),x("li",{key:1,ref:"StudentInformation",class:re([{"ConfigurationsSideMenu__menu__item--selected":s.selectedMenuItem==="StudentInformation"},"ConfigurationsSideMenu__menu__item"]),onClick:t[2]||(t[2]=r=>i.scrollTo("StudentInformation"))},h(e.__("Student information")),3)),u("li",{ref:"StudentWorkspace",class:re([{"ConfigurationsSideMenu__menu__item--selected":s.selectedMenuItem==="StudentWorkspace"},"ConfigurationsSideMenu__menu__item"]),onClick:t[3]||(t[3]=r=>i.scrollTo("StudentWorkspace"))},h(e.__("Student workspace")),3),u("li",{ref:"Accessibility",class:re([{"ConfigurationsSideMenu__menu__item--selected":s.selectedMenuItem==="Accessibility"},"ConfigurationsSideMenu__menu__item"]),onClick:t[4]||(t[4]=r=>i.scrollTo("Accessibility"))},h(e.__("Accommodations")),3),n.examCreatorStore.forPractice?S("",!0):(f(),x("li",{key:2,ref:"security",class:re([{"ConfigurationsSideMenu__menu__item--selected":s.selectedMenuItem==="security"},"ConfigurationsSideMenu__menu__item"]),onClick:t[5]||(t[5]=r=>i.scrollTo("security"))},h(e.__("Cheat prevention")),3))])]),u("div",oc,[G(m(d,{label:e.__("Share"),theme:"dark",fullWidth:"",disabled:o.shouldDisableShareButton,onClick:t[6]||(t[6]=r=>e.$emit("clickedShare"))},null,8,["label","disabled"]),[[c,o.shouldDisableShareButton?e.__("You did not create this exam and therefore cannot share it."):""]])])])}const sc=W(Qd,[["render",nc],["__scopeId","data-v-30cdd340"]]),ac={class:"ResumeByNameDeprecatedModal__body"},ic={class:"ResumeByNameDeprecatedModal__title"},rc={class:"ResumeByNameDeprecatedModal__information-text"},lc={class:"ResumeByNameDeprecatedModal__information-text"},uc={class:"ResumeByNameDeprecatedModal__actions"},dc=Y({__name:"ResumeByNameDeprecatedModal",emits:["cancel","replace-resume-by-name-with-self-resume"],setup(e,{emit:t}){const o=t;return(n,s)=>(f(),T(at,{class:"ResumeByNameDeprecatedModal",size:"md"},{body:g(()=>[u("div",ac,[u("h2",ic,h(a(l)("Outdated feature")),1),u("p",rc,h(a(l)('This exam currently allows students to resume their exam by using their name, a feature that is no longer supported on Exam.net and has been replaced by "Student self-resume". Enabling this new setting will automatically disable the old one. Please note that this change is irreversible.')),1),u("p",lc,h(a(l)('We strongly recommend using the "Student self-resume" feature for a more streamlined experience.')),1),u("div",uc,[m(ve,{class:"ResumeByNameDeprecatedModal__action",label:a(l)("Cancel"),"data-dismiss":"modal",onClick:s[0]||(s[0]=i=>o("cancel"))},null,8,["label"]),m(he,{class:"ResumeByNameDeprecatedModal__action",label:a(l)("Enable student self-resume"),"data-dismiss":"modal",onClick:s[1]||(s[1]=i=>o("replace-resume-by-name-with-self-resume"))},null,8,["label"])])])]),_:1}))}}),cc=W(dc,[["__scopeId","data-v-bdd96556"]]),mc={class:"ConfigurationsGeneral"},fc={key:0},pc=2,hc=2880,_c=60,gc=Y({__name:"ConfigurationsGeneral",setup(e){const t=ue(),o=M(null),{isRestricted:n}=ut(),s=F(()=>t.started||!i.value&&n("automaticSubmissionTimer")),i=F({get:()=>t.automaticSubmissionTimer!==null,set:C=>{C?t.automaticSubmissionTimer===null&&(t.automaticSubmissionTimer=_c):t.automaticSubmissionTimer=null}}),d=[{label:l("No, only display the individual exam key"),value:"examKey"},{label:l("No, use a custom name"),value:"custom",manualInput:"when-selected"},{label:l("Yes, display the exam name"),value:"examName"}];oe(()=>t.forPractice,C=>{C&&t.setExamForPractice()}),oe(()=>t.studentSelfResume,C=>
3{if(C){if(t.resources.allowResumeByName){pe.static(o.value);return}t.enableStudentSelfResume()}});const c=F(()=>t.practiceBeta&&!t.studentSelfResume&&!t.automaticSubmissionTimer),r=F(()=>t.studentCount>0&&p.value?l("You cannot change this once the exam has started."):""),p=F(()=>t.isExternalClassroomConnected?!1:t.studentCount>0||t.isExternalClassroomConnected),_=F(()=>t.started?l("You cannot change this while the exam is open to students."):""),v=F(()=>i.value&&Number(t.automaticSubmissionTimer)%1!==0),w=F(()=>i.value&&Number(t.automaticSubmissionTimer)>hc),y=F(()=>i.value&&Number(t.automaticSubmissionTimer)<pc);return(C,k)=>{const E=j("ElCaption");return f(),x("div",mc,[m(kt,{title:a(l)("General")},{default:g(()=>[c.value?(f(),T(Oe,{key:0,modelValue:a(t).forPractice,"onUpdate:modelValue":k[0]||(k[0]=A=>a(t).forPractice=A),title:a(l)("Practice exam"),isBeta:""},{default:g(()=>[m(Ee,null,{default:g(()=>[I(h(a(l)("Practice exam where students and answers are not saved and where students can enter multiple times to practice. In this mode all security features are disabled.")),1)]),_:1}),m(E,{text:a(l)("The student only needs to enter the exam key to access the exam, and all security measures are disabled.")},null,8,["text"])]),_:1},8,["modelValue","title"])):S("",!0),a(t).forPractice?S("",!0):(f(),T(Oe,{key:1,modelValue:a(t).anonymous,"onUpdate:modelValue":k[1]||(k[1]=A=>a(t).anonymous=A),title:a(l)("Avidentifiera elevsvar (anonymisera)"),supportLink:a(ae)(a(se).anonymizeExam)},{default:g(()=>[m(Ee,null,{default:g(()=>[I(h(a(l)("Students' identities are replaced by unique codes, and you may reveal the identities after marking the exams.")),1)]),_:1})]),_:1},8,["modelValue","title","supportLink"])),a(t).forPractice?S("",!0):(f(),T(Oe,{key:2,modelValue:i.value,"onUpdate:modelValue":k[3]||(k[3]=A=>i.value=A),tooltip:_.value,disabled:s.value,showBasicLicenseLock:a(n)("automaticSubmissionTimer"),title:a(l)("Set a time limit"),supportLink:a(ae)(a(se).setTimeLimit)},{default:g(()=>[m(Ee,null,{default:g(()=>[I(h(a(l)("Pre-define how much time the students will have before being required to hand in the exam. Each timer is individual and the countdown starts when the student enters the exam. If the students re-enters the exam, the timer is reset.")),1)]),_:1}),i.value?(f(),x("div",fc,[m(Mt,{modelValue:a(t).automaticSubmissionTimer,"onUpdate:modelValue":k[2]||(k[2]=A=>a(t).automaticSubmissionTimer=A),disabled:a(t).started||a(n)("automaticSubmissionTimer"),type:"number",min:"1",class:"ConfigurationsGeneral__submission-timer","data-testid":"automatic-submission-timer"},null,8,["modelValue","disabled"]),I(" "+h(a(l)("minutes"))+" "+h(a(l)("after the student enters the exam")),1)])):S("",!0),v.value?(f(),T(Qt,{key:1,text:a(l)("The timer must be an integer."),class:"ConfigurationsGeneral__error-alert"},null,8,["text"])):S("",!0),y.value?(f(),T(Qt,{key:2,text:a(l)("The timer is too short. The minimum limit for a timer is 2 minutes."),class:"ConfigurationsGeneral__error-alert"},null,8,["text"])):S("",!0),w.value?(f(),T(Qt,{key:3,text:a(l)("The timer is too large. The maximum limit for a timer is 2880 minutes (2 days)."),class:"ConfigurationsGeneral__error-alert"},null,8,["text"])):S("",!0)]),_:1},8,["modelValue","tooltip","disabled","showBasicLicenseLock","title","supportLink"])),a(t).forPractice?S("",!0):(f(),T(Oe,{key:3,modelValue:a(t).studentSelfResume,"onUpdate:modelValue":k[5]||(k[5]=A=>a(t).studentSelfResume=A),tooltip:r.value,disabled:p.value,title:a(l)("Student self-resume"),supportLink:a(ae)(a(se).studentSelfResume),"data-testid":"student-self-resume-section"},{default:g(()=>[m(Ee,null,{default:g(()=>[I(h(a(l)("Enable students to resume their exams independently using an individual resume key sent to their email. They can continue the exam as long as access remains open. If you connect the exam to an LMS, students login to their account instead of using a resume key and they will not receive an email.")),1)]),_:1}),a(t).studentSelfResume&&!a(t).isExternalClassroomConnected?(f(),T(ki,{key:0,selected:a(t).studentExamNameSettings,"onUpdate:selected":k[4]||(k[4]=A=>a(t).studentExamNameSettings=A),class:"ConfigurationsGeneral__studentResumeEmailExamName",title:a(l)("Include exam name in email subject line?"),options:d,name:"studentResumeEmailExamName"},null,8,["selected","title"])):S("",!0),a(t).studentSelfResume?(f(),T(Je,{key:1,text:a(l)("Remember that students have access to resume the exam as long as it is o
3pen."),mode:"secondary"},null,8,["text"])):S("",!0)]),_:1},8,["modelValue","tooltip","disabled","title","supportLink"]))]),_:1},8,["title"]),(f(),T(qa,{to:"body"},[m(cc,{ref_key:"resumeByNameDeprecatedModal",ref:o,onCancel:k[6]||(k[6]=A=>a(t).studentSelfResume=!1),onReplaceResumeByNameWithSelfResume:a(t).enableStudentSelfResume},null,8,["onReplaceResumeByNameWithSelfResume"])]))])}}}),vc=W(gc,[["__scopeId","data-v-72edea49"]]),bc={style:{display:"flex"}},yc={style:{"margin-right":"40px"}},Sc=["textContent"],wc={key:0},xc={key:0,class:"collapseContent"},kc={key:1},Cc={class:"collapseContent"},Ec={class:"extensionLine"},Tc=Y({__name:"ElCollapseHeader",props:{title:{default:""},icon:{default:""},open:{type:Boolean,default:!1},optimize:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},boldTitle:{type:Boolean,default:!1},mediumTitle:{type:Boolean,default:!1},supportLink:{default:null}},setup(e){const t=e,o=M(null),n=M(!1);return xt(()=>{t.expand&&setTimeout(()=>{window.$("html, body").animate({scrollTop:window.$(o.value).offset().top-100},200)},300),t.open===!0&&(n.value=!0)}),(s,i)=>(f(),x("div",{ref_key:"elCollapseHeader",ref:o,class:"main"},[u("div",{class:"mainHeader",onClick:i[0]||(i[0]=d=>n.value=!n.value)},[m(os,{class:"expand-icon",isExpanded:n.value},null,8,["isExpanded"]),u("div",bc,[u("div",yc,[e.icon?(f(),x("i",{key:0,class:re(["fa ToolIcon","fa-"+e.icon])},null,2)):S("",!0),u("span",{class:re({boldTitle:e.boldTitle,mediumTitle:e.mediumTitle}),textContent:h(e.title)},null,10,Sc),e.supportLink?(f(),T(Go,{key:1,href:e.supportLink,style:{"margin-left":"var(--spacing-2)"}},null,8,["href"])):S("",!0)]),u("div",null,[Se(s.$slots,"icons",{},void 0,!0)])])]),m(us,{name:"slide-fade"},{default:g(()=>[e.optimize?(f(),x("div",wc,[n.value?(f(),x("div",xc,[Se(s.$slots,"default",{},void 0,!0)])):S("",!0)])):(f(),x("div",kc,[G(u("div",Cc,[Se(s.$slots,"default",{},void 0,!0)],512),[[ce,n.value]])]))]),_:3}),G(u("div",Ec,null,512),[[ce,n.value]])],512))}}),At=W(Tc,[["__scopeId","data-v-67d0a925"]]),Mc={class:"CustomAttributeName__body"},Ic=["textContent"],Ac={__name:"CustomAttributeNameModal",setup(e){const t=ue();return(o,n)=>{const s=j("ExamModal");return f(),T(s,{size:"md"},{title:g(()=>[u("h3",null,h(o.__("Configure field name")),1)]),body:g(()=>[u("div",null,[u("div",Mc,[m(_s,{modelValue:a(t).customAttributeName,"onUpdate:modelValue":n[0]||(n[0]=i=>a(t).customAttributeName=i),class:"CustomAttributeName__input",placeholder:o.__("Student number"),label:o.__("Namn på fältet (visas för eleven vid provstart)"),maxlength:60},null,8,["modelValue","placeholder","label"]),u("div",{class:"CustomAttributeName__warning-information",textContent:h(o.__("Keep in mind not to request any sensitive personal data, such as social security number, from students."))},null,8,Ic)])])]),footer:g(()=>[u("div",null,[m(he,{label:o.__("Ok"),"data-dismiss":"modal"},null,8,["label"])])]),_:1})}}},$c=W(Ac,[["__scopeId","data-v-47b04a5b"]]);var be=(e=>(e[e.None=0]="None",e[e.Initialized=2]="Initialized",e[e.Disconnected=4]="Disconnected",e[e.Aborted=8]="Aborted",e[e.Connected=16]="Connected",e))(be||{}),de=(e=>(e[e.GoogleClassroom=32]="GoogleClassroom",e[e.MicrosoftTeams=64]="MicrosoftTeams",e))(de||{});const Pc="Unsupported LMS";function Dc(e){switch(e){case 32:return"Google Classroom";case 64:return"Microsoft Teams";default:return Pc}}function Lt(e,t){return(e&t)===t}const Lc={key:0,class:"Lms__class_selection"},Fc=["src"],Nc={class:"Lms__class_selection__content"},Oc={"data-testid":"lms-connection-checkmark",class:"fa fa-check"},Bc={class:"Lms__class_selection__content__teacher"},Rc={class:"Lms__basic-license-lock Lms__basic-license-lock--class-selection"},Uc={class:"Lms__connect__logo"},zc={key:0,class:"fa fa-spin fa-spinner Lms__connect--in-progress","data-testid":"lms-connect-in-progress"},Vc=["src","alt"],Wc={key:0,class:"Lms__connect--in-progress"},qc={class:"Lms__basic-license-lock"},jc=Y({__name:"Lms",props:{courses:{},profile:{},service:{},status:{},showBasicLicenseLock:{type:Boolean}},emits:["connect","disconnect"],setup(e){const t=e,o=ue(),n=F(()=>t.profile),s=F(()=>t.courses),i=F(()=>
3t.status),d=Dc(t.service),c=F(()=>s.value.length===0),r=F(()=>Number(o.googleClassroomCourseID)!==0||Number(o.teamsClassId)!==0),p=F(()=>s.value.length===0?l("Inga kurser tillgängliga"):l("Select class in :service",{service:d})),_=l("Connect with :service",{service:d}),v=t.service===de.GoogleClassroom?"https://static.exam.net/img/google-classroom.svg":"https://exam.net/cdn/images/microsoft-teams.png",w=M(!1);oe(()=>o.teamsClassId,k=>Q(null,null,function*(){if(w.value=!1,!(!k||Number(k)===0||t.service!==de.MicrosoftTeams))try{const E=yield It.team(k);w.value=E.isArchived===!0}catch(E){}}));const y=F(()=>Lt(i.value,be.Initialized)),C=F(()=>Lt(i.value,be.Connected));return(k,E)=>{var A;return C.value?(f(),x("div",Lc,[u("div",{class:re(["Lms__class_selection__logo",{"Lms__class_selection__logo__google-classroom":e.service===a(de).GoogleClassroom,"Lms__class_selection__logo__microsoft-teams":e.service===a(de).MicrosoftTeams}])},[u("img",{src:a(v),width:"78",height:"70"},null,8,Fc)],2),u("div",Nc,[u("h3",null,[I(h(a(d))+" ",1),G(u("i",Oc,null,512),[[ce,r.value]])]),u("div",Bc,[I(h(a(l)("Connected as"))+" ",1),u("span",null,h((A=n.value)==null?void 0:A.displayName),1)]),G(u("div",{class:"Lms__class_selection__content__instruction"},h(a(l)("Please choose a class from the dropdown below to complete the connection.")),513),[[ce,!r.value]]),e.service===a(de).GoogleClassroom?(f(),T(gt,{key:0,modelValue:a(o).googleClassroomCourseID,"onUpdate:modelValue":E[0]||(E[0]=R=>a(o).googleClassroomCourseID=R),disabled:c.value,options:s.value,placeholder:p.value,optionLabel:"label",optionValue:"value",filter:"",autoFilterFocus:"",resetFilterOnHide:"",class:"Lms__select","data-testid":"classroom-course-select","data-selected-course-id":a(o).googleClassroomCourseID},null,8,["modelValue","disabled","options","placeholder","data-selected-course-id"])):S("",!0),e.service===a(de).MicrosoftTeams?(f(),T(gt,{key:1,modelValue:a(o).teamsClassId,"onUpdate:modelValue":E[1]||(E[1]=R=>a(o).teamsClassId=R),disabled:c.value,options:s.value,placeholder:p.value,optionLabel:"label",optionValue:"value",filter:"",autoFilterFocus:"",resetFilterOnHide:"",class:"Lms__select","data-testid":"teams-class-select","data-selected-course-id":a(o).teamsClassId},null,8,["modelValue","disabled","options","placeholder","data-selected-course-id"])):S("",!0),w.value?(f(),T(jo,{key:2,class:"Lms__archived-warning",mainText:a(l)("The selected team is archived in Microsoft Teams. To be able to export student data, you need to reset this state in Teams."),mode:"danger",onClose:E[2]||(E[2]=R=>w.value=!1)},null,8,["mainText"])):S("",!0),u("div",{class:"Lms__class_selection__content__remove-connection",onClick:E[3]||(E[3]=R=>k.$emit("disconnect"))},h(a(l)("Remove connection")),1)]),u("div",Rc,[e.showBasicLicenseLock?(f(),T(Bt,{key:0,size:"large"})):S("",!0)])])):(f(),x("button",{key:1,class:re(["Lms__connect",{"Lms__connect--in-progress":y.value}]),onClick:E[7]||(E[7]=R=>k.$emit("connect",e.service))},[u("span",Uc,[y.value?(f(),x("i",zc)):(f(),x("img",{key:1,width:"40",height:"40",src:a(v),alt:a(d),onClick:E[4]||(E[4]=R=>k.$emit("connect",e.service))},null,8,Vc))]),y.value?(f(),x("span",Wc,h(a(l)("Connecting...")),1)):S("",!0),y.value?(f(),T(Ot,{key:1,label:a(l)("Cancel"),class:"Lms__connect__cancel",onClick:E[5]||(E[5]=ls(R=>k.$emit("disconnect"),["stop"]))},null,8,["label"])):(f(),x("span",{key:2,class:"Lms__connect__label",onClick:E[6]||(E[6]=R=>k.$emit("connect",e.service))},h(a(_)),1)),u("div",qc,[e.showBasicLicenseLock?(f(),T(Bt,{key:0,size:"large",class:"Lms__basic-license-lock"})):S("",!0)])],2))}}}),Sn=W(jc,[["__scopeId","data-v-a23cfa3e"]]),Hc={class:"ExternalClassroom"},Gc=["href"],Zc={class:"ExternalClassroom__info"},Yc=Y({__name:"ExternalClassroom",setup(e){const t=ue(),{showDialog:o,bookingUrl:n,requiresLicenseUpgrade:s,isRestricted:i}=ut(),d=M(be.None),c=M([]),r=M(),p=M(!0),_=F(()=>l('To resume an exam, students are by default required to use an individual exam key. If students should be allowed to resume without an individual exam key, ":selfResumeSettingName" needs to be enabled above.',{selfResumeSettingName:l("Student self-resume")})),v=F(()=>Lt(d.value,be.Initialized)),w=F(()=>B(de.MicrosoftTeams)),y=F(()=>B(de.GoogleClassroom)),C=N=>Q(null,null,function*(){if(v.value===!0)return;d.value|=be.Initialized;const $=q=>Q(null,null,function*(){yield q(),d.value!==be.Aborted&&(d.value|=be.Connected,d.value&=~be.Initialized)});switch(N){case de.GoogleClassroom:$(k);break;case de.MicrosoftTeams:$(E);break}}),k=()=>Q(null,null,function*(){d.value|=de.GoogleClassroom,yield Wt.teacherLogin(["profile","https://www.googleapis.com/auth/classroom.rosters.readonly","https://www.googleapis.com/auth/classroom.courses.readonly"]);const N=yield Wt.getProfile();r.value={displayName:N.data.name.fullName};const $=((yield Wt.courses())||[]).map(q=>({value:q.id,label:A(q)}));R($)}),E=()=>Q(null,null,function*(){d.value|=de.MicrosoftTeams,yield It.login(["EduRoster.ReadBasic","EduAssignments.ReadWrite","Channel.ReadBasic.All","ChannelMessage.Send","Team.ReadBasic.All"]);const N=yield It.profile();r.value={displayName:N.displayName};const q=((yield It.taughtClasses(N.id))||[]).map(H=>({value:H.id,label:H.displayName}));R(q)});xt(()=>{t.isExternalClassroomConnected&&(t.isGoogleClassroomConnected&&C(de.GoogleClassroom),t.isMicrosoftTeamsConnected&&C(de.MicrosoftTeams))}),oe(()=>t.forPractice,N=>{N&&L()});function A(N){var q;const $=(q=N.section)==null?void 0:q.trim();return $?`${N.name} (${$})`:N.name}function R(N){c.value=N}function B(N){if(d.value===be.None||d.value===be.Aborted||d.value===be.Disconnected)return!0;const $=N===de.GoogleClassroom?de.MicrosoftTeams:de.GoogleClassroom;return X(N)&&(d.value&$)!==$}function X(N){return Lt(d.value,N)}function O(N=be.None){d.value=N,c.value=[],r.value=null}function L(){return Q(this,null,function*(){if(d.value!==be.None){if(v.value===!0){O(be.Aborted);return}yield D().then(()=>{O(be.Disconnected)})}})}function D(){return Q(this,null,function*(){X(de.GoogleClassroom)&&(t.googleClassroomCourseID=0,yield st.delete("/api/google-classroom/teacher-connection"),Wt.logout()),X(de.MicrosoftTeams)&&(yield st.delete("/api/teams/teacher/connection"),t.teamsClassId=0,It.logout())})}return(N,$)=>(f(),x("div",Hc,[u("a",{href:a(l)("https://support.exam.net/s/article/connect-an-exam
3-to-lms-google-classroom-or-microsoft-teams-for-education?language=en_US"),target:"_blank",rel:"noopener"},h(a(l)("Learn how it works")),9,Gc),u("div",Zc,h(a(l)("The student will enter the exam by signing in with their LMS account."))+" "+h(a(l)("Only students in the selected class or group will be able to take the exam.")),1),a(Lt)(d.value,a(be).Connected)&&p.value?(f(),T(jo,{key:0,class:"ExternalClassroom__alert",mainText:_.value,mode:"info",onClose:$[0]||($[0]=q=>p.value=!1)},{icon:g(()=>[m(_e,{svg:a(ya),width:"var(--width-8)",color:"var(--blue-600)"},null,8,["svg"])]),_:1},8,["mainText"])):S("",!0),y.value?(f(),T(Sn,{key:1,service:a(de).GoogleClassroom,profile:r.value,courses:c.value,status:d.value,showBasicLicenseLock:a(i)("externalClassroom"),onDisconnect:L,onConnect:$[1]||($[1]=q=>{a(s)("externalClassroom")||C(q)})},null,8,["service","profile","courses","status","showBasicLicenseLock"])):S("",!0),w.value?(f(),T(Sn,{key:2,service:a(de).MicrosoftTeams,courses:c.value,profile:r.value,status:d.value,showBasicLicenseLock:a(i)("externalClassroom"),onDisconnect:L,onConnect:$[2]||($[2]=q=>{a(s)("externalClassroom")||C(q)})},null,8,["service","courses","profile","status","showBasicLicenseLock"])):S("",!0),m(Ro,{visible:a(o),"onUpdate:visible":$[3]||($[3]=q=>qo(o)?o.value=q:null),url:a(n)},null,8,["visible","url"])]))}}),Jc=W(Yc,[["__scopeId","data-v-7983bc49"]]);function Qc(e){return Cs(e).valid}function Kc(e){const t=[],o=/^[^\s@.]+(\.[^\s@.]+)+$/;return e.split(/[\n;,\s]+/).forEach(n=>{const s=n.trim().toLowerCase();if(!s)return;const i=s.slice(s.lastIndexOf("@")+1);o.test(i)&&!t.includes(i)&&t.push(i)}),t}function Cs(e){const t=[],o=[],n=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return e.split(/[\n;,]/).forEach(s=>{const i=s.trim();if(!i)return;const d=[];i.split(/\s+/).forEach(c=>{const r=c.match(/<([^>]+)>/),p=r?r[1].trim():c;n.test(p)&&d.push(p.toLowerCase())}),d.length>0?d.forEach(c=>{t.includes(c)||t.push(c)}):o.includes(i)||o.push(i)}),{valid:t,invalid:o}}const Xc={name:"ConfigurationsStudentInformation",components:{ConfigurationsSection:kt,ConfigurationsSubSection:Oe,ConfigurationsBodyText:Ee,Checkbox:io,Message:it,RadioButton:Po,IconSVG:_e,PrimaryButton:he,SecondaryButton:ve,ToggleButton:le,ElCaption:ne,ElHeader:Fe,ElCollapseHeader:At,CustomAttributeNameModal:$c,ExternalClassroom:Jc},setup(){const e=ue(),t=lt(),o=is(),n=dt(),s=Sa();return{examCreatorStore:e,teacherStore:t,alphaFeaturesStore:o,supportLinks:se,resolveSupportLink:ae,toast:n,confirm:s,exclamationTriangle:mi}},data(){return{allowedEntriesInput:""}},computed:{shouldShowAllowResumeByName(){return to(this.teacherStore.currentTeacher,"shouldShowAllowResumeByName")?!0:!this.examCreatorStore.studentSelfResume&&this.examCreatorStore.resources.allowResumeByName},customAttributeName(){return this.examCreatorStore.customAttributeName||this.__("Student number")},emailLockedByPresets(){return cs(this.examCreatorStore.accessibilityPresets)},schoolForcedFields(){var e;return((e=this.examCreatorStore.schoolSettings)==null?void 0:e.requiredStudentInformation)==="nameAndEmail"?["firstName","lastName","email"]:[]},missingSchoolForcedFields(){return this.schoolForcedFields.filter(e=>!this.examCreatorStore.requiredStudentInformation.includes(e))},allowedEmailMode:{get(){return this.examCreatorStore.backendSettings.allowedEmailMode==="domains"?"domains":"emails"},set(e){this.examCreatorStore.backendSettings.allowedEmailMode=e,this.allowedEntriesInput=""}},matchesDomain(){return this.allowedEmailMode==="domains"},modeCopy(){return this.matchesDomain?{description:this.__("The students have to enter an email address ending with one of these domains to start the exam."),placeholder:this.__("@school.com, @school2.com, ..."),addTooltip:this.__("Add domains"),clearTooltip:this.__("Delete all added domains")}:{description:this.__("The students have to enter one of these to start the exam."),placeholder:this.__("Paste emails here"),addTooltip:this.__("Add emails"),clearTooltip:this.__("Delete all added email addresses")}},allowedEntries(){const e=this.examCreatorStore.backendSettings;return(this.matchesDomain?e.allowedEmailDomains:e.allowedEmails)||[]},showsEnforcementWarning(){return this.allowedEntries.length>0&&!this.examCreatorStore.requiredStudentInformation.includes("email")},allowedCountLabel(){const e=this.allowedEntries.length;return this.matchesDomain?e===1?this.__(":count domain allowed",{count:e}):this.__(":count domains allowed",{count:e}):e===1?this.__(":count email allowed",{count:e}):this.__(":count emails allowed",{count:e})}},watch:{emailLockedByPresets:{immediate:!0,handler(e){e&&this.requireEmailInformation()}},missingSchoolForcedFields:{immediate:!0,handler(e){e.length!==0&&(this.examCreatorStore.requiredStudentInformation.push(...e),this.toast.add({severity:"info",summary:this.__("Your school requires first name, last name and email. The
3se were added to this exam.")}))}},"examCreatorStore.focusError"(e){e==="studentInformation"&&this.$nextTick(()=>{const o=this.$refs.requiredStudentInformation.$el.getBoundingClientRect().top+window.pageYOffset+-164;window.scrollTo({top:o}),this.examCreatorStore.focusError=""})}},created(){this.CHOSEN_INFO_OPTIONS=[{value:"firstName",label:this.__("First name")},{value:"lastName",label:this.__("Last name")},{value:"email",label:this.__("Email")},{value:"class",label:this.__("Class")},{value:"teacher",label:this.__("Teacher name")},{value:"phone",label:this.__("Phone number")},{value:"studentId",label:this.__("Student number")}]},methods:{checkboxTooltip(e){return e==="email"&&this.examCreatorStore.studentSelfResume?this.__("While student self-resume is activated, an email or LMS account is necessary as identification when re-entering the exam."):e==="email"&&this.emailLockedByPresets?this.__("Required because accommodation exceptions match students by email."):this.schoolForcedFields.includes(e)?this.__("Your school requires this information for all exams."):""},updateRequiredInformation(e){if(this.examCreatorStore.requiredStudentInformation.includes("email")&&!e.includes("email")&&this.allowedEntries.length>0){this.confirm.require({header:this.__("Turn off required email?"),message:this.__("The allowed list checks the email students enter. If email is not required, students enter none, and your list is kept but not checked."),acceptLabel:this.__("Turn off email"),rejectLabel:this.__("Keep email required"),accept:()=>{this.examCreatorStore.requiredStudentInformation=e}});return}this.examCreatorStore.requiredStudentInformation=e},requireEmailInformation(){this.examCreatorStore.requiredStudentInformation.includes("email")||(this.examCreatorStore.requiredStudentInformation.push("email"),this.toast.add({severity:"info",summary:this.__("Email is now required student information â the setting has been turned on.")}))},entryLabel(e){return this.matchesDomain?`@${e}`:e},setAllowedEntries(e){this.matchesDomain?this.examCreatorStore.backendSettings.allowedEmailDomains=e:this.examCreatorStore.backendSettings.allowedEmails=e},removeAllAllowedEntries(){this.setAllowedEntries([])},removeAllowedEntry(e){this.setAllowedEntries(this.allowedEntries.filter(t=>t!==e))},updateAllowedEntries(){const e=this.matchesDomain?Kc(this.allowedEntriesInput):Qc(this.allowedEntriesInput),t=[...this.allowedEntries];for(const o of e)t.includes(o)||t.push(o);t.sort((o,n)=>o.localeCompare(n)),this.setAllowedEntries(t),t.length>0&&this.requireEmailInformation()},showDefineAllowedEmailsModal(){pe.show(this.$refs.defineAllowedEmails)},showDefineStudentIdFieldName(){pe.show(this.$refs.customAttributeNameModal)}}},em={class:"ConfigurationsStudentInformation"},tm={class:"ConfigurationsStudentInformation__student-information"},om={class:"ConfigurationsStudentInformation__student-information__required-information-container"},nm={key:0,class:"ConfigurationsStudentInformation__student-information__link-container"},sm={key:0,class:"ConfigurationsStudentInformation__student-information__allowed-count"},am={key:1},im={class:"ConfigurationsStudentInformation__student-information__link-container"},rm={key:0,class:"ConfigurationsStudentInformation__student-information__error"},lm={class:"icons"},um={key:0,class:"ConfigurationsStudentInformation__student-information__advanced__warning-icon fa fa-exclamation-triangle"},dm={class:"ConfigurationsStudentInformation__student-information__link-container ConfigurationsStudentInformation__student-information__link-container--lms"},cm={key:0,class:"ConfigurationsStudentInformation__student-information__allowed-count"},mm={class:"allowedEmailsMode"},fm={class:"allowedEmailsMode__legend"},pm={class:"allowedEmailsMode__options"},hm={class:"allowedEmailsMode__option"},_m={class:"allowedEmailsMode__option"},gm={class:"text-center"},vm={style:{display:"flex"}},bm=["placeholder"],ym={class:"allowedEmailsArea"},Sm={class:"allowedEmailsList"},wm=["onClick"],xm={class:"clearAllowedEmailsList"};function km(e,t,o,n,s,i){const d=j("ExternalClassroom"),c=j("ConfigurationsSubSection"),r=j("ConfigurationsBodyText"),p=j("Checkbox"),_=j("IconSVG"),v=j("Message"),w=j("ElHeader"),y=j("ElCaption"),C=j("ToggleButton"),k=j("ElCollapseHeader"),E=j("ConfigurationsSection"),A=j("CustomAttributeNameModal"),R=j("RadioButton"),B=j("SecondaryButton"),X=j("PrimaryButton"),O=j("ExamModal"),L=we("tooltip");return f(),x("div",em,[m(E,{title:e.__("Student information")},{default:g(()=>[m(c,{title:e.__("Connect exam with an LMS tool"),supportLink:n.resolveSupportLink(n.supportLinks.connectLms)},{default:g(()=>[m(d,{ref:"externalClassroom"},null,512)]),_:1},8,["title","supportLink"]),G(m(c,{title:e.__("Student information"),supportLink:n.resolveSupportLink(n.supportLinks.studentInformation)},{default:g(()=>[G(u("div",tm,[m(r,{ref:"requiredStudentInformation"},{default:g(()=>[I(h(e.__("Tick what information the students have to provide before starting the exam.")),1)]),_:1},512),u("div",om,[(f(!0),x(me,null,Pe(e.CHOSEN_INFO_OPTIONS,D=>{var N;return f(),x("div",{key:D.value,class:"ConfigurationsStudentInformation__student-information__required-information__choice"},[m(p,{modelValue:n.examCreatorStore.requiredStudentInformation,tooltip:i.checkboxTooltip(D.value),label:D.value==="studentId"?i.customAttributeName:D.label,value:D.value,disabled:(n.examCreatorStore.studentSelfResume||i.emailLockedByPresets)&&D.value==="email"||i.schoolForcedFields.includes(D.value),"onUpdate:modelValue":i.updateRequiredInformation},null,8,["modelValue","tooltip","label","value","disabled","onUpdate:modelValue"]),D.value==="email"?(f(),x("div",nm,[u("span",{class:"ConfigurationsStudentInformation__student-information__allowed-emails-link",onClick:t[0]||(t[0]=(...$)=>i.showDefineAllowedEmailsModal&&i.showDefineAllowedEmailsModal(...$))}
3,h(e.__("Configure allowed emails/domains")),1),i.allowedEntries.length>0?(f(),x("span",sm," ("+h(i.allowedCountLabel)+")",1)):S("",!0),i.showsEnforcementWarning?(f(),T(v,{key:1,severity:"warn",variant:"simple",size:"small"},{icon:g(()=>[m(_,{svg:n.exclamationTriangle,width:"var(--width-4)",fill:"var(--yellow-600)"},null,8,["svg"])]),default:g(()=>[I(" "+h(e.__("Not checked unless email is required."))+" ",1),u("button",{type:"button",class:"ConfigurationsStudentInformation__student-information__require-email-link",onClick:t[1]||(t[1]=(...$)=>i.requireEmailInformation&&i.requireEmailInformation(...$))},h(e.__("Require email")),1)]),_:1})):S("",!0)])):S("",!0),D.value==="studentId"&&((N=n.examCreatorStore.schoolSettings)==null?void 0:N.customAttribute)!=="deny"?(f(),x("div",am,[u("div",im,[u("span",{class:"ConfigurationsStudentInformation__student-information__allowed-emails-link",onClick:t[2]||(t[2]=(...$)=>i.showDefineStudentIdFieldName&&i.showDefineStudentIdFieldName(...$))},h(e.__("Configure field name")),1)])])):S("",!0)])}),128))]),n.examCreatorStore.errors.invalidStudentInformation?(f(),x("div",rm,h(e.__("The student must state either name or email in order to be identified.")),1)):S("",!0)],512),[[ce,n.examCreatorStore.isExternalClassroomConnected===!1]]),i.shouldShowAllowResumeByName?(f(),T(k,{key:0,title:e.__("Advanced")},{icons:g(()=>[u("div",lm,[n.examCreatorStore.resources.allowResumeByName?(f(),x("i",um)):S("",!0)])]),default:g(()=>[m(w,null,{default:g(()=>[I(h(e.__("Allow simplified resume of an exam, see below")),1)]),_:1}),m(y,{class:"ConfigurationsStudentInformation__student-information__advanced__warning-information"},{default:g(()=>[I(h(e.__("In order to resume an exam, an individual exam key is normally required. This ensures that students cannot resume another student's exam.")),1)]),_:1}),m(y,{class:"ConfigurationsStudentInformation__student-information__advanced__warning-information"},{default:g(()=>[I(h(e.__("By activating this function, a student will be able to resume an exam by simply entering the same name again.")),1)]),_:1}),m(y,{class:"ConfigurationsStudentInformation__student-information__advanced__warning-information"},{default:g(()=>[I(h(e.__("We recommend to only use this function for exams where the students don't produce anything, e.g. for mathematical tools during classes.")),1)]),_:1}),m(C,{modelValue:n.examCreatorStore.resources.allowResumeByName,"onUpdate:modelValue":t[3]||(t[3]=D=>n.examCreatorStore.resources.allowResumeByName=D)},null,8,["modelValue"])]),_:1},8,["title"])):S("",!0)]),_:1},8,["title","supportLink"]),[[ce,n.examCreatorStore.isExternalClassroomConnected===!1]]),G(m(c,null,{default:g(()=>[u("div",dm,[u("span",{class:"ConfigurationsStudentInformation__student-information__allowed-emails-link",onClick:t[4]||(t[4]=(...D)=>i.showDefineAllowedEmailsModal&&i.showDefineAllowedEmailsModal(...D))},h(e.__("Configure allowed emails/domains")),1),i.allowedEntries.length>0?(f(),x("span",cm," ("+h(i.allowedCountLabel)+")",1)):S("",!0)])]),_:1},512),[[ce,n.examCreatorStore.isExternalClassroomConnected]])]),_:1},8,["title"]),m(A,{ref:"customAttributeNameModal"},null,512),m(O,{ref:"defineAllowedEmails",size:"lg"},{title:g(()=>[u("h3",null,h(e.__("Enter allowed emails or domains")),1)]),body:g(()=>[u("div",null,[u("fieldset",mm,[u("legend",fm,h(e.__("Match students by")),1),u("div",pm,[u("label",hm,[m(R,{modelValue:i.allowedEmailMode,"onUpdate:modelValue":t[5]||(t[5]=D=>i.allowedEmailMode=D),name:"allowedEmailMode",value:"emails"},null,8,["modelValue"]),I(" "+h(e.__("Email addresses")),1)]),u("label",_m,[m(R,{modelValue:i.allowedEmailMode,"onUpdate:modelValue":t[6]||(t[6]=D=>i.allowedEmailMode=D),name:"allowedEmailMode",value:"domains"},null,8,["modelValue"]),I(" "+h(e.__("Email domains")),1)])])]),u("p",gm,h(i.modeCopy.description),1),u("div",vm,[G(u("textarea",{"onUpdate:modelValue":t[7]||(t[7]=D=>s.allowedEntriesInput=D),rows:"15",name:"allowedEmailsInputArea",class:"allowedEmailsInputArea",placeholder:i.modeCopy.placeholder},null,8,bm),[[ja,s.allowedEntriesInput]]),u("div",null,[G(u("i",{class:"addAllowedEmailsArrow fa fa-arrow-right",onClick:t[8]||(t[8]=(...D)=>i.updateAllowedEntries&&i.updateAllowedEntries(...D))},null,512),[[L,i.modeCopy.addTooltip]])]),u("div",ym,[u("div",Sm,[(f(!0),x(me,null,Pe(i.allowedEntries,D=>(f(),x("div",{key:D,style:{display:"flex","align-items":"center"}},[u("i",{class:"fa fa-times-circle-o",onClick:N=>i.removeAllowedEntry(D)},null,8,wm),I(" "+h(i.entryLabel(D)),1)]))),128))]),u("div",xm,[i.allowedEntries.length!==0?G((f(),T(B,{key:0,severity:"danger",label:e.__("Clear"),onClick:i.removeAllAllowedEntries},null,8,["label","onClick"])),[[L,i.modeCopy.clearTooltip]]):S("",!0)])])])])]),footer:g(()=>[u("div",null,[m(X,{label:e.__("Ok"),"data-dismiss":"modal"},null,8,["label"])])]),_:1},512)])}const Cm=W(Xc,[["render",km],["__scopeId","data-v-d2c8dfeb"]]),bo={validSize(e){return e.size<=3e8},validExtension(e){return!!(new _n(e).hasExtension("mp3")||new _n(e).hasExtension("wav"))},upload(e,t){return Qe.upload(e,`${Uo.randomString(30)}/file.mp3`,t,{cacheControl:"public, max-age=31536000"})}},Em=Y({__name:"ToolHeader",props:{supportLink:{default:null}},setup(e){return(t,o)=>(f(),T(Pt,{size:"large",class:"ToolHeader"},{default:g(()=>[Se(t.$slots,"default",{},void 0,!0),e.supportLink?(f(),T(Go,{key:0,href:e.supportLink},null,8,["href"])):S("",!0)]),_:3}))}}),ye=W(Em,[["__scopeId","data-v-f8dcbbda"]]),Tm={components:{PrimaryButton:he,SecondaryButton:ve},props:{bucket:{type:String,required:!0}},emits:["update","undo"],setup(){return{toast:dt()}},data(){return{Modal:pe,text:"",previousOverflowValue:"",show:!1}},watch:{show(){ys.run(".WriteAreaTemplate")}},mounted(){nt.$on("show-write-area-template",()=>{this.previousOverflowValue=document.body.style.overflow,document.body.style.overflow="hidden",this.show=!0}),nt.$on("set-template",e=>{this.text=fs(e)})},methods:{imageUploader(e){return Q(this,null,function*(){if(!Vo.valid(e)){this.toast.add({severity:"error",summary:this.__("Only image files can be added")});return}try{return yield Qe.uploadCached(this.bucket,e)}catch(t){}})},save(){this.close(),this.$emit("update",this.text)},undo(){this.$emit("undo"),this.close()},undoConfirm(){if(!this.text||this.text.length===0){this.undo();return}pe.show(this.$refs.undoModal)},close(){this.show=!1,document.body.style.overflow=this.previousOverflowValue}}},Mm={class:"write-content WriteAreaTemplate"},Im={ref:"contentArea",class:"write-content__body"},Am={class:"write-content__footer"},$m={class:"write-content__footer__wrapper"},Pm={class:"write-content__footer__group"},Dm={class:"modal-title"},Lm={class:"text-center",style:{display:"flex","flex-direction":"column","justify-content":"space-around","align-items":"center"}},Fm={style:{display:"flex","flex-direction":"row","justify-content":"space-around","align-items":"center"}};function Nm(e,t,o,n,s,i){const d=j("FroalaEditor"),c=j("PrimaryButton"),r=j("SecondaryButton"),p=j("ExamModal");return G((f(),x("div",Mm,[u("div",Im,[m(d,{ref:"froalaEditor",modelValue:s.text,"onUpdate:modelValue":t[0]||(t[0]=_=>s.text=_),iconsTemplate:"font_awesome",placeholderText:e.__("Students start with this content in their writing area"),pasteProtection:!1,math:"",katex:"",safariKatexBugFix:"",reRenderEqOnNoChangeUpdate:"",table:"",print:"",color:"",image:"",indent:!1,"font-size":"","font-family":"",lineHeight:"",heightMin:"600px",heightMax:"Calc(100vh - 170px)",skeuomorphism:"",wordCount:!1,focus:"",zIndex:9999,maximize:!1,onImageUploader:i.imageUploader},null,8,["modelValue","placeholderText","onImageUploader"])],512),u("div",Am,[u("div",$m,[u("div",Pm,[m(c,{label:"Ok",style:{"margin-right":"10px"},onClick:i.save},null,8,["onClick"]),m(r,{label:e.__("Cancel and close"),onClick:i.undoConfirm},null,8,["label","onClick"])])]),m(p,{ref:"undoModal",size:"sm"},{title:g(()=>[u("h3",Dm,h(e.__("Cancel and close")),1)]),body:g(()=>[u("div",Lm,h(e.__("Are you sure you wish to undo the edit of the content?")),1)]),footer:g(()=>[u("div",Fm,[m(r,{"data-dismiss":"modal",label:e.__("No")},null,8,["label"]),m(c,{"data-dismiss":"modal",label:e.__("Yes, undo"),onClick:i.undo},null,8,["label","onClick"])])]),_:1},512)])],512)),[[ce,s.show]])}const Om=W(Tm,[["render",Nm],["__scopeId","data-v-83d0ff4d"]]);function wn(e,t="|"){return e.map(o=>Ms(o)).join(t)}function Lo(e,t){return typeof t=="bigint"?t.toString():t}function Bm(e){return e==null}function Yo(e){const t=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(t,o)}function Rm(e,t){const o=e/t,n=Math.round(o),s=4*Number.EPSILON*Math.max(Math.abs(o),1);return Math.abs(o-n)<s?0:o-n}function Jo(e,t,o){Object.defineProperty(e,t,{value:o,writable:!0,enumerable:!0,configurable:!0})}function Um(...e){const t={};for(const o of e){const n=Object.getOwnPropertyDescriptors(o);Object.assign(t,n)}return Object.defineProperties({},t)}const Es="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function xn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Fo(e){if(xn(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const o=t.prototype;return!(xn(o)===!1||Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)}function Ts(e){return Fo(e)?z({},e):Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function zm(e,t,o){const n=new e._zod.constr(t!=null?t:e._zod.def);return(!t||o!=null&&o.parent)&&(n._zod.parent=e),n}function Me(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?ee(z({},t),{error:()=>t.error}):t}function Ms(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}const Vm={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function vt(e,t=0){var o;if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(((o=e.issues[n])==null?void 0:o.continue)!==!0)return!0;return!1}function Wm(e,t=0){var o;if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(((o=e.issues[n])==null?void 0:o.continue)===!1)return!0;return!1}function qm(e,t){return t.map(o=>{var s;var n;return(s=(n=o).path)!=null||(n.path=[]),o.path.unshift(e),o})}function Tt(e){return typeof e=="string"?e:e==null?void 0:e.message}function kn(e,t,o){var s;var n;for(let i=t;i<e.length;i++)(s=(n=e[i]).schema)!=null||(n.schema=o)}function Ct(e,t,o){var w,y,C,k,E,A,R,B,X,O,L,D,N,$,q,H,$e;var n;const s=(y=(w=e.inst)==null?void 0:w._zod)==null?void 0:y.traits;s!=null&&s.has("$ZodType")&&(s.has("$ZodCheck")?(C=(n=e).schema)!=null||(n.schema=e.inst):e.schema=e.inst);const i=e.schema!==e.inst?(E=(k=e.schema)==null?void 0:k._zod.def)==null?void 0:E.error:void 0,d=e.message?e.message:(H=(q=(N=(L=(X=Tt((B=(R=(A=e.inst)==null?void 0:A._zod.def)==null?void 0:R.error)==null?void 0:B.call(R,e)))!=null?X:Tt(i==null?void 0:i(e)))!=null?L:Tt((O=t==null?void 0:t.error)==null?void 0:O.call(t,e)))!=null?N:Tt((D=o.customError)==null?void 0:D.call(o,e)))!=null?q:Tt(($=o.localeError)==null?void 0:$.call(o,e)))!=null?H:"Invalid input",xe=e,{inst:c,schema:r,continue:p,input:_}=xe,v=cn(xe,["inst","schema","continue","input"]);return($e=v.path)!=null||(v.path=[]),v.message=d,t!=null&&t.reportInput&&(v.input=_),v}const jm=/[\uD800-\uDBFF]/;function Qo(e){const t=e.length;if(!jm.test(e))return t;let o=t;for(let n=0;n<t-1;
3n++)(e.charCodeAt(n)&64512)===55296&&(e.charCodeAt(n+1)&64512)===56320&&(o--,n++);return o}function Ko(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Hm(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const o=e;if(o&&Object.getPrototypeOf(o)!==Object.prototype&&"constructor"in o&&o.constructor)return o.constructor.name}}return t}function Rt(...e){const[t,o,n]=e;return typeof t=="string"?{message:t,code:"custom",input:o,inst:n}:z({},t)}function Gm(e,t){for(const o in t){const n=Object.getOwnPropertyDescriptor(t,o);n.get?Object.defineProperty(e,o,ee(z({},n),{enumerable:!1})):Zm(e,o,n.value)}}function St(e,t,o,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:o}),o}function Is(e,t,o){return St(e,t,o,!1)}function Zm(e,t,o){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?o:St(this,t,o.bind(this))},set(n){St(this,t,n)}})}let yo,Ze=!1;const Ym={configurable:!0,get(){Ze=!0}};function ie(e,t,o){const n=Object.getPrototypeOf(e._zod);if(t in n&&yo!==e._zod){yo=void 0;return}yo=e._zod,Object.defineProperty(n,t,{configurable:!0,get(){Object.defineProperty(this,t,Ym);const s=Ze;Ze=!1;try{const i=o(this);return Ze?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),Ze=Ze||s,i}catch(i){throw delete this[t],Ze=Ze||s,i}},set(s){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:s})}})}const Jm="~constantCatch";function Qm(e){const t=()=>e;return t[Jm]=!0,t}var Cn;const So={value:void 0,enumerable:!1};let En="captureStackTrace"in Error?Error:null;function Km(e){const t=En;if(t){const o=t.stackTraceLimit;if(typeof o=="number"){try{t.stackTraceLimit=0}catch(n){return En=null,new e}try{return new e}finally{t.stackTraceLimit=o}}}return new e}function K(e,t,o,n){var w;const s={};function i(y){this.def=y,this.constr=v,this.traits=new Set}i.prototype=s;const d=o,c=d&&new WeakSet;function r(y,C){if(!y._zod){So.value=new i(C);try{Object.defineProperty(y,"_zod",So)}finally{So.value=void 0}}if(y._zod.traits.has(e))return;if(y._zod.traits.add(e),t(y,C),c){const E=Object.getPrototypeOf(y),A=y._zod.constr.prototype;let R=E;for(;R&&R!==A;)R=Object.getPrototypeOf(R);const B=R!=null?R:E;c.has(B)||(c.add(B),Gm(B,d))}const k=v.prototype;for(const E in k)Object.prototype.hasOwnProperty.call(k,E)&&(E in y||(y[E]=k[E].bind(y)))}const p=(w=n==null?void 0:n.Parent)!=null?w:Object;class _ extends p{}Object.defineProperty(_,"name",{value:e});function v(y){var A;const C=n!=null&&n.Parent?Km(_):this;r(C,y);const k=C._zod.deferred;if(k){for(const R of k)R();C._zod.deferred=void 0}const E=(A=globalThis.__zod_globalConfig)==null?void 0:A.postProcessor;return E&&E(C),C}return Object.defineProperty(v,"init",{value:r}),Object.defineProperty(v,Symbol.hasInstance,{value:y=>{var C,k;return n!=null&&n.Parent&&y instanceof n.Parent?!0:(k=(C=y==null?void 0:y._zod)==null?void 0:C.traits)==null?void 0:k.has(e)}}),Object.defineProperty(v,"name",{value:e}),v}class bt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class As extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}var es;(es=(Cn=globalThis).__zod_globalConfig)!=null||(Cn.__zod_globalConfig={});const wt=globalThis.__zod_globalConfig;function Ke(e){return e&&Object.assign(wt,e),wt}function Xm(){var t;const e=this._zod;return(t=e.message)!=null||(e.message=JSON.stringify(e.def,Lo,2)),e.message}function ef(e){this._zod.message=e}const tf={get:Xm,set:ef,enumerable:!0,configurable:!0},wo={value:void 0,enumerable:!1},xo={value:void 0,enumerable:!1},Tn=new WeakSet([Object.prototype,Error.prototype]),$s=(e,t)=>{e.name="$ZodError",wo.value=e._zod,Object.defineProperty(e,"_zod",wo),xo.value=t,Object.defineProperty(e,"issues",xo),wo.value=void 0,xo.value=void 0,Object.defineProperty(e,"message",tf);const o=Object.getPrototypeOf(e);Tn.has(o)||(Tn.add(o),Object.defineProperty(o,"toString",{configurable:!0,enumerable:!1,get(){const n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0})}}))},Ps=K("$ZodError",$s),Ds=K("$ZodError",$s,void 0,{Parent:Error});function of(e,t,o){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:o(),writable:!0,enumerable:!0,configurable:!0}):e[t]=o()),e[t]}
3function nf(e,t=o=>o.message){const o={},n=[];for(const s of e.issues)s.path.length>0?of(o,s.path[0],()=>[]).push(t(s)):n.push(t(s));return{formErrors:n,fieldErrors:o}}function sf(e,t=o=>o.message){const o={_errors:[]},n=(s,i=[])=>{for(const d of s.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(c=>n({issues:c},[...i,...d.path]));else if(d.code==="invalid_key")n({issues:d.issues},[...i,...d.path]);else if(d.code==="invalid_element")n({issues:d.issues},[...i,...d.path]);else{const c=[...i,...d.path];if(c.length===0)o._errors.push(t(d));else{let r=o,p=0;for(;p<c.length;){const _=c[p],v=p===c.length-1;if(_==="_errors"){v&&r._errors.push(t(d)),p++;continue}Object.prototype.hasOwnProperty.call(r,_)||Object.defineProperty(r,_,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const w=r[_];v&&w._errors.push(t(d)),r=w,p++}}}};return n(e),o}function co(e,t){var o;return{callee:(o=t==null?void 0:t.callee)!=null?o:e,Err:t==null?void 0:t.Err}}const Xo=e=>{const t=(o,n,s,i)=>{var r,p;const d=s?ee(z({},s),{async:!1}):{async:!1},c=o._zod.run({value:n,issues:[]},d);if(c instanceof Promise)throw new bt;if(c.issues.length){const _=new((r=i==null?void 0:i.Err)!=null?r:e)(c.issues.map(v=>Ct(v,d,Ke())));throw Es(_,(p=i==null?void 0:i.callee)!=null?p:t),_}return c.value};return t},en=e=>{const t=(o,n,s,i)=>Q(null,null,function*(){var r,p;const d=s?ee(z({},s),{async:!0}):{async:!0};let c=o._zod.run({value:n,issues:[]},d);if(c instanceof Promise&&(c=yield c),c.issues.length){const _=new((r=i==null?void 0:i.Err)!=null?r:e)(c.issues.map(v=>Ct(v,d,Ke())));throw Es(_,(p=i==null?void 0:i.callee)!=null?p:t),_}return c.value});return t},mo=e=>(t,o,n)=>{const s=n?ee(z({},n),{async:!1}):{async:!1},i=t._zod.run({value:o,issues:[]},s);if(i instanceof Promise)throw new bt;return i.issues.length?{success:!1,error:new(e!=null?e:Ps)(i.issues.map(d=>Ct(d,s,Ke())))}:{success:!0,data:i.value}},af=mo(Ds),fo=e=>(t,o,n)=>Q(null,null,function*(){const s=n?ee(z({},n),{async:!0}):{async:!0};let i=t._zod.run({value:o,issues:[]},s);return i instanceof Promise&&(i=yield i),i.issues.length?{success:!1,error:new e(i.issues.map(d=>Ct(d,s,Ke())))}:{success:!0,data:i.value}}),rf=fo(Ds),lf=e=>{const t=Xo(e),o=(n,s,i,d)=>{const c=i?ee(z({},i),{direction:"backward"}):{direction:"backward"};return t(n,s,c,co(o,d))};return o},uf=e=>{const t=Xo(e),o=(n,s,i,d)=>t(n,s,i,co(o,d));return o},df=e=>{const t=en(e),o=(n,s,i,d)=>Q(null,null,function*(){const c=i?ee(z({},i),{direction:"backward"}):{direction:"backward"};return yield t(n,s,c,co(o,d))});return o},cf=e=>{const t=en(e),o=(n,s,i,d)=>Q(null,null,function*(){return yield t(n,s,i,co(o,d))});return o},mf=e=>(t,o,n)=>{const s=n?ee(z({},n),{direction:"backward"}):{direction:"backward"};return mo(e)(t,o,s)},ff=e=>(t,o,n)=>mo(e)(t,o,n),pf=e=>(t,o,n)=>Q(null,null,function*(){const s=n?ee(z({},n),{direction:"backward"}):{direction:"backward"};return fo(e)(t,o,s)}),hf=e=>(t,o,n)=>Q(null,null,function*(){return fo(e)(t,o,n)}),_f=/^-?\d+$/,gf=/^-?\d+(?:\.\d+)?$/,qe=K("$ZodCheck",(e,t)=>{var n,s;var o;(n=e._zod)!=null||(e._zod={}),e._zod.def=t,(s=(o=e._zod).onattach)!=null||(o.onattach=[])}),tn=e=>{const t=e.value;return!Bm(t)&&t.length!==void 0},so={number:"number",bigint:"bigint",object:"date"},Ls=K("$ZodCheckLessThan",(e,t)=>{qe.init(e,t);const o=so[typeof t.value];e._zod.onattach.push(n=>{var d;const s=n._zod.bag,i=(d=t.inclusive?s.maximum:s.exclusiveMaximum)!=null?d:Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?s.maximum=t.value:s.exclusiveMaximum=t.value)}),e._zod.check=n=>{var s;(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:(s=so[typeof n.value])!=null?s:o,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Fs=K("$ZodCheckGreaterThan",(e,t)=>{qe.init(e,t);const o=so[typeof t.value];e._zod.onattach.push(n=>{var d;const s=n._zod.bag,i=(d=t.inclusive?s.minimum:s.exclusiveMinimum)!=null?d:Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?s.minimum=t.value:s.exclusiveMinimum=t.value)}),e._zod.check=n=>{var s;(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:(s=so[typeof n.value])!=null?s:o,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vf=K("$ZodCheckMultipleOf",(e,t)=>{qe.init(e,t),e._zod.onattach.push(o=>{var s;var n;(s=(n=o._zod.bag).multipleOf)!=null||(n.multipleOf=t.value)}),e._zod.check=o=>{if(typeof o.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof o.value=="bigint"?t.value!==BigInt(0)&&o.value%t.value===BigInt(0):Rm(o.value,t.value)===0)||o.issues.push({origin:typeof o.value,code:"not_multiple_of",divisor:t.value,input:o.value,inst:e,continue:!t.abort})}}),bf=K("$ZodCheckNumberFormat",(e,t)=>{var d;qe.init(e,t),t.format=t.format||"float64";const o=(d=t.format)==null?void 0:d.includes("int"),n=o?"int":"number",[s,i]=Vm[t.format];e._zod.onattach.push(c=>{const r=c._zod.bag;r.format=t.format,r.minimum=s,r.maximum=i,o&&(r.pattern=_f)}),e._zod.check=c=>{const r=c.value;if(o){if(!Number.isInteger(r)){c.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:r,inst:e});return}if(!Number.isSafeInteger(r)){r>0?c.issues.push({input:r,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,
3continue:!t.abort}):c.issues.push({input:r,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}r<s&&c.issues.push({origin:"number",input:r,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!t.abort}),r>i&&c.issues.push({origin:"number",input:r,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),yf=K("$ZodCheckMaxLength",(e,t)=>{var n;var o;qe.init(e,t),(n=(o=e._zod.def).when)!=null||(o.when=tn),e._zod.onattach.push(s=>{var d;const i=(d=s._zod.bag.maximum)!=null?d:Number.POSITIVE_INFINITY;t.maximum<i&&(s._zod.bag.maximum=t.maximum)}),e._zod.check=s=>{const i=s.value,d=i.length;if((typeof i=="string"&&d>t.maximum?Qo(i):d)<=t.maximum)return;const r=Ko(i);s.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Sf=K("$ZodCheckMinLength",(e,t)=>{var n;var o;qe.init(e,t),(n=(o=e._zod.def).when)!=null||(o.when=tn),e._zod.onattach.push(s=>{var d;const i=(d=s._zod.bag.minimum)!=null?d:Number.NEGATIVE_INFINITY;t.minimum>i&&(s._zod.bag.minimum=t.minimum)}),e._zod.check=s=>{const i=s.value,d=i.length;if((typeof i=="string"&&d>=t.minimum&&d<t.minimum*2?Qo(i):d)>=t.minimum)return;const r=Ko(i);s.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),wf=K("$ZodCheckLengthEquals",(e,t)=>{var n;var o;qe.init(e,t),(n=(o=e._zod.def).when)!=null||(o.when=tn),e._zod.onattach.push(s=>{const i=s._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=s=>{const i=s.value,d=i.length,c=typeof i=="string"&&d>=t.length&&d<=t.length*2?Qo(i):d;if(c===t.length)return;const r=Ko(i),p=c>t.length;s.issues.push(ee(z({origin:r},p?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length}),{inclusive:!0,exact:!0,input:s.value,inst:e,continue:!t.abort}))}}),xf=K("$ZodCheckOverwrite",(e,t)=>{qe.init(e,t),e._zod.check=o=>{o.value=t.tx(o.value)}}),kf={major:4,minor:5,patch:4},Ie=K("$ZodType",(e,t)=>{var i,d;var o;e!=null||(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=kf;const n=e._zod.def.checks,s=e._zod.traits.has("$ZodCheck")?[e,...n!=null?n:[]]:n!=null&&n.length?[...n]:[];for(const c of s)for(const r of c._zod.onattach)r(e);if(s.length===0)(i=(o=e._zod).deferred)!=null||(o.deferred=[]),(d=e._zod.deferred)==null||d.push(()=>{e._zod.run=e._zod.parse});else{const c=(p,_,v)=>{if(p.memo)return p;let w=vt(p),y;for(const C of _){if(C._zod.def.when){if(Wm(p)||!C._zod.def.when(p))continue}else if(w)continue;const k=p.issues.length,E=C._zod.check(p);if(E instanceof Promise&&(v==null?void 0:v.async)===!1)throw new bt;if(y||E instanceof Promise)y=(y!=null?y:Promise.resolve()).then(()=>Q(null,null,function*(){yield E,p.issues.length!==k&&(kn(p.issues,k,e),w||(w=vt(p,k)))}));else{if(p.issues.length===k)continue;kn(p.issues,k,e),w||(w=vt(p,k))}}return y?y.then(()=>p):p},r=(p,_,v)=>{if(vt(p))return p.aborted=!0,p;const w=c(_,s,v);if(w instanceof Promise){if(v.async===!1)throw new bt;return w.then(y=>e._zod.parse(y,v))}return e._zod.parse(w,v)};e._zod.run=(p,_)=>{if(_.skipChecks)return e._zod.parse(p,_);if(_.direction==="backward"){const w=e._zod.parse({value:p.value,issues:[]},ee(z({},_),{skipChecks:!0}));return w instanceof Promise?w.then(y=>r(y,p,_)):r(w,p,_)}const v=e._zod.parse(p,_);if(v instanceof Promise){if(_.async===!1)throw new bt;return v.then(w=>c(w,s,_))}return c(v,s,_)}}},{get"~standard"(){return Is(this,"~standard",Ns(this))},set"~standard"(e){St(this,"~standard",e)}}),Mn=e=>{var t;return e.success?{value:e.data}:{issues:(t=e.error)==null?void 0:t.issues}};function Ns(e){return{validate:t=>{try{return Mn(af(e,t))}catch(o){return rf(e,t).then(Mn)}},vendor:"zod",version:1}}const Os=K("$ZodNumber",(e,t)=>{var o;Ie.init(e,t),e._zod.pattern=(o=e._zod.bag.pattern)!=null?o:gf,e._zod.parse=(n,s)=>{if(t.coerce)try{n.value=Number(n.value)}catch(c){}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const d=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push(z({expected:"number",code:"invalid_type",input:i,inst:e},d?{received:d}:{})),n}}),Cf=K("$ZodNumberFormat",(e,t)=>{bf.init(e,t),Os.init(e,t)});function In(e,t,o){e.issues.length&&t.issues.push(...qm(o,e.issues)),t.value[o]=e.value}const Ef=K("$ZodArray",(e,t)=>{Ie.init(e,t);const o=wt.memoizer;o==null||o.attach(e),e._zod.parse=(n,s)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=o?o.alloc(e,n,Array(i.length),s):Array(i.length);const d=[];for(let c=0;c<i.length;c++){const r=i[c],p=t.element._zod.run({value:r,issues:[]},s);p instanceof Promise?d.push(p.then(_=>In(_,n,c))):In(p,n,c)}return d.length?Promise.all(d).then(()=>n):n}});function An(e,t,o,n){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const s=e.filter(i=>!vt(i));return s.length===1?(t.value=s[0].value,s[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:o,errors:e.map(i=>i.issues.map(d=>Ct(d,n,Ke())))}),t)}const Tf=K("$ZodUnion",(e,t)=>
3{Ie.init(e,t),ie(e,"optin",n=>n.def.options.some(s=>s._zod.optin==="defaulted")?"defaulted":n.def.options.some(s=>s._zod.optin!==void 0)?"optional":void 0),ie(e,"optout",n=>n.def.options.some(s=>s._zod.optout==="optional")?"optional":void 0),ie(e,"values",n=>{if(n.def.options.every(s=>s._zod.values))return new Set(n.def.options.flatMap(s=>Array.from(s._zod.values)))}),ie(e,"pattern",n=>{if(n.def.options.every(s=>s._zod.pattern)){const s=n.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${s.map(i=>Yo(i.source)).join("|")})$`)}});const o=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,s)=>{if(o)return o(n,s);let i=!1;const d=[];for(const c of t.options){const r=c._zod.run({value:n.value,issues:[]},s);if(r instanceof Promise)d.push(r),i=!0;else{if(r.issues.length===0)return r;d.push(r)}}return i?Promise.all(d).then(c=>An(c,n,e,s)):An(d,n,e,s)}}),Mf=K("$ZodIntersection",(e,t)=>{Ie.init(e,t),e._zod.parse=(o,n)=>{const s=o.value,i=t.left._zod.run({value:s,issues:[]},n),d=t.right._zod.run({value:s,issues:[]},n);return i instanceof Promise||d instanceof Promise?Promise.all([i,d]).then(([r,p])=>$n(o,r,p)):$n(o,i,d)}});function No(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Fo(e)&&Fo(t)){const o=Object.keys(t),n=Object.keys(e).filter(i=>o.indexOf(i)!==-1),s=z(z({},e),t);Object.prototype.hasOwnProperty.call(s,"__proto__")&&delete s.__proto__;for(const i of n){if(i==="__proto__")continue;const d=No(e[i],t[i]);if(!d.valid)return{valid:!1,mergeErrorPath:[i,...d.mergeErrorPath]};s[i]=d.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const o=[];for(let n=0;n<e.length;n++){const s=e[n],i=t[n],d=No(s,i);if(!d.valid)return{valid:!1,mergeErrorPath:[n,...d.mergeErrorPath]};o.push(d.data)}return{valid:!0,data:o}}return{valid:!1,mergeErrorPath:[]}}function $n(e,t,o){const n=new Map;let s;const i=new Map,d=(p,_)=>{var w,y;let v;if(p.code==="unrecognized_keys"&&!((w=p.path)!=null&&w.length))s!=null||(s=p),v=p.keys;else if(p.code==="invalid_key"&&p.origin==="record"&&((y=p.path)==null?void 0:y.length)===1){const C=String(p.path[0]);i.has(C)||i.set(C,p),v=[C]}else return!1;for(const C of v)n.has(C)||n.set(C,{}),n.get(C)[_]=!0;return!0};for(const p of t.issues)d(p,"l")||e.issues.push(p);for(const p of o.issues)d(p,"r")||e.issues.push(p);const c=[...n].filter(([,p])=>p.l&&p.r).map(([p])=>p);if(c.length){const p=s?c.filter(_=>s.keys.includes(_)):[];p.length&&e.issues.push(ee(z({},s),{keys:p}));for(const _ of c)!p.includes(_)&&i.has(_)&&e.issues.push(i.get(_))}const r=No(t.value,o.value);if(!r.valid){if(vt(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`)}return e.value=r.data,e}const If=K("$ZodTransform",(e,t)=>{var o;Ie.init(e,t),e._zod.optin="optional",(o=wt.memoizer)==null||o.guard(e),e._zod.parse=(n,s)=>{if(s.direction==="backward")throw new As(e.constructor.name);const i=t.transform(n.value,n);if(s.async)return(i instanceof Promise?i:Promise.resolve(i)).then(c=>(n.value=c,n));if(i instanceof Promise)throw new bt;return n.value=i,n}});function Pn(e,t){return e.value=t.issues.length?void 0:t.value,e}const Bs=K("$ZodOptional",(e,t)=>{Ie.init(e,t),ie(e,"optin",o=>o.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",ie(e,"values",o=>{const n=o.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),ie(e,"pattern",o=>{const n=o.def.innerType._zod.pattern;return n?new RegExp(`^(${Yo(n.source)})?$`):void 0}),e._zod.parse=(o,n)=>{if(o.value===void 0){if(t.innerType._zod.optin!=="defaulted")return o;const s=t.innerType._zod.run({value:o.value,issues:[]},n);return s instanceof Promise?s.then(i=>Pn(o,i)):Pn(o,s)}return t.innerType._zod.run(o,n)}}),Af=K("$ZodExactOptional",(e,t)=>{Bs.init(e,t),ie(e,"values",o=>o.def.innerType._zod.values),ie(e,"pattern",o=>o.def.innerType._zod.pattern),e._zod.parse=(o,n)=>t.innerType._zod.run(o,n)}),$f=K("$ZodNullable",(e,t)=>{Ie.init(e,t),ie(e,"optin",o=>
3o.def.innerType._zod.optin),ie(e,"optout",o=>o.def.innerType._zod.optout),ie(e,"pattern",o=>{const n=o.def.innerType._zod.pattern;return n?new RegExp(`^(${Yo(n.source)}|null)$`):void 0}),ie(e,"values",o=>o.def.innerType._zod.values?new Set([...o.def.innerType._zod.values,null]):void 0),e._zod.parse=(o,n)=>o.value===null?o:t.innerType._zod.run(o,n)}),Pf=K("$ZodDefault",(e,t)=>{Ie.init(e,t),e._zod.optin="defaulted",ie(e,"values",o=>o.def.innerType._zod.values),e._zod.parse=(o,n)=>{if(n.direction==="backward")return t.innerType._zod.run(o,n);if(o.value===void 0)return o.value=t.defaultValue,o;const s=t.innerType._zod.run(o,n);return s instanceof Promise?s.then(i=>Dn(i,t)):Dn(s,t)}});function Dn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Df=K("$ZodPrefault",(e,t)=>{Ie.init(e,t),e._zod.optin="defaulted",ie(e,"values",o=>o.def.innerType._zod.values),e._zod.parse=(o,n)=>(n.direction==="backward"||o.value===void 0&&(o.value=t.defaultValue),t.innerType._zod.run(o,n))}),Lf=K("$ZodNonOptional",(e,t)=>{Ie.init(e,t),ie(e,"values",o=>{const n=o.def.innerType._zod.values;return n?new Set([...n].filter(s=>s!==void 0)):void 0}),e._zod.parse=(o,n)=>{const s=t.innerType._zod.run(o,n);return s instanceof Promise?s.then(i=>Ln(i,e)):Ln(s,e)}});function Ln(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function Fn(e,t,o,n){return t.issues.length?(e.value=o.catchValue(ee(z({},t),{value:e.value,error:{issues:t.issues.map(s=>Ct(s,n,Ke()))},input:e.value})),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const Ff=K("$ZodCatch",(e,t)=>{Ie.init(e,t),ie(e,"optin",o=>o.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),ie(e,"optout",o=>o.def.innerType._zod.optout),ie(e,"values",o=>o.def.innerType._zod.values),e._zod.parse=(o,n)=>{if(n.direction==="backward")return t.innerType._zod.run(o,n);const s=t.innerType._zod.run({value:o.value,issues:[]},n);return s instanceof Promise?s.then(i=>Fn(o,i,t,n)):Fn(o,s,t,n)}}),Nf=K("$ZodPipe",(e,t)=>{Ie.init(e,t),ie(e,"values",o=>o.def.in._zod.values),ie(e,"optin",o=>o.def.in._zod.optin),ie(e,"optout",o=>o.def.out._zod.optout),ie(e,"propValues",o=>o.def.in._zod.propValues),e._zod.parse=(o,n)=>{if(n.direction==="backward"){const i=t.out._zod.run(o,n);return i instanceof Promise?i.then(d=>Gt(d,t.in,n)):Gt(i,t.in,n)}const s=t.in._zod.run(o,n);return s instanceof Promise?s.then(i=>Gt(i,t.out,n)):Gt(s,t.out,n)}});function Gt(e,t,o){return e.issues.some(n=>n.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},o)}const Of=K("$ZodReadonly",(e,t)=>{Ie.init(e,t),ie(e,"propValues",o=>o.def.innerType._zod.propValues),ie(e,"values",o=>o.def.innerType._zod.values),ie(e,"optin",o=>{var n,s;return(s=(n=o.def.innerType)==null?void 0:n._zod)==null?void 0:s.optin}),ie(e,"optout",o=>{var n,s;return(s=(n=o.def.innerType)==null?void 0:n._zod)==null?void 0:s.optout}),e._zod.parse=(o,n)=>{if(n.direction==="backward")return t.innerType._zod.run(o,n);const s=t.innerType._zod.run(o,n);return s instanceof Promise?s.then(Nn):Nn(s)}});function Nn(e){return e.memo||(e.value=Object.freeze(e.value)),e}const Bf=K("$ZodCustom",(e,t)=>{qe.init(e,t),Ie.init(e,t),e._zod.parse=(o,n)=>o,e._zod.check=o=>{const n=o.value,s=t.fn(n);if(s instanceof Promise)return s.then(i=>On(i,o,n,e));On(s,o,n,e)}});function On(e,t,o,n){var s;if(!e){const i={code:"custom",input:o,inst:n,path:[...(s=n._zod.def.path)!=null?s:[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),t.issues.push(Rt(i))}}class Rf extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Oo="~memo",Bn=[];function ko(e){return e.map(t=>t.path?ee(z({},t),{path:t.path.slice()}):z({},t))}const Rn=new WeakMap;function Rs(e,t){const o=Rn.get(e);if(o!==void 0)return o;if(t.has(e))return!0;t.add(e);let n=!1;const s=c=>{!n&&(c!=null&&c._zod)&&Rs(c,t)&&(n=!0)},i=e._zod.def;switch(i.type){case"object":{for(const c of Reflect.ownKeys(i.shape))s(i.shape[c]);s(i.catchall);break}case"array":s(i.element);break;case"tuple":for(const c of i.items)s(c);s(i.rest);break;
3case"record":case"map":s(i.keyType),s(i.valueType);break;case"set":s(i.valueType);break;case"union":for(const c of i.options)s(c);break;case"intersection":s(i.left),s(i.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":s(i.innerType);break;case"pipe":s(i.in),s(i.out);break;case"function":s(i.input),s(i.output);break;case"lazy":s(e._zod.innerType);break;case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const c in i){const r=Object.getOwnPropertyDescriptor(i,c);if(!r||r.get)continue;const p=r.value;if(!(!p||typeof p!="object")){if(p._zod)s(p);else if(Array.isArray(p))for(const _ of p)s(_)}}}return t.delete(e),Rn.set(e,n),n}function Uf(e,t){let o=e.buckets.get(t);return o||(o=new Map,e.buckets.set(t,o)),o}let Zt;const Yt=[],zf={alloc(e,t,o){const n=Zt;if(!n)return o;Zt=void 0;const s={value:o,issues:null};return n.set(t.value,s),Yt.push(s),o},guard(e){var o;var t;(o=(t=e._zod).deferred)!=null||(t.deferred=[]),e._zod.deferred.push(()=>{const n=e._zod.parse,s=(i,d)=>{if(d.direction!=="backward"&&Wf(d,i.value))throw new Rf;return n(i,d)};e._zod.parse=s,e._zod.run===n&&(e._zod.run=s)})},attach(e){var i;var t;let o,n,s;(i=(t=e._zod).deferred)!=null||(t.deferred=[]),e._zod.deferred.push(()=>{const d=e._zod.parse,c=(r,p)=>{var A;if(o===void 0&&(o=Rs(e,new Set),!o))return e._zod.parse=d,e._zod.run===c&&(e._zod.run=d),d(r,p);const _=r.value;if(_===null||typeof _!="object")return d(r,p);let v=p[Oo];v||(v={buckets:new Map,backEdges:void 0},p[Oo]=v);let w;n===p?w=s:(w=Uf(v,e),n=p,s=w);const y=w.get(_);if(y)return r.value=y.value,y.issues?y.issues.length&&r.issues.push(...ko(y.issues)):(r.memo=!0,(A=v.backEdges)!=null||(v.backEdges=new Set),v.backEdges.add(y.value)),r;Zt=w;const C=Yt.length,k=d(r,p);Zt=void 0;const E=Yt.length>C?Yt.pop():void 0;return k instanceof Promise?k.then(R=>(E&&(E.issues=R.issues.length?ko(R.issues):Bn),R)):(E&&(E.issues=k.issues.length?ko(k.issues):Bn),k)};e._zod.parse=c,e._zod.run===d&&(e._zod.run=c)})}};function Vf(){return zf}function Wf(e,t){var n;const o=(n=e[Oo])==null?void 0:n.backEdges;return o!==void 0&&t!==null&&typeof t=="object"&&o.has(t)}const qf=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){var d;return(d=e[i])!=null?d:null}const o={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"credit card number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function s(i,d){var c;return i==="number"&&typeof d=="number"&&!Number.isFinite(d)?String(d):(c=n[i])!=null?c:i}return i=>{var d,c,r,p;switch(i.code){case"invalid_type":{const _=s(i.expected),v=Hm(i.input),w=s(v,i.input);return`Invalid input: expected ${_}, received ${w}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${Ms(i.values[0])}`:`Invalid option: expected one of ${wn(i.values,"|")}`;case"too_big":{const _=i.exact?"exactly ":i.inclusive?"<=":"<",v=t(i.origin);return v?`Too big: expected ${(d=i.origin)!=null?d:"value"} to have ${_}${i.maximum.toString()} ${(c=v.unit)!=null?c:"elements"}`:`Too big: expected ${(r=i.origin)!=null?r:"value"} to be ${_}${i.maximum.toString()}`}case"too_small":{const _=i.exact?"exactly ":i.inclusive?">=":">",v=t(i.origin);return v?`Too small: expected ${i.origin} to have ${_}${i.minimum.toString()} ${v.unit}`:`Too small: expected ${i.origin} to be ${_}${i.minimum.toString()}`}
3case"invalid_format":{const _=i;return _.format==="starts_with"?`Invalid string: must start with "${_.prefix}"`:_.format==="ends_with"?`Invalid string: must end with "${_.suffix}"`:_.format==="includes"?`Invalid string: must include "${_.includes}"`:_.format==="regex"?`Invalid string: must match pattern ${_.pattern}`:`Invalid ${(p=o[_.format])!=null?p:i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${wn(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(v=>`'${v}'`).join(" | ")}`:i.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function jf(){return{localeError:qf()}}var Un;class Hf{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...o){const n=o[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const o=this._map.get(t);return o&&typeof o=="object"&&"id"in o&&this._idmap.delete(o.id),this._map.delete(t),this}get(t){var n;const o=t._zod.parent;if(o){const s=z({},(n=this.get(o))!=null?n:{});delete s.id;const i=z(z({},s),this._map.get(t));return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Gf(){return new Hf}var ts;(ts=(Un=globalThis).__zod_globalRegistry)!=null||(Un.__zod_globalRegistry=Gf());const $t=globalThis.__zod_globalRegistry;function Zf(e,t){return new e(z({type:"number",checks:[]},Me(t)))}function Yf(e,t){return new e(z({type:"number",check:"number_format",abort:!1,format:"safeint"},Me(t)))}function zn(e,t){return new Ls(ee(z({check:"less_than"},Me(t)),{value:e,inclusive:!1}))}function Co(e,t){return new Ls(ee(z({check:"less_than"},Me(t)),{value:e,inclusive:!0}))}function Vn(e,t){return new Fs(ee(z({check:"greater_than"},Me(t)),{value:e,inclusive:!1}))}function Eo(e,t){return new Fs(ee(z({check:"greater_than"},Me(t)),{value:e,inclusive:!0}))}function Wn(e,t){return new vf(ee(z({check:"multiple_of"},Me(t)),{value:e}))}function Jf(e,t){return new yf(ee(z({check:"max_length"},Me(t)),{maximum:e}))}function qn(e,t){return new Sf(ee(z({check:"min_length"},Me(t)),{minimum:e}))}function Qf(e,t){return new wf(ee(z({check:"length_equals"},Me(t)),{length:e}))}function Kf(e){return new xf({check:"overwrite",tx:e})}function Xf(e,t,o){return new e(z({type:"array",element:t},Me(o)))}function ep(e,t,o){return new e(z({type:"custom",check:"custom",fn:t},Me(o)))}function tp(e,t){const o=op(n=>(n.addIssue=s=>{var i,d,c;if(typeof s=="string")n.issues.push(Rt(s,n.value,o._zod.def));else{const r=s;r.fatal&&(r.continue=!1),(i=r.code)!=null||(r.code="custom"),"input"in r||(r.input=n.value),(d=r.inst)!=null||(r.inst=o),(c=r.continue)!=null||(r.continue=!o._zod.def.abort),n.issues.push(Rt(r))}},e(n.value,n)),t);return o}function op(e,t){const o=new qe(z({check:"custom"},Me(t)));return o._zod.check=e,o}function Ft(e,...t){for(const o of t)for(const n of Reflect.ownKeys(o))Object.prototype.propertyIsEnumerable.call(o,n)&&Jo(e,n,o[n]);return e}function Us(e){var o,n,s,i,d,c,r,p,_;let t=(o=e==null?void 0:e.target)!=null?o:"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:(n=e.processors)!=null?n:{},metadataRegistry:(s=e==null?void 0:e.metadata)!=null?s:$t,target:t,unrepresentable:(i=e==null?void 0:e.unrepresentable)!=null?i:"throw",override:(d=e==null?void 0:e.override)!=null?d:(()=>{}),io:(c=e==null?void 0:e.io)!=null?c:"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:(r=e==null?void 0:e.cycles)!=null?r:"ref",reused:(p=e==null?void 0:e.reused)!=null?p:"inline",intersections:[],deferred:[],external:(_=e==null?void 0:e.external)!=null?_:void 0}}function Ut(e,t,o,n,s){const i=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:n.path,message:s}):t.unrepresentable;if(i==="any")return!1;if(i===void 0||i==="throw")throw new Error(s);return Object.assign(o,i),!0}function Te(e,t,o={path:[],schemaPath:[]}){var _,v,w;var n;const s=e._zod.def,i=t.seen.get(e);if(i)return i.count++,o.schemaPath.includes(e)&&(i.cycle=o.path),i.schema;
3const d={schema:{},count:1,cycle:void 0,path:o.path};t.seen.set(e,d),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const c=(v=(_=e._zod).toJSONSchema)==null?void 0:v.call(_);if(c)d.schema=c;else{const y=ee(z({},o),{schemaPath:[...o.schemaPath,e],path:o.path});if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,d.schema,y);else{const k=d.schema,E=t.processors[s.type];if(!E)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);E(e,t,k,y)}const C=e._zod.parent;C&&(d.ref||(d.ref=C),Te(C,t,y),t.seen.get(C).isParent=!0)}const r=t.metadataRegistry.get(e);return r&&Ft(d.schema,r),t.io==="input"&&Ce(e)&&(delete d.schema.examples,delete d.schema.default),t.io==="input"&&"_prefault"in d.schema&&((w=(n=d.schema).default)!=null||(n.default=d.schema._prefault)),delete d.schema._prefault,t.seen.get(e).schema}function jn(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function zs(e,t){var d,c,r,p;const o=e.seen.get(t);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const n=new Map;for(const _ of e.seen.entries()){const v=(d=e.metadataRegistry.get(_[0]))==null?void 0:d.id;if(v){const w=n.get(v);if(w&&w!==_[0])throw new Error(`Duplicate schema id "${v}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(v,_[0])}}const s=_=>{var k,E,A,R,B;const v=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const X=(k=e.external.registry.get(_[0]))==null?void 0:k.id,O=(E=e.external.uri)!=null?E:(D=>D);if(X)return{ref:O(X)};const L=(R=(A=_[1].defId)!=null?A:_[1].schema.id)!=null?R:`schema${e.counter++}`;return _[1].defId=L,{defId:L,ref:`${O("__shared")}#/${v}/${jn(L)}`}}const w="#",y=`${w}/${v}/`;if(_[1]===o&&!_[1].schema.id)return{ref:w};const C=(B=_[1].schema.id)!=null?B:`__schema${e.counter++}`;return{defId:C,ref:y+jn(C)}},i=_=>{if(_[1].schema.$ref)return;const v=_[1],{ref:w,defId:y}=s(_);v.def=z({},v.schema),y&&(v.defId=y);const C=v.schema;for(const k in C)delete C[k];C.$ref=w};if(e.cycles==="throw")for(const _ of e.seen.entries()){const v=_[1];if(v.cycle)throw new Error(`Cycle detected: #/${(c=v.cycle)==null?void 0:c.join("/")}/<root> 4 5Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const _ of e.seen.entries()){const v=_[1];if(t===_[0]){i(_);continue}if(e.external){const y=(r=e.external.registry.get(_[0]))==null?void 0:r.id;if(t!==_[0]&&y){i(_);continue}}if((p=e.metadataRegistry.get(_[0]))==null?void 0:p.id){i(_);continue}if(v.cycle){i(_);continue}if(v.count>1&&e.reused==="ref"){i(_);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Vs(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const o=[];for(const n of t){if(!n||typeof n!="object")return;Vs(n);const s=Object.keys(n);if(s.length!==1||s[0]!=="type")return;const i=n.type;for(const d of Array.isArray(i)?i:[i]){if(typeof d!="string")return;o.includes(d)||o.push(d)}}delete e.anyOf,e.type=o.length===1?o[0]:o}const Ws=new Set(["type","properties","required","additionalProperties"]),Hn=["oneOf","anyOf"];function Gn(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function Bo(e){var i,d,c,r;const t=[];for(const p of e){if(typeof p!="object"||p.type!=="object")return null;for(const _ in p)if(!Ws.has(_))return null;t.push(p)}const o={},n=new Set;for(const p of t){for(const _ in p.properties){if(Object.prototype.hasOwnProperty.call(o,_))continue;const v=[];for(const y of t){const C=(d=(i=y.properties)==null?void 0:i[_])!=null?d:Gn(y);C!=null&&(v.some(k=>JSON.stringify(k)===JSON.stringify(C))||v.push(C))}const w=v.length===1?v[0]:(c=Bo(v))!=null?c:{allOf:v};Jo(o,_,w)}for(const _ of(r=p.required)!=null?r:[])n.add(_)}const s={type:"object",properties:o};if(n.size&&(s.required=[...n]),t.every(p=>p.additionalProperties===!1))s.additionalProperties=!1;else{const p=[];for(const _ of t){const v=Gn(_);v&&!p.some(w=>JSON.stringify(w)===JSON.stringify(v))&&p.push(v)}p.length===1?s.additionalProperties=p[0]:p.length>1&&(s.additionalProperties={allOf:p})}return s}function np(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const s of Ws)if(s in e)return;const o=t.filter(s=>Hn.some(i=>Array.isArray(s[i])));let n=null;if(!o.length)n=Bo(t);else{const s=o[0],i=Hn.find(r=>Array.isArray(s[r]));if(Object.keys(s).length!==1)return;const d=t.filter(r=>r!==s),c=s[i].map(r=>Bo([...d,r]));if(c.some(r=>!r))return;n={[i]:c}}n&&(delete e.allOf,Ft(e,n))}function qs(e,t){var c,r,p,_,v,w,y,C;const o=e.seen.get(t);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=k=>{var O,L,D;const E=e.seen.get(k);if(E.ref===null)return;const A=(O=E.def)!=null?O:E.schema,R=z({},A),B=E.ref;if(E.ref=null,B){n(B);const N=e.seen.get(B),$=N.schema;if($.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(A.allOf=(L=A.allOf)!=null?L:[],A.allOf.push($)):Ft(A,$),Ft(A,R),k._zod.parent===B)for(const H in A)H==="$ref"||H==="allOf"||H in R||delete A[H];if($.$ref&&N.def)for(const H in A)H==="$ref"||H==="allOf"||H in N.def&&JSON.stringify(A[H])===JSON.stringify(N.def[H])&&delete A[H]}const X=k._zod.parent;if(X&&X!==B){n(X);const N=e.seen.get(X);if(N!=null&&N.schema.$ref&&(A.$ref=N.schema.$ref,N.def))for(const $ in A)$==="$ref"||$==="allOf"||$ in N.def&&JSON.stringify(A[$])===JSON.stringify(N.def[$])&&delete A[$]}e.override({zodSchema:k,jsonSchema:A,path:(D=E.path)!=null?D:[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const k of[...e.seen.entries()].reverse())n(k[0]);if(e.target!=="openapi-3.0")for(const k of e.seen.entries())Vs((c=k[1].def)!=null?c:k[1].schema);for(const k of e.deferred)k();if(e.intersections.length){const k=new Map;for(const E of e.seen.values())for(const A of[E.schema,E.def]){const R=A==null?void 0:A.allOf;if(!Array.isArray(R))continue;const B=k.get(R);B?B.push(A):k.set(R,[A])}for(const E of e.intersections)for(const A of(r=k.get(E))!=null?r:[])np(A)}}const s={};
5if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,(p=e.external)!=null&&p.uri){const k=(_=e.external.registry.get(t))==null?void 0:_.id;if(!k)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(k)}Ft(s,o.defId?o.schema:(v=o.def)!=null?v:o.schema);const i=(w=e.metadataRegistry.get(t))==null?void 0:w.id;i!==void 0&&s.id===i&&delete s.id;const d=(C=(y=e.external)==null?void 0:y.defs)!=null?C:{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const k of e.seen.entries()){const E=k[1];E.def&&E.defId&&(E.def.id===E.defId&&delete E.def.id,Jo(d,E.defId,E.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(d).length>0&&(e.target==="draft-2020-12"?s.$defs=d:s.definitions=d);try{const k=JSON.parse(JSON.stringify(s));return Object.defineProperty(k,"~standard",{value:ee(z({},t["~standard"]),{jsonSchema:{input:ao(t,"input",e.processors),output:ao(t,"output",e.processors)}}),enumerable:!1,writable:!1}),k}catch(k){throw new Error("Error converting schema to JSON.")}}function Ce(e,t){const o=t!=null?t:{seen:new Set};if(o.seen.has(e))return!1;o.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Ce(n.element,o);if(n.type==="set")return Ce(n.valueType,o);if(n.type==="lazy")return Ce(n.getter(),o);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return Ce(n.innerType,o);if(n.type==="intersection")return Ce(n.left,o)||Ce(n.right,o);if(n.type==="record"||n.type==="map")return Ce(n.keyType,o)||Ce(n.valueType,o);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Ce(n.in,o)||Ce(n.out,o);if(n.type==="object"){for(const s in n.shape)if(Ce(n.shape[s],o))return!0;return!1}if(n.type==="union"){for(const s of n.options)if(Ce(s,o))return!0;return!1}if(n.type==="tuple"){for(const s of n.items)if(Ce(s,o))return!0;return!!(n.rest&&Ce(n.rest,o))}return!1}const sp=(e,t={})=>o=>{const n=Us(ee(z({},o),{processors:t}));return Te(e,n),zs(n,e),qs(n,e)},ao=(e,t,o={})=>n=>{const{libraryOptions:s,target:i}=n!=null?n:{},d=Us(ee(z({},s!=null?s:{}),{target:i,io:t,processors:o}));return Te(e,d),zs(d,e),qs(d,e)},ap=(e,t,o,n)=>{const s=o,{minimum:i,maximum:d,format:c,multipleOf:r,exclusiveMaximum:p,exclusiveMinimum:_}=e._zod.bag;typeof c=="string"&&c.includes("int")?s.type="integer":s.type="number";const v=typeof _=="number"&&_>=(i!=null?i:Number.NEGATIVE_INFINITY),w=typeof p=="number"&&p<=(d!=null?d:Number.POSITIVE_INFINITY),y=t.target==="draft-04"||t.target==="openapi-3.0";v?y?(s.minimum=_,s.exclusiveMinimum=!0):s.exclusiveMinimum=_:typeof i=="number"&&(s.minimum=i),w?y?(s.maximum=p,s.exclusiveMaximum=!0):s.exclusiveMaximum=p:typeof d=="number"&&(s.maximum=d),typeof r=="number"&&(Number.isFinite(r)&&r!==0?s.multipleOf=Math.abs(r):Ut(e,t,s,n,`A multipleOf divisor of ${r} cannot be represented in JSON Schema`))},ip=(e,t,o,n)=>{Ut(e,t,o,n,"Custom types cannot be represented in JSON Schema")},rp=(e,t,o,n)=>{Ut(e,t,o,n,"Transforms cannot be represented in JSON Schema")},lp=(e,t,o,n)=>{const s=o,i=e._zod.def,{minimum:d,maximum:c}=e._zod.bag;typeof d=="number"&&(s.minItems=d),typeof c=="number"&&(s.maxItems=c),s.type="array",s.items=Te(i.element,t,ee(z({},n),{path:[...n.path,"items"]}))},up=(e,t,o,n)=>{const s=e._zod.def,i=s.inclusive===!1,d=s.options.map((c,r)=>Te(c,t,ee(z({},n),{path:[...n.path,i?"oneOf":"anyOf",r]})));i?o.oneOf=d:o.anyOf=d},dp=(e,t,o,n)=>{const s=e._zod.def,i=Te(s.left,t,ee(z({},n),{path:[...n.path,"allOf",0]})),d=Te(s.right,t,ee(z({},n),{path:[...n.path,"allOf",1]})),c=p=>"allOf"in p&&Object.keys(p).length===1,r=[...c(i)?i.allOf:[i],...c(d)?d.allOf:[d]];o.allOf=r,t.intersections.push(r)},cp=(e,t,o,n)=>{const s=e._zod.def,i=Te(s.innerType,t,n),d=t.seen.get(e);t.target==="openapi-3.0"?(d.ref=s.innerType,o.nullable=!0):o.anyOf=[i,{type:"null"}]},mp=(e,t,o,n)=>{const s=e._zod.def;Te(s.innerType,t,n);const i=t.seen.get(e);i.ref=s.innerType},on=Symbol();function js(e,t,o,n,s){let i=!1;const d=JSON.stringify(e,(c,r)=>typeof r!="bigint"?r:(i=!0,null));return i?(Ut(t,o,n,s,"BigInt defaults cannot be represented in JSON Schema"),on):JSON.parse(d)}const fp=(e,t,o,n)=>{const s=e._zod.def;Te(s.innerType,t,n);const i=t.seen.get(e);i.ref=s.innerType;const d=js(s.defaultValue,e,t,o,n);d!==on&&(o.default=d)},pp=(e,t,o,n)=>{const s=e._zod.def;Te(s.innerType,t,n);const i=t.seen.get(e);if(i.ref=s.innerType,t.io!=="input")return;const d=js(s.defaultValue,e,t,o,n);d!==on&&(o._prefault=d)},hp=(e,t,o,n)=>{const s=e._zod.def;Te(s.innerType,t,n);const i=t.seen.get(e);i.ref=s.innerType;let d;try{d=s.catchValue(void 0)}catch(c){Ut(e,t,o,n,"Dynamic catch values are not supported in JSON Schema");return}o.default=d},_p=(e,t,o,n)=>{const s=e._zod.def,i=s.in._zod.traits.has("$ZodTransform"),d=t.io==="input"?i?s.out:s.in:s.out;Te(d,t,n);const c=t.seen.get(e);c.ref=d},gp=(e,t,o,n)=>{const s=e._zod.def;Te(s.innerType,t,n);const i=t.seen.get(e);i.ref=s.innerType,o.readOnly=!0},Hs=(e,t,o,n)=>{const s=e._zod.def;Te(s.innerType,t,n);const i=t.seen.get(e);i.ref=s.innerType},Zn=new WeakSet([Object.prototype,Error.prototype]);function Jt(e,t,o){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const n=o(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0})}})}const vp=(e,t)=>{Ps.init(e,t),e.name="ZodError";const o=Object.getPrototypeOf(e);
5Zn.has(o)||(Zn.add(o),Jt(o,"format",n=>s=>sf(n,s)),Jt(o,"flatten",n=>s=>nf(n,s)),Jt(o,"addIssue",n=>s=>{n.issues.push(s),n.message=JSON.stringify(n.issues,Lo,2)}),Jt(o,"addIssues",n=>s=>{n.issues.push(...s),n.message=JSON.stringify(n.issues,Lo,2)}),Object.defineProperty(o,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},Ue=K("ZodError",vp,void 0,{Parent:Error}),bp=Xo(Ue),yp=en(Ue),Sp=mo(Ue),wp=fo(Ue),xp=lf(Ue),kp=uf(Ue),Cp=df(Ue),Ep=cf(Ue),Tp=mf(Ue),Mp=ff(Ue),Ip=pf(Ue),Ap=hf(Ue);function $p(){wt.localeError||Ke(jf())}function Gs(){wt.memoizer||Ke({memoizer:Vf()})}const Ae=K("ZodType",(e,t)=>($p(),Ie.init(e,t),e.def=t,e.type=t.type,e),{check(...e){var o;const t=this.def;return this.clone(Um(t,{checks:[...(o=t.checks)!=null?o:[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return zm(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(sh(e,t))},superRefine(e,t){return this.check(ah(e,t))},overwrite(e){return this.check(Kf(e))},optional(){return Jn(this)},exactOptional(){return qp(this)},nullable(){return Qn(this)},nullish(){return Jn(Qn(this))},nonoptional(e){return Qp(this,e)},array(){return Fp(this)},or(e){return Op([this,e])},and(e){return Rp(this,e)},transform(e){return Kn(this,zp(e))},default(e){return Gp(this,e)},prefault(e){return Yp(this,e)},catch(e){return Xp(this,e)},pipe(e){return Kn(this,e)},readonly(){return oh(this)},describe(e){const t=this.clone();return $t.add(t,{description:e}),t},meta(...e){if(e.length===0)return $t.get(this);const t=this.clone();return $t.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Is(this,"~standard",ee(z({},Ns(this)),{jsonSchema:{input:ao(this,"input"),output:ao(this,"output")}}))},set"~standard"(e){St(this,"~standard",e)},parse:function e(t,o){return bp(this,t,o,{callee:e})},parseAsync:function e(t,o){return Q(this,null,function*(){return yield yp(this,t,o,{callee:e})})},safeParse(e,t){return Sp(this,e,t)},safeParseAsync(e,t){return Q(this,null,function*(){return wp(this,e,t)})},get spa(){return this==null?void 0:this.safeParseAsync},set spa(e){St(this,"spa",e)},encode:function e(t,o){return xp(this,t,o,{callee:e})},decode:function e(t,o){return kp(this,t,o,{callee:e})},encodeAsync:function e(t,o){return Q(this,null,function*(){return yield Cp(this,t,o,{callee:e})})},decodeAsync:function e(t,o){return Q(this,null,function*(){return yield Ep(this,t,o,{callee:e})})},safeEncode(e,t){return Tp(this,e,t)},safeDecode(e,t){return Mp(this,e,t)},safeEncodeAsync(e,t){return Q(this,null,function*(){return Ip(this,e,t)})},safeDecodeAsync(e,t){return Q(this,null,function*(){return Ap(this,e,t)})},toJSONSchema(e){return sp(this,{})(e)},get description(){var e;return(e=$t.get(this))==null?void 0:e.description},get _def(){return this._zod.def}}),Zs=K("ZodNumber",(e,t)=>{var n,s,i,d,c,r,p,_,v;Os.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(w,y,C)=>ap(e,w,y,C);const o=e._zod.bag;e.minValue=(i=Math.max((n=o.minimum)!=null?n:Number.NEGATIVE_INFINITY,(s=o.exclusiveMinimum)!=null?s:Number.NEGATIVE_INFINITY))!=null?i:null,e.maxValue=(r=Math.min((d=o.maximum)!=null?d:Number.POSITIVE_INFINITY,(c=o.exclusiveMaximum)!=null?c:Number.POSITIVE_INFINITY))!=null?r:null,e.isInt=((p=o.format)!=null?p:"").includes("int")||Number.isSafeInteger((_=o.multipleOf)!=null?_:.5),e.isFinite=!0,e.format=(v=o.format)!=null?v:null},{gt(e,t){return this.check(Vn(e,t))},gte(e,t){return this.check(Eo(e,t))},min(e,t){return this.check(Eo(e,t))},lt(e,t){return this.check(zn(e,t))},lte(e,t){return this.check(Co(e,t))},max(e,t){return this.check(Co(e,t))},int(e){return this.check(Yn(e))},safe(e){return this.check(Yn(e))},positive(e){return this.check(Vn(0,e))},nonnegative(e){return this.check(Eo(0,e))},negative(e){return this.check(zn(0,e))},nonpositive(e){return this.check(Co(0,e))},multipleOf(e,t){return this.check(Wn(e,t))},step(e,t){return this.check(Wn(e,t))},finite(){return this}});function Pp(e){return Zf(Zs,e)}const Dp=K("ZodNumberFormat",(e,t)=>{Cf.init(e,t),Zs.init(e,t)});function Yn(e){return Yf(Dp,e)}const Lp=K("ZodArray",(e,t)=>{Gs(),Ef.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,n,s)=>lp(e,o,n,s),e.element=t.element},{min(e,t){return this.check(qn(e,t))},nonempty(e){return this.check(qn(1,e))},max(e,t){return this.check(Jf(e,t))},length(e,t){return this.check(Qf(e,t))},unwrap(){return this.element}});function Fp(e,t){return Xf(Lp,e,t)}const Np=K("ZodUnion",(e,t)=>{Tf.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,n,s)=>up(e,o,n,s),e.options=t.options});function Op(e,t){return new Np(z({type:"union",options:e},Me(t)))}const Bp=K("ZodIntersection",(e,t)=>{Mf.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,n,s)=>dp(e,o,n,s)});function Rp(e,t){return new Bp({type:"intersection",left:e,right:t})}const Up=K("ZodTransform",(e,t)=>{Gs(),If.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,n,s)=>rp(e,o,n,s),e._zod.parse=(o,n)=>{if(n.direction==="backward")throw new As(e.constructor.name);o.addIssue=i=>{var d,c;if(typeof i=="string")o.issues.push(Rt(i,o.value,t));else{const r=i;r.fatal&&(r.continue=!1),(d=r.code)!=null||(r.code="custom"),"input"in r||(r.input=o.value),(c=r.inst)!=null||(r.inst=e),o.issues.push(Rt(r))}};const s=t.transform(o.value,o);return s instanceof Promise?s.then(i=>(o.value=i,o)):(o.value=s,o)}});function zp(e){return new Up({type:"transform",transform:e})}const Vp=K("ZodOptional",(e,t)=>{Bs.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Hs(e,o,n,s),e.unwrap=()=>e._zod.def.innerType});function Jn(e){return new Vp({type:"optional",innerType:e})}const Wp=K("ZodExactOptional",(e,t)=>{Af.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,n,s)=>Hs(e,o,n,s),e.unwrap=()=>e._zod.def.innerType});function qp(e){return new Wp({type:"optional",innerType:e})}const jp=K("ZodNullable",(e,t)=>{$f.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,n,s)=>cp(e,o,n,s),e.unwrap=()=>e._zod.def.innerType});function Qn(e){return new jp({type:"nullable",innerType:e})}const Hp=K("ZodDefault",(e,t)=>{Pf.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,n,s)=>fp(e,o,n,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Gp(e,t){return new Hp({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ts(t)}})}const Zp=K("ZodPrefault",(e,t)=>{Df.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,n,s)=>pp(e,o,n,s),e.unwrap=()=>e._zod.def.innerType});function Yp(e,t){return new Zp({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ts(t)}})}const Jp=K("ZodNonOptional",(e,t)=>{Lf.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,n,s)=>mp(e,o,n,s),e.unwrap=()=>e._zod.def.innerType});function Qp(e,t){return new Jp(z({type:"nonoptional",innerType:e},Me(t)))}const Kp=K("ZodCatch",(e,t)=>{Ff.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,n,s)=>hp(e,o,n,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Xp(e,t){return new Kp({type:"catch",innerType:e,catchValue:typeof t=="function"?t:Qm(t)})}const eh=K("ZodPipe",(e,t)=>{Nf.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,n,s)=>
5_p(e,o,n,s),e.in=t.in,e.out=t.out});function Kn(e,t){return new eh({type:"pipe",in:e,out:t})}const th=K("ZodReadonly",(e,t)=>{Of.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,n,s)=>gp(e,o,n,s),e.unwrap=()=>e._zod.def.innerType});function oh(e){return new th({type:"readonly",innerType:e})}const nh=K("ZodCustom",(e,t)=>{Bf.init(e,t),Ae.init(e,t),e._zod.processJSONSchema=(o,n,s)=>ip(e,o,n,s)});function sh(e,t={}){return ep(nh,e,t)}function ah(e,t){return tp(e,t)}const To={shouldBeANumber:l("Please enter a number"),shouldBeAnInteger:l("Please enter an integer"),shouldBeZeroOrGreater:l("Please enter a number that is 0 or greater")},ih=Pp({message:To.shouldBeANumber}).int(To.shouldBeAnInteger).min(0,To.shouldBeZeroOrGreater),rh={class:"WordLimitDialog__body"},lh={class:"WordLimitDialog__numberInput"},uh={class:"WordLimitDialog__consequence-settings"},dh={class:"WordLimitDialog__chips"},ch=Y({__name:"WordLimitDialog",props:Re({wordLimit:{default:500},limitEnforcement:{default:"soft"}},{visible:{type:Boolean,required:!0},visibleModifiers:{}}),emits:Re(["save"],["update:visible"]),setup(e,{emit:t}){const o=e,n=fe(e,"visible"),s=t,i=M(o.wordLimit),d=M(o.limitEnforcement),c=F(()=>{var C,k;const y=ih.safeParse(i.value);return y.success?null:(k=(C=y.error.issues[0])==null?void 0:C.message)!=null?k:null}),r=F(()=>c.value===null),p={soft:l("Warn only"),hard:l("Prevent continued writing")};oe(n,y=>{y&&(i.value=o.wordLimit,d.value=o.limitEnforcement)});const _=()=>{n.value=!1},v=()=>{s("save",0,"soft"),n.value=!1},w=()=>{s("save",i.value,d.value),n.value=!1};return(y,C)=>(f(),T(ro,{visible:n.value,"onUpdate:visible":C[1]||(C[1]=k=>n.value=k),modal:"",dismissableMask:""},{header:g(()=>[m(mn,{level:3,size:"medium"},{default:g(()=>[I(h(a(l)("Limit the number of words")),1)]),_:1})]),footer:g(()=>[m(ps,{tertiary:{label:a(l)("Remove limit"),onAction:v},secondary:{label:a(l)("Cancel"),onAction:_},primary:{label:a(l)("Save"),onAction:w,disabled:!r.value}},null,8,["tertiary","secondary","primary"])]),default:g(()=>[u("div",rh,[m(Pt,{tag:"div",size:"large",class:"WordLimitDialog__subtitle"},{default:g(()=>[I(h(a(l)("Define a maximum word count for student texts.")),1)]),_:1}),u("div",lh,[m(Pt,{tag:"div",size:"medium",class:"WordLimitDialog__label"},{default:g(()=>[I(h(a(l)("Max number of words")),1)]),_:1}),m(Ti,{modelValue:i.value,"onUpdate:modelValue":C[0]||(C[0]=k=>i.value=k),hasError:!r.value,ariaLabel:a(l)("Max number of words")},null,8,["modelValue","hasError","ariaLabel"]),c.value?(f(),T(it,{key:0,severity:"error",variant:"simple"},{default:g(()=>[I(h(c.value),1)]),_:1})):S("",!0)]),u("div",uh,[m(mn,{level:4,size:"small",class:"WordLimitDialog__consequence-heading"},{default:g(()=>[I(h(a(l)("Consequence")),1)]),_:1}),m(Pt,{tag:"p",size:"medium",class:"WordLimitDialog__consequenceSubtitle"},{default:g(()=>[I(h(a(l)("What should happen if the limit is exceeded?")),1)]),_:1}),u("div",dh,[(f(),x(me,null,Pe(p,(k,E)=>m(Kt,{key:E,label:k,selected:d.value===E,onClick:A=>d.value=E},null,8,["label","selected","onClick"])),64))])])])]),_:1},8,["visible"]))}}),mh=W(ch,[["__scopeId","data-v-496a54b5"]]),fh={name:"ConfigurationsWriteArea",components:{ConfigurationsSubSection:Oe,ConfigurationsBodyText:Ee,WriteAreaTemplate:Om,BaseDropdown:We,WordLimitDialog:mh},setup(){const e={soft:l("Warn only"),hard:l("Prevent continued writing")};return{examCreatorStore:ue(),limitEnforcementOptions:e}},data(){return{previousWriteAreaTemplate:"",showWordLimitDialog:!1}},computed:{selectedWriteAreaOption:{get(){return this.examCreatorStore.writeArea===!1?"disabled":this.examCreatorStore.content.template!==""?"custom":this.examCreatorStore.resources.prepareStudentArea?"mirror":"empty"},set(e){switch(this.examCreatorStore.writeAreaManuallySet=!0,this.examCreatorStore.content.template&&e!=="custom"&&(this.previousWriteAreaTemplate=this.examCreatorStore.content.template),e){case"empty":this.examCreatorStore.writeArea=!0,this.examCreatorStore.content.template="",this.examCreatorStore.resources.prepareStudentArea=!1;break;case"mirror":this.examCreatorStore.writeArea=!0,this.examCreatorStore.resources.prepareStudentArea=!0,this.examCreatorStore.content.template="";break;
5case"custom":this.examCreatorStore.writeArea=!0,this.examCreatorStore.resources.prepareStudentArea=!1,this.previousWriteAreaTemplate&&(this.examCreatorStore.content.template=this.previousWriteAreaTemplate),this.examCreatorStore.content.template||(this.examCreatorStore.content.template=this.examCreatorStore.content.text||" ");break;case"disabled":this.examCreatorStore.writeArea=!1,this.examCreatorStore.resources.prepareStudentArea=!1,this.examCreatorStore.content.template="";break}}},wordLimitInfoText(){const e=this.examCreatorStore.resources.writeAreaSettings.wordLimit,t=this.examCreatorStore.resources.writeAreaSettings.limitEnforcement,o=`${e} ${this.__("words")}`;return t?`${o} - ${this.limitEnforcementOptions[t]}`:o},writeAreaOptions(){const e=[{value:"empty",label:this.__("Yes, blank sheet")},{value:"custom",label:this.__("Yes, define content")},{value:"disabled",label:this.__("No")}];return this.examCreatorStore.content.choice==="write"&&e.splice(2,0,{value:"mirror",label:this.__("Yes, mirror the exam questions")}),e},shouldShowWordLimitInfo(){return this.examCreatorStore.resources.writeAreaSettings.wordLimit&&this.examCreatorStore.writeArea},shouldShowResetTemplateButton(){return this.selectedWriteAreaOption==="custom"&&this.examCreatorStore.content.template!==this.examCreatorStore.content.text}},mounted(){this.examCreatorStore.isNewExam||this.setWriteAreaTemplate()},methods:{editTemplate(){this.selectedWriteAreaOption==="custom"&&(nt.$emit("show-write-area-template"),nt.$emit("set-template",this.examCreatorStore.content.template))},handleWordLimitSave(e,t){this.examCreatorStore.resources.writeAreaSettings.wordLimit=e,this.examCreatorStore.resources.writeAreaSettings.limitEnforcement=t},setWriteAreaTemplate(){nt.$emit("set-template",this.examCreatorStore.content.template)},updateWriteAreaTemplate(e){e!==this.examCreatorStore.content.template&&(this.examCreatorStore.content.template=e)}}},ph={class:"ConfigurationsWriteArea"},hh={class:"ConfigurationsWriteArea__template"},_h=["disabled"],gh=["disabled"],vh={key:0,class:"Configurations__write-area__word-limit-info"};function bh(e,t,o,n,s,i){const d=j("ConfigurationsBodyText"),c=j("BaseDropdown"),r=j("ConfigurationsSubSection"),p=j("WordLimitDialog"),_=j("WriteAreaTemplate");return f(),x("div",ph,[m(r,{title:e.__("Writing area")},{default:g(()=>[m(d,null,{default:g(()=>[I(h(e.__("Choose if you want students to have a writing area and what content it should have at exam start.")),1)]),_:1}),u("div",hh,[m(c,{modelValue:i.selectedWriteAreaOption,"onUpdate:modelValue":t[0]||(t[0]=v=>i.selectedWriteAreaOption=v),name:"writeAreaTemplate",options:i.writeAreaOptions,class:"ConfigurationsWriteArea__template__dropdown"},null,8,["modelValue","options"]),u("button",{disabled:i.selectedWriteAreaOption!=="custom",class:"ConfigurationsWriteArea__template__edit-button",onClick:t[1]||(t[1]=(...v)=>i.editTemplate&&i.editTemplate(...v))},h(e.__("Edit")),9,_h)]),u("button",{disabled:!["custom","empty","mirror"].includes(i.selectedWriteAreaOption),class:"ConfigurationsWriteArea__word-limit",onClick:t[2]||(t[2]=v=>s.showWordLimitDialog=!0)},h(e.__("Limit the number of words")),9,gh),i.shouldShowWordLimitInfo?(f(),x("span",vh," ("+h(i.wordLimitInfoText)+") ",1)):S("",!0)]),_:1},8,["title"]),m(p,{visible:s.showWordLimitDialog,"onUpdate:visible":t[3]||(t[3]=v=>s.showWordLimitDialog=v),wordLimit:n.examCreatorStore.resources.writeAreaSettings.wordLimit||500,limitEnforcement:n.examCreatorStore.resources.writeAreaSettings.limitEnforcement||"soft",onSave:i.handleWordLimitSave},null,8,["visible","wordLimit","limitEnforcement","onSave"]),m(_,{bucket:n.examCreatorStore.bucket,onUpdate:i.updateWriteAreaTemplate,onUndo:i.setWriteAreaTemplate},null,8,["bucket","onUpdate","onUndo"])])}const yh=W(fh,[["render",bh],["__scopeId","data-v-ad551463"]]),Sh={class:"SEBExternalResourcesConfigModal__content"},wh=["href"],xh=["alt"],kh=["href"],Ch={class:"SEBExternalResourcesConfigModal__footer"},Eh=Y({__name:"SEBExternalResourcesConfigModal",props:{showModal:{type:Boolean,default:!1},showModalModifiers:{},mode:{default:"0"},modeModifiers:{}},emits:["update:showModal","update:mode"],setup(e){const t=fe(e,"showModal"),o=fe(e,"mode"),n=window.K$.locale.sv==="sv"?"https://support.exam.net/s/article/lagga-till-en-resurs-pdfer-webbsidor-formular-moln-filer-videoklipp?language=sv":"https://support.exam.net/s/article/add-a-resource-pdf-external-website-video-embedding?language=en_US",s=window.K$.locale.sv==="sv"?"https://support.exam.net/s/article/installera-hogsakerhetslage-exam-net-appen-seb-kiosk-app-till-chromebook?language=sv#Windowsheader":"https://support.exam.net/s/article/install-high-security-software-seb-exam-net-app-kiosk-app-for-chromebooks?language=en_US#SEBWindows",i=[{id:0,label:l("Students can go to any available links")},{id:1,label:l("Students can only go to links within the domain")},{id:2,label:l("Students are locked to the exact link")}],d=lo("modalRef");oe(t,p=>{p!==void 0&&(p?c():r())});function c(){pe.show(d.value)}function r(){pe.hide(d.value)}return(p,_)=>(f(),T(at,{ref_key:"modalRef",ref:d,size:"md",class:"SEBExternalResourcesConfigModal",noPadding:"",onHidden:_[3]||(_[3]=v
5=>t.value=!1)},{body:g(()=>[m(wa,{show:"",onClose:_[2]||(_[2]=v=>t.value=!1)},{default:g(()=>[u("div",null,[u("div",Sh,[u("h3",null,h(a(l)("Advanced SEB settings")),1),u("p",null,h(a(l)("This allows students to visit websites alongside their exam inside SEB. You can allow only specific webpages (URLs) or entire domains.")),1),u("p",null,[I(h(a(l)("Before using this feature with students, test it yourself in SEB to make sure the allowed websites work as expected and all other websites are blocked. Because this feature depends on SEB, there are aspects Exam.net cannot control. For example, entering a root domain (like en.wikipedia.org/) will allow all pages within the domain to be allowed regardless of the configured option."))+" ",1),u("a",{href:a(n),target:"_blank"},h(a(l)("Read more")),9,wh)]),u("h5",null,h(a(l)("Restrictions for websites"))+":",1),m(Ho,{name:"externalResourcesAdvancedModeSetting",options:i,initialSelectedOptionId:Number(o.value),"onUpdate:initialSelectedOptionId":_[0]||(_[0]=v=>o.value=String(v))},null,8,["initialSelectedOptionId"]),m(jo,{noClosing:""},{mainText:g(()=>[u("div",null,[u("img",{src:"https://exam.net/cdn/icons/seb-icon.png",alt:a(l)("SEB logo")},null,8,xh),u("p",null,[I(h(a(l)("For the best experience, make sure students use the recommended version of SEB."))+" ",1),u("a",{href:a(s),target:"_blank"},h(a(l)("Read more")),9,kh)])])]),_:1})]),u("div",Ch,[m(he,{label:a(l)("Save and close"),onClick:_[1]||(_[1]=v=>t.value=!1)},null,8,["label"])])])]),_:1})]),_:1},512))}}),Th=W(Eh,[["__scopeId","data-v-56f7522f"]]),Mh={class:"SEBExternalResourcesConfigToggle"},Ih={class:"SEBExternalResourcesConfigToggle__label"},Ah={key:0,class:"SEBExternalResourcesConfigToggle__mode"},$h=Y({__name:"SEBExternalResourcesConfigToggle",props:Re({showBasicLicenseLock:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},{toggle:{type:Boolean},toggleModifiers:{},mode:{default:void 0},modeModifiers:{},showModal:{type:Boolean,default:!1},showModalModifiers:{}}),emits:["update:toggle","update:mode","update:showModal"],setup(e){const t=fe(e,"toggle"),o=fe(e,"mode"),n=fe(e,"showModal"),s={0:l("Students can go to any available links"),1:l("Students can only go to links within the domain"),2:l("Students are locked to the exact link")},i=F(()=>o.value===void 0?"":s[o.value]);return oe(t,d=>{d!==void 0&&(d&&o.value===void 0&&(o.value="0"),n.value=d)}),(d,c)=>(f(),x(me,null,[u("div",Mh,[u("div",Ih,[m(Zo,{showBasicLicenseLock:e.showBasicLicenseLock},{default:g(()=>[I(h(a(l)("Enable advanced features â only for use with Safe Exam Browser (SEB)")),1)]),_:1},8,["showBasicLicenseLock"]),t.value&&o.value?(f(),x("div",Ah,[m(_e,{width:"20",svg:a(Pi)},null,8,["svg"]),u("span",null,h(i.value),1),m(fi,{svgIcon:a(Mi),label:"Change Mode",hideLabel:"",size:"small",onClick:c[0]||(c[0]=r=>n.value=!0)},null,8,["svgIcon"])])):S("",!0)]),m(le,{modelValue:t.value,"onUpdate:modelValue":c[1]||(c[1]=r=>t.value=r),disabled:e.disabled,class:"ConfigurationsStudentWorkspace__subject-choice__toggle","data-testid":"toggle-seb-external-resources"},null,8,["modelValue","disabled"])]),m(Th,{showModal:n.value,"onUpdate:showModal":c[2]||(c[2]=r=>n.value=r),mode:o.value,"onUpdate:mode":c[3]||(c[3]=r=>o.value=r)},null,8,["showModal","mode"])],64))}}),Ph=W($h,[["__scopeId","data-v-c4c24379"]]),Dh={class:"ExternalResources__move"},Lh=["title","onClick"],Fh=["title","onClick"],Nh={class:"ExternalResources__body"},Oh={class:"ExternalResources__content"},Bh={class:"ExternalResources__main"},Rh=["title"],Uh={class:"ExternalResources__url"},zh=["href"],Vh={class:"ExternalResources__actions"},Wh={class:"AddResourceDialog__field"},qh={class:"ElCaption"},jh={class:"AddResourceDialog__field"},Hh={class:"ElCaption"},Gh={class:"UrlInput"},Zh=["title"],Yh={key:0,class:"AddResourceDialog__field AddResourceDialog__hidden-toggle"},Jh={class:"AddResourceDialog__hidden-toggle-row"},Qh={class:"AddResourceDialog__hidden-help ElCaption"},Kh={class:"ModalIframe"},Xh={key:0,class:"ModalIframe__frame"},e_=["src"],t_={key:1,class:"ModalIframe__placeholder"},o_={class:"ModalIframe__placeholder-inner"},n_={class:"ModalIframe__placeholder-text"},s_={class:"ModalIframe__faq"},a_=["href"],i_={class:"AddResourceDialog__footer"},r_=Y({__name:"ConfigurationsExternalResources",setup(e){const t=ue(),{isRestricted:o}=ut(),n=F({get:()=>t.resources.externalAdvancedModeSetting.enabled,set:L=>{t.resources.externalAdvancedModeSetting.enabled=L}}),s=F(()=>!n.value&&o("advancedSEBSettings")),i=M(!1),d=M(null),c=M(""),r=M({name:"",url:"",hidden:!1,key:Et.random(20)}),p=M(""),_=M(0);let v=null;oe(()=>r.value.url,L=>{if(!L){v&&clearTimeout(v),p.value="";return}const D=L.trim(),N=D.replace(/^https?:\/\//i,"");/^https?:\/\//i.test(D)&&N!==L&&(r.value.url=N),v&&clearTimeout(v),v=setTimeout(()=>{p.value=N},300)},{immediate:!0}),oe(()=>t.resources.external,L=>
5{L.forEach(D=>{D.key||(D.key=Et.random(20))})},{immediate:!0}),oe(()=>r.value,L=>{c.value==="name"&&L.name&&(c.value=""),c.value==="url"&&L.url&&(c.value="")},{deep:!0});function w(L){typeof L=="number"?(d.value=L,r.value=JSON.parse(JSON.stringify(t.resources.external[L]))):(d.value=null,r.value={name:"",url:"",hidden:!1,key:Et.random(20)}),c.value="",i.value=!0}function y(){d.value=null,r.value={name:"",url:"",hidden:!1,key:Et.random(20)},c.value="",i.value=!1}const C=F(()=>d.value!==null?l("Edit allowed URL"):l("Add allowed URL")),k=F(()=>d.value!==null?l("Save"):l("Add")),E=F(()=>He("sv")?"https://support.exam.net/s/article/varfor-fungerar-inte-den-externa-resursen-jag-har-lagt-till-i-provet?language=sv":"https://support.exam.net/s/article/why-cant-the-students-access-the-external-resource-i-added-to-the-exam?language=en_US");function A(L,D){if(D==="up"&&L===0||D==="down"&&L===t.resources.external.length-1)return;const N=D==="up"?L-1:L+1,$=t.resources.external[L];t.resources.external[L]=t.resources.external[N],t.resources.external[N]=$}function R(){if(c.value="",!r.value.name){c.value="name";return}if(!r.value.url){c.value="url";return}r.value.url=X(r.value.url);const L=JSON.parse(JSON.stringify(r.value));d.value!==null?(t.resources.external.splice(d.value,1,L),d.value=null):t.resources.external.unshift(L),r.value={name:"",url:"",hidden:!1,key:Et.random(20)},i.value=!1}function B(L){try{if(!L)return!1;const D=new URL(X(L)),$=D.hostname.split(".");return $.length<2||$[$.length-1].length<2?!1:!!D}catch(D){return!1}}function X(L){return L?L.startsWith("http")?L:`https://${L}`:""}function O(L){t.resources.external.splice(L,1)}return(L,D)=>{const N=we("tooltip");return f(),x("div",null,[m(Fe,null,{default:g(()=>[D[7]||(D[7]=u("i",{class:"fa fa-link tool-icon"},null,-1)),I(h(a(l)("Allowed URLs")),1)]),_:1}),m(ve,{class:"AddResourceButton",label:a(l)("Add external resource"),onClick:w},null,8,["label"]),m(Ph,{toggle:a(t).resources.externalAdvancedModeSetting.enabled,"onUpdate:toggle":D[0]||(D[0]=$=>a(t).resources.externalAdvancedModeSetting.enabled=$),mode:a(t).resources.externalAdvancedModeSetting.option,"onUpdate:mode":D[1]||(D[1]=$=>a(t).resources.externalAdvancedModeSetting.option=$),showBasicLicenseLock:a(o)("advancedSEBSettings"),disabled:s.value},null,8,["toggle","mode","showBasicLicenseLock","disabled"]),m($o,{name:"group-list",tag:"div"},{default:g(()=>[(f(!0),x(me,null,Pe(a(t).resources.external,($,q)=>(f(),T(Ao,{key:$.key,class:"ExternalResources"},{default:g(()=>[u("div",Dh,[G(u("i",{role:"button",tabindex:"0",title:a(l)("Move up"),class:re(["fa fa-chevron-up group-actions",{disabled:q===0}]),onClick:H=>A(q,"up")},null,10,Lh),[[N,a(l)("Move up")]]),G(u("i",{role:"button",tabindex:"0",title:a(l)("Move down"),class:re(["fa fa-chevron-down group-actions",{disabled:q===a(t).resources.external.length-1}]),onClick:H=>A(q,"down")},null,10,Fh),[[N,a(l)("Move down")]])]),u("div",Nh,[u("div",Oh,[u("div",Bh,[m(Fe,{class:"ExternalResources__title"},{default:g(()=>[I(h($.name)+" ",1),$.hidden?G((f(),x("i",{key:0,class:"ExternalResources__hidden-icon fa fa-eye-slash",title:a(l)("Hidden from student menu")},null,8,Rh)),[[N,a(l)("Hidden from student menu")]]):S("",!0)]),_:2},1024),u("div",Uh,[D[8]||(D[8]=u("i",{class:"fa fa-link"},null,-1)),u("a",{href:$.url,target:"_blank",rel:"noopener noreferrer"},h($.url),9,zh)])]),u("div",Vh,[m(eo,{icon:"pencil",label:a(l)("Edit"),buttonSize:"small",iconSize:"small",onClick:H=>w(q)},null,8,["label","onClick"]),m(eo,{icon:"trash",label:a(l)("Delete"),buttonSize:"small",iconSize:"small",onClick:H=>O(q)},null,8,["label","onClick"])])])])]),_:2},1024))),128))]),_:1}),G(m(rt,{mode:"secondary",allowHtml:"",class:"ConfigurationsExternalResources__warning",text:a(l)("Important: To use this function you must enable the high lockdown mode, or disable lockdown completely. Certain websites cannot be displayed inside the exam unless <a href='https://support.exam.net/s/article/add-a-resource-pdf-external-website-video-embedding?language=en_US#extendedsebfunctions' target='_blank' rel='noopener'>Advanced SEB features</a> are active. When using other browsers or applications, please test it by entering the exam as a student.")},null,8,["text"]),[[ce,a(t).resources.external.length>0]]),m(ro,{visible:i.value,"onUpdate:visible":D[6]||(D[6]=$=>i.value=$),header:C.value,modal:"",class:"AddResourceDialog",closable:"",onHide:y},{footer:g(()=>[u("div",i_,[m(ve,{label:a(l)("Cancel"),onClick:y},null,8,["label"]),m(he,{class:"AddResourceDialog__submit",label:k.value,onClick:R},null,8,["label"])])]),default:g(()=>[u("div",null,[m(Je,{mode:"secondary",allowHtml:"",text:a(l)("Important: To use this function you must enable the high lockdown mode, or disable lockdown completely. Certain websites cannot be displayed inside the exam unless <a href='https://support.exam.net/s/article/add-a-resource-pdf-external-website-video-embedding?language=en_US#extendedsebfunctions' target='_blank' rel='noopener'>Advanced SEB features</a> are active. When using other browsers or applications, please test it by entering the exam as a student.")},null,8,["text"]),u("div",Wh,[u("label",qh,h(a(l)("Title")),1),m(no,{modelValue:r.value.name,"onUpdate:modelValue":D[2]||(D[2]=$=>r.value.name=$),class:re([{"p-input-error":c.value==="name"},"AddResourceDialog__title-input"]),placeholder:"E.g. Wikipedia"},null,8,["modelValue","class"]),c.value==="name"?(f(),T(it,{key:0,severity:"error",variant:"simple",class:"small-text"},{default:g(()=>[I(h(a(l)("The resource must have a name")),1)]),_:1})):S("",!0)]),u("div",jh,[u("label",Hh,h(a(l)("URL")),1),u("div",Gh,[D[9]||(D[9]=u("span",{class:"UrlInput__prefix"},"https://",-1)),m(no,{modelValue:r.value.url,"onUpdate:modelValue":D[3]||(D[3]=$=>r.value.url=$),class:re([{"p-input-error":c.value==="url"},"UrlInput__input"]),placeholder:"E.g. en.wikipedia.org"},null,8,["modelValue","class"]),B(p.value)?G((f(),x("i",{key:0,class:"fa fa-refresh UrlInput__reset",role:"button",tabindex:"0",title:a(l)("Reload preview"),onClick:D[4]||(D[4]=$=>_.value++)},null,8,Zh)),[[N,a(l)("Reload preview")]]):S("",!0)]),c.value==="url"?(f(),T(it,{key:0,severity:"error",variant:"simple",class:"small-text"},{default:g(()=>[I(h(a(l)("The resource must have a URL")),1)]),_:1})):S("",!0)]),a(t).resources.externalAdvancedModeSetting.enabled?(f(),x("div",Yh,[u("div",Jh,[m(io,{modelValue:r.value.hidden,"onUpdate:modelValue":D[5]||(D[5]=$=>r.value.hidden=$),label:a(l)("Hide from student menu")},null,8,["modelValue","label"]),D[10]||(D[10]=u("i",{class:"AddResourceDialog__hidden-icon fa fa-eye-slash","aria-hidden":"true"},null,-1))]),u("div",Qh,h(a(l)("The URL will still be allowed, but no menu item will appear for the student.")),1)])):S("",!0),u("div",Kh,[B(p.value)?(f(),x("div",Xh,[(f(),x("iframe",{key:_.value,src:X(p.value),frameborder:"0",sandbox:"allow-same-origin allow-scripts allow-forms allow-popups"}
5,null,8,e_))])):(f(),x("div",t_,[u("div",o_,[D[11]||(D[11]=u("i",{class:"fa fa-eye-slash ModalIframe__placeholder-icon"},null,-1)),u("div",n_,h(a(l)("Enter a valid URL to preview the site here")),1)])]))]),u("div",s_,[u("a",{href:E.value,target:"_blank",rel:"noopener noreferrer"},h(a(l)("Why is my website not working?")),9,a_)])])]),_:1},8,["visible","header"])])}}}),l_=W(r_,[["__scopeId","data-v-a500adfd"]]),u_={class:"ConfigurationsSettingsContainer"},d_={class:"ConfigurationsSettingsContainer__content"},c_={class:"ConfigurationsSettingsContainer__left"},m_={class:"ConfigurationsSettingsContainer__header"},f_={class:"ConfigurationsSettingsContainer__right"},p_=Y({__name:"ConfigurationsSettingsContainer",props:{title:{},subtitle:{},helpAction:{type:Function},showBasicLicenseLock:{type:Boolean},isBeta:{type:Boolean}},setup(e){return(t,o)=>(f(),x("div",u_,[u("div",d_,[u("div",c_,[u("div",m_,[m(Fe,null,{default:g(()=>[I(h(e.title),1)]),_:1}),e.helpAction?(f(),T(_e,{key:0,svg:a(bs),width:"var(--width-4)",class:"ConfigurationsSettingsContainer__header__icon",onClick:e.helpAction},null,8,["svg","onClick"])):S("",!0),e.showBasicLicenseLock?(f(),T(Bt,{key:1,size:"small"})):S("",!0),e.isBeta?(f(),T(uo,{key:2})):S("",!0)]),e.subtitle?(f(),T(ne,{key:0,class:"ConfigurationsSettingsContainer__subtitle"},{default:g(()=>[I(h(e.subtitle),1)]),_:1})):S("",!0)]),u("div",f_,[Se(t.$slots,"default",{},void 0,!0)])])]))}}),Ys=W(p_,[["__scopeId","data-v-8b17a954"]]),h_={key:0,class:"PlaybackLimitSettings__allowPause"},__={class:"PlaybackLimitSettings__checkbox-wrapper"},g_=["disabled"],v_={class:"PlaybackLimitSettings__checkbox__label"},b_=Y({__name:"PlaybackLimitSettings",props:{modelValue:{},hasAudioFiles:{type:Boolean},usbEnabled:{type:Boolean},showBasicLicenseLock:{type:Boolean},isBeta:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const o=e,n=t,s=F(()=>!o.hasAudioFiles&&!o.usbEnabled),i=[{id:0,label:l("Unlimited")},{id:1,label:l(":singular time",{singular:"1"})},{id:2,label:l(":plural times",{plural:"2"})},{id:3,label:l(":plural times",{plural:"3"})},{id:4,label:l(":plural times",{plural:"4"})},{id:5,label:l(":plural times",{plural:"5"})},{id:6,label:l(":plural times",{plural:"6"})}],d=F({get:()=>o.modelValue.limitPlays,set:v=>{const w=v!=null?v:0;n("update:modelValue",{limitPlays:w,allowPause:w===0?!0:o.modelValue.allowPause})}}),c=F({get:()=>o.modelValue.allowPause,set:v=>{n("update:modelValue",{limitPlays:o.modelValue.limitPlays,allowPause:v})}}),r=()=>{s.value||(c.value=!c.value)},p=window.K$.locale.sv==="sv"?"https://support.exam.net/s/article/ljudfiler-i-prov?language=sv#elevbegransning":"https://support.exam.net/s/article/audio-files-in-an-exam?language=en_US#playbackteacher",_=()=>{window.open(p,"_blank")};return(v,w)=>(f(),T(Ys,{title:a(l)("Playback limit"),helpAction:_,showBasicLicenseLock:e.showBasicLicenseLock,isBeta:e.isBeta},{default:g(()=>[m(Ho,{initialSelectedOptionId:d.value,"onUpdate:initialSelectedOptionId":w[0]||(w[0]=y=>d.value=y),options:i,disabled:s.value,tooltipTextOnDisabled:a(l)("Before setting a limit, please upload audio files or enable audio files via USB")},null,8,["initialSelectedOptionId","disabled","tooltipTextOnDisabled"]),d.value!==0?(f(),x("div",h_,[u("div",__,[u("div",{class:re(["PlaybackLimitSettings__checkbox",{"PlaybackLimitSettings__checkbox--disabled":s.value}]),onClick:r},[G(u("input",{id:"allowPauseCheckbox","onUpdate:modelValue":w[1]||(w[1]=y=>c.value=y),type:"checkbox",class:"PlaybackLimitSettings__checkbox__input",disabled:s.value},null,8,g_),[[Ha,c.value]]),u("span",v_,h(a(l)("Allow pausing")),1)],2),s.value?(f(),T(xa,{key:0,top:"",wrapText:""},{default:g(()=>[I(h(a(l)("Before configuring pause settings, please upload audio files or enable audio files via USB")),1)]),_:1})):S("",!0)])])):S("",!0)]),_:1},8,["title","showBasicLicenseLock","isBeta"]))}}),y_=W(b_,[["__scopeId","data-v-3ca6be73"]]),S_={class:"icons"},w_={key:0,class:"fa fa-qrcode"},x_={key:1,class:"fa fa-file-text"},k_={class:"ConfigurationsStudentWorkspace__subject-choice"},C_={class:"ConfigurationsStudentWorkspace__subject-choice__info"},E_={class:"ConfigurationsStudentWorkspace__subject-choice"},T_={class:"ConfigurationsStudentWorkspace__subject-choice__info"},M_={class:"ConfigurationsStudentWorkspace__keep-files-local ConfigurationsStudentWorkspace__subject-choice"},I_={class:"ConfigurationsStudentWorkspace__subject-choice__info"},A_=["href"],$_={class:"ConfigurationsStudentWorkspace__collapsibles"},P_={class:"icons"},D_={href:"https://exam-audio.firebaseapp.com",target:"convert"},L_={class:"ExternalResources__move"},F_=["title","onClick"],N_=["title","onClick"],O_={style:{width:"100%"}},B_=["onClick"],R_={href:"https://exam-audio.firebaseapp.com",target:"convert"},U_={class:"ConfigurationsStudentWorkspace__subject-choice"},z_={class:"ConfigurationsStudentWorkspace__subject-choice__info"},V_={class:"icons"},W_={key:0,class:"fa fa-calculator"},q_={key:1,class:"geogebra-icon"},j_={key:2,class:"desmos"},H_={key:3,class:"fa fa-file-text-o"},G_=["alt"],Z_={key:5,class:"fa fa-code"},Y_={key:6,class:"fa fa-paint-brush"},J_={key:7,class:"fa fa-flask"},Q_={key:0,class:"ConfigurationsStudentWorkspace__subject-choice"},K_={class:"ConfigurationsStudentWorkspace__subject-choice__info"}
5,X_={class:"BackgroundImages"},eg=["href"],tg=["src"],og={style:{"text-align":"center"}},ng=["onClick"],sg={class:"ConfigurationsStudentWorkspace__subject-choice"},ag={class:"ConfigurationsStudentWorkspace__subject-choice__info"},ig={class:"ConfigurationsStudentWorkspace__subject-choice"},rg={class:"ConfigurationsStudentWorkspace__subject-choice__info"},lg={class:"ConfigurationsStudentWorkspace__subject-choice"},ug={class:"ConfigurationsStudentWorkspace__subject-choice__info"},dg={class:"ConfigurationsStudentWorkspace__subject-choice"},cg={class:"ConfigurationsStudentWorkspace__subject-choice__info"},mg={class:"ConfigurationsStudentWorkspace__subject-choice"},fg={class:"ConfigurationsStudentWorkspace__subject-choice__info"},pg={key:1,class:"ConfigurationsStudentWorkspace__subject-choice"},hg={class:"ConfigurationsStudentWorkspace__subject-choice__info"},_g={class:"ConfigurationsStudentWorkspace__subject-dropdown"},gg={class:"ConfigurationsStudentWorkspace__subject-dropdown"},vg={class:"icons"},bg={key:0,class:"fa fa-link"},yg={key:1,class:"fa fa-file-text-o"},Sg={class:"OwnFormulas__move"},wg=["title","onClick"],xg=["title","onClick"],kg={class:"ActionIcons"},Cg=["onClick"],Eg=["onClick"],Tg={class:"text-center"},Mg={class:"modal-title"},Ig={class:"text-center"},Ag={key:1},$g={key:2,class:"ConfigurationsStudentWorkspace__DocumentError"},Pg=Y({__name:"ConfigurationsStudentWorkspace",setup(e){const t=[{value:"0",label:l("None")},{value:"ps",label:l("Only the periodic table of Elements")},{value:"fs",label:l("Formulas, tables and the periodic table of Elements")}],o=[{value:"0",label:l("None")},{value:"9_21",label:l("Basic")},{value:"5_21",label:l("Advanced")},{value:"ib_aa",label:"IB Analysis and Approaches"},{value:"ib_ai",label:"IB Applications and Interpretation"},{value:"sqa_n5",label:"SQA Mathematics N5"},{value:"sqa_n5apps",label:"SQA Mathematics N5 Applications"},{value:"sqa_h",label:"SQA Mathematics Higher"},{value:"sqa_ah",label:"SQA Mathematics Advanced Higher"},{value:"nzqa_l2",label:"NZQA Level 2"},{value:"nsw_y1112",label:"NSW Mathematics Year 11-12"}],n=[{value:"0",label:l("None")},{value:"9_21",label:l("Year 9")},{value:"1_21",label:l("Mathematics 1")},{value:"2_21",label:l("Mathematics 2")},{value:"3_21",label:l("Mathematics 3")},{value:"4_21",label:l("Mathematics 4")},{value:"5_21",label:l("Mathematics")+" 5"},{value:"_spec",label:"Mathematics spec."},{value:"ib_aa",label:"IB Analysis and Approaches"},{value:"ib_ai",label:"IB Applications and Interpretation"},{value:"sqa_n5",label:"SQA Mathematics N5"},{value:"sqa_n5apps",label:"SQA Mathematics N5 Applications"},{value:"sqa_h",label:"SQA Mathematics Higher"},{value:"sqa_ah",label:"SQA Mathematics Advanced Higher"},{value:"nzqa_l2",label:"NZQA Level 2"},{value:"nsw_y1112",label:"NSW Mathematics Year 11-12"}],s=[{value:"classic",label:"GeoGebra Classic"},{value:"suite",label:"GeoGebra Suite"},{value:"graphing",label:"GeoGebra Graphing"},{value:"geometry",label:"GeoGebra Geometry"},{value:"cas",label:"GeoGebra CAS"},{value:"scientific",label:"GeoGebra Scientific"}],i=Qa().sort((U,b)=>U.label===l("No")?-1:b.label===l("No")?1:U.label.localeCompare(b.label)),d=[{value:"images",label:l("Images")},{value:"pdf",label:"PDF"},{value:"documents",label:"Word, Excel, PowerPoint"}],c=[{id:1,label:l("All students can access")},{id:0,label:l("Individual students")}],r=ue(),p=Ga(),{showDialog:_,bookingUrl:v,requiresLicenseUpgrade:w,isRestricted:y}=ut(),C=M(null),k=M(null),E=M(null),A=M(null),R=M(null),B=M({type:"",message:""}),X=M(!1),O=M(!1),L=F({get:()=>r.viewMode==="question",set:U=>{r.viewMode=U?"question":"exam"}}),D=F({get:()=>!!r.resources.geogebra,set:U=>r.resources.geogebra=U?"classic":""}),N=F(()=>r.resources.audioSettings.usb||r.resources.audioFiles.length),$=F({get:()=>{var U;return{limitPlays:r.resources.audioSettings.limitPlays||0,allowPause:(U=r.resources.audioSettings.allowPause)!=null?U:!0}},set:U=>{U.limitPlays>0&&w("audioLimits")||(r.resources.audioSettings.limitPlays=U.limitPlays,r.resources.audioSettings.allowPause=U.allowPause)}}),q=F({get:()=>r.resources.audio?1:0,set:U=>{r.resources.audio=U===1}}),H=F(()=>Ca(r.content.choice,r.writeArea));oe(()=>r.resources.fileUpload,U=>{U&&!r.resources.fileUploadTypes&&(r.resources.fileUploadTypes=["images","pdf","documents"])},{immediate:!0}),oe(()=>r.writeArea,()=>{H.value||(r.resources.camera=!1,r.resources.drawingArea=!1)},{immediate:!0});function xe(U){U.target instanceof HTMLInputElement&&U.target.value&&(U.target.value="")}function $e(U){window.dataLayer.push({event:"track_product_clicks_create_exam",additional_data:U})}function ze(U){r.resources.audioFiles.splice(U,1)}function je(U){!r.resources.backgroundImages||!r.resources.backgroundImages.length||r.resources.backgroundImages.splice(r.resources.backgroundImages.indexOf(U),1)}function ke(U,b){if(b==="up"&&U===0||b==="down"&&U===r.ownFormulas.length-1)return;const V=b==="up"?U-1:U+1,Z=r.ownFormulas[U];r.ownFormulas[U]=r.ownFormulas[V],r.ownFormulas[V]=Z}function Ge(U,b){if(b==="up"&&U===0||b==="down"&&U===r.resources.audioFiles.length-1)return;const V=b==="up"?U-1:U+1,Z=r.resources.audioFiles[U];r.resources.audioFiles[U]=r.resources.audioFiles[V],r.resources.audioFiles[V]=Z}
5function ct(U){r.ownFormulas.splice(U,1)}function Xe(U){window.open(U)}function mt(){!C.value||!C.value.files||[...C.value.files].forEach(U=>{const b={givenName:"",name:"",path:"",when:"before",password:"",uploadInProgress:!0};r.resources.audioFiles.push(b);const V=r.resources.audioFiles.length-1;if(!bo.validSize(U)){B.value.type="AudioSize",B.value.message="",ze(V);return}if(!bo.validExtension(U)){B.value.type="AudioFormat",B.value.message="",ze(V);return}bo.upload(r.bucket,U).then(Z=>{r.resources.audioFiles[V]=ee(z({},b),{uploadInProgress:!1,name:U.name,givenName:U.name,path:Z}),(B.value.type==="AudioSize"||B.value.type==="AudioFormat"||B.value.type==="AudioGeneric")&&(B.value.type="",B.value.message="")}).catch(Z=>{B.value.type="AudioGeneric",B.value.message="",ze(V),console.log(Z)})})}function ft(){return Q(this,null,function*(){var U;if(!(!k.value||!k.value.files)){X.value=!0;for(const b of k.value.files){if(!b)continue;const V=yield Qe.uploadCached(r.bucket,b);r.resources.backgroundImages.push(V),(U=p==null?void 0:p.proxy)==null||U.$forceUpdate()}X.value=!1}})}function et(U){if(!E.value||!E.value.files)return;const b=E.value.files[0];if(!b)return;if(!Be(b,"pdf")){pe.show(A.value);return}B.value.type="",O.value=!0;const V=document.querySelector("#presentUploadedFormula");if(!V)return;V.innerHTML="";const Z=b.name.endsWith(".pdf")?b.name.slice(0,-4):b.name;Do.upload({bucket:r.bucket,file:b,sizeLimitMB:50}).then(P=>{const{urls:te,documentPDF:ge}=P;pt(te,"#presentUploadedFormula").then(()=>{O.value=!1}),r.ownFormulas.push({documentPages:te,documentPDF:ge,name:Z||"Extra "+(r.ownFormulas.length+1)})}).catch(P=>{P.message==="File size too large."?(B.value.type="PDFsize",B.value.message=l("The file is too large. Maximum size is 50 MB.")):P.message==="No password given"?(B.value.type="PDFPassword",B.value.message=l("The file you have chosen is password protected. You need to remove the password protection before you can upload the file.")):(B.value.type="PDFGeneric",B.value.message=l("An error occurred. Please try again or contact [email protected] if the problem persists."))}).finally(()=>{O.value=!1}),pe.show(R.value),U.target instanceof HTMLInputElement&&U.target.value&&(U.target.value="")}function pt(U,b){return Ci.view(document.querySelector(b),{documentPages:U})}function Be(U,b){const V=U.name;return V.slice((V.lastIndexOf(".")-1>>>0)+2).toLowerCase()===b.toLowerCase()}function ht(){const U=window.K$.locale.sv==="sv"?"https://support.exam.net/s/article/ljudfiler-i-prov?language=sv#access":"https://support.exam.net/s/article/audio-files-in-an-exam?language=en_US#access";window.open(U)}return(U,b)=>{const V=j("ElInline"),Z=we("tooltip");return f(),T(kt,{id:"StudentWorkspace",class:"ConfigurationsStudentWorkspace",title:a(l)("Student workspace")},{default:g(()=>[a(r).content.choice==="builder"?(f(),T(Oe,{key:0,modelValue:L.value,"onUpdate:modelValue":b[0]||(b[0]=P=>L.value=P),title:a(l)("Display one question at a time"),supportLink:a(ae)(a(se).oneQuestionAtATime)},{default:g(()=>[m(Ee,null,{default:g(()=>[I(h(a(l)("The students will view one question at a time but have the ability to navigate between questions.")),1)]),_:1})]),_:1},8,["modelValue","title","supportLink"])):S("",!0),a(r).content.choice!=="builder"?(f(),T(yh,{key:1})):S("",!0),G(u("div",null,[m(Oe,{title:a(l)("Spellcheck"),supportLink:a(ae)(a(se).spellcheck)},{default:g(()=>[m(Ee,null,{default:g(()=>[I(h(a(l)("Checks the spelling and gives suggestions to misspelled words.")),1)]),_:1}),m(We,{modelValue:a(r).spellChecking,"onUpdate:modelValue":b[1]||(b[1]=P=>a(r).spellChecking=P),name:"spellChecking",options:a(i)},null,8,["modelValue","options"])]),_:1},8,["title","supportLink"]),a(r).forPractice?S("",!0):(f(),T(At,{key:0,class:"ConfigurationsStudentWorkspace__item",title:a(l)("Student uploads"),icon:"upload",mediumTitle:"",onClick:b[7]||(b[7]=P=>$e("collapsible_upload-additional-work"))},{icons:g(()=>[u("div",S_,[a(r).resources.camera?(f(),x("i",w_)):S("",!0),a(r).resources.fileUpload?(f(),x("i",x_)):S("",!0)])]),default:g(()=>[u("div",k_,[m(le,{modelValue:a(r).resources.camera,"onUpdate:modelValue":b[2]||(b[2]=P=>a(r).resources.camera=P),class:"ConfigurationsStudentWorkspace__subject-choice__toggle","aria-label":a(l)("Via a phone with QR scanner")},null,8,["modelValue","aria-label"]),u("div",C_,[m(ye,{class:"ConfigurationsStudentWorkspace__subject-choice__info__heading",supportLink:a(ae)(a(se).phoneQRScanner)},{default:g(()=>[I(h(a(l)("Via a phone with QR scanner")),1)]),_:1}
5,8,["supportLink"]),m(ne,null,{default:g(()=>[I(h(a(l)("Ger eleven möjlighet att använda en telefon för att bifoga handskriva lösningar. Det krävs ingen särskild app men en valfri QR-läsare (finns inbyggd i kameran i moderna telefoner).")),1)]),_:1})])]),u("div",E_,[m(le,{modelValue:a(r).resources.fileUpload,"onUpdate:modelValue":b[3]||(b[3]=P=>a(r).resources.fileUpload=P),class:"ConfigurationsStudentWorkspace__subject-choice__toggle","aria-label":a(l)("Via computer files")},null,8,["modelValue","aria-label"]),u("div",T_,[m(ye,{class:"ConfigurationsStudentWorkspace__subject-choice__info__heading",supportLink:a(ae)(a(se).computerFiles)},{default:g(()=>[I(h(a(l)("Via computer files")),1)]),_:1},8,["supportLink"]),m(ne,null,{default:g(()=>[I(h(a(l)("The student will be able to access their computer files in order to upload additional files to the exam.")),1)]),_:1}),a(r).resources.fileUpload?(f(),x(me,{key:0},[m(Fe,null,{default:g(()=>[I(h(a(l)("File types allowed")),1)]),_:1}),m(Ei,{modelValue:a(r).resources.fileUploadTypes,"onUpdate:modelValue":b[4]||(b[4]=P=>a(r).resources.fileUploadTypes=P),options:d,optionLabel:"label",optionValue:"value",placeholder:a(l)("Select file types"),showToggleAll:!1,class:"ConfigurationsStudentWorkspace__fileUploadTypes"},null,8,["modelValue","placeholder"]),a(r).errors.invalidFileUploadTypes?(f(),T(it,{key:0,severity:"error",variant:"simple",class:"ConfigurationsStudentWorkspace__fileUpload-error"},{default:g(()=>[I(h(a(l)("You must select at least one file type to enable file uploads")),1)]),_:1})):S("",!0),u("div",M_,[m(le,{modelValue:a(r).resources.keepFilesLocal,"onUpdate:modelValue":b[5]||(b[5]=P=>a(r).resources.keepFilesLocal=P),class:"ConfigurationsStudentWorkspace__subject-choice__toggle"},null,8,["modelValue"]),u("div",I_,[m(Fe,null,{default:g(()=>[I(h(a(l)("Keep storage local (Only applicable for PDFs)")),1)]),_:1}),m(ne,null,{default:g(()=>[I(h(a(l)("If enabled, the uploaded content is not shared with Exam.net. Students should only upload instructive resources, not work to be submitted via Exam.net."))+" ",1),u("a",{href:a(He)("sv")?"https://support.exam.net/s/article/kan-elever-ladda-upp-filer-till-ett-prov?language=en_US":"https://support.exam.net/s/article/upload-images-as-a-student?language=en_US",target:"_blank",rel:"noopener noreferrer"},h(a(l)("More info")),9,A_)]),_:1})])]),m(Fe,null,{default:g(()=>[I(h(a(l)("Password for file upload (optional)")),1)]),_:1}),m(ne,null,{default:g(()=>[I(h(a(l)("The password is required to access the file upload dialog during the exam.")),1)]),_:1}),m(ne,null,{default:g(()=>[I(h(a(l)("If set, students must enter this password before they can upload files.")),1)]),_:1}),m(Mt,{modelValue:a(r).resources.fileUploadPassword,"onUpdate:modelValue":b[6]||(b[6]=P=>a(r).resources.fileUploadPassword=P),placeholder:a(l)("Leave empty to allow free access")},null,8,["modelValue","placeholder"]),m(Je,{mode:"secondary",class:"ConfigurationsStudentWorkspace__fileUpload-info",text:a(l)("Ensure high lockdown mode is enabled, or disable lockdown completely. In medium lockdown mode, accessing computer files will lock students out of the exam")},null,8,["text"])],64)):S("",!0)])])]),_:1},8,["title"])),b[31]||(b[31]=u("div",{class:"ConfigurationsStudentWorkspace__section-spacing"},null,-1))],512),[[ce,a(r).writeArea||a(r).content.choice==="builder"]]),u("div",$_,[m(At,{mediumTitle:"",class:"ConfigurationsStudentWorkspace__item",title:a(l)("Audio files"),icon:"headphones",supportLink:a(ae)(a(se).audioFiles),onClick:b[13]||(b[13]=P=>$e("collapsible_audiofiles"))},{icons:g(()=>[u("div",P_,[N.value||a(r).resources.audioFiles.length>0?(f(),T(_e,{key:0,svg:a(ka),width:"var(--width-4)"},null,8,["svg"])):S("",!0)])]),default:g(()=>[m(Ee,null,{default:g(()=>[I(h(a(l)("Audio files can be useful for listening exams, as well as for students with reading disabilities. You can activate the audio files for all students, or on an individual basis when monitoring an exam.")),1)]),_:1}),m(Ee,null,{default:g(()=>[I(h(a(l)("The audio files must be in .mp3 or .wav-format."))+" ",1),b[32]||(b[32]=u("br",null,null,-1)),I(" "+h(a(l)("If you have files in another format"))+" ",1),u("a",D_,h(a(l)("you can convert your files here")),1),b[33]||(b[33]=I(" . ",-1))]),_:1}),m($o,{name:"group-list",tag:"div"},{default:g(()=>[(f(!0),x(me,null,Pe(a(r).resources.audioFiles,(P,te)=>G((f(),T(Ao,{key:`audiofile-${P.path}`,class:"ExternalResources"},{default:g(()=>[u("div",L_,[G(u("i",{role:"button",tabindex:"0",title:a(l)("Move up"),class:re(["fa fa-chevron-up group-actions",{disabled:te===0}]),onClick:ge=>Ge(te,"up")},null,10,F_),[[Z,a(l)("Move up")]]),G(u("i",{role:"button",tabindex:"0",title:a(l)("Move down"),class:re(["fa fa-chevron-down group-actions",{disabled:te===a(r).resources.audioFiles.length-1}]),onClick:ge=>Ge(te,"down")},null,10,N_),[[Z,a(l)("Move down")]])]),u("div",O_,[u("div",null,[P.uploadInProgress?(f(),T(Fe,{key:0},{default:g(()=>[u("span",null,[b[34]||(b[34]=u("i",{class:"fa fa-spin fa-spinner"},null,-1)),I(" "+h(a(l)("Adding ...")),1)])]),_:1})):S("",!0),m(Mt,{modelValue:P.givenName,"onUpdate:modelValue":ge=>P.givenName=ge,placeholder:a(l)("Enter filename")+" ..."},{default:g(()=>[I(h(a(l)("Change title")),1)]),_:1},8,["modelValue","onUpdate:modelValue","placeholder"]),m(ne,null,{default:g(()=>[I(h(a(l)("The name will be displayed in the playback tool.")),1)]),_:1}
5)])]),u("i",{class:"ActionIcon fa fa-trash RemoveIcon",onClick:ge=>ze(te)},null,8,B_)]),_:2},1024)),[[ce,a(r).resources.audioFiles.length]])),128))]),_:1}),m(V,null,{default:g(()=>[C.value?(f(),T(ve,{key:0,style:{"margin-top":"var(--spacing-3)"},label:a(l)("Add audio file"),onClick:b[8]||(b[8]=P=>C.value.click())},null,8,["label"])):S("",!0)]),_:1}),B.value.type==="AudioFormat"?(f(),T(Dt,{key:0,type:"warning",smaller:"",class:"small-text"},{default:g(()=>[b[35]||(b[35]=u("br",null,null,-1)),u("h3",null,h(a(l)("Only mp3-files may be added")),1),u("p",null,h(a(l)("The audio file must be in mp3-format.")),1),u("p",null,h(a(l)("You can use our tool to convert the file to mp3.")),1),u("a",R_,[m(he,{label:a(l)("Open converter")},null,8,["label"])])]),_:1})):S("",!0),B.value.type==="AudioSize"?(f(),T(Dt,{key:1,type:"warning",smaller:"",class:"small-text"},{default:g(()=>[b[36]||(b[36]=u("br",null,null,-1)),u("h3",null,h(a(l)("The file is too large")),1),u("p",null,h(a(l)("Audio files uploaded can be a maximum of 300MB.")),1),u("p",null,h(a(l)("Remember that large files may take a moment to download on the student's computer. There are tools to divide files into parts.")),1)]),_:1})):S("",!0),B.value.type==="AudioGeneric"?(f(),T(Dt,{key:2,type:"warning",smaller:"",class:"small-text"},{default:g(()=>[b[37]||(b[37]=u("br",null,null,-1)),u("h3",null,h(a(l)("The audio file could not be uploaded")),1),u("p",null,h(a(l)("An error occurred. Please try again or contact [email protected] if the problem persists.")),1)]),_:1})):S("",!0),u("div",U_,[m(le,{modelValue:a(r).resources.audioSettings.usb,"onUpdate:modelValue":b[9]||(b[9]=P=>a(r).resources.audioSettings.usb=P),class:"ConfigurationsStudentWorkspace__subject-choice__toggle"},null,8,["modelValue"]),u("div",z_,[m(Fe,null,{default:g(()=>[I(h(a(l)("Allow students to import audio files via USB")),1)]),_:1}),m(ne,null,{default:g(()=>[I(h(a(l)("Using this option you will be able to add an audio file from a USB stick connected to the student's computer.")),1)]),_:1}),a(r).resources.audioSettings.usb?(f(),x(me,{key:0},[m(Fe,null,{default:g(()=>[I(h(a(l)("Password for file upload")),1)]),_:1}),m(Mt,{modelValue:a(r).resources.audioSettings.usbPassword,"onUpdate:modelValue":b[10]||(b[10]=P=>a(r).resources.audioSettings.usbPassword=P)},null,8,["modelValue"]),m(ne,null,{default:g(()=>[I(h(a(l)("The password is required to access the file upload dialog during the exam.")),1)]),_:1})],64)):S("",!0)])]),!a(r).forPractice&&N.value?(f(),T(y_,{key:3,modelValue:$.value,"onUpdate:modelValue":b[11]||(b[11]=P=>$.value=P),class:"ConfigurationsStudentWorkspace__playbackLimitSettings",hasAudioFiles:a(r).resources.audioFiles.length>0,usbEnabled:a(r).resources.audioSettings.usb,showBasicLicenseLock:a(y)("audioLimits")},null,8,["modelValue","hasAudioFiles","usbEnabled","showBasicLicenseLock"])):S("",!0),!a(r).forPractice&&N.value?(f(),T(Ys,{key:4,class:"ConfigurationsStudentWorkspace__apply-for-all",title:a(l)("Access Limit"),helpAction:ht,subtitle:q.value===0?a(l)("Activate the audio tool on an individual basis from the monitoring view"):void 0},{default:g(()=>[m(Ho,{initialSelectedOptionId:q.value,"onUpdate:initialSelectedOptionId":b[12]||(b[12]=P=>q.value=P),options:c},null,8,["initialSelectedOptionId"])]),_:1},8,["title","subtitle"])):S("",!0)]),_:1},8,["title","supportLink"]),b[45]||(b[45]=u("div",{class:"ConfigurationsStudentWorkspace__section-spacing"},null,-1)),m(At,{class:"ConfigurationsStudentWorkspace__item",title:a(l)("Subject tools"),icon:"calculator",mediumTitle:"",onClick:b[26]||(b[26]=P=>$e("collapsible_subject-tools"))},{icons:g(()=>[u("div",V_,[a(r).calculator?(f(),x("i",W_)):S("",!0),D.value?(f(),x("i",q_)):S("",!0),a(r).resources.desmos?(f(),x("i",j_)):S("",!0),Number(a(r).formulaChosen)!==0?(f(),x("i",H_)):S("",!0),a(r).resources.physicsFormulas?(f(),x("img",{key:4,class:"physics-icon",src:"https://static.exam.net/img/atomcore.png",alt:a(l)("An atom")},null,8,G_)):S("",!0),a(r).resources.programming?(f(),x("i",Z_)):S("",!0),a(r).resources.drawingArea?(f(),x("i",Y_)):S("",!0),Number(a(r).resources.chemistryFormulaChosen)!==0?(f(),x("i",J_)):S("",!0),a(r).resources.audioRecording?(f(),T(_e,{key:8,svg:a(fn),width:"var(--spacing-8)",height:"var(--spacing-8)",class:"audio-recording"},null,8,["svg"])):S("",!0)])]),default:g(()=>[H.value?(f(),x("div",Q_,[m(le,{modelValue:a(r).resources.drawingArea,"onUpdate:modelValue":b[14]||(b[14]=P=>a(r).resources.drawingArea=P),class:"ConfigurationsStudentWorkspace__subject-choice__toggle","data-testid":"toggle-drawing-area"},null,8,["modelValue"]),u("div",K_,[m(ye,{class:"ConfigurationsStudentWorkspace__subject-choice__info__heading",supportLink:a(ae)(a(se).drawingTool)},{default:g(()=>[b[38]||(b[38]=u("i",{class:"fa fa-paint-brush tool-icon"},null,-1)),I(h(a(l)("Drawing tool")),1)]),_:1}
5,8,["supportLink"]),m(ne,null,{default:g(()=>[I(h(a(l)("Gives the student a tool to draw pictures which can also be submitted at the end of the exam.")),1)]),_:1}),k.value?G((f(),T(ve,{key:0,style:{"margin-top":"var(--spacing-2)"},label:a(l)("Add background images"),loading:X.value,onClick:b[15]||(b[15]=P=>k.value.click())},null,8,["label","loading"])),[[ce,a(r).resources.drawingArea]]):S("",!0),u("div",X_,[(f(!0),x(me,null,Pe(a(r).resources.backgroundImages,P=>(f(),x("div",{key:P},[u("div",null,[u("a",{target:"_image",href:P},[u("img",{class:"ConfigurationsStudentWorkspace__background-image",src:P},null,8,tg)],8,eg)]),u("div",og,[u("i",{style:{cursor:"pointer"},class:"fa fa-trash",onClick:te=>je(P)},null,8,ng)])]))),128))])])])):S("",!0),u("div",sg,[m(le,{modelValue:a(r).calculator,"onUpdate:modelValue":b[16]||(b[16]=P=>a(r).calculator=P),class:"ConfigurationsStudentWorkspace__subject-choice__toggle","data-testid":"toggle-calculator"},null,8,["modelValue"]),u("div",ag,[m(ye,{class:"ConfigurationsStudentWorkspace__subject-choice__info__heading",supportLink:a(ae)(a(se).calculator)},{default:g(()=>[b[39]||(b[39]=u("i",{class:"fa fa-calculator tool-icon"},null,-1)),I(h(a(l)("Calculator")),1)]),_:1},8,["supportLink"]),m(ne,null,{default:g(()=>[I(h(a(l)("Gives the student access to a calculator.")),1)]),_:1})])]),u("div",ig,[m(le,{modelValue:D.value,"onUpdate:modelValue":b[17]||(b[17]=P=>D.value=P),class:"ConfigurationsStudentWorkspace__subject-choice__toggle","data-testid":"toggle-geogebra"},null,8,["modelValue"]),u("div",rg,[m(ye,{class:"ConfigurationsStudentWorkspace__subject-choice__info__heading",supportLink:a(ae)(a(se).geogebra)},{default:g(()=>[...b[40]||(b[40]=[u("img",{class:"ConfigurationsStudentWorkspace__tool-title-icon",src:"https://static.exam.net/myicons/gg-smaller.png"},null,-1),I(" GeoGebra ",-1)])]),_:1},8,["supportLink"]),D.value?S("",!0):(f(),T(ne,{key:0},{default:g(()=>[I(h(a(l)("GeoGebra is a mathematics tool with both graphing- and algebra capabilities.")),1)]),_:1})),D.value&&a(r).resources.geogebra==="classic"?(f(),T(ne,{key:1},{default:g(()=>[I(h(a(l)("GeoGebra Classic is a math tool with several functions, including graph mode, CAS, spreadsheets etc.")),1)]),_:1})):S("",!0),D.value&&a(r).resources.geogebra==="graphing"?(f(),T(ne,{key:2},{default:g(()=>[I(h(a(l)("GeoGebra Graphing is a math tool including graph mode but without CAS and spreadsheets.")),1)]),_:1})):S("",!0),D.value&&a(r).resources.geogebra==="suite"?(f(),T(ne,{key:3},{default:g(()=>[I(h(a(l)("GeoGebra Suite allows the student to switch between the modern GeoGebra Graphing, Geometry, CAS and Probability apps.")),1)]),_:1})):S("",!0),D.value?(f(),T(We,{key:4,modelValue:a(r).resources.geogebra,"onUpdate:modelValue":b[18]||(b[18]=P=>a(r).resources.geogebra=P),options:s},null,8,["modelValue"])):S("",!0)])]),u("div",lg,[m(le,{modelValue:a(r).resources.desmos,"onUpdate:modelValue":b[19]||(b[19]=P=>a(r).resources.desmos=P),class:"ConfigurationsStudentWorkspace__subject-choice__toggle","data-testid":"toggle-desmos"},null,8,["modelValue"]),u("div",ug,[m(ye,{class:"ConfigurationsStudentWorkspace__subject-choice__info__heading",supportLink:a(ae)(a(se).desmos)},{default:g(()=>[...b[41]||(b[41]=[u("img",{class:"ConfigurationsStudentWorkspace__tool-title-icon DesmosIcon",src:"https://exam.net/cdn/icons/desmos-graphing-calculator.png"},null,-1),I(" Desmos ",-1)])]),_:1},8,["supportLink"]),m(ne,null,{default:g(()=>[I(h(a(l)("Desmos is a tool for constructing and analysing mathematical graphs.")),1)]),_:1})])]),u("div",dg,[m(le,{modelValue:a(r).resources.programming,"onUpdate:modelValue":b[20]||(b[20]=P=>a(r).resources.programming=P),class:"ConfigurationsStudentWorkspace__subject-choice__toggle","data-testid":"toggle-programming"},null,8,["modelValue"]),u("div",cg,[m(ye,{class:"ConfigurationsStudentWorkspace__subject-choice__info__heading",supportLink:a(ae)(a(se).programming)},{default:g(()=>[b[42]||(b[42]=u("i",{class:"fa fa-code tool-icon"},null,-1)),I(h(a(l)("Programming")),1)]),_:1},8,["supportLink"]),m(ne,null,{default:g(()=>[I(h(a(l)("Gives the student programming tools in JavaScript and Python")),1)]),_:1})])]),u("div",mg,[m(le,{modelValue:a(r).resources.audioRecording,"onUpdate:modelValue":b[21]||(b[21]=P=>a(r).resources.audioRecording=P),class:"ConfigurationsStudentWorkspace__subject-choice__toggle","data-testid":"toggle-audio-recording"},null,8,["modelValue"]),u("div",fg,[m(ye,{class:"ConfigurationsStudentWorkspace__subject-choice__info__heading",supportLink:a(ae)(a(se).audioRecorder)},{default:g(()=>[m(_e,{svg:a(fn),width:"var(--spacing-6)",height:"var(--spacing-6)"},null,8,["svg"]),u("span",null,h(a(l)("Audio recorder")),1)]),_:1}
5,8,["supportLink"]),m(ne,null,{default:g(()=>[I(h(a(l)("Lets the student record audio and use as part of their answer.")),1)]),_:1}),m(ne,null,{default:g(()=>[I(h(a(l)("This activates the function for all students. You may also activate it individually during exam monitoring.")),1)]),_:1}),a(r).resources.audioRecording?(f(),T(rt,{key:0,mode:"secondary",class:"ConfigurationsStudentWorkspace__warning-audio-recording",text:a(l)("Note that this feature does not work on all devices due to operating system limitations. We recommend you to try the functionality on the students' type of device and wanted lockdown mode to determine if it is supported.")},null,8,["text"])):S("",!0)])]),a(He)("sv")?(f(),x("div",pg,[m(le,{modelValue:a(r).resources.physicsFormulas,"onUpdate:modelValue":b[22]||(b[22]=P=>a(r).resources.physicsFormulas=P),class:"ConfigurationsStudentWorkspace__subject-choice__toggle","data-testid":"toggle-physics-formulas"},null,8,["modelValue"]),u("div",hg,[m(ye,{class:"ConfigurationsStudentWorkspace__subject-choice__info__heading",supportLink:a(ae)(a(se).physicsTables)},{default:g(()=>[b[43]||(b[43]=u("img",{class:"ConfigurationsStudentWorkspace__tool-title-icon",style:{background:"black","border-radius":"var(--radius-round)"},src:"https://static.exam.net/img/atomcore.png"},null,-1)),u("span",null,h(a(l)("Physics tables and formulas")),1)]),_:1},8,["supportLink"]),m(ne,null,{default:g(()=>[I(h(a(l)("Gives the student access to formulas and tables for Physics")),1)]),_:1})])])):S("",!0),u("div",_g,[m(ye,{class:"ConfigurationsStudentWorkspace__subject-choice__info__heading",supportLink:a(ae)(a(se).mathFormulas)},{default:g(()=>[I(h(a(l)("Mathematics formulas")),1)]),_:1},8,["supportLink"]),a(He)("sv")?(f(),T(We,{key:0,modelValue:a(r).formulaChosen,"onUpdate:modelValue":b[23]||(b[23]=P=>a(r).formulaChosen=P),name:"formulaChosen",noMargin:"",options:n},null,8,["modelValue"])):(f(),T(We,{key:1,modelValue:a(r).formulaChosen,"onUpdate:modelValue":b[24]||(b[24]=P=>a(r).formulaChosen=P),name:"formulaChosen",noMargin:"",options:o},null,8,["modelValue"]))]),u("div",gg,[m(ye,{class:"ConfigurationsStudentWorkspace__subject-choice__info__heading",supportLink:a(ae)(a(se).chemistryTables)},{default:g(()=>[I(h(a(l)("Tables and formulas for Chemistry")),1)]),_:1},8,["supportLink"]),m(We,{modelValue:a(r).resources.chemistryFormulaChosen,"onUpdate:modelValue":b[25]||(b[25]=P=>a(r).resources.chemistryFormulaChosen=P),name:"chemistryFormulaChosen",noMargin:"",options:t},null,8,["modelValue"])])]),_:1},8,["title"]),b[46]||(b[46]=u("div",{class:"ConfigurationsStudentWorkspace__section-spacing"},null,-1)),m(At,{class:"ConfigurationsStudentWorkspace__item",title:a(l)("Resources"),mediumTitle:"",icon:"plus-circle",supportLink:a(ae)(a(se).resources),onClick:b[28]||(b[28]=P=>$e("collapsible_resources"))},{icons:g(()=>[u("div",vg,[a(r).resources.external.length?(f(),x("i",bg)):S("",!0),a(r).ownFormulas.length?(f(),x("i",yg)):S("",!0)])]),default:g(()=>[m(Fe,null,{default:g(()=>[b[44]||(b[44]=u("i",{class:"fa fa-file-text-o tool-icon"},null,-1)),I(h(a(l)("Additional documents")),1)]),_:1}),m($o,{name:"group-list",tag:"div"},{default:g(()=>[(f(!0),x(me,null,Pe(a(r).ownFormulas,(P,te)=>(f(),T(Ao,{key:`own-formula-${(P.documentPages||["default"])[0]}`,class:"OwnFormulas"},{default:g(()=>[u("div",Sg,[G(u("i",{role:"button",tabindex:"0",title:a(l)("Move up"),class:re(["fa fa-chevron-up group-actions",{disabled:te===0}]),onClick:ge=>ke(te,"up")},null,10,wg),[[Z,a(l)("Move up")]]),G(u("i",{role:"button",tabindex:"0",title:a(l)("Move down"),class:re(["fa fa-chevron-down group-actions",{disabled:te===a(r).ownFormulas.length-1}]),onClick:ge=>ke(te,"down")},null,10,xg),[[Z,a(l)("Move down")]])]),m(Mt,{modelValue:P.name,"onUpdate:modelValue":ge=>P.name=ge,placeholder:a(l)("Namnge dokument"),style:{"margin-top":"0"}},null,8,["modelValue","onUpdate:modelValue","placeholder"]),u("div",kg,[P.documentPDF?(f(),x("i",{key:0,class:"ActionIcon fa fa-print",onClick:ge=>Xe(P.documentPDF)},null,8,Cg)):S("",!0),u("i",{class:"ActionIcons__danger fa fa-tras
5h",style:{color:"var(--red-400)"},onClick:ge=>ct(te)},null,8,Eg)])]),_:2},1024))),128))]),_:1}),E.value?(f(),T(ve,{key:0,style:{"margin-top":"var(--spacing-3)"},label:a(l)("Add pdf-document"),onClick:b[27]||(b[27]=P=>E.value.click())},null,8,["label"])):S("",!0),m(l_)]),_:1},8,["title","supportLink"])]),m(at,{ref_key:"formatModalRef",ref:A,size:"sm"},{title:g(()=>[u("h3",null,h(a(l)("File format")),1)]),body:g(()=>[u("div",Tg,[u("p",null,h(a(l)("You can only add pdf-files as additional documents.")),1)])]),footer:g(()=>[u("div",null,[m(he,{label:"Ok","data-dismiss":"modal"})])]),_:1},512),m(at,{ref_key:"ownFormulaModalRef",ref:R,size:"lg"},{title:g(()=>[u("h3",Mg,h(a(l)("Add additional document")),1)]),body:g(()=>[u("div",Ig,[b[47]||(b[47]=u("div",{id:"presentUploadedFormula",class:"text-center"},null,-1)),O.value?(f(),T(Xt,{key:0})):S("",!0),O.value?(f(),x("h3",Ag,h(a(l)("This may take up to one minute if your document contains many pages.")),1)):S("",!0),B.value.type.includes("PDF")?(f(),x("h4",$g,h(B.value.message),1)):S("",!0)])]),footer:g(()=>[u("div",null,[m(he,{"data-dismiss":"modal",label:"Ok"})])]),_:1},512),u("input",{ref_key:"backgroundImageUploadRef",ref:k,type:"file",accept:"image/*",multiple:"",style:{display:"none"},onChange:ft},null,544),u("input",{ref_key:"audioFilesRef",ref:C,type:"file",accept:"audio/*",multiple:"",style:{display:"none"},onClick:b[29]||(b[29]=P=>xe(P)),onChange:mt},null,544),u("input",{ref_key:"backgroundImageUploadRef",ref:k,type:"file",accept:"image/*",multiple:"",style:{display:"none"},onChange:ft},null,544),u("input",{ref_key:"extraPDFDocumentsRef",ref:E,type:"file",accept:"application/pdf",style:{display:"none"},onChange:et},null,544),m(Ro,{visible:a(_),"onUpdate:visible":b[30]||(b[30]=P=>qo(_)?_.value=P:null),url:a(v)},null,8,["visible","url"])]),_:1},8,["title"])}}}),Dg=W(Pg,[["__scopeId","data-v-189361ca"]]),Lg={key:0,class:"AccessibilityPresetDialog__extra-time"},Fg={class:"AccessibilityPresetDialog__extra-time-unit"},Ng=1440,Og=Y({__name:"AccessibilityPresetDialog",props:Re({email:{},settings:{},extraTimeMinutes:{default:0},classDefaults:{},showSwedishDictionaries:{type:Boolean},showDictation:{type:Boolean},showExtraTime:{type:Boolean}},{visible:{type:Boolean,required:!0},visibleModifiers:{}}),emits:Re(["save"],["update:visible"]),setup(e,{expose:t,emit:o}){const n=fe(e,"visible"),s=e,i=o,d=M(Xa()),c=M(0);oe([n,()=>s.email],([_])=>{_&&r()},{immediate:!0});function r(){var v,w;const _=z(z({},s.classDefaults),s.settings);d.value=ee(z({},_),{speechToTextSettings:z({},(v=_.speechToTextSettings)!=null?v:{enabled:!1,locale:""}),translationSettings:{singleWords:ms((w=_.translationSettings)==null?void 0:w.singleWords)}}),c.value=s.extraTimeMinutes}function p(){i("save",{settings:ei(d.value,s.classDefaults),extraTimeMinutes:s.showExtraTime?Math.max(0,Math.floor(c.value||0)):s.extraTimeMinutes}),n.value=!1}return t({draftSettings:d,draftExtraMinutes:c,save:p}),(_,v)=>(f(),T(ro,{visible:n.value,"onUpdate:visible":v[4]||(v[4]=w=>n.value=w),modal:"",header:a(l)("Edit tools for :email",{email:e.email})},{footer:g(()=>[m(ve,{label:a(l)("Cancel"),onClick:v[2]||(v[2]=w=>n.value=!1)},null,8,["label"]),m(he,{label:a(l)("Save"),onClick:v[3]||(v[3]=w=>p())},null,8,["label"])]),default:g(()=>[m(Pt,{tag:"p",size:"small"},{default:g(()=>[I(h(a(l)("Switch on extra tools this student needs")),1)]),_:1}),m(Ka,{modelValue:d.value,"onUpdate:modelValue":v[1]||(v[1]=w=>d.value=w),showSwedishDictionaries:e.showSwedishDictionaries,classDefaults:e.classDefaults,showDictation:e.showDictation},{"extra-settings":g(()=>[e.showExtraTime?(f(),x("tr",Lg,[u("td",null,h(a(l)("Additional time")),1),u("td",null,[m(Ii,{modelValue:c.value,"onUpdate:modelValue":v[0]||(v[0]=w=>c.value=w),min:0,max:Ng,inputStyle:{width:"5rem"},"aria-label":a(l)("Additional time in minutes")},null,8,["modelValue","aria-label"]),u("span",Fg,h(a(l)("min")),1)])])):S("",!0)]),_:1},8,["modelValue","showSwedishDictionaries","classDefaults","showDictation"])]),_:1},8,["visible","header"]))}}),Bg=W(Og,[["__scopeId","data-v-a9a1579d"]]),Rg={class:"AccessibilityPresets"},Ug={class:"AccessibilityPresets__tools-header"},zg={key:0,class:"AccessibilityPresets__pending"},Vg={key:1},Wg={key:0},qg={key:1},jg={class:"AccessibilityPresets__actions"}
5,Hg=Y({__name:"AccessibilityPresets",setup(e,{expose:t}){const o=ue(),n=lt(),s=M(""),i=M([]),d=M(!1),c=M(-1),r=F(()=>o.accessibilityPresets),p=F(()=>{var O;return(O=r.value[c.value])!=null?O:{email:"",settings:{},extraTimeMinutes:0}}),_=F(()=>Number(o.automaticSubmissionTimer)>0),v=F(()=>o.content.choice!=="builder"),w=F(()=>n.currentTeacher?to(n.currentTeacher,"swedishDictionaries"):!1),y=F(()=>{var L,D,N;const O=o.resources;return{spellChecking:(L=o.spellChecking)!=null?L:"0",allow_tts:!!o.allowTTS,translate:!!o.translate,thesaurus:!!(O!=null&&O.thesaurus),allThesaurus:!!(O!=null&&O.allThesaurus),enThesaurus:!!(O!=null&&O.enThesaurus),aiThesaurus:!!(O!=null&&O.aiThesaurus),audio:!!(O!=null&&O.audio),audioRecording:!!(O!=null&&O.audioRecording),speechToTextSettings:z({},(D=O==null?void 0:O.speechToTextSettings)!=null?D:{enabled:!1,locale:""}),translationSettings:{singleWords:ms((N=O==null?void 0:O.translationSettings)==null?void 0:N.singleWords)},dictionarySetting:ti(O==null?void 0:O.dictionarySetting)}});function C(O){var L;return Object.keys((L=O.settings)!=null?L:{}).length===0&&!O.extraTimeMinutes}function k(O){return oi(z(z({},y.value),O.settings))}function E(O){return r.value.findIndex(L=>L.email===O)}function A(O){const{valid:L,invalid:D}=Cs(O);if(i.value=D,L.length!==0){s.value="";for(const N of L)E(N)===-1&&r.value.push({email:N,settings:{},extraTimeMinutes:0});L.length===1&&D.length===0&&R(E(L[0]))}}function R(O){r.value[O]&&(c.value=O,d.value=!0)}function B(O){const L=r.value[c.value];L&&(r.value[c.value]=z({email:L.email},O))}function X(O){r.value.splice(O,1)}return t({addEmail:A,openEditor:R,removeRow:X,editingIndex:c,editorVisible:d}),(O,L)=>{const D=we("ignore-password-managers"),N=we("tooltip");return f(),x("div",Rg,[m(Ea,{class:"AccessibilityPresets__add"},{default:g(()=>[G(m(no,{modelValue:s.value,"onUpdate:modelValue":L[0]||(L[0]=$=>s.value=$),fluid:"",placeholder:a(l)("Student email, comma separated"),"aria-label":a(l)("Student email, comma separated"),onKeyup:L[1]||(L[1]=Za($=>A(s.value),["enter"]))},null,8,["modelValue","placeholder","aria-label"]),[[D]]),m(Ta,null,{default:g(()=>[m(ho,{severity:"secondary",label:a(l)("Add"),onClick:L[2]||(L[2]=$=>A(s.value))},null,8,["label"])]),_:1})]),_:1}),i.value.length>0?(f(),T(it,{key:0,class:"AccessibilityPresets__invalid",severity:"warn",variant:"simple",size:"small"},{default:g(()=>[I(h(a(l)("These entries are not valid email addresses: :entries",{entries:i.value.join(", ")})),1)]),_:1})):S("",!0),r.value.length>0?(f(),T(a(Ai),{key:1,value:r.value,size:"small",dataKey:"email"},{default:g(()=>[m(a(qt),{field:"email",header:a(l)("Email")},null,8,["header"]),m(a(qt),null,{header:g(()=>[u("span",Ug,[I(h(a(l)("Accommodations"))+" ",1),G(m(_e,{svg:a(bs),width:"var(--icon-size-default)"},null,8,["svg"]),[[N,a(l)("Everything the student will have: the tools for the whole class plus their extra tools.")]])])]),body:g(({data:$})=>[C($)?(f(),x("span",zg,h(a(l)("Not set up yet")),1)):(f(),x("span",Vg,h(k($)),1))]),_:1}),_.value?(f(),T(a(qt),{key:0,header:a(l)("Additional time")},{body:g(({data:$})=>[$.extraTimeMinutes?(f(),x("span",Wg,h(a(l)(":count min",{count:String($.extraTimeMinutes)})),1)):(f(),x("span",qg,"â"))]),_:1},8,["header"])):S("",!0),m(a(qt),null,{body:g(({index:$})=>[u("div",jg,[G((f(),T(ho,{text:"",severity:"secondary","aria-label":a(l)("Edit"),onClick:q=>R($)},{icon:g(()=>[m(_e,{svg:a(pi),width:"var(--icon-size-default)"},null,8,["svg"])]),_:1},8,["aria-label","onClick"])),[[N,a(l)("Edit")]]),G((f(),T(ho,{text:"",severity:"secondary","aria-label":a(l)("Remove"),onClick:q=>X($)},{icon:g(()=>[m(_e,{svg:a(hi),width:"var(--icon-size-default)"},null,8,["svg"])]),_:1},8,["aria-label","onClick"])),[[N,a(l)("Remove")]])])]),_:1})]),_:1},8,["value"])):S("",!0),m(Bg,{visible:d.value,"onUpdate:visible":L[3]||(L[3]=$=>d.value=$),email:p.value.email,settings:p.value.settings,extraTimeMinutes:p.value.extraTimeMinutes,classDefaults:y.value,showSwedishDictionaries:w.value,showDictation:v.value,showExtraTime:_.value,onSave:B},null,8,["visible","email","settings","extraTimeMinutes","classDefaults","showSwedishDictionaries","showDictation","showExtraTime"])])}}}),Gg=W(Hg,[["__scopeId","data-v-523f292b"]]),Zg={class:"ConfigurationsAccessibility__tool"},Yg={class:"ConfigurationsAccessibility__tool__info"},Jg={key:0,class:"ConfigurationsAccessibility__tool"},Qg={class:"ConfigurationsAccessibility__tool__info"},Kg={class:"ConfigurationsAccessibility__select-label"},Xg={class:"ConfigurationsAccessibility__tool"},ev={class:"ConfigurationsAccessibility__tool__info"},tv={key:1,class:"ConfigurationsAccessibility__tool"},ov={class:"ConfigurationsAccessibility__tool__info"},nv={key:2,class:"ConfigurationsAccessibility__tool"},sv={class:"ConfigurationsAccessibility__tool__info"},av={class:"ConfigurationsAccessibility__tool"},iv={class:"ConfigurationsAccessibility__tool__info"},rv={class:"ConfigurationsAccessibility__tool"},lv={class:"ConfigurationsAccessibility__tool__info"},uv={key:3,class:"ConfigurationsAccessibility__exceptions"},dv=Y({__name:"ConfigurationsAccessibility",setup(e){const t=ue(),o=lt();return(n,s)=>(f(),T(kt,{class:"ConfigurationsAccessibility",title:a(l)("Accommodations")},{default:g(()=>{var i;return[u("div",Zg,[m(le,{modelValue:a(t).allowTTS,"onUpdate:modelValue":s[0]||(s[0]=d=>a(t).allowTTS=d),class:"ConfigurationsAccessibility__tool__toggle","data-testid":"toggle-text-to-speech"},null,8,["modelValue"]),u("div",Yg,[m(ye,{class:"ConfigurationsAccessibility__tool__info__heading",supportLink:a(ae)(a(se).textToSpeech)},{default:g(()=>[s[10]||(s[10]=u("i",{class:"fa fa-commenting tool-icon"},null,-1)),I(h(a(l)("Text to Speech")),1)]),_:1}
5,8,["supportLink"]),m(ne,null,{default:g(()=>[I(h(a(l)("Gives the option to have text read aloud; either text in the exam or written by the student.")),1)]),_:1}),a(t).forPractice?S("",!0):(f(),T(ne,{key:0},{default:g(()=>[I(h(a(l)("This activates the function for all students. You may also activate it individually during exam monitoring.")),1)]),_:1}))])]),a(t).content.choice!=="builder"?(f(),x("div",Jg,[m(le,{modelValue:a(t).resources.speechToTextSettings.enabled,"onUpdate:modelValue":s[1]||(s[1]=d=>a(t).resources.speechToTextSettings.enabled=d),class:"ConfigurationsAccessibility__tool__toggle","data-testid":"toggle-speech-to-text"},null,8,["modelValue"]),u("div",Qg,[m(Fe,null,{default:g(()=>[s[11]||(s[11]=u("i",{class:"fa fa-microphone"},null,-1)),I(" "+h(a(l)("Speech to text")),1)]),_:1}),m(ne,null,{default:g(()=>[I(h(a(l)("Allow your students to transcribe spoken words to text.")),1)]),_:1}),a(t).resources.speechToTextSettings.enabled?(f(),x(me,{key:0},[u("div",Kg,h(a(l)("Select language:")),1),m(Ma,{modelValue:a(t).resources.speechToTextSettings.locale,"onUpdate:modelValue":s[2]||(s[2]=d=>a(t).resources.speechToTextSettings.locale=d),options:a(ni)(),label:a(l)("Select language:"),class:"ConfigurationsAccessibility__tool-dropdown"},null,8,["modelValue","options","label"])],64)):S("",!0),(i=a(t).resources.speechToTextSettings)!=null&&i.enabled?(f(),T(rt,{key:1,mode:"secondary",class:"ConfigurationsAccessibility__warning",text:a(l)("Note that this feature does not work on all devices due to operating system limitations. We recommend you to try the functionality on the students' type of device and wanted lockdown mode to determine if it is supported.")},null,8,["text"])):S("",!0)])])):S("",!0),u("div",Xg,[m(le,{modelValue:a(t).translate,"onUpdate:modelValue":s[3]||(s[3]=d=>a(t).translate=d),class:"ConfigurationsAccessibility__tool__toggle","data-testid":"toggle-translate"},null,8,["modelValue"]),u("div",ev,[m(ye,{class:"ConfigurationsAccessibility__tool__info__heading",supportLink:a(ae)(a(se).translation)},{default:g(()=>[s[12]||(s[12]=u("i",{class:"fa fa-language tool-icon"},null,-1)),I(h(a(l)("Translation")),1)]),_:1},8,["supportLink"]),m(ne,null,{default:g(()=>[I(h(a(l)("Gives the student access to translation help for sentences or single words, in many languages.")),1)]),_:1}),a(t).translate?(f(),T(We,{key:0,modelValue:a(t).resources.translationSettings.singleWords,"onUpdate:modelValue":s[4]||(s[4]=d=>a(t).resources.translationSettings.singleWords=d),name:"translationSettings",autoWidth:"",options:a(si)()},null,8,["modelValue","options"])):S("",!0)])]),a(o).currentTeacher&&a(to)(a(o).currentTeacher,"swedis
5hDictionaries")?(f(),x("div",tv,[m(le,{modelValue:a(t).resources.thesaurus,"onUpdate:modelValue":s[5]||(s[5]=d=>a(t).resources.thesaurus=d),class:"ConfigurationsAccessibility__tool__toggle","data-testid":"toggle-thesaurus"},null,8,["modelValue"]),u("div",ov,[m(ye,{class:"ConfigurationsAccessibility__tool__info__heading",supportLink:a(ae)(a(se).swedishDictionary)},{default:g(()=>[s[13]||(s[13]=u("i",{class:"fa fa-book tool-icon"},null,-1)),I(h(a(l)("Swedish dictionary")),1)]),_:1},8,["supportLink"]),m(ne,null,{default:g(()=>[I(h(a(l)("Enables the student to get definitions of Swedish words.")),1)]),_:1})])])):S("",!0),a(o).currentTeacher&&a(to)(a(o).currentTeacher,"swedishDictionaries")?(f(),x("div",nv,[m(le,{modelValue:a(t).resources.allThesaurus,"onUpdate:modelValue":s[6]||(s[6]=d=>a(t).resources.allThesaurus=d),class:"ConfigurationsAccessibility__tool__toggle","data-testid":"toggle-all-thesaurus"},null,8,["modelValue"]),u("div",sv,[m(ye,{class:"ConfigurationsAccessibility__tool__info__heading",supportLink:a(ae)(a(se).multilingualDictionary)},{default:g(()=>[s[14]||(s[14]=u("i",{class:"fa fa-book tool-icon"},null,-1)),I(h(a(l)("Multilingual dictionary")),1)]),_:1},8,["supportLink"]),m(ne,null,{default:g(()=>[I(h(a(l)("Enables the student to have Swedish words defined in multiple languages.")),1)]),_:1})])])):S("",!0),u("div",av,[m(le,{modelValue:a(t).resources.enThesaurus,"onUpdate:modelValue":s[7]||(s[7]=d=>a(t).resources.enThesaurus=d),class:"ConfigurationsAccessibility__tool__toggle","data-testid":"toggle-en-thesaurus"},null,8,["modelValue"]),u("div",iv,[m(ye,{class:"ConfigurationsAccessibility__tool__info__heading",supportLink:a(ae)(a(se).englishSynonyms)},{default:g(()=>[s[15]||(s[15]=u("i",{class:"fa fa-clone tool-icon"},null,-1)),I(h(a(l)("English synonyms")),1)]),_:1},8,["supportLink"]),m(ne,null,{default:g(()=>[I(h(a(l)("Enables the student to get synonyms for English words.")),1)]),_:1})])]),u("div",rv,[m(le,{modelValue:a(t).resources.aiThesaurus,"onUpdate:modelValue":s[8]||(s[8]=d=>a(t).resources.aiThesaurus=d),class:"ConfigurationsAccessibility__tool__toggle","data-testid":"toggle-ai-thesaurus"},null,8,["modelValue"]),u("div",lv,[m(ye,{class:"ConfigurationsAccessibility__tool__info__heading",supportLink:a(ae)(a(se).dictionary)},{default:g(()=>[m(_e,{svg:a(Ia),width:"var(--width-4)",height:"var(--width-4)",class:"ConfigurationsAccessibility__tool__header-icon"},null,8,["svg"]),I(h(a(l)("Dictionary")),1)]),_:1},8,["supportLink"]),m(ne,null,{default:g(()=>[I(h(a(l)("Give the student a dictionary that provides definitions in a variety of languages.")),1)]),_:1}),a(t).resources.aiThesaurus?(f(),T(We,{key:0,modelValue:a(t).resources.dictionarySetting,"onUpdate:modelValue":s[9]||(s[9]=d=>a(t).resources.dictionarySetting=d),name:"dictionarySetting",autoWidth:"",options:a(ai)()},null,8,["modelValue","options"])):S("",!0)])]),a(t).forPractice?S("",!0):(f(),x("div",uv,[m(Fe,null,{default:g(()=>[I(h(a(l)("Exceptions for specific students")),1)]),_:1}),m(ne,{class:"ConfigurationsAccessibility__exceptions__explainer"},{default:g(()=>[I(h(a(l)("Assign extra tools to specific students. When a student's email address matches an address in the list, the tools are activated the first time they enter the exam.")),1)]),_:1}),m(Gg)]))]}),_:1},8,["title"]))}}),cv=W(dv,[["__scopeId","data-v-3337a6b1"]]),mv={class:"Configurations"},fv={class:"Configurations__body","data-testid":"exam-creator-configurations"},pv=Y({__name:"Configurations",props:{hasError:{type:Boolean}},emits:["createExam"],setup(e,{emit:t}){const o=dt(),n=t,s=ue(),i=lt(),d=M(window.innerWidth),c=M(!1),r=M(!1);xt(()=>Q(null,null,function*(){_t.register("get-all-builder",()=>{bi.getAll()},{description:"Fetch all builder questions"}),_t.register("prohibited",()=>{s.prohibitedProcessesBeta=!0,o.add({severity:"info",summary:"Prohibited processes configuration beta activated"})},{description:"Activate the prohibited processes configuration beta"}),_t.register("practicebeta",()=>{s.practiceBeta=!0,o.add({severity:"info",summary:"Practice exam beta option activated"})},{description:"Activate the practice exam beta option"}),_t.register("downloadpdf",()=>{s.content.documentPDF&&window.open(s.content.documentPDF)},{description:"Open the exam PDF document"}),window.addEventListener("resize",()=>{d.value=window.innerWidth});const C=s.id||s.autoSaveId;if(C){const k=yield yi.get(C,{excludeColleagues:!0});r.value=k.mayUpdateShares}else r.value=!0;Aa()}));const p=F(()=>s.id?[s.id]:s.autoSaveId?[s.autoSaveId]:[]);function _(){oo(`/admin/exams/${s.id}`)}function v(){oo("/admin/exams")}function w(){return Q(this,null,function*(){if(!s.id&&!s.autoSaveId){n("createExam",!0);const k=25;let E=0;for(;!s.id&&!s.autoSaveId&&(E++,!(E>k));)yield new Promise(A=>setTimeout(A,200))}c.value=!0})}function y(){o.add({severity:"success",summary:l("Access has been updated")})}return(C,k)=>(f(),x("div",mv,[m(sc,{hasExamTypeSettings:a(s).content.choice==="builder",hasError:e.hasError,shouldDisableShareButton:!r.value,onClickedShare:w},null,8,["hasExamTypeSettings","hasError","shouldDisableShareButton"]),u("div",fv,[e.hasError?(f(),T(Qt,{key:0,text:a(l)("Could not save the exam. Please check that everything is filled in correctly."),class:"Configurations__error-exam"},null,8,["text"])):S("",!0),a(s).started?(f(),T(rt,{key:1,mode:"secondary",class:"Configurations__warning-open-exam",secondaryActionText:a(l)("Go to monitoring view"),text:a(l)("This exam is open - changes to the exam settings are not reflected for students that are currently taking the exam. You can adjust a specific student's accommodations during an exam from the monitoring view."),onSecondaryAction:_},null,8,["secondaryActionText","text"])):S("",!0),a(s).examData.origin==="gauss"?(f(),T(Je,{key:2,text:a(l)("The content of the exam is locked for editing."),mode:"primary",class:"Configurations__warning-exported-exam"},null,8,["text"])):S("",!0),a(s).readonly?(f(),T(Je,{key:3,mode:"primary",class:"Configurations__warning-readonly-exam",secondaryActionText:a(l)("Exam list"),text:`${a(l)("This exam is configured as read-only and cannot be edited.")} ${a(l)("You can duplicate the exam from the exam list to create one that you can edit.")}`,onSecondaryAction:v},null,8,["secondaryActionText","text"])):S("",!0),m(vc,{id:"General"}),a(s).content.choice==="builder"?(f(),T(mu,{key:4,id:"examType"})):S("",!0),G(m(Cm,{id:"StudentInformation"},null,512),[[ce,!a(s).forPractice]]),m(Dg,{id:"StudentWorkspace"}),m(cv,{id:"Accessibility"}),a(s).forPractice?S("",!0):(f(),T(Jd,{key:5,id:"security"}))]),a(i).currentTeacher?(f(),T(Si,{key:0,visible:c.value,"onUpdate:visible":k[0]||(k[0]=E=>c.value=E),examIdsToShare:p.value,user:a(i).currentTeacher,examName:a(s).examName,onShared:y},null,8,["visible","examIdsToShare","user","examName"])):S("",!0)]))}}),hv=W(pv,[["__scopeId","data-v-92f1272f"]]),_v={name:"ModalUnsaved",components:{FormatDate:$i,PrimaryButton:he,SecondaryButton:ve},props:{unsavedExams:{type:Array,default:()=>[]}},emits:["chooseUnsavedExam"]};
5function gv(e,t,o,n,s,i){const d=j("FormatDate"),c=j("PrimaryButton"),r=j("SecondaryButton"),p=j("ExamModal");return f(),T(p,{size:"md",class:"ModalUnsaved"},{title:g(()=>[...t[0]||(t[0]=[u("h3",null,"Use unsaved exam",-1)])]),body:g(()=>[u("div",null,[(f(!0),x(me,null,Pe(o.unsavedExams,_=>(f(),x("div",{key:_.id,class:"ModalUnsaved__exam"},[u("div",null,[I(h(e.__("Created"))+" ",1),m(d,{datetime:_.createdAt},null,8,["datetime"]),I(" ("+h(_.questionCount)+" questions)",1)]),m(c,{class:"ModalUnsaved__exam__choose",label:e.__("Choose"),"data-dismiss":"modal",onClick:v=>e.$emit("chooseUnsavedExam",_.id)},null,8,["label","onClick"])]))),128))])]),footer:g(()=>[u("div",null,[o.unsavedExams.length?(f(),T(r,{key:0,label:e.__("Close"),"data-dismiss":"modal"},null,8,["label"])):(f(),T(c,{key:1,label:e.__("Close"),"data-dismiss":"modal"},null,8,["label"]))])]),_:1})}const vv=W(_v,[["render",gv],["__scopeId","data-v-4a5d2842"]]),bv={class:"ModalExamName__title"},yv={class:"ModalExamName__input"},Sv={class:"ModalExamName__actions"},Mo="Untitled Exam",wv={__name:"ModalExamName",props:{isSavingExam:{type:Boolean,default:!1}},emits:["saveExam"],setup(e,{emit:t}
5){const o=t,n=M(""),s=M(null);return xt(()=>{window.$(document).on("shown.bs.modal",".ModalExamName",()=>{s.value&&s.value.focusInput()})}),(i,d)=>{const c=j("ExamModal");return f(),T(c,{size:"md",class:"ModalExamName"},{body:g(()=>[u("h3",bv,h(i.__("Give your exam a name")),1),u("div",yv,[m(_s,{ref_key:"roundedInput",ref:s,modelValue:n.value,"onUpdate:modelValue":d[0]||(d[0]=r=>n.value=r),placeholder:Mo,onButtonAction:d[1]||(d[1]=r=>o("saveExam",n.value||Mo))},null,8,["modelValue"])]),u("div",Sv,[m(ve,{label:i.__("Cancel"),"data-dismiss":"modal"},null,8,["label"]),m(he,{label:i.__("Save exam"),loading:e.isSavingExam,onClick:d[2]||(d[2]=r=>o("saveExam",n.value||Mo))},null,8,["label","loading"])])]),_:1})}}},xv=W(wv,[["__scopeId","data-v-14e8bdfb"]]),kv={data(){return{show:!1,previousOverflowValue:""}},created(){addEventListener("hashchange",e=>{e.oldURL.includes("#preview-exam")&&this.close()}),window.addEventListener("message",e=>{var t;((t=e==null?void 0:e.data)==null?void 0:t.type)==="close"&&this.close()})},methods:{close(){this.show=!1,history.pushState({},"",window.location.pathname+window.location.search),document.body.style.overflow=this.previousOverflowValue},preview(e){this.previousOverflowValue=document.body.style.overflow,document.body.style.overflow="hidden",history.pushState({},"","#preview-exam"),this.show=!0,this.$nextTick(()=>{this.$refs.previewFormExam.value=JSON.stringify(Fa(e)),this.$refs.previewForm.submit()})}}},Cv={key:0,class:"PreviewExamModal__Exam"},Ev={ref:"previewForm",action:"/preview-exam",target:"preview-iframe",method:"post"},Tv={ref:"previewFormExam",type:"text",name:"exam"},Mv={ref:"preview",class:"PreviewExamModal__iframe",name:"preview-iframe",src:"/preview-exam"};function Iv(e,t,o,n,s,i){return G((f(),x("div",{class:"PreviewExamModal__Wrapper",onClick:t[0]||(t[0]=(...d)=>i.close&&i.close(...d))},[m(us,{name:"slide-fade"},{default:g(()=>[s.show?(f(),x("div",Cv,[u("form",Ev,[u("input",Tv,null,512)],512),t[1]||(t[1]=u("div",{class:"PreviewExamModal__close-button"},[u("i",{class:"fa fa-times"})],-1)),u("iframe",Mv,null,512)])):S("",!0)]),_:1})],512)),[[ce,s.show]])}const Av=W(kv,[["render",Iv],["__scopeId","data-v-14b0615b"]]),$v=Y({__name:"InspirationTemplateNotification",setup(e){const t=()=>{var o;(o=window.open("https://docs.google.com/forms/d/e/1FAIpQLSe1-kxFaqieHW90eXk0ON51GlqhJ0eBRIcdOanXIyJf9py8Dg/viewform","_blank"))==null||o.focus()};return(o,n)=>(f(),T(Je,{text:a(l)("This is an example template. Feel free to experiment, make the changes you want to make, and then click âSaveâ when you are done. We also welcome feedback and suggestions for other templates you would like to see."),primaryActionText:a(l)("Give feedback"),onPrimaryAction:t},null,8,["text","primaryActionText"]))}}),Pv=Y({__name:"ExamCreatorNotifications",setup(e){const t=M(!1);return xt(()=>{new URLSearchParams(window.location.search).get("inspiration")==="true"&&(t.value=!0)}),(o,n)=>(f(),x("div",null,[t.value?(f(),T($v,{key:0})):S("",!0)]))}}),Dv={key:0,class:"ModalPDFtoAutoMarked__content"},Lv={class:"ModalPDFtoAutoMarked__content__info"},Fv={class:"ModalPDFtoAutoMarked__actions"},Nv={key:1,class:"ModalPDFtoAutoMarked__content"},Ov={class:"ModalPDFtoAutoMarked__content__info"},Bv={class:"ModalPDFtoAutoMarked__progress ModalPDFtoAutoMarked__progress--loading"},Rv={class:"ModalPDFtoAutoMarked__actions"},Uv={key:2,class:"ModalPDFtoAutoMarked__content"},zv={class:"ModalPDFtoAutoMarked__progress ModalPDFtoAutoMarked__progress--success"},Vv={class:"ModalPDFtoAutoMarked__content__info"},Wv={class:"ModalPDFtoAutoMarked__actions"},qv={key:3,class:"ModalPDFtoAutoMarked__content"},jv={class:"ModalPDFtoAutoMarked__progress ModalPDFtoAutoMarked__progress--error"},Hv={class:"ModalPDFtoAutoMarked__content__info"},Gv={class:"ModalPDFtoAutoMarked__actions"},Xn=1e3*1e3*5,Zv=Y({__name:"ModalPDFtoAutoMarked",emits:["cancelUpload"],setup(e,{emit:t}
5){const o=t,n=ue(),s=zo(),i=is(),d=F(()=>i.alphaFeatures[$a.pdfToAutomarked]),c=M("idle"),r=M({title:"Error",message:"An error occurred"});function p(w){_(w[0])}function _(w){return Q(this,null,function*(){c.value="loading";try{const y=yield st.post("/api/ai-pdf/token"),C=new FormData;C.append("file",w);const k=d.value?"https://europe-west1-teachiq-ai-staging.cloudfunctions.net/pdfToAutomarked":"https://europe-west1-teachiq-ai.cloudfunctions.net/assistansTransformToAutomarkedExam",E=yield st.post(k,C,{headers:{Authorization:`Bearer ${y.data}`,"Content-Type":"multipart/form-data"},timeout:1e3*60*5});if(!E.data.content.questions||E.data.content.questions.length===0){v("NO_QUESTIONS");return}n.examName=E.data.content.examName||"";const A=E.data.content.questions;yield s.importQuestionsToExam(A,{isAIGenerated:!0}),nt.$emit("exam-content-updated"),c.value="success",yield st.post("/api/ai-pdf/consumption",{},{headers:{Authorization:`Bearer ${E.data.consumptionToken}`}})}catch(y){console.log(y),v("UNKNOWN")}})}function v(w){switch(c.value="error",w){case"NO_FILE_SELECTED":r.value={title:"No file selected",message:"Please select a file to upload."};break;case"WRONG_FILE_TYPE":r.value={title:"Invalid file type",message:"Please select a PDF file to upload."};break;case"FILE_TOO_LARGE":r.value={title:l("The file is too large"),message:l("The maximum file size supported is :maxFileSize MB. You can try reducing the file size using a compression tool.",{maxFileSize:(Xn/1e3/1e3).toString()})};break;case"NO_QUESTIONS":r.value={title:"No questions found",message:"No questions were found in the uploaded document."};break;default:r.value={title:"Unknown error",message:"An unknown error occurred."}}}return(w,y)=>(f(),T(at,{size:"md",class:"ModalPDFtoAutoMarked",noPadding:""},{body:g(()=>[m(ss,{appear:"",mode:"out-in"},{default:g(()=>[c.value==="idle"?(f(),x("div",Dv,[d.value?(f(),T(rt,{key:0,mode:"secondary",text:"Staging deployment â PDF conversion is using the staging service, not production."})):S("",!0),u("div",Lv,[u("h2",null,h(a(l)("Convert a PDF to auto-marked questions")),1),u("p",null,h(a(l)("We will scan your document and automatically create the questions for you. All you have to do is to add the correct answers if they arenât already provided.")),1)]),m(ds,{accept:[".pdf"],maxFileSize:Xn,label:a(l)("Drag and drop or click to upload a PDF file"),onFilesAdded:p,onFileTooBig:y[0]||(y[0]=C=>v("FILE_TOO_LARGE")),onNoFileSelected:y[1]||(y[1]=C=>v("NO_FILE_SELECTED")),onInvalidFileType:y[2]||(y[2]=C=>v("WRONG_FILE_TYPE"))},null,8,["label"]),m(Je,{mode:"secondary",text:a(l)("Only upload material that you have the legal rights or permission to use.")},null,8,["text"]),u("div",Fv,[m(ve,{label:a(l)("Cancel"),"data-dismiss":"modal",onClick:y[3]||(y[3]=C=>o("cancelUpload"))},null,8,["label"])])])):c.value==="loading"?(f(),x("div",Nv,[d.value?(f(),T(rt,{key:0,mode:"secondary",text:"Staging deployment â PDF conversion is using the staging service, not production."})):S("",!0),u("div",Ov,[u("div",Bv,[m(Xt)]),u("h2",null,h(a(l)("Konverterar PDF"))+"...",1),u("p",null,h(a(l)("This may take a few minutes. Please donât close this window, but feel free to keep working in a new tab.")),1)]),u("div",Rv,[m(ve,{label:a(l)("Cancel"),"data-dismiss":"modal"},null,8,["label"])])])):c.value==="success"?(f(),x("div",Uv,[u("div",zv,[m(_e,{width:"var(--height-12)",color:"var(--green-500)",svg:a(ns)},null,8,["svg"])]),u("div",Vv,[u("h2",null,h(a(l)("Your questions are ready to be reviewed")),1),u("p",null,h(a(l)("Make sure to add correct answers where needed in order to ensure the questions are auto-marked upon submission.")),1)]),u("div",Wv,[m(he,{label:a(l)("Review questions"),"data-dismiss":"modal"},null,8,["label"])])])):c.value==="error"?(f(),x("div",qv,[u("div",jv,[m(_e,{width:"var(--height-12)",color:"var(--red-500)",svg:a(as)},null,8,["svg"])]),u("div",Hv,[u("h2",null,h(r.value.title),1),u("p",null,h(r.value.message),1)]),u("div",Gv,[m(he,{label:a(l)("Ok"),onClick:y[4]||(y[4]=()=>c.value="idle")},null,8,["label"])])])):S("",!0)]),_:1})]),_:1}))}}),Yv=W(Zv,[["__scopeId","data-v-dd2e1b7b"]]),Jv="#exam-directory",Qv="coordinator",Kv=`/admin/school${Jv}`,Xv={name:"ExamCreator",components:{ExamCreatorNotifications:Pv,ExamCreatorTopBar:Ni,ExamTypeSelector:hr,ContentCreator:ql,Configurations:hv,ModalUnsaved:vv,ModalExamName:xv,PreviewExamModal:Av,ModalPDFtoAutoMarked:Yv},props:{teacher:{type:Object,required:!0},group:{type:String,default:""},exam:{type:Object,required:!1,default(){return null}},type:{type:String,required:!0,validator:e=>["new","update"].includes(e)},studentCount:{type:Number,required:!0},bucket:{type:String,default:""},storageToken:{type:String,required:!0},demo:Boolean,schoolSettings:{type:Object,default:null}},setup(){const e=ue(),t=zo(),o=lt(),n=dt(),s=li();return{examCreatorStore:e,teacherStore:o,examBuilderStore:t,toast:n,urlSearchParams:s}},data(){return{isSavingExam:!1,examApiError:!1,unsavedExams:[],isPopulatingStore:!0,isPreparingPreview:!1}},computed:{isExamExported(){var e;return!!((e=this.exam)!=null&&e.origin)},examData(){return JSON.parse(JSON.stringify(this.examCreatorStore.examData))},previousDisabled(){return this.type==="update"&&this.examCreatorStore.currentStep===2},examTypeForAnalytics(){var e;return(e=this.examCreatorStore.analyticsExamFormat)!=null?e:Pa(this.examCreatorStore.content.choice)}},watch:{examData:{handler(e,t){if(this.isPopulatingStore||this.examCreatorStore.readonly)return;this.getObjectDifference(e,t,["bucket","builderJWT","examName"]).length>0&&sessionStorage.setItem("examHasChanges","true")},deep:!0},"examCreatorStore.currentStep"(e,t){e!==t&&window.scrollTo({top:0,behavior:"smooth"})}},created(){sessionStorage.setItem("examHasChanges","false"),this.populateStores().then(()=>{this.isPopulatingStore=!1}),Qe.login(this.storageToken),window.K$.storageToken=this.storageToken,window.addEventListener("beforeunload",e=>{sessionStorage.getItem("examHasChanges")!=="false"&&(e.preventDefault(),e.returnValue=this.__("You have unsaved changes on this page. Are you sure that you want to leave?"))}),window.addEventListener("unload",()=>{sessionStorage.setItem("examHasChanges","false")})},mounted(){this.examCreatorStore.isNewExam||ui.save(window.K$.examid,this.teacherStore.currentTeacher.id),_t.register("adminunsaved",()=>Q(this,null,function*(){this.unsavedExams=(yield st.get("/api/exams/unsaved")).data.map(e=>({id:e.id,questionCount:JSON.parse(e.content).length,createdAt:e.created_at})),pe.show(this.$refs.ModalUnsaved)}),{description:"List unsaved exams"}),window.addEventListener("keydown",e=>
5{e.key==="s"&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.saveViaKeyboardShortcut())}),document.addEventListener("scroll",()=>{var o;const e=((o=this.$refs.ExamCreatorTopBar)==null?void 0:o.$el.getBoundingClientRect().top)<=60,t=this.$refs.ExamCreatorTopBar.$el.classList.contains("ExamCreatorTopBar--rounded");e&&t?this.$refs.ExamCreatorTopBar.$el.classList.remove("ExamCreatorTopBar--rounded"):!e&&!t&&this.$refs.ExamCreatorTopBar.$el.classList.add("ExamCreatorTopBar--rounded")})},methods:{cancelPDFToAutomarked(){this.examCreatorStore.analyticsExamFormat=null,this.examCreatorStore.currentStep=1},showPDFToAutoMarked(){pe.static(this.$refs.modalPDFtoAutoMarked)},getObjectDifference(e,t,o=[]){const n=[];return Object.keys(e).forEach(s=>{o.includes(s)||Da(e[s],t[s])||n.push(s)}),n},chooseUnsavedExam(e){this.examCreatorStore.$patch({currentStep:2,content:{choice:"builder",examBuilderId:e}})},waitUntilQuestionSaved(){return Q(this,null,function*(){yield new Promise(n=>setTimeout(n,50));for(let n=0;n<5&&this.examBuilderStore.isSavingQuestion;n++)yield new Promise(s=>setTimeout(s,100))})},navigateStep(e){return Q(this,null,function*(){if(yield this.waitUntilQuestionSaved(),!this.examBuilderStore.error){if(this.isExamExported){this.examCreatorStore.currentStep=3;return}e==="next"?yield this.nextStep():yield this.previousStep()}})},previousStep(){return Q(this,null,function*(){this.examCreatorStore.currentStep--})},nextStep(){return Q(this,null,function*(){this.examCreatorStore.currentStep++})},populateStores(){return Q(this,null,function*(){if(this.teacherStore.currentTeacher=this.teacher,this.examCreatorStore.$patch({bucket:this.bucket,demo:this.demo,group:this.group,schoolSettings:this.schoolSettings}),this.type==="update"){if(this.examCreatorStore.$patch({studentCount:this.studentCount,isNewExam:this.type==="new",schoolLicense:this.schoolLicense}),this.exam){let e=new pn(this.exam).documents();this.exam.content&&(e=new pn(e).content());const t=yield Na(e);this.examCreatorStore.$patch(t),this.examCreatorStore.setExamSpecialStates(t)}this.isExamExported||La.json(this.exam.content).choice==="nothing"?this.examCreatorStore.currentStep=3:this.examCreatorStore.currentStep=2,this.examCreatorStore.forPractice&&(this.examCreatorStore.practiceBeta=!0)}})},removeAudioFilesStatusModifications(){this.examCreatorStore.resources.audioFiles=this.examCreatorStore.resources.audioFiles.filter(e=>!e.usb).map(e=>({name:e.name,givenName:e.givenName,path:e.path,when:e.when,password:e.password}))},handleSavedExam(e,t,o){return Q(this,null,function*(){if(yield this.examCreatorStore.attachExamToGroup(),o===!0){this.toast.add({severity:"success",summary:t}),this.examCreatorStore.autoSaveId||(this.examCreatorStore.autoSaveId=e.examID),sessionStorage.setItem("examHasChanges","false"),this.isSavingExam=!1;return}this.toast.afterReload({severity:"success",summary:t}),sessionStorage.setItem("examHasChanges","false");const n=this.urlSearchParams.from===Qv?Kv:"/admin/exams";this.examCreatorStore.isNewExam?(window.dataLayer.push({event:"create-exam",examType:this.examCreatorStore.content.choice}),yt.capture("exam_created",{exam_type:this.examTypeForAnalytics},{transport:"sendBeacon"}),setTimeout(()=>{oo(n)},250)):oo(n)})},handleExamsApiError(e){console.error("E2E Error code: Save Exam",e.message),pe.hide(this.$refs.ModalExamName),this.isSavingExam=!1,this.examApiError=!0},updateExam(e){var o;this.removeAudioFilesStatusModifications();const t=(o=this.examCreatorStore.autoSaveId)!=null?o:this.examCreatorStore.id;Nt.update(t,this.examCreatorStore.examData).then(n=>{if(n.status==="nok"){this.handleExamsApiError(n.reasons);return}const s=this.__("Your changes have been saved");this.handleSavedExam(n,s,e)}).catch(this.handleExamsApiError).finally(()=>{this.examCreatorStore.isSavingExamExplicitly=!1})},createExam(e){this.removeAudioFilesStatusModifications(),Nt.create(this.examCreatorStore.examData).then(t=>{if(t.status==="nok"){this.handleExamsApiError(t.reasons);return}this.examCreatorStore.id=t.examID;const o=this.__("A new exam has been created");this.handleSavedExam(t,o,e)}
5).catch(this.handleExamsApiError).finally(()=>{this.examCreatorStore.isSavingExamExplicitly=!1})},saveViaKeyboardShortcut(){if(this.examBuilderStore.editingQuestion){document.body.click();return}this.examCreatorStore.isSavingExamExplicitly=!0,this.saveExam()},preview(){return Q(this,null,function*(){const e=n=>new Promise(s=>setTimeout(s,n));this.isPreparingPreview=!0,yield e(500);const t=this.examCreatorStore.examData,o=z({},t.content);if(o.choice==="builder"&&this.examCreatorStore.hasQuestions)try{const n=yield Ra.getAllQuestions(this.examCreatorStore.id||this.examCreatorStore.autoSaveId);o.examBuilderQuestions=JSON.stringify(n),o.parts=JSON.stringify({partsList:[{title:""}]})}catch(n){console.log(n)}this.isPreparingPreview=!1,this.$refs.previewExamModal.preview(ee(z({},t),{content:o}))})},setNameAndSave(e){this.examCreatorStore.isSavingExamExplicitly=!0,this.examCreatorStore.examName=e,this.saveExam()},saveExam(e){if(this.examCreatorStore.focusError="",this.examCreatorStore.readonly){this.examCreatorStore.isSavingExamExplicitly=!1;return}if(this.examCreatorStore.errors.invalidStudentInformation){this.examCreatorStore.focusError="studentInformation",this.examCreatorStore.isSavingExamExplicitly=!1;return}if(this.examCreatorStore.errors.invalidFileUploadTypes){this.examCreatorStore.focusError="studentWorkspace",this.examCreatorStore.isSavingExamExplicitly=!1;return}if(this.examCreatorStore.errors.noExamName){pe.show(this.$refs.ModalExamName),this.examCreatorStore.focusError="examName",this.examCreatorStore.isSavingExamExplicitly=!1;return}if(this.isSavingExam){this.examCreatorStore.isSavingExamExplicitly=!1;return}this.isSavingExam=!0,this.examCreatorStore.isNewExam&&!this.examCreatorStore.autoSaveId?this.createExam(e):this.updateExam(e)}}},eb={class:"ExamCreator"},tb={class:"ExamCreator__container"};function ob(e,t,o,n,s,i){const d=j("PreviewExamModal"),c=j("ExamCreatorNotifications"),r=j("ExamCreatorTopBar"),p=j("ExamTypeSelector"),_=j("ContentCreator"),v=j("Configurations"),w=j("ModalUnsaved"),y=j("ModalExamName"),C=j("ModalPDFtoAutoMarked");return f(),x("div",null,[m(d,{ref:"previewExamModal"},null,512),m(c,{class:"ExamCreatorNotifications"}),u("div",eb,[m(r,{ref:"ExamCreatorTopBar",class:"ExamCreator__ExamCreatorTopBar",hasError:n.examCreatorStore.errors.noExamName&&n.examCreatorStore.focusError==="examName",isSavingExam:s.isSavingExam,isPreparingPreview:s.isPreparingPreview,onNext:t[0]||(t[0]=k=>i.navigateStep("next")),onPrevious:t[1]||(t[1]=k=>i.navigateStep("previous")),onSave:i.saveExam,onPreview:i.preview},null,8,["hasError","isSavingExam","isPreparingPreview","onSave","onPreview"]),u("div",tb,[n.examCreatorStore.currentStep===1?(f(),T(p,{key:0,onShowPDFToAutoMarked:i.showPDFToAutoMarked},null,8,["onShowPDFToAutoMarked"])):S("",!0),n.examCreatorStore.currentStep===2||n.examCreatorStore.hasQuestions?G((f(),T(_,{key:1},null,512)),[[ce,n.examCreatorStore.currentStep===2]]):S("",!0),s.isPopulatingStore?S("",!0):G((f(),T(v,{key:2,hasError:s.examApiError,onCreateExam:i.createExam},null,8,["hasError","onCreateExam"])),[[ce,n.examCreatorStore.currentStep===3]])]),m(w,{ref:"ModalUnsaved",unsavedExams:s.unsavedExams,onChooseUnsavedExam:i.chooseUnsavedExam},null,8,["unsavedExams","onChooseUnsavedExam"]),m(y,{ref:"ModalExamName",isSavingExam:s.isSavingExam,onSaveExam:i.setNameAndSave},null,8,["isSavingExam","onSaveExam"]),m(C,{ref:"modalPDFtoAutoMarked",onCancelUpload:i.cancelPDFToAutomarked},null,8,["onCancelUpload"])])])}const ay=W(Xv,[["render",ob],["__scopeId","data-v-eb211336"]]);export{ay as default}; 6//# sourceMappingURL=chunk.Nt6ycPaQBOH9.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.