labmaker-plugin 0.0.11 → 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 s, createElementBlock as o, Fragment as k, createElementVNode as r, toDisplayString as p, normalizeClass as _, createCommentVNode as l, resolveComponent as b, normalizeStyle as y, createBlock as w, withModifiers as x, withCtx as f, createTextVNode as T, createVNode as H, renderList as L } from "vue";
2
- const g = (t, n) => {
3
- const e = t.__vccOpts || t;
4
- for (const [d, a] of n)
5
- e[d] = a;
6
- return e;
7
- }, S = {
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 {
@@ -13,32 +13,32 @@ const g = (t, n) => {
13
13
  },
14
14
  computed: {},
15
15
  methods: {
16
- fileUpload(t) {
17
- const e = t.target.files[0];
18
- this.fileProcess(e);
16
+ fileUpload(e) {
17
+ const s = e.target.files[0];
18
+ this.fileProcess(s);
19
19
  },
20
- fileProcess(t) {
21
- this.imgSRC = URL.createObjectURL(t);
20
+ fileProcess(e) {
21
+ this.imgSRC = URL.createObjectURL(e);
22
22
  }
23
23
  },
24
24
  mounted() {
25
25
  }
26
- }, C = /* @__PURE__ */ r("h1", null, "File Uploader", -1), F = { class: "image-uploader" }, M = /* @__PURE__ */ r("h1", null, "File Uploader", -1), I = { class: "your-file" }, V = ["src"];
27
- function A(t, n, e, d, a, i) {
28
- return s(), o(k, null, [
29
- C,
30
- r("div", F, [
31
- M,
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] = (...u) => i.fileUpload && i.fileUpload(...u)),
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", I, [
39
+ r("div", q, [
40
40
  r("img", {
41
- src: a.imgSRC,
41
+ src: i.imgSRC,
42
42
  alt: "",
43
43
  scrset: ""
44
44
  }, null, 8, V)
@@ -46,21 +46,73 @@ function A(t, n, e, d, a, i) {
46
46
  ])
47
47
  ], 64);
48
48
  }
49
- const K = /* @__PURE__ */ g(S, [["render", A]]);
50
- const B = {
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 P(t, n, e, d, a, i) {
58
- return s(), o("header", null, [
59
- r("h1", null, p(e.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__ */ g(B, [["render", P]]);
63
- const W = {
62
+ const U = /* @__PURE__ */ S(D, [["render", W]]);
63
+ const N = {
64
+ data() {
65
+ return {};
66
+ },
67
+ computed: {
68
+ totalPages() {
69
+ return this.$store.getters.getPageCount ? this.$store.getters.getPageCount : 0;
70
+ },
71
+ currentPage() {
72
+ return this.$store.getters.getCurrentPage ? this.$store.getters.getCurrentPage + 1 : 1;
73
+ },
74
+ pagerCount() {
75
+ return this.$store.getters.getPagerCount ? this.$store.getters.getPagerCount : 0;
76
+ }
77
+ },
78
+ methods: {
79
+ handleCurrentChange(e) {
80
+ this.$store.commit("setCurrentPage", e - 1);
81
+ },
82
+ changePage(e) {
83
+ console.log("headed to: ", e), this.$store.commit("setCurrentPage", e);
84
+ }
85
+ }
86
+ };
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
+ span: 6,
94
+ class: "homeButtonContainer"
95
+ }, {
96
+ default: p(() => [
97
+ C(m, {
98
+ type: "primary ",
99
+ onClick: t[0] || (t[0] = x((f) => n.changePage(0), ["stop"])),
100
+ class: "homeButton"
101
+ }, {
102
+ default: p(() => [
103
+ F("Return to Crime Screen")
104
+ ]),
105
+ _: 1
106
+ })
107
+ ]),
108
+ _: 1
109
+ })
110
+ ]),
111
+ _: 1
112
+ });
113
+ }
114
+ const I = /* @__PURE__ */ S(N, [["render", K]]);
115
+ const R = {
64
116
  props: ["content"],
65
117
  data() {
66
118
  return {};
@@ -71,8 +123,8 @@ const W = {
71
123
  }
72
124
  },
73
125
  methods: {
74
- pixelFormat(t) {
75
- return typeof t == "number" ? t + "px" : t;
126
+ pixelFormat(e) {
127
+ return typeof e == "number" ? e + "px" : e;
76
128
  },
77
129
  checkStepper() {
78
130
  this.$store.dispatch("lastPageFocus", {});
@@ -81,35 +133,35 @@ const W = {
81
133
  mounted() {
82
134
  this.checkStepper();
83
135
  }
84
- }, E = { class: "image-container" }, z = { class: "image" }, D = ["src", "alt"], N = ["innerHTML"], R = ["innerHTML"], O = ["innerHTML"];
85
- function $(t, n, e, d, a, i) {
86
- return s(), o("div", E, [
87
- r("div", z, [
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, [
88
140
  r("img", {
89
- src: e.content.src,
90
- alt: e.content.alt,
91
- class: _(e.content.class)
92
- }, null, 10, D),
93
- e.content.captionHeader ? (s(), o("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", {
94
146
  key: 0,
95
147
  class: "captionHeader",
96
- innerHTML: e.content.captionHeader
97
- }, null, 8, N)) : l("", !0),
98
- e.content.caption ? (s(), o("span", {
148
+ innerHTML: s.content.captionHeader
149
+ }, null, 8, G)) : d("", !0),
150
+ s.content.caption ? (o(), c("span", {
99
151
  key: 1,
100
152
  class: "caption",
101
- innerHTML: e.content.caption
102
- }, null, 8, R)) : l("", !0),
103
- e.content.copyright ? (s(), o("span", {
153
+ innerHTML: s.content.caption
154
+ }, null, 8, J)) : d("", !0),
155
+ s.content.copyright ? (o(), c("span", {
104
156
  key: 2,
105
- innerHTML: e.content.copyright,
157
+ innerHTML: s.content.copyright,
106
158
  class: "copyright"
107
- }, null, 8, O)) : l("", !0)
159
+ }, null, 8, Z)) : d("", !0)
108
160
  ])
109
161
  ]);
110
162
  }
111
- const j = /* @__PURE__ */ g(W, [["render", $], ["__scopeId", "data-v-6d545532"]]);
112
- const Y = {
163
+ const te = /* @__PURE__ */ S(R, [["render", ee], ["__scopeId", "data-v-6d545532"]]);
164
+ const se = {
113
165
  props: ["content"],
114
166
  //moduleLessonPage
115
167
  data() {
@@ -133,14 +185,14 @@ const Y = {
133
185
  kHeight() {
134
186
  if (this.content.kalturaType === "video")
135
187
  if (this.content.height && this.content.height != "") {
136
- let t = this.content.height;
137
- return t.slice(-2) === "px" ? t.slice(0, -2) : this.content.height;
188
+ let e = this.content.height;
189
+ return e.slice(-2) === "px" ? e.slice(0, -2) : this.content.height;
138
190
  } else
139
191
  return this.video.height;
140
192
  else if (this.content.kalturaType === "audio")
141
193
  if (this.content.height && this.content.height != "") {
142
- let t = this.content.height;
143
- return t.slice(-2) === "px" ? t.slice(0, -2) : this.content.height;
194
+ let e = this.content.height;
195
+ return e.slice(-2) === "px" ? e.slice(0, -2) : this.content.height;
144
196
  } else
145
197
  return this.audio.height;
146
198
  else if (this.content.kalturaType === "audiobtn")
@@ -149,8 +201,8 @@ const Y = {
149
201
  kWidth() {
150
202
  if (this.content.kalturaType === "video")
151
203
  if (this.content.width && this.content.width != "") {
152
- let t = this.content.width;
153
- return t.slice(-2) === "px" ? t.slice(0, -2) : this.content.width;
204
+ let e = this.content.width;
205
+ return e.slice(-2) === "px" ? e.slice(0, -2) : this.content.width;
154
206
  } else
155
207
  return this.video.width;
156
208
  else {
@@ -162,8 +214,8 @@ const Y = {
162
214
  }
163
215
  },
164
216
  methods: {
165
- getButtonText(t) {
166
- return t === "video" ? this.showingText ? "Show Video" : "Show Text Version" : this.showingText ? "Show Audio" : "Show Text Version";
217
+ getButtonText(e) {
218
+ return e === "video" ? this.showingText ? "Show Video" : "Show Text Version" : this.showingText ? "Show Audio" : "Show Text Version";
167
219
  },
168
220
  textVersionCheck() {
169
221
  this.content.textVersion && this.content.textVersion.length > 1 && (this.hasText = !0);
@@ -171,8 +223,8 @@ const Y = {
171
223
  kalturaLoad() {
172
224
  this.textVersionCheck();
173
225
  },
174
- kalturaMedia(t) {
175
- let n = {
226
+ kalturaMedia(e) {
227
+ let t = {
176
228
  uiconf_id: "35766781",
177
229
  partner_id: "2061901",
178
230
  entry_id: "",
@@ -180,7 +232,7 @@ const Y = {
180
232
  width: "640",
181
233
  type: "video"
182
234
  };
183
- 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;
184
236
  },
185
237
  showKaltura() {
186
238
  this.showingKaltura = !0;
@@ -189,23 +241,23 @@ const Y = {
189
241
  this.showingText = !this.showingText, this.buttonText = !this.buttonText;
190
242
  },
191
243
  tvCleaner() {
192
- let t = document.createElement("div");
193
- t.innerHTML = this.content.textVersion;
194
- for (let n = 0; n < t.children.length; n++) {
195
- let e = t.children[n];
196
- if (e.tagName == "DIV" && e.className == "panel-default" && e.children[0].dataset.toggle)
197
- for (let d = 0; d < e.children.length; d++) {
198
- let a = e.children[d];
199
- if (a.dataset.toggle == "collapse") {
200
- let i = {
201
- heading: a.innerHTML,
202
- body: e.children[d + 1].innerHTML
244
+ let e = document.createElement("div");
245
+ e.innerHTML = this.content.textVersion;
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
203
255
  };
204
- this.textversionArray[n] = i;
256
+ this.textversionArray[t] = n;
205
257
  }
206
258
  }
207
259
  else
208
- this.textversionArray[n] = e.outerHTML;
260
+ this.textversionArray[t] = s.outerHTML;
209
261
  }
210
262
  }
211
263
  },
@@ -214,96 +266,96 @@ const Y = {
214
266
  },
215
267
  mounted() {
216
268
  }
217
- }, G = {
269
+ }, ne = {
218
270
  key: 0,
219
271
  class: "textVersion"
220
- }, J = /* @__PURE__ */ r("h1", null, "Text Version", -1), X = ["innerHTML"], q = ["src", "width", "height"], Q = ["src", "width", "height"], Z = ["src", "width", "height"], ee = {
272
+ }, oe = /* @__PURE__ */ r("h1", null, "Text Version", -1), ie = ["innerHTML"], ce = ["src", "width", "height"], le = ["src", "width", "height"], re = ["src", "width", "height"], ae = {
221
273
  key: 2,
222
274
  class: "alert alert-danger"
223
275
  };
224
- function te(t, n, e, d, a, i) {
225
- const u = b("el-button");
226
- return s(), o("div", {
227
- class: _(["kContainer", e.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])
228
280
  }, [
229
- e.content.textVersion && a.showingText ? (s(), o("div", G, [
230
- J,
281
+ s.content.textVersion && i.showingText ? (o(), c("div", ne, [
282
+ oe,
231
283
  r("div", {
232
- innerHTML: e.content.textVersion
233
- }, null, 8, X)
234
- ])) : l("", !0),
235
- !a.showingText && e.content.kalturaEntryId ? (s(), o("div", {
284
+ innerHTML: s.content.textVersion
285
+ }, null, 8, ie)
286
+ ])) : d("", !0),
287
+ !i.showingText && s.content.kalturaEntryId ? (o(), c("div", {
236
288
  key: 1,
237
289
  class: "mainVersion",
238
- style: y({ width: i.kWidth + "px", height: i.kHeight + "px" })
290
+ style: H({ width: n.kWidth + "px", height: n.kHeight + "px" })
239
291
  }, [
240
- e.content.kalturaType == "video" && !a.showingKaltura ? (s(), o("div", {
292
+ s.content.kalturaType == "video" && !i.showingKaltura ? (o(), c("div", {
241
293
  key: 0,
242
- class: _(["kPoster", { active: a.showingKaltura == !0 }]),
243
- style: y({ 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" })
244
296
  }, [
245
297
  r("iframe", {
246
- onClick: n[0] || (n[0] = (...h) => i.showKaltura && i.showKaltura(...h)),
298
+ onClick: t[0] || (t[0] = (...m) => n.showKaltura && n.showKaltura(...m)),
247
299
  class: "videoIframe",
248
- src: i.kalturaMedia(e.content),
249
- width: i.kWidth + "px",
250
- height: i.kHeight + "px",
300
+ src: n.kalturaMedia(s.content),
301
+ width: n.kWidth + "px",
302
+ height: n.kHeight + "px",
251
303
  allowfullscreen: "",
252
304
  webkitallowfullscreen: "",
253
305
  mozAllowFullScreen: "",
254
306
  frameborder: "0"
255
- }, null, 8, q)
256
- ], 6)) : l("", !0),
257
- e.content.kalturaType == "audio" ? (s(), o("div", {
307
+ }, null, 8, ce)
308
+ ], 6)) : d("", !0),
309
+ s.content.kalturaType == "audio" ? (o(), c("div", {
258
310
  key: 1,
259
- class: _(["kAudio", { active: a.showingKaltura == !0 }]),
260
- onClick: n[1] || (n[1] = (...h) => i.showKaltura && i.showKaltura(...h))
311
+ class: v(["kAudio", { active: i.showingKaltura == !0 }]),
312
+ onClick: t[1] || (t[1] = (...m) => n.showKaltura && n.showKaltura(...m))
261
313
  }, [
262
314
  r("iframe", {
263
315
  id: "my_iframe",
264
- src: i.kalturaMedia(e.content),
265
- width: i.kWidth + "px",
266
- height: i.kHeight + "px",
316
+ src: n.kalturaMedia(s.content),
317
+ width: n.kWidth + "px",
318
+ height: n.kHeight + "px",
267
319
  allowfullscreen: "",
268
320
  webkitallowfullscreen: "",
269
321
  mozAllowFullScreen: "",
270
322
  frameborder: "0"
271
- }, null, 8, Q)
272
- ], 2)) : l("", !0),
273
- e.content.kalturaType == "audiobtn" ? (s(), o("div", {
323
+ }, null, 8, le)
324
+ ], 2)) : d("", !0),
325
+ s.content.kalturaType == "audiobtn" ? (o(), c("div", {
274
326
  key: 2,
275
- class: _(["kAudiobtn", { active: a.showingKaltura == !0 }]),
276
- onClick: n[2] || (n[2] = (...h) => i.showKaltura && i.showKaltura(...h))
327
+ class: v(["kAudiobtn", { active: i.showingKaltura == !0 }]),
328
+ onClick: t[2] || (t[2] = (...m) => n.showKaltura && n.showKaltura(...m))
277
329
  }, [
278
330
  r("iframe", {
279
- src: i.kalturaMedia(e.content),
280
- width: a.audioBtn.width + "px",
281
- height: a.audioBtn.height + "px",
331
+ src: n.kalturaMedia(s.content),
332
+ width: i.audioBtn.width + "px",
333
+ height: i.audioBtn.height + "px",
282
334
  allowfullscreen: "",
283
335
  webkitallowfullscreen: "",
284
336
  mozAllowFullScreen: "",
285
337
  frameborder: "0"
286
- }, null, 8, Z)
287
- ], 2)) : l("", !0)
288
- ], 4)) : l("", !0),
289
- e.content.kalturaEntryId == "" ? (s(), o("div", ee, "There is no Kaltura Entry ID")) : l("", !0),
290
- e.content.textVersion ? (s(), w(u, {
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, {
291
343
  key: 3,
292
344
  size: "medium",
293
345
  type: "primary",
294
346
  "aria-label": "text version",
295
347
  class: "toggleSwitch ftSwitch btn btn-primary vidText",
296
- onClick: n[3] || (n[3] = x((h) => i.showText(e.content.kalturaType), ["stop"]))
348
+ onClick: t[3] || (t[3] = x((m) => n.showText(s.content.kalturaType), ["stop"]))
297
349
  }, {
298
- default: f(() => [
299
- T(p(i.getButtonText(e.content.kalturaType)), 1)
350
+ default: p(() => [
351
+ F(A(n.getButtonText(s.content.kalturaType)), 1)
300
352
  ]),
301
353
  _: 1
302
- })) : l("", !0)
354
+ })) : d("", !0)
303
355
  ], 2);
304
356
  }
305
- const ne = /* @__PURE__ */ g(Y, [["render", te]]);
306
- const ie = {
357
+ const he = /* @__PURE__ */ S(se, [["render", ue]]);
358
+ const de = {
307
359
  props: ["content"],
308
360
  data() {
309
361
  return {
@@ -328,64 +380,64 @@ const ie = {
328
380
  },
329
381
  mounted() {
330
382
  }
331
- }, se = { class: "my-header" }, oe = ["id", "innerHTML"], ae = ["innerHTML"], re = { key: 1 }, ce = ["src"], le = ["innerHTML"], de = { class: "dialog-footer" };
332
- function he(t, n, e, d, a, i) {
333
- const u = b("el-button"), h = b("el-dialog");
334
- return s(), w(h, {
335
- width: i.feedbackWidth,
336
- modelValue: a.show,
337
- "onUpdate:modelValue": n[1] || (n[1] = (c) => a.show = c),
338
- "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
339
391
  }, {
340
- header: f(({ close: c, titleId: m, titleClass: v }) => [
341
- r("div", se, [
392
+ header: p(({ close: a, titleId: f, titleClass: _ }) => [
393
+ r("div", me, [
342
394
  r("h4", {
343
- id: m,
344
- class: _(v),
345
- innerHTML: i.feedbackHeader
346
- }, null, 10, oe)
395
+ id: f,
396
+ class: v(_),
397
+ innerHTML: n.feedbackHeader
398
+ }, null, 10, fe)
347
399
  ])
348
400
  ]),
349
- footer: f(() => [
350
- r("span", de, [
351
- H(u, {
401
+ footer: p(() => [
402
+ r("span", ke, [
403
+ C(b, {
352
404
  size: "small",
353
405
  id: "feedbackClose",
354
406
  type: "primary",
355
- onClick: n[0] || (n[0] = x((c) => i.feedbackClose(), ["stop"]))
407
+ onClick: t[0] || (t[0] = x((a) => n.feedbackClose(), ["stop"]))
356
408
  }, {
357
- default: f(() => [
358
- T("Close")
409
+ default: p(() => [
410
+ F("Close")
359
411
  ]),
360
412
  _: 1
361
413
  })
362
414
  ])
363
415
  ]),
364
- default: f(() => [
365
- i.getShowFeedbackAttempts ? (s(), o(k, { key: 0 }, [
366
- e.content.feedbackAttempts ? (s(), o("p", {
416
+ default: p(() => [
417
+ n.getShowFeedbackAttempts ? (o(), c(y, { key: 0 }, [
418
+ s.content.feedbackAttempts ? (o(), c("p", {
367
419
  key: 0,
368
- innerHTML: e.content.feedbackAttempts
369
- }, null, 8, ae)) : (s(), o("p", re, "You have tried too many times, the correct answer has been provided for you."))
370
- ], 64)) : (s(), o(k, { key: 1 }, [
371
- e.content.feedbackImage ? (s(), o("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", {
372
424
  key: 0,
373
425
  class: "im-ButtonImage",
374
- src: e.content.feedbackImage,
426
+ src: s.content.feedbackImage,
375
427
  alt: "button image"
376
- }, null, 8, ce)) : l("", !0),
428
+ }, null, 8, _e)) : d("", !0),
377
429
  r("p", {
378
- innerHTML: e.content.feedback
379
- }, null, 8, le)
430
+ innerHTML: s.content.feedback
431
+ }, null, 8, ge)
380
432
  ], 64))
381
433
  ]),
382
434
  _: 1
383
435
  }, 8, ["width", "modelValue", "before-close"]);
384
436
  }
385
- const ue = /* @__PURE__ */ g(ie, [["render", he]]);
386
- const _e = {
437
+ const z = /* @__PURE__ */ S(de, [["render", ye]]);
438
+ const we = {
387
439
  components: {
388
- Feedback: ue
440
+ Feedback: z
389
441
  },
390
442
  inject: ["message"],
391
443
  props: ["content"],
@@ -402,63 +454,769 @@ const _e = {
402
454
  }
403
455
  },
404
456
  methods: {
405
- pixelFormat(t) {
406
- return typeof t == "number" ? t + "px" : t;
457
+ pixelFormat(e) {
458
+ return typeof e == "number" ? e + "px" : e;
407
459
  },
408
- changePage(t, n) {
409
- t.pageLink ? this.$store.commit("setCurrentPage", t.pageLink) : t.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(() => {
410
462
  document.getElementById("feedbackClose") && document.getElementById("feedbackClose").focus();
411
463
  }));
412
464
  },
413
- showFeedback(t) {
414
- return !!(this.$store.getters.getShowFeedback && this.feedbackIndex === t);
465
+ showFeedback(e) {
466
+ return !!(this.$store.getters.getShowFeedback && this.feedbackIndex === e);
415
467
  }
416
468
  },
417
469
  beforeMount() {
418
470
  this.$store.commit("setStepDone", !1), this.$store.commit("setStepHold", !0);
419
471
  }
420
- }, me = { class: "imageMarker" }, fe = ["src", "alt"], ge = { class: "hotspotArea" }, ke = ["src", "alt"], be = { class: "im-buttonText" };
421
- function ye(t, n, e, d, a, i) {
422
- const u = b("el-button"), h = b("Feedback");
423
- return s(), o("div", me, [
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, [
424
476
  r("img", {
425
- src: e.content.image,
426
- alt: e.content.imageAlt
427
- }, null, 8, fe),
428
- r("div", ge, [
429
- (s(!0), o(k, null, L(e.content.hotspots, (c, m) => (s(), o(k, null, [
430
- H(u, {
431
- type: c.buttonType,
432
- onClick: x((v) => i.changePage(c, m), ["stop"]),
433
- id: "hotspot_" + m,
434
- class: _([["is-" + c.buttonShape, { noBG: c.buttonImage }, c.class], "hotspot"]),
435
- style: y({ top: i.pixelFormat(c.cordinatesX), left: i.pixelFormat(c.cordinatesY), width: i.pixelFormat(c.dimensionsW), height: i.pixelFormat(c.dimensionsH) }),
436
- 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
437
489
  }, {
438
- default: f(() => [
439
- c.buttonImage ? (s(), o("img", {
490
+ default: p(() => [
491
+ a.buttonImage ? (o(), c("img", {
440
492
  key: 0,
441
493
  class: "im-ButtonImage",
442
- src: c.buttonImage,
443
- alt: "image marker " + Number(m + 1)
444
- }, null, 8, ke)) : l("", !0),
445
- r("span", be, p(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)
446
498
  ]),
447
499
  _: 2
448
500
  }, 1032, ["type", "onClick", "id", "class", "style", "icon"]),
449
- i.showFeedback(m) ? (s(), w(h, {
501
+ n.showFeedback(f) ? (o(), w(m, {
450
502
  key: 0,
451
- content: c
452
- }, null, 8, ["content"])) : l("", !0)
503
+ content: a
504
+ }, null, 8, ["content"])) : d("", !0)
453
505
  ], 64))), 256))
454
506
  ])
455
507
  ]);
456
508
  }
457
- const pe = /* @__PURE__ */ g(_e, [["render", ye], ["__scopeId", "data-v-3897bfb2"]]), xe = {
458
- install: (t, n) => {
459
- t.component("special-uploader", K), t.component("lab-header", U), t.component("lab-image", j), t.component("lab-kaltura", ne), t.component("lab-image-marker", pe);
509
+ const Te = /* @__PURE__ */ S(we, [["render", Fe], ["__scopeId", "data-v-3897bfb2"]]);
510
+ const He = {
511
+ props: ["content"],
512
+ data() {
513
+ return {
514
+ imageReplaced: !1,
515
+ imageSrc: this.content.image,
516
+ imageAlt: this.content.imageAlt
517
+ };
518
+ },
519
+ computed: {
520
+ getLastPage() {
521
+ return !!this.$store.getters.getLastPage;
522
+ }
523
+ },
524
+ methods: {
525
+ pixelFormat(e) {
526
+ return typeof e == "number" ? e + "px" : e;
527
+ },
528
+ changeImage(e) {
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
+ }
531
+ }
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
+ r("p", {
540
+ class: "imageReplacerDescription",
541
+ innerHTML: s.content.description
542
+ }, null, 8, Me)
543
+ ]),
544
+ _: 1
545
+ }),
546
+ C(b, { span: 12 }, {
547
+ default: p(() => [
548
+ r("img", {
549
+ class: "im-ButtonImage",
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
+ class: "hotspot",
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
+ }, null, 8, ["type", "onClick", "style", "icon"]))), 256))
561
+ ])
562
+ ]),
563
+ _: 1
564
+ })
565
+ ]),
566
+ _: 1
567
+ });
568
+ }
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);
460
1218
  }
461
1219
  };
462
1220
  export {
463
- xe as default
1221
+ mt as default
464
1222
  };