1(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerpolicy&&(o.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?o.credentials="include":r.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,t,n){const i=Number(0xffffffffn&t),r=Number(t>>32n);this.setUint32(e+(n?0:4),i,n),this.setUint32(e+(n?4:0),r,n)}});var I=e=>new DataView(new ArrayBuffer(e)),A=e=>new Uint8Array(e.buffer||e),C=e=>new TextEncoder().encode(String(e)),x=e=>Math.min(4294967295,Number(e)),Q=e=>Math.min(65535,Number(e));function ee(e,t){if(t===void 0||t instanceof Date||(t=new Date(t)),e instanceof File)return{isFile:1,t:t||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:t||new Date(e.headers.get("Last-Modified")||Date.now()),i:e.body};if(t===void 0)t=new Date;else if(isNaN(t))throw new Error("Invalid modification date.");if(e===void 0)return{isFile:0,t};if(typeof e=="string")return{isFile:1,t,i:C(e)};if(e instanceof Blob)return{isFile:1,t,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t,i:A(e)};if(Symbol.asyncIterator in e)return{isFile:1,t,i:j(e)};throw new TypeError("Unsupported input format.")}function j(e){const t="next"in e?e:e[Symbol.asyncIterator]();return new ReadableStream({async pull(n){let i=0;for(;n.desiredSize>i;){const r=await t.next();if(!r.value){n.close();break}{const o=te(r.value);n.enqueue(o),i+=o.byteLength}}}})}function te(e){return typeof e=="string"?C(e):e instanceof Uint8Array?e:A(e)}function H(e,t,n){if(t===void 0||t instanceof Uint8Array||(t=C(t)),e instanceof File)return{o:D(t||C(e.name)),A:BigInt(e.size)};if(e instanceof Response){const i=e.headers.get("content-disposition"),r=i&&i.match(/;\s*filename\*?=["']?(.*?)["']?$/i),o=r&&r[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),c=o&&decodeURIComponent(o),s=n||+e.headers.get("content-length");
1return{o:D(t||C(c)),A:BigInt(s)}}return t=D(t,e!==void 0||n!==void 0),typeof e=="string"?{o:t,A:BigInt(C(e).length)}:e instanceof Blob?{o:t,A:BigInt(e.size)}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o:t,A:BigInt(e.byteLength)}:{o:t,A:ne(e,n)}}function ne(e,t){return t>-1?BigInt(t):e?void 0:0n}function D(e,t=1){if(!e||e.every(n=>n===47))throw new Error("The file must have a name.");if(t)for(;e[e.length-1]===47;)e=e.subarray(0,-1);else e[e.length-1]!==47&&(e=new Uint8Array([...e,47]));return e}var ie=new WebAssembly.Instance(new WebAssembly.Module(Uint8Array.from(atob("AGFzbQEAAAABCgJgAABgAn9/AXwDAwIAAQUDAQACBwkCAW0CAAFjAAEIAQAKlQECSQEDfwNAIAEhAEEAIQIDQCAAQQF2IABBAXFBoIbi7X5scyEAIAJBAWoiAkEIRw0ACyABQQJ0IAA2AgAgAUEBaiIBQYACRw0ACwtJAQF/IAFBf3MhAUGAgAQhAkGAgAQgAGohAANAIAFB/wFxIAItAABzQQJ0KAIAIAFBCHZzIQEgAkEBaiICIABJDQALIAFBf3O4Cw"),e=>e.charCodeAt(0)))),{c:se,m:re}=ie.exports,oe=A(re).subarray(65536);function R(e,t=0){for(const n of function*(i){for(;i.length>65536;)yield i.subarray(0,65536),i=i.subarray(65536);i.length&&(yield i)}(e))oe.set(n),t=se(n.length,t);return t}function J(e,t,n=0){const i=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,r=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;t.setUint16(n,i,1),t.setUint16(n+2,r,1)}function ae(e){const t=I(30);return t.setUint32(0,1347093252),t.setUint32(4,754976768),J(e.t,t,10),t.setUint16(26,e.o.length,1),A(t)}async function*le(e){let{i:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.u=R(t,0),e.A=BigInt(t.length);else{e.A=0n;const n=t.getReader();for(;;){const{value:i,done:r}=await n.read();if(r)break;e.u=R(i,e.u),e.A+=BigInt(i.length),yield i}}}function ce(e,t){const n=I(16+(t?8:0));return n.setUint32(0,1347094280),n.setUint32(4,e.isFile?e.u:0,1),t?(n.setBigUint64(8,e.A,1),n.setBigUint64(16,e.A,1)):(n.setUint32(8,x(e.A),1),n.setUint32(12,x(e.A),1)),A(n)}function fe(e,t,n=0){const i=I(46);return i.setUint32(0,1347092738),i.setUint32(4,755182848),i.setUint16(8,2048),J(e.t,i,12),i.setUint32(16,e.isFile?e.u:0,1),i.setUint32(20,x(e.A),1),i.setUint32(24,x(e.A),1),i.setUint16(28,e.o.length,1),i.setUint16(30,n,1),i.setUint16(40,e.isFile?33204:16893,1),i.setUint32(42,x(t),1),A(i)}function de(e,t,n){const i=I(n);return i.setUint16(0,1,1),i.setUint16(2,n-4,1),16&n&&(i.setBigUint64(4,e.A,1),i.setBigUint64(12,e.A,1)),i.setBigUint64(n-8,t,1),A(i)}function V(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var ue=e=>function(t){let n=BigInt(22),i=0n,r=0;for(const o of t){if(!o.o)throw new Error("Every file must have a non-empty name.");if(o.A===void 0)throw new Error(`Missing size for file "${new TextDecoder().decode(o.o)}".`);const c=o.A>=0xffffffffn,s=i>=0xffffffffn;i+=BigInt(46+o.o.length+(c&&8))+o.A,n+=BigInt(o.o.length+46+(12*s|28*c)),r||(r=c)}return(r||i>=0xffffffffn)&&(n+=BigInt(76)),n+i}(function*(t){for(const n of t)yield H(...V(n)[0])}(e));function me(e,t={}){const n={"Content-Type":"application/zip","Content-Disposition":"attachment"};return(typeof t.length=="bigint"||Number.isInteger(t.length))&&t.length>0&&(n["Content-Length"]=String(t.length)),t.metadata&&(n["Content-Length"]=String(ue(t.metadata))),new Response(pe(e),{headers:n})}function pe(e){return j(async function*(t){const n=[];let i=0n,r=0n,o=0;for await(const a of t){yield ae(a),yield a.o,a.isFile&&(yield*le(a));const p=a.A>=0xffffffffn,h=12*(i>=0xffffffffn)|28*p;yield ce(a,p),n.push(fe(a,i,h)),n.push(a.o),h&&n.push(de(a,i,h)),p&&(i+=8n),r++,i+=BigInt(46+a.o.length)+a.A,o||(o=p)}let c=0n;for(const a of n)yield a,c+=BigInt(a.length);if(o||i>=0xffffffffn){const a=I(76);a.setUint32(0,1347094022),a.setBigUint64(4,BigInt(44),1),a.setUint32(12,755182848),a.setBigUint64(24,r,1),a.setBigUint64(32,r,1),a.setBigUint64(40,c,1),a.setBigUint64(48,i,1),a.setUint32(56,1347094023),a.setBigUint64(64,i+c,1),a.setUint32(72,1,1),yield A(a)}const s=I(22);s.setUint32(0,1347093766),s.setUint16(8,Q(r),1),s.setUint16(10,Q(r),1),s.setUint32(12,x(c),1),s.setUint32(16,x(i),1),yield A(s)}(async function*(t){for await(const n of t){const[i,r]=V(n);yield Object.assign(ee(...r),H(...i))}}(e)))}let F=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");class N{constructor(t,n,i,r){this.text=t,this.answers=n,this.points=i,this.type=r,this.id=F(),this.answerIds=[],this.correctAnswerIds=[]}}const z={};function he(){let e;for(e=Math.floor(Math.random()*1e5);z[e];)e=Math.floor(Math.random()*1e5);
1return z[e]=!0,String(e)}function ge(e){const t=[];let n,i=0;function r(o,c){return c=c+1,o.lineNumber=c,o}return e.split(/\r?\n/).forEach((o,c)=>{let s;if(s=o.match(/^ *Points? *: *(\d+.?\d*)?/i)){const a=Number(s[1]);if(isNaN(a)||!a)throw r(Error(`Please insert a valid point value on line ${c+1}`),c);t[i]?n.points=a:n=t[i]=new N("",[],a,"multiple_choice_question")}else if(s=o.match(/^ *Type *: *(?:(E)|(MC|TF|MA))?/i)){if(!s[1]&&!s[2])throw r(new Error(`Please specify a question type on line ${c+1}`),c);t[i]?s[1]&&(n.type="essay_question"):n=t[i]=new N("",[],1,"essay_question")}else if(s=o.match(/^ *\d+\)/))o=`<p>${o.slice(s[0].length).trim()}</p>`,t[i]?(n.text=o,i++):(n=t[i]=new N(o,[],1,"multiple_choice_question"),i++);else if(s=o.match(/^ *(\*)?[a-z]\)/)){o=o.slice(s[0].length).trim();const a={text:o,correct:!1,id:he()},p=n.answers;n.answerIds.push(a.id),s[1]=="*"&&(a.correct=!0,n.correctAnswerIds.push(a.id),n.correctAnswerIds.length>1&&(n.type="multiple_answers_question")),p.push(a)}else if(s=o.match(/^( *.+)/)&&n&&n.text&&n.answers.length==0)n.text+=`<p>${o.trim()}</p>`;else if(s=o.match(/^ *\S+/))throw r(Error(`Unexpected input on line ${c+1}`),c)}),t}var O,X;function we(){if(X)return O;X=1;function e(t,n={}){n.filter=n.filter||(()=>!0);function i(){return a()||$()||b()||h()}function r(){return l(/\s*/),a(!0)||b()||p()||s(!1)}function o(){const f=c(),d=[];let u,m=r();for(;m;){if(m.node.type==="Element"){if(u)throw new Error("Found multiple root nodes");u=m.node}m.excluded||d.push(m.node),m=r()}if(!u)throw new Error("Failed to parse XML");return{declaration:f?f.node:null,root:u,children:d}}function c(){return s(!0)}function s(f){const d=l(f?/^<\?(xml)\s*/:/^<\?([\w-:.]+)\s*/);if(!d)return;const u={name:d[1],type:"ProcessingInstruction",attributes:{}};for(;!(w()||y("?>"));){const m=M();if(!m)return u;u.attributes[m.name]=m.value}return l(/\?>/),{excluded:f?!1:n.filter(u)===!1,node:u}}function a(f){const d=l(/^<([\w-:.]+)\s*/);if(!d)return;const u={type:"Element",name:d[1],attributes:{},children:[]};for(;!(w()||y(">")||y("?>")||y("/>"));){const g=M();if(!g)return u;u.attributes[g.name]=g.value}const m=f?!1:n.filter(u)===!1;if(l(/^\s*\/>/))return u.children=null,{excluded:m,node:u};if(l(/\??>/),!m){let g=i();for(;g;)g.excluded||u.children.push(g.node),g=i()}return l(/^<\/[\w-:.]+>/),{excluded:m,node:u}}function p(){const f=l(/^<!DOCTYPE\s+[^>]*>/);if(f){const d={type:"DocumentType",content:f[0]};return{excluded:n.filter(d)===!1,node:d}}}function h(){if(t.startsWith("<![CDATA[")){const f=t.indexOf("]]>");if(f>-1){const d=f+3,u={type:"CDATA",content:t.substring(0,d)};return t=t.slice(d),{excluded:n.filter(u)===!1,node:u}}}}function b(){const f=l(/^<!--[\s\S]*?-->/);if(f){const d={type:"Comment",content:f[0]};return{excluded:n.filter(d)===!1,node:d}}}function $(){const f=l(/^([^<]+)/);if(f){const d={type:"Text",content:f[1]};return{excluded:n.filter(d)===!1,node:d}}}function M(){const f=l(/([\w-:.]+)\s*=\s*("[^"]*"|'[^']*'|\w+)\s*/);if(!!f)return{name:f[1],value:P(f[2])}}function P(f){return f.replace(/^['"]|['"]$/g,"")}function l(f){const d=t.match(f);if(!!d)return t=t.slice(d[0].length),d}function w(){return t.length===0}function y(f){return t.indexOf(f)===0}return t=t.trim(),o()}return O=e,O}function T(e){if(!e.options.indentation&&!e.options.lineSeparator)return;e.content+=e.options.lineSeparator;let t;for(t=0;t<e.level;t++)e.content+=e.options.indentation}function _(e,t){e.content+=t}function W(e,t,n){if(typeof e.content=="string")ye(e,t,n);else if(e.type==="Element")_e(e,t,n);else if(e.type==="ProcessingInstruction")K(e,t);else throw new Error("Unknown node type: "+e.type)}function ye(e,t,n){n||(e.content=e.content.trim()),e.content.length>0&&(!n&&t.content.length>0&&T(t),_(t,e.content))}function _e(e,t,n){if(!n&&t.content.length>0&&T(t),_(t,"<"+e.name),G(t,e.attributes),e.children===null){const i=t.options.whiteSpaceAtEndOfSelfclosingTag?" />":"/>";_(t,i)}else if(e.children.length===0)_(t,"></"+e.name+">");else{_(t,">"),t.level++;let i=e.attributes["xml:space"]==="preserve";if(!i&&t.options.collapseContent){let r=!1,o=!1,c=!1;
1e.children.forEach(function(s,a){s.type==="Text"?(s.content.includes(` 2`)?(o=!0,s.content=s.content.trim()):(a===0||a===e.children.length-1)&&s.content.trim().length===0&&(s.content=""),s.content.length>0&&(r=!0)):s.type==="CDATA"?r=!0:c=!0}),r&&(!c||!o)&&(i=!0)}e.children.forEach(function(r){W(r,t,n||i,t.options)}),t.level--,!n&&!i&&T(t),_(t,"</"+e.name+">")}}function G(e,t){Object.keys(t).forEach(function(n){const i=t[n].replace(/"/g,""");_(e," "+n+'="'+i+'"')})}function K(e,t){t.content.length>0&&T(t),_(t,"<?"+e.name),G(t,e.attributes),_(t,"?>")}function Ae(e,t={}){t.indentation="indentation"in t?t.indentation:" ",t.collapseContent=t.collapseContent===!0,t.lineSeparator="lineSeparator"in t?t.lineSeparator:`\r 3`,t.whiteSpaceAtEndOfSelfclosingTag=!!t.whiteSpaceAtEndOfSelfclosingTag;const i=we()(e,{filter:t.filter}),r={content:"",level:0,options:t};return i.declaration&&K(i.declaration,r),i.children.forEach(function(o){W(o,r,!1)}),r.content.replace(/\r\n/g,` 4`).replace(/\n/g,t.lineSeparator)}var be=Ae;function xe(e,t,n){const i=document.implementation.createDocument("","",null),r=t,o=n;let c=0;function s(l,w,...y){const f=i.createElement(l);if(w)for(let d of Object.keys(w))f.setAttribute(d,w[d]);for(let d of y)typeof d!="string"?f.appendChild(d):f.appendChild(i.createTextNode(d));return f}const a=i.createProcessingInstruction("xml",'version="1.0" encoding="UTF-8"');i.insertBefore(a,i.firstChild);const p=i.createElement("questestinterop");p.setAttribute("xmlns","http://www.imsglobal.org/xsd/ims_qtiasiv1p2"),p.setAttribute("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"),p.setAttribute("xsi:schemaLocation","http://www.imsglobal.org/xsd/ims_qtiasiv1p2 http://www.imsglobal.org/xsd/ims_qtiasiv1p2p1.xsd");const h=s("assessment",{ident:o,title:r});h.appendChild(s("qtimetadata",{},s("qtimetadatafield",{},s("fieldlabel",{},"cc_maxattempts"),s("fieldentry",{},"1"))));const b=s("section",{ident:"root_section"});for(let l of e){if(l.type==="multiple_choice_question"&&l.answers.length===2&&/true/i.test(l.answers[0].text)&&/false/i.test(l.answers[1].text)&&(l.type="true_false_question"),l.text=="<p></p>")throw new Error(`Include question text for question ${e.indexOf(l)+1}`);if(l.type!="essay_question"&&l.answers.length==0)throw new Error(`Include answers for question ${e.indexOf(l)+1}, or specify Type: E for essay question`);if(l.type!="essay_question"&&l.correctAnswerIds.length==0)throw new Error(`Specify correct answer for question ${e.indexOf(l)+1}`);c+=l.points;const w=s("item",{ident:l.id,title:"Question"});let y="";l.type!="essay_question"&&(y=l.answerIds.join(","));const f=s("itemmetadata",{},s("qtimetadata",{},s("qtimetadatafield",{},s("fieldlabel",{},"question_type"),s("fieldentry",{},l.type)),s("qtimetadatafield",{},s("fieldlabel",{},"points_possible"),s("fieldentry",{},String(l.points))),s("qtimetadatafield",{},s("fieldlabel",{},"original_answer_ids"),s("fieldentry",{},y)),s("qtimetadatafield",{},s("fieldlabel",{},"assessment_question_identifierref"),s("fieldentry",{},`ref_${l.id}`))));w.appendChild(f);const d=s("presentation",{},s("material",{},s("mattext",{texttype:"text/html"},l.text)));let u="Single";if(l.type=="essay_question")d.appendChild(s("response_str",{ident:"response1",rcardinality:u},s("render_fib",{},s("response_label",{ident:"answer1",rshuffle:"No"}))));else{l.type=="multiple_answers_question"&&(u="Multiple");const v=s("response_lid",{ident:"response1",rcardinality:u}),E=i.createElement("render_choice");for(let B of l.answers){const Z=s("response_label",{ident:B.id},s("material",{},s("mattext",{texttype:"text/plain"},B.text)));E.appendChild(Z)}v.appendChild(E),d.appendChild(v)}w.appendChild(d);const m=s("resprocessing",{},s("outcomes",{},s("decvar",{maxvalue:"100",minvalue:"0",varname:"SCORE",vartype:"Decimal"}))),g=s("respcondition",{continue:"No"}),L=i.createElement("conditionvar");if(l.type=="multiple_answers_question"){const v=i.createElement("and");for(let E of l.answers){const B=s("varequal",{respident:"response1"},E.id);E.correct==!1?v.appendChild(s("not",{},B)):v.appendChild(B),L.appendChild(v)}}else l.type=="essay_question"?L.appendChild(i.createElement("other")):L.appendChild(s("varequal",{respident:"response1"},l.correctAnswerIds[0]));g.appendChild(L),l.type!="essay_question"&&g.appendChild(s("setvar",{action:"Set",varname:"SCORE"},"100")),m.appendChild(g),w.appendChild(m),b.appendChild(w)}h.appendChild(b),p.appendChild(h),i.appendChild(p);const M=new XMLSerializer().serializeToString(i);return{questions:be(M,{indentation:" ",collapseContent:!0}),totalPoints:c}}function ve(e,t,n){return`<?xml version="1.0" encoding="UTF-8"?> 5<quiz identifier="${e}" xmlns="http://canvas.instructure.com/xsd/cccv1p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://canvas.instructure.com/xsd/cccv1p0 https://canvas.instructure.com/xsd/cccv1p0.xsd"> 6 <title>${t}</title> 7 <description></description> 8 <shuffle_answers>false</shuffle_answers> 9 <scoring_policy>keep_highest</scoring_policy> 10 <hide_results></hide_results> 11 <quiz_type>assignment</quiz_type> 12 <points_possible>${String(n)}</points_possible> 13 <require_lockdown_browser>false</require_lockdown_browser> 14 <require_lockdown_browser_for_results>false</require_lockdown_browser_for_results> 15 <require_lockdown_browser_monitor>false</require_lockdown_browser_monitor> 16 <lockdown_browser_monitor_data></lockdown_browser_monitor_data> 17 <show_correct_answers>true</show_correct_answers> 18 <anonymous_submissions>false</anonymous_submissions> 19 <could_be_locked>false</could_be_locked> 20 <allowed_attempts>1</allowed_attempts> 21 <one_question_at_a_time>false</one_question_at_a_time> 22 <cant_go_back>false</cant_go_back> 23 <available>false</available> 24 <one_time_results>false</one_time_results> 25 <show_correct_answers_last_attempt>false</show_correct_answers_last_attempt> 26 <only_visible_to_overrides>false</only_visible_to_overrides> 27 <module_locked>false</module_locked> 28 <assignment_overrides> 29 </assignment_overrides> 30</quiz>`}function qe(e,t,n){const i=F(),r=F();return`<?xml version="1.0" encoding="UTF-8"?> 31<manifest identifier="${i}" xmlns="http://www.imsglobal.org/xsd/imsccv1p1/imscp_v1p1" xmlns:lom="http://ltsc.ieee.org/xsd/imsccv1p1/LOM/resource" xmlns:imsmd="http://www.imsglobal.org/xsd/imsmd_v1p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsccv1p1/imscp_v1p1 http://www.imsglobal.org/xsd/imscp_v1p1.xsd http://ltsc.ieee.org/xsd/imsccv1p1/LOM/resource http://www.imsglobal.org/profile/cc/ccv1p1/LOM/ccv1p1_lomresource_v1p0.xsd http://www.imsglobal.org/xsd/imsmd_v1p2 http://www.imsglobal.org/xsd/imsmd_v1p2p2.xsd"> 32 <metadata> 33 <schema>IMS Content</schema> 34 <schemaversion>1.1.3</schemaversion> 35 <imsmd:lom> 36 <imsmd:general> 37 <imsmd:title> 38 <imsmd:string>${t}</imsmd:string> 39 </imsmd:title> 40 </imsmd:general> 41 <imsmd:lifeCycle> 42 <imsmd:contribute> 43 <imsmd:date> 44 <imsmd:dateTime>${n}</imsmd:dateTime> 45 </imsmd:date> 46 </imsmd:contribute> 47 </imsmd:lifeCycle> 48 <imsmd:rights> 49 <imsmd:copyrightAndOtherRestrictions> 50 <imsmd:value>yes</imsmd:value> 51 </imsmd:copyrightAndOtherRestrictions> 52 <imsmd:description> 53 <imsmd:string>Private (Copyrighted) - http://en.wikipedia.org/wiki/Copyright</imsmd:string> 54 </imsmd:description> 55 </imsmd:rights>
56 </imsmd:lom> 57 </metadata> 58 <organizations/> 59 <resources> 60 <resource identifier="${e}" type="imsqti_xmlv1p2"> 61 <file href="${e}/${e}.xml"/> 62 <dependency identifierref="${r}"/> 63 </resource> 64 <resource identifier="${r}" type="associatedcontent/imscc_xmlv1p1/learning-application-resource" href="${e}/assessment_meta.xml"> 65 <file href="${e}/assessment_meta.xml"/> 66 </resource> 67 </resources> 68</manifest>`}const Ce=document.querySelector("form"),U=document.querySelector("textarea"),Y=document.querySelector("input"),k=document.querySelector('button[type="submit"]');let q;const Ue=document.querySelector(".sidebar"),S=document.querySelector(".tab");S.addEventListener("click",()=>{Ue.classList.toggle("expanded"),S.classList.toggle("expanded"),S.classList.contains("expanded")?S.textContent="<":S.textContent=">"});U.addEventListener("input",()=>{k.setAttribute("aria-disabled","false")});Y.addEventListener("input",()=>{k.setAttribute("aria-disabled","false")});Ce.addEventListener("submit",e=>{if(e.preventDefault(),k.getAttribute("aria-disabled")!=="true"){q&&q.remove(),k.setAttribute("aria-disabled","true");try{const t=U.value,n=Ie(Y.value);if(!t&&!n)throw new Error("Please enter a quiz title and questions in the fields above.");if(t&&!n)throw new Error("Please enter a title for the quiz.");if(!t&&n)throw new Error("Please enter your quiz questions.");const i=ge(t),r=F(),o=new Date().toISOString().slice(0,10),c=xe(i,n,r),s=ve(r,n,c.totalPoints),a=qe(r,n,o);Ee(n,r,c.questions,s,a)}catch(t){q=document.createElement("div"),q.textContent=t,q.style="color: red;",U.after(q),t.lineNumber&&Be(t.lineNumber)}}});function Ie(e){const t=document.createElement("pre"),n=document.createTextNode(e);return t.appendChild(n),t.innerHTML}async function Ee(e,t,n,i,r){const o={name:`${t}/${t}.xml`,lastModified:new Date,input:n},c={name:`${t}/assessment_meta.xml`,lastModified:new Date,input:i},s={name:"imsmanifest.xml",lastModified:new Date,input:r},p=await me([o,c,s,{name:"non_cc_assessment/"}]).blob(),h=document.createElement("a"),b=URL.createObjectURL(p);h.href=b,h.download=`${e}.zip`,h.click(),h.remove(),URL.revokeObjectURL(b)}function Be(e){const t=U.scrollHeight/U.rows,n=(e-1)*t;U.scrollTop=n}
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.