labmaker-plugin 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
- import { openBlock as o, createElementBlock as a, Fragment as b, createElementVNode as r, toDisplayString as T, resolveComponent as g, createBlock as y, withCtx as m, createVNode as p, withModifiers as w, createTextVNode as C, normalizeClass as k, createCommentVNode as _, normalizeStyle as v, renderList as L } from "vue";
2
- const f = (e, n) => {
3
- const t = e.__vccOpts || e;
4
- for (const [l, s] of n)
5
- t[l] = s;
6
- return t;
7
- }, F = {
1
+ import { openBlock as o, createElementBlock as c, Fragment as y, createElementVNode as r, toDisplayString as A, resolveComponent as u, createBlock as w, withCtx as p, createVNode as C, withModifiers as x, createTextVNode as F, normalizeClass as v, createCommentVNode as d, normalizeStyle as H, renderList as T } from "vue";
2
+ const S = (e, t) => {
3
+ const s = e.__vccOpts || e;
4
+ for (const [l, i] of t)
5
+ s[l] = i;
6
+ return s;
7
+ }, j = {
8
8
  props: ["custom-img"],
9
9
  data() {
10
10
  return {
@@ -14,8 +14,8 @@ const f = (e, n) => {
14
14
  computed: {},
15
15
  methods: {
16
16
  fileUpload(e) {
17
- const t = e.target.files[0];
18
- this.fileProcess(t);
17
+ const s = e.target.files[0];
18
+ this.fileProcess(s);
19
19
  },
20
20
  fileProcess(e) {
21
21
  this.imgSRC = URL.createObjectURL(e);
@@ -23,44 +23,44 @@ const f = (e, n) => {
23
23
  },
24
24
  mounted() {
25
25
  }
26
- }, I = /* @__PURE__ */ r("h1", null, "File Uploader", -1), M = { class: "image-uploader" }, P = /* @__PURE__ */ r("h1", null, "File Uploader", -1), V = { class: "your-file" }, A = ["src"];
27
- function $(e, n, t, l, s, i) {
28
- return o(), a(b, null, [
29
- I,
30
- r("div", M, [
31
- P,
26
+ }, B = /* @__PURE__ */ r("h1", null, "File Uploader", -1), O = { class: "image-uploader" }, L = /* @__PURE__ */ r("h1", null, "File Uploader", -1), q = { class: "your-file" }, V = ["src"];
27
+ function E(e, t, s, l, i, n) {
28
+ return o(), c(y, null, [
29
+ B,
30
+ r("div", O, [
31
+ L,
32
32
  r("input", {
33
- onChange: n[0] || (n[0] = (...h) => i.fileUpload && i.fileUpload(...h)),
33
+ onChange: t[0] || (t[0] = (...b) => n.fileUpload && n.fileUpload(...b)),
34
34
  type: "file",
35
35
  id: "file-upload",
36
36
  name: "fileUpload",
37
37
  accept: "image/*"
38
38
  }, null, 32),
39
- r("div", V, [
39
+ r("div", q, [
40
40
  r("img", {
41
- src: s.imgSRC,
41
+ src: i.imgSRC,
42
42
  alt: "",
43
43
  scrset: ""
44
- }, null, 8, A)
44
+ }, null, 8, V)
45
45
  ])
46
46
  ])
47
47
  ], 64);
48
48
  }
49
- const B = /* @__PURE__ */ f(F, [["render", $]]);
50
- const K = {
49
+ const P = /* @__PURE__ */ S(j, [["render", E]]);
50
+ const D = {
51
51
  props: ["title"],
52
52
  data() {
53
53
  return {};
54
54
  },
55
55
  computed: {}
56
56
  };
57
- function R(e, n, t, l, s, i) {
58
- return o(), a("header", null, [
59
- r("h1", null, T(t.title), 1)
57
+ function W(e, t, s, l, i, n) {
58
+ return o(), c("header", null, [
59
+ r("h1", null, A(s.title), 1)
60
60
  ]);
61
61
  }
62
- const U = /* @__PURE__ */ f(K, [["render", R]]);
63
- const W = {
62
+ const U = /* @__PURE__ */ S(D, [["render", W]]);
63
+ const N = {
64
64
  data() {
65
65
  return {};
66
66
  },
@@ -84,23 +84,23 @@ const W = {
84
84
  }
85
85
  }
86
86
  };
87
- function D(e, n, t, l, s, i) {
88
- const h = g("el-col"), d = g("el-button"), c = g("el-row");
89
- return o(), y(c, { gutter: 20 }, {
90
- default: m(() => [
91
- p(h, { span: 18 }),
92
- p(h, {
87
+ function K(e, t, s, l, i, n) {
88
+ const b = u("el-col"), m = u("el-button"), a = u("el-row");
89
+ return o(), w(a, { gutter: 20 }, {
90
+ default: p(() => [
91
+ C(b, { span: 18 }),
92
+ C(b, {
93
93
  span: 6,
94
94
  class: "homeButtonContainer"
95
95
  }, {
96
- default: m(() => [
97
- p(d, {
96
+ default: p(() => [
97
+ C(m, {
98
98
  type: "primary ",
99
- onClick: n[0] || (n[0] = w((u) => i.changePage(0), ["stop"])),
99
+ onClick: t[0] || (t[0] = x((f) => n.changePage(0), ["stop"])),
100
100
  class: "homeButton"
101
101
  }, {
102
- default: m(() => [
103
- C("Return to Crime Screen")
102
+ default: p(() => [
103
+ F("Return to Crime Screen")
104
104
  ]),
105
105
  _: 1
106
106
  })
@@ -111,8 +111,8 @@ function D(e, n, t, l, s, i) {
111
111
  _: 1
112
112
  });
113
113
  }
114
- const H = /* @__PURE__ */ f(W, [["render", D]]);
115
- const E = {
114
+ const I = /* @__PURE__ */ S(N, [["render", K]]);
115
+ const R = {
116
116
  props: ["content"],
117
117
  data() {
118
118
  return {};
@@ -133,35 +133,35 @@ const E = {
133
133
  mounted() {
134
134
  this.checkStepper();
135
135
  }
136
- }, z = { class: "image-container" }, N = { class: "image" }, O = ["src", "alt"], Y = ["innerHTML"], j = ["innerHTML"], X = ["innerHTML"];
137
- function G(e, n, t, l, s, i) {
138
- return o(), a("div", z, [
139
- r("div", N, [
136
+ }, Q = { class: "image-container" }, Y = { class: "image" }, X = ["src", "alt"], G = ["innerHTML"], J = ["innerHTML"], Z = ["innerHTML"];
137
+ function ee(e, t, s, l, i, n) {
138
+ return o(), c("div", Q, [
139
+ r("div", Y, [
140
140
  r("img", {
141
- src: t.content.src,
142
- alt: t.content.alt,
143
- class: k(t.content.class)
144
- }, null, 10, O),
145
- t.content.captionHeader ? (o(), a("span", {
141
+ src: s.content.src,
142
+ alt: s.content.alt,
143
+ class: v(s.content.class)
144
+ }, null, 10, X),
145
+ s.content.captionHeader ? (o(), c("span", {
146
146
  key: 0,
147
147
  class: "captionHeader",
148
- innerHTML: t.content.captionHeader
149
- }, null, 8, Y)) : _("", !0),
150
- t.content.caption ? (o(), a("span", {
148
+ innerHTML: s.content.captionHeader
149
+ }, null, 8, G)) : d("", !0),
150
+ s.content.caption ? (o(), c("span", {
151
151
  key: 1,
152
152
  class: "caption",
153
- innerHTML: t.content.caption
154
- }, null, 8, j)) : _("", !0),
155
- t.content.copyright ? (o(), a("span", {
153
+ innerHTML: s.content.caption
154
+ }, null, 8, J)) : d("", !0),
155
+ s.content.copyright ? (o(), c("span", {
156
156
  key: 2,
157
- innerHTML: t.content.copyright,
157
+ innerHTML: s.content.copyright,
158
158
  class: "copyright"
159
- }, null, 8, X)) : _("", !0)
159
+ }, null, 8, Z)) : d("", !0)
160
160
  ])
161
161
  ]);
162
162
  }
163
- const J = /* @__PURE__ */ f(E, [["render", G], ["__scopeId", "data-v-6d545532"]]);
164
- const q = {
163
+ const te = /* @__PURE__ */ S(R, [["render", ee], ["__scopeId", "data-v-6d545532"]]);
164
+ const se = {
165
165
  props: ["content"],
166
166
  //moduleLessonPage
167
167
  data() {
@@ -224,7 +224,7 @@ const q = {
224
224
  this.textVersionCheck();
225
225
  },
226
226
  kalturaMedia(e) {
227
- let n = {
227
+ let t = {
228
228
  uiconf_id: "35766781",
229
229
  partner_id: "2061901",
230
230
  entry_id: "",
@@ -232,7 +232,7 @@ const q = {
232
232
  width: "640",
233
233
  type: "video"
234
234
  };
235
- return n.entry_id = this.content.kalturaEntryId, this.content.kalturaType && (n.type = this.content.kalturaType), n.type === "audio" ? n.uiconf_id = "36511471" : n.type === "audiobtn" ? n.uiconf_id = "36582731" : n.type === "videocc" && (n.uiconf_id = "35766781"), this.content.standalone && this.$store.commit("setStepHold", !1), "https://cdnapisec.kaltura.com/p/" + n.partner_id + "/sp/" + n.partner_id + "00/embedIframeJs/uiconf_id/" + n.uiconf_id + "/partner_id/" + n.partner_id + "?iframeembed=true&playerId=Kaltura&entry_id=" + n.entry_id;
235
+ return t.entry_id = this.content.kalturaEntryId, this.content.kalturaType && (t.type = this.content.kalturaType), t.type === "audio" ? t.uiconf_id = "36511471" : t.type === "audiobtn" ? t.uiconf_id = "36582731" : t.type === "videocc" && (t.uiconf_id = "35766781"), this.content.standalone && this.$store.commit("setStepHold", !1), "https://cdnapisec.kaltura.com/p/" + t.partner_id + "/sp/" + t.partner_id + "00/embedIframeJs/uiconf_id/" + t.uiconf_id + "/partner_id/" + t.partner_id + "?iframeembed=true&playerId=Kaltura&entry_id=" + t.entry_id;
236
236
  },
237
237
  showKaltura() {
238
238
  this.showingKaltura = !0;
@@ -243,21 +243,21 @@ const q = {
243
243
  tvCleaner() {
244
244
  let e = document.createElement("div");
245
245
  e.innerHTML = this.content.textVersion;
246
- for (let n = 0; n < e.children.length; n++) {
247
- let t = e.children[n];
248
- if (t.tagName == "DIV" && t.className == "panel-default" && t.children[0].dataset.toggle)
249
- for (let l = 0; l < t.children.length; l++) {
250
- let s = t.children[l];
251
- if (s.dataset.toggle == "collapse") {
252
- let i = {
253
- heading: s.innerHTML,
254
- body: t.children[l + 1].innerHTML
246
+ for (let t = 0; t < e.children.length; t++) {
247
+ let s = e.children[t];
248
+ if (s.tagName == "DIV" && s.className == "panel-default" && s.children[0].dataset.toggle)
249
+ for (let l = 0; l < s.children.length; l++) {
250
+ let i = s.children[l];
251
+ if (i.dataset.toggle == "collapse") {
252
+ let n = {
253
+ heading: i.innerHTML,
254
+ body: s.children[l + 1].innerHTML
255
255
  };
256
- this.textversionArray[n] = i;
256
+ this.textversionArray[t] = n;
257
257
  }
258
258
  }
259
259
  else
260
- this.textversionArray[n] = t.outerHTML;
260
+ this.textversionArray[t] = s.outerHTML;
261
261
  }
262
262
  }
263
263
  },
@@ -266,96 +266,96 @@ const q = {
266
266
  },
267
267
  mounted() {
268
268
  }
269
- }, Q = {
269
+ }, ne = {
270
270
  key: 0,
271
271
  class: "textVersion"
272
- }, Z = /* @__PURE__ */ r("h1", null, "Text Version", -1), ee = ["innerHTML"], te = ["src", "width", "height"], ne = ["src", "width", "height"], ie = ["src", "width", "height"], oe = {
272
+ }, oe = /* @__PURE__ */ r("h1", null, "Text Version", -1), ie = ["innerHTML"], ce = ["src", "width", "height"], le = ["src", "width", "height"], re = ["src", "width", "height"], ae = {
273
273
  key: 2,
274
274
  class: "alert alert-danger"
275
275
  };
276
- function se(e, n, t, l, s, i) {
277
- const h = g("el-button");
278
- return o(), a("div", {
279
- class: k(["kContainer", t.content.class])
276
+ function ue(e, t, s, l, i, n) {
277
+ const b = u("el-button");
278
+ return o(), c("div", {
279
+ class: v(["kContainer", s.content.class])
280
280
  }, [
281
- t.content.textVersion && s.showingText ? (o(), a("div", Q, [
282
- Z,
281
+ s.content.textVersion && i.showingText ? (o(), c("div", ne, [
282
+ oe,
283
283
  r("div", {
284
- innerHTML: t.content.textVersion
285
- }, null, 8, ee)
286
- ])) : _("", !0),
287
- !s.showingText && t.content.kalturaEntryId ? (o(), a("div", {
284
+ innerHTML: s.content.textVersion
285
+ }, null, 8, ie)
286
+ ])) : d("", !0),
287
+ !i.showingText && s.content.kalturaEntryId ? (o(), c("div", {
288
288
  key: 1,
289
289
  class: "mainVersion",
290
- style: v({ width: i.kWidth + "px", height: i.kHeight + "px" })
290
+ style: H({ width: n.kWidth + "px", height: n.kHeight + "px" })
291
291
  }, [
292
- t.content.kalturaType == "video" && !s.showingKaltura ? (o(), a("div", {
292
+ s.content.kalturaType == "video" && !i.showingKaltura ? (o(), c("div", {
293
293
  key: 0,
294
- class: k(["kPoster", { active: s.showingKaltura == !0 }]),
295
- style: v({ width: i.kWidth + "px", height: i.kHeight + "px" })
294
+ class: v(["kPoster", { active: i.showingKaltura == !0 }]),
295
+ style: H({ width: n.kWidth + "px", height: n.kHeight + "px" })
296
296
  }, [
297
297
  r("iframe", {
298
- onClick: n[0] || (n[0] = (...d) => i.showKaltura && i.showKaltura(...d)),
298
+ onClick: t[0] || (t[0] = (...m) => n.showKaltura && n.showKaltura(...m)),
299
299
  class: "videoIframe",
300
- src: i.kalturaMedia(t.content),
301
- width: i.kWidth + "px",
302
- height: i.kHeight + "px",
300
+ src: n.kalturaMedia(s.content),
301
+ width: n.kWidth + "px",
302
+ height: n.kHeight + "px",
303
303
  allowfullscreen: "",
304
304
  webkitallowfullscreen: "",
305
305
  mozAllowFullScreen: "",
306
306
  frameborder: "0"
307
- }, null, 8, te)
308
- ], 6)) : _("", !0),
309
- t.content.kalturaType == "audio" ? (o(), a("div", {
307
+ }, null, 8, ce)
308
+ ], 6)) : d("", !0),
309
+ s.content.kalturaType == "audio" ? (o(), c("div", {
310
310
  key: 1,
311
- class: k(["kAudio", { active: s.showingKaltura == !0 }]),
312
- onClick: n[1] || (n[1] = (...d) => i.showKaltura && i.showKaltura(...d))
311
+ class: v(["kAudio", { active: i.showingKaltura == !0 }]),
312
+ onClick: t[1] || (t[1] = (...m) => n.showKaltura && n.showKaltura(...m))
313
313
  }, [
314
314
  r("iframe", {
315
315
  id: "my_iframe",
316
- src: i.kalturaMedia(t.content),
317
- width: i.kWidth + "px",
318
- height: i.kHeight + "px",
316
+ src: n.kalturaMedia(s.content),
317
+ width: n.kWidth + "px",
318
+ height: n.kHeight + "px",
319
319
  allowfullscreen: "",
320
320
  webkitallowfullscreen: "",
321
321
  mozAllowFullScreen: "",
322
322
  frameborder: "0"
323
- }, null, 8, ne)
324
- ], 2)) : _("", !0),
325
- t.content.kalturaType == "audiobtn" ? (o(), a("div", {
323
+ }, null, 8, le)
324
+ ], 2)) : d("", !0),
325
+ s.content.kalturaType == "audiobtn" ? (o(), c("div", {
326
326
  key: 2,
327
- class: k(["kAudiobtn", { active: s.showingKaltura == !0 }]),
328
- onClick: n[2] || (n[2] = (...d) => i.showKaltura && i.showKaltura(...d))
327
+ class: v(["kAudiobtn", { active: i.showingKaltura == !0 }]),
328
+ onClick: t[2] || (t[2] = (...m) => n.showKaltura && n.showKaltura(...m))
329
329
  }, [
330
330
  r("iframe", {
331
- src: i.kalturaMedia(t.content),
332
- width: s.audioBtn.width + "px",
333
- height: s.audioBtn.height + "px",
331
+ src: n.kalturaMedia(s.content),
332
+ width: i.audioBtn.width + "px",
333
+ height: i.audioBtn.height + "px",
334
334
  allowfullscreen: "",
335
335
  webkitallowfullscreen: "",
336
336
  mozAllowFullScreen: "",
337
337
  frameborder: "0"
338
- }, null, 8, ie)
339
- ], 2)) : _("", !0)
340
- ], 4)) : _("", !0),
341
- t.content.kalturaEntryId == "" ? (o(), a("div", oe, "There is no Kaltura Entry ID")) : _("", !0),
342
- t.content.textVersion ? (o(), y(h, {
338
+ }, null, 8, re)
339
+ ], 2)) : d("", !0)
340
+ ], 4)) : d("", !0),
341
+ s.content.kalturaEntryId == "" ? (o(), c("div", ae, "There is no Kaltura Entry ID")) : d("", !0),
342
+ s.content.textVersion ? (o(), w(b, {
343
343
  key: 3,
344
344
  size: "medium",
345
345
  type: "primary",
346
346
  "aria-label": "text version",
347
347
  class: "toggleSwitch ftSwitch btn btn-primary vidText",
348
- onClick: n[3] || (n[3] = w((d) => i.showText(t.content.kalturaType), ["stop"]))
348
+ onClick: t[3] || (t[3] = x((m) => n.showText(s.content.kalturaType), ["stop"]))
349
349
  }, {
350
- default: m(() => [
351
- C(T(i.getButtonText(t.content.kalturaType)), 1)
350
+ default: p(() => [
351
+ F(A(n.getButtonText(s.content.kalturaType)), 1)
352
352
  ]),
353
353
  _: 1
354
- })) : _("", !0)
354
+ })) : d("", !0)
355
355
  ], 2);
356
356
  }
357
- const re = /* @__PURE__ */ f(q, [["render", se]]);
358
- const ae = {
357
+ const he = /* @__PURE__ */ S(se, [["render", ue]]);
358
+ const de = {
359
359
  props: ["content"],
360
360
  data() {
361
361
  return {
@@ -380,64 +380,64 @@ const ae = {
380
380
  },
381
381
  mounted() {
382
382
  }
383
- }, ce = { class: "my-header" }, le = ["id", "innerHTML"], de = ["innerHTML"], ue = { key: 1 }, he = ["src"], _e = ["innerHTML"], me = { class: "dialog-footer" };
384
- function ge(e, n, t, l, s, i) {
385
- const h = g("el-button"), d = g("el-dialog");
386
- return o(), y(d, {
387
- width: i.feedbackWidth,
388
- modelValue: s.show,
389
- "onUpdate:modelValue": n[1] || (n[1] = (c) => s.show = c),
390
- "before-close": i.feedbackClose
383
+ }, me = { class: "my-header" }, fe = ["id", "innerHTML"], be = ["innerHTML"], pe = { key: 1 }, _e = ["src"], ge = ["innerHTML"], ke = { class: "dialog-footer" };
384
+ function ye(e, t, s, l, i, n) {
385
+ const b = u("el-button"), m = u("el-dialog");
386
+ return o(), w(m, {
387
+ width: n.feedbackWidth,
388
+ modelValue: i.show,
389
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => i.show = a),
390
+ "before-close": n.feedbackClose
391
391
  }, {
392
- header: m(({ close: c, titleId: u, titleClass: x }) => [
393
- r("div", ce, [
392
+ header: p(({ close: a, titleId: f, titleClass: _ }) => [
393
+ r("div", me, [
394
394
  r("h4", {
395
- id: u,
396
- class: k(x),
397
- innerHTML: i.feedbackHeader
398
- }, null, 10, le)
395
+ id: f,
396
+ class: v(_),
397
+ innerHTML: n.feedbackHeader
398
+ }, null, 10, fe)
399
399
  ])
400
400
  ]),
401
- footer: m(() => [
402
- r("span", me, [
403
- p(h, {
401
+ footer: p(() => [
402
+ r("span", ke, [
403
+ C(b, {
404
404
  size: "small",
405
405
  id: "feedbackClose",
406
406
  type: "primary",
407
- onClick: n[0] || (n[0] = w((c) => i.feedbackClose(), ["stop"]))
407
+ onClick: t[0] || (t[0] = x((a) => n.feedbackClose(), ["stop"]))
408
408
  }, {
409
- default: m(() => [
410
- C("Close")
409
+ default: p(() => [
410
+ F("Close")
411
411
  ]),
412
412
  _: 1
413
413
  })
414
414
  ])
415
415
  ]),
416
- default: m(() => [
417
- i.getShowFeedbackAttempts ? (o(), a(b, { key: 0 }, [
418
- t.content.feedbackAttempts ? (o(), a("p", {
416
+ default: p(() => [
417
+ n.getShowFeedbackAttempts ? (o(), c(y, { key: 0 }, [
418
+ s.content.feedbackAttempts ? (o(), c("p", {
419
419
  key: 0,
420
- innerHTML: t.content.feedbackAttempts
421
- }, null, 8, de)) : (o(), a("p", ue, "You have tried too many times, the correct answer has been provided for you."))
422
- ], 64)) : (o(), a(b, { key: 1 }, [
423
- t.content.feedbackImage ? (o(), a("img", {
420
+ innerHTML: s.content.feedbackAttempts
421
+ }, null, 8, be)) : (o(), c("p", pe, "You have tried too many times, the correct answer has been provided for you."))
422
+ ], 64)) : (o(), c(y, { key: 1 }, [
423
+ s.content.feedbackImage ? (o(), c("img", {
424
424
  key: 0,
425
425
  class: "im-ButtonImage",
426
- src: t.content.feedbackImage,
426
+ src: s.content.feedbackImage,
427
427
  alt: "button image"
428
- }, null, 8, he)) : _("", !0),
428
+ }, null, 8, _e)) : d("", !0),
429
429
  r("p", {
430
- innerHTML: t.content.feedback
431
- }, null, 8, _e)
430
+ innerHTML: s.content.feedback
431
+ }, null, 8, ge)
432
432
  ], 64))
433
433
  ]),
434
434
  _: 1
435
435
  }, 8, ["width", "modelValue", "before-close"]);
436
436
  }
437
- const S = /* @__PURE__ */ f(ae, [["render", ge]]);
438
- const fe = {
437
+ const z = /* @__PURE__ */ S(de, [["render", ye]]);
438
+ const we = {
439
439
  components: {
440
- Feedback: S
440
+ Feedback: z
441
441
  },
442
442
  inject: ["message"],
443
443
  props: ["content"],
@@ -457,8 +457,8 @@ const fe = {
457
457
  pixelFormat(e) {
458
458
  return typeof e == "number" ? e + "px" : e;
459
459
  },
460
- changePage(e, n) {
461
- e.pageLink ? this.$store.commit("setCurrentPage", e.pageLink) : e.feedback && (this.feedbackIndex = n, this.feedbackVisibility.indexOf(n) === -1 && this.feedbackVisibility.push(n), this.$store.commit("setShowFeedback", !0), this.content.hotspots.length - 1 === this.feedbackVisibility.length - 1 && (this.$store.commit("setStepHold", !1), this.$store.commit("setStepDone", !0)), setTimeout(() => {
460
+ changePage(e, t) {
461
+ e.pageLink ? this.$store.commit("setCurrentPage", e.pageLink) : e.feedback && (this.feedbackIndex = t, this.feedbackVisibility.indexOf(t) === -1 && this.feedbackVisibility.push(t), this.$store.commit("setShowFeedback", !0), this.content.hotspots.length - 1 === this.feedbackVisibility.length - 1 && (this.$store.commit("setStepHold", !1), this.$store.commit("setStepDone", !0)), setTimeout(() => {
462
462
  document.getElementById("feedbackClose") && document.getElementById("feedbackClose").focus();
463
463
  }));
464
464
  },
@@ -469,45 +469,45 @@ const fe = {
469
469
  beforeMount() {
470
470
  this.$store.commit("setStepDone", !1), this.$store.commit("setStepHold", !0);
471
471
  }
472
- }, ke = { class: "imageMarker" }, pe = ["src", "alt"], be = { class: "hotspotArea" }, ye = ["src", "alt"], we = { class: "im-buttonText" };
473
- function xe(e, n, t, l, s, i) {
474
- const h = g("el-button"), d = g("Feedback");
475
- return o(), a("div", ke, [
472
+ }, Ce = { class: "imageMarker" }, ve = ["src", "alt"], Ae = { class: "hotspotArea" }, Se = ["src", "alt"], xe = { class: "im-buttonText" };
473
+ function Fe(e, t, s, l, i, n) {
474
+ const b = u("el-button"), m = u("Feedback");
475
+ return o(), c("div", Ce, [
476
476
  r("img", {
477
- src: t.content.image,
478
- alt: t.content.imageAlt
479
- }, null, 8, pe),
480
- r("div", be, [
481
- (o(!0), a(b, null, L(t.content.hotspots, (c, u) => (o(), a(b, null, [
482
- p(h, {
483
- type: c.buttonType,
484
- onClick: w((x) => i.changePage(c, u), ["stop"]),
485
- id: "hotspot_" + u,
486
- class: k([["is-" + c.buttonShape, { noBG: c.buttonImage }, c.class], "hotspot"]),
487
- style: v({ top: i.pixelFormat(c.cordinatesX), left: i.pixelFormat(c.cordinatesY), width: i.pixelFormat(c.dimensionsW), height: i.pixelFormat(c.dimensionsH) }),
488
- icon: c.buttonIcon
477
+ src: s.content.image,
478
+ alt: s.content.imageAlt
479
+ }, null, 8, ve),
480
+ r("div", Ae, [
481
+ (o(!0), c(y, null, T(s.content.hotspots, (a, f) => (o(), c(y, null, [
482
+ C(b, {
483
+ type: a.buttonType,
484
+ onClick: x((_) => n.changePage(a, f), ["stop"]),
485
+ id: "hotspot_" + f,
486
+ class: v([["is-" + a.buttonShape, { noBG: a.buttonImage }, a.class], "hotspot"]),
487
+ style: H({ top: n.pixelFormat(a.cordinatesX), left: n.pixelFormat(a.cordinatesY), width: n.pixelFormat(a.dimensionsW), height: n.pixelFormat(a.dimensionsH) }),
488
+ icon: a.buttonIcon
489
489
  }, {
490
- default: m(() => [
491
- c.buttonImage ? (o(), a("img", {
490
+ default: p(() => [
491
+ a.buttonImage ? (o(), c("img", {
492
492
  key: 0,
493
493
  class: "im-ButtonImage",
494
- src: c.buttonImage,
495
- alt: "image marker " + Number(u + 1)
496
- }, null, 8, ye)) : _("", !0),
497
- r("span", we, T(c.name), 1)
494
+ src: a.buttonImage,
495
+ alt: "image marker " + Number(f + 1)
496
+ }, null, 8, Se)) : d("", !0),
497
+ r("span", xe, A(a.name), 1)
498
498
  ]),
499
499
  _: 2
500
500
  }, 1032, ["type", "onClick", "id", "class", "style", "icon"]),
501
- i.showFeedback(u) ? (o(), y(d, {
501
+ n.showFeedback(f) ? (o(), w(m, {
502
502
  key: 0,
503
- content: c
504
- }, null, 8, ["content"])) : _("", !0)
503
+ content: a
504
+ }, null, 8, ["content"])) : d("", !0)
505
505
  ], 64))), 256))
506
506
  ])
507
507
  ]);
508
508
  }
509
- const ve = /* @__PURE__ */ f(fe, [["render", xe], ["__scopeId", "data-v-3897bfb2"]]);
510
- const Te = {
509
+ const Te = /* @__PURE__ */ S(we, [["render", Fe], ["__scopeId", "data-v-3897bfb2"]]);
510
+ const He = {
511
511
  props: ["content"],
512
512
  data() {
513
513
  return {
@@ -529,34 +529,34 @@ const Te = {
529
529
  this.imageReplaced = !0, this.imageSrc = this.content.hotspots[e].imageOverlay, this.imageAlt = this.content.hotspots[e].imageOverlayAlt, this.$store.commit("setStepHold", !1), this.$store.dispatch("lastPageFocus", {});
530
530
  }
531
531
  }
532
- }, Ce = ["innerHTML"], He = ["src", "alt"], Le = { class: "hotspotArea" };
533
- function Se(e, n, t, l, s, i) {
534
- const h = g("el-col"), d = g("el-button"), c = g("el-row");
535
- return o(), y(c, { class: "imageReplacer" }, {
536
- default: m(() => [
537
- p(h, { span: 12 }, {
538
- default: m(() => [
532
+ }, Me = ["innerHTML"], $e = ["src", "alt"], Ie = { class: "hotspotArea" };
533
+ function ze(e, t, s, l, i, n) {
534
+ const b = u("el-col"), m = u("el-button"), a = u("el-row");
535
+ return o(), w(a, { class: "imageReplacer" }, {
536
+ default: p(() => [
537
+ C(b, { span: 12 }, {
538
+ default: p(() => [
539
539
  r("p", {
540
540
  class: "imageReplacerDescription",
541
- innerHTML: t.content.description
542
- }, null, 8, Ce)
541
+ innerHTML: s.content.description
542
+ }, null, 8, Me)
543
543
  ]),
544
544
  _: 1
545
545
  }),
546
- p(h, { span: 12 }, {
547
- default: m(() => [
546
+ C(b, { span: 12 }, {
547
+ default: p(() => [
548
548
  r("img", {
549
549
  class: "im-ButtonImage",
550
- src: s.imageSrc,
551
- alt: s.imageAlt
552
- }, null, 8, He),
553
- r("div", Le, [
554
- (o(!0), a(b, null, L(t.content.hotspots, (u, x) => (o(), y(d, {
555
- type: u.buttonType,
556
- onClick: w((Ie) => i.changeImage(x), ["stop"]),
550
+ src: i.imageSrc,
551
+ alt: i.imageAlt
552
+ }, null, 8, $e),
553
+ r("div", Ie, [
554
+ (o(!0), c(y, null, T(s.content.hotspots, (f, _) => (o(), w(m, {
555
+ type: f.buttonType,
556
+ onClick: x((g) => n.changeImage(_), ["stop"]),
557
557
  class: "hotspot",
558
- style: v({ top: i.pixelFormat(u.cordinatesX), left: i.pixelFormat(u.cordinatesY), width: i.pixelFormat(u.dimensionsW), height: i.pixelFormat(u.dimensionsH) }),
559
- icon: u.buttonIcon
558
+ style: H({ top: n.pixelFormat(f.cordinatesX), left: n.pixelFormat(f.cordinatesY), width: n.pixelFormat(f.dimensionsW), height: n.pixelFormat(f.dimensionsH) }),
559
+ icon: f.buttonIcon
560
560
  }, null, 8, ["type", "onClick", "style", "icon"]))), 256))
561
561
  ])
562
562
  ]),
@@ -566,11 +566,657 @@ function Se(e, n, t, l, s, i) {
566
566
  _: 1
567
567
  });
568
568
  }
569
- const Fe = /* @__PURE__ */ f(Te, [["render", Se], ["__scopeId", "data-v-02e047cd"]]), Pe = {
570
- install: (e, n) => {
571
- e.component("special-uploader", B), e.component("lab-header", U), e.component("lab-footer", H), e.component("lab-drawer", H), e.component("lab-image", J), e.component("lab-kaltura", re), e.component("lab-image-marker", ve), e.component("lab-image-replacer", Fe), e.component("lab-feedback", S);
569
+ const je = /* @__PURE__ */ S(He, [["render", ze], ["__scopeId", "data-v-02e047cd"]]);
570
+ const Be = {
571
+ components: {},
572
+ props: ["content"],
573
+ data() {
574
+ return {
575
+ quizArray: [],
576
+ quizOptions: [],
577
+ quizItemCompleted: [],
578
+ input: [],
579
+ feedbackIndex: -1,
580
+ totalAttempts: 99,
581
+ // option for testing
582
+ correctChoices: [],
583
+ feedbackObject: {},
584
+ value1: ""
585
+ };
586
+ },
587
+ watch: {},
588
+ computed: {
589
+ quizArrayCount() {
590
+ return this.quizArray.length - 1;
591
+ },
592
+ getAttempt() {
593
+ return this.$store.getters.getAttempts;
594
+ },
595
+ getShowFeedbackAttempts() {
596
+ return this.$store.getters.getShowFeedbackAttempts;
597
+ }
598
+ },
599
+ methods: {
600
+ quizArrayCompleted(e) {
601
+ return !(this.quizItemCompleted.includes(e) || e === 0);
602
+ },
603
+ prepareQuiz() {
604
+ this.quizArray = this.content.quiz.split("*_").filter((e) => e), this.content.options.forEach((e, t) => {
605
+ e.options ? e.random ? this.quizOptions.push(this.shuffle(e.options)) : this.quizOptions.push(e.options) : this.quizOptions.push(!1);
606
+ });
607
+ },
608
+ quizType(e) {
609
+ return this.content.options[e] && this.content.options[e].type ? this.content.options[e].type : !1;
610
+ },
611
+ quizDisplay(e) {
612
+ return this.content.options[e] && this.content.options[e].display ? this.content.options[e].display : "Select";
613
+ },
614
+ quizClass(e) {
615
+ return this.content.options[e] && this.content.options[e].class ? this.content.options[e].class : "";
616
+ },
617
+ shuffle(e) {
618
+ let t = e.length, s;
619
+ for (; t != 0; )
620
+ s = Math.floor(Math.random() * t), t--, [e[t], e[s]] = [
621
+ e[s],
622
+ e[t]
623
+ ];
624
+ return e;
625
+ },
626
+ choicesCheck() {
627
+ if (this.getAttempt < this.content.attempts) {
628
+ let e = !0, t = !1;
629
+ this.input.length === 0 ? this.content.options[0].stopFlow && (t = !0, this.feedbackObject.feedbackHeader = this.content.options[0].notSelectedHeader, this.feedbackObject.feedback = this.content.options[0].notSelectedBody) : this.content.options.forEach((s, l) => {
630
+ this.input[l] ? this.input[l] !== this.content.options[l].answer && (e = !1) : this.content.options[this.input.length].stopFlow && (t = !0, this.feedbackObject.feedbackHeader = this.content.options[this.input.length].notSelectedHeader, this.feedbackObject.feedback = this.content.options[this.input.length].notSelectedBody);
631
+ }), this.$store.commit("setAttempts", this.getAttempt + 1), e === !0 && this.input.length === this.quizArray.length ? (this.choicesComplete(), this.feedbackObject.feedbackHeader = this.content.correctHeader, this.feedbackObject.feedback = this.content.correctFeedback) : (t || (this.feedbackObject.feedbackHeader = this.content.incorrectHeader, this.feedbackObject.feedback = this.content.incorrectFeedback), this.$store.commit("setAttempts", this.getAttempt + 1));
632
+ } else
633
+ this.feedbackObject.feedbackAttempts = this.content.feedbackAttempts, this.$store.commit("setShowFeedbackAttempts", !0), this.choicesComplete();
634
+ this.$store.commit("setShowFeedback", !0), setTimeout(() => {
635
+ document.getElementById("feedbackClose") && document.getElementById("feedbackClose").focus();
636
+ });
637
+ },
638
+ choicesComplete() {
639
+ this.quizArray.forEach((e, t) => {
640
+ this.input[t] ? this.input[t] = this.content.options[t].answer : this.input.push(this.content.options[t].answer), this.quizItemCompleted.push(t + 1);
641
+ }), this.$store.commit("setStepDone", !0), this.$store.commit("setStepHold", !1);
642
+ },
643
+ choicesMade(e) {
644
+ this.quizItemCompleted.includes(e + 1) === !1 && this.quizItemCompleted.push(e + 1);
645
+ },
646
+ showFeedback() {
647
+ return !!this.$store.getters.getShowFeedback;
648
+ }
649
+ },
650
+ mounted() {
651
+ if (this.prepareQuiz(), this.$store.getters.getDirections.display === !1) {
652
+ let e = document.getElementsByClassName("selectableButton");
653
+ setTimeout(() => {
654
+ e[0].focus();
655
+ });
656
+ }
657
+ },
658
+ beforeMount() {
659
+ this.$store.commit("setStepDone", !1), this.$store.commit("setAttempts", 0), this.feedbackIndex = -1, this.content.attempts && (this.totalAttempts = this.content.attempts);
660
+ }
661
+ };
662
+ function Oe(e, t, s, l, i, n) {
663
+ const b = u("el-option"), m = u("el-select"), a = u("el-date-picker"), f = u("el-button"), _ = u("lab-feedback");
664
+ return o(), c("div", {
665
+ class: v(["drop-down", s.content.class])
666
+ }, [
667
+ r("p", null, [
668
+ (o(!0), c(y, null, T(i.quizArray, (g, h) => (o(), c(y, null, [
669
+ r("span", {
670
+ class: v(n.quizClass(h))
671
+ }, [
672
+ r("span", {
673
+ class: v("quizText quizSection_" + h)
674
+ }, A(g) + " ", 3),
675
+ n.quizType(h) === "choose" ? (o(), w(m, {
676
+ key: 0,
677
+ onChange: (k) => n.choicesMade(h),
678
+ modelValue: i.input[h],
679
+ "onUpdate:modelValue": (k) => i.input[h] = k,
680
+ placeholder: n.quizDisplay(h)
681
+ }, {
682
+ default: p(() => [
683
+ n.quizArrayCompleted(h) ? d("", !0) : (o(!0), c(y, { key: 0 }, T(i.quizOptions[h], (k) => (o(), w(b, {
684
+ key: k,
685
+ label: k,
686
+ value: k
687
+ }, null, 8, ["label", "value"]))), 128))
688
+ ]),
689
+ _: 2
690
+ }, 1032, ["onChange", "modelValue", "onUpdate:modelValue", "placeholder"])) : d("", !0),
691
+ n.quizType(h) === "date" ? (o(), w(a, {
692
+ key: 1,
693
+ onChange: (k) => n.choicesMade(h),
694
+ modelValue: i.input[h],
695
+ "onUpdate:modelValue": (k) => i.input[h] = k,
696
+ type: "date",
697
+ placeholder: n.quizDisplay(h),
698
+ format: s.content.options[h].format,
699
+ "value-format": s.content.options[h].format,
700
+ disabled: n.quizArrayCompleted(h)
701
+ }, null, 8, ["onChange", "modelValue", "onUpdate:modelValue", "placeholder", "format", "value-format", "disabled"])) : d("", !0)
702
+ ], 2),
703
+ F("  ")
704
+ ], 64))), 256))
705
+ ]),
706
+ C(f, {
707
+ size: "small",
708
+ type: "primary",
709
+ class: "drop-down-submit",
710
+ onClick: t[0] || (t[0] = (g) => n.choicesCheck())
711
+ }, {
712
+ default: p(() => [
713
+ F("Submit")
714
+ ]),
715
+ _: 1
716
+ }),
717
+ n.showFeedback() ? (o(), w(_, {
718
+ key: 0,
719
+ content: i.feedbackObject
720
+ }, null, 8, ["content"])) : d("", !0)
721
+ ], 2);
722
+ }
723
+ const Le = /* @__PURE__ */ S(Be, [["render", Oe]]);
724
+ const qe = {
725
+ components: {},
726
+ props: ["content"],
727
+ data() {
728
+ return {
729
+ quizArray: [],
730
+ input: [],
731
+ feedbackIndex: -1,
732
+ totalAttempts: 99,
733
+ // option for testing
734
+ correctChoices: [],
735
+ feedbackObject: {}
736
+ };
737
+ },
738
+ watch: {},
739
+ computed: {
740
+ quizArrayCount() {
741
+ return this.quizArray.length - 1;
742
+ },
743
+ getAttempt() {
744
+ return this.$store.getters.getAttempts;
745
+ },
746
+ getShowFeedbackAttempts() {
747
+ return this.$store.getters.getShowFeedbackAttempts;
748
+ }
749
+ },
750
+ methods: {
751
+ prepareQuiz() {
752
+ this.quizArray = this.content.quiz.split("*_");
753
+ },
754
+ choicesCheck() {
755
+ this.getAttempt < this.content.attempts ? (this.input.forEach((e, t) => {
756
+ if (this.content.answers[t] === e)
757
+ this.correctChoices.includes(t) === !1 && this.correctChoices.push(t);
758
+ else if (this.correctChoices.includes(t) === !0) {
759
+ let s = this.correctChoices.indexOf(t);
760
+ this.correctChoices.splice(s, 1);
761
+ }
762
+ }), this.input.length === 0 ? (this.feedbackObject.feedbackHeader = "You did not enter an answer", this.feedbackObject.feedback = "Please enter your choice in the input field") : this.correctChoices.length === this.content.answers.length ? (this.choicesComplete(), this.feedbackObject.feedbackHeader = this.content.correctHeader, this.feedbackObject.feedback = this.content.correctFeedback) : (this.$store.commit("setAttempts", this.getAttempt + 1), this.feedbackObject.feedbackHeader = this.content.incorrectHeader, this.feedbackObject.feedback = this.content.incorrectFeedback)) : (this.feedbackObject.feedbackAttempts = this.content.feedbackAttempts, this.$store.commit("setShowFeedbackAttempts", !0), this.choicesComplete()), this.$store.commit("setShowFeedback", !0), setTimeout(() => {
763
+ document.getElementById("feedbackClose") && document.getElementById("feedbackClose").focus();
764
+ });
765
+ },
766
+ choicesComplete() {
767
+ this.input.forEach((e, t) => {
768
+ this.input[t] = this.content.answers[t];
769
+ }), this.$store.commit("setStepDone", !0), this.$store.commit("setStepHold", !1);
770
+ },
771
+ showFeedback() {
772
+ return !!this.$store.getters.getShowFeedback;
773
+ }
774
+ },
775
+ mounted() {
776
+ if (this.prepareQuiz(), this.$store.getters.getDirections.display === !1) {
777
+ let e = document.getElementsByClassName("selectableButton");
778
+ setTimeout(() => {
779
+ e[0].focus();
780
+ });
781
+ }
782
+ },
783
+ beforeMount() {
784
+ this.$store.commit("setStepDone", !1), this.$store.commit("setAttempts", 0), this.feedbackIndex = -1, this.content.attempts && (this.totalAttempts = this.content.attempts);
785
+ }
786
+ };
787
+ function Ve(e, t, s, l, i, n) {
788
+ const b = u("el-input"), m = u("el-button"), a = u("lab-feedback");
789
+ return o(), c("div", {
790
+ class: v(["fill-blank", s.content.class])
791
+ }, [
792
+ r("p", null, [
793
+ (o(!0), c(y, null, T(i.quizArray, (f, _) => (o(), c(y, null, [
794
+ F(A(f), 1),
795
+ _ < n.quizArrayCount ? (o(), w(b, {
796
+ key: 0,
797
+ modelValue: i.input[_],
798
+ "onUpdate:modelValue": (g) => i.input[_] = g,
799
+ placeholder: "Please input",
800
+ size: "small"
801
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])) : d("", !0)
802
+ ], 64))), 256))
803
+ ]),
804
+ C(m, {
805
+ size: "small",
806
+ type: "primary",
807
+ class: "fill-blank-submit",
808
+ onClick: t[0] || (t[0] = (f) => n.choicesCheck())
809
+ }, {
810
+ default: p(() => [
811
+ F("Submit")
812
+ ]),
813
+ _: 1
814
+ }),
815
+ n.showFeedback() ? (o(), w(a, {
816
+ key: 0,
817
+ content: i.feedbackObject
818
+ }, null, 8, ["content"])) : d("", !0)
819
+ ], 2);
820
+ }
821
+ const Ee = /* @__PURE__ */ S(qe, [["render", Ve]]);
822
+ const Pe = {
823
+ components: {},
824
+ props: ["content"],
825
+ data() {
826
+ return {
827
+ feedbackIndex: -1,
828
+ totalAttempts: 99
829
+ // option for testing
830
+ };
831
+ },
832
+ computed: {
833
+ getLastPage() {
834
+ return !!this.$store.getters.getLastPage;
835
+ },
836
+ getAttempt() {
837
+ return this.$store.getters.getAttempts;
838
+ },
839
+ getShowFeedbackAttempts() {
840
+ return this.$store.getters.getShowFeedbackAttempts;
841
+ }
842
+ },
843
+ methods: {
844
+ leftColWidth() {
845
+ return this.content.leftColWidth ? Number(this.content.leftColWidth) : 12;
846
+ },
847
+ rightColWidth() {
848
+ return this.content.leftColWidth ? this.content.leftColWidth < 24 ? 24 - this.content.leftColWidth : 24 : 12;
849
+ },
850
+ pixelFormat(e) {
851
+ return typeof e == "number" ? e + "px" : e;
852
+ },
853
+ choicesComplete() {
854
+ let e = document.querySelectorAll(".selectableButton");
855
+ for (let t = 0; t < e.length; t++)
856
+ e[t].classList.add("is-failure"), e[t].setAttribute("disabled", !0), this.content.choices[t].correct && e[t].classList.add("is-success");
857
+ this.$store.commit("setStepDone", !0), this.$store.commit("setStepHold", !1);
858
+ },
859
+ choicesCheck(e) {
860
+ this.getAttempt < Number(this.content.attempts) ? this.content.choices[e].correct === !0 ? (console.log(" it was true"), this.choicesComplete()) : this.$store.commit("setAttempts", this.getAttempt + 1) : (this.content.choices[e].correct !== !0 && this.$store.commit("setShowFeedbackAttempts", !0), this.choicesComplete()), this.feedbackIndex = e, this.$store.commit("setShowFeedback", !0), setTimeout(() => {
861
+ document.getElementById("feedbackClose") && document.getElementById("feedbackClose").focus();
862
+ });
863
+ },
864
+ shuffledChoices() {
865
+ let e = this.content.choices;
866
+ for (let t = e.length - 1; t > 0; t--) {
867
+ const s = Math.floor(Math.random() * (t + 1));
868
+ [e[t], e[s]] = [e[s], e[t]];
869
+ }
870
+ this.content.choices = e;
871
+ },
872
+ showFeedback(e) {
873
+ return this.$store.getters.getShowFeedback && this.feedbackIndex === e ? (this.content.choices[e].correct && this.choicesComplete(), !0) : !1;
874
+ }
875
+ },
876
+ mounted() {
877
+ if (this.$store.getters.getDirections.display === !1) {
878
+ let e = document.getElementsByClassName("selectableButton");
879
+ setTimeout(() => {
880
+ e[0].focus();
881
+ });
882
+ }
883
+ },
884
+ beforeMount() {
885
+ this.$store.commit("setStepDone", !1), this.$store.commit("setAttempts", 0), this.feedbackIndex = -1, this.shuffledChoices(), this.content.attempts && (this.totalAttempts = this.content.attempts);
886
+ }
887
+ }, De = ["innerHTML"], We = { class: "buttonSpan" }, Ue = ["src", "alt"], Ne = { class: "selectable-buttonText" };
888
+ function Ke(e, t, s, l, i, n) {
889
+ const b = u("lab-image"), m = u("el-col"), a = u("el-divider"), f = u("el-button"), _ = u("lab-feedback"), g = u("el-row");
890
+ return o(), w(g, {
891
+ id: s.content.id,
892
+ class: v(["selectable", s.content.classes])
893
+ }, {
894
+ default: p(() => [
895
+ C(m, {
896
+ span: n.leftColWidth(e.index)
897
+ }, {
898
+ default: p(() => [
899
+ s.content.directions ? (o(), c("p", {
900
+ key: 0,
901
+ innerHTML: s.content.directions
902
+ }, null, 8, De)) : d("", !0),
903
+ s.content.image ? (o(), w(b, {
904
+ key: 1,
905
+ content: s.content.image
906
+ }, null, 8, ["content"])) : d("", !0)
907
+ ]),
908
+ _: 1
909
+ }, 8, ["span"]),
910
+ C(m, {
911
+ span: n.rightColWidth(e.index),
912
+ class: "selectArea"
913
+ }, {
914
+ default: p(() => [
915
+ (o(!0), c(y, null, T(s.content.choices, (h, k) => (o(), c(y, null, [
916
+ !s.content.noDivider && k > 0 ? (o(), w(a, { key: 0 })) : d("", !0),
917
+ C(f, {
918
+ size: "small",
919
+ type: "primary",
920
+ class: "selectableButton",
921
+ style: H({ width: n.pixelFormat(s.content.choiceWidth), height: n.pixelFormat(s.content.choiceHeight) }),
922
+ onClick: (M) => n.choicesCheck(k)
923
+ }, {
924
+ default: p(() => [
925
+ r("div", We, [
926
+ h.image ? (o(), c("img", {
927
+ key: 0,
928
+ class: "im-ButtonImage",
929
+ src: h.image,
930
+ alt: h.alt ? h.alt : "button image"
931
+ }, null, 8, Ue)) : d("", !0),
932
+ r("span", Ne, A(h.text), 1)
933
+ ])
934
+ ]),
935
+ _: 2
936
+ }, 1032, ["style", "onClick"]),
937
+ n.showFeedback(k) ? (o(), w(_, {
938
+ key: 1,
939
+ content: h
940
+ }, null, 8, ["content"])) : d("", !0)
941
+ ], 64))), 256))
942
+ ]),
943
+ _: 1
944
+ }, 8, ["span"])
945
+ ]),
946
+ _: 1
947
+ }, 8, ["id", "class"]);
948
+ }
949
+ const Re = /* @__PURE__ */ S(Pe, [["render", Ke], ["__scopeId", "data-v-bc83f1c6"]]);
950
+ const Qe = {
951
+ components: {},
952
+ props: ["content"],
953
+ data() {
954
+ return {
955
+ input: "",
956
+ feedbackIndex: -1,
957
+ totalAttempts: 99,
958
+ // option for testing
959
+ correctChoices: [],
960
+ feedbackObject: {}
961
+ };
962
+ },
963
+ watch: {},
964
+ computed: {
965
+ getAttempt() {
966
+ return this.$store.getters.getAttempts;
967
+ },
968
+ getShowFeedbackAttempts() {
969
+ return this.$store.getters.getShowFeedbackAttempts;
970
+ }
971
+ },
972
+ methods: {
973
+ choicesCheck() {
974
+ if (this.getAttempt < this.content.attempts) {
975
+ let e = !1;
976
+ this.content.answers.forEach((t, s) => {
977
+ let l = t.toLowerCase();
978
+ this.input.toLowerCase().includes(l) || (e = !0);
979
+ }), e ? (this.$store.commit("setAttempts", this.getAttempt + 1), this.feedbackObject.feedbackHeader = this.content.incorrectHeader, this.feedbackObject.feedback = this.content.incorrectFeedback) : (this.choicesComplete(), this.feedbackObject.feedbackHeader = this.content.correctHeader, this.feedbackObject.feedback = this.content.correctFeedback);
980
+ } else
981
+ this.feedbackObject.feedbackAttempts = this.content.feedbackAttempts, this.$store.commit("setShowFeedbackAttempts", !0), this.choicesComplete();
982
+ this.$store.commit("setShowFeedback", !0), setTimeout(() => {
983
+ document.getElementById("feedbackClose") && document.getElementById("feedbackClose").focus();
984
+ });
985
+ },
986
+ choicesComplete() {
987
+ this.$store.commit("setStepDone", !0), this.$store.commit("setStepHold", !1);
988
+ },
989
+ showFeedback() {
990
+ return !!this.$store.getters.getShowFeedback;
991
+ }
992
+ },
993
+ mounted() {
994
+ if (this.$store.getters.getDirections.display === !1) {
995
+ let e = document.getElementsByClassName("selectableButton");
996
+ setTimeout(() => {
997
+ e[0].focus();
998
+ });
999
+ }
1000
+ },
1001
+ beforeMount() {
1002
+ this.$store.commit("setStepDone", !1), this.$store.commit("setAttempts", 0), this.feedbackIndex = -1, this.content.attempts && (this.totalAttempts = this.content.attempts);
1003
+ }
1004
+ };
1005
+ function Ye(e, t, s, l, i, n) {
1006
+ const b = u("el-input"), m = u("el-button"), a = u("lab-feedback");
1007
+ return o(), c("div", {
1008
+ class: v(["textbox", s.content.class])
1009
+ }, [
1010
+ r("p", null, A(s.content.quiz), 1),
1011
+ C(b, {
1012
+ modelValue: i.input,
1013
+ "onUpdate:modelValue": t[0] || (t[0] = (f) => i.input = f),
1014
+ autosize: { minRows: 4, maxRows: 8 },
1015
+ type: "textarea",
1016
+ placeholder: "Please input"
1017
+ }, null, 8, ["modelValue"]),
1018
+ C(m, {
1019
+ size: "small",
1020
+ type: "primary",
1021
+ class: "fill-blank-submit",
1022
+ onClick: t[1] || (t[1] = (f) => n.choicesCheck())
1023
+ }, {
1024
+ default: p(() => [
1025
+ F("Submit")
1026
+ ]),
1027
+ _: 1
1028
+ }),
1029
+ n.showFeedback() ? (o(), w(a, {
1030
+ key: 0,
1031
+ content: i.feedbackObject
1032
+ }, null, 8, ["content"])) : d("", !0)
1033
+ ], 2);
1034
+ }
1035
+ const Xe = /* @__PURE__ */ S(Qe, [["render", Ye]]);
1036
+ const Ge = {
1037
+ components: {},
1038
+ props: ["content"],
1039
+ data() {
1040
+ return {
1041
+ quizArray: [],
1042
+ quizOptions: [],
1043
+ input: [],
1044
+ feedbackIndex: -1,
1045
+ totalAttempts: 99,
1046
+ // option for testing
1047
+ correctChoices: [],
1048
+ feedbackObject: {},
1049
+ value1: "",
1050
+ showMenuOverlay: !1
1051
+ };
1052
+ },
1053
+ watch: {},
1054
+ computed: {
1055
+ getAttempt() {
1056
+ return this.$store.getters.getAttempts;
1057
+ },
1058
+ getShowFeedbackAttempts() {
1059
+ return this.$store.getters.getShowFeedbackAttempts;
1060
+ }
1061
+ },
1062
+ methods: {
1063
+ showSub(e) {
1064
+ let t = document.getElementById(e);
1065
+ t.classList.contains("jl-menu-sub_show") ? (this.showMenuOverlay = !1, this.hideSubs()) : (this.showMenuOverlay = !0, t.classList.add("jl-menu-sub_show"));
1066
+ },
1067
+ showSubSub(e) {
1068
+ let t = document.getElementById(e);
1069
+ t.classList.contains("jl-menu-sub-sub_show") ? (this.showMenuOverlay = !1, this.hideSubs()) : (this.showMenuOverlay = !0, t.classList.add("jl-menu-sub-sub_show"));
1070
+ },
1071
+ hideSubs() {
1072
+ this.showMenuOverlay = !1;
1073
+ let e = document.getElementsByClassName("jl-menu-sub_show");
1074
+ for (; e.length > 0; )
1075
+ e[0].classList.remove("jl-menu-sub_show");
1076
+ let t = document.getElementsByClassName("jl-menu-sub-sub_show");
1077
+ for (; t.length > 0; )
1078
+ t[0].classList.remove("jl-menu-sub-sub_show");
1079
+ },
1080
+ choicesCheck(e) {
1081
+ this.hideSubs();
1082
+ let t = !1, s = "";
1083
+ if (this.getAttempt < this.content.attempts) {
1084
+ if (typeof e == "string") {
1085
+ let l = e.split("-");
1086
+ l.forEach((i, n) => {
1087
+ l[n] = Number(i);
1088
+ }), l.length === 2 ? this.content.menu[l[0]].subMenu[l[1]].correct && (this.content.menu[l[0]].subMenu[l[1]].page && (s = this.content.menu[l[0]].subMenu[l[1]].page), t = !0) : l.length === 3 && this.content.menu[l[0]].subMenu[l[1]].subMenu[l[2]].correct && (this.content.menu[l[0]].subMenu[l[1]].subMenu[l[2]].page && (s = this.content.menu[l[0]].subMenu[l[1]].subMenu[l[2]].page), t = !0);
1089
+ } else
1090
+ this.content.menu[e].correct && (this.content.menu[e].page && (s = this.content.menu[e].page), t = !0);
1091
+ t ? (this.choicesComplete(s), this.feedbackObject.feedbackHeader = this.content.correctHeader, this.feedbackObject.feedback = this.content.correctFeedback) : (this.$store.commit("setAttempts", this.getAttempt + 1), this.feedbackObject.feedbackHeader = this.content.incorrectHeader, this.feedbackObject.feedback = this.content.incorrectFeedback);
1092
+ } else
1093
+ this.$store.commit("setShowFeedbackAttempts", !0), this.choicesComplete();
1094
+ s === "" && this.$store.commit("setShowFeedback", !0), setTimeout(() => {
1095
+ document.getElementById("feedbackClose") && document.getElementById("feedbackClose").focus();
1096
+ });
1097
+ },
1098
+ choicesComplete(e) {
1099
+ this.$store.commit("setStepDone", !0), this.$store.commit("setStepHold", !1), e !== "" && this.$store.commit("setCurrentPage", e);
1100
+ },
1101
+ showFeedback() {
1102
+ return !!this.$store.getters.getShowFeedback;
1103
+ }
1104
+ },
1105
+ mounted() {
1106
+ this.$store.getters.getDirections.display === !1 && (document.getElementsByClassName("selectableButton"), setTimeout(() => {
1107
+ }));
1108
+ },
1109
+ beforeMount() {
1110
+ this.$store.commit("setStepDone", !1), this.$store.commit("setAttempts", 0), this.feedbackIndex = -1, this.content.attempts && (this.totalAttempts = this.content.attempts);
1111
+ }
1112
+ }, Je = { key: 0 }, Ze = ["index", "onClick"], et = { class: "jl-menu-sub__title" }, tt = ["id"], st = ["index", "onClick"], nt = { class: "jl-menu-sub-sub__title" }, ot = ["id"], it = ["index", "onClick"], ct = ["onClick"], lt = {
1113
+ key: 1,
1114
+ class: "jl-menu-item"
1115
+ }, rt = ["index", "onClick"];
1116
+ function at(e, t, s, l, i, n) {
1117
+ const b = u("CaretBottom"), m = u("el-icon"), a = u("CaretRight"), f = u("lab-feedback");
1118
+ return o(), c("div", {
1119
+ class: v(["menu-chooser", s.content.class])
1120
+ }, [
1121
+ i.showMenuOverlay ? (o(), c("div", {
1122
+ key: 0,
1123
+ class: "nav-mask",
1124
+ onClick: t[0] || (t[0] = (..._) => n.hideSubs && n.hideSubs(..._))
1125
+ })) : d("", !0),
1126
+ r("p", null, A(s.content.quiz), 1),
1127
+ r("div", {
1128
+ class: "jl-menu",
1129
+ onSelect: t[1] || (t[1] = (..._) => n.choicesCheck && n.choicesCheck(..._))
1130
+ }, [
1131
+ (o(!0), c(y, null, T(s.content.menu, (_, g) => (o(), c(y, null, [
1132
+ _.subMenu ? (o(), c("div", Je, [
1133
+ r("button", {
1134
+ class: v("jl-menu-sub sub-" + g),
1135
+ index: g,
1136
+ tabindex: "0",
1137
+ role: "menuitem",
1138
+ onClick: x((h) => n.showSub("sub-" + g), ["stop"])
1139
+ }, [
1140
+ r("div", et, [
1141
+ F(A(_.name) + " ", 1),
1142
+ C(m, null, {
1143
+ default: p(() => [
1144
+ C(b)
1145
+ ]),
1146
+ _: 1
1147
+ })
1148
+ ])
1149
+ ], 10, Ze),
1150
+ r("div", {
1151
+ class: "jl-menu-sub-menu",
1152
+ id: "sub-" + g
1153
+ }, [
1154
+ (o(!0), c(y, null, T(_.subMenu, (h, k) => (o(), c(y, null, [
1155
+ h.subMenu ? (o(), c(y, { key: 0 }, [
1156
+ r("button", {
1157
+ class: v("jl-menu-sub-sub sub-sub-" + k),
1158
+ index: g + "-" + k,
1159
+ tabindex: "0",
1160
+ role: "menuitem",
1161
+ onClick: x((M) => n.showSubSub("sub-sub-" + g), ["stop"])
1162
+ }, [
1163
+ r("div", nt, [
1164
+ F(A(h.name), 1),
1165
+ C(m, null, {
1166
+ default: p(() => [
1167
+ C(a)
1168
+ ]),
1169
+ _: 1
1170
+ })
1171
+ ])
1172
+ ], 10, st),
1173
+ r("div", {
1174
+ class: "jl-menu-sub-sub-menu",
1175
+ id: "sub-sub-" + g
1176
+ }, [
1177
+ (o(!0), c(y, null, T(h.subMenu, (M, $) => (o(), c("button", {
1178
+ class: "jl-menu-sub-sub-item",
1179
+ index: g + "-" + k + "-" + $,
1180
+ tabindex: "0",
1181
+ role: "menuitem",
1182
+ onClick: x((ht) => n.choicesCheck(g + "-" + k + "-" + $), ["stop"])
1183
+ }, [
1184
+ r("div", null, A(M.name), 1)
1185
+ ], 8, it))), 256))
1186
+ ], 8, ot)
1187
+ ], 64)) : (o(), c("button", {
1188
+ key: 1,
1189
+ class: "jl-menu-sub-item",
1190
+ tabindex: "0",
1191
+ role: "menuitem",
1192
+ onClick: x((M) => n.choicesCheck(g + "-" + k), ["stop"])
1193
+ }, [
1194
+ r("div", null, A(h.name), 1)
1195
+ ], 8, ct))
1196
+ ], 64))), 256))
1197
+ ], 8, tt)
1198
+ ])) : (o(), c("div", lt, [
1199
+ r("button", {
1200
+ class: "jl-menu-item",
1201
+ index: g,
1202
+ tabindex: "0",
1203
+ role: "menuitem",
1204
+ onClick: x((h) => n.choicesCheck(g), ["stop"])
1205
+ }, A(_.name), 9, rt)
1206
+ ]))
1207
+ ], 64))), 256))
1208
+ ], 32),
1209
+ n.showFeedback() ? (o(), w(f, {
1210
+ key: 1,
1211
+ content: i.feedbackObject
1212
+ }, null, 8, ["content"])) : d("", !0)
1213
+ ], 2);
1214
+ }
1215
+ const ut = /* @__PURE__ */ S(Ge, [["render", at]]), mt = {
1216
+ install: (e, t) => {
1217
+ e.component("special-uploader", P), e.component("lab-header", U), e.component("lab-footer", I), e.component("lab-drawer", I), e.component("lab-image", te), e.component("lab-kaltura", he), e.component("lab-image-marker", Te), e.component("lab-image-replacer", je), e.component("lab-feedback", z), e.component("lab-drop-down", Le), e.component("lab-fill-blank", Ee), e.component("lab-selectable", Re), e.component("lab-textbox", Xe), e.component("lab-menu_chooser", ut);
572
1218
  }
573
1219
  };
574
1220
  export {
575
- Pe as default
1221
+ mt as default
576
1222
  };